Cufon.replace('.navlinks a', { fontFamily: 'frizqt' });
Cufon.replace('h1', { fontFamily: 'frizqt' });
if(wowbug.user.groupid==3 || wowbug.user.groupid==4) administration = 1; else administration = 0;

function report(url, title){
 var pr = prompt('Почему не работает?','');
 if(!pr) return false;
 $.get('/mchat/', function(i){
  $.post('/mchat/', {ajax: 1, a: 8, numa: 0, s: $('input[name="s"]', i).val(), message: 'Не работает [url='+url+']'+title+'[/url] (причина: '+pr+').'}, function(){_uWnd.alert('Жалоба успешно отправленна!','Сообщение',{w:200,h:70,tm:6666})})
 });
}

function newvip() {
 var nv = prompt("Введите ИД пользователя", "");
 if (nv != '' && nv != null) {window.open('/index/8-'+nv+'?setvip')}
}

function checkscreen(fid) {
 if(document.getElementById('screen'+fid+'m').width<198) document.getElementById('screen'+fid).parentNode.parentNode.style.border='1px solid red';
}

function toggle(x) {
 if(document.getElementById(x).style.display=='none') document.getElementById(x).style.display = 'block';
 else document.getElementById(x).style.display = 'none';
}

function moderbutton(value,mesid,uid,tname) {
 if(value=='+1') {var add = 'add1'; var t = '+10 бонус активности';}
 if(value=='+2') {var add = 'add2'; var t = '+20 бонус активности';}
 if(value=='+3') {var add = 'add3'; var t = '+30 бонус активности';}
 if(value=='-1') {var add = 'minus'; var t = '-10 бонус активности';}
 if(value=='del') {var add = 'del'; var t = 'Бонус/штраф активность удалена';}
 window.open('/index/11-'+uid+'?'+add);
 if(document.getElementById('addtext'+mesid).checked == true) {location.href = 'http://wowbug.info/load/0-0-0-'+mesid+'-13?2&'+escape(t);}
 if(document.getElementById('pm'+mesid).checked == true) {window.open('/index/14-'+uid+'-0-1?'+value+'.'+mesid+'.'+escape(tname))}
}

function setfilecat(id,newcat) {
 if(newcat!=0) {
 newcati = newcat-1;
 location.href = 'http://wowbug.info/load/0-0-0-'+id+'-13?cat='+newcati;
 }
}

function setfiletype(id,newtype) {
 location.href = 'http://wowbug.info/load/0-0-0-'+id+'-13?type='+newtype;
}

function setfiletitle(id,curtitle) {
 var ftitle = prompt('Введите новое название',curtitle);
 location.href = 'http://wowbug.info/load/0-0-0-'+id+'-13?title='+escape(ftitle);
}

$(document).ready(function() {
 var opacity_time = 250;
 $('div.button_upload').css('opacity','0.5');
 $('div.button_upload').hover(function() {$(this).animate({opacity: '1'},opacity_time)}, function() {$(this).animate({opacity: '0.5'},opacity_time)});
 $('td.eButtons div').css('opacity','0.5');
 $('td.eButtons div').hover(function() {$(this).animate({opacity: '1'},opacity_time)}, function() {$(this).animate({opacity: '0.5'},opacity_time)});

 $(".eText").each(function () { $(this).html($(this).html().replace(/\[moder([1-3])\=\"(admin|Virusyatina|Tronik|Brand|Neophyte|Orz|Freelancer)\"\](.*?)\[\/moder\1\]/ig, "<table class=\"moder\"><tr><td rowspan=\"2\" class=\"moder$1\" width=\"34\" height=\"40\"></td><td><a href=\"javascript://\" onclick=\"window.open('/index/8-0-$2'); return false; \">$2</a></td></tr><tr><td>$3</td></tr></table>").replace(/\[moder([1-3])\=\"(.*?)\"\](.*?)\[\/moder\1\]/ig, administration === 1 ? "<div class=\"moder_alert\"><table class=\"moder\"><tr><td rowspan=\"2\" class=\"moder$1\" width=\"34\" height=\"40\"></td><td><a href=\"javascript://\" onclick=\"window.open('/index/8-0-$2'); return false; \">$2</a></td></tr><tr><td>$3</td></tr></table></div>" : "")); });
});