PageSourceSearch

https://www.marcogrimaldi.it/wp-content/themes/flato/public/js/production/theme.js?ver=1.0

js marcogrimaldi.it collected 2026-10-08 11:35:59 UTC 13,705 bytes, 475 lines download raw bytes

1/*!
2 * @package    artless Flato
3 * @author     Christian Glingener <[email protected]>
4 * @version    1.0.0
5 * @copyright  2014 artlessthemes.com
6 * @link       http://artlessthemes.com/
7 */
8(function (i) {
9    var u = i("#al-page-preloader");
10    if (u.length) {
11        i(window).load(function () {
12            j();
13            u.delay(2000).show(function () {
14                if (i("#page-wrapper").height() == i(window).height()) {
15                    i(".bottom-box").css("position", "absolute")
16                }
17                i(this).fadeOut(300)
18            })
19        })
20    }
21
22    function G() {
23        var J = i("#home-parallax");
24        if (J.length > 0) {
25            J.css("min-height", i(window).height() + "px");
26            i("section.al-home-banner").css("min-height", i(window).height() + "px")
27            i("#layerslider_7").css("min-height", i(window).height() + "px")
28
29        }
30    }
31    G();
32
33    function j() {
34        i("[data-after-preload-src]").delay(500).each(function () {
35            var J = i(this).data("after-preload-src");
36            i(this).attr("src", J).removeAttr("data-after-preload-src")
37        })
38    }
39    var I = 0;
40    i("#open-nav").click(function (J) {
41        J.preventDefault();
42        if (I == 0) {
43            i("#header").clearQueue().animate({
44                left: "0"
45            }, 500, "swing");
46            i("#page-wrapper").clearQueue().animate({
47                left: "260px"
48            }, 500, "swing");
49            I = 1
50        } else {
51            i("#page-wrapper").clearQueue().animate({
52                left: "0"
53            }, 600, "easeOutBounce");
54            i("#header").clearQueue().animate({
55                left: "-260px"
56            }, 600, "easeOutBounce");
57            I = 0
58        }
59    });
60    i(".scrollto").click(function (M) {
61        M.preventDefault();
62        var K = 0;
63        var J = i(this).attr("href");
64        var L;
65        if (J) {
66            L = i(J)
67        } else {
68            L = i(this).closest("section").parent().next("section")
69        } if (L.offset()) {
70            i("html, body").clearQueue().animate({
71                scrollTop: L.offset().top - K
72            }, 1800, "swing")
73        }
74        return false
75    });
76    var c = i("#main-navigation"),
77        o = c.find("a.al-scrollto-anchor");
78
79    function k() {
80        var K = (i("#header").height() - c.height());
81        var J = 10;
82        if (K > 0) {
83            J = K / 2 - 10;
84            if (J < 10) {
85                J = 10
86            }
87        }
88        c.css("top", J + "px")
89    }
90    i(window).load(function () {
91        k()
92    });
93    o.click(function (L) {
94        L.preventDefault();
95        var K = 0;
96        var J = i(i.attr(this, "href"));
97        if (J.length) {
98            i("html, body").clearQueue().animate({
99                scrollTop: J.offset().top - K
100            }, 1800, "swing")
101        }
102        return false
103    });
104    var a = o.map(function () {
105        return i(i(this).attr("href"))
106    });
107
108    function m() {
109        var K = c.height();
110        var J = i(window).scrollTop() + K + 50;
111        var L = a.map(function () {
112            if (i(this).length) {
113                var N = i(this).offset().top;
114                var O = i(this).position().top + i(this).outerHeight(true);
115                if (N < J && O > J) {
116                    return this
117                }
118            }
119        });
120        if (L.length) {
121            L = L[L.length - 1];
122            var M = L.attr("id")
123        } else {
124            var M = ""
125        }
126        o.removeClass("active").filter("[href=#" + M + "]").addClass("active")
127    }
128    i(window).scroll(function () {
129        m()
130    });
131    var t = 965;
132    var H = i(window).width();
133    var A = i("#al-blog-wrapper");
134    var b = i("#al-blog-preview");
135    var l = b.find("div.layer");
136    var g = i("#al-blog-load-content");
137    var z = i("#al-blog-loader");
138
139    function D() {
140        l = b.find("div.layer");
141        H = i(window).width();
142        if (H < t) {
143            l.css({
144                top: "25%",
145                left: "0",
146                width: "100%",
147                opacity: "1"
148            })
149        } else {
150            l.css({
151                top: "40%",
152                left: "-50%",
153                width: "50%",
154                opacity: "0"
155            })
156        }
157        i(".al-blog-empty-preview").each(function () {
158            if (i(this).parent().width() > 700) {
159                i(this).css("min-height", i(this).parent().height() + 10 + "px")
160            } else {
161                i(this).css("min-height", 0)
162            }
163        })
164    }
165    b.on("mouseenter", "li", function () {
166        if (H > t) {
167            i(this).children(".layer").clearQueue().animate({
168                left: "0",
169                opacity: "1"
170            }, 400)
171        }
172    });
173    b.on("mouseleave", "li", function () {
174        if (H > t) {
175            i(this).children(".layer").clearQueue().animate({
176                left: "-50%",
177                opacity: "0"
178            }, 400)
179        }
180    });
181    i("#close-blog-wrapper").click(function (J) {
182        J.preventDefault();
183        A.css("height", A.height() + "px");
184        A.css("min-height", 0);
185        A.slideUp(1000);
186        i(".al-blog-article").fadeOut(800, function () {
187            i(this).remove()
188        })
189    });
190
191    function x() {
192        z.css("display", "none");
193        A.find("div.close").fadeIn(800);
194        i(".al-blog-article").fadeIn(1000);
195        A.css("height", "auto");
196        i(".blog-slider").bxSlider({
197            slideWidth: 1600,
198            minSlides: 1,
199            maxSlides: 1
200        })
201    }
202    x();
203    b.on("click", "a.button", function (L) {
204        L.preventDefault();
205        var K = i(this).data("load");
206        var J = i(window).height();
207        if (A.is(":hidden")) {
208            A.css("min-height", 0);
209            A.find(".close").hide();
210            z.css("display", "block");
211            g.html("");
212            A.css("height", J + "px");
213            A.slideDown(1000, function () {
214                A.css("min-height", J + "px")
215            });
216            i("html, body").clearQueue().animate({
217                scrollTop: A.offset().top
218            }, 1400, function () {
219                g.load(K, {
220                    ajax: true
221                }, function () {
222                    x()
223                })
224            })
225        } else {
226            A.find(".close").fadeOut(800);
227            z.delay(850).fadeIn();
228            A.css("height", A.height() + "px");
229            i(".al-blog-article").fadeOut(800);
230            i("html, body").clearQueue().animate({
231                scrollTop: A.offset().top
232            }, 1200, function () {
233                g.load(K, {
234                    ajax: true
235                }, function () {
236                    x()
237                })
238            })
239        }
240    });
241    var h = i("#al-blog-tabs");
242    var s = i("#al-blog-load-more-links");
243    var e = i("#al-blog-button-load-more");
244    var r = i("#al-blog-load-more-loader");
245    var w = [];
246    var C = "";
247    var F = y();
248    var f = 0;
249    var B = 0;
250
251    function E() {
252        if (h.length > 0) {
253            var J = h.find("li.active").data("filter");
254            if (B == 0) {
255                B = 1;
256                b.mixitup({
257                    targetSelector: ".al-blog-mix",
258                    filterSelector: ".al-blog-filter",
259                    showOnLoad: J
260                })
261            } else {
262                b.mixitup("remix", J)
263            }
264        } else {
265            b.find("li").css("display", "block")
266        }
267        D()
268    }
269    i(window).load(function () {
270        E()
271    });
272
273    function y() {
274        var J = h.find("li.active").data("filter");
275        if (J == "all") {
276            J = "al-blog-mix"
277        }
278        return b.find("li." + J).length
279    }
280    s.hide().find("a.page-numbers:not(.next,.prev)").each(function () {
281        w.push(i(this).attr("href"))
282    });
283
284    function v(J) {
285        if (J) {
286            i.ajax({
287                type: "POST",
288                url: J,
289                data: {
290                    "al-blog-load-more": true
291                }
292            }).done(function (K) {
293                C = w.shift();
294                if (C) {
295                    if (f == 0) {
296                        f = y()
297                    }
298                    b.append(K);
299                    if (y() < (f + F)) {
300                        v(C)
301                    } else {
302                        f = 0;
303                        w.push(C);
304                        E();
305                        r.fadeOut(800, function () {
306                            e.show()
307                        })
308                    }
309                } else {
310                    r.hide();
311                    r.closest("section").addClass("margin-bottom");
312                    r.parent().slideUp(1200);
313                    b.append(K);
314                    E()
315                }
316                p();
317                j()
318            })
319        }
320    }
321    e.on("click", function (J) {
322        J.preventDefault();
323        i(this).hide();
324        r.fadeIn(800, function () {
325            C = w.shift();
326            v(C)
327        })
328    });
329    i(".toggle .header").click(function () {
330        if (i(this).parent(".toggle").children(".content").is(":hidden")) {
331            i(this).addClass("active");
332            i(this).parent(".toggle").children(".content").slideDown();
333            i(this).parent(".toggle").children(".header").children(".plus").css({
334                display: "none"
335            });
336            i(this).parent(".toggle").children(".header").children(".minus").css({
337                display: "inline-block"
338            })
339        } else {
340            i(this).removeClass("active");
341            i(this).parent(".toggle").children(".content").slideUp();
342            i(this).parent(".toggle").children(".header").children(".plus").css({
343                display: "inline-block"
344            });
345            i(this).parent(".toggle").children(".header").children(".minus").css({
346                display: "none"
347            })
348        }
349    });
350    i(".percent-bar").each(function () {
351        var J = i(this).attr("data-percent");
352        i(this).children(".percent-bg").css("width", J + "%")
353    });
354    i(".tab-content-navi").each(function () {
355        var J = i(this).children("li:first-child").children("a");
356        var K = J.attr("open-content");
357        i("#" + K).css("display", "block");
358        J.addClass("active")
359    });
360    i(".tab-content-navi li a").click(function (K) {
361        K.preventDefault();
362        var L = i(this).attr("open-content");
363        if (i("#" + L).is(":hidden")) {
364            var J = i(this).parent("li").parent("ul");
365            J.children("li").each(function () {
366                i(this).children("a").removeClass("active");
367                var M = i(this).children("a").attr("open-content");
368                i("#" + M).css("display", "none")
369            });
370            i("#" + L).fadeIn(400);
371            i(this).addClass("active")
372        }
373    });
374    i(".alert-box .close").click(function (J) {
375        J.preventDefault();
376        i(this).parent(".alert-box ").fadeOut(350)
377    });
378    var n;
379    i(".cleartext").focusin(function () {
380        n = this.defaultValue;
381        if (this.value == this.defaultValue) {
382            this.value = ""
383        }
384    }).focusout(function () {
385        if (i(this).val() == "") {
386            this.value = n
387        }
388    });
389    var q = 0;
390    i(window).resize(function () {
391        if (q) {
392            clearTimeout(q)
393        }
394        q = setTimeout(d, 500)
395    });
396
397    function d() {
398        G();
399        D();
400        k();
401        p()
402    }
403
404    function p() {
405        if (i(window).width() > 979) {
406            var J = i(".al-vertical-mid-to-parent");
407            J.each(function () {
408                var L = i(this);
409                var M = L.parent();
410                var K = M.find("img");
411                if (K.length > 0) {
412                    N(L);
413                    K.load(function () {
414                        N(L)
415                    })
416                } else {
417                    N(L)
418                }
419
420                function N(P) {
421                    var Q = P.parent().height() - P.height();
422                    var O = 10;
423                    if (Q > 0) {
424                        O = Q / 2 - 10;
425                        if (O < 10) {
426                            O = 10
427                        }
428                    }
429                    P.css("padding-top", Math.round(O) + "px")
430                }
431            })
432        }
433    }
434    i("section.al-home-banner").parallax({
435        speed: 0.25
436    });
437    i(".parallax-content").parallax({
438        speed: 0.25
439    });
440    i(".device-slider ul").bxSlider({
441        slideWidth: 1200,
442        minSlides: 1,
443        maxSlides: 1,
444        controls: false,
445        auto: true
446    });
447    i(".quote-slider").bxSlider({
448        slideWidth: 1200,
449        minSlides: 1,
450        maxSlides: 1,
451        controls: false,
452        touchEnabled: false
453    });
454    i(window).load(function () {
455        p();
456        var J = i(".al-client-carousel");
457        if (J.length > 0) {
458            J.carouFredSel({
459                responsive: true,
460                width: "100%",
461                scroll: {
462                    items: 2,
463                    pauseOnHover: "immediate-resume"
464                },
465                items: {
466                    width: 300,
467                    visible: {
468                        min: 2,
469                        max: 4
470                    }
471                }
472            })
473        }
474    })
475})(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.