PageSourceSearch

https://www.ocr.org.uk/js/jquery.fancybox--modified.js

js ocr.org.uk collected 2026-10-01 11:30:00 UTC 38,991 bytes, 852 lines download raw bytes

vendor: 33,501 bytes, lines 1-738
1/*! fancyBox v2.1.4 fancyapps.com | fancyapps.com/fancybox/#license */
2(function (C, z, f, r) {
3    var q = f(C),
4        n = f(z),
5        b = f.fancybox = function () {
6            b.open.apply(this, arguments)
7        },
8        H = navigator.userAgent.match(/msie/),
9        w = null,
10        s = z.createTouch !== r,
11        t = function (a) {
12            return a && a.hasOwnProperty && a instanceof f
13        },
14        p = function (a) {
15            return a && "string" === f.type(a)
16        },
17        F = function (a) {
18            return p(a) && 0 < a.indexOf("%")
19        },
20        l = function (a, d) {
21            var e = parseInt(a, 10) || 0;
22            d && F(a) && (e *= b.getViewport()[d] / 100);
23            return Math.ceil(e)
24        },
25        x = function (a, b) {
26            return l(a, b) + "px"
27        };
28    f.extend(b, {
29        version: "2.1.4",
30        defaults: {
31            padding: 15,
32            margin: 20,
33            width: 800,
34            height: 600,
35            minWidth: 100,
36            minHeight: 100,
37            maxWidth: 9999,
38            maxHeight: 9999,
39            autoSize: !0,
40            autoHeight: !1,
41            autoWidth: !1,
42            autoResize: !0,
43            autoCenter: !s,
44            fitToView: !0,
45            aspectRatio: !1,
46            topRatio: 0.5,
47            leftRatio: 0.5,
48            scrolling: "auto",
49            wrapCSS: "",
50            arrows: !0,
51            closeBtn: !0,
52            closeClick: !1,
53            nextClick: !1,
54            mouseWheel: !0,
55            autoPlay: !1,
56            playSpeed: 3E3,
57            preload: 3,
58            modal: !1,
59            loop: !0,
60            ajax: {
61                dataType: "html",
62                headers: {
63                    "X-fancyBox": !0
64                }
65            },
66            iframe: {
67                scrolling: "auto",
68                preload: !0
69            },
70            swf: {
71                wmode: "transparent",
72                allowfullscreen: "true",
73                allowscriptaccess: "always"
74            },
75            keys: {
76                next: {
77                    13: "left",
78                    34: "up",
79                    39: "left",
80                    40: "up"
81                },
82                prev: {
83                    8: "right",
84                    33: "down",
85                    37: "right",
86                    38: "down"
87                },
88                close: [27],
89                play: [32],
90                toggle: [70]
91            },
92            direction: {
93                next: "left",
94                prev: "right"
95            },
96            scrollOutside: !0,
97            index: 0,
98            type: null,
99            href: null,
100            content: null,
101            title: null,
102            tpl: {
103                wrap: '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
104                image: '<img class="fancybox-image" src="{href}" alt="" />',
105                iframe: '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' +
106                    (H ? ' allowtransparency="true"' : "") + "></iframe>",
107                error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
108                closeBtn: '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
109                next: '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
110                prev: '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
111            },
112            openEffect: "fade",
113            openSpeed: 250,
114            openEasing: "swing",
115            openOpacity: !0,
116            openMethod: "zoomIn",
117            closeEffect: "fade",
118            closeSpeed: 250,
119            closeEasing: "swing",
120            closeOpacity: !0,
121            closeMethod: "zoomOut",
122            nextEffect: "elastic",
123            nextSpeed: 250,
124            nextEasing: "swing",
125            nextMethod: "changeIn",
126            prevEffect: "elastic",
127            prevSpeed: 250,
128            prevEasing: "swing",
129            prevMethod: "changeOut",
130            helpers: {
131                overlay: !0,
132                title: !0
133            },
134            onCancel: f.noop,
135            beforeLoad: f.noop,
136            afterLoad: f.noop,
137            beforeShow: f.noop,
138            afterShow: f.noop,
139            beforeChange: f.noop,
140            beforeClose: f.noop,
141            afterClose: f.noop
142        },
143        group: {},
144        opts: {},
145        previous: null,
146        coming: null,
147        current: null,
148        isActive: !1,
149        isOpen: !1,
150        isOpened: !1,
151        wrap: null,
152        skin: null,
153        outer: null,
154        inner: null,
155        player: {
156            timer: null,
157            isActive: !1
158        },
159        ajaxLoad: null,
160        imgPreload: null,
161        transitions: {},
162        helpers: {},
163        open: function (a, d) {
164            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) {
165                var k = {},
166                    g, h, j, m, l;
167                "object" === f.type(c) && (c.nodeType && (c = f(c)), t(c) ? (k = {
168                    href: c.data("fancybox-href") || c.attr("href"),
169                    title: c.data("fancybox-title") || c.attr("title"),
170                    isDom: !0,
171                    element: c
172                }, f.metadata && f.extend(!0, k,
173                    c.metadata())) : k = c);
174                g = d.href || k.href || (p(c) ? c : null);
175                h = d.title !== r ? d.title : k.title || "";
176                m = (j = d.content || k.content) ? "html" : d.type || k.type;
177                !m && k.isDom && (m = c.data("fancybox-type"), m || (m = (m = c.prop("class").match(/fancybox\.(\w+)/)) ? m[1] : null));
178                p(g) && (m || (b.isImage(g) ? m = "image" : b.isSWF(g) ? m = "swf" : "#" === g.charAt(0) ? m = "inline" : p(c) && (m = "html", j = c)), "ajax" === m && (l = g.split(/\s+/, 2), g = l.shift(), l = l.shift()));
179                j || ("inline" === m ? g ? j = f(p(g) ? g.replace(/.*(?=#[^\s]+$)/, "") : g) : k.isDom && (j = c) : "html" === m ? j = g : !m && (!g &&
180                    k.isDom) && (m = "inline", j = c));
181                f.extend(k, {
182                    href: g,
183                    type: m,
184                    content: j,
185                    title: h,
186                    selector: l
187                });
188                a[e] = k
189            }), b.opts = f.extend(!0, {}, b.defaults, d), d.keys !== r && (b.opts.keys = d.keys ? f.extend({}, b.defaults.keys, d.keys) : !1), b.group = a, b._start(b.opts.index)
190        },
191        cancel: function () {
192            var a = b.coming;
193            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 ||
194                b._afterZoomOut(a))
195        },
196        close: function (a) {
197            b.cancel();
198            !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]())))
199        },
200        play: function (a) {
201            var d = function () {
202                clearTimeout(b.player.timer)
203            },
204                e = function () {
205                    d();
206                    b.current && b.player.isActive && (b.player.timer =
207                        setTimeout(b.next, b.current.playSpeed))
208                },
209                c = function () {
210                    d();
211                    f("body").unbind(".player");
212                    b.player.isActive = !1;
213                    b.trigger("onPlayEnd")
214                };
215            if (!0 === a || !b.player.isActive && !1 !== a) {
216                if (b.current && (b.current.loop || b.current.index < b.group.length - 1)) b.player.isActive = !0, f("body").bind({
217                    "afterShow.player onUpdate.player": e,
218                    "onCancel.player beforeClose.player": c,
219                    "beforeLoad.player": d
220                }), e(), b.trigger("onPlayStart")
221            } else c()
222        },
223        next: function (a) {
224            var d = b.current;
225            d && (p(a) || (a = d.direction.next), b.jumpto(d.index + 1, a, "next"))
226        },
227        prev: function (a) {
228            var d = b.current;
229            d && (p(a) || (a = d.direction.prev), b.jumpto(d.index - 1, a, "prev"))
230        },
231        jumpto: function (a, d, e) {
232            var c = b.current;
233            c && (a = l(a), b.direction = d || c.direction[a >= c.index ? "next" : "prev"], b.router = e || "jumpto", c.loop && (0 > a && (a = c.group.length + a % c.group.length), a %= c.group.length), c.group[a] !== r && (b.cancel(), b._start(a)))
234        },
235        reposition: function (a, d) {
236            var e = b.current,
237                c = e ? e.wrap : null,
238                k;
239            c && (k = b._getPosition(d), a && "scroll" === a.type ? (delete k.position, c.stop(!0, !0).animate(k, 200)) : (c.css(k), e.pos = f.extend({},
240                e.dim, k)))
241        },
242        update: function (a) {
243            var d = a && a.type,
244                e = !d || "orientationchange" === d;
245            e && (clearTimeout(w), w = null);
246            b.isOpen && !w && (w = setTimeout(function () {
247                var c = b.current;
248                c && !b.isClosing && (b.wrap.removeClass("fancybox-tmp"), (e || "load" === d || "resize" === d && c.autoResize) && b._setDimension(), "scroll" === d && c.canShrink || b.reposition(a), b.trigger("onUpdate"), w = null)
249            }, e && !s ? 0 : 300))
250        },
251        toggle: function (a) {
252            b.isOpen && (b.current.fitToView = "boolean" === f.type(a) ? a : !b.current.fitToView, s && (b.wrap.removeAttr("style").addClass("fancybox-tmp"),
253                b.trigger("onUpdate")), b.update())
254        },
255        hideLoading: function () {
256            n.unbind(".loading");
257            f(".fancybox-loading").remove()
258        },
259        showLoading: function () {
260            var a, d;
261            b.hideLoading();
262            a = f('<div class="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");
263            n.bind("keydown.loading", function (a) {
264                if (27 === (a.which || a.keyCode)) a.preventDefault(), b.cancel()
265            });
266            b.defaults.fixed || (d = b.getViewport(), a.css({
267                position: "absolute",
268                top: 0.5 * d.h + d.y,
269                left: 0.5 * d.w + d.x
270            }))
271        },
272        getViewport: function () {
273            var a = b.current && b.current.locked ||
274                !1,
275                d = {
276                    x: q.scrollLeft(),
277                    y: q.scrollTop()
278                };
279            a ? (d.w = a[0].clientWidth, d.h = a[0].clientHeight) : (d.w = s && C.innerWidth ? C.innerWidth : q.width(), d.h = s && C.innerHeight ? C.innerHeight : q.height());
280            return d
281        },
282        unbindEvents: function () {
283            b.wrap && t(b.wrap) && b.wrap.unbind(".fb");
284            n.unbind(".fb");
285            q.unbind(".fb")
286        },
287        bindEvents: function () {
288            var a = b.current,
289                d;
290            a && (q.bind("orientationchange.fb" + (s ? "" : " resize.fb") + (a.autoCenter && !a.locked ? " scroll.fb" : ""), b.update), (d = a.keys) && n.bind("keydown.fb", function (e) {
291                var c = e.which || e.keyCode,
292                    k =
293                    e.target || e.srcElement;
294                if (27 === c && b.coming) return !1;
295                !e.ctrlKey && (!e.altKey && !e.shiftKey && !e.metaKey && (!k || !k.type && !f(k).is("[contenteditable]"))) && f.each(d, function (d, k) {
296                    if (1 < a.group.length && k[c] !== r) return b[d](k[c]), e.preventDefault(), !1;
297                    if (-1 < f.inArray(c, k)) return b[d](), e.preventDefault(), !1
298                })
299            }), f.fn.mousewheel && a.mouseWheel && b.wrap.bind("mousewheel.fb", function (d, c, k, g) {
300                for (var h = f(d.target || null), j = !1; h.length && !j && !h.is(".fancybox-skin") && !h.is(".fancybox-wrap") ;) j = h[0] && !(h[0].style.overflow &&
301                    "hidden" === h[0].style.overflow) && (h[0].clientWidth && h[0].scrollWidth > h[0].clientWidth || h[0].clientHeight && h[0].scrollHeight > h[0].clientHeight), h = f(h).parent();
302                if (0 !== c && !j && 1 < b.group.length && !a.canShrink) {
303                    if (0 < g || 0 < k) b.prev(0 < g ? "down" : "left");
304                    else if (0 > g || 0 > k) b.next(0 > g ? "up" : "right");
305                    d.preventDefault()
306                }
307            }))
308        },
309        trigger: function (a, d) {
310            var e, c = d || b.coming || b.current;
311            if (c) {
312                f.isFunction(c[a]) && (e = c[a].apply(c, Array.prototype.slice.call(arguments, 1)));
313                if (!1 === e) return !1;
314                c.helpers && f.each(c.helpers, function (d,
315                    e) {
316                    e && (b.helpers[d] && f.isFunction(b.helpers[d][a])) && (e = f.extend(!0, {}, b.helpers[d].defaults, e), b.helpers[d][a](e, c))
317                });
318                f.event.trigger(a + ".fb")
319            }
320        },
321        isImage: function (a) {
322            return p(a) && a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)
323        },
324        isSWF: function (a) {
325            return p(a) && a.match(/\.(swf)((\?|#).*)?$/i)
326        },
327        _start: function (a) {
328            var d = {},
329                e, c;
330            a = l(a);
331            e = b.group[a] || null;
332            if (!e) return !1;
333            d = f.extend(!0, {}, b.opts, e);
334            e = d.margin;
335            c = d.padding;
336            "number" === f.type(e) && (d.margin = [e, e, e, e]);
337            "number" === f.type(c) &&
338                (d.padding = [c, c, c, c]);
339            d.modal && f.extend(!0, d, {
340                closeBtn: !1,
341                closeClick: !1,
342                nextClick: !1,
343                arrows: !1,
344                mouseWheel: !1,
345                keys: null,
346                helpers: {
347                    overlay: {
348                        closeClick: !1
349                    }
350                }
351            });
352            d.autoSize && (d.autoWidth = d.autoHeight = !0);
353            "auto" === d.width && (d.autoWidth = !0);
354            "auto" === d.height && (d.autoHeight = !0);
355            d.group = b.group;
356            d.index = a;
357            b.coming = d;
358            if (!1 === b.trigger("beforeLoad")) b.coming = null;
359            else {
360                c = d.type;
361                e = d.href;
362                if (!c) return b.coming = null, b.current && b.router && "jumpto" !== b.router ? (b.current.index = a, b[b.router](b.direction)) : !1;
363                b.isActive = !0;
364                if ("image" === c || "swf" === c) d.autoHeight = d.autoWidth = !1, d.scrolling = "visible";
365                "image" === c && (d.aspectRatio = !0);
366                "iframe" === c && s && (d.scrolling = "scroll");
367                d.wrap = f(d.tpl.wrap).addClass("fancybox-" + (s ? "mobile" : "desktop") + " fancybox-type-" + c + " fancybox-tmp " + d.wrapCSS).appendTo(d.parent || "body");
368                f.extend(d, {
369                    skin: f(".fancybox-skin", d.wrap),
370                    outer: f(".fancybox-outer", d.wrap),
371                    inner: f(".fancybox-inner", d.wrap)
372                });
373                f.each(["Top", "Right", "Bottom", "Left"], function (a, b) {
374                    d.skin.css("padding" + b, x(d.padding[a]))
375                });
376                b.trigger("onReady");
377                if ("inline" === c || "html" === c) {
378                    if (!d.content || !d.content.length) return b._error("content")
379                } else if (!e) return b._error("href");
380                "image" === c ? b._loadImage() : "ajax" === c ? b._loadAjax() : "iframe" === c ? b._loadIframe() : b._afterLoad()
381            }
382        },
383        _error: function (a) {
384            f.extend(b.coming, {
385                type: "html",
386                autoWidth: !0,
387                autoHeight: !0,
388                minWidth: 0,
389                minHeight: 0,
390                scrolling: "no",
391                hasError: a,
392                content: b.coming.tpl.error
393            });
394            b._afterLoad()
395        },
396        _loadImage: function () {
397            var a = b.imgPreload = new Image;
398            a.onload = function () {
399                this.onload = this.onerror = null;
400                b.coming.width =
401                    this.width;
402                b.coming.height = this.height;
403                b._afterLoad()
404            };
405            a.onerror = function () {
406                this.onload = this.onerror = null;
407                b._error("image")
408            };
409            a.src = b.coming.href;
410            !0 !== a.complete && b.showLoading()
411        },
412        _loadAjax: function () {
413            var a = b.coming;
414            b.showLoading();
415            b.ajaxLoad = f.ajax(f.extend({}, a.ajax, {
416                url: a.href,
417                error: function (a, e) {
418                    b.coming && "abort" !== e ? b._error("ajax", a) : b.hideLoading()
419                },
420                success: function (d, e) {
421                    "success" === e && (a.content = d, b._afterLoad())
422                }
423            }))
424        },
425        _loadIframe: function () {
426            var a = b.coming,
427                d = f(a.tpl.iframe.replace(/\{rnd\}/g, (new Date).getTime())).attr("scrolling", s ? "auto" : a.iframe.scrolling).attr("src", a.href);
428            f(a.wrap).bind("onReset", function () {
429                try {
430                    f(this).find("iframe").hide().attr("src", "//about:blank").end().empty()
431                } catch (a) { }
432            });
433            a.iframe.preload && (b.showLoading(), d.one("load", function () {
434                f(this).data("ready", 1);
435                s || f(this).bind("load.fb", b.update);
436                f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();
437                b._afterLoad()
438            }));
439            a.content = d.appendTo(a.inner);
440            a.iframe.preload || b._afterLoad()
441        },
442        _preloadImages: function () {
443            var a =
444                b.group,
445                d = b.current,
446                e = a.length,
447                c = d.preload ? Math.min(d.preload, e - 1) : 0,
448                f, g;
449            for (g = 1; g <= c; g += 1) f = a[(d.index + g) % e], "image" === f.type && f.href && ((new Image).src = f.href)
450        },
451        _afterLoad: function () {
452            var a = b.coming,
453                d = b.current,
454                e, c, k, g, h;
455            b.hideLoading();
456            if (a && !1 !== b.isActive)
457                if (!1 === b.trigger("afterLoad", a, d)) a.wrap.stop(!0).trigger("onReset").remove(), b.coming = null;
458                else {
459                    d && (b.trigger("beforeChange", d), d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());
460                    b.unbindEvents();
461                    e = a.content;
462                    c = a.type;
463                    k = a.scrolling;
464                    f.extend(b, {
465                        wrap: a.wrap,
466                        skin: a.skin,
467                        outer: a.outer,
468                        inner: a.inner,
469                        current: a,
470                        previous: d
471                    });
472                    g = a.href;
473                    switch (c) {
474                        case "inline":
475                        case "ajax":
476                        case "html":
477                            a.selector ? e = f("<div>").html(e).find(a.selector) : t(e) && (e.data("fancybox-placeholder") || e.data("fancybox-placeholder", f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()), e = e.show().detach(), a.wrap.bind("onReset", function () {
478                                f(this).find(e).length && e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", !1)
479                            }));
480                            break;
481                        case "image":
482                            e = a.tpl.image.replace("{href}", g);
483                            break;
484                        case "swf":
485                            e = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + g + '"></param>', h = "", f.each(a.swf, function (a, b) {
486                                e += '<param name="' + a + '" value="' + b + '"></param>';
487                                h += " " + a + '="' + b + '"'
488                            }), e += '<embed src="' + g + '" type="application/x-shockwave-flash" width="100%" height="100%"' + h + "></embed></object>"
489                    } (!t(e) || !e.parent().is(a.inner)) && a.inner.append(e);
490                    b.trigger("beforeShow");
491                    a.inner.css("overflow", "yes" === k ? "scroll" : "no" === k ? "hidden" : k);
492                    b._setDimension();
493                    b.reposition();
494                    b.isOpen = !1;
495                    b.coming = null;
496                    b.bindEvents();
497                    if (b.isOpened) {
498                        if (d.prevMethod) b.transitions[d.prevMethod]()
499                    } else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();
500                    b.transitions[b.isOpened ? a.nextMethod : a.openMethod]();
501                    b._preloadImages()
502                }
503        },
504        _setDimension: function () {
505            var a = b.getViewport(),
506                d = 0,
507                e = !1,
508                c = !1,
509                e = b.wrap,
510                k = b.skin,
511                g = b.inner,
512                h = b.current,
513                c = h.width,
514                j = h.height,
515                m = h.minWidth,
516                u = h.minHeight,
517                n = h.maxWidth,
518                v = h.maxHeight,
519                s = h.scrolling,
520                q = h.scrollOutside ? h.scrollbarWidth : 0,
521                y = h.margin,
522                p = l(y[1] + y[3]),
523                r = l(y[0] + y[2]),
524                z, A, t, D, B, G, C, E, w;
525            e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");
526            y = l(k.outerWidth(!0) - k.width());
527            z = l(k.outerHeight(!0) - k.height());
528            A = p + y;
529            t = r + z;
530            D = F(c) ? (a.w - A) * l(c) / 100 : c;
531            B = F(j) ? (a.h - t) * l(j) / 100 : j;
532            if ("iframe" === h.type) {
533                if (w = h.content, h.autoHeight && 1 === w.data("ready")) try {
534                    w[0].contentWindow.document.location && (g.width(D).height(9999), G = w.contents().find("body"), q && G.css("overflow-x",
535                        "hidden"), B = G.height())
536                } catch (H) { }
537            } else if (h.autoWidth || h.autoHeight) g.addClass("fancybox-tmp"), h.autoWidth || g.width(D), h.autoHeight || g.height(B), h.autoWidth && (D = g.width()), h.autoHeight && (B = g.height()), g.removeClass("fancybox-tmp");
538            c = l(D);
539            j = l(B);
540            E = D / B;
541            m = l(F(m) ? l(m, "w") - A : m);
542            n = l(F(n) ? l(n, "w") - A : n);
543            u = l(F(u) ? l(u, "h") - t : u);
544            v = l(F(v) ? l(v, "h") - t : v);
545            G = n;
546            C = v;
547            h.fitToView && (n = Math.min(a.w - A, n), v = Math.min(a.h - t, v));
548            A = a.w - p;
549            r = a.h - r;
550            h.aspectRatio ? (c > n && (c = n, j = l(c / E)), j > v && (j = v, c = l(j * E)), c < m && (c = m, j = l(c / E)), j < u &&
551                (j = u, c = l(j * E))) : (c = Math.max(m, Math.min(c, n)), h.autoHeight && "iframe" !== h.type && (g.width(c), j = g.height()), j = Math.max(u, Math.min(j, v)));
552            if (h.fitToView)
553                if (g.width(c).height(j), e.width(c + y), a = e.width(), p = e.height(), h.aspectRatio)
554                    for (;
555                        (a > A || p > r) && (c > m && j > u) && !(19 < d++) ;) j = Math.max(u, Math.min(v, j - 10)), c = l(j * E), c < m && (c = m, j = l(c / E)), c > n && (c = n, j = l(c / E)), g.width(c).height(j), e.width(c + y), a = e.width(), p = e.height();
556                else c = Math.max(m, Math.min(c, c - (a - A))), j = Math.max(u, Math.min(j, j - (p - r)));
557            q && ("auto" === s && j < B && c + y +
558                q < A) && (c += q);
559            g.width(c).height(j);
560            e.width(c + y);
561            a = e.width();
562            p = e.height();
563            e = (a > A || p > r) && c > m && j > u;
564            c = h.aspectRatio ? c < G && j < C && c < D && j < B : (c < G || j < C) && (c < D || j < B);
565            f.extend(h, {
566                dim: {
567                    width: x(a),
568                    height: x(p)
569                },
570                origWidth: D,
571                origHeight: B,
572                canShrink: e,
573                canExpand: c,
574                wPadding: y,
575                hPadding: z,
576                wrapSpace: p - k.outerHeight(!0),
577                skinSpace: k.height() - j
578            });
579            !w && (h.autoHeight && j > u && j < v && !c) && g.height("auto")
580        },
581        _getPosition: function (a) {
582            var d = b.current,
583                e = b.getViewport(),
584                c = d.margin,
585                f = b.wrap.width() + c[1] + c[3],
586                g = b.wrap.height() + c[0] + c[2],
587                c = {
588                    position: "absolute",
589                    top: c[0],
590                    left: c[3]
591                };
592            d.autoCenter && d.fixed && !a && g <= e.h && f <= e.w ? c.position = "fixed" : d.locked || (c.top += e.y, c.left += e.x);
593            c.top = x(Math.max(c.top, c.top + (e.h - g) * d.topRatio));
594            c.left = x(Math.max(c.left, c.left + (e.w - f) * d.leftRatio));
595            return c
596        },
597        _afterZoomIn: function () {
598            var a = b.current;
599            a && (b.isOpen = b.isOpened = !0, b.wrap.css("overflow", "visible").addClass("fancybox-opened"), b.update(), (a.closeClick || a.nextClick && 1 < b.group.length) && b.inner.css("cursor", "pointer").bind("click.fb", function (d) {
600                !f(d.target).is("a") && !f(d.target).parent().is("a") &&
601                    (d.preventDefault(), b[a.closeClick ? "close" : "next"]())
602            }), a.closeBtn && f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb", function (a) {
603                a.preventDefault();
604                b.close()
605            }), a.arrows && 1 < b.group.length && ((a.loop || 0 < a.index) && f(a.tpl.prev).appendTo(b.outer).bind("click.fb", b.prev), (a.loop || a.index < b.group.length - 1) && f(a.tpl.next).appendTo(b.outer).bind("click.fb", b.next)), b.trigger("afterShow"), !a.loop && a.index === a.group.length - 1 ? b.play(!1) : b.opts.autoPlay && !b.player.isActive && (b.opts.autoPlay = !1, b.play()))
606        },
607        _afterZoomOut: function (a) {
608            a =
609                a || b.current;
610            f(".fancybox-wrap").trigger("onReset").remove();
611            f.extend(b, {
612                group: {},
613                opts: {},
614                router: !1,
615                current: null,
616                isActive: !1,
617                isOpened: !1,
618                isOpen: !1,
619                isClosing: !1,
620                wrap: null,
621                skin: null,
622                outer: null,
623                inner: null
624            });
625            b.trigger("afterClose", a)
626        }
627    });
628    b.transitions = {
629        getOrigPosition: function () {
630            var a = b.current,
631                d = a.element,
632                e = a.orig,
633                c = {},
634                f = 50,
635                g = 50,
636                h = a.hPadding,
637                j = a.wPadding,
638                m = b.getViewport();
639            !e && (a.isDom && d.is(":visible")) && (e = d.find("img:first"), e.length || (e = d));
640            t(e) ? (c = e.offset(), e.is("img") && (f = e.outerWidth(), g = e.outerHeight())) :
641                (c.top = m.y + (m.h - g) * a.topRatio, c.left = m.x + (m.w - f) * a.leftRatio);
642            if ("fixed" === b.wrap.css("position") || a.locked) c.top -= m.y, c.left -= m.x;
643            return c = {
644                top: x(c.top - h * a.topRatio),
645                left: x(c.left - j * a.leftRatio),
646                width: x(f + j),
647                height: x(g + h)
648            }
649        },
650        step: function (a, d) {
651            var e, c, f = d.prop;
652            c = b.current;
653            var g = c.wrapSpace,
654                h = c.skinSpace;
655            if ("width" === f || "height" === f) e = d.end === d.start ? 1 : (a - d.start) / (d.end - d.start), b.isClosing && (e = 1 - e), c = "width" === f ? c.wPadding : c.hPadding, c = a - c, b.skin[f](l("width" === f ? c : c - g * e)), b.inner[f](l("width" ===
656                f ? c : c - g * e - h * e))
657        },
658        zoomIn: function () {
659            var a = b.current,
660                d = a.pos,
661                e = a.openEffect,
662                c = "elastic" === e,
663                k = f.extend({
664                    opacity: 1
665                }, d);
666            delete k.position;
667            c ? (d = this.getOrigPosition(), a.openOpacity && (d.opacity = 0.1)) : "fade" === e && (d.opacity = 0.1);
668            b.wrap.css(d).animate(k, {
669                duration: "none" === e ? 0 : a.openSpeed,
670                easing: a.openEasing,
671                step: c ? this.step : null,
672                complete: b._afterZoomIn
673            })
674        },
675        zoomOut: function () {
676            var a = b.current,
677                d = a.closeEffect,
678                e = "elastic" === d,
679                c = {
680                    opacity: 0.1
681                };
682            e && (c = this.getOrigPosition(), a.closeOpacity && (c.opacity = 0.1));
683            b.wrap.animate(c, {
684                duration: "none" === d ? 0 : a.closeSpeed,
685                easing: a.closeEasing,
686                step: e ? this.step : null,
687                complete: b._afterZoomOut
688            })
689        },
690        changeIn: function () {
691            var a = b.current,
692                d = a.nextEffect,
693                e = a.pos,
694                c = {
695                    opacity: 1
696                },
697                f = b.direction,
698                g;
699            e.opacity = 0.1;
700            "elastic" === d && (g = "down" === f || "up" === f ? "top" : "left", "down" === f || "right" === f ? (e[g] = x(l(e[g]) - 200), c[g] = "+=200px") : (e[g] = x(l(e[g]) + 200), c[g] = "-=200px"));
701            "none" === d ? b._afterZoomIn() : b.wrap.css(e).animate(c, {
702                duration: a.nextSpeed,
703                easing: a.nextEasing,
704                complete: b._afterZoomIn
705            })
706        },
707        changeOut: function () {
708            var a =
709                b.previous,
710                d = a.prevEffect,
711                e = {
712                    opacity: 0.1
713                },
714                c = b.direction;
715            "elastic" === d && (e["down" === c || "up" === c ? "top" : "left"] = ("up" === c || "left" === c ? "-" : "+") + "=200px");
716            a.wrap.animate(e, {
717                duration: "none" === d ? 0 : a.prevSpeed,
718                easing: a.prevEasing,
719                complete: function () {
720                    f(this).trigger("onReset").remove()
721                }
722            })
723        }
724    };
725    b.helpers.overlay = {
726        defaults: {
727            closeClick: !0,
728            speedOut: 200,
729            showEarly: !0,
730            css: {},
731            locked: !s,
732            fixed: !0
733        },
734        overlay: null,
735        fixed: !1,
736        create: function (a) {
737            a = f.extend({}, this.defaults, a);
738            this.overlay && this.close();
739            this.overlay = f('<div class="fancybox-overlay"></div>').appendTo("body");
740            this.fixed = !1;
741            a.fixed && b.defaults.fixed && (this.overlay.addClass("fancybox-overlay-fixed"), this.fixed = !0)
742        },
743        open: function (a) {
744            var d = this;
745            a = f.extend({}, this.defaults, a);
746            this.overlay ? this.overlay.unbind(".overlay").width("auto").height("auto") : this.create(a);
747            this.fixed || (q.bind("resize.overlay", f.proxy(this.update, this)), this.update());
748            a.closeClick && this.overlay.bind("click.overlay", function (a) {
749                f(a.target).hasClass("fancybox-overlay") && (b.isActive ? b.close() : d.close())
750            });
751            this.overlay.css(a.css).show()
752        },
753        close: function () {
754            f(".fancybox-overlay").remove();
755            q.unbind("resize.overlay");
756            this.overlay = null;
757            !1 !== this.margin && (f("body").css("margin-right", this.margin), this.margin = !1);
758            this.el && this.el.removeClass("fancybox-lock")
759        },
760        update: function () {
761            var a = "100%",
762                b;
763            this.overlay.width(a).height("100%");
764            H ? (b = Math.max(z.documentElement.offsetWidth, z.body.offsetWidth), n.width() > b && (a = n.width())) : n.width() > q.width() && (a = n.width());
765            this.overlay.width(a).height(n.height())
766        },
767        onReady: function (a, b) {
768            f(".fancybox-overlay").stop(!0, !0);
769            this.overlay || (this.margin = n.height() > q.height() || "scroll" === f("body").css("overflow-y") ? f("body").css("margin-right") : !1, this.el = z.all && !z.querySelector ? f("html") : f("body"), this.create(a));
770            a.locked && this.fixed && (b.locked = this.overlay.append(b.wrap), b.fixed = !1);
771            !0 === a.showEarly && this.beforeShow.apply(this, arguments)
772        },
773        beforeShow: function (a, b) {
774            b.locked && (this.el.addClass("fancybox-lock"), !1 !== this.margin && f("body").css("margin-right", l(this.margin) + b.scrollbarWidth));
775            this.open(a)
776        },
777        onUpdate: function () {
778            this.fixed ||
779                this.update()
780        },
781        afterClose: function (a) {
782            this.overlay && !b.isActive && this.overlay.fadeOut(a.speedOut, f.proxy(this.close, this))
783        }
784    };
785    b.helpers.title = {
786        defaults: {
787            type: "float",
788            position: "bottom"
789        },
790        beforeShow: function (a) {
791            var d = b.current,
792                e = d.title,
793                c = a.type;
794            f.isFunction(e) && (e = e.call(d.element, d));
795            if (p(e) && "" !== f.trim(e)) {
796                d = f('<div class="fancybox-title fancybox-title-' + c + '-wrap">' + e + "</div>");
797                switch (c) {
798                    case "inside":
799                        c = b.skin;
800                        break;
801                    case "outside":
802                        c = b.wrap;
803                        break;
804                    case "over":
805                        c = b.inner;
806                        break;
807                    default:
808                        c = b.skin, d.appendTo("body"),
809                            H && d.width(d.width()), d.wrapInner('<span class="child"></span>'), b.current.margin[2] += Math.abs(l(d.css("margin-bottom")))
810                }
811                d["top" === a.position ? "prependTo" : "appendTo"](c)
812            }
813        }
814    };
815    f.fn.fancybox = function (a) {
816        var d, e = f(this),
817            c = this.selector || "",
818            k = function (g) {
819                var h = f(this).blur(),
820                    j = d,
821                    k, l;
822                !g.ctrlKey && (!g.altKey && !g.shiftKey && !g.metaKey) && !h.is(".fancybox-wrap") && (k = a.groupAttr || "data-fancybox-group", l = h.attr(k), l || (k = "rel", l = h.get(0)[k]), l && ("" !== l && "nofollow" !== l) && (h = c.length ? f(c) : e, h = h.filter("[" + k + '="' + l +
823                    '"]'), j = h.index(this)), a.index = j, !1 !== b.open(h, a) && g.preventDefault())
824            };
825        a = a || {};
826        d = a.index || 0;
827        !c || !1 === a.live ? e.unbind("click.fb-start").bind("click.fb-start", k) : n.undelegate(c, "click.fb-start").delegate(c + ":not('.fancybox-item, .fancybox-nav')", "click.fb-start", k);
828        this.filter("[data-fancybox-start=1]").trigger("click");
829        return this
830    };
831    n.ready(function () {
832        f.scrollbarWidth === r && (f.scrollbarWidth = function () {
833            var a = f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),
834                b = a.children(),
835                b = b.innerWidth() - b.height(99).innerWidth();
836            a.remove();
837            return b
838        });
839        if (f.support.fixedPosition === r) {
840            var a = f.support,
841                d = f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),
842                e = 20 === d[0].offsetTop || 15 === d[0].offsetTop;
843            d.remove();
844            a.fixedPosition = e
845        }
846        f.extend(b.defaults, {
847            scrollbarWidth: f.scrollbarWidth(),
848            fixed: f.support.fixedPosition,
849            parent: f("body")
850        })
851    })
852})(window, document, jQuery);

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.