$(document).ready(function () {
    var swiper = new Swiper('.swiper-container-slider', {
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
        pagination: {
            el: '.swiper-pagination',
            dynamicBullets: true,
        },
        autoplay: {
            delay: 4000,
            disableOnInteraction: false,
        },
    });
    $('.swiper-container-slider').on('mouseenter', function(e){
        swiper.autoplay.stop();
    });
    $('.swiper-container-slider').on('mouseleave', function(e){
        swiper.autoplay.start();
    });
    var swiper2 = new Swiper('.swiper-container-deal', {
        spaceBetween: 10,
        slidesPerView: 7,
        autoplay: {
            delay: 500000,
            disableOnInteraction: false,
        },
        breakpoints: {
            1366: {
                slidesPerView: 6,
                spaceBetween: 10,
            },
            1280: {
                slidesPerView: 5,
                spaceBetween: 10,
            },
            1024: {
                slidesPerView: 5,
                spaceBetween: 0,
            },
            768: {
                slidesPerView: 4,
                spaceBetween: 5,
            },
            640: {
                slidesPerView: 2,
                spaceBetween: 10,
            },
            576: {
                slidesPerView: 2,
                spaceBetween: 0,
            }
        }
    });
    $('.swiper-container-deal').on('mouseenter', function(e){
        swiper2.autoplay.stop();
    });
    $('.swiper-container-deal').on('mouseleave', function(e){
        swiper2.autoplay.start();
    });
    var swiper3 = new Swiper('.swiper-container-resfb', {
        slidesPerView: 1,
        spaceBetween: 30,
        centeredSlides: true,
        autoplay: {
            delay: 3000,
            disableOnInteraction: false,
        },
    });
    var swiperCat = new Swiper('.swiper-container-category', {
        slidesPerView: 'auto',
        spaceBetween: 10
    });
});