$(document).ready(function() {
window.noticias_load=false;
$("#loading").hide();
// jQuery.facebox(' <p align=\"center\" ><h2>Call for papers!</h2></p> </br> Continua abierto el plazo para el envio de papers.  No dudes en enviarnos tu propuesta a jornadas@feval.info antes del 1 de Octubre de 2009');


//CARGAR MODULO DE NOTICIAS...
	$.ajax({ 
							   type: "GET",
							   url: "noticias.html",
							   dataType: "html",
							   beforeSend: function (){
								   $("#menu_der").html("Cargando noticias...");
							   },
								success: function (data){	
									$("#menu_der").addClass("hidden").fadeTo(500, 0, function() {
										$(this).removeClass("hidden").html(data);
										$("#loading").fadeOut(300);
										}).fadeTo("slow", 1).fadeTo(3000, 1);	
										noticias_load=true;
								}
						});						   


			$("#ponentes").click( function (){
				if (noticias_load)
						$.ajax({ 
							   type: "GET",
							   url: "ponentes.html",
							   dataType: "html",
							   beforeSend: function (){
								   $("#loading").fadeIn(300);
							   },
								success: function (data){	
									$("#menu_der").addClass("hidden").fadeTo(500, 0, function() {
										$(this).removeClass("hidden").html(data);
										$("#loading").fadeOut(300);
										}).fadeTo("slow", 1).fadeTo(3000, 1);	
										noticias_load=false;
								}
						});
							  
	   
		});
			
			$("#noticias").click( function (){ 
						if(!noticias_load)
							$.ajax({ 
							   type: "GET",
							   url: "noticias.html",
							   dataType: "html",
							   beforeSend: function (){
								   $("#loading").fadeIn(300);
							   },
								success: function (data){	
									$("#menu_der").addClass("hidden").fadeTo(500, 0, function() {
										$(this).removeClass("hidden").html(data);
										$("#loading").fadeOut(300);
										}).fadeTo("slow", 1).fadeTo(3000, 1);	
										noticias_load=true;
								}
						});
			});
			
			
			$("#apuntarse").click(function(){
				    jQuery.facebox({ajax: 'form/inscribirse.php'});
										   });
			
			
			$("#programa").click(function (){
					jQuery.facebox({ajax: "programa.html"});
										   
										   							   
			});
			
			
			$("#contactos").click( function (){
				 jQuery.facebox({ajax: "form/contact.html"});
											});
						$("#credito").click( function (){
				 jQuery.facebox({ajax: 'form/inscribirse.php'});
											});
			
			
 });