jQuery.fn.animateHighlight=function(e,c){var d=e||"#FFFF9C";var a=c||1500;var b=this.css("backgroundColor");this.stop().css("background-color",d).animate({backgroundColor:b},a)};jQuery(function(){jQuery(".add_to_cart_button").live("click",function(){var j=jQuery(this);if(j.is(".product_type_simple")){jQuery(j).addClass("loading");var k={action:"woocommerce_add_to_cart",product_id:jQuery(j).attr("rel"),security:woocommerce_params.add_to_cart_nonce};jQuery("body").trigger("adding_to_cart");jQuery.post(woocommerce_params.ajax_url,k,function(l){k=jQuery.parseJSON(l);if(k.error){alert(k.error);jQuery(j).removeClass("loading");return}fragments=k;if(fragments){jQuery.each(fragments,function(m,n){jQuery(m).addClass("updating")})}jQuery(".widget_shopping_cart, .shop_table.cart, .updating").fadeTo("400","0.6").block({message:null,overlayCSS:{background:"transparent url("+woocommerce_params.plugin_url+"/assets/images/ajax-loader.gif) no-repeat center",opacity:0.6}});jQuery(j).addClass("added");jQuery(j).removeClass("loading");jQuery(".widget_shopping_cart:eq(0)").load(window.location+" .widget_shopping_cart:eq(0) > *",function(){if(fragments){jQuery.each(fragments,function(m,n){jQuery(m).replaceWith(n)})}jQuery(".widget_shopping_cart, .updating").css("opacity","1").unblock()});jQuery(".shop_table.cart").load(window.location+" .shop_table.cart:eq(0) > *",function(){jQuery("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('').prepend('');jQuery(".shop_table.cart").css("opacity","1").unblock()});jQuery("body").trigger("added_to_cart")});return false}else{return true}});jQuery("select.orderby").change(function(){jQuery(this).closest("form").submit()});jQuery("#rating").hide().before('
');jQuery("p.stars a").click(function(){jQuery("#rating").val(jQuery(this).text());jQuery("p.stars a").removeClass("active");jQuery(this).addClass("active");return false});var g=jQuery(".price_slider_amount #min_price").val();var d=jQuery(".price_slider_amount #max_price").val();if(woocommerce_params.min_price){current_min_price=woocommerce_params.min_price}else{current_min_price=g}if(woocommerce_params.max_price){current_max_price=woocommerce_params.max_price}else{current_max_price=d}current_min_price=parseInt(current_min_price);current_max_price=parseInt(current_max_price);jQuery(".price_slider").slider({range:true,animate:true,min:g,max:d,values:[current_min_price,current_max_price],create:function(j,k){if(woocommerce_params.currency_pos=="left"){jQuery(".price_slider_amount span").html(woocommerce_params.currency_symbol+current_min_price+" - "+woocommerce_params.currency_symbol+current_max_price)}else{if(woocommerce_params.currency_pos=="left_space"){jQuery(".price_slider_amount span").html(woocommerce_params.currency_symbol+" "+current_min_price+" - "+woocommerce_params.currency_symbol+" "+current_max_price)}else{if(woocommerce_params.currency_pos=="right"){jQuery(".price_slider_amount span").html(current_min_price+woocommerce_params.currency_symbol+" - "+current_max_price+woocommerce_params.currency_symbol)}else{if(woocommerce_params.currency_pos=="right_space"){jQuery(".price_slider_amount span").html(current_min_price+" "+woocommerce_params.currency_symbol+" - "+current_max_price+" "+woocommerce_params.currency_symbol)}}}}jQuery(".price_slider_amount #min_price").val(current_min_price);jQuery(".price_slider_amount #max_price").val(current_max_price)},slide:function(j,k){if(woocommerce_params.currency_pos=="left"){jQuery(".price_slider_amount span").html(woocommerce_params.currency_symbol+k.values[0]+" - "+woocommerce_params.currency_symbol+k.values[1])}else{if(woocommerce_params.currency_pos=="left_space"){jQuery(".price_slider_amount span").html(woocommerce_params.currency_symbol+" "+k.values[0]+" - "+woocommerce_params.currency_symbol+" "+k.values[1])}else{if(woocommerce_params.currency_pos=="right"){jQuery(".price_slider_amount span").html(k.values[0]+woocommerce_params.currency_symbol+" - "+k.values[1]+woocommerce_params.currency_symbol)}else{if(woocommerce_params.currency_pos=="right_space"){jQuery(".price_slider_amount span").html(k.values[0]+" "+woocommerce_params.currency_symbol+" - "+k.values[1]+" "+woocommerce_params.currency_symbol)}}}}jQuery("input#min_price").val(k.values[0]);jQuery("input#max_price").val(k.values[1])}});jQuery("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('').prepend('');jQuery(".plus").live("click",function(){var j=parseInt(jQuery(this).prev(".qty").val());if(!j||j==""||j=="NaN"){j=0}jQuery(this).prev(".qty").val(j+1)});jQuery(".minus").live("click",function(){var j=parseInt(jQuery(this).next(".qty").val());if(j=="NaN"){j=1}if(j>1){jQuery(this).next(".qty").val(j-1)}});var b=woocommerce_params.countries.replace(/"/g,'"');var h=jQuery.parseJSON(b);jQuery("select.country_to_state").change(function(){var o=jQuery(this).val();var m=jQuery("#"+jQuery(this).attr("rel"));var p=jQuery(m).attr("name");var l=jQuery(m).attr("id");if(h[o]){var k="";var n=h[o];for(var j in n){k=k+'"}if(jQuery(m).is("input")){jQuery(m).replaceWith('");m=jQuery("#"+jQuery(this).attr("rel"))}jQuery(m).append(k)}else{if(jQuery(m).is("select")){jQuery(m).replaceWith('');m=jQuery("#"+jQuery(this).attr("rel"))}}}).change();jQuery("#tabs .panel:not(#tabs .panel)").hide();jQuery("#tabs li a").click(function(){var j=jQuery(this).attr("href");jQuery("#tabs li").removeClass("active");jQuery("div.panel").hide();jQuery("div"+j).show();jQuery(this).parent().addClass("active");jQuery.cookie("current_tab",j);return false});if(jQuery("#tabs li.active").size()==0){jQuery("#tabs li:first a").click()}else{jQuery("#tabs li.active a").click()}jQuery(".shipping-calculator-form").hide();jQuery(".shipping-calculator-button").click(function(){jQuery(".shipping-calculator-form").slideToggle("slow",function(){})});jQuery(".shipping-calculator-button").click(function(){return false});function a(n,m){var j=true;for(name in n){var l=n[name];var k=m[name];if(l.length!=0&&k.length!=0&&l!=k){j=false}}return j}function i(l){var n=[];for(var k=0;k