1// Swiper 1 2jQuery(document).ready(function () { 3 if (jQuery('.js-swiper-container1 .swiper-slide').length > 1) { 4 jQuery('.swiper-button-next1').removeClass('d-none'); 5 jQuery('.swiper-button-prev1').removeClass('d-none'); 6 let legoSwiper1 = new Swiper('.js-swiper-container1', 7 Object.assign({ 8 autoplay: { 9 delay: 6000, 10 disableOnInteraction: false 11 }, 12 effect: 'fade', // slide, fade, cube, coverflow, flip 13 loop: true, 14 navigation: { 15 nextEl: '.swiper-button-next1', 16 prevEl: '.swiper-button-prev1', 17 }, 18 a11y: { 19 prevSlideMessage: currentTranslation.prev, 20 nextSlideMessage: currentTranslation.next, 21 }, 22 simulateTouch: false, 23 pagination: { 24 el: '.swiper-pagination', 25 dynamicBullets: true, 26 }, 27 preloadImages: false, 28 scrollbar: { 29 el: '.swiper-scrollbar', 30 hide: true, 31 }, 32 slidesPerView: 1, 33 speed: 1500, 34 }, 35 swiperOptions1 36 ) 37 ) 38 39 // Pozastavovánà swiperu 40 let isSwiperRunning = false; 41 let isSwiperPausedByButton = false; 42 let isSwiperResumedByButton = false; 43 let isSwiperPausedByMouseenter = false; 44 let isSwiperPausedByReducedMotion = false; 45 46 // Pokud animace bÄžÃ, zobrazà se tlaÄÃtko pro pozastavenà 47 if (legoSwiper1.autoplay.running) { 48 isSwiperRunning = true; 49 jQuery('.swiper-button-pause1').removeClass('d-none').addClass('icon-pause').attr('title', currentTranslation.pause).attr('aria-label', currentTranslation.pause); 50 51 // Zastavenà animace pokud má uživatel nastavený reduce motion 52 if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) { 53 legoSwiper1.autoplay.stop(); 54 isSwiperPausedByReducedMotion = true; 55 jQuery('.swiper-button-pause1').removeClass('icon-pause').addClass('icon-play').attr('title', currentTranslation.play).attr('aria-label', currentTranslation.play); 56 } 57 }; 58 59 // Zastavenà animace pÅi najetà myÅ¡i 60 jQuery(".js-swiper-container1").mouseenter(function() { 61 if (legoSwiper1.autoplay.running && !isSwiperPausedByReducedMotion && !isSwiperResumedByButton) { 62 legoSwiper1.autoplay.stop(); 63 isSwiperPausedByMouseenter = true; 64 jQuery('.swiper-button-pause1').addClass('swiper-paused'); 65 } 66 }); 67 jQuery(".js-swiper-container1").mouseleave(function() { 68 if (!legoSwiper1.autoplay.running && !isSwiperPausedByButton && !isSwiperPausedByReducedMotion && !isSwiperResumedByButton) { 69 legoSwiper1.autoplay.start(); 70 isSwiperPausedByMouseenter = false; 71 jQuery('.swiper-button-pause1').removeClass('swiper-paused') 72 } else if (isSwiperResumedByButton) { 73 isSwiperResumedByButton = false; 74 } 75 }); 76 77 // Pozastavenà animace po stisknutà tlaÄÃtka 78 jQuery('.swiper-button-pause1').on('click keydown', function (e) { 79 if (e.type === 'click' || e.key === 'Enter') { 80 if (legoSwiper1.autoplay.running || isSwiperPausedByMouseenter) { 81 legoSwiper1.autoplay.stop(); 82 isSwiperPausedByButton = true; 83 isSwiperPausedByMouseenter = false; 84 jQuery(this).removeClass('icon-pause').addClass('icon-play').attr('title', currentTranslation.play).attr('aria-label', currentTranslation.play); 85 jQuery('.swiper-button-pause1').removeClass('swiper-paused'); 86 } else if (!isSwiperPausedByMouseenter) { 87 legoSwiper1.autoplay.start(); 88 isSwiperPausedByButton = false;
89 isSwiperResumedByButton = true; 90 jQuery(this).removeClass('icon-play').addClass('icon-pause').attr('title', currentTranslation.pause).attr('aria-label', currentTranslation.pause); 91 jQuery('.swiper-button-pause1').removeClass('swiper-paused') 92 } 93 } 94 }); 95 } 96}); 97 98// Swiper 5 99jQuery(document).ready(function() { 100 let legoSwiper5 = new Swiper(".js-swiper-container5", { 101 autoplay: { 102 delay: 6000, 103 disableOnInteraction: false 104 }, 105 loop: true, 106 loopFillGroupWithBlank: true, 107 navigation: { 108 nextEl: ".swiper-button-next5", 109 prevEl: ".swiper-button-prev5", 110 }, 111 a11y: { 112 prevSlideMessage: currentTranslation.prev, 113 nextSlideMessage: currentTranslation.next, 114 }, 115 simulateTouch: false, 116 paginationClickable: true, 117 slidesPerGroup: 1, 118 speed: 1500, 119 breakpointsInverse: true, 120 breakpoints: { 121 320: { 122 slidesPerView: 1, 123 spaceBetween: 0, 124 }, 125 620: { 126 slidesPerView: 2, 127 spaceBetween: 10, 128 }, 129 992: { 130 slidesPerView: 3, 131 spaceBetween: 10, 132 }, 133 1200: { 134 slidesPerView: 4, 135 spaceBetween: 20, 136 }, 137 1440: { 138 slidesPerView: 5, 139 spaceBetween: 60, 140 }, 141 }, 142 }); 143 144 // Pozastavovánà swiperu 145 let isSwiperRunning = false; 146 let isSwiperPausedByButton = false; 147 let isSwiperResumedByButton = false; 148 let isSwiperPausedByMouseenter = false; 149 let isSwiperPausedByReducedMotion = false; 150 151 // Pokud animace bÄžÃ, zobrazà se tlaÄÃtko pro pozastavenà 152 if (legoSwiper5.autoplay.running) { 153 isSwiperRunning = true; 154 jQuery('.swiper-button-pause5').removeClass('d-none').addClass('icon-pause').attr('title', currentTranslation.pause).attr('aria-label', currentTranslation.pause); 155 156 // Zastavenà animace pokud má uživatel nastavený reduce motion 157 if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) { 158 legoSwiper5.autoplay.stop(); 159 isSwiperPausedByReducedMotion = true; 160 jQuery('.swiper-button-pause5').removeClass('icon-pause').addClass('icon-play').attr('title', currentTranslation.play).attr('aria-label', currentTranslation.play); 161 } 162 }; 163 164 // Zastavenà animace pÅi najetà myÅ¡i 165 jQuery(".js-swiper-container5").mouseenter(function() { 166 if (legoSwiper5.autoplay.running && !isSwiperPausedByReducedMotion && !isSwiperResumedByButton) { 167 legoSwiper5.autoplay.stop(); 168 isSwiperPausedByMouseenter = true; 169 jQuery('.swiper-button-pause5').addClass('swiper-paused'); 170 } 171 }); 172 jQuery(".js-swiper-container5").mouseleave(function() { 173 if (!legoSwiper5.autoplay.running && !isSwiperPausedByButton && !isSwiperPausedByReducedMotion && !isSwiperResumedByButton) { 174 legoSwiper5.autoplay.start(); 175 isSwiperPausedByMouseenter = false; 176 jQuery('.swiper-button-pause5').removeClass('swiper-paused') 177 } else if (isSwiperResumedByButton) { 178 isSwiperResumedByButton = false; 179 } 180 }); 181 182 // Pozastavenà animace po stisknutà tlaÄÃtka 183 jQuery('.swiper-button-pause5').on('click keydown', function (e) { 184 if (e.type === 'click' || e.key === 'Enter') { 185 if (legoSwiper5.autoplay.running || isSwiperPausedByMouseenter) { 186 legoSwiper5.autoplay.stop(); 187 isSwiperPausedByButton = true; 188 isSwiperPausedByMouseenter = false; 189 jQuery(this).removeClass('icon-pause').addClass('icon-play').attr('title', currentTranslation.play).attr('aria-label', currentTranslation.play); 190 jQuery('.swiper-button-pause5').removeClass('swiper-paused'); 191 } else if (!isSwiperPausedByMouseenter) { 192 legoSwiper5.autoplay.start(); 193 isSwiperPausedByButton = false; 194 isSwiperResumedByButton = true; 195 jQuery(this).removeClass('icon-play').addClass('icon-pause').attr('title', currentTranslation.pause).attr('aria-label', currentTranslation.pause); 196 jQuery('.swiper-button-pause5').removeClass('swiper-paused') 197 } 198 } 199 }); 200});
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.