// source --> https://mabfortuna.com.br/wp-content/plugins/et-core-plugin/packages/st-woo-swatches/public/js/frontend.min.js 
var $=jQuery.noConflict(),ST_WC_FRONT_SWATCH=ST_WC_FRONT_SWATCH||{},ST_WC_Chosen_attribute="",ST_WC_Show_selected_title=!1,ST_WC_Triggered_variations=[];!function(m){"use strict";ST_WC_FRONT_SWATCH.onSelect=function(){m("body").on("click","ul.st-swatch-preview span.st-custom-attribute",function(){var t,a,e;m(this).parents().is(".swiper-entry, .products-loop, .et-quick-view-wrapper, .etheme-product-grid-item, .etheme-product-list-item")||(t=m(this).closest("[data-attribute]").data("attribute"),t=m("select#"+t),a=m(this).data("value"),e=m(this).parent("li"),null==a||t.find('option[value="'+a+'"]').length?(e.hasClass("selected")?(e.removeClass("selected"),t.val(" "),1==sten_wc_params.is_singular_product&&(sten_wc_params.is_customize_preview&&e.css({"border-color":e.data("border-color")}),ST_WC_Show_selected_title)&&e.parents("tr").find(" > th label").attr("data-swatch-name",null)):(e.addClass("selected").siblings().removeClass("selected"),t.val(a),1==sten_wc_params.is_singular_product&&(sten_wc_params.is_customize_preview&&(e.removeAttr("style"),e.siblings().css({"border-color":e.data("border-color")}),e.css({"border-color":e.data("active-border-color")})),ST_WC_Show_selected_title)&&e.parents("tr").find(" > th label").attr("data-swatch-name",m(this).data("name")),ST_WC_Chosen_attribute=m(this).closest("[data-attribute]").data("attribute")),t.trigger("change")):(t.val(" ").trigger("change"),e.siblings().removeClass("selected"),window.alert(sten_wc_params.i18n_no_matching_variations_text)))}),m(document).on("click",".etheme-sticky-cart .st-custom-attribute",function(){var t=m(document).find(".et_product-block .woocommerce-variation-add-to-cart");(t.hasClass("disabled")||t.hasClass("woocommerce-variation-add-to-cart-disabled"))&&m(document).find(".etheme-sticky-cart .single_add_to_cart_button").addClass("disabled")})},ST_WC_FRONT_SWATCH.singleProductPrimaryAttribute=function(){m(document).find(".variations_form.cart").on("reset_data",function(){var i=m(this);etConfig.woocommerceSettings.primary_attribute&&"et_none"!=etConfig.woocommerceSettings.primary_attribute&&ST_WC_Chosen_attribute=="pa_"+etConfig.woocommerceSettings.primary_attribute&&(ST_WC_Chosen_attribute="",setTimeout(function(){var t,a=ST_WC_FRONT_SWATCH.productLoop.getChosenAttributes(i),e=a.data;a.count&&a.chosenCount&&a.count!=a.chosenCount&&(a=m.parseJSON(i.attr("data-product_variations")),a=ST_WC_FRONT_SWATCH.productLoop.findMatchingVariations(a,e).shift(),e=m(".woocommerce-main-image").first(),t=m(".thumbnail-item a").first(),e.find("img").attr("data-o_src")||e.find("img").attr("data-o_data-src")||(e.attr("data-o_href",e.attr("href")),e.find("img").attr({"data-o_src":e.find("img").attr("src"),"data-o_data-src":e.find("img").attr("src"),"data-o_data-large_image":e.find("img").attr("data-large_image")})),e.attr("href",a.image.full_src),e.find("img").attr({src:a.image.src,"data-src":a.image.src,"data-large_image":a.image.full_src,srcset:""}),e.parent().find("img.zoomImg").attr("src",e.find("img").attr("data-large_image")),t.attr("href",a.image.full_src).attr("data-large",a.image.full_src).attr("data-small",a.image.gallery_thumbnail_src),t.find("img").attr("src",a.image.gallery_thumbnail_src).attr("srcset",a.image.gallery_thumbnail_src))},50))})},ST_WC_FRONT_SWATCH.onSelectUpdateAttribute=function(){m("body.single-product form.variations_form").on("woocommerce_update_variation_values",function(){m(this).find("ul.st-swatch-preview").each(function(){var t=m(this).data("attribute"),t=document.getElementById(t),a=m(t).find("option"),e=m(t).find("option").eq(1),i=m(this).find("li"),r=m(t).find("option:selected"),s=[],o="";a.each(function(){""!==m(this).val()&&(s.push(m(this).val()),o=(r||e).val())}),i.each(function(){var t=this,a=m(t).find("span.st-custom-attribute").attr("data-value");m(t).removeClass("selected sten-li-disabled").addClass("sten-li-disabled"),-1!==s.indexOf(a.toString())&&(m(t).removeClass("sten-li-disabled"),a.toString()==o)&&m(t).addClass("selected")})})})},ST_WC_FRONT_SWATCH.onClear=function(){m("body.single-product").on("click","a.reset_variations",function(){var t=m(this).closest("form.variations_form").find("ul.st-swatch-preview li.selected");t.removeClass("selected"),1==sten_wc_params.is_singular_product&&(sten_wc_params.is_customize_preview&&t.css({"border-color":t.data("border-color")}),ST_WC_Show_selected_title)&&m(this).closest("form.variations_form").find("label[data-swatch-name]").attr("data-swatch-name",null)})},ST_WC_FRONT_SWATCH.productLoop={init:function(){ST_WC_FRONT_SWATCH.productLoop.itemSwatches(),ST_WC_FRONT_SWATCH.productLoop.addToCart(),ST_WC_FRONT_SWATCH.productLoop.showMoreAttr()},itemSwatches:function(){m("div.st-swatch-in-loop").each(function(){var i=m(this),t=i.find("span.st-custom-attribute:not(.sten-disabled)"),e=i.find("a.sten-reset-loop-variation, .et-delete"),r=i.closest(".product-type-variable"),s=m.parseJSON(i.attr("data-product_variations")),a=i.find("ul.has-default-attribute");r.find("a.add_to_cart_button").addClass("et-st-disabled"),m(".st-swatch-btn-ready").removeClass("et-st-disabled"),ST_WC_FRONT_SWATCH.productLoop.updateAttributes(i,s),a.each(function(){var t=m(this).parent("div.st-swatch-in-loop").find("a.sten-reset-loop-variation"),a=(t.show(),ST_WC_FRONT_SWATCH.productLoop.getChosenAttributes(i)),e=a.data;a.count===a.chosenCount?(ST_WC_FRONT_SWATCH.productLoop.updateAttributes(i,s),(a=ST_WC_FRONT_SWATCH.productLoop.findMatchingVariations(s,e).shift())?ST_WC_FRONT_SWATCH.productLoop.foundVariation(r,i,a):t.trigger("click")):ST_WC_FRONT_SWATCH.productLoop.updateAttributes(i,s)}),t.on("click",function(){var t=m(this),a=t.parent("li");if(t.hasClass("sten-disabled"))return!1;r.find("span.st-custom-attribute").removeClass("sten-disabled sten-enabled"),r.find("span.st-custom-attribute").parent("li").removeClass("sten-li-disabled sten-li-enabled"),a.hasClass("selected")&&sten_wc_params.is_customize_preview&&a.css({"border-color":a.data("border-color")}),a.hasClass("selected")||(a.addClass("selected").siblings().removeClass("selected"),ST_WC_Show_selected_title&&t.parents().is(".et-quick-view-wrapper")&&a.parents(".st-swatch-in-loop").find(".et_attribute-name[data-for="+t.parents(".et_st-default-holder").attr("data-et-holder")+"]").attr("data-swatch-name",t.attr("data-name")),sten_wc_params.is_customize_preview&&(a.removeAttr("style"),a.siblings().css({"border-color":a.data("border-color")}),a.css({"border-color":a.data("active-border-color")})),e.slideDown());var t=ST_WC_FRONT_SWATCH.productLoop.getChosenAttributes(i),a=t.data;t.count===t.chosenCount?(ST_WC_FRONT_SWATCH.productLoop.updateAttributes(i,s),(t=ST_WC_FRONT_SWATCH.productLoop.findMatchingVariations(s,a).shift())?ST_WC_FRONT_SWATCH.productLoop.foundVariation(r,i,t):e.trigger("click")):(etConfig.woocommerceSettings.primary_attribute&&"et_none"!=etConfig.woocommerceSettings.primary_attribute&&m(this).closest("[data-attribute]").data("attribute")=="pa_"+etConfig.woocommerceSettings.primary_attribute&&(t=ST_WC_FRONT_SWATCH.productLoop.findMatchingVariations(s,a).shift(),ST_WC_FRONT_SWATCH.productLoop.variationsImageUpdate(r,t)),ST_WC_FRONT_SWATCH.productLoop.updateAttributes(i,s))}),e.on("click",function(){i.removeAttr("data-variation_id"),sten_wc_params.is_customize_preview&&(t=i.find("ul.st-swatch-preview li.selected")).css({"border-color":t.data("border-color")}),i.find("ul.st-swatch-preview li").removeClass("selected sten-li-disabled sten-li-enabled"),i.find("ul.st-swatch-preview span").removeClass("sten-disabled sten-enabled");var t=r.find("a.add_to_cart_button");let a=t;r.is(".etheme-product-grid-item, .etheme-product-list-item")&&(a=r.find(".st-swatch-popup").length&&!r.find(".st-swatch-popup .quantity-wrapper").length?r.find(".st-swatch-in-loop a.add_to_cart_button"):r.find(".etheme-product-grid-button .button-text, .etheme-product-list-button .button-text")),t.addClass("et-st-disabled").removeClass("st-swatch-btn-ready st-swatch-btn-readmore st-swatch-btn-text-changed added loading").attr("aria-label",sten_wc_params.select_options_btn_text+" "+sten_wc_params.read_more_for_btn_text+' "'+t.attr("data-product_name")+'"'),a.text(sten_wc_params.select_options_btn_text),r.find("a.added_to_cart").remove();var t=r.find("span.price").not(".price-cloned"),e=r.find(".price-cloned");e.length&&(t.html(e.html()),e.remove()),etConfig.woocommerceSettings.wishlist_for_variations&&i.trigger("reset_data"),s=m.parseJSON(i.attr("data-product_variations")),ST_WC_FRONT_SWATCH.productLoop.updateAttributes(i,s),ST_WC_FRONT_SWATCH.productLoop.variationsImageUpdate(r,!1),ST_WC_FRONT_SWATCH.productLoop.variationsCountdownUpdate(r,!1),ST_WC_FRONT_SWATCH.productLoop.variationsLoopQty(r,!1),m(this).parents().is(".et-quick-view-wrapper")&&(m(this).parents(".et-quick-view-wrapper").find(".price:not(.price_cloned)").remove(),m(this).parents(".et-quick-view-wrapper").find(".price_cloned").removeClass("price_cloned").attr("style",null),ST_WC_Show_selected_title)&&m(this).parents(".et-quick-view-wrapper").find(".et_attribute-name[data-swatch-name]").attr("data-swatch-name",null),m(this).slideUp()})})},getChosenAttributes:function(t){var e={},i=0,r=0;return t.find("ul.st-swatch-preview").each(function(){var t="attribute_"+m(this).data("attribute"),a=m(this).find("li.selected span.st-custom-attribute").attr("data-value")||"";0<(a=a.toString()).length&&r++,i++,e[t]=a}),{count:i,chosenCount:r,data:e}},updateAttributes:function(t,l){var p,u=ST_WC_FRONT_SWATCH.productLoop.getChosenAttributes(t).data;t.find("ul.st-swatch-preview").each(function(t,a){var e,i=m(a),r="attribute_"+i.data("attribute"),a=i.find("li.selected span.st-custom-attribute").data("value"),s=!0,o=m.extend(!0,{},u),n=(o[r]="",ST_WC_FRONT_SWATCH.productLoop.findMatchingVariations(l,o));for(e in n)if(void 0!==n[e]){var d,c,_=n[e].attributes;for(d in _)_.hasOwnProperty(d)&&(c=_[d],d===r)&&(n[e].variation_is_active,(c?i.find('span.st-custom-attribute[data-value="'+c+'"]'):i.find("span.st-custom-attribute")).addClass("sten-enabled"))}p=i.find("span.st-custom-attribute.sten-enabled").length,!a||0!==p&&0!==i.find('span.st-custom-attribute.sten-enabled[data-value="'+ST_WC_FRONT_SWATCH.productLoop.addSlashes(a)+'"]').length||(s=!1),i.find("span.st-custom-attribute:not(.sten-enabled)").addClass("sten-disabled"),i.find("span.st-custom-attribute:not(.sten-enabled)").parent("li").addClass("sten-li-disabled"),a&&s||i.find("li.selected").removeClass("selected")})},findMatchingVariations:function(t,a){for(var e=[],i=0;i<t.length;i++){var r=t[i];ST_WC_FRONT_SWATCH.productLoop.isMatch(r.attributes,a)&&e.push(r)}return e},isMatch:function(t,a){var e,i,r,s=!0;for(e in t)t.hasOwnProperty(e)&&(i=t[e],r=a[e],null!=i)&&null!=r&&0!==i.length&&0!==r.length&&i!==r&&(s=!1);return s},foundVariation:function(t,a,e){var i=t.find("span.price").not(".price-cloned"),r=i.clone().addClass("price-cloned").css("display","none");a.attr("data-variation_id",e.variation_id),e.price_html?(t.find(".price-cloned").length||t.append(r),i.replaceWith(e.price_html)):t.find(".price-cloned").length&&(i.replaceWith(r.html()),r.remove()),etConfig.woocommerceSettings.wishlist_for_variations&&a.trigger("found_variation",[e]),ST_WC_FRONT_SWATCH.productLoop.variationsImageUpdate(t,e),ST_WC_FRONT_SWATCH.productLoop.variationsCountdownUpdate(t,e),ST_WC_FRONT_SWATCH.productLoop.changeAddToCartBtnText(t,e)},variationsQuickViewUpdate:function(t,a){var e=m(".et-quick-view-wrapper"),i=(e.find(".stock, .product-stock, .cwginstock-subscribe-form, .cwg_popup_submit").remove(),a.availability_html&&e.find(".st-swatch-in-loop").before(a.availability_html),e.find(".sku_wrapper .sku")),i=(a.sku?(i.attr("data-o_content")||i.attr("data-o_content",i.html()),i.html(a.sku)):i.html(i.attr("data-o_content")),e.find(".gtin")),i=(a._et_gtin?(i.attr("data-o_content")||i.attr("data-o_content",i.text()),i.text(a._et_gtin)):void 0!==i.attr("data-o_content")&&i.text(i.attr("data-o_content")),e.find(".xstore-wishlist")),i=(i&&(a.variation_id?(i.attr("data-o_id")||i.attr("data-o_id",i.data("id")),i.attr("data-id",a.variation_id)):void 0!==i.attr("data-o_id")&&i.attr("data-id",i.attr("data-o_id")),etTheme.xstore_wishlist,void 0!==etTheme.xstore_wishlist)&&etTheme.xstore_wishlist.switch_variation_button(i,parseInt(a.variation_id)),e.find(".xstore-compare")),i=(i&&(a.variation_id?(i.attr("data-o_id")||i.attr("data-o_id",i.data("id")),i.attr("data-id",a.variation_id)):void 0!==i.attr("data-o_id")&&i.attr("data-id",i.attr("data-o_id")),etTheme.xstore_compare,void 0!==etTheme.xstore_compare)&&etTheme.xstore_compare.switch_variation_button(i,parseInt(a.variation_id)),e.find(".sales-booster-quantity-discounts-wrapper"));i.length&&(a.is_purchasable&&a.is_in_stock&&a.variation_is_visible?(i.find("[data-product_id]").attr("data-product_id",a.variation_id),i.removeClass("hidden")):i.addClass("hidden")),ST_WC_FRONT_SWATCH.productLoop.variationsLoopQty(t,a,e.find("input.qty"))},normalizeProductId:function(t,a){var e=t.find(".st-swatch-in-loop").attr("data-product_id"),t=t.find("a.add_to_cart_button"),i=t.attr("data-product_id");e&&!i&&t.attr("data-product_id",e)},variationsLoopQty:function(t,i,r){if(i){if(r.length&&i.is_in_stock)if(i.max_qty)if("SELECT"==r[0].nodeName){var s=r.find("option");s.attr("disabled",1);let a=i.min_qty,e=i.max_qty;m(s).each(function(){var t=this.value;(""==e||t<=e)&&(t>=a||""==a)?m(this).attr("disabled",null):r.val(r.find("option:not([disabled]):first").val())})}else r.attr("min",i.min_qty),r.attr("max",i.max_qty),i.max_qty<r.val()&&r.parent().find(".plus").trigger("click");else"SELECT"==r[0].nodeName?r.find("option").attr("disabled",null):(null!==r.attr("data-o_max")&&(r.attr("data-o_min",r.attr("min")),r.attr("data-o_max",r.attr("max"))),r.attr("min",i.min_qty),r.attr("max",i.max_qty))}else{s=t.find("input.qty:not(.quantity-discount-qty-input)"),i=t.find("select.qty:not(.quantity-discount-qty-input)");s.length?(s.attr("max",s.attr("data-o_max")),s.attr("min",s.attr("data-o_min"))):i.length&&i.find("option").attr("disabled",null)}},variationsQuickViewQty:function(){let e=m(".et-quick-view-wrapper"),i=e.find("input.qty:not(.quantity-discount-qty-input), select.qty:not(.quantity-discount-qty-input)");i.length&&(i.attr("min")||i.attr("min",1),i.on("change",function(t){let a=i.val();0==a&&(a=1),e.find("a.button.product_type_variable").attr("data-quantity",a)}))},variationsImageUpdate:function(t,a){var e,i,r=t.find("img.wp-post-image, img.attachment-woocommerce_thumbnail, img.attachment-shop_catalog"),s=t.find(".st-swatch-in-loop");s.parents().is(".et-quick-view-wrapper")?(ST_WC_FRONT_SWATCH.productLoop.variationsQuickViewUpdate(t,a),s.parents(".et-quick-view-wrapper").find(".price_cloned").length<1&&(e=s.parents(".et-quick-view-wrapper").find("p.price:not(.price_cloned)")).after(e.clone().addClass("price_cloned").hide()),a.price_html&&s.parents(".et-quick-view-wrapper").find("p.price:not(.price_cloned)").html(a.price_html)):(ST_WC_FRONT_SWATCH.productLoop.normalizeProductId(t,a),ST_WC_FRONT_SWATCH.productLoop.variationsLoopQty(t,a,t.find("input.qty:not(.quantity-discount-qty-input), select.qty:not(.quantity-discount-qty-input)")),t.find(".show-quickly").attr("data-attributes",null),a&&t.find(".show-quickly").attr("data-attributes",JSON.stringify(a.attributes))),s.parents().is(".et-quick-view-wrapper")&&a&&a.st_image_src&&a.image.src&&1<a.st_image_src.length?(ST_WC_FRONT_SWATCH.productLoop.setVariationAttr(r,"src",a.image.full_src),r.attr("srcset")&&ST_WC_FRONT_SWATCH.productLoop.setVariationAttr(r,"srcset",a.image.srcset),ST_WC_FRONT_SWATCH.productLoop.setVariationAttr(r,"sizes",a.sizes)):a&&a.st_image_src&&a.image.src&&1<a.st_image_src.length?(r.parents().is(".product-image-wrapper")&&((i=m(r).parents(".product-image-wrapper")).find(".product-content-image"),s.is(".st-swatch-popup")||i.addClass("variation-changed")),ST_WC_FRONT_SWATCH.productLoop.setVariationAttr(r,"src",a.st_image_src[0]),r.attr("srcset")&&ST_WC_FRONT_SWATCH.productLoop.setVariationAttr(r,"srcset",a.st_image_srcset),ST_WC_FRONT_SWATCH.productLoop.setVariationAttr(r,"sizes",a.st_image_sizes)):(r.parents().is(".product-image-wrapper")&&((i=m(r).parents(".product-image-wrapper")).find(".product-content-image"),s.is(".st-swatch-popup")||i.removeClass("variation-changed")),ST_WC_FRONT_SWATCH.productLoop.resetVariationAttr(r,"src"),r.attr("srcset")&&ST_WC_FRONT_SWATCH.productLoop.resetVariationAttr(r,"srcset"),ST_WC_FRONT_SWATCH.productLoop.resetVariationAttr(r,"sizes"))},variationsCountdownUpdate:function(t,a){t=t.find(".product-sale-counter");t.length&&(a&&a._sale_price_end?(t.attr("data-start",a._sale_price_start),t.attr("data-final",a._sale_price_end),void 0!==etTheme.countdown&&etTheme.countdown(),t.removeClass("hidden")):t.addClass("hidden"))},changeAddToCartBtnText:function(t,a){var e=t.find("a.add_to_cart_button"),i=e,r="",s="",s=(t.is(".etheme-product-grid-item, .etheme-product-list-item")&&(i=t.find(".st-swatch-popup").length&&!t.find(".st-swatch-popup .quantity-wrapper").length?t.find(".st-swatch-in-loop a.add_to_cart_button"):t.find(".etheme-product-grid-button .button-text, .etheme-product-list-button .button-text")),e.removeClass("added"),Object.keys(a.attributes).length===t.find("ul.st-swatch-preview").length?!0===a.is_in_stock?(r=sten_wc_params.add_to_cart_btn_text,s=sten_wc_params.add_to_cart_btn_text,e.addClass("st-swatch-btn-ready").removeClass("st-swatch-btn-readmore").removeClass("et-st-disabled")):(r=sten_wc_params.read_more_btn_text,s=sten_wc_params.read_more_btn_text,s+=" "+sten_wc_params.read_more_about_btn_text,e.addClass("st-swatch-btn-readmore et-st-disabled").removeClass("st-swatch-btn-ready")):(r=sten_wc_params.select_options_btn_text,s=sten_wc_params.select_options_btn_text,s+=" "+sten_wc_params.read_more_for_btn_text,e.removeClass("st-swatch-btn-ready st-swatch-btn-readmore et-st-disabled")),s+=' "'+e.attr("data-product_name")+'"',e.attr("aria-label",s),e.addClass("st-swatch-btn-text-changed"),i.text(r),t.find("a.add_to_cart_button.et_product_variable-in-quick-view"));s.length&&a.is_in_stock&&s.text(s.attr("data-text"))},setVariationAttr:function(t,a,e){void 0===t.attr("data-o_"+a)&&t.attr("data-o_"+a,t.attr(a)?t.attr(a):""),!1===e?t.removeAttr(a):t.attr(a,e)},resetVariationAttr:function(t,a){t.parents(".content-product, .product-content").find(".et-out-of-stock").removeClass("et-out-of-stock"),void 0!==t.attr("data-o_"+a)&&t.attr(a,t.attr("data-o_"+a)),t&&t.hasClass("lazyloaded")&&(t.removeClass("lazyloaded").addClass("lazyload"),etTheme.global_image_lazy())},addSlashes:function(t){return t=(t=(t=t.toString()).replace(/'/g,"\\'")).replace(/"/g,'\\"')},addToCart:function(){m(document).on("click",".et-st-disabled",function(t){if(etConfig.woocommerceSettings.is_smart_addtocart&&!m(this).parents().is(".et-quick-view-wrapper")&&t.preventDefault(),m(this).hasClass("et_product_variable-in-quick-view")||m(this).hasClass("product_type_variable"))return window.location=m(this).attr("href"),!1}),m(document).on("click","a.product_type_variable.add_to_cart_button.st-swatch-btn-ready",function(t){t.preventDefault();var e=m(this),a=e.closest(".product-type-variable").find("div.st-swatch-in-loop"),i=a.attr("data-variation_id");if(void 0===i||""==i)return!0;var r=e.data("product_id"),s=e.attr("data-quantity"),o={},a=(a.find("ul.st-swatch-preview").each(function(){var t=m(this).data("attribute"),a=m(this).find("li.selected span").data("value");o["attribute_"+t]=a}),e.removeClass("added"),e.addClass("loading"),{action:"sten_wc_product_loop_add_to_cart",product_id:r,quantity:s,variation_id:i,variation:o});m("body").trigger("adding_to_cart",[e,a]),m.ajax({type:"POST",url:sten_wc_params.ajax_url,data:a,success:function(t){var a;return!!t&&(t.error&&t.product_url?(window.location=t.product_url,!1):(a=t.fragments,t=t.cart_hash,a&&m.each(a,function(t,a){m(t).replaceWith(a)}),m(".quick-view-popup .mfp-close, .et-quick-view-canvas .et-close-popup").trigger("click"),e.addClass("added"),m("body").trigger("added_to_cart",[a,t,e]),e.parents(".product-type-variable").find(".st-swatch-in-loop .et-delete").trigger("click"),e.hasClass("et_product_variable-in-quick-view")&&e.attr("data-redirect")?(window.location=e.attr("data-redirect"),!1):void 0))},error:function(t){console.log(t)}}),t.preventDefault()})},showMoreAttr:function(){m(document).on("click",".et_show-more-attr",function(){var t=m(this).parents(".st-swatch-in-loop");t.find("ul.st-swatch-preview li.hidden:not(.et_show-more-attr)").removeClass("hidden"),t.find("ul.st-swatch-preview li.et_show-more-attr").addClass("hidden")})}},ST_WC_FRONT_SWATCH.documentOnReady={init:function(){var t;ST_WC_Show_selected_title="both"==sten_wc_params.show_selected_title,-1<m.inArray(sten_wc_params.show_selected_title,["mobile","desktop"])&&(t=m(window).width(),ST_WC_Show_selected_title="mobile"==sten_wc_params.show_selected_title&&t<992||"desktop"==sten_wc_params.show_selected_title&&993<=t),ST_WC_FRONT_SWATCH.onSelect(),ST_WC_FRONT_SWATCH.singleProductPrimaryAttribute(),ST_WC_FRONT_SWATCH.onClear(),ST_WC_FRONT_SWATCH.onSelectUpdateAttribute(),ST_WC_FRONT_SWATCH.productLoop.init()},ET_In_Popup:function(){m(document).on("click",".st-swatch-et-disabled li span",function(t){var a,e,i;m(this).parents().is(".et-quick-view-wrapper")||(e=(a=m(this).parents(".st-swatch-in-loop")).parents(".content-product"),a.addClass("active"),m(this).parents(".product-details").addClass("st-swatch-popup-active"),m.each(a.closest("div").find("div.et_st-default-holder"),function(){var t=m(this).html();t=(t=t.replace("st-swatch-size-small","st-swatch-size-normal")).replace("st-swatch-et-disabled","st-swatch-et-anabled"),m(this).parents(".st-swatch-in-loop").find(".st-swatch-preview-wrap .et_st-popup-holder").append(t)}),i=a.find("div.et_st-default-holder").height(),a.find("div.et_st-default-holder").css("min-height",i),a.find("div.et_st-default-holder ul").remove(),a.find(".sten-reset-loop-variation").remove(),e.find(".product-image-wrapper").is(".variation-changed")||e.find(".product-image-wrapper").addClass("variation-changed"),ST_WC_FRONT_SWATCH.productLoop.itemSwatches())}),m(document).on("click",".st-swatch-in-loop .et-delete",function(t){var a;m(this).parents().is(".et-quick-view-wrapper")||(a=m(this).parents(".st-swatch-in-loop").parents(".content-product"),m.each(m(this).parents(".st-swatch-in-loop").find("div.st-swatch-preview-wrap .et_st-popup-holder ul"),function(){var t=m(this).removeClass("st-swatch-et-anabled").addClass("st-swatch-et-disabled"),a=m(this).data("attribute");m(this).parents(".st-swatch-in-loop").find('div.et_st-default-holder[data-et-holder="'+a+'"]').prepend(t)}),m(this).parents(".st-swatch-in-loop").removeClass("active"),m(this).parents(".product-details").removeClass("st-swatch-popup-active"),m(this).parents(".st-swatch-in-loop").find(".st-swatch-preview-wrap .et_st-popup-holder ul").remove(),a.find(".product-image-wrapper").is(".variation-changed")&&a.find(".product-image-wrapper").removeClass("variation-changed"),ST_WC_FRONT_SWATCH.productLoop.itemSwatches())})}},m(document).ready(ST_WC_FRONT_SWATCH.documentOnReady.init),m(document).ready(ST_WC_FRONT_SWATCH.documentOnReady.ET_In_Popup)}(jQuery);