function myFileBrowser(a,b,c,d){var e="/filebrowser";if(e.indexOf("?")<0){e=e+"?type="+c}else{e=e+"&type="+c}tinyMCE.activeEditor.windowManager.open({file:e,title:"My File Browser",width:600,height:400,resizable:"yes",inline:"yes",close_previous:"no"},{window:d,input:a});return false}function deleteNotificacao(a){ajaxAction("apaganotificacao",{id:a},function(b){if(b==1)$("#notif"+a).fadeOut("slow");else alert("Ocorreu um erro desconhecido.")})}function twDisconnect(){if(confirm("Tem certeza que deseja desconectar sua conta do Twitter?")){location.href(SITEDIR+"/home/settings/connections/twdisconnect")}}function postApaga(a,b){if(confirm("Tem certeza que deseja excluir permanentemente este post?")){$.post(SITEDIR+"/actions/admin/apagaPost",{tipo:a,id:b},function(a){$("#tr_post_"+b).toggle()})}}function postMudaStatus(a,b){alert("tipo:"+a+" post: "+b);var c=$("#status_"+a+"_"+b).val();if(c==1)postAprova(a,b);else if(c==2)postReprova(a,b);else $.post(SITEDIR+"/actions/admin/postMudaStatus",{tipo:a,id:b,status:c},function(c){$("#td_"+a+"_"+b).attr("style","background-color:"+c)})}function postReprova(a,b){if(confirm("Tem certeza que deseja reprovar este post?")){$.post(SITEDIR+"/actions/admin/postReprovar",{tipo:a,id:b},function(c){$("#td_"+a+"_"+b).attr("style","background-color:"+c)})}}function postAprova(a,b){if(confirm("Tem certeza que deseja aprovar este post? Os pontos serão creditados na conta do usuário.")){$.post(SITEDIR+"/actions/admin/postPublicar",{tipo:a,id:b},function(c){$("#td_"+a+"_"+b).attr("style","background-color:"+c)})}}function destMudaStatus(a){$.post(SITEDIR+"/actions/admin/destMudaStatus",{id:a},function(a){$("#destStatus_"+post).html('<img src="/imagens/icones/status_'+a+'.png" />')})}function putDestaqueCan(a,b){$.post(SITEDIR+"/actions/admin/putDestaqueCan",{tipo:a,id:b},function(c){$("#postDCan_"+a+"_"+b).html('<img src="/imagens/icones/status_'+c+'.png" />')})}function putDestaqueRot(a,b){$.post(SITEDIR+"/actions/admin/putDestaqueRot",{tipo:a,id:b},function(c){$("#postDRot_"+a+"_"+b).html('<img src="/imagens/icones/status_'+c+'.png" />')})}function putDestaqueEspecial(a){$.post(SITEDIR+"/actions/admin/putDestaqueEspecial",{id:a},function(b){$("#especialStatus_"+a).html('<img src="/imagens/icones/status_'+b+'.png" />')})}function putDestaque(a){$.post(SITEDIR+"/actions/admin/putDestaque",{cat:a},function(b){$("#catStatus_"+a).html('<img src="/imagens/icones/status_'+b+'.png" />')})}function checkemail(a,b){var c=new getHTTPObject;c.open("POST","/actions/admin/checkEmail",false);c.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8;");var d="email="+a+"&XMLHttpRequest=test";c.send(d);if(c.status==200){document.getElementById(b).innerHTML=c.responseText}}function checklogin(a,b){var c=new getHTTPObject;c.open("POST","/actions/admin/checkNickname",false);c.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8;");var d="nick="+a+"&XMLHttpRequest=test";c.send(d);if(c.status==200){document.getElementById(b).innerHTML=c.responseText}}function showTooltip(a){var b=document.getElementById(a);if(b.style.display=="block"){b.style.display="none"}else{b.style.display="block"}}function updateLegenda(a){var b=$("#foto_legenda").val();ajaxAction("updateLegenda",{id:a,legenda:b},function(a){$("#foto_legenda_texto").html(b);jqueryShowHide("editaLegenda")})}function deleteFoto(a,b){if(confirm("Tem certeza que deseja excluir esta foto?")){ajaxAction("apagafoto",{id:b},function(b){if(b==0)alert("Você não tem permissão para exluir esta foto.");else{alert("Foto excluída.");window.location.href=SITEDIR+"/profile/"+a}})}}function updateAlbum(a){loadContentBox("formEditAlbum",{album:a})}function unfollow(a){ajaxAction("unfollow",{user:a},function(a){jQuery.facebox(a)})}function follow(a){ajaxAction("follow",{user:a},function(a){jQuery.facebox(a)})}function verifyvideo(a){ajaxAction("verifyvideo",{video:a},function(a){document.getElementById("msg_verify").innerHTML=a})}function followTW(){ajaxAction("twFollow",args,function(a){jQuery.facebox(a)})}function ajaxLogin(a,b){var c=$("#inp_login").val();var d=$("#inp_senha").val();ajaxAction("checkEmail",{login:c,senha:d,template:b},function(b){if(b){$("#"+a).html(b)}else{alert("Erro de Autenticação. Verifique se os dados estão corretos.")}})}function checkEmail(a,b){ajaxAction("checkEmail",{email:a},function(a){$("#"+b).html(a)})}function checkLogin(a,b){ajaxAction("checkLogin",{login:a},function(a){$("#"+b).html(a)})}function loadFAQ(a){$.post(SITEDIR+"/actions/getContent/faq",{cat:a},function(a){jQuery.facebox(a)})}function loadContentBox(a,b){$.post(SITEDIR+"/actions/getContent/"+a,b,function(a){jQuery.facebox(a)})}function loadContent(a,b,c){$.post(SITEDIR+"/actions/getContent/"+a,c,function(a){$("#"+b).html(a)})}function ajaxAction(a,b,c){$.post(SITEDIR+"/actions/ajaxutil/"+a,b,c)}function jqueryHide(a){$("#"+a).fadeOut("slow")}function jqueryShowHide(a){$("#"+a).toggle("slow")}function hideContent(a){var b=document.getElementById(a);b.style.display="none"}function showContent(a){var b=document.getElementById(a);b.style.display="block"}function showHideContent(a){var b=document.getElementById(a);if(b.style.display=="block"){b.style.display="none"}else{b.style.display="block"}}jQuery(document).ready(function(a){a("a[rel*=facebox]").facebox();a("ul.dropdown li").hover(function(){a(this).addClass("hover");a("ul:first",this).css("visibility","visible")},function(){a(this).removeClass("hover");a("ul:first",this).css("visibility","hidden")});a("ul.dropdown li ul li:has(ul)").find("a:first").append(" » ")})

