// Tout ce que je charge à l'ouverture du doc
$(document).ready(function() {
	
	
	$('.rollIMG').hover(function() {
		// mouseover		
		$(this).attr("src", $(this).attr("src").replace(".png","-hover.png"));
	},
	function() {
		// mouse out
		$(this).attr("src", $(this).attr("src").replace("-hover.png",".png"));
	});
	
	// ROLLOVER Logo MDF
	$('.MDF_roll').hover(function() {
		// rollover
		$('#MDF').attr("src","../_images/logo_suite_MDF_"+$(this).attr("id")+".png");
	}, function() {
		// rollout
		$('#MDF').attr("src","../_images/logo_suite_MDF.png");
	});
	
	// ROLLOVER Logo BMC
	$('.BMC_roll').hover(function() {
		// rollover
		$('#BMC').attr("src","../_images/logo_suite_BMC_"+$(this).attr("id")+".png");
	}, function() {
		// rollout
		$('#BMC').attr("src","../_images/logo_suite_BMC.png");
	});
	
	// ROLLOVER Logo APG
	$('.APG_roll').hover(function() {
		// rollover
		$('#APG').attr("src","../_images/logo_suite_APG_"+$(this).attr("id")+".png");
	}, function() {
		// rollout
		$('#APG').attr("src","../_images/logo_suite_APG.png");
	});
	
	// ROLLOVER Logo Boutique
	$('.SHOP_roll').hover(function() {
		// rollover
		$('#SHOP').attr("src","../_images/logo_suite_Boutique_"+$(this).attr("id")+".png");
	}, function() {
		// rollout
		$('#SHOP').attr("src","../_images/logo_suite_Boutique.png");
	});
	
	// ROLLOVER SOUS-MENU
	/*
	$('.menuLeft li a').hover(function() {
		// rollover
		$.ajax({
			type: "POST",
			url: "rolloverMenu.php",
			data: "id_menu="+$(this).attr('id'),
			success: function(msg){
				$('.smenuLeft').html(msg);
			}
		});
	}, function() {
		// rollout
	});
	*/
	
	
	
	// ROLL LEGEND
	$('.rollLegende').hover(function() {
		$('#legendeIcon').text($(this).attr('name'));
	}, function() {
		$('#legendeIcon').text('');
	});
		
	$('#slideTop').click(function() {
		$('html, body').animate({scrollTop: 0}, 'slow');
	});
	
	$('.rollHover img').hover(function() {
		// mouseover
		$(this).attr("src", $(this).attr("src").split(".").join("-hover."));
	},
	function() {
		// mouse out
		$(this).attr("src", $(this).attr("src").split("-hover.").join("."));
	});

});
