PageSourceSearch

https://www.soldaeletrica.com.br/js/jquery.fancybox.js

js soldaeletrica.com.br collected 2026-10-06 01:02:43 UTC 49,926 bytes, 1,430 lines download raw bytes

1(function (e, t, n, r) {
2    "use strict";
3    var i = n("html"),
4        s = n(e),
5        o = n(t),
6        u = n.fancybox = function () {
7            u.open.apply(this, arguments)
8        },
9        a = navigator.userAgent.match(/msie/i),
10        f = null,
11        l = t.createTouch !== r,
12        c = function (e) {
13            return e && e.hasOwnProperty && e instanceof n
14        },
15        h = function (e) {
16            return e && n.type(e) === "string"
17        },
18        p = function (e) {
19            return h(e) && e.indexOf("%") > 0
20        },
21        d = function (e) {
22            return e && !(e.style.overflow && e.style.overflow === "hidden") && (e.clientWidth && e.scrollWidth > e.clientWidth || e.clientHeight && e.scrollHeight > e.clientHeight)
23        },
24        v = function (e, t) {
25            var n = parseInt(e, 10) || 0;
26            if (t && p(e)) {
27                n = u.getViewport()[t] / 100 * n
28            }
29            return Math.ceil(n)
30        },
31        m = function (e, t) {
32            return v(e, t) + "px"
33        };
34    n.extend(u, {
35        version: "2.1.5",
36        defaults: {
37            padding: 15,
38            margin: 20,
39            width: 800,
40            height: 600,
41            minWidth: 100,
42            minHeight: 100,
43            maxWidth: 9999,
44            maxHeight: 9999,
45            pixelRatio: 1,
46            autoSize: true,
47            autoHeight: false,
48            autoWidth: false,
49            autoResize: true,
50            autoCenter: !l,
51            fitToView: true,
52            aspectRatio: false,
53            topRatio: .5,
54            leftRatio: .5,
55            scrolling: "auto",
56            wrapCSS: "",
57            arrows: true,
58            closeBtn: true,
59            closeClick: false,
60            nextClick: false,
61            mouseWheel: true,
62            autoPlay: false,
63            playSpeed: 3e3,
64            preload: 3,
65            modal: false,
66            loop: true,
67            ajax: {
68                dataType: "html",
69                headers: {
70                    "X-fancyBox": true
71                }
72            },
73            iframe: {
74                scrolling: "auto",
75                preload: true
76            },
77            swf: {
78                wmode: "transparent",
79                allowfullscreen: "true",
80                allowscriptaccess: "always"
81            },
82            keys: {
83                next: {
84                    13: "left",
85                    34: "up",
86                    39: "left",
87                    40: "up"
88                },
89                prev: {
90                    8: "right",
91                    33: "down",
92                    37: "right",
93                    38: "down"
94                },
95                close: [27],
96                play: [32],
97                toggle: [70]
98            },
99            direction: {
100                next: "left",
101                prev: "right"
102            },
103            scrollOutside: true,
104            index: 0,
105            type: null,
106            href: null,
107            content: null,
108            title: null,
109            tpl: {
110                wrap: '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div id="title-empresa"></div><div id="title-keyword"></div><div class="fancybox-inner"></div></div></div></div>',
111                image: '<img class="fancybox-image" id="fancyalter" src="{href}" alt=""  />',
112                iframe: '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (a ? ' allowtransparency="true"' : "") + "></iframe>",
113                error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
114                closeBtn: '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
115                next: '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
116                prev: '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
117            },
118            openEffect: "fade",
119            openSpeed: 250,
120            openEasing: "swing",
121            openOpacity: true,
122            openMethod: "zoomIn",
123            closeEffect: "fade",
124            closeSpeed: 250,
125            closeEasing: "swing",
126            closeOpacity: true,
127            closeMethod: "zoomOut",
128            nextEffect: "elastic",
129            nextSpeed: 250,
130            nextEasing: "swing",
131            nextMethod: "changeIn",
132            prevEffect: "elastic",
133            prevSpeed: 250,
134            prevEasing: "swing",
135            prevMethod: "changeOut",
136            helpers: {
137                overlay: true,
138                title: true
139            },
140            onCancel: n.noop,
141            beforeLoad: n.noop,
142            afterLoad: n.noop,
143            beforeShow: n.noop,
144            afterShow: n.noop,
145            beforeChange: n.noop,
146            beforeClose: n.noop,
147            afterClose: n.noop
148        },
149        group: {},
150        opts: {},
151        previous: null,
152        coming: null,
153        current: null,
154        isActive: false,
155        isOpen: false,
156        isOpened: false,
157        wrap: null,
158        skin: null,
159        outer: null,
160        inner: null,
161        player: {
162            timer: null,
163            isActive: false
164        },
165        ajaxLoad: null,
166        imgPreload: null,
167        transitions: {},
168        helpers: {},
169        open: function (e, t) {
170            if (!e) {
171                return
172            }
173            if (!n.isPlainObject(t)) {
174                t = {}
175            }
176            if (false === u.close(true)) {
177                return
178            }
179            if (!n.isArray(e)) {
180                e = c(e) ? n(e).get() : [e]
181            }
182            n.each(e, function (i, s) {
183                var o = {},
184                    a, f, l, p, d, v, m;
185                if (n.type(s) === "object") {
186                    if (s.nodeType) {
187                        s = n(s)
188                    }
189                    if (c(s)) {
190                        o = {
191                            href: s.data("fancybox-href") || s.attr("href"),
192                            title: s.data("fancybox-title") || s.attr("title"),
193                            isDom: true,
194                            element: s
195                        };
196                        if (n.metadata) {
197                            n.extend(true, o, s.metadata())
198                        }
199                    } else {
200                        o = s
201                    }
202                }
203                a = t.href || o.href || (h(s) ? s : null);
204                f = t.title !== r ? t.title : o.title || "";
205                l = t.content || o.content;
206                p = l ? "html" : t.type || o.type;
207                if (!p && o.isDom) {
208                    p = s.data("fancybox-type");
209                    if (!p) {
210                        d = s.prop("class").match(/fancybox\.(\w+)/);
211                        p = d ? d[1] : null
212                    }
213                }
214                if (h(a)) {
215                    if (!p) {
216                        if (u.isImage(a)) {
217                            p = "image"
218                        } else if (u.isSWF(a)) {
219                            p = "swf"
220                        } else if (a.charAt(0) === "#") {
221                            p = "inline"
222                        } else if (h(s)) {
223                            p = "html";
224                            l = s
225                        }
226                    }
227                    if (p === "ajax") {
228                        v = a.split(/\s+/, 2);
229                        a = v.shift();
230                        m = v.shift()
231                    }
232                }
233                if (!l) {
234                    if (p === "inline") {
235                        if (a) {
236                            l = n(h(a) ? a.replace(/.*(?=#[^\s]+$)/, "") : a)
237                        } else if (o.isDom) {
238                            l = s
239                        }
240                    } else if (p === "html") {
241                        l = a
242                    } else if (!p && !a && o.isDom) {
243                        p = "inline";
244                        l = s
245                    }
246                }
247                n.extend(o, {
248                    href: a,
249                    type: p,
250                    content: l,
251                    title: f,
252                    selector: m
253                });
254                e[i] = o
255            });
256            u.opts = n.extend(true, {}, u.defaults, t);
257            if (t.keys !== r) {
258                u.opts.keys = t.keys ? n.extend({}, u.defaults.keys, t.keys) : false
259            }
260            u.group = e;
261            return u._start(u.opts.index)
262        },
263        cancel: function () {
264            var e = u.coming;
265            if (!e || false === u.trigger("onCancel")) {
266                return
267            }
268            u.hideLoading();
269            if (u.ajaxLoad) {
270                u.ajaxLoad.abort()
271            }
272            u.ajaxLoad = null;
273            if (u.imgPreload) {
274                u.imgPreload.onload = u.imgPreload.onerror = null
275            }
276            if (e.wrap) {
277                e.wrap.stop(true, true).trigger("onReset").remove()
278            }
279            u.coming = null;
280            if (!u.current) {
281                u._afterZoomOut(e)
282            }
283        },
284        close: function (e) {
285            u.cancel();
286            if (false === u.trigger("beforeClose")) {
287                return
288            }
289            u.unbindEvents();
290            if (!u.isActive) {
291                return
292            }
293            if (!u.isOpen || e === true) {
294                n(".fancybox-wrap").stop(true).trigger("onReset").remove();
295                u._afterZoomOut()
296            } else {
297                u.isOpen = u.isOpened = false;
298                u.isClosing = true;
299                n(".fancybox-item, .fancybox-nav").remove();
300                u.wrap.stop(true, true).removeClass("fancybox-opened");
301                u.transitions[u.current.closeMethod]()
302            }
303        },
304        play: function (e) {
305            var t = function () {
306                    clearTimeout(u.player.timer)
307                },
308                n = function () {
309                    t();
310                    if (u.current && u.player.isActive) {
311                        u.player.timer = setTimeout(u.next, u.current.playSpeed)
312                    }
313                },
314                r = function () {
315                    t();
316                    o.unbind(".player");
317                    u.player.isActive = false;
318                    u.trigger("onPlayEnd")
319                },
320                i = function () {
321                    if (u.current && (u.current.loop || u.current.index < u.group.length - 1)) {
322                        u.player.isActive = true;
323                        o.bind({
324                            "onCancel.player beforeClose.player": r,
325                            "onUpdate.player": n,
326                            "beforeLoad.player": t
327                        });
328                        n();
329                        u.trigger("onPlayStart")
330                    }
331                };
332            if (e === true || !u.player.isActive && e !== false) {
333                i()
334            } else {
335                r()
336            }
337        },
338        next: function (e) {
339            var t = u.current;
340            if (t) {
341                if (!h(e)) {
342                    e = t.direction.next
343                }
344                u.jumpto(t.index + 1, e, "next")
345            }
346        },
347        prev: function (e) {
348            var t = u.current;
349            if (t) {
350                if (!h(e)) {
351                    e = t.direction.prev
352                }
353                u.jumpto(t.index - 1, e, "prev")
354            }
355        },
356        jumpto: function (e, t, n) {
357            var i = u.current;
358            if (!i) {
359                return
360            }
361            e = v(e);
362            u.direction = t || i.direction[e >= i.index ? "next" : "prev"];
363            u.router = n || "jumpto";
364            if (i.loop) {
365                if (e < 0) {
366                    e = i.group.length + e % i.group.length
367                }
368                e = e % i.group.length
369            }
370            if (i.group[e] !== r) {
371                u.cancel();
372                u._start(e)
373            }
374        },
375        reposition: function (e, t) {
376            var r = u.current,
377                i = r ? r.wrap : null,
378                s;
379            if (i) {
380                s = u._getPosition(t);
381                if (e && e.type === "scroll") {
382                    delete s.position;
383                    i.stop(true, true).animate(s, 200)
384                } else {
385                    i.css(s);
386                    r.pos = n.extend({}, r.dim, s)
387                }
388            }
389        },
390        update: function (e) {
391            var t = e && e.type,
392                n = !t || t === "orientationchange";
393            if (n) {
394                clearTimeout(f);
395                f = null
396            }
397            if (!u.isOpen || f) {
398                return
399            }
400            f = setTimeout(function () {
401                var r = u.current;
402                if (!r || u.isClosing) {
403                    return
404                }
405                u.wrap.removeClass("fancybox-tmp");
406                if (n || t === "load" || t === "resize" && r.autoResize) {
407                    u._setDimension()
408                }
409                if (!(t === "scroll" && r.canShrink)) {
410                    u.reposition(e)
411                }
412                u.trigger("onUpdate");
413                f = null
414            }, n && !l ? 0 : 300)
415        },
416        toggle: function (e) {
417            if (u.isOpen) {
418                u.current.fitToView = n.type(e) === "boolean" ? e : !u.current.fitToView;
419                if (l) {
420                    u.wrap.removeAttr("style").addClass("fancybox-tmp");
421                    u.trigger("onUpdate")
422                }
423                u.update()
424            }
425        },
426        hideLoading: function () {
427            o.unbind(".loading");
428            n("#fancybox-loading").remove()
429        },
430        showLoading: function () {
431            var e, t;
432            u.hideLoading();
433            e = n('<div id="fancybox-loading"><div></div></div>').click(u.cancel).appendTo("body");
434            o.bind("keydown.loading", function (e) {
435                if ((e.which || e.keyCode) === 27) {
436                    e.preventDefault();
437                    u.cancel()
438                }
439            });
440            if (!u.defaults.fixed) {
441                t = u.getViewport();
442                e.css({
443                    position: "absolute",
444                    top: t.h * .5 + t.y,
445                    left: t.w * .5 + t.x
446                })
447            }
448        },
449        getViewport: function () {
450            var t = u.current && u.current.locked || false,
451                n = {
452                    x: s.scrollLeft(),
453                    y: s.scrollTop()
454                };
455            if (t) {
456                n.w = t[0].clientWidth;
457                n.h = t[0].clientHeight
458            } else {
459                n.w = l && e.innerWidth ? e.innerWidth : s.width();
460                n.h = l && e.innerHeight ? e.innerHeight : s.height()
461            }
462            return n
463        },
464        unbindEvents: function () {
465            if (u.wrap && c(u.wrap)) {
466                u.wrap.unbind(".fb")
467            }
468            o.unbind(".fb");
469            s.unbind(".fb")
470        },
471        bindEvents: function () {
472            var e = u.current,
473                t;
474            if (!e) {
475                return
476            }
477            s.bind("orientationchange.fb" + (l ? "" : " resize.fb") + (e.autoCenter && !e.locked ? " scroll.fb" : ""), u.update);
478            t = e.keys;
479            if (t) {
480                o.bind("keydown.fb", function (i) {
481                    var s = i.which || i.keyCode,
482                        o = i.target || i.srcElement;
483                    if (s === 27 && u.coming) {
484                        return false
485                    }
486                    if (!i.ctrlKey && !i.altKey && !i.shiftKey && !i.metaKey && !(o && (o.type || n(o).is("[contenteditable]")))) {
487                        n.each(t, function (t, o) {
488                            if (e.group.length > 1 && o[s] !== r) {
489                                u[t](o[s]);
490                                i.preventDefault();
491                                return false
492                            }
493                            if (n.inArray(s, o) > -1) {
494                                u[t]();
495                                i.preventDefault();
496                                return false
497                            }
498                        })
499                    }
500                })
501            }
502            if (n.fn.mousewheel && e.mouseWheel) {
503                u.wrap.bind("mousewheel.fb", function (t, r, i, s) {
504                    var o = t.target || null,
505                        a = n(o),
506                        f = false;
507                    while (a.length) {
508                        if (f || a.is(".fancybox-skin") || a.is(".fancybox-wrap")) {
509                            break
510                        }
511                        f = d(a[0]);
512                        a = n(a).parent()
513                    }
514                    if (r !== 0 && !f) {
515                        if (u.group.length > 1 && !e.canShrink) {
516                            if (s > 0 || i > 0) {
517                                u.prev(s > 0 ? "down" : "left")
518                            } else if (s < 0 || i < 0) {
519                                u.next(s < 0 ? "up" : "right")
520                            }
521                            t.preventDefault()
522                        }
523                    }
524                })
525            }
526        },
527        trigger: function (e, t) {
528            var r, i = t || u.coming || u.current;
529            if (!i) {
530                return
531            }
532            if (n.isFunction(i[e])) {
533                r = i[e].apply(i, Array.prototype.slice.call(arguments, 1))
534            }
535            if (r === false) {
536                return false
537            }
538            if (i.helpers) {
539                n.each(i.helpers, function (t, r) {
540                    if (r && u.helpers[t] && n.isFunction(u.helpers[t][e])) {
541                        u.helpers[t][e](n.extend(true, {}, u.helpers[t].defaults, r), i)
542                    }
543                })
544            }
545            o.trigger(e)
546        },
547        isImage: function (e) {
548            return h(e) && e.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)
549        },
550        isSWF: function (e) {
551            return h(e) && e.match(/\.(swf)((\?|#).*)?$/i)
552        },
553        _start: function (e) {
554            var t = {},
555                r, i, s, o, a;
556            e = v(e);
557            r = u.group[e] || null;
558            if (!r) {
559                return false
560            }
561            t = n.extend(true, {}, u.opts, r);
562            o = t.margin;
563            a = t.padding;
564            if (n.type(o) === "number") {
565                t.margin = [o, o, o, o]
566            }
567            if (n.type(a) === "number") {
568                t.padding = [a, a, a, a]
569            }
570            if (t.modal) {
571                n.extend(true, t, {
572                    closeBtn: false,
573                    closeClick: false,
574                    nextClick: false,
575                    arrows: false,
576                    mouseWheel: false,
577                    keys: null,
578                    helpers: {
579                        overlay: {
580                            closeClick: false
581                        }
582                    }
583                })
584            }
585            if (t.autoSize) {
586                t.autoWidth = t.autoHeight = true
587            }
588            if (t.width === "auto") {
589                t.autoWidth = true
590            }
591            if (t.height === "auto") {
592                t.autoHeight = true
593            }
594            t.group = u.group;
595            t.index = e;
596            u.coming = t;
597            if (false === u.trigger("beforeLoad")) {
598                u.coming = null;
599                return
600            }
601            s = t.type;
602            i = t.href;
603            if (!s) {
604                u.coming = null;
605                if (u.current && u.router && u.router !== "jumpto") {
606                    u.current.index = e;
607                    return u[u.router](u.direction)
608                }
609                return false
610            }
611            u.isActive = true;
612            if (s === "image" || s === "swf") {
613                t.autoHeight = t.autoWidth = false;
614                t.scrolling = "visible"
615            }
616            if (s === "image") {
617                t.aspectRatio = true
618            }
619            if (s === "iframe" && l) {
620                t.scrolling = "scroll"
621            }
622            t.wrap = n(t.tpl.wrap).addClass("fancybox-" + (l ? "mobile" : "desktop") + " fancybox-type-" + s + " fancybox-tmp " + t.wrapCSS).appendTo(t.parent || "body");
623            n.extend(t, {
624                skin: n(".fancybox-skin", t.wrap),
625                outer: n(".fancybox-outer", t.wrap),
626                inner: n(".fancybox-inner", t.wrap)
627            });
628            n.each(["Top", "Right", "Bottom", "Left"], function (e, n) {
629                t.skin.css("padding" + n, m(t.padding[e]))
630            });
631            u.trigger("onReady");
632            if (s === "inline" || s === "html") {
633                if (!t.content || !t.content.length) {
634                    return u._error("content")
635                }
636            } else if (!i) {
637                return u._error("href")
638            }
639            if (s === "image") {
640                u._loadImage()
641            } else if (s === "ajax") {
642                u._loadAjax()
643            } else if (s === "iframe") {
644                u._loadIframe()
645            } else {
646                u._afterLoad()
647            }
648        },
649        _error: function (e) {
650            n.extend(u.coming, {
651                type: "html",
652                autoWidth: true,
653                autoHeight: true,
654                minWidth: 0,
655                minHeight: 0,
656                scrolling: "no",
657                hasError: e,
658                content: u.coming.tpl.error
659            });
660            u._afterLoad()
661        },
662        _loadImage: function () {
663            var e = u.imgPreload = new Image;
664            e.onload = function () {
665                this.onload = this.onerror = null;
666                u.coming.width = this.width / u.opts.pixelRatio;
667                u.coming.height = this.height / u.opts.pixelRatio;
668                u._afterLoad()
669            };
670            e.onerror = function () {
671                this.onload = this.onerror = null;
672                u._error("image")
673            };
674            e.src = u.coming.href;
675            if (e.complete !== true) {
676                u.showLoading()
677            }
678        },
679        _loadAjax: function () {
680            var e = u.coming;
681            u.showLoading();
682            u.ajaxLoad = n.ajax(n.extend({}, e.ajax, {
683                url: e.href,
684                error: function (e, t) {
685                    if (u.coming && t !== "abort") {
686                        u._error("ajax", e)
687                    } else {
688                        u.hideLoading()
689                    }
690                },
691                success: function (t, n) {
692                    if (n === "success") {
693                        e.content = t;
694                        u._afterLoad()
695                    }
696                }
697            }))
698        },
699        _loadIframe: function () {
700            var e = u.coming,
701                t = n(e.tpl.iframe.replace(/\{rnd\}/g, (new Date).getTime())).attr("scrolling", l ? "auto" : e.iframe.
701scrolling).attr("src", e.href);
702            n(e.wrap).bind("onReset", function () {
703                try {
704                    n(this).find("iframe").hide().attr("src", "//about:blank").end().empty()
705                } catch (e) {}
706            });
707            if (e.iframe.preload) {
708                u.showLoading();
709                t.one("load", function () {
710                    n(this).data("ready", 1);
711                    if (!l) {
712                        n(this).bind("load.fb", u.update)
713                    }
714                    n(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();
715                    u._afterLoad()
716                })
717            }
718            e.content = t.appendTo(e.inner);
719            if (!e.iframe.preload) {
720                u._afterLoad()
721            }
722        },
723        _preloadImages: function () {
724            var e = u.group,
725                t = u.current,
726                n = e.length,
727                r = t.preload ? Math.min(t.preload, n - 1) : 0,
728                i, s;
729            for (s = 1; s <= r; s += 1) {
730                i = e[(t.index + s) % n];
731                if (i.type === "image" && i.href) {
732                    (new Image).src = i.href
733                }
734            }
735        },
736        _afterLoad: function () {
737            var e = u.coming,
738                t = u.current,
739                r = "fancybox-placeholder",
740                i, s, o, a, f, l;
741            u.hideLoading();
742            if (!e || u.isActive === false) {
743                return
744            }
745            if (false === u.trigger("afterLoad", e, t)) {
746                e.wrap.stop(true).trigger("onReset").remove();
747                u.coming = null;
748                return
749            }
750            if (t) {
751                u.trigger("beforeChange", t);
752                t.wrap.stop(true).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()
753            }
754            u.unbindEvents();
755            i = e;
756            s = e.content;
757            o = e.type;
758            a = e.scrolling;
759            n.extend(u, {
760                wrap: i.wrap,
761                skin: i.skin,
762                outer: i.outer,
763                inner: i.inner,
764                current: i,
765                previous: t
766            });
767            f = i.href;
768            switch (o) {
769                case "inline":
770                case "ajax":
771                case "html":
772                    if (i.selector) {
773                        s = n("<div>").html(s).find(i.selector)
774                    } else if (c(s)) {
775                        if (!s.data(r)) {
776                            s.data(r, n('<div class="' + r + '"></div>').insertAfter(s).hide())
777                        }
778                        s = s.show().detach();
779                        i.wrap.bind("onReset", function () {
780                            if (n(this).find(s).length) {
781                                s.hide().replaceAll(s.data(r)).data(r, false)
782                            }
783                        })
784                    }
785                    break;
786                case "image":
787                    s = i.tpl.image.replace("{href}", f);
788                    break;
789                case "swf":
790                    s = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + f + '"></param>';
791                    l = "";
792                    n.each(i.swf, function (e, t) {
793                        s += '<param name="' + e + '" value="' + t + '"></param>';
794                        l += " " + e + '="' + t + '"'
795                    });
796                    s += '<embed src="' + f + '" type="application/x-shockwave-flash" width="100%" height="100%"' + l + "></embed></object>";
797                    break
798            }
799            if (!(c(s) && s.parent().is(i.inner))) {
800                i.inner.append(s)
801            }
802            u.trigger("beforeShow");
803            i.inner.css("overflow", a === "yes" ? "scroll" : a === "no" ? "hidden" : a);
804            u._setDimension();
805            u.reposition();
806            u.isOpen = false;
807            u.coming = null;
808            u.bindEvents();
809            if (!u.isOpened) {
810                n(".fancybox-wrap").not(i.wrap).stop(true).trigger("onReset").remove()
811            } else if (t.prevMethod) {
812                u.transitions[t.prevMethod]()
813            }
814            u.transitions[u.isOpened ? i.nextMethod : i.openMethod]();
815            u._preloadImages()
816        },
817        _setDimension: function () {
818            var e = u.getViewport(),
819                t = 0,
820                r = false,
821                i = false,
822                s = u.wrap,
823                o = u.skin,
824                a = u.inner,
825                f = u.current,
826                l = f.width,
827                c = f.height,
828                h = f.minWidth,
829                d = f.minHeight,
830                g = f.maxWidth,
831                y = f.maxHeight,
832                b = f.scrolling,
833                w = f.scrollOutside ? f.scrollbarWidth : 0,
834                E = f.margin,
835                S = v(E[1] + E[3]),
836                x = v(E[0] + E[2]),
837                T, N, C, k, L, A, O, M, _, D, P, H, B, j, I;
838            s.add(o).add(a).width("auto").height("auto").removeClass("fancybox-tmp");
839            T = v(o.outerWidth(true) - o.width());
840            N = v(o.outerHeight(true) - o.height());
841            C = S + T;
842            k = x + N;
843            L = p(l) ? (e.w - C) * v(l) / 100 : l;
844            A = p(c) ? (e.h - k) * v(c) / 100 : c;
845            if (f.type === "iframe") {
846                j = f.content;
847                if (f.autoHeight && j.data("ready") === 1) {
848                    try {
849                        if (j[0].contentWindow.document.location) {
850                            a.width(L).height(9999);
851                            I = j.contents().find("body");
852                            if (w) {
853                                I.css("overflow-x", "hidden")
854                            }
855                            A = I.outerHeight(true)
856                        }
857                    } catch (q) {}
858                }
859            } else if (f.autoWidth || f.autoHeight) {
860                a.addClass("fancybox-tmp");
861                if (!f.autoWidth) {
862                    a.width(L)
863                }
864                if (!f.autoHeight) {
865                    a.height(A)
866                }
867                if (f.autoWidth) {
868                    L = a.width()
869                }
870                if (f.autoHeight) {
871                    A = a.height()
872                }
873                a.removeClass("fancybox-tmp")
874            }
875            l = v(L);
876            c = v(A);
877            _ = L / A;
878            h = v(p(h) ? v(h, "w") - C : h);
879            g = v(p(g) ? v(g, "w") - C : g);
880            d = v(p(d) ? v(d, "h") - k : d);
881            y = v(p(y) ? v(y, "h") - k : y);
882            O = g;
883            M = y;
884            if (f.fitToView) {
885                g = Math.min(e.w - C, g);
886                y = Math.min(e.h - k, y)
887            }
888            H = e.w - S;
889            B = e.h - x;
890            if (f.aspectRatio) {
891                if (l > g) {
892                    l = g;
893                    c = v(l / _)
894                }
895                if (c > y) {
896                    c = y;
897                    l = v(c * _)
898                }
899                if (l < h) {
900                    l = h;
901                    c = v(l / _)
902                }
903                if (c < d) {
904                    c = d;
905                    l = v(c * _)
906                }
907            } else {
908                l = Math.max(h, Math.min(l, g));
909                if (f.autoHeight && f.type !== "iframe") {
910                    a.width(l);
911                    c = a.height()
912                }
913                c = Math.max(d, Math.min(c, y))
914            }
915            if (f.fitToView) {
916                a.width(l).height(c);
917                s.width(l + T);
918                D = s.width();
919                P = s.height();
920                if (f.aspectRatio) {
921                    while ((D > H || P > B) && l > h && c > d) {
922                        if (t++ > 19) {
923                            break
924                        }
925                        c = Math.max(d, Math.min(y, c - 10));
926                        l = v(c * _);
927                        if (l < h) {
928                            l = h;
929                            c = v(l / _)
930                        }
931                        if (l > g) {
932                            l = g;
933                            c = v(l / _)
934                        }
935                        a.width(l).height(c);
936                        s.width(l + T);
937                        D = s.width();
938                        P = s.height()
939                    }
940                } else {
941                    l = Math.max(h, Math.min(l, l - (D - H)));
942                    c = Math.max(d, Math.min(c, c - (P - B)))
943                }
944            }
945            if (w && b === "auto" && c < A && l + T + w < H) {
946                l += w
947            }
948            a.width(l).height(c);
949            s.width(l + T);
950            D = s.width();
951            P = s.height();
952            r = (D > H || P > B) && l > h && c > d;
953            i = f.aspectRatio ? l < O && c < M && l < L && c < A : (l < O || c < M) && (l < L || c < A);
954            n.extend(f, {
955                dim: {
956                    width: m(D),
957                    height: m(P)
958                },
959                origWidth: L,
960                origHeight: A,
961                canShrink: r,
962                canExpand: i,
963                wPadding: T,
964                hPadding: N,
965                wrapSpace: P - o.outerHeight(true),
966                skinSpace: o.height() - c
967            });
968            if (!j && f.autoHeight && c > d && c < y && !i) {
969                a.height("auto")
970            }
971        },
972        _getPosition: function (e) {
973            var t = u.current,
974                n = u.getViewport(),
975                r = t.margin,
976                i = u.wrap.width() + r[1] + r[3],
977                s = u.wrap.height() + r[0] + r[2],
978                o = {
979                    position: "absolute",
980                    top: r[0],
981                    left: r[3]
982                };
983            if (t.autoCenter && t.fixed && !e && s <= n.h && i <= n.w) {
984                o.position = "fixed"
985            } else if (!t.locked) {
986                o.top += n.y;
987                o.left += n.x
988            }
989            o.top = m(Math.max(o.top, o.top + (n.h - s) * t.topRatio));
990            o.left = m(Math.max(o.left, o.left + (n.w - i) * t.leftRatio));
991            return o
992        },
993        _afterZoomIn: function () {
994            var e = u.current;
995            if (!e) {
996                return
997            }
998            u.isOpen = u.isOpened = true;
999            u.wrap.css("overflow", "visible").addClass("fancybox-opened");
1000            u.update();
1001            if (e.closeClick || e.nextClick && u.group.length > 1) {
1002                u.inner.css("cursor", "pointer").bind("click.fb", function (t) {
1003                    if (!n(t.target).is("a") && !n(t.target).parent().is("a")) {
1004                        t.preventDefault();
1005                        u[e.closeClick ? "close" : "next"]()
1006                    }
1007                })
1008            }
1009            if (e.closeBtn) {
1010                n(e.tpl.closeBtn).appendTo(u.skin).bind("click.fb", function (e) {
1011                    e.preventDefault();
1012                    u.close()
1013                })
1014            }
1015            if (e.arrows && u.group.length > 1) {
1016                if (e.loop || e.index > 0) {
1017                    n(e.tpl.prev).appendTo(u.outer).bind("click.fb", u.prev)
1018                }
1019                if (e.loop || e.index < u.group.length - 1) {
1020                    n(e.tpl.next).appendTo(u.outer).bind("click.fb", u.next)
1021                }
1022            }
1023            u.trigger("afterShow");
1024            if (!e.loop && e.index === e.group.length - 1) {
1025                u.play(false)
1026            } else if (u.opts.autoPlay && !u.player.isActive) {
1027                u.opts.autoPlay = false;
1028                u.play()
1029            }
1030        },
1031        _afterZoomOut: function (e) {
1032            e = e || u.current;
1033            n(".fancybox-wrap").trigger("onReset").remove();
1034            n.extend(u, {
1035                group: {},
1036                opts: {},
1037                router: false,
1038                current: null,
1039                isActive: false,
1040                isOpened: false,
1041                isOpen: false,
1042                isClosing: false,
1043                wrap: null,
1044                skin: null,
1045                outer: null,
1046                inner: null
1047            });
1048            u.trigger("afterClose", e)
1049        }
1050    });
1051    u.transitions = {
1052        getOrigPosition: function () {
1053            var e = u.current,
1054                t = e.element,
1055                n = e.orig,
1056                r = {},
1057                i = 50,
1058                s = 50,
1059                o = e.hPadding,
1060                a = e.wPadding,
1061                f = u.getViewport();
1062            if (!n && e.isDom && t.is(":visible")) {
1063                n = t.find("img:first");
1064                if (!n.length) {
1065                    n = t
1066                }
1067            }
1068            if (c(n)) {
1069                r = n.offset();
1070                if (n.is("img")) {
1071                    i = n.outerWidth();
1072                    s = n.outerHeight()
1073                }
1074            } else {
1075                r.top = f.y + (f.h - s) * e.topRatio;
1076                r.left = f.x + (f.w - i) * e.leftRatio
1077            }
1078            if (u.wrap.css("position") === "fixed" || e.locked) {
1079                r.top -= f.y;
1080                r.left -= f.x
1081            }
1082            r = {
1083                top: m(r.top - o * e.topRatio),
1084                left: m(r.left - a * e.leftRatio),
1085                width: m(i + a),
1086                height: m(s + o)
1087            };
1088            return r
1089        },
1090        step: function (e, t) {
1091            var n, r, i, s = t.prop,
1092                o = u.current,
1093                a = o.wrapSpace,
1094                f = o.skinSpace;
1095            if (s === "width" || s === "height") {
1096                n = t.end === t.start ? 1 : (e - t.start) / (t.end - t.start);
1097                if (u.isClosing) {
1098                    n = 1 - n
1099                }
1100                r = s === "width" ? o.wPadding : o.hPadding;
1101                i = e - r;
1102                u.skin[s](v(s === "width" ? i : i - a * n));
1103                u.inner[s](v(s === "width" ? i : i - a * n - f * n))
1104            }
1105        },
1106        zoomIn: function () {
1107            var e = u.current,
1108                t = e.pos,
1109                r = e.openEffect,
1110                i = r === "elastic",
1111                s = n.extend({
1112                    opacity: 1
1113                }, t);
1114            delete s.position;
1115            if (i) {
1116                t = this.getOrigPosition();
1117                if (e.openOpacity) {
1118                    t.opacity = .1
1119                }
1120            } else if (r === "fade") {
1121                t.opacity = .1
1122            }
1123            u.wrap.css(t).animate(s, {
1124                duration: r === "none" ? 0 : e.openSpeed,
1125                easing: e.openEasing,
1126                step: i ? this.step : null,
1127                complete: u._afterZoomIn
1128            })
1129        },
1130        zoomOut: function () {
1131            var e = u.current,
1132                t = e.closeEffect,
1133                n = t === "elastic",
1134                r = {
1135                    opacity: .1
1136                };
1137            if (n) {
1138                r = this.getOrigPosition();
1139                if (e.closeOpacity) {
1140                    r.opacity = .1
1141                }
1142            }
1143            u.wrap.animate(r, {
1144                duration: t === "none" ? 0 : e.closeSpeed,
1145                easing: e.closeEasing,
1146                step: n ? this.step : null,
1147                complete: u._afterZoomOut
1148            })
1149        },
1150        changeIn: function () {
1151            var e = u.current,
1152                t = e.nextEffect,
1153                n = e.pos,
1154                r = {
1155                    opacity: 1
1156                },
1157                i = u.direction,
1158                s = 200,
1159                o;
1160            n.opacity = .1;
1161            if (t === "elastic") {
1162                o = i === "down" || i === "up" ? "top" : "left";
1163                if (i === "down" || i === "right") {
1164                    n[o] = m(v(n[o]) - s);
1165                    r[o] = "+=" + s + "px"
1166                } else {
1167                    n[o] = m(v(n[o]) + s);
1168                    r[o] = "-=" + s + "px"
1169                }
1170            }
1171            if (t === "none") {
1172                u._afterZoomIn()
1173            } else {
1174                u.wrap.css(n).animate(r, {
1175                    duration: e.nextSpeed,
1176                    easing: e.nextEasing,
1177                    complete: u._afterZoomIn
1178                })
1179            }
1180        },
1181        changeOut: function () {
1182            var e = u.previous,
1183                t = e.prevEffect,
1184                r = {
1185                    opacity: .1
1186                },
1187                i = u.direction,
1188                s = 200;
1189            if (t === "elastic") {
1190                r[i === "down" || i === "up" ? "top" : "left"] = (i === "up" || i === "left" ? "-" : "+") + "=" + s + "px"
1191            }
1192            e.wrap.animate(r, {
1193                duration: t === "none" ? 0 : e.prevSpeed,
1194                easing: e.prevEasing,
1195                complete: function () {
1196                    n(this).trigger("onReset").remove()
1197                }
1198            })
1199        }
1200    };
1201    u.helpers.overlay = {
1202        defaults: {
1203            closeClick: true,
1204            speedOut: 200,
1205            showEarly: true,
1206            css: {},
1207            locked: !l,
1208            fixed: true
1209        },
1210        overlay: null,
1211        fixed: false,
1212        el: n("html"),
1213        create: function (e) {
1214            e = n.extend({}, this.defaults, e);
1215            if (this.overlay) {
1216                this.close()
1217            }
1218            this.overlay = n('<div class="fancybox-overlay"></div>').appendTo(u.coming ? u.coming.parent : e.parent);
1219            this.fixed = false;
1220            if (e.fixed && u.defaults.fixed) {
1221                this.overlay.addClass("fancybox-overlay-fixed");
1222                this.fixed = true
1223            }
1224        },
1225        open: function (e) {
1226            var t = this;
1227            e = n.extend({}, this.defaults, e);
1228            if (this.overlay) {
1229                this.overlay.unbind(".overlay").width("auto").height("auto")
1230            } else {
1231                this.create(e)
1232            }
1233            if (!this.fixed) {
1234                s.bind("resize.overlay", n.proxy(this.update, this));
1235                this.update()
1236            }
1237            if (e.closeClick) {
1238                this.overlay.bind("click.overlay", function (e) {
1239                    if (n(e.target).hasClass("fancybox-overlay")) {
1240                        if (u.isActive) {
1241                            u.close()
1242                        } else {
1243                            t.close()
1244                        }
1245                        return false
1246                    }
1247                })
1248            }
1249            this.overlay.css(e.css).show()
1250        },
1251        close: function () {
1252            var e, t;
1253            s.unbind("resize.overlay");
1254            if (this.el.hasClass("fancybox-lock")) {
1255                n(".fancybox-margin").removeClass("fancybox-margin");
1256                e = s.scrollTop();
1257                t = s.scrollLeft();
1258                this.el.removeClass("fancybox-lock");
1259                s.scrollTop(e).scrollLeft(t)
1260            }
1261            n(".fancybox-overlay").remove().hide();
1262            n.extend(this, {
1263                overlay: null,
1264                fixed: false
1265            })
1266        },
1267        update: function () {
1268            var e = "100%",
1269                n;
1270            this.overlay.width(e).height("100%");
1271            if (a) {
1272                n = Math.max(t.documentElement.offsetWidth, t.body.offsetWidth);
1273                if (o.width() > n) {
1274                    e = o.width()
1275                }
1276            } else if (o.width() > s.width()) {
1277                e = o.width()
1278            }
1279            this.overlay.width(e).height(o.height())
1280        },
1281        onReady: function (e, t) {
1282            var r = this.overlay;
1283            n(".fancybox-overlay").stop(true, true);
1284            if (!r) {
1285                this.create(e)
1286            }
1287            if (e.locked && this.fixed && t.fixed) {
1288                if (!r) {
1289                    this.margin = o.height() > s.height() ? n("html").css("margin-right").replace("px", "") : false
1290                }
1291                t.locked = this.overlay.append(t.wrap);
1292                t.fixed = false
1293            }
1294            if (e.showEarly === true) {
1295                this.beforeShow.apply(this, arguments)
1296            }
1297        },
1298        beforeShow: function (e, t) {
1299            var r, i;
1300            if (t.locked) {
1301                if (this.margin !== false) {
1302                    n("*").filter(function () {
1303                        return n(this).css("position") === "fixed" && !n(this).hasClass("fancybox-overlay") && !n(this).hasClass("fancybox-wrap")
1304                    }).addClass("fancybox-margin");
1305                    this.el.addClass("fancybox-margin")
1306                }
1307                r = s.scrollTop();
1308                i = s.scrollLeft();
1309                this.el.addClass("fancybox-lock");
1310                s.scrollTop(r).scrollLeft(i)
1311            }
1312            this.open(e)
1313        },
1314        onUpdate: function () {
1315            if (!this.fixed) {
1316                this.update()
1317            }
1318        },
1319        afterClose: function (e) {
1320            if (this.overlay && !u.coming) {
1321                this.overlay.fadeOut(e.speedOut, n.proxy(this.close, this))
1322            }
1323        }
1324    };
1325    u.helpers.title = {
1326        defaults: {
1327            type: "float",
1328            position: "bottom"
1329        },
1330        beforeShow: function (e) {
1331            var t = u.current,
1332                r = t.title,
1333                i = e.type,
1334                s, o;
1335            if (n.isFunction(r)) {
1336                r = r.call(t.element, t)
1337            }
1338            if (!h(r) || n.trim(r) === "") {
1339                return
1340            }
1341            s = n('<div class="fancybox-title fancybox-title-' + i + '-wrap"><strong>' + r + "</strong></div>");
1342            switch (i) {
1343                case "inside":
1344                    o = u.skin;
1345                    break;
1346                case "outside":
1347                    o = u.wrap;
1348                    break;
1349                case "over":
1350                    o = u.inner;
1351                    break;
1352                default:
1353                    o = u.skin;
1354                    s.appendTo("body");
1355                    if (a) {
1356                        s.width(s.width())
1357                    }
1358                    s.wrapInner('<span class="child"></span>');
1359                    u.current.margin[2] += Math.abs(v(s.css("margin-bottom")));
1360                    break
1361            }
1362            s[e.position === "top" ? "prependTo" : "appendTo"](o)
1363        }
1364    };
1365    n.fn.fancybox = function (e) {
1366        var t, r = n(this),
1367            i = this.selector || "",
1368            s = function (s) {
1369                var o = n(this).blur(),
1370                    a = t,
1371                    f, l;
1372                if (!(s.ctrlKey || s.altKey || s.shiftKey || s.metaKey) && !o.is(".fancybox-wrap")) {
1373                    f = e.groupAttr || "data-fancybox-group";
1374                    l = o.attr(f);
1375                    if (!l) {
1376                        f = "rel";
1377                        l = o.get(0)[f]
1378                    }
1379                    if (l && l !== "" && l !== "nofollow") {
1380                        o = i.length ? n(i) : r;
1381                        o = o.filter("[" + f + '="' + l + '"]');
1382                        a = o.index(this)
1383                    }
1384                    e.index = a;
1385                    if (u.open(o, e) !== false) {
1386                        s.preventDefault()
1387                    }
1388                }
1389            };
1390        e = e || {};
1391        t = e.index || 0;
1392        if (!i || e.live === false) {
1393            r.unbind("click.fb-start").bind("click.fb-start", s)
1394        } else {
1395            o.undelegate(i, "click.fb-start").delegate(i + ":not('.fancybox-item, .fancybox-nav')", "click.fb-start", s)
1396        }
1397        this.filter("[data-fancybox-start=1]").trigger("click");
1398        return this
1399    };
1400    o.ready(function () {
1401        var t, s;
1402        if (n.scrollbarWidth === r) {
1403            n.scrollbarWidth = function () {
1404                var e = n('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),
1405                    t = e.children(),
1406                    r = t.innerWidth() - t.height(99).innerWidth();
1407                e.remove();
1408                return r
1409            }
1410        }
1411        if (n.support.fixedPosition === r) {
1412            n.support.fixedPosition = function () {
1413                var e = n('<div style="position:fixed;top:20px;"></div>').appendTo("body"),
1414                    t = e[0].offsetTop === 20 || e[0].offsetTop === 15;
1415                e.remove();
1416                return t
1417            }()
1418        }
1419        n.extend(u.defaults, {
1420            scrollbarWidth: n.scrollbarWidth(),
1421            fixed: n.support.fixedPosition,
1422            parent: n("body")
1423        });
1424        t = n(e).width();
1425        i.addClass("fancybox-lock-test");
1426        s = n(e).width();
1427        i.removeClass("fancybox-lock-test");
1428        n("<style type='text/css'>.fancybox-margin{margin-right:" + (s - t) + "px;}</style>").appendTo("head")
1429    })
1430})(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.