PageSourceSearch

https://www.parkinson-italia.it/assets/js/custom.js?v=1.25.11.24

js parkinson-italia.it collected 2026-10-04 17:56:26 UTC 16,956 bytes, 536 lines download raw bytes

1// Cookie
2// document.addEventListener("DOMContentLoaded", function (event) {
3//   if (window.location.href.match(/(\/en\/)|(\/es\/)|(\/fr\/)|(\/de\/)/g)) {
4//     cookieChoices.showCookieConsentBar(
5//       "We use cookies, including third parties, to improve the browsing experience and to send you personalized promotional messages. Continuing with the navigation you agree their use in accordance with our Cookie policy.",
6//       "I Accept",
7//       "Read more",
8//       "/en/cookie-policy.php"
9//     );
10//   } else cookieChoices.showCookieConsentBar("Utilizziamo cookie, anche di terze parti, per migliorare l'esperienza di navigazione e per inviarti messaggi promozionali personalizzati. Proseguendo con la navigazione acconsenti al loro uso in conformità alla nostra Cookie policy.", "Accetto", "Leggi di più", "/cookie-policy.php");
11// });
12
13// WOWJS
14$(document).ready(function () {
15    wow = new WOW({
16        boxClass: "wow",
17        animateClass: "animated",
18        offset: 0,
19        mobile: false,
20        live: true,
21    });
22    wow.init();
23});
24
25// Head > Affix
26$(document).ready(function () {
27    $(window)
28        .on("scroll", { passive: true }, function () {
29            if ($(this).scrollTop() > 10) {
30                $(".navbar.navbar-default").addClass("is--affix");
31            } else {
32                $(".navbar.navbar-default").removeClass("is--affix");
33            }
34        })
35        .on("load", { passive: true }, function () {
36            $(this).scroll();
37        });
38});
39
40// Menu impulse
41$(document).ready(function () {
42    var mql = window.matchMedia("screen and (min-width: 992px)");
43    mediaqueryresponse(mql);
44    mql.addEventListener(`change`, mediaqueryresponse);
45    function mediaqueryresponse(mql) {
46        if (mql.matches) {
47            var lastScrollTop = 0;
48            $(window).scroll(function () {
49                var st = $(this).scrollTop();
50                setTimeout(function () {
51                    if (st > lastScrollTop && st > 205) {
52                        $("nav.navbar").addClass("impulse-hidden").removeClass("impulse-show");
53                        $(".is-sticky.js-sidebar").removeClass("impulse");
54                    } else {
55                        $("nav.navbar").removeClass("impulse-hidden").addClass("impulse-show");
56                        $(".is-sticky.js-sidebar").addClass("impulse");
57                    }
58                    lastScrollTop = st;
59                }, 100);
60            });
61
62            // Fix Anchor scroll
63            $('#categoriesSidebarContainer a[href*="#"]').each(function () {
64                $(this).attr('href', $(this).attr('href').replace('#', '#_'));
65            });
66
67            window.addEventListener("hashchange", function () {
68                if (window.location.hash.includes('#_')) {
69                    hashname = window.location.hash.replace('#_', '');
70                    window.location.hash = hashname;
71                    if ($('#' + hashname)) {
72                        var scrollTo = $('#' + hashname).offset().top - 20;
73                        if ($(document).scrollTop() > $('#' + hashname).offset().top) {
74                            scrollTo -= 150;
75                        }
76                        $([document.documentElement, document.body]).animate({
77                            scrollTop: scrollTo
78                        }, 100);
79                    }
80                }
81            }, false);
82        } else {
83            var st = $(".is-sticky.js-sidebar").offset().top;
84            $(window).scroll(function () {
85                if ($(this).scrollTop() >= st - 125) {
86                    $(".is-sticky.js-sidebar").parent().addClass("sticky-mobile");
87                } else {
88                    $(".is-sticky.js-sidebar").parent().removeClass("sticky-mobile");
89                }
90            });
91
92            $(".card-sidebar .panel-collapse .list-group li a").click(function () {
93                $(this).parents(".panel-collapse").collapse("hide");
94            });
95        }
96    }
97});
98
99// reCAPTCHA (v2)
100window.rec = false;
101myCallBack = function () {
102    var recaptchaForms = document.getElementsByClassName('g-recaptcha');
103    for (let i = 0; i < recaptchaForms.length; i++) {
104        grecaptcha.render(recaptchaForms[i], {
105            sitekey: "6LdcKKYZAAAAAKcomb5s2eW-SIDN2Q1k5ViMB7zz", // Recaptcha site key
106            callback: verifyCallback,
107            theme: "dark", // Theme (light/dark)
108            hl: "it", // Language (country code)
109        });
110    }
111}
112function verifyCallback() {
113    window.rec = true;
114}
115
116// Form control
117// $(document).ready(function ($) {
118//   $("#js-formRequest").validate({
119//     rules: {
120//       formName: {
121//         required: true,
122//       },
123//       formSurname: {
124//         required: true,
125//       },
126//       formProvince: {
127//         required: true,
128//       },
129//       formCompany: {
130//         required: true,
131//       },
132//       formEmail: {
133//         required: true,
134//       },
135//       formMessage: {
136//         required: true,
137//       },
138//       formPrivacy: {
139//         required: true,
140//       },
141//     },
142//     highlight: function (element) {
143//       $(element).addClass("has-error");
144//       $(".control__indicator").addClass("has-error");
145//     },
146//     unhighlight: function (element) {
147//       $(element).removeClass("has-error");
148//       if ($(".control__privacy input").is(":checked")) {
149//         $(".control__privacy > .control__indicator").removeClass("has-error");
150//       }
151//     },
152//     submitHandler: function (form) {
153//       console.log("Va");
154//       if (window.rec == false) {
155//         alert("Check reCAPTCHA");
156//         return false;
157//       } else {
158//         form.submit();
159//       }
160//     },
161//   });
162// });
163
164// Carousel > Homepage
165$(document).ready(function () {
166    if ($("#js-carouselHome").length > 0) {
167        var carouselHome = tns({
168            container: "#js-carouselHome",
169            controlsContainer: "#js-carouselHomeNav",
170            items: 1,
171            slideBy: "page",
172            mouseDrag: true,
173            swipeAngle: 30,
174            speed: 600,
175            loop: true,
176            autoplay: true,
177            autoplayTimeout: 5500,
178            autoplayHoverPause: false,
179            autoplayButton: false,
180            autoplayButtonOutput: false,
181        });
182    }
183});
184
185// Carousel Featured
186$(document).ready(function () {
187    if ($("#js-carouselFeatured").length > 0) {
188        var carouselFeatured = tns({
189            container: "#js-carouselFeatured",
190            controlsContainer: "#js-carouselFeaturedNav",
191            slideBy: 1,
192            nav: false,
193            mouseDrag: true,
194            swipeAngle: 30,
195            speed: 400,
196            loop: false,
197            responsive: {
198                320: {
199                    items: 1,
200                    gutter: 15,
201                },
202                480: {
203                    items: 2,
204                    gutter: 30,
205                },
206                767: {
207                    items: 2,
208                },
209                992: {
210                    items: 3,
211                },
212            },
213        });
214    }
215});
216
217// Carousel > Questions Gallery
218$(document).ready(function () {
219    if ($("#js-carouselQuestionGallery").length > 0) {
220        var carouselQuestionGallery = tns({
221            container: "#js-carouselQuestionGallery",
222            controlsContainer: "#js-carouselQuestionGalleryNav",
223            slideBy: 1,
224            nav: false,
225            mouseDrag: false,
226            swipeAngle: 30,
227            speed: 400,
228            loop: false,
229            gutter: 10,
230            responsive: {
231                320: {
232                    items: 1,
233                },
234                480: {
235                    items: 2,
236                },
237                767: {
238                    items: 4,
239                },
240                992: {
241                    items: 3,
242                },
243                1200: {
244                    items: 3,
245                },
246                1440: {
247                    items: 4,
248                },
249                1920: {
250                    items: 6,
251                }
252            },
253        });
254    }
255});
256
257// Carousel > Questions Gallery
258$(document).ready(function () {
259    if ($("#js-carouselQuestionGallery_2").length > 0) {
260        var carouselQuestionGallery_2 = tns({
261            container: "#js-carouselQuestionGallery_2",
262            controlsContainer: "#js-carouselQuestionGalleryNav_2",
263            slideBy: 1,
264            nav: false,
265            mouseDrag: false,
266            swipeAngle: 30,
267            speed: 400,
268            loop: false,
269            gutter: 10,
270            responsive: {
271                320: {
272                    items: 1,
273                },
274                767: {
275                    items: 2,
276                },
277                991: {
278                    items: 2,
279                },
280                1200: {
281                    items: 3,
282                },
283                1366: {
284                    items: 6,
285                },
286            },
287        });
288    }
289});
290
291// Carousel > Timeline
292$(document).ready(function () {
293    if ($("#js-carouselTimeline").length > 0) {
294        var carouselTimeline = tns({
295            container: "#js-carouselTimeline",
296            controlsContainer: "#js-carouselTimelineNav",
297            slideBy: "page",
298            center: true,
299            nav: false,
300            controls: false,
301            mouseDrag: true,
302            swipeAngle: 30,
303            speed: 400,
304            loop: false,
305            responsive: {
306                320: {
307                    items: 1,
308                },
309                767: {
310                    items: 2,
311                },
312                991: {
313                    items: 2,
314                },
315                1200: {
316                    items: 3,
317                },
318                1366: {
319                    items: 4,
320                },
321            },
322        });
323    }
324});
325
326// Carousel > Products Related
327$(document).ready(function () {
328    if ($("#js-carouselProductsRelated").length > 0) {
329        var carouselProductsRelated = tns({
330            container: "#js-carouselProductsRelated",
331            controlsContainer: "#js-carouselProductsRelatedNav",
332            slideBy: 1,
333            nav: false,
334            mouseDrag: true,
335            swipeAngle: 30,
336            speed: 400,
337            responsive: {
338                320: {
339                    items: 1,
340                },
341                767: {
342                    items: 2,
343                    gutter: 20,
344                },
345                991: {
346                    items: 3,
347                    gutter: 20,
348                },
349            },
350        });
351    }
352});
353
354// Carousel > Calendar
355// $(document).ready(function () {
356//   if ($("#js-carouselCalendar").length > 0) {
357//     var carouselCalendar = tns({
358//       container: "#js-carouselCalendar",
359//       controlsContainer: "#js-carouselCalendarNav",
360//       slideBy: 1,
361//       items: 1,
362//       nav: false,
363//       mouseDrag: true,
364//       swipeAngle: 30,
365//       speed: 400,
366//       gutter: 30,
367//     });
368//   }
369// });
370
371// Goto Top
372$(document).ready(function () {
373    $(window).scroll(function () {
374        if ($(this).scrollTop() > 200) {
375            $(".go-top").fadeIn(200);
376        } else {
377            $(".go-top").fadeOut(200);
378        }
379    });
380    $(".go-top").click(function (event) {
381        event.preventDefault();
382        $("html, body").animate(
383            {
384                scrollTop: 0,
385            },
386            300
387        );
388    });
389});
390
391//Load more
392$(document).ready(function () {
393    initLoadMore();
394});
395function initLoadMore() {
396    $(".has-loadmore #newsContainer > div").slice(0, 6).show();
397    $(".has-loadmore #newsContainer > div")
398        .slice(6, $(".has-loadmore #newsContainer > div").length)
399        .hide();
400
401    if ($(".has-loadmore #newsContainer > div:hidden").length != 0) {
402        $("#js-loadmore").show();
403    }
404
405    $("#js-loadmore").on("click", function (e) {
406        e.preventDefault();
407        $(".has-loadmore #newsContainer > div:hidden").slice(0, 6).fadeIn();
408        if ($(".has-loadmore #newsContainer > div:hidden").length == 0) {
409            $("#js-loadmore").fadeOut("slow");
410        }
411    });
412}
413
414// Sidebar Collapse
415$(document).ready(function () {
416    var mql = window.matchMedia("screen and (max-width: 991px)");
417    mediaqueryresponse(mql);
418    mql.addEventListener(`change`, mediaqueryresponse);
419    function mediaqueryresponse(mql) {
420        if (mql.matches) {
421            $(".js-sidebar .taber").attr("data-toggle", "collapse");
422            $(".js-sidebar .collapse").collapse("hide");
423            $(".section-footer .taber").attr("data-toggle", "collapse");
424            $(".section-footer .collapse").collapse("hide");
425            // $("nav.navbar").removeClass("navbar-fixed-top");
426            // $("nav.navbar").removeClass("navbar-fixed-top");
427        } else {
428            $(".js-sidebar .collapse").collapse("show");
429            $(".js-sidebar [data-toggle='collapse']").removeAttr("data-toggle");
430            $(".section-footer .collapse").collapse("show");
431            $(".section-footer [data-toggle='collapse']").removeAttr("data-toggle");
432            // $("nav.navbar").addClass("navbar-fixed-top");
433            // $("nav.navbar").addClass("navbar-fixed-top");
434        }
435    }
436});
437
438// Double Click Submenu
439(function ($) {
440    $(document).ready(function () {
441        $("ul.dropdown-menu [data-toggle=dropdown]").on("click", function (event) {
442            event.preventDefault();
443            event.stopPropagation();
444            $(this).parent().siblings().removeClass("open");
445            $(this).parent().toggleClass("open");
446        });
447    });
448})(jQuery);
449
450// Counter
451$(".counter").each(function () {
452    var $thisCounterValue = $(this);
453    var counterFinalValue = $thisCounterValue.text();
454
455    jQuery({ Counter: 0 }).animate(
456        { Counter: $thisCounterValue.text() },
457        {
458            duration: 1500,
459            easing: "swing",
460            step: function () {
461                var num = Math.ceil(this.Counter).toString();
462                if (Number(num) > 999) {
463                    while (/(\d+)(\d{3})/.test(num)) {
464                        num = num.replace(/(\d+)(\d{3})/, "$1" + "." + "$2");
465                    }
466                }
467                $thisCounterValue.text(num);
468            },
469            complete: function () {
470                var num = Math.ceil(counterFinalValue).toString();
471                if (Number(num) > 999) {
472                    while (/(\d+)(\d{3})/.test(num)) {
473                        num = num.replace(/(\d+)(\d{3})/, "$1" + "." + "$2");
474                    }
475                }
476                $thisCounterValue.text(num);
477            },
478        }
479    );
480});
481
482// Datepicker
483$(document).ready(function () {
484    var today = new Date();
485    $(".js-datePicker").datetimepicker({
486        format: "L",
487        locale: "it",
488        // minDate: new Date(today.getFullYear(), today.getMonth(), today.getDate()),
489        icons: {
490            time: "fa fa-clock-o",
491            date: "fa fa-calendar",
492            up: "fa fa-angle-up",
493            down: "fa fa-angle-down",
494            previous: "fa fa-angle-left",
495            next: "fa fa-angle-right",
496            clear: "fa fa-trash-alt",
497        },
498    });
499    $(".js-timePicker").datetimepicker({
500        format: "LT",
501        locale: "it",
502        useCurrent: false,
503        //minDate: new Date(),
504        icons: {
505            time: "fa fa-clock-o",
506            date: "fa fa-calendar",
507            up: "fa fa-angle-up",
508            down: "fa fa-angle-down",
509            previous: "fa fa-angle-left",
510            next: "fa fa-angle-right",
511            clear: "fa fa-trash-alt",
512        },
513    });
514});
515
516//copy button
517$(document).on("click", "[data-copy]", function (e) {
518    var copy = $(this).data("copy").replace("#copy-", "");
519    unsecuredCopyToClipboard(copy);
520})
521function unsecuredCopyToClipboard(text) {
522    var doc_body = document.body;
523
524    const textArea = document.createElement("input");
525    textArea.value = text;
526    doc_body.appendChild(textArea);
527    //textArea.focus();
528    textArea.select();
529    try {
530        document.execCommand('copy');
531        toastr.success("Copiato negli appunti");
532    } catch (err) {
533        console.error('Unable to copy to clipboard', err);
534    }
535    doc_body.removeChild(textArea);
536}

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.