$(document).ready(function(){
	$(".close").click(function(){
		OpenMenu($(".close"), $(".slide"), '198px');
	});
	$(".slide").click(function(){
		CloseMenu($(".slide"), $(".close"), '35px');
	});
	
	$(".close").hover(
		function(){
			$(".mouseEff").animate({width: '25px'}, 100);
		}, 
		function(){
			$(".mouseEff").animate({width: '0px'}, 100);
		});
		$(".Bar").hover(
		function(){
			$(".lengBarEff").animate({height: '19px'}, 100);
		}, 
		function(){
			$(".lengBarEff").animate({height: '0px'}, 100);
	});
});

var img_ru = new Image();
img_ru.src = "../image/contacts_fool_ru.png";
var img_eng = new Image();
img_eng.src = "../image/contacts_fool.png";

function partClick(sender){
	for(j = 1; j <= prtCount; j++){
		$("#TextContetn"+j).css("display", "none");
		$("#TextContetnTitle"+j).css("display", "none");
	}
	$("#TextContetn"+sender).css("display", "block");
	$("#TextContetnTitle"+sender).css("display", "block");
	
	return false;
}

prtCount = 4;

function OpenMenu(frsElement, secElement, openWidth) {

	$(".mouseEff").css("display", "none");

    if (frsElement && secElement) {

        $(frsElement).css("display", "none");

        $(secElement).css("display", "block").animate({

            width: openWidth

        }, "fast", false, function () {

            secElement.children("*").css("float", "none");

            //return window.setTimeout(function () { CloseMenu(secElement, frsElement); }, 15000);

        });

    }

}


function CloseMenu(frsElement, secElement, closedWidth) {

	$(".mouseEff").css("display", "block");

    if (frsElement && secElement) {

        frsElement.children("*").css("float", "right")

        $(frsElement).animate({

            width: closedWidth

        }, "fast", false, function () {

            $(secElement).css("display", "block");

            $(frsElement).css("display", "none");

        });

    }

}

function bt1Click()
{
	alert('bt1Clicke');
}
function bt2Click()
{
	alert('bt2Clicke');
}
function bt3Click()
{
	alert('bt3Clicke');
}
function bt4Click()
{
	alert('bt4Clicke');
}
