

$(document).ready(function() {


						$("#wrapperMain").fadeIn(3500,  'swing',
											 
					    function(){
											 
							var paras = $('.animacionLoto');
							var paras2= $('.animacionMenu');
								i = 0;  
								j = 0;
					  
								// If using jQuery 1.4, you don't need to do || [].  
							(function() {  
									  $(paras[i++]).fadeIn(2000, 'swing', arguments.callee);
									   setTimeout(menu, 2000);
							  })();
							
							function menu() {  
									   
									   $(paras2[j++]).delay(600).fadeIn(600, arguments.callee);
									   setTimeout(idioma, 10000);
									   
							  };
							 
							 function idioma() {
								 		$('div.animacionIdioma').fadeIn(600, 'swing',
										
											function() {
												$("#contador").fadeIn(600, 'swing');
											}
										);
							 };
				

})

						
$("ul#listaMenuPrincipal div").hover(
		function(){
				$(this).animate({boxShadow: '0 0 40px #fe0c7e'})
		},
		function(){
		$(this).stop().animate({boxShadow: '0 0 0'})
		}
	);
	
$("ul#listaMenuPrincipalEsp div").hover(
		function(){
				$(this).animate({boxShadow: '0 0 40px #fe0c7e'})
		},
		function(){
		$(this).stop().animate({boxShadow: '0 0 0'})
		}
	);
	
$("div#idiomaMainEsp div").hover(
		function(){
				$(this).animate({boxShadow: '0 0 40px #fe0c7e'})
				
		},
		function(){
		$(this).stop().animate({boxShadow: '0 0 0'})
		}
	);	
	
$("div#idiomaMainEng div").hover(
		function(){
				$(this).animate({boxShadow: '0 0 40px #fe0c7e'})
				
		},
		function(){
		$(this).stop().animate({boxShadow: '0 0 0'})
		}
	);
	

$("div#espanol").hover(
		function(){
				$(this).animate({boxShadow: '0 0 40px #fe0c7e'})

		},
		function(){
		$(this).stop().animate({boxShadow: '0 0 0'})
		}
	);	
	
$("div#idiomaEng div.animacionMenu").hover(
		function(){
				$(this).animate({boxShadow: '0 0 40px #fe0c7e'})
				
		},
		function(){
		$(this).stop().animate({boxShadow: '0 0 0'})
		}
	);	

	
/*$("div#menuLateral a.lateral span").hover(
		function(){
				$(this).animate({boxShadow: '0 0 40px #f7c80a'})
		},
		function(){
		$(this).stop().animate({boxShadow: '0 0 0'})
		}
	);*/
	
$("div#menuLateral div.menuTopic").hover(
		function(){
				$(this).animate({boxShadow: '0 0 20px #f7c80a'})
		},
		function(){
		$(this).stop().animate({boxShadow: '0 0 0'})
		}
	);	
	
$("div#menuLateral div#pagMenu a span").hover(
		function(){
				$(this).animate({boxShadow: '0 0 40px #f7c80a'})
		},
		function(){
		$(this).stop().animate({boxShadow: '0 0 0'})
		}
	);		


// Funcion para el Menu Lateral Izquierdo. Desaparecer y aparecer listado de Items segun opcion 

$("div#menuLateral div#pagMenu a").click(function (){
	
	var boton = this.id;
	var listaParaActivar = "#menuIzq"+boton;

	$("div#menuLateral ul").each(function(i){
		if(this.id!="listaBtnMenu" && $(this).css("display")=="block"){
			$(this).fadeOut(600, 'swing', function(){
				$(listaParaActivar).fadeIn(600, 'swing');
				});
		}
	});

	
});


/* Codigo Menu de Paginas de Contenido */

$("div#paginacion li.nav").click(function(){
	var boton = this.id;
	var menu = "#menu" + boton;
	$("div.paginas").each(function(i){
		if($(this).css("display")=="block"){
			$(this).fadeOut(600, 'swing', function(){
				$(menu).fadeIn(600, 'swing');	
			
			
			});
			
		}
		
	});
});




/* ESTE NO SE DEBE DE MOVER! ES DEL document.ready!!! */
});


