if (!window.hasOwnProperty('ribbon_swipers')) {
    window.ribbon_swipers = [];
}

$(document).ready(function(){

    $.each($(".ribbon-swiper-container"), function (i, n) {

        var $swiper = $(n);

        window.ribbon_swipers.push( new Swiper ($swiper, {
            // Optional parameters
            direction: 'horizontal',
            slidesPerView: 3,
            spaceBetween: 15,
            slidesPerGroup: 1,
            loop: true,
            //loopFillGroupWithBlank: true,
            autoplay: {
                delay: 5500,
            },
            speed: 1200,
            observer: true,
            observeParents: true,

            // Responsive breakpoints
            breakpoints: {
                // when window width is <= 320px
                320: {
                    slidesPerView: 1,
                    spaceBetween: 0,
                    slidesPerGroup: 1,
                    loop: true,
                    autoplay: {
                        delay: 5500
                    },
                    speed: 1200,
                },
                // when window width is <= 480px
                480: {
                    slidesPerView: 1,
                    spaceBetween: 0,
                    slidesPerGroup: 1,
                    loop: true,
                    autoplay: {
                        delay: 5500
                    },
                    speed: 1200
                },
                // when window width is <= 640px
                640: {
                    slidesPerView: 2,
                    spaceBetween: 10,
                    slidesPerGroup: 1,
                    loop: true,
                    autoplay: {
                        delay: 5500
                    },
                    speed: 1200
                }
            },


            /*effect: 'coverflow',
            grabCursor: true,
            centeredSlides: true,

            coverflowEffect: {
                rotate: 50,
                stretch: 0,
                depth: 100,
                modifier: 1,
                slideShadows : true,
            },*/


            pagination: {
                el: '.swiper-pagination',
                clickable: true,
            },

            // Navigation arrows
            navigation: {
                nextEl: '.swiper-button-next',
                prevEl: '.swiper-button-prev',
            },

            // And if we need scrollbar
            /*scrollbar: {
             el: '.swiper-scrollbar',
             },*/

            on: {
                init: function () {
                    /* do something */
                    this.$el.removeClass('hidden');
                    this.update();
                },
            }

        }));


    });




});