var obj = null;

function checkHover() {
	if (obj) {
		obj.find('ul').fadeOut('fast');	
	} //if
} //checkHover

$(document).ready(function() {
	$('#Nav > li').hover(function() {
		if (obj) {
			obj.find('ul').fadeOut('fast');
			obj = null;
		} //if
		
		$(this).find('ul').fadeIn('fast');
	}, function() {
		obj = $(this);
		setTimeout(
			"checkHover()",
			0); // si vous souhaitez retarder la disparition, c'est ici
	});
});


// Gestion de la barre de menu //

$(document).ready(function() {
    $("#menu_produits_solutions").mouseover(function() { $(this).children('img').attr("src", "images_homepage/menu_produits_solutions_on.gif"); });
    $("#menu_produits_solutions").mouseout(function() { $(this).children('img').attr("src", "images_homepage/menu_produits_solutions_off.gif"); });
    $("#menu_services_hebergement").mouseover(function() { $(this).children('img').attr("src", "images_homepage/menu_services_hebergement_on.gif"); });
    $("#menu_services_hebergement").mouseout(function() { $(this).children('img').attr("src", "images_homepage/menu_services_hebergement_off.gif"); });
    $("#menu_qui_sommes_nous").mouseover(function() { $(this).children('img').attr("src", "images_homepage/menu_qui_sommes_nous_on.gif"); });
    $("#menu_qui_sommes_nous").mouseout(function() { $(this).children('img').attr("src", "images_homepage/menu_qui_sommes_nous_off.gif"); });
    $("#menu_references").mouseover(function() { $(this).children('img').attr("src", "images_homepage/menu_references_on.gif"); });
    $("#menu_references").mouseout(function() { $(this).children('img').attr("src", "images_homepage/menu_references_off.gif"); });
    $("#menu_references").click(function() { $(location).attr("href", "Page_references.aspx"); });
    $("#menu_references").mouseover(function() { $(this).css("cursor", "pointer"); });
    $("#menu_nous_contacter").mouseover(function() { $(this).children('img').attr("src", "images_homepage/menu_nous_contacter_on.gif"); });
    $("#menu_nous_contacter").mouseout(function() { $(this).children('img').attr("src", "images_homepage/menu_nous_contacter_off.gif"); });
    $("#menu_nous_contacter").click(function() { $(location).attr("href", "Page_contact.aspx"); });
    $("#menu_nous_contacter").mouseover(function() { $(this).css("cursor", "pointer"); });
});




// Gestion du schema multicanal des fiches produits //

$(document).ready(function() {
    $("#schema_distribution ").mouseover(function() { $(this).attr("src", "images_multicanal/dotsoft-distribution-on.gif"); });
    $("#schema_distribution").mouseout(function() { $(this).attr("src", "images_multicanal/dotsoft-distribution-off.gif"); });
    $("#schema_shop ").mouseover(function() { $(this).attr("src", "images_multicanal/dotsoft-shop-on.gif"); });
    $("#schema_shop").mouseout(function() { $(this).attr("src", "images_multicanal/dotsoft-shop-off.gif"); });
    $("#schema_ecom ").mouseover(function() { $(this).attr("src", "images_multicanal/dotsoft-ecom-on.gif"); });
    $("#schema_ecom").mouseout(function() { $(this).attr("src", "images_multicanal/dotsoft-ecom-off.gif"); });
    $("#schema_sav ").mouseover(function() { $(this).attr("src", "images_multicanal/dotsoft-sav-on.gif"); });
    $("#schema_sav").mouseout(function() { $(this).attr("src", "images_multicanal/dotsoft-sav-off.gif"); });
//    $("#schema_erp ").mouseover(function() { $(this).attr("src", "images_multicanal/dotsoft-erp-on.gif"); });
//    $("#schema_erp").mouseout(function() { $(this).attr("src", "images_multicanal/dotsoft-erp-off.gif"); });
//    $("#schema_siege ").mouseover(function() { $(this).attr("src", "images_multicanal/dotsoft-siege-on.gif"); });
//    $("#schema_siege").mouseout(function() { $(this).attr("src", "images_multicanal/dotsoft-siege-off.gif"); });
//    $("#schema_comptabilite ").mouseover(function() { $(this).attr("src", "images_multicanal/dotsoft-comptabilite-on.gif"); });
//    $("#schema_comptabilite").mouseout(function() { $(this).attr("src", "images_multicanal/dotsoft-comptabilite-off.gif"); });
//    $("#schema_plateforme ").mouseover(function() { $(this).attr("src", "images_multicanal/dotsoft-plateforme-logistique-on.gif"); });
//    $("#schema_plateforme").mouseout(function() { $(this).attr("src", "images_multicanal/dotsoft-plateforme-logistique-off.gif"); });
//    $("#schema_monetique ").mouseover(function() { $(this).attr("src", "images_multicanal/dotsoft-monetique-on.gif"); });
//    $("#schema_monetique").mouseout(function() { $(this).attr("src", "images_multicanal/dotsoft-monetique-off.gif"); });
});



// Gestion des liens de telechargement des fiches produits //

$(document).ready(function() {
    $(".liens_pdf").mouseover(function() { $(this).css("color", "#f35000"); });
    $(".liens_pdf").mouseout(function() { $(this).css("color", "#000000"); });
    $(".liste_footer").children('li').children('a').mouseover(function() { $(this).css("color", "#f35000"); });
    $(".liste_footer").children('li').children('a').mouseout(function() { $(this).css("color", "#555555"); });
    $(".page_liste_footer").children('li').children('a').mouseover(function() { $(this).css("color", "#f35000"); });
    $(".page_liste_footer").children('li').children('a').mouseout(function() { $(this).css("color", "#555555"); });
});


// Gestion des logos clients et partenaires //

$(document).ready(function() {
    $(".div_reference a img").mouseover(function() { $(this).css("cursor", "pointer"); });
//    $("#logo_iris").mouseover(function() { $(this).css("cursor", "pointer"); });
//    $("#logo_cathay").mouseover(function() { $(this).css("cursor", "pointer"); });
});


////Gestion des feuilles de style en fonction des navigateurs

//$(document).ready(function() {
//    Nom = navigator.appName;
//    Version = navigator.appVersion;
//    ns4 = (Nom == 'Netscape' && Version >= 4 ) ? 1:0
//    ie4 = (Nom == 'Microsoft Internet Explorer' && Version >= 4 ) 


//    if (Nom == 'Netscape') {
//        document.writeln('<link rel="stylesheet" type="text/css" href="style.css"/>');
//        document.writeln('<link rel="stylesheet" type="text/css" href="style_menu.css"/>');
//    }

//    if (navigator.userAgent.indexOf("Firefox") >= 0) {
//        document.writeln('<link type="text/css" rel="stylesheet" href="style_ie9.css" />');
//        document.writeln('<link rel="stylesheet" type="text/css" href="style_menu_ie9.css"/>');
//    }

//    if (Nom == 'Opera') {
//        document.writeln('<link type="text/css" rel="stylesheet" href="style_ie9.css" />');
//        document.writeln('<link rel="stylesheet" type="text/css" href="style_menu_ie9.css"/>');
//    }

//    if (Nom == 'Microsoft Internet Explorer' && Version >= 8) {
//        document.writeln('<link type="text/css" rel="stylesheet" href="style_ie9.css" />');
//        document.writeln('<link rel="stylesheet" type="text/css" href="style_menu_ie9.css"/>');
//    }

//    if (Nom == 'Microsoft Internet Explorer' && Version < 8) {
//        document.writeln('<link type="text/css" rel="stylesheet" href="style_ie7.css" />');
//        document.writeln('<link rel="stylesheet" type="text/css" href="style_menu_ie7.css"/>');
//    }
//});
