Sandbox.forceMemberUpdate(undefined,function(){$Halo.bigbro.notifyOnce("creditsChange")});
$(document).ready(function(){if(Sandbox.getMember().gender=="M")document.getElementById("imagecontainer").innerHTML="<img src='/images/promo/mens_invite_header.jpg' />";else document.getElementById("imagecontainer").innerHTML="<img src='/images/promo/womens_invite_header.jpg' />";$.ajax({url:"/v3/url/short",type:"POST",data:JSON.stringify({url:$("#twitter_share").attr("href")}),dataType:"json",useREST:true,haloHandleAjaxResponse:true,haloFail:function(){this.haloSuccess({url:"http://www.hautelook.com/events"})},
haloSuccess:function(a){$("#twitter_share").attr("href","http://twitter.com/home?status="+encodeURIComponent("I find amazing deals every day on @HauteLook.  Check it out! "+a.url.short_url))}});var b=false;$("#option_one_cancel_button").click(function(){$("#invite_code").val($("#original_invite_code").val());$("#invite_update_response").html("");$("#invite_code_form").hasClass("hidden")?$("#invite_code_form").removeClass("hidden"):$("#invite_code_form").addClass("hidden");return false});$("#option_one_submit_button").click(function(){if($("#invite_code").val()==
"")$("#invite_update_response").text("New invite code can not be blank");else{$("#invite_update_response").text("");if(typeof b!="function")b=new messaging({base_url:"my-invites-confirm"});b.display(null,function(){$("#myinvitesconfirm_messaging .confirm_ok_btn").unbind("click").click(function(){params="invite_code="+escape($("#invite_code").val());$.post("/member/update-invite-code/",params,function(a){$("#invite_update_response").html(a.message);if(a.add_code){$("#current_invite_code").html('<p id="pers_inv_link"><strong>Your personal invitation link is:</strong> http://www.hautelook.com/invite/'+
a.newcode+"</p>");$("#invite_code_form input").attr("value",a.newcode);$("#invites_facebook").parent().attr("href","http://www.facebook.com/share.php?t=I find amazing deals every day on HauteLook. Check it out!&u=http://www.hautelook.com/invite/"+a.newcode);$("#invites_twitter").parent().attr("href","http://twitter.com/home?status="+encodeURIComponent("I find amazing deals every day on HauteLook. Check it out! http://www.hautelook.com/invite/"+a.newcode))}},"json");b.close()})})}});$("#plaxo_launcher").click(function(a){typeof _gaq!==
"undefined"&&_gaq.push(["_trackEvent","Invite page","Plaxo"]);a.preventDefault();$("#headerInviteFriendPopupLink").click();return true});$("#send_invite_button").click(function(){var a=new RegExp('["[(\\s)|(\\S)]*"]*',"g"),c=$("#plaxo_recipient_list").val();c=c.split(",");var e="";for(var f in c){c[f]=c[f].replace(a,"");e+=e.length>0?",":"";e+=c[f]}$("#plaxo_recipient_list").val(e);$("#status_message").css({display:"block",visibility:"visible"});params=$("#referral_step_one").serialize();s=document.URL;
pos=0;pos=s.toLowerCase().indexOf("hautelook.com/invites".toLowerCase());$.post("/member-invites/email-invites",params,function(d){if(d.success&&d.success==1){var g=new messaging({base_url:"single-invite"});g.display(null,function(){$("#single_invite_messaging p.message_copy").text(d.message);$("#single_invite_messaging .confirm_ok_btn").click(g.close);$(document).bind("cbox_closed",function(){window.location.reload()})})}else if(d.success&&d.success==2){$("#plaxo_recipient_list").val(d.emailerrors);
$("#status_message").css({display:"block",visibility:"hidden"});$("#invite_error").text(d.message)}},"json");typeof _gaq!=="undefined"&&_gaq.push(["_trackEvent","Invite page","Send Invite Button"]);return false});$("#my_referrals li:gt(10)").css("display","none");$("#my_referrals li:eq(11)").length>0&&$("#view_all_transactions").show();$("#view_all_transactions").click(function(){$("#my_referrals li:gt(10)").show();$(this).hide()});$("#invites_facebook").click(function(){typeof _gaq!=="undefined"&&
_gaq.push(["_trackEvent","Invite page","Facebook"])});$("#invites_twitter").click(function(){typeof _gaq!=="undefined"&&_gaq.push(["_trackEvent","Invite page","Twitter"])})});function productDetailsPopup(b){share_a_sale(window.location.href,b)}function onABCommComplete(b){var a=[];if(b)for(var c=0;c<b.length;c++)a.push(b[c][1]);document.getElementById("plaxo_recipient_list").value=a.join(", ")}
function sendReminder(b){params=$("#reminder_email_"+b).serialize();$("#reminder_update_"+b).html('<a class="send_reminder_button_enabled pngfix"><img src="/image/send_reminder_button_disabled.png" alt="Send Reminder (disabled)" /></a>');$.post("/member/send-Reminder/",params,function a(c){c.update_reminder&&$("#reminder_update_"+b).html('<span class="another_reminder_disallowed">Reminder sent</span>')},"json");return false};

