PageSourceSearch

https://mongolskieunty.ru/catalog/view/javascript/jquery.elevatezoom.min.js

js mongolskieunty.ru collected 2026-09-28 12:43:50 UTC 44,892 bytes, 615 lines download raw bytes

1/* 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 */
2"function" !== typeof Object.create && (Object.create = function(d) {
3    function h() {}
4    h.prototype = d;
5    return new h
6});
7(function(d, h, l, m) {
8    var k = {
9        init: function(b, a) {
10            var c = this;
11            c.elem = a;
12            c.$elem = d(a);
13            c.imageSrc = c.$elem.data("zoom-image") ? c.$elem.data("zoom-image") : c.$elem.attr("src");
14            c.options = d.extend({}, d.fn.elevateZoom.options, b);
15            c.options.tint && (c.options.lensColour = "none", c.options.lensOpacity = "1");
16            "inner" == c.options.zoomType && (c.options.showLens = !1);
17            c.$elem.parent().removeAttr("title").removeAttr("alt");
18            c.zoomImage = c.imageSrc;
19            c.refresh(1);
20            d("#" + c.options.gallery + " a").click(function(a) {
21                c.options.galleryActiveClass &&
22                    (d("#" + c.options.gallery + " a").removeClass(c.options.galleryActiveClass), d(this).addClass(c.options.galleryActiveClass));
23                a.preventDefault();
24                d(this).data("zoom-image") ? c.zoomImagePre = d(this).data("zoom-image") : c.zoomImagePre = d(this).data("image");
25                c.swaptheimage(d(this).data("image"), c.zoomImagePre);
26                return !1
27            })
28        },
29        refresh: function(b) {
30            var a = this;
31            setTimeout(function() {
32                a.fetch(a.imageSrc)
33            }, b || a.options.refresh)
34        },
35        fetch: function(b) {
36            var a = this,
37                c = new Image;
38            c.onload = function() {
39                a.largeWidth = c.width;
40                a.largeHeight =
41                    c.height;
42                a.startZoom();
43                a.currentImage = a.imageSrc;
44                a.options.onZoomedImageLoaded(a.$elem)
45            };
46            c.src = b
47        },
48        startZoom: function() {
49            var b = this;
50            b.nzWidth = b.$elem.width();
51            b.nzHeight = b.$elem.height();
52            b.isWindowActive = !1;
53            b.isLensActive = !1;
54            b.isTintActive = !1;
55            b.overWindow = !1;
56            b.options.imageCrossfade && (b.zoomWrap = b.$elem.wrap('<div style="height:' + b.nzHeight + "px;width:" + b.nzWidth + 'px;" class="zoomWrapper" />'), b.$elem.css("position", "absolute"));
57            b.zoomLock = 1;
58            b.scrollingLock = !1;
59            b.changeBgSize = !1;
60            b.currentZoomLevel = b.options.zoomLevel;
61            b.nzOffset = b.$elem.offset();
62            b.widthRatio = b.largeWidth / b.currentZoomLevel / b.nzWidth;
63            b.heightRatio = b.largeHeight / b.currentZoomLevel / b.nzHeight;
64            "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 +
65                "px;display: none;z-index:100;border: " + String(b.options.borderSize) + "px solid " + b.options.borderColour + ";background-repeat: no-repeat;position: absolute;");
66            if ("inner" == b.options.zoomType) {
67                var a = b.$elem.css("border-left-width");
68                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;"
69            }
70            "window" ==
71            b.options.zoomType && (lensHeight = b.nzHeight < b.options.zoomWindowWidth / b.widthRatio ? b.nzHeight : 
71String(b.options.zoomWindowHeight / b.heightRatio), lensWidth = b.largeWidth < b.options.zoomWindowWidth ? b.nzWidth : b.options.zoomWindowWidth / b.widthRatio, b.lensStyle = "background-position: 0px 0px;width: " + String(b.options.zoomWindowWidth / b.widthRatio) + "px;height: " + String(b.options.zoomWindowHeight / b.heightRatio) + "px;float: right;display: none;overflow: hidden;z-index: 999;-webkit-transform: translateZ(0);opacity:" +
72                b.options.lensOpacity + ";filter: alpha(opacity = " + 100 * b.options.lensOpacity + "); zoom:1;width:" + lensWidth + "px;height:" + lensHeight + "px;background-color:" + b.options.lensColour + ";cursor:" + b.options.cursor + ";border: " + b.options.lensBorderSize + "px solid " + b.options.lensBorderColour + ";background-repeat: no-repeat;position: absolute;");
73            b.tintStyle = "display: block;position: absolute;background-color: " + b.options.tintColour + ";filter:alpha(opacity=0);opacity: 0;width: " + b.nzWidth + "px;height: " + b.nzHeight + "px;";
74            b.lensRound = "";
75            "lens" == b.options.zoomType && (b.lensStyle = "background-position: 0px 0px;float: left;display: none;border: " + String(b.options.borderSize) + "px solid " + b.options.borderColour + ";width:" + String(b.options.lensSize) + "px;height:" + String(b.options.lensSize) + "px;background-repeat: no-repeat;position: absolute;");
76            "round" == b.options.lensShape && (b.lensRound = "border-top-left-radius: " + String(b.options.lensSize / 2 + b.options.borderSize) + "px;border-top-right-radius: " + String(b.options.lensSize / 2 + b.options.borderSize) +
77                "px;border-bottom-left-radius: " + String(b.options.lensSize / 2 + b.options.borderSize) + "px;border-bottom-right-radius: " + String(b.options.lensSize / 2 + b.options.borderSize) + "px;");
78            b.zoomContainer = d('<div class="zoomContainer" style="-webkit-transform: translateZ(0);position:absolute;left:' + b.nzOffset.left + "px;top:" + b.nzOffset.top + "px;height:" + b.nzHeight + "px;width:" + b.nzWidth + 'px;"></div>');
79            d("body").append(b.zoomContainer);
80            b.options.containLensZoom && "lens" == b.options.zoomType && b.zoomContainer.css("overflow",
81                "hidden");
82            "inner" != b.options.zoomType && (b.zoomLens = d("<div class='zoomLens' style='" + b.lensStyle + b.lensRound + "'>&nbsp;</div>").appendTo(b.zoomContainer).click(function() {
83                b.$elem.trigger("click")
84            }), b.options.tint && (b.tintContainer = d("<div/>").addClass("tintContainer"), b.zoomTint = d("<div class='zoomTint' style='" + b.tintStyle + "'></div>"), b.zoomLens.wrap(b.tintContainer), b.zoomTintcss = b.zoomLens.after(b.zoomTint), b.zoomTintImage = d('<img style="position: absolute; left: 0px; top: 0px; max-width: none; width: ' +
85                b.nzWidth + "px; height: " + b.nzHeight + 'px;" src="' + b.imageSrc + '">').appendTo(b.zoomLens).click(function() {
86                b.$elem.trigger("click")
87            })));
88            isNaN(b.options.zoomWindowPosition) ? b.zoomWindow = d("<div style='z-index:999;left:" + b.windowOffsetLeft + "px;top:" + b.windowOffsetTop + "px;" + b.zoomWindowStyle + "' class='zoomWindow'>&nbsp;</div>").appendTo("body").click(function() {
89                b.$elem.trigger("click")
90            }) : b.zoomWindow = d("<div style='z-index:999;left:" + b.windowOffsetLeft + "px;top:" + b.windowOffsetTop + "px;" + b.zoomWindowStyle +
91                "' class='zoomWindow'>&nbsp;</div>").appendTo(b.zoomContainer).click(function() {
92                b.$elem.trigger("click")
93            });
94            b.zoomWindowContainer = d("<div/>").addClass("zoomWindowContainer").css("width", b.options.zoomWindowWidth);
95            b.zoomWindow.wrap(b.zoomWindowContainer);
96            "lens" == b.options.zoomType && b.zoomLens.css({
97                backgroundImage: "url('" + b.imageSrc + "')"
98            });
99            "window" == b.options.zoomType && b.zoomWindow.css({
100                backgroundImage: "url('" + b.imageSrc + "')"
101            });
102            "inner" == b.options.zoomType && b.zoomWindow.css({
103                backgroundImage: "url('" + b.imageSrc +
104                    "')"
105            });
106            b.$elem.bind("touchmove", function(a) {
107                a.preventDefault();
108                b.setPosition(a.originalEvent.touches[0] || a.originalEvent.changedTouches[0])
109            });
110            b.zoomContainer.bind("touchmove", function(a) {
111                "inner" == b.options.zoomType && b.showHideWindow("show");
112                a.preventDefault();
113                b.setPosition(a.originalEvent.touches[0] || a.originalEvent.changedTouches[0])
114            });
115            b.zoomContainer.bind("touchend", function(a) {
116                b.showHideWindow("hide");
117                b.options.showLens && b.showHideLens("hide");
118                b.options.tint && "inner" != b.options.zoomType && b.showHideTint("hide")
119            });
120            b.$elem.bind("touchend", function(a) {
121                b.showHideWindow("hide");
122                b.options.showLens && b.showHideLens("hide");
123                b.options.tint && "inner" != b.options.zoomType && b.showHideTint("hide")
124            });
125            b.options.showLens && (b.zoomLens.bind("touchmove", function(a) {
126                a.preventDefault();
127                b.setPosition(a.originalEvent.touches[0] || a.originalEvent.changedTouches[0])
128            }), b.zoomLens.bind("touchend", function(a) {
129                b.showHideWindow("hide");
130                b.options.showLens && b.showHideLens("hide");
131                b.options.tint && "inner" != b.options.zoomType && b.showHideTint("hide")
132            }));
133            b.$elem.bind("mousemove", function(a) {
134                !1 == b.overWindow && b.setElements("show");
135                if (b.lastX !== a.clientX || b.lastY !== a.clientY) b.setPosition(a), b.currentLoc = a;
136                b.lastX = a.clientX;
137                b.lastY = a.clientY
138            });
139            b.zoomContainer.bind("mousemove", function(a) {
140                !1 == b.overWindow && b.setElements("show");
141                if (b.lastX !== a.clientX || b.lastY !== a.clientY) b.setPosition(a), b.currentLoc = a;
142                b.lastX = a.clientX;
143                b.lastY = a.clientY
144            });
145            "inner" != b.options.zoomType && b.zoomLens.bind("mousemove", function(a) {
146                if (b.lastX !== a.clientX || b.lastY !== a.clientY) b.setPosition(a),
147                    b.currentLoc = a;
148                b.lastX = a.clientX;
149                b.lastY = a.clientY
150            });
151            b.options.tint && "inner" != b.options.zoomType && b.zoomTint.bind("mousemove", function(a) {
152                if (b.lastX !== a.clientX || b.lastY !== a.clientY) b.setPosition(a), b.currentLoc = a;
153                b.lastX = a.clientX;
154                b.lastY = a.clientY
155            });
156            "inner" == b.options.zoomType && b.zoomWindow.bind("mousemove", function(a) {
157                if (b.lastX !== a.clientX || b.lastY !== a.clientY) b.setPosition(a), b.currentLoc = a;
158                b.lastX = a.clientX;
159                b.lastY = a.clientY
160            });
161            b.zoomContainer.add(b.$elem).mouseenter(function() {
162                !1 == b.overWindow &&
163                    b.setElements("show")
164            }).mouseleave(function() {
165                b.scrollLock || b.setElements("hide")
166            });
167            "inner" != b.options.zoomType && b.zoomWindow.mouseenter(function() {
168                b.overWindow = !0;
169                b.setElements("hide")
170            }).mouseleave(function() {
171                b.overWindow = !1
172            });
173            b.minZoomLevel = b.options.minZoomLevel ? b.options.minZoomLevel : 2 * b.options.scrollZoomIncrement;
174            b.options.scrollZoom && b.zoomContainer.add(b.$elem).bind("mousewheel DOMMouseScroll MozMousePixelScroll", function(a) {
175                b.scrollLock = !0;
176                clearTimeout(d.data(this, "timer"));
177                d.data(this, "timer",
178                    setTimeout(function() {
179                        b.scrollLock = !1
180                    }, 250));
181                var e = a.originalEvent.wheelDelta || -1 * a.originalEvent.detail;
182                a.stopImmediatePropagation();
183                a.stopPropagation();
184                a.preventDefault();
185                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);
186                return !1
187            })
188        },
189        setElements: function(b) {
190            if (!this.options.zoomEnabled) return !1;
191            "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"));
192            "hide" == b && ("window" == this.options.zoomType && this.showHideWindow("hide"), this.options.tint || this.showHideWindow("hide"), this.options.showLens && this.showHideLens("hide"),
193                this.options.tint && this.showHideTint("hide"))
194        },
195        setPosition: function(b) {
196            if (!this.options.zoomEnabled) return !1;
197            this.nzHeight = this.$elem.height();
198            this.nzWidth = this.$elem.width();
199            this.nzOffset = this.$elem.offset();
200            this.options.tint && "inner" != this.options.zoomType && (this.zoomTint.css({
201                top: 0
202            }), this.zoomTint.css({
203                left: 0
204            }));
205            this.options.responsive && !this.options.scrollZoom && this.options.showLens && (lensHeight = this.nzHeight < this.options.zoomWindowWidth / this.widthRatio ? this.nzHeight : 
205String(this.options.zoomWindowHeight /
206                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 /
207                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({
208                width: String(this.options.lensSize) + "px",
209                height: String(this.options.lensSize) + "px"
210            }));
211            this.zoomContainer.css({
212                top: this.nzOffset.top
213            });
214            this.zoomContainer.css({
215                left: this.nzOffset.left
216            });
217            this.mouseLeft = parseInt(b.pageX - this.nzOffset.left);
218            this.mouseTop =
219                parseInt(b.pageY - this.nzOffset.top);
220            "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);
221            "inner" == this.options.zoomType && (this.Etoppos = this.mouseTop < this.nzHeight / 2 / this.heightRatio, this.Eboppos = this.mouseTop > this.nzHeight -
222                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);
223            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),
224                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)),
225                "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({
226                    backgroundPosition: this.windowLeftPos + "px " + this.windowTopPos + "px"
227                }), this.changeBgSize && (this.nzHeight > this.nzWidth ? ("lens" == this.options.zoomType && this.zoomLens.css({
228                    "background-size": this.largeWidth / this.newvalueheight + "px " + this.largeHeight / this.newvalueheight +
229                        "px"
230                }), this.zoomWindow.css({
231                    "background-size": this.largeWidth / this.newvalueheight + "px " + this.largeHeight / this.newvalueheight + "px"
232                })) : ("lens" == this.options.zoomType && this.zoomLens.css({
233                    "background-size": this.largeWidth / this.newvaluewidth + "px " + this.largeHeight / this.newvaluewidth + "px"
234                }), this.zoomWindow.css({
235                    "background-size": this.largeWidth / this.newvaluewidth + "px " + this.largeHeight / this.newvaluewidth + "px"
236                })), this.changeBgSize = !1), this.setWindowPostition(b)), this.options.tint && "inner" != this.options.zoomType &&
237                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({
238                    left: this.lensLeftPos + "px",
239                    top: this.lensTopPos + "px"
240                })))
241        },
242        showHideWindow: function(b) {
243            "show" != b || this.isWindowActive || (this.options.zoomWindowFadeIn ? this.zoomWindow.stop(!0, !0, !1).fadeIn(this.options.zoomWindowFadeIn) : this.zoomWindow.show(), this.isWindowActive = !0);
244            "hide" == b && this.isWindowActive && (this.options.zoomWindowFadeOut ? this.zoomWindow.stop(!0, !0).fadeOut(this.options.zoomWindowFadeOut) : this.zoomWindow.hide(), this.isWindowActive = !1)
245        },
246        showHideLens: function(b) {
247            "show" != b || this.isLensActive || (this.options.lensFadeIn ? this.zoomLens.stop(!0, !0, !1).fadeIn(this.options.lensFadeIn) : this.zoomLens.show(), this.isLensActive = !0);
248            "hide" == b && this.isLensActive && (this.options.lensFadeOut ? this.zoomLens.stop(!0, !0).fadeOut(this.options.lensFadeOut) : this.zoomLens.hide(),
249                this.isLensActive = !1)
250        },
251        showHideTint: function(b) {
252            "show" != b || this.isTintActive || (this.options.zoomTintFadeIn ? this.zoomTint.css({
253                opacity: this.options.tintOpacity
254            }).animate().stop(!0, !0).fadeIn("slow") : (this.zoomTint.css({
255                opacity: this.options.tintOpacity
256            }).animate(), this.zoomTint.show()), this.isTintActive = !0);
257            "hide" == b && this.isTintActive && (this.options.zoomTintFadeOut ? this.zoomTint.stop(!0, !0).fadeOut(this.options.zoomTintFadeOut) : this.zoomTint.hide(), this.isTintActive = !1)
258        },
259        setLensPostition: function(b) {},
260        setWindowPostition: function(b) {
261            var a = this;
262            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;
263            else switch (a.options.zoomWindowPosition) {
264                case 1:
265                    a.windowOffsetTop = a.options.zoomWindowOffety;
266                    a.windowOffsetLeft = +a.nzWidth;
267                    break;
268                case 2:
269                    a.options.zoomWindowHeight > a.nzHeight && (a.windowOffsetTop = -1 * (a.options.zoomWindowHeight / 2 - a.nzHeight / 2), a.windowOffsetLeft = a.nzWidth);
270                    break;
271                case 3:
272                    a.windowOffsetTop = a.nzHeight - a.zoomWindow.height() - 2 * a.options.borderSize;
273                    a.windowOffsetLeft = a.nzWidth;
274                    break;
275                case 4:
276                    a.windowOffsetTop = a.nzHeight;
277                    a.windowOffsetLeft = a.nzWidth;
278                    break;
279                case 5:
280                    a.windowOffsetTop = a.nzHeight;
281                    a.windowOffsetLeft = a.nzWidth - a.zoomWindow.width() - 2 * a.options.borderSize;
282                    break;
283                case 6:
284                    a.options.zoomWindowHeight >
285                        a.nzHeight && (a.windowOffsetTop = a.nzHeight, a.windowOffsetLeft = -1 * (a.options.zoomWindowWidth / 2 - a.nzWidth / 2 + 2 * a.options.borderSize));
286                    break;
287                case 7:
288                    a.windowOffsetTop = a.nzHeight;
289                    a.windowOffsetLeft = 0;
290                    break;
291                case 8:
292                    a.windowOffsetTop = a.nzHeight;
293                    a.windowOffsetLeft = -1 * (a.zoomWindow.width() + 2 * a.options.borderSize);
294                    break;
295                case 9:
296                    a.windowOffsetTop = a.nzHeight - a.zoomWindow.height() - 2 * a.options.borderSize;
297                    a.windowOffsetLeft = -1 * (a.zoomWindow.width() + 2 * a.options.borderSize);
298                    break;
299                case 10:
300                    a.options.zoomWindowHeight > a.nzHeight &&
301                        (a.windowOffsetTop = -1 * (a.options.zoomWindowHeight / 2 - a.nzHeight / 2), a.windowOffsetLeft = -1 * (a.zoomWindow.width() + 2 * a.options.borderSize));
302                    break;
303                case 11:
304                    a.windowOffsetTop = a.options.zoomWindowOffety;
305                    a.windowOffsetLeft = -1 * (a.zoomWindow.width() + 2 * a.options.borderSize);
306                    break;
307                case 12:
308                    a.windowOffsetTop = -1 * (a.zoomWindow.height() + 2 * a.options.borderSize);
309                    a.windowOffsetLeft = -1 * (a.zoomWindow.width() + 2 * a.options.borderSize);
310                    break;
311                case 13:
312                    a.windowOffsetTop = -1 * (a.zoomWindow.height() + 2 * a.options.borderSize);
313                    a.windowOffsetLeft =
314                        0;
315                    break;
316                case 14:
317                    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));
318                    break;
319                case 15:
320                    a.windowOffsetTop = -1 * (a.zoomWindow.height() + 2 * a.options.borderSize);
321                    a.windowOffsetLeft = a.nzWidth - a.zoomWindow.width() - 2 * a.options.borderSize;
322                    break;
323                case 16:
324                    a.windowOffsetTop = -1 * (a.zoomWindow.height() + 2 * a.options.borderSize);
325                    a.windowOffsetLeft = a.nzWidth;
326                    break;
327                default:
328                    a.windowOffsetTop =
329                        a.options.zoomWindowOffety, a.windowOffsetLeft = a.nzWidth
330            }
331            a.isWindowSet = !0;
332            a.windowOffsetTop += a.options.zoomWindowOffety;
333            a.windowOffsetLeft += a.options.zoomWindowOffetx;
334            a.zoomWindow.css({
335                top: a.windowOffsetTop
336            });
337            a.zoomWindow.css({
338                left: a.windowOffsetLeft
339            });
340            "inner" == a.options.zoomType && (a.zoomWindow.css({
341                top: 0
342            }), a.zoomWindow.css({
343                left: 0
344            }));
345            a.windowLeftPos = String(-1 * ((b.pageX - a.nzOffset.left) * a.widthRatio - a.zoomWindow.width() / 2));
346            a.windowTopPos = String(-1 * ((b.pageY - a.nzOffset.top) * a.heightRatio - a.zoomWindow.height() /
347                2));
348            a.Etoppos && (a.windowTopPos = 0);
349            a.Eloppos && (a.windowLeftPos = 0);
350            a.Eboppos && (a.windowTopPos = -1 * (a.largeHeight / a.currentZoomLevel - a.zoomWindow.height()));
351            a.Eroppos && (a.windowLeftPos = -1 * (a.largeWidth / a.currentZoomLevel - a.zoomWindow.width()));
352            a.fullheight && (a.windowTopPos = 0);
353            a.fullwidth && (a.windowLeftPos = 0);
354            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 =
355                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() {
356                a.xp += (a.windowLeftPos - a.xp) / a.options.easingAmou
356nt;
357                a.yp += (a.windowTopPos - a.yp) / a.options.easingAmount;
358                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 >
359                    a.nzWidth ? ("lens" == a.options.zoomType && a.zoomLens.css({
360                        "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px"
361                    }), a.zoomWindow.css({
362                        "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px"
363                    })) : ("lens" != a.options.zoomType && a.zoomLens.css({
364                        "background-size": a.largeWidth / a.newvaluewidth + "px " + a.largeHeight / a.newvalueheight + "px"
365                    }), a.zoomWindow.css({
366                        "background-size": a.largeWidth / a.newvaluewidth + "px " + a.largeHeight / a.newvaluewidth + "px"
367                    })),
368                    a.changeBgSize = !1), a.zoomWindow.css({
369                    backgroundPosition: a.windowLeftPos + "px " + a.windowTopPos + "px"
370                }), a.scrollingLock = !1, a.loop = !1) : (a.changeBgSize && (a.nzHeight > a.nzWidth ? ("lens" == a.options.zoomType && a.zoomLens.css({
371                    "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px"
372                }), a.zoomWindow.css({
373                    "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px"
374                })) : ("lens" != a.options.zoomType && a.zoomLens.css({
375                    "background-size": a.largeWidth / a.newvaluewidth +
376                        "px " + a.largeHeight / a.newvaluewidth + "px"
377                }), a.zoomWindow.css({
378                    "background-size": a.largeWidth / a.newvaluewidth + "px " + a.largeHeight / a.newvaluewidth + "px"
379                })), a.changeBgSize = !1), a.zoomWindow.css({
380                    backgroundPosition: a.xp + "px " + a.yp + "px"
381                }))
382            }, 16))) : (a.changeBgSize && (a.nzHeight > a.nzWidth ? ("lens" == a.options.zoomType && a.zoomLens.css({
383                "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px"
384            }), a.zoomWindow.css({
385                "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight /
386                    a.newvalueheight + "px"
387            })) : ("lens" == a.options.zoomType && a.zoomLens.css({
388                "background-size": a.largeWidth / a.newvaluewidth + "px " + a.largeHeight / a.newvaluewidth + "px"
389            }), a.largeHeight / a.newvaluewidth < a.options.zoomWindowHeight ? a.zoomWindow.css({
390                "background-size": a.largeWidth / a.newvaluewidth + "px " + a.largeHeight / a.newvaluewidth + "px"
391            }) : a.zoomWindow.css({
392                "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px"
393            })), a.changeBgSize = !1), a.zoomWindow.css({
394                backgroundPosition: a.windowLeftPos +
395                    "px " + a.windowTopPos + "px"
396            }))
397        },
398        setTintPosition: function(b) {
399            this.nzOffset = this.$elem.offset();
400            this.tintpos = String(-1 * (b.pageX - this.nzOffset.left - this.zoomLens.width() / 2));
401            this.tintposy = String(-1 * (b.pageY - this.nzOffset.top - this.zoomLens.height() / 2));
402            this.Etoppos && (this.tintposy = 0);
403            this.Eloppos && (this.tintpos = 0);
404            this.Eboppos && (this.tintposy = -1 * (this.nzHeight - this.zoomLens.height() - 2 * this.options.lensBorderSize));
405            this.Eroppos && (this.tintpos = -1 * (this.nzWidth - this.zoomLens.width() - 2 * this.options.lensBorderSize));
406            this.options.tint && (this.fullheight && (this.tintposy = 0), this.fullwidth && (this.tintpos = 0), this.zoomTintImage.css({
407                left: this.tintpos + "px"
408            }), this.zoomTintImage.css({
409                top: this.tintposy + "px"
410            }))
411        },
412        swaptheimage: function(b, a) {
413            var c = this,
414                e = new Image;
415            c.options.loadingIcon && (c.spinner = d("<div style=\"background: url('" + c.options.loadingIcon + "') no-repeat center;height:" + c.nzHeight + "px;
415width:" + c.nzWidth + 'px;z-index: 2000;position: absolute; background-position: center center;"></div>'), c.$elem.after(c.spinner));
416            c.options.onImageSwap(c.$elem);
417            e.onload = function() {
418                c.largeWidth = e.width;
419                c.largeHeight = e.height;
420                c.zoomImage = a;
421                c.zoomWindow.css({
422                    "background-size": c.largeWidth + "px " + c.largeHeight + "px"
423                });
424                c.zoomWindow.css({
425                    "background-size": c.largeWidth + "px " + c.largeHeight + "px"
426                });
427                c.swapAction(b, a)
428            };
429            e.src = a
430        },
431        swapAction: function(b, a) {
432            var c = this,
433                e = new Image;
434            e.onload = function() {
435                c.nzHeight = e.height;
436                c.nzWidth = e.width;
437                c.options.onImageSwapComplete(c.$elem);
438                c.doneCallback()
439            };
440            e.src = b;
441            c.currentZoomLevel = c.options.zoomLevel;
442            c.options.maxZoomLevel = !1;
443            "lens" == c.options.zoomType && c.zoomLens.css({
444                backgroundImage: "url('" + a + "')"
445            });
446            "window" == c.options.zoomType && c.zoomWindow.css({
447                backgroundImage: "url('" + a + "')"
448            });
449            "inner" == c.options.zoomType && c.zoomWindow.css({
450                backgroundImage: "url('" + a + "')"
451            });
452            c.currentImage = a;
453            if (c.options.imageCrossfade) {
454                var f = c.$elem,
455                    g = f.clone();
456                c.$elem.attr("src", b);
457                c.$elem.after(g);
458                g.stop(!0).fadeOut(c.options.imageCrossfade, function() {
459                    d(this).remove()
460                });
461                c.$elem.width("auto").removeAttr("width");
462                c.$elem.height("auto").removeAttr("height");
463                f.fadeIn(c.options.imageCrossfade);
464                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() {
465                    d(this).remove()
466                }), f.fadeIn(c.options.imageCrossfade), c.zoomTint.css({
467                    height: c.$elem.height()
468                }), c.zoomTint.css({
469                    width: c.$elem.width()
470                }));
471                c.zoomContainer.css("height", c.$elem.height());
472                c.zoomContainer.css("width", c.$elem.width());
473                "inner" != c.options.zoomType || c.options.constrainType ||
474                    (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()))
475            } else c.$elem.attr("src", b), c.options.tint && (c.zoomTintImage.attr("src", a), c.zoomTintImage.attr("height", c.$elem.height()), c.zoomTintImage.css({
476                height: c.$elem.height()
477            }), c.zoomTint.css({
478                height: c.$elem.height()
479            })), c.zoomContainer.css("height", c.$elem.height()), c.zoomContainer.css("width", c.$elem.width());
480            c.options.imageCrossfade &&
481                (c.zoomWrap.css("height", c.$elem.height()), c.zoomWrap.css("width", c.$elem.width()));
482            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 &&
483                    (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" ==
484                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",
485                    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))))
486        },
487        doneCallback: function() {
488            this.options.loadingIcon && this.spinner.hide();
489            this.nzOffset = this.$elem.offset();
490            this.nzWidth = this.$elem.width();
491            this.nzHeight = this.$elem.height();
492            this.currentZoomLevel = this.options.zoomLevel;
493            this.widthRatio = this.largeWidth / this.nzWidth;
494            this.heightRatio = this.largeHeight / this.nzHeight;
495            "window" == this.options.zoomType && (lensHeight = this.nzHeight < this.options.zoomWindowWidth / this.widthRatio ? this.nzHeight : 
495String(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",
496                lensWidth), this.zoomLens.css("height", lensHeight)))
497        },
498        getCurrentImage: function() {
499            return this.zoomImage
500        },
501        getGalleryList: function() {
502            var b = this;
503            b.gallerylist = [];
504            b.options.gallery ? d("#" + b.options.gallery + " a").each(function() {
505                    var a = "";
506                    d(this).data("zoom-image") ? a = d(this).data("zoom-image") : d(this).data("image") && (a = d(this).data("image"));
507                    a == b.zoomImage ? b.gallerylist.unshift({
508                        href: "" + a + "",
509                        title: d(this).find("img").attr("title")
510                    }) : b.gallerylist.push({
511                        href: "" + a + "",
512                        title: d(this).find("img").attr("title")
513                    })
514                }) :
515                b.gallerylist.push({
516                    href: "" + b.zoomImage + "",
517                    title: d(this).find("img").attr("title")
518                });
519            return b.gallerylist
520        },
521        changeZoomLevel: function(b) {
522            this.scrollingLock = !0;
523            this.newvalue = parseFloat(b).toFixed(2);
524            newvalue = parseFloat(b).toFixed(2);
525            maxheightnewvalue = this.largeHeight / (this.options.zoomWindowHeight / this.nzHeight * this.nzHeight);
526            maxwidthtnewvalue = this.largeWidth / (this.options.zoomWindowWidth / this.nzWidth * this.nzWidth);
527            "inner" != this.options.zoomType && (maxheightnewvalue <= newvalue ? (this.heightRatio = this.largeHeight /
528                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 ?
529                (this.fullwidth = !0, this.newvaluewidth = maxheightnewvalue) : (this.widthRatio = this.largeWidth / newvalue / this.nzWidth, this.newvaluewidth = newvalue, this.fullwidth = !1)));
530            "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 /
531                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 =
532                newvalue, this.fullwidth = !1));
533            scrcontinue = !1;
534            "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)));
535            "inner" != this.options.zoomType && (scrcontinue = !0);
536            scrcontinue && (this.zoomLock = 0, this.changeZoom = !0, this.options.zoomWindowHeight / this.heightRatio <= this.nzHeight &&
537                (this.currentZoomLevel = this.newvalueheight, "lens" != this.options.zoomType && "inner" != this.options.zoomType && (this.changeBgSize = !0, this.zoomLens.css({
538                    height: String(this.options.zoomWindowHeight / this.heightRatio) + "px"
539                })), "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 &&
540                    "inner" != this.options.zoomType && (this.changeBgSize = !0, this.zoomLens.css({
541                        width: String(this.options.zoomWindowWidth / this.widthRatio) + "px"
542                    })), "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)));
543            this.setPosition(this.currentLoc)
544        },
545        closeAll: function() {
546            self.zoomWindow && self.zoomWindow.hide();
547            self.zoomLens && self.zoomLens.hide();
548            self.zoomTint && self.zoomTint.hide()
549        },
550        changeState: function(b) {
551            "enable" == b && (this.options.zoomEnabled = !0);
552            "disable" == b && (this.options.zoomEnabled = !1)
553        }
554    };
555    d.fn.elevateZoom = function(b) {
556        return this.each(function() {
557            var a = Object.create(k);
558            a.init(b, this);
559            d.data(this, "elevateZoom", a)
560        })
561    };
562    d.fn.elevateZoom.options = {
563        zoomActivation: "hover",
564        zoomEnabled: !0,
565        preloading: 1,
566        zoomLevel: 1,
567        scrollZoom: !1,
568        scrollZoomIncrement: 0.1,
569        minZoomLevel: !1,
570        maxZoomLevel: !1,
571        easing: !1,
572        easingAmount: 12,
573        lensSize: 200,
574        zoomWindowWidth: 400,
575        zoomWindowHeight: 400,
576        zoomWindowOffetx: 0,
577        zoomWindowOffety: 0,
578        zoomWindowPosition: 1,
579        zoomWindowBgColour: "#fff",
580        lensFadeIn: !1,
581        lensFadeOut: !1,
582        debug: !1,
583        zoomWindowFadeIn: !1,
584        zoomWindowFadeOut: !1,
585        zoomWindowAlwaysShow: !1,
586        zoomTintFadeIn: !1,
587        zoomTintFadeOut: !1,
588        borderSize: 1,
589        showLens: !0,
590        borderColour: "#888",
591        lensBorderSize: 1,
592        lensBorderColour: "#000",
593        lensShape: "square",
594        zoomType: "window",
595        containLensZoom: !1,
596        lensColour: "white",
597        lensOpacity: 0.4,
598        lenszoom: !1,
599        tint: !1,
600        tintColour: "#333",
601        tintOpacity: 0.4,
602        gallery: !1,
603        galleryActiveClass: "zoomGalleryActive",
604        imageCrossfade: !1,
605        constrainType: !1,
606        constrainSize: !1,
607        loadingIcon: !1,
608        cursor: "crosshair",
609        responsive: !0,
610        onComplete: d.noop,
611        onZoomedImageLoaded: function() {},
612        onImageSwap: d.noop,
613        onImageSwapComplete: d.noop
614    }
615})(jQuery, window, document);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.