var tinymce_inited={};var tinymce_shown={};var boxyConfirmCallback="";function confirmdelete(){conf=confirm("Are you sure you wish to delete?");return conf}function confirmchangeun(){conf=confirm("Are you absolutely sure you wish to change your username?\nRemember, you will be unable to change it again for 7 days!");return conf}function confirmcancelaccount(){conf=confirm("Are you absolutely sure you wish to cancel your account?");return conf}function checkall2(a,b){$("input[@name='"+b+"'][type='checkbox']").attr("checked",$("#"+a).is(":checked"))}function populateLocationInit(d,c,a,b){$(d).html('<label>&nbsp;</label><span class="small">Please wait...</span>');$(d).load("/populatelocation.php",{mode:"account",country:c,zipcode:a,city:b})}function populateLocationSearchInit(e,d,a,b,c){$(e).html('<label>&nbsp;</label><span class="small">Please wait...</span>');$(e).load("/populatelocation.php",{mode:"search",distance:$(c).val(),country:d,zipcode:a,city:b})}function populateLocation(d,c,a,e){var b=0;if($(c).val()!==undefined){b=$(c).val()}$(d).html('<label>&nbsp;</label><span class="small">Please wait...</span>');$(d).load("/populatelocation.php",{mode:"account",country:b,zipcode:0,city:0})}function populateLocationSearch(a,h,i,e,d,f,b,c){var g=0;if($(h).val()!==undefined){g=$(h).val()}if($(b).val()!==undefined){$(c).val($(b).val())}if($(i).val()!==undefined){$(e).val($(i).val())}if($(d).val()!==undefined){$(f).val($(d).val())}$(a).html('<div class="row"><div class="label">&nbsp;</div><div class="formw">Please wait...</div></div>');$(a).load("/populatelocation.php",{mode:"search",distance:$(c).val(),country:g,zipcode:$(e).val(),city:$(f).val()})}function postalLookup(c,b){var a=window.open("","LookupWindow","width=450,height=150,left=50,top=50,resizable=yes");if(a===null||typeof(a)=="undefined"){boxyAlert("Please add lifeout.com to your pop-up blocker for pop-ups to work!")}else{a.location="/popuppostalsearch.php?country="+$(c).val()+"&field="+b}}function mailsubmitform(a){$("#formaction").val(a);$("#form1").submit()}function mailaddressbook(){if(!$("#member-to-id").val()){boxyAlert("You must choose someone from your friends list before sending.");return false}return true}function displayLongDesc(a){if($("#desc-link-"+a).html()=="more"){$("#desc-link-"+a).html("less");$("#longdesc-"+a).show()}else{$("#desc-link-"+a).html("more");$("#longdesc-"+a).hide()}}function displayLongDescShortDesc(a){if($("#desc-link-"+a).html()=="more"){$("#desc-link-"+a).html("less");$("#shortdesc-"+a).hide();$("#longdesc-"+a).show()}else{$("#desc-link-"+a).html("more");$("#longdesc-"+a).hide();$("#shortdesc-"+a).show()}}function displayStats(a){if($("#stats-link-"+a).html()=="Show stats"){$("#stats-link-"+a).html("Hide stats");$("#stats-"+a).slideDown()}else{$("#stats-link-"+a).html("Show stats");$("#stats-"+a).slideUp()}}function navigation(){$(".Mainmenu ul li a.topline").click(function(){$(".Mainmenu ul li a").removeClass("active");$(".Mainmenu ul li a").removeClass("selected");$(".Mainmenu ul li a").siblings("ul").removeClass("selected");$("ul.active").css({display:"block"});$(this).addClass("selected");$(this).siblings("ul").addClass("selected");$("ul.active").css({display:"none"})});$(".Mainmenu ul ul").mouseover(function(){$(".Mainmenu ul ul").removeClass("selected");$(".Mainmenu ul ul").siblings("a").removeClass("selected");$("ul.active").css({display:"block"});$(this).siblings("a").addClass("selected");$(this).addClass("selected");$("ul.active").css({display:"none"})});$(".Mainmenu ul li a.active").click(function(){$(this).addClass("selected");$(this).siblings("ul").addClass("selected");$("ul.active").css({display:"block"})});$(".Mainmenu ul ul.active").mouseover(function(){$(this).siblings("a").addClass("selected");$(this).addClass("selected");$("ul.active").css({display:"block"})})}function setup_tinymce(a){var b={};if($("#"+a).hasClass("tmceFullHtmlAllowed")){b={script_url:urls.js_local+"/tiny_mce/tiny_mce.js",mode:"textareas",theme:"advanced",skin:"lifeout",skin_variant:"black",content_css:urls.js_cdn+"/tiny_mce/themes/advanced/skins/lifeout/content.css",plugins:"style,table,advhr,advimage,advlink,emotions,spellchecker,insertdatetime,preview,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,nonbreaking,xhtmlxtras",theme_advanced_buttons1_add_before:"newdocument,separator",theme_advanced_buttons1_add:"fontselect,fontsizeselect",theme_advanced_buttons2_add:"separator,separator,forecolor,backcolor",theme_advanced_buttons2_add_before:"cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",theme_advanced_buttons3_add_before:"tablecontrols,separator",theme_advanced_buttons3_add:"spellchecker,advhr,separator,ltr,rtl,separator,fullscreen,preview",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_path_location:"bottom",plugin_insertdate_dateFormat:"%Y-%m-%d",plugin_insertdate_timeFormat:"%H:%M:%S",theme_advanced_resize_horizontal:false,theme_advanced_resizing:true,theme_advanced_disable:"styleselect,help",nonbreaking_force_tab:true,apply_source_formatting:true,relative_urls:false,convert_urls:false}}else{if($("#"+a).hasClass("tmcePartialHtmlAllowed")){b={script_url:urls.js_local+"/tiny_mce/tiny_mce.js",mode:"textareas",theme:"advanced",skin:"lifeout",skin_variant:"black",content_css:urls.js_cdn+"/tiny_mce/themes/advanced/skins/lifeout/content.css",plugins:"style,spellchecker,advimage,advlink",theme_advanced_buttons1:"bold,italic,underline,separator,link,unlink,separator,image,separator,forecolor,separator,spellchecker",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",nonbreaking_force_tab:true,apply_source_formatting:true,relative_urls:false,convert_urls:false}}else{b={script_url:urls.js_local+"/tiny_mce/tiny_mce.js",mode:"textareas",theme:"advanced",skin:"lifeout",skin_variant:"black",content_css:urls.js_cdn+"/tiny_mce/themes/advanced/skins/lifeout/content.css",plugins:"spellchecker",theme_advanced_buttons1:"spellchecker",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",nonbreaking_force_tab:true,apply_source_formatting:true,relative_urls:false,convert_urls:false}}}$("#"+a).tinymce(b);return false}function toggle_tinymce(a){if(!tinymce_inited[a]){tinymce_inited[a]=true;tinymce_shown[a]=true;setup_tinymce(a)}else{if(tinymce_shown[a]){tinymce_shown[a]=false;tinyMCE.execCommand("mceRemoveControl",false,a)}else{tinymce_shown[a]=true;tinyMCE.execCommand("mceAddControl",false,a)}}return false}function save_tinymce(a){if(tinymce_shown[a]){tinyMCE.execCommand("mceRemoveControl",false,a)}}function boxyAlert(a){Boxy.alert(a,null,{title:"Alert",titleAddClass:"general",closeable:false,fixed:false,modal:true,hideShrink:false})}function boxyConfirm(a,b){boxyConfirmCallback=b;Boxy.ask(a,{"1":"Yes","2":"No"},boxyConfirmProcess,{title:"Confirm",titleAddClass:"general",closeable:false,fixed:false,modal:true,hideShrink:false})}function boxyConfirmProcess(a){if(a=="1"){if(typeof boxyConfirmCallback=="string"){window.location=boxyConfirmCallback}else{boxyConfirmCallback()}}}$(document).ready(function(){var a=0;navigation();$("#site-msg").innerfade({animationtype:"fade",type:"random",speed:750,timeout:5000,containerheight:"60px"});$("form.submitOnce").livequery("submit",function(){$(this).find("input[type=submit],input[type=button],input[type=reset],button").attr("disabled","disabled")});$(".imdisabled").live("click",function(){boxyAlert('In order to IM someone, you must first enable IM.  From the right side of the home page, set your IM status to "online".')});$("a.confirmDelete").live("click",function(){boxyConfirm("Are you sure you wish to delete this?",this.href);return false});$("a.mini-profile").livequery(function(){$(this).cluetip({showTitle:false,clickThrough:true,hoverIntent:{sensitivity:1,interval:250,timeout:400}})});$(".pagination-all-click").livequery(function(){$(this).cluetip({activation:"click",width:175,height:100,local:true,showTitle:false,cluetipClass:"pagination",dropShadow:false})});$(".Comment, .CommentSmall").live("mouseover",function(){$(this).find(".mouseOverShow").show();$(this).css("background-color","#404040")});$(".Comment, .CommentSmall").live("mouseout",function(){$(this).find(".mouseOverShow").hide();$(this).css("background-color","#333333")});$(".toggleAdvancedEditor").livequery(function(){$(this).html('[ <a href="#" onclick="return toggle_tinymce(\''+$(this).attr("id").replace(/toggleAdvancedEditor-/,"")+"');\">Toggle Advanced Editor</a> ]")});jQuery("<img>").attr("src",urls.inc_cdn+"/include/imgs/v4/mail-icon-0.gif");jQuery("<img>").attr("src",urls.inc_cdn+"/include/imgs/v4/mail-icon-1.gif");$(document).everyTime(1500,function(b){if(mail.count){if(a==0){$("#mail-icon").css({"background-image":"url('"+urls.inc_cdn+"/include/imgs/v4/mail-icon-1.png')"});a=1}else{$("#mail-icon").css({"background-image":"url('"+urls.inc_cdn+"/include/imgs/v4/mail-icon-0.png')"});a=0}}});$(document).everyTime(60000,function(b){$.ajax({url:"/mailupdater.php",data:{},cache:false,success:function(c){mail.count=parseInt(c.mail_count);$("#mail-icon").attr("title",mail.count+" unread messages");$("#mail-icon").html(mail.count+" unread messages")}})})});