(function ($) {

    "use strict";

    $(document).ready(function () {

        var woo_product_slider = $('.wpe__slider');

        woo_product_slider.each(function () {

            var item_number         =       $(this).data("number"),
                nav                 =       $(this).data("nav"),
                autoplay            =       $(this).data("autoplay"),
                autoplayspeed       =       $(this).data("autoplayspeed"),
                loop                =       $(this).data("loop"),
                dots                =       $(this).data("dots"),
                stagepadding        =       $(this).data("stagepadding");

            $(this).owlCarousel({
                nav: nav,
                navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
                dots: dots,
                slideSpeed: 1000,
                autoplay: autoplay,
                autoplaySpeed: autoplayspeed,
                loop: loop,
                paginationSpeed: 1000,
                autoplayHoverPause: true,
                margin: 25,
                responsive: {
                    0: {
                        items: 1,
                        stagePadding: 0,
                    },
                    600: {
                        items: 2,
                        stagePadding: 0,
                    },
                    1000: {
                        items: item_number,
                        stagePadding: stagepadding,
                    }
                }
            })
        })
    });

})(jQuery);
