(function(A){A.fn.jqueryzoom=function(B){var D={xzoom:200,yzoom:200,offset:10,position:"right",lens:1,preload:1};if(B){A.extend(D,B)}var C="";A(this).hover(function(){var F=A(this).offset().left;var I=A(this).offset().top;var H=A(this).children("img").get(0).offsetWidth;var E=A(this).children("img").get(0).offsetHeight;C=A(this).children("img").attr("alt");var G=A(this).children("img").attr("jqimg");if(G!="undefined"&&G.length>0){A("div.jqZoomPup").remove();A("div.zoomdiv").remove();A(this).children("img").attr("alt","");if(A("div.zoomdiv").get().length==0){A(this).after("<div class='zoomdiv'><img class='bigimg' src='"+G+"'/></div>");A(this).append("<div class='jqZoomPup'>&nbsp;</div>")}if(D.position=="right"){if(F+H+D.offset+D.xzoom>screen.width){leftpos=F-D.offset-D.xzoom}else{leftpos=F+H+D.offset}}else{leftpos=F-D.xzoom-D.offset;if(leftpos<0){leftpos=F+H+D.offset}}A("div.zoomdiv").css({top:I,left:leftpos});A("div.zoomdiv").width(D.xzoom);A("div.zoomdiv").height(D.yzoom);A("div.zoomdiv").fadeIn();if(!D.lens){A(this).css("cursor","crosshair")}A(document.body).mousemove(function(M){mouse=new MouseEvent(M);var N=A(".bigimg").get(0).offsetWidth;var L=A(".bigimg").get(0).offsetHeight;var J="x";var K="y";if(isNaN(K)|isNaN(J)){var K=(N/H);var J=(L/E);A("div.jqZoomPup").width((D.xzoom)/K);A("div.jqZoomPup").height((D.yzoom)/J);if(D.lens){A("div.jqZoomPup").css("visibility","visible")}}xpos=mouse.x-A("div.jqZoomPup").width()/2-F;ypos=mouse.y-A("div.jqZoomPup").height()/2-I;if(D.lens){xpos=(mouse.x-A("div.jqZoomPup").width()/2<F)?0:(mouse.x+A("div.jqZoomPup").width()/2>H+F)?(H-A("div.jqZoomPup").width()-2):xpos;ypos=(mouse.y-A("div.jqZoomPup").height()/2<I)?0:(mouse.y+A("div.jqZoomPup").height()/2>E+I)?(E-A("div.jqZoomPup").height()-2):ypos}if(D.lens){A("div.jqZoomPup").css({top:ypos,left:xpos})}scrolly=ypos;A("div.zoomdiv").get(0).scrollTop=scrolly*J;scrollx=xpos;A("div.zoomdiv").get(0).scrollLeft=(scrollx)*K})}},function(){A(this).children("img").attr("alt",C);A(document.body).unbind("mousemove");if(D.lens){A("div.jqZoomPup").fadeOut()}A("div.zoomdiv").fadeOut()});count=0;if(D.preload){A("body").append("<div style='display:none;' class='jqPreload"+count+"'>sdsdssdsd</div>");A(this).each(function(){var F=A(this).children("img").attr("jqimg");var E=jQuery("div.jqPreload"+count+"").html();jQuery("div.jqPreload"+count+"").html(E+'<img src="'+F+'">')})}}})(jQuery);function MouseEvent(A){this.x=A.pageX;this.y=A.pageY};