var loading_img="<img src=\"http://images.shoe.org/loading.gif\" width=\"16\" height=\"16\" alt=\"loading...\" class=\"loadingimg\" />";var SHOE_IMG_MIDGET_W="35";var SHOE_IMG_MIDGET_H="35";var SHOE_IMAGES_URI="http://images.shoe.org";var checker_interval;var buddylist_open;function SH_rm_Dialog(id){$("#"+id).dialog('destroy');$("#"+id).remove();$("#"+id+" .remove").expire();$("#"+id+" .add").expire();}
var ActiveToken='Profile';function make_token_input(){$("#taskbar_ui .searchField").tokenInput("/search.php",{hintText:unescape(decodeURIComponent("Enter%20Name%20or%20Email%20Address")),noResultsText:false,searchingText:unescape(decodeURIComponent("Searching...")),tokenlimit:1,submitAnyway:true,ignoreHiddenInput:true,autoSubmit:"#HeaderSearch form",position:"up",initCache:"_initMySearch",imgTemplage:"<img src=\"/images\/img.php?%s\" width=\"35\" height=\"35\" />",imgEmpty:"<img src=\"http://images.shoe.org/no_pic_MIDGET.png\" width=\"35\" height=\"35\" alt=\"\"/>",classes:{tokenList:"token-input-list-shoe",token:"token-input-token-shoe",tokenDelete:"token-input-delete-token-shoe",selectedToken:"token-input-selected-token-shoe",highlightedToken:"token-input-highlighted-token-shoe",dropdown:"token-input-dropdown-shoe",dropdownItem:"token-input-dropdown-item-shoe",dropdownItem2:"token-input-dropdown-item2-shoe",selectedDropdownItem:"token-input-selected-dropdown-item-shoe",inputToken:"token-input-input-token-shoe"}});}
function ico_link(){$(".ico_link").livequery(function(){$(this).click(function(event){$("body").css("cursor","wait");this.content=this.className.split(" ");var pos;var url;var user;var nickpage;var param;var identifier;for(i=0;i<this.content.length;i++){if(this.content[i].match("^_open_")=="_open_"){open_module=this.content[i].replace(/_open_/g,"");}else if(this.content[i].match("^_user_")=="_user_"){user=this.content[i].replace(/_user_/g,"");$.ajaxSetup({async:false});$.get('/includes/javascript/footerE.js.php?SH_ajax_get_buddy_name='+user,function(data){nickpage=data;});$.ajaxSetup({async:true});}else if(this.content[i].match("^_param_")=="_param_"){identifier=this.content[i];param=this.content[i].replace(/_param_/g,"");}else{continue;}}
switch(open_module){case"gallery":location.href=sprintf("http://%s.shoe.org",nickpage)+"/gallery/";break;case"messenger":break;case"email":$(document.body).append('<div id="SH_mailerDialog">Please wait while loading...<img src=\"http://images.shoe.org/loading.gif\" width=\"16\" height=\"16\" alt=\"loading...\" class=\"loadingimg\" /></div>');$("#SH_mailerDialog").load("?SH_ajax_openmail="+user).dialog({autoOpen:true,modal:true,close:function(ev,ui){SH_rm_Dialog("SH_mailerDialog");},position:['center',50],width:550,zIndex:6000,title:unescape(decodeURIComponent("Send%20Message"))});$("#SH_mailerDialog .remove").livequery(function(){$(this).click(function(){SH_rm_Dialog("SH_mailerDialog");});});break;case"friendreq":$(document.body).append('<div id="SH_friendsDialog">Please wait while loading...<img src=\"http://images.shoe.org/loading.gif\" width=\"16\" height=\"16\" alt=\"loading...\" class=\"loadingimg\" /></div>');var e=event||window.event,coordX=e.pageX||e.clientX+document.body.scrollLeft,coordY=e.pageY||e.clientY+document.body.scrollTop;$("#SH_friendsDialog").load("?SH_ajax_addFriend="+user).dialog({autoOpen:true,modal:true,close:function(ev,ui){SH_rm_Dialog("SH_friendsDialog");},position:[coordX,coordY-170],zIndex:6000,title:sprintf(unescape(decodeURIComponent("%25s%20Send%20Buddy%20Request")),nickpage)});$("#SH_friendsDialog .remove").livequery(function(){$(this).click(function(){SH_rm_Dialog("SH_friendsDialog");});});$("#SH_friendsDialog .add").livequery(function(){$(this).click(function(){$.post("/includes/javascript/footerE.js.php",{SH_ajax_addFriend:user,type:$("#SH_friendsDialog select").val(),msg:$("#SH_friendsDialog textarea").val()},function(data){var arr=$.evalJSON(data);if(arr.success){if(typeof($.scrollTo)=="undefined"){$.ajaxSetup({async:false});$.getScript("/includes/plugins/jquery_plugins/scrollTo/jquery.scrollTo-min.js?116");$.ajaxSetup({async:true});}
var msg=arr.success;$("#success_wrapper .success").html(msg);$("#success_wrapper").show("slow").animate({opacity:1.0},10000).hide("slow");$.scrollTo("#success_wrapper");}else if(arr.error){if(typeof($.scrollTo)=="undefined"){$.ajaxSetup({async:false});$.getScript("/includes/plugins/jquery_plugins/scrollTo/jquery.scrollTo-min.js?116");$.ajaxSetup({async:true});}
if(arr.error=="AUTO_LOGOUT"){var msg="<b >Auto Logout</b><br />You have been logged out automatically. Please log on again.";setTimeout("window.location.reload();",7000);}else{var msg=arr.error;}
$("#error_wrapper .error").html(msg);$("#error_wrapper").show("slow").animate({opacity:1.0},10000).hide("slow");$.scrollTo("#error_wrapper");}
SH_rm_Dialog("SH_friendsDialog");});});});break;case"edit_friend":$(this).closest(".cardbox").find(".toolbox").toggle();break;case"friends_mutual":location.href=sprintf("http://%s.shoe.org",nickpage)+"/friends/#c_mutual";break;case"gb":location.href=sprintf("http://%s.shoe.org",nickpage)+"/guestbook/";break;case"verified":location.href="/member/verification/";break;case"donated":location.href="/about/donate/";break;case"chat":location.href="http://chat.shoe.org/?content=onlinelist&sel_user="+user;break;case"award":location.href="/lesbian-community/awards/?user="+user;break;case"baby_pic":location.href="/lesbian-community/baby_pics/";break;case"myvideos":location.href=sprintf("http://%s.shoe.org",nickpage)+"/video/";break;case"mymusic":location.href=sprintf("http://%s.shoe.org",nickpage);break;case"myblog":location.href=sprintf("http://%s.shoe.org",nickpage)+"/blog/";break;case"home":location.href=sprintf("http://%s.shoe.org",nickpage);break;case"blog_add":location.href=sprintf("http://%s.shoe.org",nickpage)+"/blog/?new=1";break;case"subscribe":case"unsubscribe":var c_type=false;if(param.match("^blog_c_")=="blog_c_"){var c_target=param.replace(/blog_c_/g,"");var c_mod="blog_comment";}else if(param.match("^pix_c_")=="pix_c_"){var c_target=param.replace(/pix_c_/g,"");var c_mod="pix_comment";}else if(param.match("^bubble_c_")=="bubble_c_"){var c_target=param.replace(/bubble_c_/g,"");var c_mod="bubble_comment";}else if(param=="blog"){var c_target=user;var c_mod="blog";}else if(param=="pix"){var c_target=user;var c_mod="pix";var c_type=this.className.match("pix_"+open_module);}else if(param=="movie"){var c_target=user;var c_mod="video";var c_type=this.className.match("movie_"+open_module);}else if(param=="bubble"){var c_target=user;var c_mod="bubble";var c_type=this.className.match("bubble_"+open_module);}else{alert("module error: no target!");$("body").css("cursor","auto");return false;}
var my_this=$(this);$.post("/includes/javascript/footerE.js.php",{"SH_ajax_subscriber":c_mod,"target":c_target},function(data){var arr=$.evalJSON(data);if(arr.success){if(arr.success=='subscribed'){if(param=='pix'&&!c_type){my_this.attr("title",unescape(decodeURIComponent("%3Cb%20%3EFollowing%20Photo%20Uploads%3C%2Fb%3E%3Cbr%20%2F%3E%3Cbr%20%2F%3EClick%20here%20to%20end%20subscription.%3Cbr%20%2F%3E"))).attr("alt",unescape(decodeURIComponent("%3Cb%20%3EFollowing%20Photo%20Uploads%3C%2Fb%3E%3Cbr%20%2F%3E%3Cbr%20%2F%3EClick%20here%20to%20end%20subscription.%3Cbr%20%2F%3E"))).css("background-image","url(http://images.shoe.org/icons/images_unsubscr_16.png)");}else if(param=='bubble'&&!c_type){my_this.attr("title",unescape(decodeURIComponent("Following%20BUBBLE%21%20-%20Click%20here%20to%20end%20subscription."))).attr("alt",unescape(decodeURIComponent("Following%20BUBBLE%21%20-%20Click%20here%20to%20end%20subscription."))).css("background-image","url(http://images.shoe.org/icons/comments_unsubscr_16.png)");}else{$("._open_subscribe."+identifier).hide();$("._open_unsubscribe."+identifier).show();}}else{if(param=='pix'&&!c_type){my_this.attr("title",unescape(decodeURIComponent("Subscribe%20to%20new%20Photo%20Uploads%20from%20this%20user."))).attr("alt",unescape(decodeURIComponent("Subscribe%20to%20new%20Photo%20Uploads%20from%20this%20user."))).css("background-image","url(http://images.shoe.org/icons/images_subscr_16.png)");}else if(param=='bubble'&&!c_type){var desc=unescape(decodeURIComponent("Follow%20this%20BUBBLE%21"));my_this.attr("title",desc).attr("alt",desc).css("background-image","url(http://images.shoe.org/icons/comments_subscr_16.png)");}else{$("._open_unsubscribe."+identifier).hide();$("._open_subscribe."+identifier).show();}}}
$("body").css("cursor","auto");});break;case"gallery_upload":location.href="/member/update/images.php";break;case"movie_edit":ajaxtooltipmodal("/video/?edit_movies=1");break;default:alert("default (do nothing...) "+open_module);break;}
$("body").css("cursor","auto");});});}
function closeIt(Element){$(Element).hide();}
function show(Element){$(Element).toggle();if($(Element+"Arrow").attr("src")=='http://images.shoe.org/design/arr_down.png'){$(Element+"Arrow").attr("src","http://images.shoe.org/design/arr_up.png");}else{$(Element+"Arrow").attr("src","http://images.shoe.org/design/arr_down.png");}}
function listener(){ico_link();}
this.SHpop=function(opt){var options=opt[options];if(!opt['id'])opt['id']='external';var toolbar=(opt['toolbar']?opt['toolbar']:0);var location=(opt['location']?opt['location']:0);var width=(opt['width']?opt['width']:500);var height=(opt['height']?opt['height']:550);var menubar=(opt['menubar']?opt['menubar']:1);var status=(opt['status']?opt['status']:0);var scrollbars=(opt['scrollbars']?opt['scrollbars']:1);var resizable=(opt['resizable']?opt['resizable']:1);var left=screenX=(opt['left']?opt['left']:0);var top=screenY=(opt['top']?opt['top']:0);if(!options){switch(opt['id']){default:options="toolbar="+toolbar+",location="+location+",width="+width+",height="+height+",menubar="+menubar+",status="+status+",scrollbars="+scrollbars+",resizable="+resizable+",screenX="+left+",screenY="+top+",left="+left+",top="+top;break;}}
window.open(opt['href'],opt['id'],options);return false;}
$(document).ready(function(){$("#themes a").click(function(e){e.preventDefault();$("#themes a").removeClass("on");$(this).addClass("on");var styleid=this.id;$("link[id^='link_']").each(function(){if(this.getAttribute("id")==("link_"+styleid))
this.disabled=false;else
this.disabled=true;});$.get("/includes/config.inc",{changeUserTheme:styleid});return false;});$(".showhide").livequery(function(){$(this).click(function(e){e.preventDefault();$(this).children("img").toggleClass("close");if(!$(this).hasClass("childMousePosition")){$(this).next(".showhide_child").toggle();}else{$(".SHOWHIDE__moved").remove();$(".SHOWHIDE__close").removeClass("SHOWHIDE__close");if(!$(this).find("img").hasClass("close")){return false;}
xOffset=10;yOffset=10;var mouseX=e.pageX;var mouseY=e.pageY;var posX=parseInt(mouseX+xOffset);var posY=parseInt(mouseY+yOffset);$(this).next(".showhide_child").clone(true).addClass("SHOWHIDE__moved").appendTo(document.body).css("position","absolute").css("top",posY+"px").css("left",posX+"px").show();$(this).find("img").addClass("SHOWHIDE__close")}
return false;});});$(".showhide_child .showhide").livequery(function(){$(this).click(function(e){e.preventDefault();if($(this).hasClass("showhide_separate")){return false;}
if($(this).parents().hasClass("SHOWHIDE__moved")){$(".SHOWHIDE__close").removeClass("close").removeClass("SHOWHIDE__close");$(".SHOWHIDE__moved").remove();}else{$(this).parents(".showhide_child").toggle();$(this).parents(".showhide_child").children("img").toggleClass("close");}
return false;});});$('a.SHpop').click(function(){var id;var options;this.content=this.rel.split(' ');for(i=0;i<this.content.length;i++){this.arr=this.content[i].split(':');if(this.arr[0]=='id'){id=this.arr[1];}
if(this.arr[0]=='options'){options=this.arr[1];}}
var opt={id:id,options:options,href:this.href};SHpop(opt);return false;});$(".ReportAbuse").livequery(function(){$(this).click(function(event){this.content=this.className.split(' ');for(i=0;i<this.content.length;i++){if(this.content[i].match("^_bl_")=="_bl_"){var user=this.content[i].replace(/_bl_/g,"");}else if(this.content[i].match("^_content_")=="_content_"){var cont=this.content[i].replace(/_content_/g,"");}else{continue;}}
$(document.body).append('<div id="SH_reportingDialog">Please wait while loading...<img src=\"http://images.shoe.org/loading.gif\" width=\"16\" height=\"16\" alt=\"loading...\" class=\"loadingimg\" /></div>');$("#SH_reportingDialog").load("?SH_ajax_reporting="+cont).dialog({autoOpen:true,modal:true,close:function(ev,ui){SH_rm_Dialog("SH_reportingDialog");},buttons:{'Report!':function(){if(typeof($("#SH_reportingDialog input[type=radio]:checked").val())=="undefined"){alert(unescape(decodeURIComponent("Please%20select%20an%20option.")));return false;}else if($("#SH_reportingDialog input[type=radio]:checked").val()!='bl'&&$("#SH_reportingDialog textarea").val()==''){alert(unescape(decodeURIComponent("Please%20let%20us%20know%20if%20a%20few%20short%20words%2C%20why%20you%20wish%20to%20report%20this%20user.")));}else{$.post("/includes/javascript/footerE.js.php",{"SH_ajax_reporting":cont,"action":$("#SH_reportingDialog input[type=radio]:checked").val(),"comment":$("#SH_reportingDialog textarea").val()},function(data){var arr=$.evalJSON(data);if(arr.success){if(typeof($.scrollTo)=="undefined"){$.ajaxSetup({async:false});$.getScript("/includes/plugins/jquery_plugins/scrollTo/jquery.scrollTo-min.js?116");$.ajaxSetup({async:true});}
var msg=arr.success;$("#success_wrapper .success").html(msg);$("#success_wrapper").show("slow").animate({opacity:1.0},10000).hide("slow");$.scrollTo("#success_wrapper");}
if(arr.error){if(typeof($.scrollTo)=="undefined"){$.ajaxSetup({async:false});$.getScript("/includes/plugins/jquery_plugins/scrollTo/jquery.scrollTo-min.js?116");$.ajaxSetup({async:true});}
if(arr.error=="AUTO_LOGOUT"){var msg="<b >Auto Logout</b><br />You have been logged out automatically. Please log on again.";setTimeout("window.location.reload();",7000);}else{var msg=arr.error;}
$("#error_wrapper .error").html(msg);$("#error_wrapper").show("slow").animate({opacity:1.0},10000).hide("slow");$.scrollTo("#error_wrapper");}});SH_rm_Dialog("SH_reportingDialog");}},'Cancel':function(){SH_rm_Dialog("SH_reportingDialog");}},position:['center',50],width:550,zIndex:6000,title:unescape(decodeURIComponent("Reporting%20User"))});$("#SH_reportingDialog .remove").livequery(function(){$(this).click(function(){SH_rm_Dialog("SH_reportingDialog");});});return false;})});if($("#taskbar_ui .token-input-dropdown-shoe").length==0){make_token_input();}
$("#taskbar_ui select[name=stype]").change(function(){if($(this).val()!='Profile'){if(ActiveToken=='Profile'){$("#taskbar_ui .searchField").val("");}
$("#taskbar_ui .token-input-list-shoe").remove();$("#taskbar_ui .token-input-dropdown-shoe").remove();$("#taskbar_ui .searchField").unbind();$("#taskbar_ui .searchField").show();ActiveToken=$(this).val();}else{make_token_input();}});$("#taskbar_ui .SearchSubmit").unbind("click").bind("click",function(){$("#HeaderSearch form").submit();});ico_link();if($(".boxWidthWrapper")){$(".boxWidthWrapper").each(function(){$(this).width($(this).width()+2);});}
$.timeout(function(){checker();},1000*5);$.clear(checker_interval);checker_interval=$.interval(function(){checker();},1000*60);$("#taskbar_ui .checkmail").click(function(){location.href="/member/msg_center/";return false;});$("#taskbar_ui .buddylist .online").unbind("click").bind("click",function(){if(!buddylist_open){buddylist_open=true;$("body").css("cursor","wait");$.get("/includes/javascript/footerE.js.php",{SH_ajax_get_online_buddylist:1},function(data){$("body").css("cursor","auto");$("#taskbar_ui").css("overflow","visible");if(typeof(flickering)!="undefined"){flickering=false;}
$("#taskbar_ui .buddylist .list").html(data).slideDown();});}else{buddylist_open=false;$("#taskbar_ui .buddylist .list").slideUp();}
return false;});$("button.link").click(function(){if(this.title!=''){location.href=this.title;return false;}});});var today=new Date();var identifyer=Math.round(Math.random()*(today.getTime()-1))+1;var newMailTimeout;var oldTitle=document.title;function newMailAlert(count){var msg=count+" "+unescape(decodeURIComponent("New%20Message"));if(count>0&&!newMailTimeout){newMailTimeout=setInterval(function(){document.title=document.title==msg?oldTitle:msg;},1000);}else{clearInterval(newMailTimeout);document.title=oldTitle;}
window.onmousemove=function(){clearInterval(newMailTimeout);document.title=oldTitle;window.onmousemove=null;};document.onfocus=function(){clearInterval(newMailTimeout);document.title=oldTitle;};}
function checker(){$.get("/includes/checker.php",{random:identifyer},function(data){if(data){var arr=$.evalJSON(data);newMailAlert(arr.checkmail.total);if(arr.checkmail.total>0){$("#taskbar_ui .checkmail span").html(arr.checkmail.total_string);$("#taskbar_ui .checkmail .newmail").show();$("#taskbar_ui .checkmail .msgcenter").hide();if(arr.checkmail.content){$("#taskbar_ui").css("overflow","visible");if(typeof(flickering)!="undefined"){flickering=false;}
$("#taskbar_ui .checkmail .mailpreview").html(arr.checkmail.content).slideDown();$.timeout(function(){$("#taskbar_ui .checkmail .mailpreview").slideUp();},10000);}}else{if(arr.checkmail.unread>0){$("#taskbar_ui .checkmail .msgcenter .unread").html(" ("+arr.checkmail.unread+")");}else{$("#taskbar_ui .checkmail .msgcenter .unread").html("");}
$("#taskbar_ui .checkmail .newmail").hide();$("#taskbar_ui .checkmail .msgcenter").show();}
if(arr.buddies.total>0){$("#taskbar_ui .buddylist .online span").html(arr.buddies.total_string);$("#taskbar_ui .buddylist .task").hide();$("#taskbar_ui .buddylist .online").show();}else{$("#taskbar_ui .buddylist .online").hide();$("#taskbar_ui .buddylist .task").show();}
if(arr.buddies.content){$("#taskbar_ui").css("overflow","visible");if(typeof(flickering)!="undefined"){flickering=false;}
$("#taskbar_ui .buddylist .list").html(arr.buddies.content).slideDown();$.timeout(function(){$("#taskbar_ui .buddylist .list").slideUp();},1000*10);}}});}
function jquery_show_dialog(type,message,scrollto,timeout){if(typeof scrollto==="undefined"){var scrollto=true;}
if(typeof timeout==="undefined"){var timeout=10000;}
if(scrollto){if(typeof($.scrollTo)=="undefined"){$.ajaxSetup({async:false});$.getScript("/includes/plugins/jquery_plugins/scrollTo/jquery.scrollTo-min.js?116");$.ajaxSetup({async:true});}}
if(type=="error"){if(message=="AUTO_LOGOUT"){var msg="<b >Auto Logout</b><br />You have been logged out automatically. Please log on again.";setTimeout("window.location.reload();",7000);}else{var msg=message;}}else{var msg=message;}
$("#"+type+"_wrapper ."+type).html(msg);$("#"+type+"_wrapper").show("slow").animate({opacity:1.0},timeout).hide("slow");if(scrollto){$.scrollTo("#"+type+"_wrapper");}}