$j(document).ready(function(){
	//REQUEST

	var xmlTitulares= new Array();
	var htmlTitulares= new Array();
	
	var xmlCuerpos= new Array();
	var htmlCuerpos= new Array();
	

	//establece pares contenedor-contenido
	function pares(arrContdor,arrContdo){
		arrContdor.each(function(i,elm){
			elm.innerHTML=arrContdo[i].innerHTML;
		})
	}

	//localiza contenedores
	htmlTitulares=$j('.titular');
	htmlCuerpos=$j('.cuerpo');

	//llamada	
	
	
	$j.ajax({
		type:'GET',
		url:'noticias.xml',
		success: function(xml){

			$j('noticia',xml).each(function(i,elm){

				htmlTitulares[i].innerHTML=$j(elm).find('titular').text();
				
				if(htmlCuerpos[i]){
					htmlCuerpos[i].innerHTML=$j(elm).find('cuerpo').text();
				}else{
					return		
				}
			})
		}
	})
	
	

})
