$(document).ready(function() {
    //Configuration des bulles
    $('.bulleRonde').cluetip({splitTitle: '|',
        dropShadow: false,
        cluetipClass: 'rounded',
        cursor: 'pointer',
        positionBy: 'mouse',
        tracking: true,
        showTitle: true});
    $('.bulleRondeRouge').cluetip({splitTitle: '|',
        dropShadow: false,
        cluetipClass: 'roundedRouge',
        cursor: 'pointer',
        positionBy: 'mouse',
        showTitle: true});
    //survole image du menu principal
    $("#menuPrincipal > li > a").hover(
        function(){
            $(this).css('background','url(/img/bouton-o.png) #026755 top left no-repeat');
        }, function(){
            if($(this).attr("name")!="actif") $(this).css('background','url(/img/bouton.png) #026755 top left no-repeat');
        }
    );
    $("#HautPage").hover(
        function(){
            $("#logoBanniere").fadeTo("slow",1);
        }, function() {
            $("#logoBanniere").fadeTo("slow",0);
    });
    $("#basPage").hover(
        function(){
            $("#basPage").fadeTo("slow",1);
        }, function() {
            $("#basPage").fadeTo("slow",0.8);
    });
    $("#boutonBasPage").hover(
        function(){
            $("#txtBasPage").css("display","inline");
        }, function() {
            $("#txtBasPage").css("display","none");
    });
    $("#basPage").fadeTo("fast",0.8);
    $("#txtBasPage").css("display","none");
    
    $(".afficheCache").click(
        function(){
            $(this).next("div").slideToggle("slow");
        }
    );
    $(".afficheCache").next("div").css("display","none");
    
    DD_roundies.addRule(".cadreRond", "5px", true);

    $(".popup").click(
        function(){
            window.open($(this).attr("href") , $(this).attr("rel"), "directories=yes,resizable=yes,scrollbars=yes,width=850,height=600");
            return false;
        }
    );

    clignote();
});

var clignoteVisible=true;
function clignote(){
    if(clignoteVisible){
        $(".blink").css("visibility","hidden");
        clignoteVisible=false;
    }else{
        $(".blink").css("visibility","visible");
        clignoteVisible=true;
    }
    setTimeout("clignote()", 1000);
}
