PageSourceSearch

https://www.budvarkadejvice.cz/templates/smarty/gourmet/scripts/parallax.min.js

js budvarkadejvice.cz collected 2026-10-06 04:48:44 UTC 9,222 bytes, 136 lines download raw bytes

vendor: 9,222 bytes, lines 1-136
1"use strict";
2
3/*!
4 * parallax.js v1.4.2 (http://pixelcog.github.io/parallax.js/)
5 * @copyright 2016 PixelCog, Inc.
6 * @license MIT (https://github.com/pixelcog/parallax.js/blob/master/LICENSE)
7 */
8!function (t, i, e, s) {
9    function o(i, e) {
10        var h = this; "object" == typeof e && (delete e.refresh, delete e.render, t.extend(this, e)),
11         this.$element = t(i),
12         !this.imageSrc && this.$element.is("img") && (this.imageSrc = this.$element.attr("src"));
13        var r = (this.position + "").toLowerCase().match(/\S+/g) || []; if (r.length < 1 && r.push("center"),
14        1 == r.length && r.push(r[0]),
15        ("top" == r[0] || "bottom" == r[0] || "left" == r[1] || "right" == r[1]) && (r = [r[1], r[0]]),
16        this.positionX != s && (r[0] = this.positionX.toLowerCase()),
17        this.positionY != s && (r[1] = this.positionY.toLowerCase()),
18        h.positionX = r[0], h.positionY = r[1], "left" != this.positionX && "right" != this.positionX && (this.positionX = isNaN(parseInt(this.positionX)) ? "center" : parseInt(this.positionX)),
19        "top" != this.positionY && "bottom" != this.positionY && (this.positionY = isNaN(parseInt(this.positionY)) ? "center" : parseInt(this.positionY)),
20        this.position = this.positionX + (isNaN(this.positionX) ? "" : "px") + " " + this.positionY + (isNaN(this.positionY) ? "" : "px"),
21        navigator.userAgent.match(/(iPod|iPhone|iPad)/)) return this.imageSrc && this.iosFix && !this.$element.is("img") && this.$element.css({ backgroundImage: "url(" + this.imageSrc + ")", backgroundSize: "cover", backgroundPosition: this.position }),
22        this; if (navigator.userAgent.match(/(Android)/)) return this.imageSrc && this.androidFix && !this.$element.is("img") && this.$element.css({ backgroundImage: "url(" + this.imageSrc + ")", backgroundSize: "cover", backgroundPosition: this.position }),
23        this; this.$mirror = t("<div />").prependTo("body");
24        var a = this.$element.find(">.parallax-slider"),
25        n = !1; 0 == a.length ? this.$slider = t("<img />").prependTo(this.$mirror) : (this.$slider = a.prependTo(this.$mirror),
26        n = !0),
27        this.$mirror.addClass("parallax-mirror").css({ visibility: "hidden", zIndex: this.zIndex, position: "fixed", top: 0, left: 0, overflow: "hidden" }),
28        this.$slider.addClass("parallax-slider").one("load", function () {
29            h.naturalHeight && h.naturalWidth || (h.naturalHeight = this.naturalHeight || this.height || 1, h.naturalWidth = this.naturalWidth || this.width || 1),
30            h.aspectRatio = h.naturalWidth / h.naturalHeight, o.isSetup || o.setup(),
31            o.sliders.push(h),
32            o.isFresh = !1, o.requestRender()
33        }),
34        n || (this.$slider[0].src = this.imageSrc),
35        (this.naturalHeight && this.naturalWidth || this.$slider[0].complete || a.length > 0) && this.$slider.trigger("load")
36    }
37    function h(s) {
38        return this.each(function () {
39            var h = t(this),
40             r = "object" == typeof s && s; this == i || this == e || h.is("body") ? o.configure(r) : h.data("px.parallax") ? "object" == typeof s && t.extend(h.data("px.parallax"),
41             r) : (r = t.extend({},
42             h.data(),
43             r),
44             h.data("px.parallax", new o(this, r))),
45             "string" == typeof s && ("destroy" == s ? o.destroy(this) : o[s]())
46        })
47    }
48    !function () {
49        for (var t = 0, e = ["ms", "moz", "webkit", "o"], s = 0; s < e.length && !i.requestAnimationFrame; ++s) i.requestAnimationFrame = i[e[s] + "RequestAnimationFrame"], i.cancelAnimationFrame = i[e[s] + "CancelAnimationFrame"] || i[e[s] + "CancelRequestAnimationFrame"]; i.requestAnimationFrame || (i.requestAnimationFrame = function (e) {
50            var s = (new Date).getTime(),
51             o = Math.max(0, 16 - (s - t)),
52             h = i.setTimeout(function () { e(s + o) },
53             o);
54            return t = s + o, h
55        }),
56         i.cancelAnimationFrame || (i.cancelAnimationFrame = function (t) { clearTimeout(t) })
57    }(),
58     t.extend(o.prototype, {
59         speed: .2, bleed: 0, zIndex: -100, iosFix: !0, androidFix: !0, position: "center", overScrollFix: !1, refresh: function () {
60             this.boxWidth = this.$element.outerWidth(),
61             this.boxHeight = this.$element.outerHeight() + 2 * this.bleed, this.boxOffsetTop = this.$element.offset().top - this.bleed, this.boxOffsetLeft = this.$element.offset().left, this.boxOffsetBottom = this.boxOffsetTop + this.boxHeight; var t = o.winHeight, i = o.docHeight, e = Math.min(this.boxOffsetTop, i - t),
62             s = Math.max(this.boxOffsetTop + this.boxHeight - t, 0),
63             h = this.boxHeight + (e - s) * (1 - this.speed) | 0, r = (this.boxOffsetTop - e) * (1 - this.speed) | 0; if (h * this.aspectRatio >= this.boxWidth) { this.imageWidth = h * this.aspectRatio | 0, this.imageHeight = h, this.offsetBaseTop = r; var a = this.imageWidth - this.boxWidth; this.offsetLeft = "left" == this.positionX ? 0 : "right" == this.positionX ? -a : isNaN(this.positionX) ? -a / 2 | 0 : Math.max(this.positionX, -a) }
64             else { this.imageWidth = this.boxWidth, this.imageHeight = this.boxWidth / this.aspectRatio | 0, this.offsetLeft = 0; var a = this.imageHeight - h; this.offsetBaseTop = "top" == this.positionY ? r : "bottom" == this.positionY ? r - a : isNaN(this.positionY) ? r - a / 2 | 0 : r + Math.max(this.positionY, -a) }
65         },
66         render: function () {
67             var t = o.scrollTop, i = o.scrollLeft, e = this.overScrollFix ? o.overScroll : 0, s = t + o.winHeight; this.boxOffsetBottom > t && this.boxOffsetTop <= s ? (this.visibility = "visible", this.mirrorTop = this.boxOffsetTop - t, this.mirrorLeft = this.boxOffsetLeft - i, this.offsetTop = this.offsetBaseTop - this.mirrorTop * (1 - this.speed)) : this.visibility = "hidden", this.$mirror.css({ transform: "translate3d(0px, 0px, 0px)", visibility: this.visibility, top: this.mirrorTop - e, left: this.mirrorLeft, height: this.boxHeight, width: this.boxWidth }),
68             this.$slider.css({ transform: "translate3d(0px, 0px, 0px)", position: "absolute", top: this.offsetTop, left: this.offsetLeft, height: this.imageHeight, width: this.imageWidth, maxWidth: "none" })
69         }
70     }),
71     t.extend(o, {
72         scrollTop: 0, scrollLeft: 0, winHeight: 0, winWidth: 0, docHeight: 1 << 30, docWidth: 1 << 30, sliders: [], isReady: !1, isFresh: !1, isBusy: !1, setup: function () {
73             if (!this.isReady) {
74                 var s = t(e),
75                 h = t(i),
76                 r = function () {
77                     o.winHeight = h.height(),
78                     o.winWidth = h.width(),
79                     o.docHeight = s.height(),
80                     o.docWidth = s.width()
81                 },
82                 a = function () {
83                     var t = h.scrollTop(),
84                     i = o.docHeight - o.winHeight, e = o.docWidth - o.winWidth; o.scrollTop = Math.max(0, Math.min(i, t)),
85                     o.scrollLeft = Math.max(0, Math.min(e, h.scrollLeft())),
86                     o.overScroll = Math.max(t - i, Math.min(t, 0))
87                 };
88                 h.on("resize.px.parallax load.px.parallax", function () {
89                     r(),
90                     o.isFresh = !1, o.requestRender()
91                 }).on("scroll.px.parallax load.px.parallax", function () {
92                     a(),
93                     o.requestRender()
94                 }),
95                 r(),
96                 a(),
97                 this.isReady = !0
98             }
99         },
100         configure: function (i) { "object" == typeof i && (delete i.refresh, delete i.render, t.extend(this.prototype, i)) },
101         refresh: function () {
102             t.each(this.sliders, function () { this.refresh() }),
103             this.isFresh = !0
104         },
105         render: function () {
106             this.isFresh || this.refresh(),
107             t.each(this.sliders, function () { this.render() })
108         },
109         requestRender: function () {
110             var t = this; this.isBusy || (this.isBusy = !0, i.requestAnimationFrame(function () {
111                 t.render(),
112                 t.isBusy = !1
113             }))
114         },
115         destroy: function (e) {
116             var s, h = t(e).data("px.parallax");
117             for (h.$mirror.remove(),
118             s = 0; s < this.sliders.length; s += 1) this.sliders[s] == h && this.sliders.splice(s, 1);
119             t(e).data("px.parallax", !1),
120             0 === this.sliders.length && (t(i).off("scroll.px.parallax resize.px.parallax load.px.parallax"),
121             this.isReady = !1, o.isSetup = !1)
122         }
123     });
124    var r = t.fn.parallax; t.fn.parallax = h, t.fn.parallax.Constructor = o, t.fn.parallax.noConflict = function () { return t.fn.parallax = r, this },
125    t(e).on("ready.px.parallax.data-api", function () {
126        t('[data-parallax="scroll"]').each(function () {
127            var bleed_ = t(this).attr("data-bleed");
128            if (isEmpty(bleed_)) bleed_ = 70;
129            t(this).parallax({
130                positionY: "center",
131                bleed: bleed_
132            })
133        });
134    })
135}(jQuery, window, document);
136

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.