document.addEventListener('DOMContentLoaded', function () {
    document.querySelectorAll('.apartament-gallery-swiper').forEach(function (el) {
        new Swiper(el, {
            slidesPerView: 1,
            spaceBetween: 10,
            loop: true,
            zoom: false,
            navigation: {
                nextEl: el.parentElement.querySelector('.swiper-button-next'),
                prevEl: el.parentElement.querySelector('.swiper-button-prev'),
            },
        });
    });

    Fancybox.bind('[data-fancybox]', {
        animated: true,
        showClass: 'fancybox-fadeIn',
        hideClass: 'fancybox-fadeOut',
    });
});
