Hari Kumari Arts

Great things are on the horizon

Something big is brewing! Our store is in the works and will be launching soon!

Scroll to Top
(function () { const selector = '.swiper-wrapper'; function adjustCarousel() { if (window.innerWidth > 767) return; const el = document.querySelector(selector); if (!el || !el.swiper) return; const swiper = el.swiper; if (swiper.destroyed) return; // Show 1 full slide + half of the next swiper.params.slidesPerView = 1.5; swiper.params.slidesPerGroup = 1; swiper.params.centeredSlides = false; swiper.params.centeredSlidesBounds = false; swiper.params.loop = false; swiper.params.rewind = false; swiper.update(); // Allow the final product to align to the left const firstSlideWidth = swiper.slidesSizesGrid[0] || 0; swiper.params.slidesOffsetAfter = Math.max( 0, swiper.width - firstSlideWidth ); swiper.update(); // Keep the current slide within valid limits const lastIndex = swiper.slides.length - 1; swiper.slideTo( Math.min(swiper.activeIndex, lastIndex), 0 ); } function start() { let attempts = 0; const timer = setInterval(function () { const el = document.querySelector(selector); if (el && el.swiper) { clearInterval(timer); const swiper = el.swiper; adjustCarousel(); swiper.on('resize', adjustCarousel); swiper.on('breakpoint', adjustCarousel); } if (++attempts > 30) { clearInterval(timer); } }, 300); } document.addEventListener('DOMContentLoaded', start); window.addEventListener('load', start); window.addEventListener('resize', function () { setTimeout(adjustCarousel, 200); }); // Update when Elementor tabs are changed document.addEventListener('click', function (e) { if (e.target.closest('.e-n-tab-title')) { setTimeout(adjustCarousel, 400); } }); })();