﻿function hover_top_menu() {

//    $("#menu_top").delegate("li", "mouseover mouseout", function (e) {
//        var id_act = this.id + "_h";
//        if (e.type == 'mouseover') {
//            $("#" + id_act).stop(true, true).fadeIn('500');
//        } else {
//            $("#" + id_act).stop(true, true).fadeOut('500');
//        }
    //        });
        $('#menu_top li').hover(
            //Mouseover, fadeIn the hidden hover class
            function () {
                //$(this).children(".hover").stop(true, true).fadeIn('1000');
                $("#" + this.id + "_h").stop(true, true).fadeIn('500');
            },
            //Mouseout, fadeOut the hover class
            function () {
                $("#" + this.id + "_h").stop(true, true).fadeOut('500');
            }).click(function () {
                //Add selected class if user clicked on it
                $(this).addClass('selected');
        });
}

function attivauno(nome) {
    $(nome).animate({ opacity: "1" }, 200);
    jQuery("#menu_top li").not(nome).dequeue().animate({ opacity: "0.3" }, 200);
    /*$("#menu_top").children("li").each(function () {
        $(this).animate({ opacity: "0.3" }, 200);
    });*/
    //$("#mt1").animate({ opacity: "0.3" }, 200);    
}

function attivatutti() {
    jQuery("#menu_top li").dequeue().animate({ opacity: "1" }, 200);
}



