/* jquery elevatezoom 3.0.8 - demo's and documentation: - www.elevateweb.co.uk/image-zoom - copyright (c) 2013 andrew eades - www.elevateweb.co.uk - dual licensed under the lgpl licenses. - http://en.wikipedia.org/wiki/mit_license - http://en.wikipedia.org/wiki/gnu_general_public_license */ "function"!==typeof object.create&&(object.create=function(d){function h(){}h.prototype=d;return new h}); (function(d,h,l,m){var k={init:function(b,a){var c=this;c.elem=a;c.$elem=d(a);c.imagesrc=c.$elem.data("zoom-image")?c.$elem.data("zoom-image"):c.$elem.attr("src");c.options=d.extend({},d.fn.elevatezoom.options,b);c.options.tint&&(c.options.lenscolour="none",c.options.lensopacity="1");"inner"==c.options.zoomtype&&(c.options.showlens=!1);c.$elem.parent().removeattr("title").removeattr("alt");c.zoomimage=c.imagesrc;c.refresh(1);d("#"+c.options.gallery+" a").click(function(a){c.options.galleryactiveclass&& (d("#"+c.options.gallery+" a").removeclass(c.options.galleryactiveclass),d(this).addclass(c.options.galleryactiveclass));a.preventdefault();d(this).data("zoom-image")?c.zoomimagepre=d(this).data("zoom-image"):c.zoomimagepre=d(this).data("image");c.swaptheimage(d(this).data("image"),c.zoomimagepre);return!1})},refresh:function(b){var a=this;settimeout(function(){a.fetch(a.imagesrc)},b||a.options.refresh)},fetch:function(b){var a=this,c=new image;c.onload=function(){a.largewidth=c.width;a.largeheight= c.height;a.startzoom();a.currentimage=a.imagesrc;a.options.onzoomedimageloaded(a.$elem)};c.src=b},startzoom:function(){var b=this;b.nzwidth=b.$elem.width();b.nzheight=b.$elem.height();b.iswindowactive=!1;b.islensactive=!1;b.istintactive=!1;b.overwindow=!1;b.options.imagecrossfade&&(b.zoomwrap=b.$elem.wrap('
'),b.$elem.css("position","absolute"));b.zoomlock=1;b.scrollinglock=!1;b.changebgsize=!1;b.currentzoomlevel=b.options.zoomlevel; b.nzoffset=b.$elem.offset();b.widthratio=b.largewidth/b.currentzoomlevel/b.nzwidth;b.heightratio=b.largeheight/b.currentzoomlevel/b.nzheight;"window"==b.options.zoomtype&&(b.zoomwindowstyle="overflow: hidden;background-position: 0px 0px;text-align:center;background-color: "+string(b.options.zoomwindowbgcolour)+";width: "+string(b.options.zoomwindowwidth)+"px;height: "+string(b.options.zoomwindowheight)+"px;float: left;background-size: "+b.largewidth/b.currentzoomlevel+"px "+b.largeheight/b.currentzoomlevel+ "px;display: none;z-index:100;border: "+string(b.options.bordersize)+"px solid "+b.options.bordercolour+";background-repeat: no-repeat;position: absolute;");if("inner"==b.options.zoomtype){var a=b.$elem.css("border-left-width");b.zoomwindowstyle="overflow: hidden;margin-left: "+string(a)+";margin-top: "+string(a)+";background-position: 0px 0px;width: "+string(b.nzwidth)+"px;height: "+string(b.nzheight)+"px;float: left;display: none;cursor:"+b.options.cursor+";px solid "+b.options.bordercolour+";background-repeat: no-repeat;position: absolute;"}"window"== b.options.zoomtype&&(lensheight=b.nzheight
');d("body").append(b.zoomcontainer);b.options.containlenszoom&&"lens"==b.options.zoomtype&&b.zoomcontainer.css("overflow", "hidden");"inner"!=b.options.zoomtype&&(b.zoomlens=d("
 
").appendto(b.zoomcontainer).click(function(){b.$elem.trigger("click")}),b.options.tint&&(b.tintcontainer=d("
").addclass("tintcontainer"),b.zoomtint=d("
"),b.zoomlens.wrap(b.tintcontainer),b.zoomtintcss=b.zoomlens.after(b.zoomtint),b.zoomtintimage=d('').appendto(b.zoomlens).click(function(){b.$elem.trigger("click")})));isnan(b.options.zoomwindowposition)?b.zoomwindow=d("
 
").appendto("body").click(function(){b.$elem.trigger("click")}):b.zoomwindow=d("
 
").appendto(b.zoomcontainer).click(function(){b.$elem.trigger("click")});b.zoomwindowcontainer=d("
").addclass("zoomwindowcontainer").css("width",b.options.zoomwindowwidth);b.zoomwindow.wrap(b.zoomwindowcontainer);"lens"==b.options.zoomtype&&b.zoomlens.css({backgroundimage:"url('"+b.imagesrc+"')"});"window"==b.options.zoomtype&&b.zoomwindow.css({backgroundimage:"url('"+b.imagesrc+"')"});"inner"==b.options.zoomtype&&b.zoomwindow.css({backgroundimage:"url('"+b.imagesrc+ "')"});b.$elem.bind("touchmove",function(a){a.preventdefault();b.setposition(a.originalevent.touches[0]||a.originalevent.changedtouches[0])});b.zoomcontainer.bind("touchmove",function(a){"inner"==b.options.zoomtype&&b.showhidewindow("show");a.preventdefault();b.setposition(a.originalevent.touches[0]||a.originalevent.changedtouches[0])});b.zoomcontainer.bind("touchend",function(a){b.showhidewindow("hide");b.options.showlens&&b.showhidelens("hide");b.options.tint&&"inner"!=b.options.zoomtype&&b.showhidetint("hide")}); b.$elem.bind("touchend",function(a){b.showhidewindow("hide");b.options.showlens&&b.showhidelens("hide");b.options.tint&&"inner"!=b.options.zoomtype&&b.showhidetint("hide")});b.options.showlens&&(b.zoomlens.bind("touchmove",function(a){a.preventdefault();b.setposition(a.originalevent.touches[0]||a.originalevent.changedtouches[0])}),b.zoomlens.bind("touchend",function(a){b.showhidewindow("hide");b.options.showlens&&b.showhidelens("hide");b.options.tint&&"inner"!=b.options.zoomtype&&b.showhidetint("hide")})); b.$elem.bind("mousemove",function(a){!1==b.overwindow&&b.setelements("show");if(b.lastx!==a.clientx||b.lasty!==a.clienty)b.setposition(a),b.currentloc=a;b.lastx=a.clientx;b.lasty=a.clienty});b.zoomcontainer.bind("mousemove",function(a){!1==b.overwindow&&b.setelements("show");if(b.lastx!==a.clientx||b.lasty!==a.clienty)b.setposition(a),b.currentloc=a;b.lastx=a.clientx;b.lasty=a.clienty});"inner"!=b.options.zoomtype&&b.zoomlens.bind("mousemove",function(a){if(b.lastx!==a.clientx||b.lasty!==a.clienty)b.setposition(a), b.currentloc=a;b.lastx=a.clientx;b.lasty=a.clienty});b.options.tint&&"inner"!=b.options.zoomtype&&b.zoomtint.bind("mousemove",function(a){if(b.lastx!==a.clientx||b.lasty!==a.clienty)b.setposition(a),b.currentloc=a;b.lastx=a.clientx;b.lasty=a.clienty});"inner"==b.options.zoomtype&&b.zoomwindow.bind("mousemove",function(a){if(b.lastx!==a.clientx||b.lasty!==a.clienty)b.setposition(a),b.currentloc=a;b.lastx=a.clientx;b.lasty=a.clienty});b.zoomcontainer.add(b.$elem).mouseenter(function(){!1==b.overwindow&& b.setelements("show")}).mouseleave(function(){b.scrolllock||b.setelements("hide")});"inner"!=b.options.zoomtype&&b.zoomwindow.mouseenter(function(){b.overwindow=!0;b.setelements("hide")}).mouseleave(function(){b.overwindow=!1});b.minzoomlevel=b.options.minzoomlevel?b.options.minzoomlevel:2*b.options.scrollzoomincrement;b.options.scrollzoom&&b.zoomcontainer.add(b.$elem).bind("mousewheel dommousescroll mozmousepixelscroll",function(a){b.scrolllock=!0;cleartimeout(d.data(this,"timer"));d.data(this,"timer", settimeout(function(){b.scrolllock=!1},250));var e=a.originalevent.wheeldelta||-1*a.originalevent.detail;a.stopimmediatepropagation();a.stoppropagation();a.preventdefault();0=b.minzoomlevel&&b.changezoomlevel(b.currentzoomlevel-b.options.scrollzoomincrement):b.options.maxzoomlevel?b.currentzoomlevel<=b.options.maxzoomlevel&&b.changezoomlevel(parsefloat(b.currentzoomlevel)+b.options.scrollzoomincrement):b.changezoomlevel(parsefloat(b.currentzoomlevel)+b.options.scrollzoomincrement); return!1})},setelements:function(b){if(!this.options.zoomenabled)return!1;"show"==b&&this.iswindowset&&("inner"==this.options.zoomtype&&this.showhidewindow("show"),"window"==this.options.zoomtype&&this.showhidewindow("show"),this.options.showlens&&this.showhidelens("show"),this.options.tint&&"inner"!=this.options.zoomtype&&this.showhidetint("show"));"hide"==b&&("window"==this.options.zoomtype&&this.showhidewindow("hide"),this.options.tint||this.showhidewindow("hide"),this.options.showlens&&this.showhidelens("hide"), this.options.tint&&this.showhidetint("hide"))},setposition:function(b){if(!this.options.zoomenabled)return!1;this.nzheight=this.$elem.height();this.nzwidth=this.$elem.width();this.nzoffset=this.$elem.offset();this.options.tint&&"inner"!=this.options.zoomtype&&(this.zoomtint.css({top:0}),this.zoomtint.css({left:0}));this.options.responsive&&!this.options.scrollzoom&&this.options.showlens&&(lensheight=this.nzheightthis.nzheight-this.zoomlens.height()/2-2*this.options.lensbordersize,this.eloppos=this.mouseleft<0+this.zoomlens.width()/2,this.eroppos=this.mouseleft>this.nzwidth-this.zoomlens.width()/2-2*this.options.lensbordersize);"inner"==this.options.zoomtype&&(this.etoppos=this.mousetopthis.nzheight- this.nzheight/2/this.heightratio,this.eloppos=this.mouseleft<0+this.nzwidth/2/this.widthratio,this.eroppos=this.mouseleft>this.nzwidth-this.nzwidth/2/this.widthratio-2*this.options.lensbordersize);0>=this.mouseleft||0>this.mousetop||this.mouseleft>this.nzwidth||this.mousetop>this.nzheight?this.setelements("hide"):(this.options.showlens&&(this.lensleftpos=string(this.mouseleft-this.zoomlens.width()/2),this.lenstoppos=string(this.mousetop-this.zoomlens.height()/2)),this.etoppos&&(this.lenstoppos=0), this.eloppos&&(this.tintpos=this.lensleftpos=this.windowleftpos=0),"window"==this.options.zoomtype&&(this.eboppos&&(this.lenstoppos=math.max(this.nzheight-this.zoomlens.height()-2*this.options.lensbordersize,0)),this.eroppos&&(this.lensleftpos=this.nzwidth-this.zoomlens.width()-2*this.options.lensbordersize)),"inner"==this.options.zoomtype&&(this.eboppos&&(this.lenstoppos=math.max(this.nzheight-2*this.options.lensbordersize,0)),this.eroppos&&(this.lensleftpos=this.nzwidth-this.nzwidth-2*this.options.lensbordersize)), "lens"==this.options.zoomtype&&(this.windowleftpos=string(-1*((b.pagex-this.nzoffset.left)*this.widthratio-this.zoomlens.width()/2)),this.windowtoppos=string(-1*((b.pagey-this.nzoffset.top)*this.heightratio-this.zoomlens.height()/2)),this.zoomlens.css({backgroundposition:this.windowleftpos+"px "+this.windowtoppos+"px"}),this.changebgsize&&(this.nzheight>this.nzwidth?("lens"==this.options.zoomtype&&this.zoomlens.css({"background-size":this.largewidth/this.newvalueheight+"px "+this.largeheight/this.newvalueheight+ "px"}),this.zoomwindow.css({"background-size":this.largewidth/this.newvalueheight+"px "+this.largeheight/this.newvalueheight+"px"})):("lens"==this.options.zoomtype&&this.zoomlens.css({"background-size":this.largewidth/this.newvaluewidth+"px "+this.largeheight/this.newvaluewidth+"px"}),this.zoomwindow.css({"background-size":this.largewidth/this.newvaluewidth+"px "+this.largeheight/this.newvaluewidth+"px"})),this.changebgsize=!1),this.setwindowpostition(b)),this.options.tint&&"inner"!=this.options.zoomtype&& this.settintposition(b),"window"==this.options.zoomtype&&this.setwindowpostition(b),"inner"==this.options.zoomtype&&this.setwindowpostition(b),this.options.showlens&&(this.fullwidth&&"lens"!=this.options.zoomtype&&(this.lensleftpos=0),this.zoomlens.css({left:this.lensleftpos+"px",top:this.lenstoppos+"px"})))},showhidewindow:function(b){"show"!=b||this.iswindowactive||(this.options.zoomwindowfadein?this.zoomwindow.stop(!0,!0,!1).fadein(this.options.zoomwindowfadein):this.zoomwindow.show(),this.iswindowactive= !0);"hide"==b&&this.iswindowactive&&(this.options.zoomwindowfadeout?this.zoomwindow.stop(!0,!0).fadeout(this.options.zoomwindowfadeout):this.zoomwindow.hide(),this.iswindowactive=!1)},showhidelens:function(b){"show"!=b||this.islensactive||(this.options.lensfadein?this.zoomlens.stop(!0,!0,!1).fadein(this.options.lensfadein):this.zoomlens.show(),this.islensactive=!0);"hide"==b&&this.islensactive&&(this.options.lensfadeout?this.zoomlens.stop(!0,!0).fadeout(this.options.lensfadeout):this.zoomlens.hide(), this.islensactive=!1)},showhidetint:function(b){"show"!=b||this.istintactive||(this.options.zoomtintfadein?this.zoomtint.css({opacity:this.options.tintopacity}).animate().stop(!0,!0).fadein("slow"):(this.zoomtint.css({opacity:this.options.tintopacity}).animate(),this.zoomtint.show()),this.istintactive=!0);"hide"==b&&this.istintactive&&(this.options.zoomtintfadeout?this.zoomtint.stop(!0,!0).fadeout(this.options.zoomtintfadeout):this.zoomtint.hide(),this.istintactive=!1)},setlenspostition:function(b){}, setwindowpostition:function(b){var a=this;if(isnan(a.options.zoomwindowposition))a.externalcontainer=d("#"+a.options.zoomwindowposition),a.externalcontainerwidth=a.externalcontainer.width(),a.externalcontainerheight=a.externalcontainer.height(),a.externalcontaineroffset=a.externalcontainer.offset(),a.windowoffsettop=a.externalcontaineroffset.top,a.windowoffsetleft=a.externalcontaineroffset.left;else switch(a.options.zoomwindowposition){case 1:a.windowoffsettop=a.options.zoomwindowoffety;a.windowoffsetleft= +a.nzwidth;break;case 2:a.options.zoomwindowheight>a.nzheight&&(a.windowoffsettop=-1*(a.options.zoomwindowheight/2-a.nzheight/2),a.windowoffsetleft=a.nzwidth);break;case 3:a.windowoffsettop=a.nzheight-a.zoomwindow.height()-2*a.options.bordersize;a.windowoffsetleft=a.nzwidth;break;case 4:a.windowoffsettop=a.nzheight;a.windowoffsetleft=a.nzwidth;break;case 5:a.windowoffsettop=a.nzheight;a.windowoffsetleft=a.nzwidth-a.zoomwindow.width()-2*a.options.bordersize;break;case 6:a.options.zoomwindowheight> a.nzheight&&(a.windowoffsettop=a.nzheight,a.windowoffsetleft=-1*(a.options.zoomwindowwidth/2-a.nzwidth/2+2*a.options.bordersize));break;case 7:a.windowoffsettop=a.nzheight;a.windowoffsetleft=0;break;case 8:a.windowoffsettop=a.nzheight;a.windowoffsetleft=-1*(a.zoomwindow.width()+2*a.options.bordersize);break;case 9:a.windowoffsettop=a.nzheight-a.zoomwindow.height()-2*a.options.bordersize;a.windowoffsetleft=-1*(a.zoomwindow.width()+2*a.options.bordersize);break;case 10:a.options.zoomwindowheight>a.nzheight&& (a.windowoffsettop=-1*(a.options.zoomwindowheight/2-a.nzheight/2),a.windowoffsetleft=-1*(a.zoomwindow.width()+2*a.options.bordersize));break;case 11:a.windowoffsettop=a.options.zoomwindowoffety;a.windowoffsetleft=-1*(a.zoomwindow.width()+2*a.options.bordersize);break;case 12:a.windowoffsettop=-1*(a.zoomwindow.height()+2*a.options.bordersize);a.windowoffsetleft=-1*(a.zoomwindow.width()+2*a.options.bordersize);break;case 13:a.windowoffsettop=-1*(a.zoomwindow.height()+2*a.options.bordersize);a.windowoffsetleft= 0;break;case 14:a.options.zoomwindowheight>a.nzheight&&(a.windowoffsettop=-1*(a.zoomwindow.height()+2*a.options.bordersize),a.windowoffsetleft=-1*(a.options.zoomwindowwidth/2-a.nzwidth/2+2*a.options.bordersize));break;case 15:a.windowoffsettop=-1*(a.zoomwindow.height()+2*a.options.bordersize);a.windowoffsetleft=a.nzwidth-a.zoomwindow.width()-2*a.options.bordersize;break;case 16:a.windowoffsettop=-1*(a.zoomwindow.height()+2*a.options.bordersize);a.windowoffsetleft=a.nzwidth;break;default:a.windowoffsettop= a.options.zoomwindowoffety,a.windowoffsetleft=a.nzwidth}a.iswindowset=!0;a.windowoffsettop+=a.options.zoomwindowoffety;a.windowoffsetleft+=a.options.zoomwindowoffetx;a.zoomwindow.css({top:a.windowoffsettop});a.zoomwindow.css({left:a.windowoffsetleft});"inner"==a.options.zoomtype&&(a.zoomwindow.css({top:0}),a.zoomwindow.css({left:0}));a.windowleftpos=string(-1*((b.pagex-a.nzoffset.left)*a.widthratio-a.zoomwindow.width()/2));a.windowtoppos=string(-1*((b.pagey-a.nzoffset.top)*a.heightratio-a.zoomwindow.height()/ 2));a.etoppos&&(a.windowtoppos=0);a.eloppos&&(a.windowleftpos=0);a.eboppos&&(a.windowtoppos=-1*(a.largeheight/a.currentzoomlevel-a.zoomwindow.height()));a.eroppos&&(a.windowleftpos=-1*(a.largewidth/a.currentzoomlevel-a.zoomwindow.width()));a.fullheight&&(a.windowtoppos=0);a.fullwidth&&(a.windowleftpos=0);if("window"==a.options.zoomtype||"inner"==a.options.zoomtype)1==a.zoomlock&&(1>=a.widthratio&&(a.windowleftpos=0),1>=a.heightratio&&(a.windowtoppos=0)),a.largeheight a.nzwidth?("lens"==a.options.zoomtype&&a.zoomlens.css({"background-size":a.largewidth/a.newvalueheight+"px "+a.largeheight/a.newvalueheight+"px"}),a.zoomwindow.css({"background-size":a.largewidth/a.newvalueheight+"px "+a.largeheight/a.newvalueheight+"px"})):("lens"!=a.options.zoomtype&&a.zoomlens.css({"background-size":a.largewidth/a.newvaluewidth+"px "+a.largeheight/a.newvalueheight+"px"}),a.zoomwindow.css({"background-size":a.largewidth/a.newvaluewidth+"px "+a.largeheight/a.newvaluewidth+"px"})), a.changebgsize=!1),a.zoomwindow.css({backgroundposition:a.windowleftpos+"px "+a.windowtoppos+"px"}),a.scrollinglock=!1,a.loop=!1):(a.changebgsize&&(a.nzheight>a.nzwidth?("lens"==a.options.zoomtype&&a.zoomlens.css({"background-size":a.largewidth/a.newvalueheight+"px "+a.largeheight/a.newvalueheight+"px"}),a.zoomwindow.css({"background-size":a.largewidth/a.newvalueheight+"px "+a.largeheight/a.newvalueheight+"px"})):("lens"!=a.options.zoomtype&&a.zoomlens.css({"background-size":a.largewidth/a.newvaluewidth+ "px "+a.largeheight/a.newvaluewidth+"px"}),a.zoomwindow.css({"background-size":a.largewidth/a.newvaluewidth+"px "+a.largeheight/a.newvaluewidth+"px"})),a.changebgsize=!1),a.zoomwindow.css({backgroundposition:a.xp+"px "+a.yp+"px"}))},16))):(a.changebgsize&&(a.nzheight>a.nzwidth?("lens"==a.options.zoomtype&&a.zoomlens.css({"background-size":a.largewidth/a.newvalueheight+"px "+a.largeheight/a.newvalueheight+"px"}),a.zoomwindow.css({"background-size":a.largewidth/a.newvalueheight+"px "+a.largeheight/ a.newvalueheight+"px"})):("lens"==a.options.zoomtype&&a.zoomlens.css({"background-size":a.largewidth/a.newvaluewidth+"px "+a.largeheight/a.newvaluewidth+"px"}),a.largeheight/a.newvaluewidth
'),c.$elem.after(c.spinner)); c.options.onimageswap(c.$elem);e.onload=function(){c.largewidth=e.width;c.largeheight=e.height;c.zoomimage=a;c.zoomwindow.css({"background-size":c.largewidth+"px "+c.largeheight+"px"});c.zoomwindow.css({"background-size":c.largewidth+"px "+c.largeheight+"px"});c.swapaction(b,a)};e.src=a},swapaction:function(b,a){var c=this,e=new image;e.onload=function(){c.nzheight=e.height;c.nzwidth=e.width;c.options.onimageswapcomplete(c.$elem);c.donecallback()};e.src=b;c.currentzoomlevel=c.options.zoomlevel;c.options.maxzoomlevel= !1;"lens"==c.options.zoomtype&&c.zoomlens.css({backgroundimage:"url('"+a+"')"});"window"==c.options.zoomtype&&c.zoomwindow.css({backgroundimage:"url('"+a+"')"});"inner"==c.options.zoomtype&&c.zoomwindow.css({backgroundimage:"url('"+a+"')"});c.currentimage=a;if(c.options.imagecrossfade){var f=c.$elem,g=f.clone();c.$elem.attr("src",b);c.$elem.after(g);g.stop(!0).fadeout(c.options.imagecrossfade,function(){d(this).remove()});c.$elem.width("auto").removeattr("width");c.$elem.height("auto").removeattr("height"); f.fadein(c.options.imagecrossfade);c.options.tint&&"inner"!=c.options.zoomtype&&(f=c.zoomtintimage,g=f.clone(),c.zoomtintimage.attr("src",a),c.zoomtintimage.after(g),g.stop(!0).fadeout(c.options.imagecrossfade,function(){d(this).remove()}),f.fadein(c.options.imagecrossfade),c.zoomtint.css({height:c.$elem.height()}),c.zoomtint.css({width:c.$elem.width()}));c.zoomcontainer.css("height",c.$elem.height());c.zoomcontainer.css("width",c.$elem.width());"inner"!=c.options.zoomtype||c.options.constraintype|| (c.zoomwrap.parent().css("height",c.$elem.height()),c.zoomwrap.parent().css("width",c.$elem.width()),c.zoomwindow.css("height",c.$elem.height()),c.zoomwindow.css("width",c.$elem.width()))}else c.$elem.attr("src",b),c.options.tint&&(c.zoomtintimage.attr("src",a),c.zoomtintimage.attr("height",c.$elem.height()),c.zoomtintimage.css({height:c.$elem.height()}),c.zoomtint.css({height:c.$elem.height()})),c.zoomcontainer.css("height",c.$elem.height()),c.zoomcontainer.css("width",c.$elem.width());c.options.imagecrossfade&& (c.zoomwrap.css("height",c.$elem.height()),c.zoomwrap.css("width",c.$elem.width()));c.options.constraintype&&("height"==c.options.constraintype&&(c.zoomcontainer.css("height",c.options.constrainsize),c.zoomcontainer.css("width","auto"),c.options.imagecrossfade?(c.zoomwrap.css("height",c.options.constrainsize),c.zoomwrap.css("width","auto"),c.constwidth=c.zoomwrap.width()):(c.$elem.css("height",c.options.constrainsize),c.$elem.css("width","auto"),c.constwidth=c.$elem.width()),"inner"==c.options.zoomtype&& (c.zoomwrap.parent().css("height",c.options.constrainsize),c.zoomwrap.parent().css("width",c.constwidth),c.zoomwindow.css("height",c.options.constrainsize),c.zoomwindow.css("width",c.constwidth)),c.options.tint&&(c.tintcontainer.css("height",c.options.constrainsize),c.tintcontainer.css("width",c.constwidth),c.zoomtint.css("height",c.options.constrainsize),c.zoomtint.css("width",c.constwidth),c.zoomtintimage.css("height",c.options.constrainsize),c.zoomtintimage.css("width",c.constwidth))),"width"== c.options.constraintype&&(c.zoomcontainer.css("height","auto"),c.zoomcontainer.css("width",c.options.constrainsize),c.options.imagecrossfade?(c.zoomwrap.css("height","auto"),c.zoomwrap.css("width",c.options.constrainsize),c.constheight=c.zoomwrap.height()):(c.$elem.css("height","auto"),c.$elem.css("width",c.options.constrainsize),c.constheight=c.$elem.height()),"inner"==c.options.zoomtype&&(c.zoomwrap.parent().css("height",c.constheight),c.zoomwrap.parent().css("width",c.options.constrainsize),c.zoomwindow.css("height", c.constheight),c.zoomwindow.css("width",c.options.constrainsize)),c.options.tint&&(c.tintcontainer.css("height",c.constheight),c.tintcontainer.css("width",c.options.constrainsize),c.zoomtint.css("height",c.constheight),c.zoomtint.css("width",c.options.constrainsize),c.zoomtintimage.css("height",c.constheight),c.zoomtintimage.css("width",c.options.constrainsize))))},donecallback:function(){this.options.loadingicon&&this.spinner.hide();this.nzoffset=this.$elem.offset();this.nzwidth=this.$elem.width(); this.nzheight=this.$elem.height();this.currentzoomlevel=this.options.zoomlevel;this.widthratio=this.largewidth/this.nzwidth;this.heightratio=this.largeheight/this.nzheight;"window"==this.options.zoomtype&&(lensheight=this.nzheightmaxheightnewvalue&&(newvalue=maxheightnewvalue),newvalue>maxwidthtnewvalue&&(newvalue=maxwidthtnewvalue),maxheightnewvalue<=newvalue?(this.heightratio=this.largeheight/ newvalue/this.nzheight,this.newvalueheight=newvalue>maxheightnewvalue?maxheightnewvalue:newvalue,this.fullheight=!0):(this.heightratio=this.largeheight/newvalue/this.nzheight,this.newvalueheight=newvalue>maxheightnewvalue?maxheightnewvalue:newvalue,this.fullheight=!1),maxwidthtnewvalue<=newvalue?(this.widthratio=this.largewidth/newvalue/this.nzwidth,this.newvaluewidth=newvalue>maxwidthtnewvalue?maxwidthtnewvalue:newvalue,this.fullwidth=!0):(this.widthratio=this.largewidth/newvalue/this.nzwidth,this.newvaluewidth= newvalue,this.fullwidth=!1));scrcontinue=!1;"inner"==this.options.zoomtype&&(this.nzwidth>this.nzheight&&(this.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,this.fullwidth=this.fullheight=!0)),this.nzheight>this.nzwidth&&(this.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,this.fullwidth=this.fullheight=!0)));"inner"!=this.options.zoomtype&&(scrcontinue=!0);scrcontinue&&(this.zoomlock=0,this.changezoom=!0,this.options.zoomwindowheight/this.heightratio<=this.nzheight&& (this.currentzoomlevel=this.newvalueheight,"lens"!=this.options.zoomtype&&"inner"!=this.options.zoomtype&&(this.changebgsize=!0,this.zoomlens.css({height:string(this.options.zoomwindowheight/this.heightratio)+"px"})),"lens"==this.options.zoomtype||"inner"==this.options.zoomtype)&&(this.changebgsize=!0),this.options.zoomwindowwidth/this.widthratio<=this.nzwidth&&("inner"!=this.options.zoomtype&&this.newvaluewidth>this.newvalueheight&&(this.currentzoomlevel=this.newvaluewidth),"lens"!=this.options.zoomtype&& "inner"!=this.options.zoomtype&&(this.changebgsize=!0,this.zoomlens.css({width:string(this.options.zoomwindowwidth/this.widthratio)+"px"})),"lens"==this.options.zoomtype||"inner"==this.options.zoomtype)&&(this.changebgsize=!0),"inner"==this.options.zoomtype&&(this.changebgsize=!0,this.nzwidth>this.nzheight&&(this.currentzoomlevel=this.newvaluewidth),this.nzheight>this.nzwidth&&(this.currentzoomlevel=this.newvaluewidth)));this.setposition(this.currentloc)},closeall:function(){self.zoomwindow&&self.zoomwindow.hide(); self.zoomlens&&self.zoomlens.hide();self.zoomtint&&self.zoomtint.hide()},changestate:function(b){"enable"==b&&(this.options.zoomenabled=!0);"disable"==b&&(this.options.zoomenabled=!1)}};d.fn.elevatezoom=function(b){return this.each(function(){var a=object.create(k);a.init(b,this);d.data(this,"elevatezoom",a)})};d.fn.elevatezoom.options={zoomactivation:"hover",zoomenabled:!0,preloading:1,zoomlevel:1,scrollzoom:!1,scrollzoomincrement:0.1,minzoomlevel:!1,maxzoomlevel:!1,easing:!1,easingamount:12,lenssize:200, zoomwindowwidth:400,zoomwindowheight:400,zoomwindowoffetx:0,zoomwindowoffety:0,zoomwindowposition:1,zoomwindowbgcolour:"#fff",lensfadein:!1,lensfadeout:!1,debug:!1,zoomwindowfadein:!1,zoomwindowfadeout:!1,zoomwindowalwaysshow:!1,zoomtintfadein:!1,zoomtintfadeout:!1,bordersize:4,showlens:!0,bordercolour:"#888",lensbordersize:1,lensbordercolour:"#000",lensshape:"square",zoomtype:"window",containlenszoom:!1,lenscolour:"white",lensopacity:0.4,lenszoom:!1,tint:!1,tintcolour:"#333",tintopacity:0.4,gallery:!1, galleryactiveclass:"zoomgalleryactive",imagecrossfade:!1,constraintype:!1,constrainsize:!1,loadingicon:!1,cursor:"default",responsive:!0,oncomplete:d.noop,onzoomedimageloaded:function(){},onimageswap:d.noop,onimageswapcomplete:d.noop}})(jquery,window,document);