jQuery(document).ready(function(a){function f(b,d){resize_width=a(".swiper-slide-wrapper img.yit-image").width();resize_height=a(".swiper-slide-wrapper img.yit-image").height();a.browser.opera||a.browser.safari?a.browser.opera&&(resize_width-=b):(resize_height-=d,resize_width-=b);a(".swiper-slide-wrapper div.opacity").css("height",resize_height+"px");a(".swiper-slide-wrapper div.opacity").css("width",resize_width+"px")}a(".swiper-products").each(function(){var b=parseInt(a(".swiper-container .swiper-slide .swiper-slide-image .opacity").css("borderLeftWidth").replace("px",
"")),d=parseInt(a(".swiper-container .swiper-slide .swiper-slide-image .opacity").css("borderRightWidth").replace("px","")),g=b+d,b=parseInt(a(".swiper-container .swiper-slide .swiper-slide-image .opacity").css("borderTopWidth").replace("px","")),d=parseInt(a(".swiper-container .swiper-slide .swiper-slide-image .opacity").css("borderBottomWidth").replace("px","")),h=b+d,b=a(window).width(),c=a(this),e=c.data("items"),k=c.data("overflow"),d=c.data("autoplay");swiper=c.parent().swiper({mode:"horizontal",
autoplay:d,loop:!0,loopAdditionalSlides:2,slidesPerView:e,calculateHeight:!0,grabCursor:!0,autoResize:!0,onInit:function(){f(g,h)},onFirstInit:function(){a.browser.msie&&f(g,h)}});767<b&&c.parent().css("overflow",k);480<b&&768>b&&2!=e?(swiper.params.slidesPerView=2,swiper.reInit()):480>=b&&1!=e&&(swiper.params.slidesPerView=1,swiper.reInit());a('<div class="opacity left" />').appendTo(c.parent()).css("opacity",0.7);a('<div class="opacity right" />').appendTo(c.parent()).css("opacity",0.7);a(window).on("resize",
function(){767<a(window).width()?(swiper.params.slidesPerView=e,c.parent().css("overflow",k)):(480<a(window).width()&&768>a(window).width()?2!=e&&(swiper.params.slidesPerView=2):1!=e&&(swiper.params.slidesPerView=1),c.parent().css("overflow","hidden"))})})});