 function parseXml_oportunitats(xml)
{
	var id_new='';
	var texto='';
    var cont1=0;
	  $(xml).find("oportunitat").each(function(i)
	  {
	
		 $("#main-photo-slider2 div.panelContainer").append("<div id='O_"+i+"' class='panel'>");	
		  $("#O_"+i).append("<div class='noticia'>");	
		  $(this).find("foto").each(function(a)
	  		{
				if(a==1){
			  	$("#O_"+i+" .noticia").append("<img src='../image_oportunitats/"+$(this).text()+"' width='125' height='115' alt='' />");
				}
			});
		  $("#O_"+i).append("</div>");	
		  	  	$("#O_"+i+" .noticia").append("<p><strong>"+$(this).find("titulo").text()+"</strong><br /><br /></p>");
		  		texto=$(this).find("texto").text().substring(0,100);
		  		$("#O_"+i+" .noticia").append("<p class='opo'>"+texto+"...<br /><a href='javascript:detall_opo("+i+")' class='news_link'>m&aacute;s info</a></p>");
				
		  $("#O_"+i+".noticia").append("</div>");		
	$("#O_"+i).append("</div>");	
	cont1++;
  })
 
 
 
 
var theInt1 = null;
		var $crosslink1, $navthumb1;
		var curclicked1 = 0;
		
		theInterval1 = function(cur){
			clearInterval(theInt1);
			
			
			
			theInt1 = setInterval(function(){
				
				
				
				$(".slider-wrap2 .stripNav ul li a").eq(curclicked1).trigger('click');
				curclicked1++;
				if( cont1 == curclicked1 )
					curclicked1 = 0;
				
			}, 6000);
		};
		
		$(function(){
			
			$("div#main-photo-slider2").codaSlider();
			
			$navthumb1 = $(".nav-thumb");
			$crosslink1 = $(".cross-link");			
			$navthumb1
			.click(function() {
				var $this = $(this);
				theInterval1($this.parent().attr('href').slice(1) - 1);
				return false;
			});
			
			theInterval1();
		}); 

}     
function detall_opo(p)
{
window.open("detall_oportunitat.asp?ref=" + p,"_self")
}