/*! zoom 1.7.20 license: mit http://www.jacklmoore.com/zoom */ (function(o){var t={url:!1,callback:!1,target:!1,duration:120,on:"mouseover",touch:!0,onzoomin:!1,onzoomout:!1,magnify:1};o.zoom=function(t,n,e,i){var u,c,r,a,m,l,s,f=o(t),h=f.css("position"),d=o(n);return t.style.position=/(absolute|fixed)/.test(h)?h:"relative",t.style.overflow="hidden",e.style.width=e.style.height="",o(e).addclass("zoomimg").css({position:"absolute",top:0,left:0,opacity:0,width:e.width*i,height:e.height*i,border:"none",maxwidth:"none",maxheight:"none"}).appendto(t),{init:function(){c=f.outerwidth(),u=f.outerheight(),n===t?(a=c,r=u):(a=d.outerwidth(),r=d.outerheight()),m=(e.width-c)/a,l=(e.height-u)/r,s=d.offset()},move:function(o){var t=o.pagex-s.left,n=o.pagey-s.top;n=math.max(math.min(n,r),0),t=math.max(math.min(t,a),0),e.style.left=t*-m+"px",e.style.top=n*-l+"px"}}},o.fn.zoom=function(n){return this.each(function(){var e=o.extend({},t,n||{}),i=e.target&&o(e.target)[0]||this,u=this,c=o(u),r=document.createelement("img"),a=o(r),m="mousemove.zoom",l=!1,s=!1;if(!e.url){var f=u.queryselector("img");if(f&&(e.url=f.getattribute("data-src")||f.currentsrc||f.src),!e.url)return}c.one("zoom.destroy",function(o,t){c.off(".zoom"),i.style.position=o,i.style.overflow=t,r.onload=null,a.remove()}.bind(this,i.style.position,i.style.overflow)),r.onload=function(){function t(t){f.init(),f.move(t),a.stop().fadeto(o.support.opacity?e.duration:0,1,o.isfunction(e.onzoomin)?e.onzoomin.call(r):!1)}function n(){a.stop().fadeto(e.duration,0,o.isfunction(e.onzoomout)?e.onzoomout.call(r):!1)}var f=o.zoom(i,u,r,e.magnify);"grab"===e.on?c.on("mousedown.zoom",function(e){1===e.which&&(o(document).one("mouseup.zoom",function(){n(),o(document).off(m,f.move)}),t(e),o(document).on(m,f.move),e.preventdefault())}):"click"===e.on?c.on("click.zoom",function(e){return l?void 0:(l=!0,t(e),o(document).on(m,f.move),o(document).one("click.zoom",function(){n(),l=!1,o(document).off(m,f.move)}),!1)}):"toggle"===e.on?c.on("click.zoom",function(o){l?n():t(o),l=!l}):"mouseover"===e.on&&(f.init(),c.on("mouseenter.zoom",t).on("mouseleave.zoom",n).on(m,f.move)),e.touch&&c.on("touchstart.zoom",function(o){o.preventdefault(),s?(s=!1,n()):(s=!0,t(o.originalevent.touches[0]||o.originalevent.changedtouches[0]))}).on("touchmove.zoom",function(o){o.preventdefault(),f.move(o.originalevent.touches[0]||o.originalevent.changedtouches[0])}).on("touchend.zoom",function(o){o.preventdefault(),s&&(s=!1,n())}),o.isfunction(e.callback)&&e.callback.call(r)},r.setattribute("role","presentation"),r.src=e.url})},o.fn.zoom.defaults=t})(window.jquery);