$(document).ready(function() {
    $('.back-link a').click(function(e) {
        history.back();
    });
    setTimeout(function() {
        $('#loader').fadeOut('', function() {
            $('#content').fadeIn();
        });
    }, 500);
    $.each($(".bg-home-video") ,function (i,v) {
        v.play(); 
    });    
    
    $("#next-btn").on("click", function(){
        $("#section1").toggleClass("deactive");
        $("#section2").toggleClass("active");
    });

    var swiper = new Swiper(".swiper", {
    loop: true,
    autoplay: {
      delay: 5000, // 5-second delay between slides
      disableOnInteraction: false, // keeps autoplay after clicks/drags
    },
    pagination: {
      el: ".swiper-pagination",
      clickable: true,
      // type: "",
    },
    navigation: {
      nextEl: ".swiper-button-next",
      prevEl: ".swiper-button-prev",
    },
  });
    // function updateLink() {
    //     if ($(window).width() <= 768) { // Mobile screen ke liye
    //         $("#toggle-link-1").attr("href", "dawlance-dispenser/product-detail-mobile.html?dispenser=0");
    //     } else { // Desktop screen ke liye
    //         $("#toggle-link-1").attr("href", "dawlance-dispenser/product-detail.html?dispenser=0");
    //     }
    // }

    // // Page load par link update karein
    // updateLink();

    // Screen resize hone par bhi link update karein
    // $(window).resize(function () {
    //     updateLink();
    // });
    // Video autoplay


    

});
