AOS.init(); //gsap.registerPlugin(ScrollTrigger); // gsap.to(".parallex_bg", { // y: "-20%", // ease: "none", // scrollTrigger: { // trigger: ".sect2", // start: "top center", // end: "bottom center", // scrub: 0.5, // markers: false // } // }); $(document).ready(function () { // var kv_timer = 10000; // var kvswiper = new Swiper(".kvSwiper", { // slidesPerView: 1, // spaceBetween: 0, // loop: true, // pagination: { // el: ".kv_pagination", // clickable: true // }, // autoplay: { // delay: kv_timer, // disableOnInteraction: false // }, // on: { // init: function() { // $('.kvSwiper .swiper-pagination-bullet').each(function(){ // $(this).css({ // '--timer': kv_timer // }); // }); // } // } // }); var ai_features_swiper = new Swiper(".ai_features_Swiper", { slidesPerView: 'auto', centeredSlides: true, spaceBetween: 200, autoHeight: true, loop: true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, autoplay: { delay: 15000, disableOnInteraction: false } }); // Clone slides before initializing the swiper // This helps with creating a smoother infinite loop effect // var crossSwiperContainer = $('.cross_Swiper .swiper-wrapper'); // if (crossSwiperContainer) { // var slides = crossSwiperContainer.find('.swiper-slide'); // if (slides.length > 0) { // // Clone each slide and append to the wrapper // slides.each(function() { // var clone = $(this).clone(true); // crossSwiperContainer.append(clone); // }); // } // } // var cross_wrapper = $('.cross_Swiper .swiper-wrapper'); // var cross_slides = cross_wrapper.find('.swiper-slide'); // if (cross_slides.length > 0) { // cross_slides.clone(true).appendTo(cross_wrapper); // } var cross_swiper = new Swiper(".cross_Swiper", { slidesPerView: 1.25, spaceBetween: 55, loop: true, loopedSlides: 5, centeredSlides: true, autoplay: { delay: 15000, disableOnInteraction: false }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, breakpoints: { 768: { slidesPerView: 'auto', spaceBetween: 30 }, // 992: { // slidesPerView: 'auto', // spaceBetween: 40 // }, 992: { slidesPerView: 'auto', spaceBetween: 60 }, } }); if ($(window).width() > 768){ cross_swiper.slideTo(3); } // $('.vdo_cta').on('click', function() { // var vdo_thumb = $(this).data('vdo-thumb'); // var vdo_path = $(this).data('vdo-path'); // $('.vdo_contain video').attr('src', vdo_path); // $('.vdo_contain video').attr('poster', vdo_thumb); // $('.vdo_contain video').trigger('play'); // $('.vdo_cta.onn').removeClass('onn'); // $(this).addClass('onn'); // }); // Back to top button show/hide on scroll updateBackToTopPosition(); $(window).resize(function(){ updateBackToTopPosition(); }); function updateBackToTopPosition(){ if($(window).width() < 768){ $('.back-to-top').css('bottom', 'auto'); $('.back-to-top').css('top', (($(window).outerHeight() - $('.floating_offer').outerHeight()) - $('.back-to-top').outerHeight() - 20)); }else{ $('.back-to-top').css('bottom', '20px'); $('.back-to-top').css('top', 'auto'); } } $(window).scroll(function() { if ($(this).scrollTop() > 80) { $('.back-to-top').fadeIn(); } else { $('.back-to-top').fadeOut(); } }); $('.remarks.trig').on('click', function () { $(this).toggleClass('off'); $(this).next('.remarksEXT').find('.remarks').slideToggle(); }); // Hide back to top button initially $('.back-to-top').hide(); // Update swipers on window resize $(window).on('resize', function() { setTimeout(function() { //kvswiper.update(); ai_features_swiper.update(); }, 1000); }); });