jQuery(document).ready(function() {
	
		
	$(".opened").parents().removeClass('close');
	$(".opened").removeClass('close');

	$(".level-1 p").hover(
		function(){
			$(this).css("background-color","#eaf7ff")	
		},	
		function(){
			$(this).css("background-color","white")	
		}	
	);
	var globalF = null;

	$('.ico').hover(

		function(){
			$(this).css("border-bottom-width","2px");
		},
    		function(){
			$(this).css("border-bottom-width","0px");
       		}
	);
	

	$('ul.level-0 li').not($('ul.level-1 li')).not($('#topmenub')).hover(
		function(){
	      		if ($('ul',$(this))){
 		   		$('ul.level-1 p',$(this)).not($('ul.level-2 p')).not($('ul.level-1 p',$(this)).not($('ul.level-2 p')).eq(0)).addClass('level-1-separator');
	            		$('ul.level-1').not($('ul.level-1',$(this))).hide();
				clearTimeout(globalF);
				$('ul.level-1',$(this)).fadeIn('slow')
			}
		},
    		function(){
				if ($('ul',$(this)).is('ul')){
		      		var myself = this;
					globalF = setTimeout(
						function(){						$('ul.level-1',$(myself)).fadeOut('slow');
						},1000
					)
          		}
		});




	$("span.btn", $(".left-menu li")).toggle(
		function(){
			$(this).parent().removeClass("close");
		},
		function(){
			$(this).parent().addClass("close");
		}
	)

	var i;
	for (i=0; i<$("span.btn").length; i++){
				
		if($("ul",$("span.btn").eq(i).parent()).length == 0){
			$("span.btn").eq(i).addClass("pointbtn");	
		}
	}
	$("span.pointbtn").removeClass("btn");
	

	

});
	
	


