PageSourceSearch

https://armanni.com/assets/js/custom.js?v=20250310

js armanni.com collected 2026-09-28 06:44:51 UTC 15,549 bytes, 636 lines download raw bytes

1// Recaptcha
2$(document).ready(function () {
3  window.rec = false;
4
5  setRecaptcha = function () {
6    $(".g-recaptcha").each(function (index, el) {
7      grecaptcha.render(el, {
8        sitekey: "6LcRyH4UAAAAAKTLhWNUa_0kfXoPhwqq9bel2JLz",
9        callback: verifyCallback,
10      });
11    });
12  };
13
14  function verifyCallback() {
15    window.rec = true;
16  }
17});
18
19// Homepage Carousel
20$(".carousel").carousel({
21  interval: false, //changes the speed
22});
23
24// WOWJS
25$(document).ready(function () {
26  wow = new WOW({
27    boxClass: "wow",
28    animateClass: "animated",
29    offset: 0,
30    mobile: false,
31    live: true,
32  });
33  wow.init();
34});
35
36// Load more
37/*
38$(function () {
39  $(".prodotto").slice(0, 12).show();
40  if ($(".prodotto:hidden").length == 0) {
41    $("#carica-altri").css("display", "none");
42  }
43  $("#carica-altri").on("click", function (e) {
44    if ($(".prodotto:hidden").length == 0) {
45      $("#carica-altri").css("display", "none");
46    } // fine prodotti, nascondi pulsante
47
48    e.preventDefault();
49    $(".prodotto:hidden").slice(0, 12).slideDown();
50    if ($(".prodotto:hidden").length == 0) {
51      $("#load").fadeOut("slow");
52    }
53  });
54});
55*/
56
57// Carousel > Home
58$(document).ready(function () {
59  $(".owl-carousel.owl-home").owlCarousel({
60    loop: true,
61    margin: 0,
62    responsiveClass: true,
63    dots: true,
64    video: true,
65    nav: true,
66    afterAction: function (current) {
67      current.find("video").get(0).play();
68    },
69    navText: [
70      "<i class='fa fa-angle-left'></i>",
71      "<i class='fa fa-angle-right'></i>",
72    ],
73    stagePadding: 0,
74    responsive: {
75      0: {
76        items: 1,
77      },
78      600: {
79        items: 1,
80      },
81      1000: {
82        items: 1,
83      },
84    },
85  });
86});
87
88// Carousel > Home
89$(document).ready(function () {
90  $(".owl-carousel.owl-modal-news").owlCarousel({
91    loop: true,
92    margin: 0,
93    responsiveClass: true,
94    dots: true,
95    nav: true,
96    afterAction: function (current) {
97      current.find("video").get(0).play();
98    },
99    navText: [
100      "<i class='fa fa-angle-left'></i>",
101      "<i class='fa fa-angle-right'></i>",
102    ],
103    stagePadding: 0,
104    responsive: {
105      0: {
106        items: 1,
107      },
108      600: {
109        items: 1,
110      },
111      1000: {
112        items: 1,
113      },
114    },
115  });
116});
117
118// Carousel > Gallery
119$(document).ready(function () {
120  if ($("#js-carouselNews").length > 0) {
121    var carouselNews = tns({
122      container: "#js-carouselNews",
123      controlsContainer: "#js-carouselNewsNav",
124      slideBy: 1,
125      loop: false,
126      mouseDrag: false,
127      swipeAngle: 30,
128      speed: 400,
129      responsive: {
130        320: {
131          items: 1,
132        },
133        767: {
134          items: 2,
135        },
136        991: {
137          items: 2,
138        },
139        1200: {
140          items: 4,
141        },
142        1366: {
143          items: 4,
144        },
145      },
146    });
147  }
148});
149
150// Carousel > Cases
151$(document).ready(function () {
152  if ($("#js-carouselCases").length > 0) {
153    var carouselCases = tns({
154      container: "#js-carouselCases",
155      controlsContainer: "#js-carouselCasesNav",
156      slideBy: 1,
157      loop: false,
158      mouseDrag: false,
159      swipeAngle: 30,
160      center: true,
161      speed: 400,
162      nav: false,
163      gutter: 30,
164      responsive: {
165        320: {
166          items: 1,
167          nav: true,
168        },
169        767: {
170          items: 3,
171          nav: true,
172        },
173        991: {
174          items: 3.2,
175          nav: false,
176        },
177        1200: {
178          items: 2.2,
179          nav: false,
180        },
181        1366: {
182          items: 2.2,
183          nav: false,
184        },
185        1440: {
186          items: 3.2,
187          nav: false,
188        },
189        1921: {
190          items: 3.2,
191          nav: false,
192        },
193      },
194    });
195    // When carousel is started, hide the section title
196    carouselCases.events.on("indexChanged", function (info) {
197      if (info.index == 0) {
198        $("#js-blockTitle").removeClass("is--hidden");
199      } else {
200        $("#js-blockTitle").addClass("is--hidden");
201      }
202    });
203  }
204});
205
206// Carousel > Gallery
207$(document).ready(function () {
208  if ($("#js-carouselGallery").length > 0) {
209    var carouselGallery = tns({
210      container: "#js-carouselGallery",
211      controlsContainer: "#js-carouselGalleryNav",
212      slideBy: 1,
213      mouseDrag: true,
214      swipeAngle: 30,
215      gutter: 30,
216      loop: false,
217      speed: 400,
218      responsive: {
219        320: {
220          items: 1.2,
221          edgePadding: 15,
222        },
223        767: {
224          items: 2.3,
225          edgePadding: 30,
226        },
227        991: {
228          items: 3,
229          edgePadding: 50,
230        },
231        1200: {
232          items: 3,
233          edgePadding: 75,
234        },
235        1366: {
236          items: 3,
237          edgePadding: 100,
238        },
239        1441: {
240          items: 3,
241          edgePadding: 150,
242        },
243        1681: {
244          items: 2,
245          edgePadding: 500,
246        },
247      },
248    });
249  }
250});
251
252
253// Fancybox
254$(document).ready(function () {
255  $(".fancybox").fancybox();
256});
257
258// Search
259$(document).ready(function () {
260  $("#close-btn").click(function () {
261    $("#search-overlay").fadeOut();
262    $("#search-btn").show();
263  });
264  $("#search-btn").click(function () {
265    $(this).hide();
266    $("#search-overlay").fadeIn();
267  });
268});
269
270// Footer
271$(document).ready(function () {
272  $(".widget h5").click(function () {
273    $(this).parent().toggleClass("active");
274  });
275  $(".widget2 h5").click(function () {
276    $(this).parent().toggleClass("active");
277  });
278  $(".widget3 h5").click(function () {
279    $(this).parent().toggleClass("active");
280  });
281});
282
283// Tooltip
284$(document).ready(function () {
285  $('[data-toggle="tooltip"]').tooltip();
286});
287
288// Smoothscroll
289$(document).ready(function () {
290  $("a#lplink").on("click", function (e) {
291    e.preventDefault();
292
293    var target = this.hash;
294    var $target = $(target);
295
296    $("html, body")
297      .stop()
298      .animate(
299        {
300          scrollTop: $target.offset().top - 70,
301        },
302        900,
303        "swing",
304        function () {
305          window.location.hash = target;
306        }
307      );
308  });
309});
310
311/* scroll top */
312$(document).ready(function () {
313  $(function () {
314    $(document).on("scroll", function () {
315      if ($(window).scrollTop() > 100) {
316        $(".scroll-top-wrapper").addClass("show");
317      } else {
318        $(".scroll-top-wrapper").removeClass("show");
319      }
320    });
321
322    $(".scroll-top-wrapper").on("click", scrollToTop);
323    $(".scroll-top-wrapper__filter").on("click", scrollToTop);
324  });
325
326  function scrollToTop() {
327    verticalOffset = typeof verticalOffset != "undefined" ? verticalOffset : 0;
328    element = $("body");
329    offset = element.offset();
330    offsetTop = offset.top;
331    $("html, body").animate({ scrollTop: offsetTop }, 500, "linear");
332  }
333});
334
335/* Gallery */
336function changeImage(imageUrl) {
337  //$('#img_principale_open_gallery').attr("href", imageUrl);
338  $("#imgStartupImage").attr("src", imageUrl);
339  $("#img_principale_open_gallery").attr("href", imageUrl);
340}
341
342// Homepage video
343var timeoutId;
344var $videoBgAspect = $(".videobg-aspect");
345var $videoBgWidth = $(".videobg-width");
346var videoAspect = $videoBgAspect.outerHeight() / $videoBgAspect.outerWidth();
347
348function videobgEnlarge() {
349  console.log("resize");
350  windowAspect = $(window).height() / $(window).width();
351  if (windowAspect > videoAspect) {
352    $videoBgWidth.width((windowAspect / videoAspect) * 100 + "%");
353  } else {
354    $videoBgWidth.width(100 + "%");
355  }
356}
357
358$(window).resize(function () {
359  clearTimeout(timeoutId);
360  timeoutId = setTimeout(videobgEnlarge, 100);
361});
362
363$(function () {
364  videobgEnlarge();
365});
366
367// Filter collapse
368$(document).ready(function () {
369  var mql = window.matchMedia("screen and (max-width: 1200px)");
370  mediaqueryresponse(mql);
371  mql.addListener(mediaqueryresponse);
372
373  function mediaqueryresponse(mql) {
374    if (mql.matches) {
375      $("#categoria-filtro .taber").attr("data-toggle", "collapse");
376      $("#categoria-filtro .collapse").collapse("hide");
377      $("#filtracerca .collapse").removeClass("in");
378    } else {
379      $("#categoria-filtro .collapse").collapse("show");
380      $(".aggiuntive").css("display", "none");
381      $("#filtraggiuntive").css("display", "none");
382      $("#filtracerca .collapse").removeClass("in");
383    }
384  }
385});
386
387// Slider
388$(document).ready(function () {
389  $(".owl-carousel.owl-gallery").owlCarousel({
390    loop: false,
391    margin: 60,
392    responsiveClass: true,
393    dots: false,
394    navigation: true,
395    navText: [
396      "<i class='fa fa-angle-left'></i>",
397      "<i class='fa fa-angle-right'></i>",
398    ],
399    stagePadding: 40,
400    responsive: {
401      0: {
402        items: 1,
403        nav: true,
404      },
405      600: {
406        items: 3,
407        nav: true,
408      },
409      1000: {
410        items: 3,
411        nav: true,
412      },
413    },
414  });
415});
416
417// Cookie
418// document.addEventListener("DOMContentLoaded", function(event) {
419//   if (window.location.href.match(/(\/en\/)|(\/es\/)|(\/fr\/)|(\/de\/)/g)) {
420//     cookieChoices.showCookieConsentBar(
421//       "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.",
422//       "I Accept",
423//       "Read more",
424//       "/en/cookie/"
425//       );
426//   } else cookieChoices.showCookieConsentBar(
427//     "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.",
428//     "Accetto",
429//     "Leggi di più",
430//     "/it/cookie/"
431//     );
432// });
433
434// Counter
435$(document).ready(function () {
436  const counterBlock1 = document.querySelector("#js-counterBlock1");
437  let counterBlock1Completed = false;
438  const observerBlock1 = new window.IntersectionObserver(
439    ([entry]) => {
440      if (entry.isIntersecting && !counterBlock1Completed) {
441        $(".counter").each(function () {
442          var $thisCounterValue = $(this);
443          var counterDelay;
444          if ($thisCounterValue.data("counter-delay")) {
445            counterDelay =
446              parseFloat($thisCounterValue.data("counter-delay").slice(0, -1)) *
447              1000;
448          } else {
449            counterDelay = 0;
450          }
451          var counterFinalValue = $thisCounterValue.text();
452
453          jQuery({ Counter: 0 })
454            .delay(counterDelay)
455            .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 (
463                    Number(num) > 999 &&
464                    $thisCounterValue.data("counter-format") != "year"
465                  ) {
466                    while (/(\d+)(\d{3})/.test(num)) {
467                      num = num.replace(/(\d+)(\d{3})/, "$1" + "." + "$2");
468                    }
469                  }
470                  $thisCounterValue.text(num);
471                },
472                complete: function () {
473                  var num = Math.ceil(counterFinalValue).toString();
474                  if (
475                    Number(num) > 999 &&
476                    $thisCounterValue.data("counter-format") != "year"
477                  ) {
478                    while (/(\d+)(\d{3})/.test(num)) {
479                      num = num.replace(/(\d+)(\d{3})/, "$1" + "." + "$2");
480                    }
481                  }
482                  $thisCounterValue.text(num);
483                },
484              }
485            );
486        });
487        counterBlock1Completed = true;
488        return;
489      }
490    },
491    {
492      root: null,
493      threshold: 0.1,
494    }
495  );
496
497  if ($(counterBlock1).length > 0) {
498    observerBlock1.observe(counterBlock1);
499  }
500});
501
502
503// new js functions 
504(function($){
505
506  let cartImage = '<div class="card"><div class="card-bg" style="background-image: url(@@cartImage@@)"></div></div>';
507  let H = new ClassBasic();
508  let sessionObject;
509
510  $(".js-news-modal").on("click", function() {
511
512    let data = { "IdNews": $(this).data("id"), "Language": $("#js-language").attr("content"), "method": "getNewsByIdNews" };
513
514    H.callPost('/api/', data).then(function(ret) {
515
516      let carousel = "";
517
518      if(ret.Img != "") {
519        carousel = cartImage;
520        carousel = carousel.replace(/@@cartImage@@/g, '/immagini/' + ret.Img);
521        carousel = carousel.replace(/\{\{.*?\}\}/g, "---");
522      }
523
524      if(ret.video != false) {
525        carousel = cartImage;
526        carousel = carousel.replace(/@@cartImage@@/g, ret.Img);
527        carousel = carousel.replace(/\{\{.*?\}\}/g, "---");
528      }
529
530      if(ret.Photos != false) {
531        $(ret.Photos).each(function(index, value){
532
533          carousel += cartImage;
534          carousel = carousel.replace(/@@cartImage@@/g, '/immagini/' + value.img_gra);
535          carousel = carousel.replace(/\{\{.*?\}\}/g, "---");
536
537        });
538      }
539
540      $("#js-modal-carousel").html(carousel);
541      $("#js-modal-title").html(ret.titolo);
542      $("#js-modal-description").html(ret.testo);
543
544      var owlPost = $("#js-modal-carousel");
545      if (typeof owlPost.data('owl.carousel') != 'undefined') {
546        owlPost.data('owl.carousel').destroy();
547      }
548
549      $("#js-modal-carousel").owlCarousel({
550        loop: true,
551        margin: 0,
552        responsiveClass: true,
553        dots: true,
554        nav: true,
555        afterAction: function (current) {
556          current.find("video").get(0).play();
557        },
558        navText: [
559          "<i class='fa fa-angle-left'></i>",
560          "<i class='fa fa-angle-right'></i>",
561        ],
562        stagePadding: 0,
563        responsive: {
564          0: {
565            items: 1,
566          },
567          600: {
568            items: 1,
569          },
570          1000: {
571            items: 1,
572          },
573        },
574      });
575
576    });
577
578  });
579
580	$(window).on('load', function () {
581		$('#modalHome').modal('show');
582	});
583
584  /* modal save session */
585  $(document).ready(function () {
586
587    sessionObject = JSON.parse(sessionStorage.getItem('sessionObject'));
588
589    if(sessionObject != null && sessionObject.modalHome && sessionObject.modalHome == true) {
590      $('#modalHome').remove();
591    }
592
593    $('#modalHome').on('hidden.bs.modal', function () {
594      sessionObject = { "modalHome": true };
595      sessionStorage.setItem('sessionObject', JSON.stringify(sessionObject));
596    });
597  });
598
599  /*
600  var sessionObject = JSON.parse(sessionStorage.getItem('sessionObject'));
601  sessionStorage.setItem('sessionObject', JSON.stringify(sessionObject));
602  */
603  $(document).ready(function($) {   
604
605    $("#form_contatti").validate({
606      rules: {
607        name: {required: true},
608        company: {required: true},
609        email: {required: true},
610        phone: {required: true},
611        mobile: {required: true},
612        message: {required: true},
613        privacy: {required: true},
614        marketingdiretto: {required: true},
615        marketingindiretto: {required: true},
616        profilazione: {required: true}
617      },
618      highlight: function(element) {
619        $(element).addClass("classe_errore");
620      },
621      unhighlight: function(element) {
622        $(element).removeClass("classe_errore");
623      },
624      submitHandler: function(form) {
625        if(window.rec == false) {
626            alert("Check reCAPTCHA");
627            return false;
628        }else{
629            form.submit();
630        }     
631      }
632    });
633
634  });
635  
636})(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.