$(document).ready(function(){
//<![CDATA[
//if ($.browser.msie && $.browser.version < 7) return;

	// main nav fading
	$('#nav li')
	.removeClass('highlight')
	.find('a')
	.append('<span class="hover" />').each(function () {
		var $span = $('> span.hover', this).css('opacity', 0);
		$(this).hover(function () {
			// on hover
			$span.stop().fadeTo(500, 1);
		}, function () {
			// off hover
			$span.stop().fadeTo(500, 0);
		});
	});	

	// footer nav fading
	$('#ft-menu li')
	.removeClass('highlight')
	.find('a')
	.append('<span class="hover" />').each(function () {
		var $span = $('> span.hover', this).css('opacity', 0);
		$(this).hover(function () {
			// on hover
			$span.stop().fadeTo(500, 1, function(){
				$(this).find('a').css({'display':'none'});
			});
		}, function () {
			// off hover
			$span.stop().fadeTo(500, 0);
		});
	});
	
	// change the url of the map link, as we have JavaScript
	//$('#ft-menu #nav5').attr('href','spip.php?page=map&width=890&height=530');
	
	// change the url for the portfolio links, as we have JavaScript
	/*$('#portfolio #list a').each(function(){
		$this = $(this);
		$article = $this.attr('rel').replace('art','');
		$this.attr('href','spip.php?page=portfolio&id='+$article+'&width=890&height=530');
	});*/
	
// ]]>	
});
