jQuery(function () {
	jQuery('#mainmenu a').mouseover(function () {
			jQuery('#d_titre').hide();
		}).mouseout(function () {
				jQuery('#d_titre').show();
			});
	jQuery('.stepcarousel').each(function () {
			jQuery(this).lightcontentslide({autostep: {pause:4000},  speed: 1500});
		})
	jQuery('.stepcarouselvignette').each(function () {
			jQuery(this).lightcontentslide({containerClass : 'belt', slideClass : 'vignette', autostep: {pause:4000},  speed: 1500});
		})
	jQuery("span.description").appendTo("div.desc_container");
	jQuery("div.nav-poles-metiers-container a").hover(
		function() {
			var id_link = $(this).attr('id').split('_')[1];
			jQuery("div.desc_container span#desc_"+id_link).show();
		}
		, function() {
			var id_link = $(this).attr('id').split('_')[1];
			jQuery("div.desc_container span#desc_"+id_link).hide();
		});
	jQuery('div.block').click(function() {
			var link = jQuery(this).find('a.block_link').eq(0);
			if(link.attr('href')) window.location.href = '/'+link.attr('href');
		});
	// mouseover des input type image
	jQuery('input:image').hover(function () {
			var src = jQuery(this).attr('src');
			var newsrc = src.substring(0, src.lastIndexOf('.'))+'_on'+src.substring(src.lastIndexOf('.'));
			jQuery(this).attr('src', newsrc).data("src", src);
			},function() {
			var src = jQuery(this).attr('src');
			jQuery(this).attr('src', jQuery(this).data("src"));
		});
	
	// Menu principal du haut (ajout d'une class sur le dernier li a cause d'un bug affichage sous IE : pas de li:last-child sous IE) 
	jQuery('ul#mainmenu li').last().addClass('lastli');
	jQuery('ul#menuright li').last().addClass('lastli');
});

