1(function ($) { 2 $(document).ready(function () { 3 const carouselCatalog = new Swiper('.cataloghi .lista-cataloghi', { 4 slidesPerView: 1, 5 spaceBetween: 20, 6 scrollbar: { 7 el: '.swiper-scrollbar', 8 }, 9 10 breakpoints: { 11 576: { 12 slidesPerView: 2, 13 }, 14 992: { 15 slidesPerView: 3, 16 slidesOffsetAfter: 0, 17 } 18 } 19 }); 20 21 const carouselLastNews = new Swiper('.last-news .swiper', { 22 slidesPerView: 1.1, 23 spaceBetween: 20, 24 scrollbar: { 25 el: '.swiper-scrollbar', 26 }, 27 28 breakpoints: { 29 576: { 30 slidesPerView: 2.1, 31 }, 32 992: { 33 slidesPerView: 3, 34 slidesOffsetAfter: 0, 35 } 36 } 37 }); 38 39 var carouselProducts = new Swiper('.carousel-products .swiper-products.active', { 40 slidesPerView: 1.1, 41 spaceBetween: 20, 42 loop: true, 43 // scrollbar: { 44 // el: '.swiper-scrollbar', 45 // }, 46 47 breakpoints: { 48 576: { 49 slidesPerView: 1.5, 50 }, 51 992: { 52 slidesPerView: 2.2, 53 slidesOffsetAfter: 0, 54 } 55 } 56 }); 57 58 $('.carousel-products .filters li').click(function () { 59 if ($(this).hasClass('active') == false) { 60 $('.carousel-products').css('height', $('.carousel-products').outerHeight()) 61 $('.carousel-products .swiper-products.active').fadeOut() 62 $('.carousel-products .swiper-products.active').removeClass('active') 63 $('.carousel-products .filters li.active').removeClass('active') 64 $('.carousel-products .filters li[data-count="' + $(this).data('count') + '"]').addClass('active') 65 setTimeout(() => { 66 $('.carousel-products .swiper-products[data-count="' + $(this).data('count') + '"]').addClass('active') 67 $('.carousel-products .swiper-products[data-count="' + $(this).data('count') + '"]').fadeIn() 68 69 carouselProducts = new Swiper('.carousel-products .swiper-products.active', { 70 slidesPerView: 1.1, 71 spaceBetween: 20, 72 loop: true, 73 74 breakpoints: { 75 576: { 76 slidesPerView: 1.5, 77 }, 78 992: { 79 slidesPerView: 2.2, 80 slidesOffsetAfter: 0, 81 } 82 } 83 }); 84 }, 400); 85 setTimeout(() => { 86 $('.carousel-products').css('height', 'auto') 87 }, 800); 88 } 89 }) 90 91 var carouselProject = new Swiper('.projects-carousel .swiper-projects', { 92 slidesPerView: 1.1, 93 spaceBetween: 20, 94 centeredSlides: true, 95 loop: true, 96 breakpoints: { 97 576: { 98 slidesPerView: 1.5, 99 }, 100 768: { 101 slidesPerView: 2, 102 slidesOffsetAfter: 0, 103 } 104 } 105 }); 106 }) 107 108 $(window).on('load', function () { 109 var script = document.createElement('script'); 110 script.src = 'https://player.vimeo.com/api/player.js'; 111 script.onload = function () { 112 $('.hero-video').each(function () { 113 var heroVideo = $(this); 114 var iframe = heroVideo.find('iframe'); 115 116 117 var checkVimeoInterval = setInterval(function () { 118 var src = iframe.attr('src'); 119 if (src && src.includes('vimeo')) { 120 clearInterval(checkVimeoInterval); 121 122 var player = new Vimeo.Player(iframe[0]); 123 124 player.on('play', function () { 125 heroVideo.addClass('--play'); 126 setTimeout(() => { 127 heroVideo.find('iframe').css('opacity', '1'); 128 }, 500); 129 }); 130 131 player.on('pause', function () { 132 heroVideo.removeClass('--play'); 133 heroVideo.find('iframe').css('opacity', '0'); 134 }); 135 136 heroVideo.find('.vol-on').click(function () { 137 player.setMuted(true); 138 heroVideo.removeClass('--vol-on'); 139 }); 140 141 heroVideo.find('.vol-off').click(function () { 142 player.setMuted(false); 143 heroVideo.addClass('--vol-on'); 144 }); 145 146 heroVideo.find('img.play').click(function () { 147 player.play(); 148 }); 149 150 player.play(); 151 } 152 }, 1000); 153 }); 154 }; 155 156 document.head.appendChild(script); 157 158 159 if ($('.instagram').length) { 160 $('.instagram').each(function () { 161 var url = $(this).data('link-json'); 162 var limit = $(this).data('limit'); 163 var theme = $(this).data('theme'); 164 var swiper = $(this).find('.swiper') 165 166 167 168 $.get(url, function (data) { 169 var accessTokenLong = $.parseJSON(data); 170 if (theme == 'slider') { 171 var template = '<div class="ig-feed__item swiper-slide"><a class="ig-feed__link" href="{{link}}" target="_blank" rel="nofollow noopener"></a><img class="ig-feed__img of-cover" src="{{image}}" alt="{{caption}}"></div>'; 172 } else { 173 var template = '<div class="ig-feed__item col-md-4 col-sm-6"><a class="ig-feed__link" href="{{link}}" target="_blank" rel="nofollow noopener"></a><img class="ig-feed__img of-cover" src="{{image}}" alt="{{caption}}"></div>' 174 } 175 176 177 178 let feed = new Instafeed({ 179 target: 'instagram__photos', 180 accessToken: accessTokenLong.Token, 181 limit: limit, 182 debug: false, 183 template: template, 184 after: function () { 185 if (theme == 'slider') { 186 var instagramSwiper = new Swiper('.instagram .swiper', { 187 slidesPerView: 1.1, 188 spaceBetween: 20, 189 loop: true, 190 191 breakpoints: { 192 576: { 193 slidesPerView: 1.5, 194 }, 195 768: { 196 slidesPerView: 2.2, 197 slidesOffsetAfter: 0, 198 }, 199 992: { 200 slidesPerView: 3.1, 201 slidesOffsetAfter: 0, 202 }, 203 1200: { 204 slidesPerView: 3, 205 slidesOffsetAfter: 0, 206 } 207 } 208 }); 209 } 210 } 211 }); 212 feed.run(); 213 }); 214 }) 215 } 216 }) 217})(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.