jQuery(document).ready(function ($) {
    const owlCarousel = document.querySelectorAll('[data-carousel]');
    const responsiveOwlCarousel = document.querySelectorAll('[data-responsive-carousel]');
    // When Carousel exists
    if (owlCarousel) {
        $(owlCarousel).each((indx, el) => {
            var options = $(el).data('options');
            $(el).owlCarousel(options);
        })
    }
    var width = window.innerWidth;
    if (width < 771) {
        // Responsive Carousel
        if (responsiveOwlCarousel) {
            $(responsiveOwlCarousel).each((indx, el) => {
                el.classList.add('owl-carousel');
                var options = $(el).data('options');
                $(el).owlCarousel(options);
            })
        }
    }
});