PageSourceSearch

https://www.tvsuwalki.pl/wp-content/plugins/nivo-slider-lite/assets/js/jquery.nivo.slider.pack.js?ver=2.1.1

js tvsuwalki.pl collected 2026-10-04 00:54:32 UTC 23,321 bytes, 554 lines download raw bytes

vendor: 4,799 bytes, lines 1-130
1/*
2 * jQuery Nivo Slider v3.2
3 * http://nivo.dev7studios.com
4 *
5 * Copyright 2012, Dev7studios
6 * Free to use and abuse under the MIT license.
7 * http://www.opensource.org/licenses/mit-license.php
8 */
9/* global jQuery, console */
10(function (e) {
11    "use strict";
12    var t = function (t, n) {
13        var r = e.extend({}, e.fn.nivoSlider.defaults, n);
14        var i = {
15            currentSlide: 0,
16            currentImage: "",
17            totalSlides: 0,
18            running: false,
19            paused: false,
20            stop: false,
21            controlNavEl: false
22        };
23        var s = e(t);
24        s.data("nivo:vars", i).addClass("nivoSlider");
25        var o = s.children();
26        o.each(function () {
27            var t = e(this);
28            var n = "";
29            if (!t.is("img")) {
30                if (t.is("a")) {
31                    t.addClass("nivo-imageLink");
32                    n = t;
33                }
34                t = t.find("img:first");
35            }
36            var r = r === 0 ? t.attr("width") : t.width(), s = s === 0 ? t.attr("height") : t.height();
37            if (n !== "") {
38                n.css("display", "none");
39            }
40            t.css("display", "none");
41            i.totalSlides++;
42        });
43        if (r.randomStart) {
44            r.startSlide = Math.floor(Math.random() * i.totalSlides);
45        }
46        if (r.startSlide > 0) {
47            if (r.startSlide >= i.totalSlides) {
48                r.startSlide = i.totalSlides - 1;
49            }
50            i.currentSlide = r.startSlide;
51        }
52        if (e(o[i.currentSlide]).is("img")) {
53            i.currentImage = e(o[i.currentSlide]);
54        } else {
55            i.currentImage = e(o[i.currentSlide]).find("img:first");
56        }
57        if (e(o[i.currentSlide]).is("a")) {
58            e(o[i.currentSlide]).css("display", "block");
59        }
60        var u = e("<img/>").addClass("nivo-main-image");
61        u.attr("src", i.currentImage.attr("src")).show();
62        s.append(u);
63        e(window).resize(function () {
64            s.children("img").width(s.width());
65            u.attr("src", i.currentImage.attr("src"));
66            u.stop().height("auto");
67            e(".nivo-slice").remove();
68            e(".nivo-box").remove();
69        });
70        s.append(e('<div class="nivo-caption"></div>'));
71        var a = function (t) {
72            var n = e(".nivo-caption", s);
73            if (i.currentImage.attr("title") != "" && i.currentImage.attr("title") != undefined) {
74                var r = i.currentImage.attr("title");
75                if (r.substr(0, 1) == "#") { r = e(r).html(); }
76                if (n.css("display") == "block") {
77                    setTimeout(function () {
78                        n.html(r);
79                    }, t.animSpeed);
80                } else {
81                    n.html(r);
82                    n.stop().fadeIn(t.animSpeed);
83                }
84            } else {
85                n.stop().fadeOut(t.animSpeed);
86            }
87        };
88        a(r);
89        var f = 0;
90        if (!r.manualAdvance && o.length > 1) {
91            f = setInterval(function () {
92                d(s, o, r, false);
93            }, r.pauseTime);
94        }
95        if (r.directionNav) {
96            s.append('<div class="nivo-directionNav"><a class="nivo-prevNav">' + r.prevText + '</a><a class="nivo-nextNav">' + r.nextText + "</a></div>");
97            e(s).on("click", "a.nivo-prevNav", function () {
98                if (i.running) {
99                    return false;
100                }
101                clearInterval(f);
102                f = "";
103                i.currentSlide -= 2;
104                d(s, o, r, "prev");
105            });
106            e(s).on("click", "a.nivo-nextNav", function () {
107                if (i.running) {
108                    return false;
109                }
110                clearInterval(f);
111                f = "";
112                d(s, o, r, "next");
113            });
114        }
115        if (r.controlNav) {
116            i.controlNavEl = e('<div class="nivo-controlNav"></div>');
117            s.after(i.controlNavEl);
118            for (var l = 0; l < o.length; l++) {
119                if (r.controlNavThumbs) {
120                    i.controlNavEl.addClass("nivo-thumbs-enabled");
121                    var c = o.eq(l);
122                    if (!c.is("img")) {
123                        c = c.find("img:first");
124                    }
125                    if (c.attr("data-thumb")) { i.controlNavEl.append('<a class="nivo-control" rel="' + l + '"><img src="' + c.attr("data-thumb") + '" alt="" /></a>'); }
126                } else {
127                    i.controlNavEl.append('<a class="nivo-control" rel="' + l + '">' + (l + 1) + "</a>");
128                }
129            }
130            e("a:eq(" + i.currentSlide + ")", i.controlNavEl).addClass("active");
131            e("a", i.controlNavEl).bind("click", function () {
132                if (i.running) { return false; }
133                if (e(this).hasClass("active")) { return false; }
134                clearInterval(f);
135                f = "";
136                u.attr("src", i.currentImage.attr("src"));
137                i.currentSlide = e(this).attr("rel") - 1;
138                d(s, o, r, "control");
139            });
140        }
141        if (r.pauseOnHover) {
142            s.hover(function () {
143                i.paused = true;
144                clearInterval(f);
145                f = "";
146            }, function () {
147                i.paused = false;
148                if (f === "" && !r.manualAdvance) {
149                    f = setInterval(function () {
150                        d(s, o, r, false);
151                    }, r.pauseTime);
152                }
153            });
154        }
155        s.bind("nivo:animFinished", function () {
156            u.attr("src", i.currentImage.attr("src"));
157            i.running = false;
158            e(o).each(function () {
159                if (e(this).is("a")) {
160                    e(this).css("display", "none");
161                }
162            });
163            if (e(o[i.currentSlide]).is("a")) {
164                e(o[i.currentSlide]).css("display", "block");
165            }
166            if (f === "" && !i.paused && !r.manualAdvance) {
167                f = setInterval(function () {
168                    d(s, o, r, false);
169                }, r.pauseTime);
170            }
171            r.afterChange.call(this);
172        });
173        var h = function (t, n, r) {
174            if (e(r.currentImage).parent().is("a")) { e(r.currentImage).parent().css("display", "block"); }
175            e('img[src="' + r.currentImage.attr("src") + '"]', t).not(".nivo-main-image,.nivo-control img").width(t.width()).css( { "visibility": "hidden" } ).show();
176            var i = e('img[src="' + r.currentImage.attr("src") + '"]', t).not(".nivo-main-image,.nivo-control img").parent().is("a") ? e('img[src="' + r.currentImage.attr("src") + '"]', t).not(".nivo-main-image,.nivo-control img").parent().height() : e('img[src="' + r.currentImage.attr("src") + '"]', t).not(".nivo-main-image,.nivo-control img").height();
177            for (var s = 0; s < n.slices; s++) {
178                var o = Math.round(t.width() / n.slices);
179                if (s === n.slices - 1) {
180                    t.append(e('<div class="nivo-slice" name="' + s + '"><img src="' + r.currentImage.attr("src") + '" style="position:absolute; width:' + t.width() + "px; height:auto; display:block !important; top:0; left:-" + (o + s * o - o) + 'px;" /></div>').css({
181                        left: o * s + "px",
182                        width: t.width() - o * s + "px",
183                        height: i + "px",
184                        opacity: "0",
185                        overflow: "hidden"
186                    }));
187                } else {
188                    t.append(e('<div class="nivo-slice" name="' + s + '"><img src="' + r.currentImage.attr("src") + '" style="position:absolute; width:' + t.width() + "px; height:auto; display:block !important; top:0; left:-" + (o + s * o - o) + 'px;" /></div>').css({
189                        left: o * s + "px",
190                        width: o + "px",
191                        height: i + "px",
192                        opacity: "0",
193                        overflow: "hidden"
194                    }));
195                }
196            }
197            e(".nivo-slice", t).height(i);
198            u.stop().animate({height: e(r.currentImage).height()}, n.animSpeed);
199        };
200        var p = function (t, n, r) {
201            if (e(r.currentImage).parent().is("a")) { e(r.currentImage).parent().css("display", "block"); }
202            e('img[src="' + r.currentImage.attr("src") + '"]', t).not(".nivo-main-image,.nivo-control img").width(t.width()).css( { "visibility": "hidden" } ).show();
203            var i = Math.round(t.width() / n.boxCols),
204                s = Math.round(e('img[src="' + r.currentImage.attr("src") + '"]', t).not(".nivo-main-image,.nivo-control img").height() / n.boxRows);
205            for (var o = 0; o < n.boxRows; o++) {
206                for (var a = 0; a < n.boxCols; a++) {
207                    if (a === n.boxCols - 1) {
208                        t.append(e('<div class="nivo-box" name="' + a + '" rel="' + o + '"><img src="' + r.currentImage.attr("src") + '" style="position:absolute; width:' + t.width() + "px; height:auto; display:block; top:-" + s * o + "px; left:-" + i * a + 'px;" /></div>').css({
209                            opacity: 0,
210                            left: i * a + "px",
211                            top: s * o + "px",
212                            width: t.width() - i * a + "px"
213                        }));
214                        e('.nivo-box[name="' + a + '"]', t).height(e('.nivo-box[name="' + a + '"] img', t).height() + "px");
215                    } else {
216                        t.append(e('<div class="nivo-box" name="' + a + '" rel="' + o + '"><img src="' + r.currentImage.attr("src") + '" style="position:absolute; width:' + t.width() + "px; height:auto; display:block; top:-" + s * o + "px; left:-" + i * a + 'px;" /></div>').css({
217                            opacity: 0,
218                            left: i * a + "px",
219                            top: s * o + "px",
220                            width: i + "px"
221                        }));
222                        e('.nivo-box[name="' + a + '"]', t).height(e('.nivo-box[name="' + a + '"] img', t).height() + "px");
223                    }
224                }
225            }
226            u.stop().animate({height: e(r.currentImage).height()}, n.animSpeed);
227        };
228        var d = function (t, n, r, i) {
229            var s = t.data("nivo:vars");
230            if (s && s.currentSlide === s.totalSlides - 1) {
231                r.lastSlide.call(this);
232            }
233            if ((!s || s.stop) && !i) {
234                return false;
vendor: 12,613 bytes, lines 235-554
235            }
236            r.beforeChange.call(this);
237            if (!i) {
238                u.attr("src", s.currentImage.attr("src"));
239            } else {
240                if (i === "prev") {
241                    u.attr("src", s.currentImage.attr("src"));
242                }
243                if (i === "next") {
244                    u.attr("src", s.currentImage.attr("src"));
245                }
246            }
247            s.currentSlide++;
248            if (s.currentSlide === s.totalSlides) {
249                s.currentSlide = 0;
250                r.slideshowEnd.call(this);
251            }
252            if (s.currentSlide < 0) {
253                s.currentSlide = s.totalSlides - 1;
254            }
255            if (e(n[s.currentSlide]).is("img")) {
256                s.currentImage = e(n[s.currentSlide]);
257            } else {
258                s.currentImage = e(n[s.currentSlide]).find("img:first");
259            }
260            if (r.controlNav) {
261                e("a", s.controlNavEl).removeClass("active");
262                e("a:eq(" + s.currentSlide + ")", s.controlNavEl).addClass("active");
263            }
264            a(r);
265            e(".nivo-slice", t).remove();
266            e(".nivo-box", t).remove();
267            var o = r.effect, f = "";
268            if (r.effect === "random") {
269                f = new Array("sliceDownRight", "sliceDownLeft", "sliceUpRight", "sliceUpLeft", "sliceUpDown", "sliceUpDownLeft", "fold", "fade", "boxRandom", "boxRain", "boxRainReverse", "boxRainGrow", "boxRainGrowReverse");
270                o = f[Math.floor(Math.random() * (f.length + 1))];
271                if (o === undefined) {
272                    o = "fade";
273                }
274            }
275            if (r.effect.indexOf(",") !== -1) {
276                f = r.effect.split(",");
277                o = f[Math.floor(Math.random() * f.length)];
278                if (o === undefined) {
279                    o = "fade";
280                }
281            }
282            if (s.currentImage.attr("data-transition")) {
283                o = s.currentImage.attr("data-transition");
284            }
285            s.running = true;
286            var l = 0, c = 0, d = "", m = "", g = "", y = "";
287            if (o === "sliceDown" || o === "sliceDownRight" || o === "sliceDownLeft") {
288                h(t, r, s);
289                l = 0;
290                c = 0;
291                d = e(".nivo-slice", t);
292                if (o === "sliceDownLeft") {
293                    d = e(".nivo-slice", t)._reverse();
294                }
295                d.each(function () {
296                    var n = e(this);
297                    n.css({top: "0px"});
298                    if (c === r.slices - 1) {
299                        setTimeout(function () {
300                            n.animate({opacity: "1.0"}, r.animSpeed, "", function () {
301                                t.trigger("nivo:animFinished");
302                            });
303                        }, 100 + l);
304                    } else {
305                        setTimeout(function () {
306                            n.animate({opacity: "1.0"}, r.animSpeed);
307                        }, 100 + l);
308                    }
309                    l += 50;
310                    c++;
311                });
312            } else if (o === "sliceUp" || o === "sliceUpRight" || o === "sliceUpLeft") {
313                h(t, r, s);
314                l = 0;
315                c = 0;
316                d = e(".nivo-slice", t);
317                if (o === "sliceUpLeft") {
318                    d = e(".nivo-slice", t)._reverse();
319                }
320                d.each(function () {
321                    var n = e(this);
322                    n.css({bottom: "0px"});
323                    if (c === r.slices - 1) {
324                        setTimeout(function () {
325                            n.animate({opacity: "1.0"}, r.animSpeed, "", function () {
326                                t.trigger("nivo:animFinished");
327                            });
328                        }, 100 + l);
329                    } else {
330                        setTimeout(function () {
331                            n.animate({opacity: "1.0"}, r.animSpeed);
332                        }, 100 + l);
333                    }
334                    l += 50;
335                    c++;
336                });
337            } else if (o === "sliceUpDown" || o === "sliceUpDownRight" || o === "sliceUpDownLeft") {
338                h(t, r, s);
339                l = 0;
340                c = 0;
341                var b = 0;
342                d = e(".nivo-slice", t);
343                if (o === "sliceUpDownLeft") {
344                    d = e(".nivo-slice", t)._reverse();
345                }
346                d.each(function () {
347                    var n = e(this);
348                    if (c === 0) {
349                        n.css("top", "0px");
350                        c++;
351                    } else {
352                        n.css("bottom", "0px");
353                        c = 0;
354                    }
355                    if (b === r.slices - 1) {
356                        setTimeout(function () {
357                            n.animate({opacity: "1.0"}, r.animSpeed, "", function () {
358                                t.trigger("nivo:animFinished");
359                            });
360                        }, 100 + l);
361                    } else {
362                        setTimeout(function () {
363                            n.animate({opacity: "1.0"}, r.animSpeed);
364                        }, 100 + l);
365                    }
366                    l += 50;
367                    b++;
368                });
369            } else if (o === "fold") {
370                h(t, r, s);
371                l = 0;
372                c = 0;
373                e(".nivo-slice", t).each(function () {
374                    var n = e(this);
375                    var i = n.width();
376                    n.css({top: "0px", width: "0px"});
377                    if (c === r.slices - 1) {
378                        setTimeout(function () {
379                            n.animate({width: i, opacity: "1.0"}, r.animSpeed, "", function () {
380                                t.trigger("nivo:animFinished");
381                            });
382                        }, 100 + l);
383                    } else {
384                        setTimeout(function () {
385                            n.animate({width: i, opacity: "1.0"}, r.animSpeed);
386                        }, 100 + l);
387                    }
388                    l += 50;
389                    c++;
390                });
391            } else if (o === "fade") {
392                h(t, r, s);
393                m = e(".nivo-slice:first", t);
394                m.css({width: t.width() + "px"});
395                m.animate({opacity: "1.0"}, r.animSpeed * 2, "", function () {
396                    t.trigger("nivo:animFinished");
397                });
398            } else if (o === "slideInRight") {
399                h(t, r, s);
400                m = e(".nivo-slice:first", t);
401                m.css({width: "0px", opacity: "1"});
402                m.animate({width: t.width() + "px"}, r.animSpeed * 2, "", function () {
403                    t.trigger("nivo:animFinished");
404                });
405            } else if (o === "slideInLeft") {
406                h(t, r, s);
407                m = e(".nivo-slice:first", t);
408                m.css({width: "0px", opacity: "1", left: "", right: "0px"});
409                m.animate({width: t.width() + "px"}, r.animSpeed * 2, "", function () {
410                    m.css({left: "0px", right: ""});
411                    t.trigger("nivo:animFinished");
412                });
413            } else if (o === "boxRandom") {
414                p(t, r, s);
415                g = r.boxCols * r.boxRows;
416                c = 0;
417                l = 0;
418                y = v(e(".nivo-box", t));
419                y.each(function () {
420                    var n = e(this);
421                    if (c === g - 1) {
422                        setTimeout(function () {
423                            n.animate({opacity: "1"}, r.animSpeed, "", function () {
424                                t.trigger("nivo:animFinished");
425                            });
426                        }, 100 + l);
427                    } else {
428                        setTimeout(function () {
429                            n.animate({opacity: "1"}, r.animSpeed);
430                        }, 100 + l);
431                    }
432                    l += 20;
433                    c++;
434                });
435            } else if (o === "boxRain" || o === "boxRainReverse" || o === "boxRainGrow" || o === "boxRainGrowReverse") {
436                p(t, r, s);
437                g = r.boxCols * r.boxRows;
438                c = 0;
439                l = 0;
440                var w = 0;
441                var E = 0;
442                var S = [];
443                S[w] = [];
444                y = e(".nivo-box", t);
445                if (o === "boxRainReverse" || o === "boxRainGrowReverse") {
446                    y = e(".nivo-box", t)._reverse();
447                }
448                y.each(function () {
449                    S[w][E] = e(this);
450                    E++;
451                    if (E === r.boxCols) {
452                        w++;
453                        E = 0;
454                        S[w] = [];
455                    }
456                });
457                for (var x = 0; x < r.boxCols * 2; x++) {
458                    var T = x;
459                    for (var N = 0; N < r.boxRows; N++) {
460                        if (T >= 0 && T < r.boxCols) {
461                            (function (n, i, s, u, a) {
462                                var f = e(S[n][i]);
463                                var l = f.width();
464                                var c = f.height();
465                                if (o === "boxRainGrow" || o === "boxRainGrowReverse") {
466                                    f.width(0).height(0);
467                                }
468                                if (u === a - 1) {
469                                    setTimeout(function () {
470                                        f.animate({
471                                            opacity: "1",
472                                            width: l,
473                                            height: c
474                                        }, r.animSpeed / 1.3, "", function () {
475                                            t.trigger("nivo:animFinished");
476                                        });
477                                    }, 100 + s);
478                                } else {
479                                    setTimeout(function () {
480                                        f.animate({opacity: "1", width: l, height: c}, r.animSpeed / 1.3);
481                                    }, 100 + s);
482                                }
483                            })(N, T, l, c, g);
484                            c++;
485                        }
486                        T--;
487                    }
488                    l += 100;
489                }
490            }
491        };
492        var v = function (e) {
493            for (var t, n, r = e.length; r; t = parseInt(Math.random() * r, 10), n = e[--r], e[r] = e[t], e[t] = n);
494            return e;
495        };
496        var m = function (e) {
497            if (this.console && typeof console.log !== "undefined") {
498                console.log(e);
499            }
500        };
501        this.stop = function () {
502            if (!e(t).data("nivo:vars").stop) {
503                e(t).data("nivo:vars").stop = true;
504                //m("Stop Slider");
505            }
506        };
507        this.start = function () {
508            if (e(t).data("nivo:vars").stop) {
509                e(t).data("nivo:vars").stop = false;
510                //m("Start Slider");
511            }
512        };
513        r.afterLoad.call(this);
514        return this;
515    };
516    e.fn.nivoSlider = function (n) {
517        return this.each(function (r, i) {
518            var s = e(this);
519            if (s.data("nivoslider")) {
520                return s.data("nivoslider");
521            }
522            var o = new t(this, n);
523            s.data("nivoslider", o);
524        });
525    };
526    e.fn.nivoSlider.defaults = {
527        effect: "random",
528        slices: 15,
529        boxCols: 8,
530        boxRows: 4,
531        animSpeed: 500,
532        pauseTime: 3e3,
533        startSlide: 0,
534        directionNav: true,
535        controlNav: true,
536        controlNavThumbs: false,
537        pauseOnHover: true,
538        manualAdvance: false,
539        prevText: "Prev",
540        nextText: "Next",
541        randomStart: false,
542        beforeChange: function () {
543        },
544        afterChange: function () {
545        },
546        slideshowEnd: function () {
547        },
548        lastSlide: function () {
549        },
550        afterLoad: function () {
551        }
552    };
553    e.fn._reverse = [].reverse;
554})(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.