function checkFreeShipping(){var f="";var h=$("#noFreeShipping").val();var k=$("#selectedProduct").val();var j=$("#cartPath").val();var g=(typeof(products[k])!="undefined")?products[k].Price:$("#productPrice").val();var c=$(".quantityBox").val();c=(!isNaN(c))?parseInt(c):1;var b=false;if($(".bundleProducts").length>0&&$(".bundleProducts").val()!=""){var e=aryBundlePrices[$(".bundleProducts").val()];if(typeof(e)!="undefined"){b=(e.FreeShipping!==false&&((parseFloat(g)*parseInt(c))+parseFloat(e.Price)>50))}}else{var a=$(".bundleProductItem :checked");if(a.length>0){var d=(parseFloat(g)*parseInt(c));for(var l=0;l50))}else{b=((parseFloat(g)*parseInt(c))>50)}}if(b&&(h==null||h=="")){$("#shippingWrapper").show("fast")}else{$("#shippingWrapper").hide("fast")}if(k!=null&&k!=""){if(products[k]!=null){var i=products[k];$("#yourPrice").text("$ "+formatFloat(i.Price));$("#productAvailability").text(i.Availability);$("#shippingWrapper").toggleClass("hide",!(i.FreeShippingEligible&&i.Price>50));$("#discountPricing").toggleClass("hide",!(i.Discount));$("#originalPrice").text("$ "+formatFloat(i.RetailPrice));$("#discountPercentage").text("(Save "+formatFloat(i.DiscountPercentage,0)+"%)")}if(f==""){f=j+"product_id="+escape(k+"|"+c)}else{f=j+"product_id="+escape(k+"|"+c+",")+f}$(".addToCartButton").attr("href",f)}}$(document).ready(function(){$(".quantityBox").blur(checkFreeShipping);$(".quantityBox").blur()});