$(document).ready(function(){
    
    // modal popup starts
    setTimeout(function(){
        $('#myModal').modal('show');
    }, 1000);
    setTimeout(function() {
        $('#myModal').modal('hide');
    }, 20000);
    // modal popup ends
    
    // video gallery/lightGallery starts
    $('#video-gallery1').lightGallery();
    $('#watch-video').lightGallery();
    // video gallery/lightGallery ends
    
    // write review slide toggle starts
    $(".review-title").click(function(){
        $(".write-review").slideToggle();
    });
    // write review slide toggle starts
    
    // sticky package tab js starts
    $(window).scroll(function(){
        if($(window).scrollTop() > 81){
            $('.btm-header').addClass('active');
        }else{
            $('.btm-header').removeClass('active');
        }
    });
    // sticky package tab js ends
    
    // sticky package tab js starts
    $(window).scroll(function(){
        if($(window).scrollTop() > 145){
            $('.pkg-tab').addClass('active');
        }else{
            $('.pkg-tab').removeClass('active');
        }
    });
    // sticky package tab js ends
    
    //sidebar content starts 
    $('.toggle-icon').click(function(){
        $(this).toggleClass('toggle-active');
        if($(this).hasClass('toggle-active')){
            $('.h-sidebar').addClass('active');
        }
        else{
            $('.h-sidebar').removeClass('active');
        }
    })
    $('.close-btn').click(function(){
        $('.h-sidebar').removeClass('active');
        $('.toggle-icon').removeClass('toggle-active');
    })
    //sidebar content ends 
    
    // scroll top js starts
    $(window).scroll(function(){
        if($(window).scrollTop() > 500){
            $('#scroll-top').fadeIn();
        }else{
            $('#scroll-top').fadeOut();
        }
    });
    // scroll top js ends
    // hero slider starts
    var swiper = new Swiper(".heroSlider", {
        slidesPerView: 1,
        spaceBetween: 0,
        navigation: {
            nextEl: ".swiper-button-next",
            prevEl: ".swiper-button-prev",
        },
        speed: 1500,
        autoplay: {
            delay: 4000,
            disableOnInteraction: false,
        },
    });
    // hero slider ends
    
    // category slider starts
    var swiper = new Swiper(".categorySlider", {
        slidesPerView: 2,
        slidesPerGroup: 2,
        spaceBetween: 18,
        pagination: {
            el: ".swiper-pagination",
            clickable: true,
        },
        speed: 1000,
        autoplay: {
            delay: 5000,
            disableOnInteraction: false,
        },
        breakpoints: {
            991: {
                slidesPerView: 5,
                spaceBetween: 24,
                
            },
            767: {
                slidesPerView: 4,
                spaceBetween: 24,
            },
            575: {
                slidesPerView: 3,
                spaceBetween: 24,
            },
        },
    });
    // category slider ends
    
    // product slider starts
    var swiper = new Swiper(".productSlider", {
        slidesPerView: 2,
        slidesPerGroup: 2,
        spaceBetween: 0,
        pagination: {
            el: ".swiper-pagination",
            clickable: true,
        },
        speed: 1000,
        autoplay: {
            delay: 5000,
            disableOnInteraction: false,
        },
        breakpoints: {
            991: {
                slidesPerView: 5,
                spaceBetween: 24,
            },
            767: {
                slidesPerView: 4,
                spaceBetween: 24,
            },
            575: {
                slidesPerView: 3,
                spaceBetween: 24,
            },
        },
    });
    // product slider ends
    
    // testimonial slider starts
    var swiper = new Swiper(".testimonialSlider", {
        slidesPerView: 1,
        spaceBetween: 24,
        pagination: {
            el: ".swiper-pagination",
            clickable: true,
        },
        navigation: {
            nextEl: ".swiper-button-next",
            prevEl: ".swiper-button-prev",
        },
        speed: 1200,
        autoplay: {
            delay: 6000,
            disableOnInteraction: false,
        },
        breakpoints: {
            991: {
                slidesPerView: 3,
            },
            575: {
                slidesPerView: 2,
            },
        },
    });
    // testimonial slider end
});




