function cargarContenido ( tipoEvento, pagina ) 
{

	// tipoEvento == 0 // alaventa
	// tipoEvento == 1 // proximamente
	
	//loading image
	if ( tipoEvento == 0 ) {// alaventa
		$("#alaventa_html").html("<image style='margin-left: 220px;' src='../img/progressAnimation.gif'/>");
		$("#alaventa_paginador").html( "" );
	} else {
		$("#proximamente_html").html("<image style='margin-left: 220px;' src='../img/progressAnimation.gif'/>");
		$("#proximamente_paginador").html( "" );
	}
	
	$("#newDialog").html("<image src='../img/progressAnimation.gif'/><a>&nbsp; Cargando...<a/>");
		
	//the AJAX events load
	$.ajax({
		   type: "POST",
		   url: "../getEventosHome.php",
		   data: "tipo="+tipoEvento + "&pagina="+pagina,
       	   success: function( msg ) {
				
				if ( msg != '' ) {
					
					var arrData = msg.split('<-|-><-|->|||||||<-|-><-|->');
					
					if ( tipoEvento == 0 ) {// alaventa
						$("#alaventa_html").html( arrData[1] );
						if ( arrData[0] == '0' ) mostrarEventos(1);
					} else {
						$("#proximamente_html").html( arrData[1] );
					}
										
					
					//the AJAX events pagination load
					$.ajax({
						   type: "POST",
						   url: "../getEventosPagHome.php",
						   data: "tipo="+tipoEvento + "&pagina="+pagina + "&totalPaginas="+arrData[0],
						   success: function( msg ) {
						
								if ( msg != '' ) {
					
									if ( tipoEvento == 0 ) {// alaventa
										$("#alaventa_paginador").html( msg );
									} else {
										$("#proximamente_paginador").html( msg );
									}
										
								}	   	   
					
						   }
					});
					
					
					
					
					
										
						
				}	   	   
	
		   }
	});
	
}
	
$(document).ready(function(){
	cargarContenido ( 0, 1 );
	cargarContenido ( 1, 1 );
	roundTwiter();
	
});

function roundTwiter ( ) {
	$("#contHome").css("background-color", "#FFFFFF");
	$(".twitter").corner("30px top left");
	$("#contHome").css("background-color", "transparent");
}
