PageSourceSearch

http://www.cameronbaney.com/_upload/tpl/04/6b/1131/template1131/js/jquery.fancybox.pack.js

js cameronbaney.com collected 2026-10-06 18:05:26 UTC 39,121 bytes, 838 lines download raw bytes

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