0){ echo ''; } ?>
update_hash('lifestyle'); $('.lifestyle_shot img').each(function(){ var orgWidth = $(this).width(); var orgHeight = $(this).height(); var holderWidth = $(this).parent().parent().width(); var holderHeight = $(this).parent().parent().height(); var newRatio = holderWidth/orgWidth; if(orgHeight*newRatio < holderHeight){ var newRatio = holderHeight/orgHeight; } $(this).width(orgWidth*newRatio); $(this).height(orgHeight*newRatio); }); $('.next_button').click(function(e){ e.preventDefault(); if(popup_open){ $('#popup_close').trigger('click'); } next_lifestyle(); }); $('.prev_button').click(function(e){ e.preventDefault(); if(popup_open){ $('#popup_close').trigger('click'); } prev_lifestyle(); }); $('.menu_selector_button').click(function(){ $('#popup_close').trigger('click'); }); $('#lifestyle_launch, #popup_close').live('click',function(e){ e.preventDefault(); if(popup_open){ $('#lifestyle_popup').fadeOut(function(){ $('#lifestyle_popup').empty(); popup_open = false; }); } else { var lifestyle_id = parseInt($(this).attr('data-lifestyle')); load_lifestyle_info(lifestyle_id); } });