$(function(){
	// init HoverFades
	$('.hoverFade').css('display','block');
	// hide HoverFades
	$('.hoverFade').stop().animate({opacity:0},{duration:0});
	// Prepare active link menu
	$('#menu li.active a').css('background','none');
	$('#menu li.active a').parent().children('.hoverFade').css('display','block');
	$('#menu li.active a').parent().children('.hoverFade').stop().animate({opacity:.5},{duration:0});
	// Start hoverFades func
	$('#menu li a').hover(function(){

		if($(this).parent().hasClass('active')==false)
		{
		 $(this).css('background','none');
		 $(this).parent().children('.hoverFade').stop().animate({opacity:.5},{duration:200});
		}

	},
	function() {
		 if($(this).parent().hasClass('active')==false)
		 {
			$(this).parent().children('.hoverFade').stop().animate({opacity:0},{duration:200});
		 }
	});

	// start Language Selector func
	$("#languageSeletor").click(function(){
		$("#languageSeletor .option").fadeIn(200);
	});

	$("#languageSeletor").bind('mouseleave',function(){
		$("#languageSeletor .option").fadeOut(200);
	});
});
