$(document).ready(function(){

    $(".niv0").find("li").each(function() {
        if($(this).find("ul.niv1").length > 0) {
            $(this).mouseenter(function() { $(this).find("ul.niv1").stop(true, true).fadeIn('fast'); });
            $(this).mouseleave(function() { $(this).find("ul.niv1").stop(true, true).fadeOut('fast'); });
        }
    });
    $(".niv1").find("li").each(function() {
        if($(this).find("ul.niv2").length > 0) {
            $(this).mouseenter(function() { $(this).find("ul.niv2").stop(true, true).fadeIn('fast'); });
            $(this).mouseleave(function() { $(this).find("ul.niv2").stop(true, true).fadeOut('fast'); });
        }
    });
    $(".niv2").find("li").each(function() {
        if($(this).find("ul.niv3").length > 0) {
            $(this).mouseenter(function() { $(this).find("ul.niv3").stop(true, true).fadeIn('fast'); });
            $(this).mouseleave(function() { $(this).find("ul.niv3").stop(true, true).fadeOut('fast'); });
        }
    });
    $(".niv3").find("li").each(function() {
        if($(this).find("ul.niv4").length > 0) {
            $(this).mouseenter(function() { $(this).find("ul.niv4").stop(true, true).fadeIn('fast'); });
            $(this).mouseleave(function() { $(this).find("ul.niv4").stop(true, true).fadeOut('fast'); });
        }
    });
    $(".niv4").find("li").each(function() {
        if($(this).find("ul.niv5").length > 0) {
            $(this).mouseenter(function() { $(this).find("ul.niv5").stop(true, true).fadeIn('fast'); });
            $(this).mouseleave(function() { $(this).find("ul.niv5").stop(true, true).fadeOut('fast'); });
        }
    });
    $(".niv5").find("li").each(function() {
        if($(this).find("ul.niv6").length > 0) {
            $(this).mouseenter(function() { $(this).find("ul.niv6").stop(true, true).fadeIn('fast'); });
            $(this).mouseleave(function() { $(this).find("ul.niv6").stop(true, true).fadeOut('fast'); });
        }
    });
    var contentActuLien = $(".actu_lien").html();
    $(".actu_lien").html("").append("<span class='actu_lien_debut'>"+contentActuLien+"</span><span class='actu_lien_fin'></span><br class='clear' />");
    $(".actu_lien").width($(".actu_lien_debut").width()+60);
    $(".bloc_promotions_content").find("p:last").css("margin","0");
});

