PRODUCT OVERVIEW
COMMENT
COMMENT BUY
1){ ?>
1){ ?>
update_hash('products'); update_hash('products/'); $('.share_button').hover(function(){ $(this).find('.share_button_extended').stop(false, true).fadeIn(300); }, function(){ $(this).find('.share_button_extended').stop(false, true).fadeOut(300); }); $('.new_cell .main_product_image img').attr('orgWidth', $('.new_cell .main_product_image img').width()); $('.new_cell .main_product_image img').attr('orgHeight', $('.new_cell .main_product_image img').height()); $('.new_cell .main_product_image img').each(function(){ var orgWidth = $(this).attr('orgWidth'); var orgHeight = $(this).attr('orgHeight'); var holderWidth = 500; var holderHeight = $(this).parent().parent().height(); var newRatio = holderWidth/orgWidth; if(orgHeight*newRatio>holderHeight){ var newRatio = holderHeight/orgHeight; $(this).css('margin-top', (holderHeight-(newRatio*orgHeight))*0.5); }else{ $(this).css('margin-top', (holderHeight-(newRatio*orgHeight))*0.5); } $(this).width(orgWidth*newRatio); $(this).height(orgHeight*newRatio); }); $('.main_product_image img').load(function(){ $('.main_product_image img').attr('orgWidth', $('.main_product_image img').width()); $('.main_product_image img').attr('orgHeight', $('.main_product_image img').height()); check_width(); $('.main_product_image').css('opacity', 1); }); $('.next_button').click(function(e){ e.preventDefault(); next_product(); }); $('.prev_button').click(function(e){ e.preventDefault(); prev_product(); }); $('.product_image, .bottom_product_image').css('opacity', '0.5'); $('.product_image, .bottom_product_image').hover(function(){ $(this).stop().fadeTo(300, 1); },function(){ $(this).stop().fadeTo(300, 0.5); }); $('.product_image, .bottom_product_image').click(function(e){ e.preventDefault(); var newUrl = $(this).attr('data-url'); if(newUrl!=$('.main_product_image img').attr('src')){ $('.main_product_image img').css('width', 'auto'); $('.main_product_image img').css('height', 'auto'); $('.main_product_image').css('opacity', 0); $('.main_product_image img').attr('src', newUrl); } }); $('.comment_button').click(function(e){ e.preventDefault(); $.colorbox({ href:"comments.php?ref="+$(this).attr('data-url'), innerWidth:400 }); }); $('.splash_page_image a').click(function(e){ e.preventDefault(); load_new_page($(this).attr('data-url'),2,$(this).attr('data-col')); });