$(document).ready( function (e) {
    
    $(".bb-code").markItUp(myBbcodeSettings);
    
    var menu_boot = $("a li.push").parent().index();
    $("#menu-bottom li").eq(menu_boot).css("display", "block");
    
    $("#menu-top ul li").mouseover(function(){
        var index = $("#menu-top li").index(this);
        // console.log($("#menu-top li").index(this));
        $("#menu-bottom li:visible").each(function(){
            $(this).css("display", "none");
        });
        $("#menu-bottom li").eq(index).css("display", "block");
    });
    
    
    $(".search").focus(function(){
        if($(this).attr("value") == $(this).attr("data-default")){
            $(this).attr("value", "");
        }
    });

    $(".search").blur(function(){
        if($(this).attr("value") == ""){
            $(this).attr("value", $(this).attr("data-default"));
        }
    });
    
    $(".confirm").click(function(){
        check = confirm("Êtes-vous sur de vouloir faire ça ?");
        if(check == true){
            return true;
        }else{
            return false;
        }
    });
});
