function res(){
	var ajax = new dle_ajax();
	ajax.onShow ('');
	var varsString = "";
	ajax.setVar("w","r");
	ajax.requestFile = 'http://admin-club.ru/ia.php';
	ajax.method = 'POST';
	ajax.element = 'resv';
	ajax.sendAJAX(varsString);
}
function ia_umnica(w,i){
	var ajax = new dle_ajax();
	ajax.onShow ('');
	var varsString = "";
	ajax.setVar("w",w);
	ajax.requestFile = 'http://admin-club.ru/ia.php';
	ajax.method = 'POST';
	ajax.element = i;
	ajax.sendAJAX(varsString);

}
function vivi()
{
document.getElementById('myn').style.display='none';
document.getElementById('myn2').style.display='';
}

function can(){
document.getElementById('myn').style.display='';
document.getElementById('myn2').style.display='none';
}
function aga(){
	var ajax = new dle_ajax();
	ajax.onShow ('');
	var varsString = "";
ajax.setVar("text",document.getElementById('text').innerHTML);
	ajax.setVar("w","other");
	ajax.requestFile = 'http://admin-club.ru/ia.php';
	ajax.method = 'POST';
	ajax.element = 'myn2';
	ajax.sendAJAX(varsString);
}
function tech(id, b){
	var ajax = new dle_ajax();
	if(b&&b!=2)ajax.onShow ('');
	var varsString = "";
	ajax.requestFile = 'http://admin-club.ru/engine/ipb.php?do='+id+(b?'&fresh=1':'')+'&b='+b;
	ajax.element = "tech"+id;
	ajax.sendAJAX(varsString);
}
function wowhow(){
    var o = document.getElementById('supermain');
    var e = document.getElementById('wowhow');
    if(o){
        if(o.style.display!='none'){
            $('#wowhow').fadeIn(300);
            $('#supermain').fadeOut(300);
        	$.post('/wowhow.php', {}, function(data){
        		$("#wowhow").fadeOut(300, function() {
        			$(this).removeClass("acres");
        			$(this).html(data);
        			$(this).fadeIn(300);
        		});
        	});            
        }else{
            $('#supermain').fadeIn(500);
            $('#wowhow').fadeOut(300);
            $('#wowhow').html("Загрузка информации о модуле... Пожалуйста, подождите.");
            $('#wowhow').addClass("acres");
        }

    }
}

function liker(){
    $.post('/liker.php', {}, function(data){
    	$("#liker").fadeOut(300, function() {
    		$(this).html(data);
    		$(this).fadeIn(300);
    	});
    }); 
}

$(document).ready(function(){
    if($(window).width()>=1200)$.get('/s8.php', {}, function(data){
    	$("#s8").fadeOut(300, function() {
    		$(this).html(data);
    		$(this).fadeIn(300);
            fonar();
    	});
    }); 
    gogoLinks();
    if($("#see_mail")){
        SeeMail();
    }
});

function fonar(){
 $("#jj").addClass(function(index, currentClass) {
    var addedClass;

    if ( currentClass === "j1" ) {
        $(this).removeClass("j1");
      addedClass = "j2";
    }else{
        $(this).removeClass("j2");
      addedClass = "j1"; 
    }
  
    return addedClass;
  });
  setTimeout("fonar()", 500);
}

function gogoLinks(){
    try { var nl=document.getElementById('mmen').getElementsByTagName('a'); var found=-1; var url=document.location.href+'/'; var len=0; for (var i=0;i<nl.length;i++){ if (url.indexOf(nl[i].href)>=0){ if (found==-1 || len<nl[i].href.length){ found=i; len=nl[i].href.length; } } } if (found>=0){ nl[found].className='m'; } } catch(e){}    
}

function SeeMail(){
    $.post('/engine/ajax/mail.php', {}, function(data){
    	$("#see_mail").fadeOut(300, function() {
    		$(this).html(data);
    		$(this).fadeIn(300);
    	});
    }); 
}

function like(id){
    if(dle_login_hash!='') { 
        $.post('/engine/ajax/like.php', {id:id}, function(data){
        	$("#like_"+id).fadeOut(300, function() {
        		$(this).html(data);
        		$(this).fadeIn(300);
        	});
        }); 
    }else{alert("Пожалуйста, авторизуйтесь.");}
}

window.___gcfg = {lang: 'ru'};

(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
