(r=>{var e={gallery:{productGallerySelector:".woocommerce-product-gallery",init:function(){r(document).on("wc-product-gallery-before-init",this.productGallerySelector,this.beforeProductGalleryInitHandler.bind(this)),r(document).on("wc-product-gallery-after-init",this.productGallerySelector,this.afterProductGalleryInitHandler.bind(this))},beforeProductGalleryInitHandler:function(e,i){r(i).parent().is(".gallery-quickview")&&(wc_single_product_params.flexslider.controlNav="thumbnails")},afterProductGalleryInitHandler:function(e,i){var t,a,l,i=r(i);i.parent().is(".gallery-default, .gallery-vertical, .gallery-quickview, .gallery-showcase, .gallery-full-width")&&(l=i.data("product_gallery"))&&l.$images&&((l=i.find(".flex-control-thumbs")).find("li").length<=5||(i.parent().is(".gallery-vertical, .gallery-showcase")?(l.addClass("swiper-wrapper botiga-slides"),l.find("li").addClass("swiper-slide"),l.wrapAll('
'),(a=i.find(".botiga-swiper")).append('
'),a.append('
'),t=new Swiper(a.get(0),{direction:"vertical",slidesPerView:6,spaceBetween:20,navigation:{nextEl:".botiga-swiper-button-next",prevEl:".botiga-swiper-button-prev"}}),r(window).on("resize botiga.resize",function(){var e=window.innerWidth||document.documentElement.clientWidth;e<991&&"horizontal"!==t.params.direction?(t.changeDirection("horizontal"),t.params.slidesPerView=5,t.update()):991'),a=i.find(".botiga-flexslider"),l=i.parent().is(".gallery-quickview")?85:95,a.flexslider({namespace:"botiga-flex-",selector:".botiga-slides > li",animation:"slide",controlNav:!1,animationLoop:!1,slideshow:!1,itemWidth:l,itemMargin:20,keyboard:!1,asNavFor:i.get(0)}),a=r(".botiga-flexslider .botiga-flex-next").text(),r(".botiga-flexslider .botiga-flex-next").text("").append(""+a+""),l=r(".botiga-flexslider .botiga-flex-prev").text(),r(".botiga-flexslider .botiga-flex-prev").text("").append(""+l+""))))}}};r(document).ready(function(){e.gallery.init()})})(jQuery);