
jQuery('document').ready(function(){$(".run, #jquery-test-box").click(function(){$("#jquery-test-box").animate({opacity:"0.1",left:"+=400"},1200).animate({opacity:"0.4",top:"+=160",height:"20",width:"20"},"slow").animate({opacity:"1",left:"0",height:"100",width:"100",backgroundColor:"green"},"slow").animate({top:"0"},"fast").slideUp().slideDown("slow");$("#jquery-test-return").html("The BASEURL for this Site is "+BASEURL);return false;});$(".run-footer, #jquery-test-footer-box").click(function(){$("#jquery-test-footer-box").animate({backgroundColor:'red'},1000).animate({backgroundColor:'blue'},1000);$("#jquery-test-return").html("The BASEURL for this Site is "+BASEURL);return false;});});
sfHover=function(){var sfEls=document.getElementById("category_bar").getElementsByTagName("li");for(var i=0;i<sfEls.length;i++){sfEls[i].onmouseover=function(){this.className+=" sfhover";}
sfEls[i].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"");}}}
if(window.attachEvent)window.attachEvent("onload",sfHover);
jQuery('document').ready(function($){$(".widget_onoff").click(function(){$.fn.widget_onoff($(this));});});$.fn.widget_onoff=function(widget){var currentId=widget.attr("id");var widget_image=widget.children("img").attr("src");this.widget_image=$(widget_image);var action='';var image_names=widget_image.split('/');var image_name=image_names[image_names.length-1];if(image_name=="active.png"){action='disable';}else{action='enable';}
var formdata='plugin=widgets&action='+action+'&widget='+currentId;var sendurl=BASEURL+'content/plugins/widgets/widgets_functions.php';$.ajax({type:'post',url:sendurl,data:formdata,beforeSend:function(){widget.html('<img src="'+BASEURL+"content/admin_themes/"+ADMIN_THEME+'images/ajax-loader.gif'+'"/>');},error:function(XMLHttpRequest,textStatus,errorThrown){},success:function(data,textStatus){if(data.error===true){}
else
{var img_src="";if(data.enabled=='true'){img_src="active.png";}else{img_src="inactive.png";}
widget.html('<img src="'+BASEURL+"content/admin_themes/"+ADMIN_THEME+'images/'+img_src+'"/>');}
$('#return_message').html(data.message).addClass(data.color);$('#return_message').html(data.message).addClass('message');$('#return_message').fadeIn(1000).fadeout(1000);},dataType:"json"});}
$.fn.widget_order=function(widget){var currentId=widget.attr("id");var action=widget.attr("class");action=action.split("_");action="order_"+action[action.length-1];if(action=="up"){}else{}
var formdata='plugin=widgets&action='+action+'&widget='+currentId;var sendurl=BASEURL+'content/plugins/widgets/widgets_functions.php';$.ajax({type:'post',url:sendurl,data:formdata,beforeSend:function(){widget.html('<img src="'+BASEURL+"content/admin_themes/"+ADMIN_THEME+'images/ajax-loader.gif'+'"/>');},error:function(XMLHttpRequest,textStatus,errorThrown){widget.html('ERROR');},success:function(data,textStatus){if(data.error===true){}
else
{}
$('#return_message').html(data.message).addClass(data.color);$('#return_message').html(data.message).addClass('message');$('#return_message').css({display:"none"}).fadeIn(1000).delay(5000).fadeout(1000);},dataType:"json"});}
function urldecode(str){return decodeURIComponent(str.replace(/\+/g,'%20'));}
$(document).ready(function(){$(".comment_reply_link").click(function(){var target=$(this).parents(".comment");target=$(target).next("div").next("div");target.fadeToggle();target2=$(target).find("div.comment_status");target2.hide();return false;});$(".comment_edit_link").click(function(){var target=$(this).parents(".comment");target=$(target).next("div").next("div");target.fadeToggle();target2=$(target).find("div.comment_status");target2.show();return false;});$(".comment_show_hide").click(function(){var target=$(this).parents(".comment_header");target=$(target).next("div").next("div");target.fadeToggle();target2=$(target).find("div.comment_status");target2.show();return false;});});function reply_comment(baseurl,comment_id,comment_submit)
{document.getElementById("comment_process_"+comment_id).value='newcomment';document.getElementById("comment_content_"+comment_id).innerHTML='';document.getElementById("comment_submit_"+comment_id).value=comment_submit;}
function edit_comment(baseurl,comment_id,comment_content,comment_submit)
{document.getElementById("comment_process_"+comment_id).value='editcomment';document.getElementById("comment_content_"+comment_id).innerHTML=urldecode(comment_content);document.getElementById("comment_submit_"+comment_id).value=comment_submit;}
$(document).ready(function(){$(".alert_link").click(function(){var target=$(this).parents('div').next('div').children('div.alert_choices');target.fadeToggle();return false;});});function vote(id,rating)
{sendurl=BASEURL+"content/plugins/updown_voting/updown_voting_functions.php";$target_votes=$("#votes_"+id);$target_text_vote_top=$("#text_vote_top_"+id);$target_text_voted_top=$("#text_voted_top_"+id);$target_text_vote_down=$("#text_vote_down_"+id);$target_text_voted_down=$("#text_voted_down_"+id);var formdata="post_id="+id+"&rating="+rating;$.ajax({type:'post',url:sendurl,data:formdata,error:function(XMLHttpRequest,textStatus,errorThrown){$target_votes.html('err');},success:function(data){if(data.error===true){}
else{$target_votes.html(data.votes);$undo=data.undo;if(rating>0&&$undo==false){$target_text_vote_top.css('display','none');$target_text_voted_top.css('display','block');$target_text_vote_down.css('display','block');$target_text_voted_down.css('display','none');}else if(rating<0&&$undo==false){$target_text_vote_top.css('display','block');$target_text_voted_top.css('display','none');$target_text_vote_down.css('display','none');$target_text_voted_down.css('display','block');}else if($undo==true){$target_text_vote_top.css('display','block');$target_text_voted_top.css('display','none');$target_text_vote_down.css('display','block');$target_text_voted_down.css('display','none');}}},dataType:"json"});}
function urldecode(str){return decodeURIComponent(str.replace(/\+/g,'%20'));}
$(document).ready(function(){$("#journal_posts .show_post_edit").click(function(){var target=$(this).parents(".show_post_author_date");target=$(target).nextAll(".post_form");target.fadeToggle();return false;});});function reply_post(post_id,post_submit)
{document.getElementById("post_process_"+post_id).value='newpost';document.getElementById("post_content_"+post_id).innerHTML='';document.getElementById("post_submit_"+post_id).value=post_submit;}
function edit_post(post_id,post_content,post_submit)
{document.getElementById("post_process_"+post_id).value='editpost';document.getElementById("post_content_"+post_id).innerHTML=urldecode(post_content);document.getElementById("post_submit_"+post_id).value=post_submit;}
function edit_reply(comment_id,comment_content,comment_submit)
{document.getElementById("comment_process_"+comment_id).value='editcomment';document.getElementById("comment_content_"+comment_id).innerHTML=urldecode(comment_content);document.getElementById("comment_submit_"+comment_id).value=comment_submit;}
jQuery('document').ready(function($){BASEURL='http://favelicio.us/';ADMIN_THEME='admin_default/';THEME='yonda/';});
var xmlhttp=false;if(!xmlhttp&&typeof XMLHttpRequest!='undefined')
{try{xmlhttp=new XMLHttpRequest();}
catch(e){xmlhttp=false}}
function myXMLHttpRequest()
{var xmlhttplocal;if(!xmlhttplocal&&typeof XMLHttpRequest!='undefined'){try{var xmlhttplocal=new XMLHttpRequest();}
catch(e){var xmlhttplocal=false;}}
return(xmlhttplocal);}
var ajax=Array();var returnvalue=Array();jQuery.fn.fadeToggle=function(speed,easing,callback){return this.animate({opacity:'toggle'},speed,easing,callback);};$(document).ready(function(){$(".message").css({display:"none"}).fadeIn(1000);$(".table_drop_down").click(function(){var target=$(this).parents("tr").next("tr");target.fadeToggle();return false;});$(".table_hide_details").click(function(){$(this).parents("tr.table_tr_details").fadeOut();return false;});$(".forgot_password").click(function(){var target=$(this).next("form");target.fadeToggle();return false;});});$.extend({URLEncode:function(c){var o='';var x=0;c=c.toString();var r=/(^[a-zA-Z0-9_.]*)/;while(x<c.length){var m=r.exec(c.substr(x));if(m!=null&&m.length>1&&m[1]!=''){o+=m[1];x+=m[1].length;}else{if(c[x]==' ')o+='+';else{var d=c.charCodeAt(x);var h=d.toString(16);o+='%'+(h.length<2?'0':'')+h.toUpperCase();}x++;}}return o;},URLDecode:function(s){var o=s;var binVal,t;var r=/(%[^%]{2})/;while((m=r.exec(o))!=null&&m.length>1&&m[1]!=''){b=parseInt(m[1].substr(1),16);t=String.fromCharCode(b);o=o.replace(m[1],t);}return o;}});function handleEnter(field,event){var keyCode=event.keyCode?event.keyCode:event.which?event.which:event.charCode;if(keyCode==13){return false;}
else
return true;}