"), 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 < e / 120 ? b.currentZoomLevel >= 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.nzHeight < this.options.zoomWindowWidth / this.widthRatio ? this.nzHeight : String(this.options.zoomWindowHeight /
this.heightRatio), lensWidth = this.largeWidth < this.options.zoomWindowWidth ? this.nzWidth : this.options.zoomWindowWidth / this.widthRatio, this.widthRatio = this.largeWidth / this.nzWidth, this.heightRatio = this.largeHeight / this.nzHeight, "lens" != this.options.zoomType && (lensHeight = this.nzHeight < this.options.zoomWindowWidth / this.widthRatio ? this.nzHeight : String(this.options.zoomWindowHeight / this.heightRatio), lensWidth = this.options.zoomWindowWidth < this.options.zoomWindowWidth ? this.nzWidth : this.options.zoomWindowWidth /
this.widthRatio, this.zoomLens.css("width", lensWidth), this.zoomLens.css("height", lensHeight), this.options.tint && (this.zoomTintImage.css("width", this.nzWidth), this.zoomTintImage.css("height", this.nzHeight))), "lens" == this.options.zoomType && this.zoomLens.css({
width: String(this.options.lensSize) + "px",
height: String(this.options.lensSize) + "px"
}));
this.zoomContainer.css({
top: this.nzOffset.top
});
this.zoomContainer.css({
left: this.nzOffset.left
});
this.mouseLeft = parseInt(b.pageX - this.nzOffset.left);
this.mouseTop =
parseInt(b.pageY - this.nzOffset.top);
"window" == this.options.zoomType && (this.Etoppos = this.mouseTop < this.zoomLens.height() / 2, this.Eboppos = this.mouseTop > this.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.mouseTop < this.nzHeight / 2 / this.heightRatio, this.Eboppos = this.mouseTop > this.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.options.zoomWindowHeight && (a.windowTopPos =
0), a.largeWidth < a.options.zoomWindowWidth && (a.windowLeftPos = 0), a.options.easing ? (a.xp || (a.xp = 0), a.yp || (a.yp = 0), a.loop || (a.loop = setInterval(function() {
a.xp += (a.windowLeftPos - a.xp) / a.options.easingAmount;
a.yp += (a.windowTopPos - a.yp) / a.options.easingAmount;
a.scrollingLock ? (clearInterval(a.loop), a.xp = a.windowLeftPos, a.yp = a.windowTopPos, a.xp = -1 * ((b.pageX - a.nzOffset.left) * a.widthRatio - a.zoomWindow.width() / 2), a.yp = -1 * ((b.pageY - a.nzOffset.top) * a.heightRatio - a.zoomWindow.height() / 2), 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.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 < a.options.zoomWindowHeight ? a.zoomWindow.css({
"background-size": a.largeWidth / a.newvaluewidth + "px " + a.largeHeight / a.newvaluewidth + "px"
}) : a.zoomWindow.css({
"background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px"
})), a.changeBgSize = !1), a.zoomWindow.css({
backgroundPosition: a.windowLeftPos +
"px " + a.windowTopPos + "px"
}))
},
setTintPosition: function(b) {
this.nzOffset = this.$elem.offset();
this.tintpos = String(-1 * (b.pageX - this.nzOffset.left - this.zoomLens.width() / 2));
this.tintposy = String(-1 * (b.pageY - this.nzOffset.top - this.zoomLens.height() / 2));
this.Etoppos && (this.tintposy = 0);
this.Eloppos && (this.tintpos = 0);
this.Eboppos && (this.tintposy = -1 * (this.nzHeight - this.zoomLens.height() - 2 * this.options.lensBorderSize));
this.Eroppos && (this.tintpos = -1 * (this.nzWidth - this.zoomLens.width() - 2 * this.options.lensBorderSize));
this.options.tint && (this.fullheight && (this.tintposy = 0), this.fullwidth && (this.tintpos = 0), this.zoomTintImage.css({
left: this.tintpos + "px"
}), this.zoomTintImage.css({
top: this.tintposy + "px"
}))
},
swaptheimage: function(b, a) {
var c = this,
e = new Image;
c.options.loadingIcon && (c.spinner = d("
'), 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.nzHeight < this.options.zoomWindowWidth / this.widthRatio ? this.nzHeight : String(this.options.zoomWindowHeight / this.heightRatio), lensWidth = this.options.zoomWindowWidth < this.options.zoomWindowWidth ? this.nzWidth : this.options.zoomWindowWidth / this.widthRatio, this.zoomLens && (this.zoomLens.css("width",
lensWidth), this.zoomLens.css("height", lensHeight)))
},
getCurrentImage: function() {
return this.zoomImage
},
getGalleryList: function() {
var b = this;
b.gallerylist = [];
b.options.gallery ? d("#" + b.options.gallery + " a").each(function() {
var a = "";
d(this).data("zoom-image") ? a = d(this).data("zoom-image") : d(this).data("image") && (a = d(this).data("image"));
a == b.zoomImage ? b.gallerylist.unshift({
href: "" + a + "",
title: d(this).find("img").attr("title"),
type: 'image'
}) : b.gallerylist.push({
href: "" + a + "",
title: d(this).find("img").attr("title"),
type: 'image'
})
}) :
b.gallerylist.push({
href: "" + b.zoomImage + "",
title: d(this).find("img").attr("title"),
type: 'image'
});
return b.gallerylist
},
changeZoomLevel: function(b) {
this.scrollingLock = !0;
this.newvalue = parseFloat(b).toFixed(2);
newvalue = parseFloat(b).toFixed(2);
maxheightnewvalue = this.largeHeight / (this.options.zoomWindowHeight / this.nzHeight * this.nzHeight);
maxwidthtnewvalue = this.largeWidth / (this.options.zoomWindowWidth / this.nzWidth * this.nzWidth);
"inner" != this.options.zoomType && (maxheightnewvalue <= newvalue ? (this.heightRatio = this.largeHeight /
maxheightnewvalue / this.nzHeight, this.newvalueheight = maxheightnewvalue, this.fullheight = !0) : (this.heightRatio = this.largeHeight / newvalue / this.nzHeight, this.newvalueheight = newvalue, this.fullheight = !1), maxwidthtnewvalue <= newvalue ? (this.widthRatio = this.largeWidth / maxwidthtnewvalue / this.nzWidth, this.newvaluewidth = maxwidthtnewvalue, this.fullwidth = !0) : (this.widthRatio = this.largeWidth / newvalue / this.nzWidth, this.newvaluewidth = newvalue, this.fullwidth = !1), "lens" == this.options.zoomType && (maxheightnewvalue <= newvalue ?
(this.fullwidth = !0, this.newvaluewidth = maxheightnewvalue) : (this.widthRatio = this.largeWidth / newvalue / this.nzWidth, this.newvaluewidth = newvalue, this.fullwidth = !1)));
"inner" == this.options.zoomType && (maxheightnewvalue = parseFloat(this.largeHeight / this.nzHeight).toFixed(2), maxwidthtnewvalue = parseFloat(this.largeWidth / this.nzWidth).toFixed(2), newvalue > maxheightnewvalue && (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);/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0
The requested content cannot be loaded.
Please try again later.
'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index