/*
 jQuery Loupe v1.3.2
 https://github.com/iufer/jLoupe
*/jQuery.fn.jloupe=function(a){var b="1.3.2",c={width:200,height:200,margin:6,cursorOffsetX:10,cursorOffsetY:10,radiusLT:0,radiusLB:100,radiusRT:100,radiusRB:100,borderColor:"#999",backgroundColor:"#ddd",image:!1,repeat:!1,fade:!0};a&&(jQuery.extend(c,a),a.hasOwnProperty("color")&&(c.borderColor=c.backgroundColor=a.color));var d=$("<div />").addClass("thejloupe").css("position","absolute").css("width",c.width+"px").css("height",c.height+"px").css("backgroundColor",c.borderColor).hide().appendTo("body");c.borderColor||d.css("backgroundColor","none"),c.repeat?d.css("backgroundRepeat","repeat"):d.css("backgroundRepeat","no-repeat");var e=$("<div />").addClass("thejloupeview").css("width",c.width-c.margin*2+"px").css("height",c.height-c.margin*2+"px").css("backgroundRepeat","no-repeat").css("marginLeft",c.margin+"px").css("marginTop",c.margin+"px").appendTo(d);c.backgroundColor&&e.css("backgroundColor",c.backgroundColor),$.support.cssProperty("borderRadius")&&(c.image&&d.css("backgroundImage","url("+c.image+")"),$(e).css("border-top-left-radius",c.radiusLT).css("border-bottom-left-radius",c.radiusLB).css("border-bottom-right-radius",c.radiusRB).css("border-top-right-radius",c.radiusRT).css("-moz-border-radius-topleft",c.radiusLT).css("-moz-border-radius-bottomright",c.radiusRB).css("-moz-border-radius-bottomleft",c.radiusLB).css("-moz-border-radius-topright",c.radiusRT),(!c.image||c.repeat)&&$(d).css("border-top-left-radius",c.radiusLT).css("border-bottom-left-radius",c.radiusLB).css("border-bottom-right-radius",c.radiusRB).css("border-top-right-radius",c.radiusRT).css("-moz-border-radius-topleft",c.radiusLT).css("-moz-border-radius-bottomright",c.radiusRB).css("-moz-border-radius-bottomleft",c.radiusLB).css("-moz-border-radius-topright",c.radiusRT)),$(this).each(function(){var a=$(this).parent("a").attr("href"),b=$(this).attr("src");b=a?a:b;var c=$("<img />").attr("src",b);$(this).data("zoom",c)}).bind("mousemove",function(a){var b=$(this).offset(),f=$(this).data("zoom"),g=0,i=0;if(a.pageX||a.pageY)g=a.pageX,i=a.pageY;else if(a.clientX||a.clientY)g=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,i=a.clientY+document.body.scrollTop+document.documentElement.scrollTop;$(d).offset({top:i+c.cursorOffsetY,left:g+c.cursorOffsetX}),w=$(f).prop?$(f).prop("width"):$(f).attr("width"),h=$(f).prop?$(f).prop("height"):$(f).attr("height"),zlo=(g-b.left)/this.width*w*-1+c.width/2.5,zto=(i-b.top)/this.height*h*-1+c.height/2.5,$(e).css("backgroundImage","url("+$(f).attr("src")+")").css("backgroundPosition",zlo+"px "+zto+"px")}).bind("mouseleave",function(){$(d).stop(!0,!0),c.fade?$(d).fadeOut(100):$(d).hide()}).bind("mouseenter",function(){$(d).stop(!0,!0),c.fade?$(d).fadeIn():$(d).show()});return this},$.support.cssProperty=function(){function a(a,b){var c=document.body||document.documentElement,d=c.style;if(typeof d=="undefined")return!1;if(typeof d[a]=="string")return b?a:!0;var e=["Moz","Webkit","Khtml","O","Ms"];a=a.charAt(0).toUpperCase()+a.substr(1);for(var f=0;f<e.length;f++)if(typeof d[e[f]+a]=="string")return b?e[f]+a:!0}return a}(),$(function(){$(".jLoupe, .jloupe").jloupe()})
