text: ﻿/*
  	AnythingZoomer v1.1 minified
  	Original by Chris Coyier: http://css-tricks.com
  	Get the latest version: https://github.com/Mottie/AnythingZoomer
  */
  
  (function(b){b.anythingZoomer=function(e,g){var f,c,a=this;a.$wrap=b(e).addClass("az-wrap").wrapInner('<span class="az-wrap-inner"/>');a.wrap=e;a.$wrap.data("zoomer",a);a.init=function(){a.options=c=b.extend({},b.anythingZoomer.defaultOptions,g);a.state=!0;a.$small=a.$wrap.find("."+c.smallArea);a.$large=a.$wrap.find("."+c.largeArea);if(c.clone)f=a.$small.clone().removeClass(c.smallArea).addClass(c.largeArea),a.$large.length?a.$large.html(f.html()):(a.$small.after(f),a.$large=a.$wrap.find("."+c.largeArea)); a.largeDim=[a.$large.wrapInner('<span class="az-large-inner"/>').find(".az-large-inner").width(),a.$large.height()];a.smallDim=[a.$small.wrapInner('<span class="az-small-inner"/>').find(".az-small-inner").width(),a.$small.height()];a.$large.addClass("az-large").wrap('<div class="az-zoom"></div>');a.$small.addClass("az-small");a.$zoom=a.$wrap.find(".az-zoom");a.ratio=[a.smallDim[0]===0?1:a.largeDim[0]/a.smallDim[0],a.smallDim[1]===0?1:a.largeDim[1]/a.smallDim[1]];a.$inner=a.$wrap.find(".az-wrap-inner").css({width:a.smallDim[0], height:a.smallDim[1]});a.zoomDim=a.last=[a.$zoom.width(),a.$zoom.height()];a.smallOffset=[a.$small.offset().left-a.$inner.position().left,a.$small.offset().top];a.$inner.bind("mouseenter.anythingZoomer",function(){a.state&&a.$zoom.fadeIn(100)}).bind("mouseleave.anythingZoomer",function(){if(a.state)a.timer=setTimeout(function(){a.$zoom.is(".az-windowed")&&a.hideZoom()},200)}).bind("mousemove.anythingZoomer",function(d){a.state&&(clearTimeout(a.timer),a.zoomAt(d.pageX-a.smallOffset[0],d.pageY-a.smallOffset[1]))}).bind(c.switchEvent+ (c.switchEvent!==""?".anythingZoomer":""),function(){a.state?a.showLarge():a.showSmall()});a.showSmall()};a.showSmall=function(){a.state=!0;a.$small.show();a.$zoom.removeClass("az-expanded").addClass("az-windowed az-zoom").css({width:a.zoomDim[0],height:a.zoomDim[1]});a.$inner.css({width:a.smallDim[0],height:a.smallDim[1]})};a.showLarge=function(){a.state=!1;a.$small.hide();a.$zoom.fadeIn(100).addClass("az-expanded").removeClass("az-windowed az-zoom").css({height:"auto",width:"auto"});a.$inner.css({width:a.largeDim[0], height:a.largeDim[1]});a.$large.css({left:0,top:0,width:a.largeDim[0],height:a.largeDim[1]})};a.setTarget=function(d,c,k){var e=0,h=0;a.$zoom.is(".az-windowed")||a.showSmall();!isNaN(d)&&!isNaN(c)?(e=parseInt(d,10),h=parseInt(c,10)):typeof d==="string"&&b(d).length&&(d=b(d),e=d.position().left+d.width()/2+(c?c[0]||0:0),h=d.position().top+d.height()/2+(c?c[1]||0:0));a.zoomAt(e,h,k)};a.zoomAt=function(d,e,b){var f=(b?b[0]||0:0)||a.last[0],b=(b?b[1]||b[0]||0:0)||a.last[1],h=f/2,g=b/2,i=c.edge||h*0.66, j=c.edge||g*0.66;a.last=[f,b];d<-i||d>a.smallDim[0]+i||e<-j||e>a.smallDim[1]+j?a.hideZoom():(a.$zoom.fadeIn(100),a.$zoom.css({left:d-h,top:e-g,width:f,height:b}),a.$large.css({left:-(d-h/2)*a.ratio[0],top:-(e-g/2)*a.ratio[1]}))};a.hideZoom=function(){a.last=a.zoomDim;a.$zoom.fadeOut(100)};a.init()};b.anythingZoomer.defaultOptions={smallArea:"small",largeArea:"large",clone:!1,switchEvent:"dblclick",edge:30};b.fn.anythingZoomer=function(e,g,f,c){return this.each(function(){var a=b(this).data("zoomer"); (typeof e).match("object|undefined")&&!a?new b.anythingZoomer(this,e):(typeof e==="string"||!isNaN(e)&&!isNaN(g))&&a.setTarget(e,g,f,c)})};b.fn.getAnythingZoomer=function(){return this.data("zoomer")}})(jQuery);
  