$(document).ready(function(){if(pageSettings.isMember){var b=new LightBox({boxId:"#p1_mcl"});$("#p1_mbt").click(function(){b.open();return false});$("#_aaf").click(function(){$.post("/handlers/AddAsFriend.ashx",{id:pageSettings.memberId},function(c){if(c=="f"){window.location="/Login.aspx";return}});$(this).html("<span class='vm_l'>Friend Request Sent</span>");return false});var a=false;$("#_mark").click(function(){if($("#_mark").text()=="Mark"){a=true}else{a=false}$.post("/handlers/AdminHandler.ashx",{i:pageSettings.memberId,a:"m",m:a},function(c){if(c=="f"){window.location="/Login.aspx";return}});if($("#_mark").text()=="Mark"){$("#_mark").text("Unmark")}else{$("#_mark").text("Mark")}});$("#_unmark").click(function(){if($("#_mark").text()=="Mark"){a=true}else{a=false}$.post("/handlers/AdminHandler.ashx",{i:pageSettings.memberId,a:"m",m:a},function(c){if(c=="f"){window.location="/Login.aspx";return}});if($("#_unmark").text()=="Mark"){$("#_unmark").text("Unmark")}else{$("#_unmark").text("Mark")}})}$("#p1_amb").click(function(d){d.preventDefault();var c=$(this);if(c.text()=="show more"){c.text("show less");$("#p1_ael").hide();$("#p1_am").show();FixHeight()}else{c.text("show more");$("#p1_ael").show();$("#p1_am").hide()}})});$(document).ready(function(){$("#pm_mtxt").setDefaultVal("Enter your message here...");var a=false;var b=false;$("#pm_mc").click(function(c){c.preventDefault();$("#pm_m").slideDown("fast").closest("li").addClass("vm_act")});$("#pm_mbc").click(function(){$("#pm_m").slideUp("fast").closest("li").removeClass("vm_act")});$("#pm_mbs").click(function(){var c=$("#pm_mtxt").getValue();if(c.length==0){return}if(a==true){return}a=true;$("#pm_ml").show();$("#pm_ms").text("");$.ajax({type:"POST",url:"/Handlers/MessagesHandler.ashx",data:{a:"s",to:pageSettings.memberId,m:c},dataType:"json",timeout:5000,success:function(d){if(d=="f"){window.location="/login.aspx";return}$("#pm_ml").hide();$("#pm_ms").text("Message sent.");$("#pm_m").delay(3000).slideUp("fast").closest("li").removeClass("vm_act");a=false},error:function(){$("#pm_ml").hide();$("#pm_ms").text("Sending failed.");a=false}})})});
