var showingGoldClubPromo=false;function setupMuseumDonation(){setTimeout("showMuseumPromo()",1500)}function showMuseumPromo(){if(getCookie("mcmuseumdonation")==""&&!showingGoldClubPromo){$(".rightcartbox #museumPromo").addClass("museumPromo").append($("<div>").append($("<img/>").attr("src","/Content/images/museum_donate_back.jpg")).append($("<p>The National Motorcycle Museum is supported by passionate riders like yourself. Would you like to donate $1 to the Museum?</p>")).append($("<button>Yes</button>").attr("id","museumPromoYes").css("margin","2px 8px").click(function(){setCookie("mcmuseumdonation","yes","/",1);window.location="/cart/additem/?productSku=museum"})).append($("<button>No</button>").attr("id","museumPromoNo").css("margin","2px 8px").click(function(){setCookie("mcmuseumdonation","no","/",1);$(this).parent().parent().hide("normal")}))).append($("<a>More Information</a>").attr("href","http://www.nationalmcmuseum.org/menu.html").attr("target","new")).show("normal");return true}}function promoteGoldClubMembership(a){if(!getCookie("goldcluboffer")){showGoldClubPromo(a,$("body"))}}function showGoldClubPromo(c,b){var a=$("<div />").attr("id","gold-club-offer");b.append(a);$.ajax({type:"GET",url:"/content/html/promo/GoldClubOffer.html",data:c,cache:false,success:function(f){showingGoldClubPromo=true;a.html(f);a.dialog({overlay:{background:"#333"},bgiframe:true,resizable:false,height:390,modal:true,width:580,title:"Special Savings Alert: Gold Club Membership",closeOnEscape:true,beforeclose:function(k,l){ClickedGoldClubOffer(false)},buttons:{"No Thanks":function(){$(this).dialog("close");ClickedGoldClubOffer(false)}}}).css("padding-top","0");a.find("#gold-club-offer-add-to-cart").click(function(){ClickedGoldClubOffer(true)});var i=c.GoldClub.FreeShipping;var j=c.GoldClubProduct.NetPrice;var e=a.find("#gold-club-offer-net-cost");if(j>0){$(".gold-club-for-cheap",e).siblings().remove()}else{if(j==0){$(".gold-club-for-free",e).siblings().remove()}else{j=-j;$(".gold-club-for-free-plus",e).siblings().remove()}}e.html(jQuery.format(e.html(),c.GoldClubProduct.RegularPrice,j));var h=a.find("#gold-club-offer-savings");h.html(jQuery.format(h.html(),c.GoldClubProduct.Savings));var g=a.find("#gold-club-offer-gold-club");g.html(jQuery.format(g.html(),c.GoldClub.Total,i));var d=a.find("#gold-club-offer-standard");d.html(jQuery.format(d.html(),c.Standard.FreeShipping,c.Standard.Total));$(".gold-club-offer-free-shipping").each(function(k){$(this).html(jQuery.format($(this).html(),i))})}})}function ClickedGoldClubOffer(a){setCookie("goldcluboffer",a?"yes":"no","/")};
