window.addEvent('domready', function() {
	// Format the news list placed on the left column.
	// The news list is a navigation content element
	// The navigation item text in the following form xx-xx-xxxx: xxxxxxxx xxxx
	// will be transformed to display it in a more stylisch way 
	$('news-list-nav').getElements('span').each(function(elem){
		var regExp = /([0-9]{2}-[0-9]{2}-[0-9]{2,4}):(.*)/;
		var string = elem.get('html');
		var matches = string.match(regExp);
		if (matches){
			elem.empty();
			elem.adopt(new Element('span',{'class':'news-date', html:matches[1]}), new Element('span',{'class':'news-title', html:matches[2]}))
		} 
		else
		{
			elem.empty();
			elem.adopt(new Element('span',{'class':'news-date', html:string}));
		}
	});
});
