
	function replaceAnd(string)
	{
		return string.replace("&amp;","&");
	}
	
	function encodeEntities(string)
	{
	        return $("<div/>").text(string).html();
	}
	function decodeEntities(string)
	{
	        return $("<div/>").html(string).text();
	}
	
	function animateOnInsert(targetClass, fadeColor)
	{
		/* Grab the original BG color of the link */
		var originalBG = $(targetClass).css("background-color");
		/* The color you want to fade too */
		var fadeColor;
		
		if(!fadeColor) fadeColor = "#E3F6E5";
		else fadeColor = "#"+fadeColor;
		
		/* coloro lo sfondo della riga per far notare l'insert */
		$(targetClass).animate({	backgroundColor:fadeColor	}, 500);
		$(targetClass).animate({	backgroundColor:originalBG	}, 500);
	
	}
	
	function preload(arrayOfImages) {
	    $(arrayOfImages).each(function(){
	        $('<img/>')[0].src = this;
	        // Alternatively you could use:
	        // (new Image()).src = this;
	    });
	}
