$(document).ready(function() {

	menu_desplegable2("ul.menu_interior li");
	menu_desplegable("ul.principal li");
	

});



function menu_desplegable(elemento) {


	$(elemento).each(function() {
		
		$(this).hover(
			function() 
			{
				var lista = $(this).children("ul.menu_interior");
				
				lista.each(
					function() {
						$(this).css("display","block");
						//$(this).css("overflow","visible");
						$(this).css("opacity","0.01");
						$(this).css("zIndex","100");
						//$(this).css("backgroundColor","red");
						//$(this).css("filter","alpha(opacity:01)");
						$(this).css("position","relative");
						$(this).css("top","0");
						$(this).css("left","0");
						$(this).fadeTo("slow", 0.99);
						
						
					/*	var lista_enlaces = $(this).children("span a");
						lista_enlaces.each(
							function() {
								$(this).hover.animate({backgroundColor:"white", 1000);
							}
						);
						
						*/
						
					}
				);
			}
			,
			function()
			{
				var lista = $(this).children("ul.menu_interior");
				lista.each(
					function()
					{
						$(this).css("display","none");
					}
				);
			}
			);
		}
		);
}

function menu_desplegable2(elemento) {


	$(elemento).each(function() {
		
		$(this).hover(
			function() 
			{
				$(this).css("overflow","visible");
				var lista = $(this).children("ul.menu_interior");
				
				lista.each(
					function() {
					
						$(this).css("display","block");
						$(this).css("opacity","0.01");
						
						$(this).fadeTo("slow", 0.99);
						$(this).css("zIndex","100");
						$(this).css("fontSize","0.8em");
						var enlaces = $(this).children("li");
						enlaces.each(function()  {
							//$(this).css("backgroundColor","#E5ECF1");
							$(this).css("backgroundColor","red");
							//$(this).css("color","#000000");
							$(this).css("fontWeight","bold");
						});
						
					}
				);
			}
			,
			function()
			{
				var lista = $(this).children("ul.menu_interior");
				lista.each(
					function()
					{
						$(this).css("display","none");
					}
				);
			}
			);
		}
		);
}



