

var obj = null;

function checkHover() {
    if (obj) {
        obj.find('ul').fadeOut('fast');
		obj.find('ul').hide("fast");
		$("#divisao").animate({height: "0"}, 250);
    }
}


    
function fcbanner() {
	if (window.innerHeight){ 
   //navegadores baseados em mozilla 
   espaco_iframe = window.innerHeight ;
}else{ 
   if (document.body.clientHeight){ 
      //Navegadores baseados em IExplorer, pois nao tenho innerheight 
       espaco_iframe = document.body.clientHeight; 
   }else{ 
       //outros navegadores 
       espaco_iframe = 400; 
   } 
} 
	document.getElementById('abanner').style.height = espaco_iframe + 'px';
}

function fcbannerOut() {
	document.getElementById('abanner').style.height = '137px';
}
 
$(document).ready(function() {
	$('#menuUl > li').hover(function() {
        if (obj) {
			checkHover();
            //obj.find('ul').fadeOut('fast');
            obj = null;
        }
		var idt = $(this).attr("id");
        if (idt != "medicos" && idt != "inicio"){
			$(this).find('ul').fadeIn(1000);
			$(this).find('ul').show("fast");
			$("#divisao").animate({height: "35px"}, 250);
		}
    }, function() {
        obj = $(this);
        setTimeout(
            "checkHover()",
            400);
    });
});
				  
	/*function(){
		$("#educacao").hover(
			function(){
				var cssObj = {
					backgroundImage: "none",
					fontWeight: "",
					color: "rgb(0,40,244)"
				}
				//$("#subEducacao").show("slow");
				$("#divisao").animate({height: "40px"}, 250);
				//$("#subEducacao li").css(cssObj);
			},
			function(){
				//$("#subEducacao").hide("fast");
				$("#divisao").animate({height: "0"}, 250);
			}
		);
		$("#prof").hover(
			function(){
				//$("#subProf").show("slow");
				$("#divisao").animate({height: "40px"}, 250);
			},
			function(){
				//$("#subProf").hide("fast");
				$("#divisao").animate({height: "0"}, 250);
			}
		);
		$("#saude").hover(
			function(){
				//$("#subSaude").show("slow");
				$("#divisao").animate({height: "40px"}, 250);
			},
			function(){
				//$("#subSaude").hide("fast");
				$("#divisao").animate({height: "0"}, 250);
			}
		);
		$("#sobre").hover(
			function(){
				//$("#subSobre").show("slow");
				$("#divisao").animate({height: "40px"}, 250);
			},
			function(){
				//$("#subSobre").hide("fast");
				$("#divisao").animate({height: "0"}, 250);
			}
		);
	}*/
	
//);
