"use strict";!function(r){var e=e||{};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=r(i);!l.parent().is(".gallery-default, .gallery-vertical, .gallery-quickview, .gallery-showcase, .gallery-full-width")||(i=l.data("product_gallery"))&&i.$images&&((i=l.find(".flex-control-thumbs")).find("li").length<=5||(l.parent().is(".gallery-vertical, .gallery-showcase")?(i.addClass("swiper-wrapper botiga-slides"),i.find("li").addClass("swiper-slide"),i.wrapAll('
'),(a=l.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=l.find(".botiga-flexslider"),i=l.parent().is(".gallery-quickview")?85:95,a.flexslider({namespace:"botiga-flex-",selector:".botiga-slides > li",animation:"slide",controlNav:!1,animationLoop:!1,slideshow:!1,itemWidth:i,itemMargin:20,keyboard:!1,asNavFor:l.get(0)}),l=r(".botiga-flexslider .botiga-flex-next").text(),r(".botiga-flexslider .botiga-flex-next").text("").append(""+l+""),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);