/*! * Variations Plugin */ !function(a,b,c,d){a.fn.wc_variation_form=function(){return a.fn.wc_variation_form.find_matching_variations=function(b,c){for(var d=[],e=0;e").html(g).text(),g=g.replace(/'/g,"\\'"),g=g.replace(/"/g,'\\"'),current_attr_select.find('option[value="'+g+'"]').addClass("active")):current_attr_select.find("option:gt(0)").addClass("active"))}}current_attr_select.find("option:gt(0):not(.active)").remove()}),$variation_form.trigger("woocommerce_update_variation_values")}).on("found_variation",function(b,c){var e=a(this),f=a(this).closest(".product"),g=f.find("div.images img:eq(0)"),h=f.find("div.images a.zoom:eq(0)"),i=g.attr("data-o_src"),j=g.attr("data-o_title"),k=g.attr("data-o_alt"),l=h.attr("data-o_href"),m=c.image_src,n=c.image_link,o=c.image_title,p=c.image_alt;e.find(".variations_button").show(),e.find(".single_variation").html(c.price_html+c.availability_html),i==d&&(i=g.attr("src")?g.attr("src"):"",g.attr("data-o_src",i)),l==d&&(l=h.attr("href")?h.attr("href"):"",h.attr("data-o_href",l)),j==d&&(j=g.attr("title")?g.attr("title"):"",g.attr("data-o_title",j)),k==d&&(k=g.attr("alt")?g.attr("alt"):"",g.attr("data-o_alt",k)),m&&m.length>1?(g.attr("src",m).attr("alt",p).attr("title",o),h.attr("href",n).attr("title",o)):(g.attr("src",i).attr("alt",k).attr("title",j),h.attr("href",l).attr("title",j));var q=e.find(".single_variation_wrap"),r=f.find(".product_meta").find(".sku"),s=f.find(".product_weight"),t=f.find(".product_dimensions");r.attr("data-o_sku")||r.attr("data-o_sku",r.text()),s.attr("data-o_weight")||s.attr("data-o_weight",s.text()),t.attr("data-o_dimensions")||t.attr("data-o_dimensions",t.text()),r.text(c.sku?c.sku:r.attr("data-o_sku")),s.text(c.weight?c.weight:s.attr("data-o_weight")),t.text(c.dimensions?c.dimensions:t.attr("data-o_dimensions")),q.find(".quantity").show(),c.is_in_stock||c.backorders_allowed||e.find(".variations_button").hide(),c.variation_is_visible||(e.find(".variations_button").hide(),e.find(".single_variation").html("

"+wc_add_to_cart_variation_params.i18n_unavailable_text+"

")),c.min_qty?q.find("input[name=quantity]").attr("min",c.min_qty).val(c.min_qty):q.find("input[name=quantity]").removeAttr("min"),c.max_qty?q.find("input[name=quantity]").attr("max",c.max_qty):q.find("input[name=quantity]").removeAttr("max"),"yes"==c.is_sold_individually&&(q.find("input[name=quantity]").val("1"),q.find(".quantity").hide()),q.slideDown("200").trigger("show_variation",[c])}),$form.trigger("wc_variation_form"),$form},a(function(){return"undefined"==typeof wc_add_to_cart_variation_params?!1:(a(".variations_form").wc_variation_form(),void a(".variations_form .variations select").change())})}(jQuery,window,document);