if (jQuery( '#inventory-detail' ).length) {
    let swiper_per_view = new Swiper('.swiper-per-view', {
        // Optional parameters
        //direction: 'horizontal',
        //loop: true,
         slidesPerView: 4,
        // spaceBetween: 10,
        pagination: {
            el: ".swiper-pagination",
            clickable: true,
        },
        // Navigation arrows
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
        breakpoints: {
            320: {
                slidesPerView: 1,
            },
            480: {
                slidesPerView: 2,
            },
            640: {
                slidesPerView: 4,
            }
        }
    });

    let swiper_thumbs = new Swiper(".swiper-thumbs", {
        spaceBetween: 10,
        slidesPerView: 4,
        freeMode: true,
        watchSlidesProgress: true,
    });
    let swiper_main = new Swiper(".swiper-main", {
        spaceBetween: 10,
        navigation: {
            nextEl: ".swiper-button-next",
            prevEl: ".swiper-button-prev",
        },
        thumbs: {
            swiper: swiper_per_view,
        },
    });
}