function pagina(pPag,camps){
	//$("#home_fons").css("display","none");
	pPag=pPag+'?nocache=' + Math.random()+'&';
	paginaa=pPag+'seccio='+camps;	
	//prompt('',paginaa);
	$.ajax({
			url:  pPag,
			type: 'POST',
			data: 'seccio='+camps,
			dataType: 'text' ,
			success: function(respuesta) {
			
				
				if(respuesta=="ko"){
					alert("Se ha producido un error");
				}else{
					/*$('#central').fadeOut(1500,function(){
						//alert(respuesta);

						$('#central').fadeIn(1500).html(respuesta);
						//alert(respuesta);
						//$('#central > *').fadeIn(1500);						
					});*/
					$('#central').hide();
					//$('#central').show().html(respuesta);
					$('#central').html(respuesta);
					$('#central').show();
				}
			}, 
			error: function() { 
				//alert("Se ha producido un error:"+e.message); 
				//location.reload();	
				alert("Se ha producido un error");
			}
	});

}

function ini_home(){
	
	$("#content #left #text .menu_text").click(function(){		
		$("#content #left #text > *").css("font-weight","normal");
		//$(".menu_text").each(function(){$(this).css("font-weight","normal");});
		$(this).css("font-weight","bold");
	});
}







/*------------------------UTILS------------------------------------------*/

jQuery.fn.fadeIn = function(speed, callback) { 
    return this.animate({opacity: 'show'}, speed, function() { 
        if (jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 
 
jQuery.fn.fadeOut = function(speed, callback) { 
    return this.animate({opacity: 'hide'}, speed, function() { 
        if (jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 
 
jQuery.fn.fadeTo = function(speed,to,callback) { 
    return this.animate({opacity: to}, speed, function() { 
        if (to == 1 && jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 

function trataCaracteresEspeciales(palabra){
	str=palabra.replace(/&AGRAVE;/g,"À");
	str=str.replace(/&MIDDOT;/g,"·");
	return str

}

/*------------------------------------------------------------------*/


