jQuery(document).ready(function(a){a("body.isMobile ul.products li:not(.category)").on("styleswitch elastiautoslide",function(){var b=a(this),c;b.on({mouseenter:function(){b.hasClass("grid")&&(b.height(b.height()-1),b.find(".product-actions-wrapper").height(b.find(".product-actions").height()+20),"ie8"!=a("html").attr("id")&&"ie9"!=a("html").attr("id")||b.addClass("js_hover"),clearTimeout(c))},mouseleave:function(){b.hasClass("grid")&&("ie8"!=a("html").attr("id")&&"ie9"!=a("html").attr("id")||b.removeClass("js_hover"),
    b.find(".product-actions-wrapper").height(0),c=setTimeout(function(){b.css("height","auto")},700))}})}).trigger("styleswitch");a(".list-or-grid a").on("click",function(){var b=a(this).attr("class").replace("-view","");YIT_Browser.isIE8()&&(b=b.replace(" last-child",""));a("ul.products li").removeClass("list grid").addClass(b);a(this).parent().find("a").removeClass("active");a(this).addClass("active");a.cookie(yit_shop_view_cookie,b);a("ul.products li").trigger("styleswitch");return!1});var g;a("ul.products li.product .add_to_cart_button").on("click",
    function(){g=a(this).parents("li.product");g.find(".product-thumbnail").block({message:null,overlayCSS:{background:"#fff url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:0.3,cursor:"none"}});a(".widget.woocommerce.widget_shopping_cart a.cart_control").show();a(".widget.woocommerce.widget_shopping_cart a.cart_control.cart_control_empty").remove()});a("body").on("added_to_cart",function(){0==g.find(".thumbnail-wrapper .added").length&&(g.find(".thumbnail-wrapper").append('<span class="added">added</span>'),
    g.find(".added").fadeIn(500));g.find(".product-thumbnail").unblock()});if(void 0!==a.fn.selectbox){var h=a("form.variations_form");h.find("select");h.find("select").selectbox({effect:"fade",onOpen:function(){}});var e=function(a){h.find("select").selectbox("detach");h.find("select").selectbox("attach")};h.on("woocommerce_update_variation_values",e);h.find(".reset_variations").on("click",e)}var k;a(document).on("click",".yith-wcwl-add-button a",function(){k=a(this);k.block({message:null,overlayCSS:{background:"#fff url("+
    woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:0.6,cursor:"none"}})});e=function(){0!=a(this).parent().find(".feedback").length&&a(this).tipTip({defaultPosition:"top",maxWidth:"auto",edgeOffset:20,content:a(this).parent().find(".feedback").text()})};a(".yith-wcwl-add-to-wishlist a").each(e).on("mouseenter",e);a.fn.carouFredSel&&(a(".products-slider-wrapper").each(function(){a(this).imagesLoaded(function(){var b=a(this),c=a(this).find(".products-slider").data("items");
    if(0==a(this).parents(".border-box").length){var d,e=a(this).find(".es-nav-prev").show(),f=a(this).find(".es-nav-next").show();carouFredSelOptions_defaults.prev=e;carouFredSelOptions_defaults.next=f;767>=a("body").outerWidth()?(b.find("li").each(function(){a(this).width(b.width())}),carouFredSelOptions_defaults.items=1):(b.find("li").each(function(){a(this).attr("style","")}),carouFredSelOptions_defaults.items=c);d=a(this).find(".products").carouFredSel(carouFredSelOptions_defaults);a("body").hasClass("responsive")&&
    a(window).resize(function(){d.trigger("destroy",!1).attr("style","");767>=a("body").outerWidth()?(b.find("li").each(function(){a(this).width(b.width())}),carouFredSelOptions_defaults.items=1):(b.find("li").each(function(){a(this).attr("style","")}),carouFredSelOptions_defaults.items=c);d.carouFredSel(carouFredSelOptions_defaults);a(".es-nav-prev, .es-nav-next").removeClass("hidden").show()});a(document).on("feature_tab_opened",function(){a(window).trigger("resize")})}})}),a(".es-nav-prev, .es-nav-next").removeClass("hidden").show());
    a(".responsive ul.products li.product.grid.force-classic-on-mobile").on("force_classic",function(){768>a(window).width()?a(this).addClass("classic").removeClass("with-hover"):a(this).addClass("with-hover").removeClass("classic")}).trigger("force_classic");a(window).resize(function(){a(".responsive ul.products li.product.grid.force-classic-on-mobile").trigger("force_classic")});a(".woocommerce .sidebar .widget h3").prepend('<div class="minus" />');a(".woocommerce .sidebar .widget").on("click","h3",
        function(){a(this).parent().find("> *:not(h3)").slideToggle();a(this).find("div").hasClass("minus")?a(this).find("div").removeClass("minus").addClass("plus"):a(this).find("div").removeClass("plus").addClass("minus")});a(document).on("click",".yit_share",function(b){b.preventDefault();b='<div class="popupOverlay share"></div><div id="popupWrap" class="popupWrap share"><div class="popup"><div class="border-1 border"><div class="product-share">'+a(this).parents(".product-actions-wrapper, .product-box").siblings(".product-share").html()+
        '</div></div></div><div class="close-popup"></div></div></div>';a("body").append(b);a(".popupWrap").center();a(".popupOverlay").css({display:"block",opacity:0}).animate({opacity:0.7},500);a(".popupWrap").css({display:"block",opacity:0}).animate({opacity:1},500);var c=function(){a(".popupOverlay").animate({opacity:0},200);a(".popupOverlay").remove();a(".popupWrap").animate({opacity:0},200);a(".popupWrap").remove()};a(".close-popup, .popupOverlay").click(function(){c()});a(document).bind("keydown",
        function(b){27==b.which&&a(".popupOverlay")&&c()});a(window).resize(function(){a("#popupWrap").center()})});e=function(){a("ul.products li:not(.category)").each(function(){var b=a(this),c;b.on({mouseenter:function(){b.hasClass("grid")&&(b.height(b.height()-1),b.find(".product-actions-wrapper").height(b.find(".product-actions").height()+20),"ie8"!=a("html").attr("id")&&"ie9"!=a("html").attr("id")||b.addClass("js_hover"),clearTimeout(c))},mouseleave:function(){b.hasClass("grid")&&("ie8"!=a("html").attr("id")&&
        "ie9"!=a("html").attr("id")||b.removeClass("js_hover"),b.find(".product-actions-wrapper").height(0),c=setTimeout(function(){b.css("height","auto")},700))}})});if(a(this).hasClass("widget"))a(this).find("h3").prepend('<div class="minus" />').on("click","h3",function(){a(this).parent().find("> *:not(h3)").slideToggle();a(this).find("div").hasClass("minus")?$ery(this).find("div").removeClass("minus").addClass("plus"):a(this).find("div").removeClass("plus").addClass("minus")})};a(window).on("ajax_layered_page_shown",
        e);a(document).on("ready yith-wcan-ajax-filtered",e);a(document).on("found_variation","form.variations_form",function(b,c){var d=a(this).parents(".sidebar").prev(".content").find(".product"),e=d.find(".product_meta .sku"),f=d.find(".product_weight"),d=d.find(".product_dimensions");e.attr("data-o_sku")||e.attr("data-o_sku",e.text());f.attr("data-o_weight")||f.attr("data-o_weight",f.text());d.attr("data-o_dimensions")||d.attr("data-o_dimensions",d.text());c.sku?e.text(c.sku):e.text(e.attr("data-o_sku"));
        c.weight?f.text(c.weight):f.text(f.attr("data-o_weight"));c.dimensions?d.text(c.dimensions):d.text(d.attr("data-o_dimensions"))}).on("click",".reset_variations",function(b){var c=a(this).parents(".sidebar").prev(".content").find(".product");b=c.find(".product_meta").find(".sku");var d=c.find(".product_weight"),c=c.find(".product_dimensions");b.attr("data-o_sku")&&b.text(b.attr("data-o_sku"));d.attr("data-o_weight")&&d.text(d.attr("data-o_weight"));c.attr("data-o_dimensions")&&c.text(c.attr("data-o_dimensions"));
            return!1});a(document).on("hover","ul.products li .thumbnail-wrapper",function(b){"mouseenter"==b.type?(b=a(this).find("img.image-hover"),0<b.length&&b.css({display:"block",opacity:0}).animate({opacity:1},400)):"mouseleave"==b.type&&(b=a(this).find("img.image-hover"),0<b.length&&b.animate({opacity:0},400))});a("body").hasClass("single-product")&&setTimeout(function(){if(""!=a.trim(a(".usermessagea").html())||""!=a.trim(a(".contact-form li div.msg-error").text()))a("div.product-extra .woocommerce-tabs .tabs li").removeClass("active"),
        a("div.product-extra .woocommerce-tabs .panel").css("display","none"),a("div.product-extra .woocommerce-tabs .tabs li.info_tab").addClass("active"),a("#tab-info").css("display","block")},200)});