'}for(let i=0;i'}if(imagesAmount>thumbColumns){document.querySelector(".prev-thumb").classList.add("slider-thumbs-arrows-active");document.querySelector(".next-thumb").classList.add("slider-thumbs-arrows-active")}document.querySelector(".next-thumb").addEventListener("click",function(){if(currentThumbsMove=1){currentThumbsMove--;document.querySelector(".slider-thumbs").style.transform="translateX(-"+currentThumbsMove*(100/sliderImages.length)+"%)"}});window.addEventListener("resize",function(){let winW=window.innerWidth;if(winW>1200&&thumbColumns!=8){thumbColumns=8;document.querySelector(".slider-thumbs").style.width=(imagesAmount/thumbColumns)*100+"%"}else if(winW<=1200&&winW>576&&thumbColumns!=6){thumbColumns=6;document.querySelector(".slider-thumbs").style.width=(imagesAmount/thumbColumns)*100+"%"}else if(winW<=576&&thumbColumns!=4){thumbColumns=4;document.querySelector(".slider-thumbs").style.width=(imagesAmount/thumbColumns)*100+"%"}})}function activationSlider(){document.querySelectorAll(".single-thumb")[0].classList.add("active-thumb");if(slidesAmount>0){document.querySelector(".prev-slide").classList.add("slider-control-active");document.querySelector(".next-slide").classList.add("slider-control-active");document.querySelector(".lightbox-prev").classList.add("lightbox-active");document.querySelector(".lightbox-next").classList.add("lightbox-active");document.querySelector(".slider-thumbs-container").classList.add("slider-thumbs-active")}}function setSlide(number,type){let element="";if(type==0){element=".offer-picture"}else{element=".lightbox-picture img"}changeActiveThumb(number);for(let i=0;islidesAmount-1){currentSlide=0}setSlide(currentSlide,0);if(type!=0){setSlide(currentSlide,1)}}else{if(currentSlide<0){currentSlide=slidesAmount-1}setSlide(currentSlide,0);if(type!=0){setSlide(currentSlide,1)}}}function openLightbox(element){openLightboxFlag=true;document.querySelector(".offer-slider-lightbox").classList.add("lightbox-active");document.querySelector(".lightbox-blurred-overlay").classList.add("lightbox-active");setTimeout(function(){document.querySelector(".offer-slider-lightbox").classList.add("lightbox-visible");document.querySelector(".lightbox-blurred-overlay").classList.add("lightbox-visible")},10)}function closeLightbox(){openLightboxFlag=false;document.querySelector(".offer-slider-lightbox").classList.remove("lightbox-visible");document.querySelector(".lightbox-blurred-overlay").classList.remove("lightbox-visible");setTimeout(function(){document.querySelector(".offer-slider-lightbox").classList.remove("lightbox-active");document.querySelector(".lightbox-blurred-overlay").classList.remove("lightbox-active")},250)}window.addEventListener("load",function(){setSliderControls();activationSlider()});window.addEventListener("keydown",function(event){if(openLightboxFlag){if(event.key=="ArrowRight"){moveSlide(1,1)}if(event.key=="ArrowLeft"){moveSlide(-1,1)}}});