function imageLoaded(){$("div#zoomCont").show();if($("img#zoomProductImg").height()>400){clearInterval(checkLoad);createZoom()}$("div#zoomCont").hide()}function stopCheckLoad(){clearInterval(checkLoad)}function createZoom(){var c=parseFloat($("img#zoomProductImg").height())/parseFloat($("img#mainProductImage").height());var e=-(parseFloat($("img#zoomProductImg").width())-parseFloat($("div#zoomCont").width()));var b=-(parseFloat($("img#zoomProductImg").height())-parseFloat($("div#zoomCont").height()));$("div#mouseWindow").css({height:(parseFloat($("div#zoomCont").height())/c+"px"),width:(parseFloat($("div#zoomCont").width())/c+"px")}).hide();$("div#zoomCont").hide();$("p#rolloverIntro").show();var f=$("div#mainImageCont").offset();var d=parseFloat($("div#mouseWindow").height()/2);var a=parseFloat($("div#mouseWindow").width()/2);$("div#mainImageCont").mousemove(function(j){var g=(j.pageX-f.left-a);var k=(j.pageY-f.top-d);var i=-(j.pageX-f.left-a)*c;var h=-(j.pageY-f.top-d)*c;if(i>0){i=0;g=0}else{if(i<e){g=-e/c;i=e}}if(h>0){k=0;h=0}else{if(h<b){k=-b/c;h=b}}$("img#zoomProductImg").css({top:h,left:i});$("div#mouseWindow").css({top:k,left:g})});if(($.browser.msie)&&($.browser.version=="6.0")){$.each($("img.pngMainImage"),function(g,h){imageSrc=$(h).attr("src");imageHeight=$(h).attr("height");imageWidth=$(h).attr("width");imageFilter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+imageSrc+", sizingMethod='crop')";$(h).parent().css("filter",imageFilter);$(h).parent().css("height",imageHeight);$(h).parent().css("width",imageWidth);$(h).css("display","none")})}$("div#mainImageCont").hover(function(g){$("div#mouseWindow, iframe#zoomFrame, div#zoomCont").show();$(".info").hide()},function(g){$("div#mouseWindow, iframe#zoomFrame, div#zoomCont").hide();$(".info").show()}).css("cursor","pointer")}(function(){jQuery.fn.frescaZoom=function(){$("div#mainImageCont").unbind("mousemove");$("div#mainImageCont").unbind("hover");$("div#zoomCont").unbind("mouseover");$("img#zoomProductImg, div#zoomCont, div#mouseWindow, iframe#zoomFrame").remove();$("<div id='zoomCont'></div>").hide().insertAfter("div#mainImageCont");$("<div id='mouseWindow'></div>").appendTo("div#mainImageCont");var a=$(this).attr("src").replace("large","zoom").replace(".png",".jpg");$("<img id='zoomProductImg'>").attr("src",a).appendTo($("div#zoomCont"));$("<iframe id='zoomFrame' frameBorder='0'></iframe>").css({display:"block",width:$("div#zoomCont").width(),height:$("div#zoomCont").height()}).prependTo($("div#zoomCont"));checkLoad=setInterval("imageLoaded()",40);setTimeout("stopCheckLoad()",5000)}})(jQuery);