function MouseEvent(o){this.x=o.pageX,this.y=o.pageY}!function(o){o.fn.jqueryzoom=function(i){var t={xzoom:200,yzoom:200,offset:10,position:"right",lens:1,preload:1};i&&o.extend(t,i);var s="";o(this).hover(function(){var i=o(this).offset().left,e=o(this).offset().top,d=o(this).children("img").get(0).offsetWidth,m=o(this).children("img").get(0).offsetHeight;s=o(this).children("img").attr("alt");var h=o(this).children("img").attr("longdesc");o(this).children("img").attr("alt",""),0==o("div.zoomdiv").get().length&&(o(this).after("<div class='zoomdiv'><img class='bigimg' src='"+h+"'/></div>"),o(this).append("<div class='jqZoomPup'>&nbsp;</div>")),"right"==t.position?i+d+t.offset+t.xzoom>screen.width?leftpos=i-t.offset-t.xzoom:leftpos=i+d+t.offset:(leftpos=i-t.xzoom-t.offset,leftpos<0&&(leftpos=i+d+t.offset)),o("div.zoomdiv").css({top:e,left:leftpos}),o("div.zoomdiv").width(t.xzoom),o("div.zoomdiv").height(t.yzoom),o("div.zoomdiv").show(),t.lens||o(this).css("cursor","crosshair"),o(document.body).mousemove(function(s){mouse=new MouseEvent(s);var h=o(".bigimg").get(0).offsetWidth,l=o(".bigimg").get(0).offsetHeight,v="x",n="y";if(isNaN(n)|isNaN(v)){n=h/d,v=l/m;o("div.jqZoomPup").width(t.xzoom/(1*n)),o("div.jqZoomPup").height(t.yzoom/(1*v)),t.lens&&o("div.jqZoomPup").css("visibility","visible")}xpos=mouse.x-o("div.jqZoomPup").width()/2-i,ypos=mouse.y-o("div.jqZoomPup").height()/2-e,t.lens&&(xpos=mouse.x-o("div.jqZoomPup").width()/2<i?0:mouse.x+o("div.jqZoomPup").width()/2>d+i?d-o("div.jqZoomPup").width()-2:xpos,ypos=mouse.y-o("div.jqZoomPup").height()/2<e?0:mouse.y+o("div.jqZoomPup").height()/2>m+e?m-o("div.jqZoomPup").height()-2:ypos),t.lens&&o("div.jqZoomPup").css({top:ypos,left:xpos}),scrolly=ypos,o("div.zoomdiv").get(0).scrollTop=scrolly*v,scrollx=xpos,o("div.zoomdiv").get(0).scrollLeft=scrollx*n})},function(){o(this).children("img").attr("alt",s),o(document.body).unbind("mousemove"),t.lens&&o("div.jqZoomPup").remove(),o("div.zoomdiv").remove()}),count=0,t.preload&&(o("body").append("<div style='display:none;' class='jqPreload"+count+"'>mymyty</div>"),o(this).each(function(){var i=o(this).children("img").attr("longdesc"),t=jQuery("div.jqPreload"+count).html();jQuery("div.jqPreload"+count).html(t+'<img src="'+i+'">')}))}}(jQuery);