var debug = /\.dev(\/|$)/i.test(window.location.href);
$(function () {
    $('#menu-list').hide();
    if ($.browser.msie) {
        $('#menu-list').corner('round 8px');
    }
    $('#menu-title, #menu-button').click(function(e) {
        $('#menu-list').animate({
            opacity: 'toggle',
            height: 'toggle'
        }, 300, 'swing');
        e.stopPropagation();
    });
    $('html').click(function() {
        if ($('#menu-list').css('display') != 'none') {
            $('#menu-button').click();
        }
    });

    if (debug){
        $('ul.management li').mouseover(function (e) {
            $(this).siblings().stop().animate({
                opacity: 0.5
            }, 200, 'swing');
            $(this).stop().animate({
                opacity: 1
            }, 200, 'swing');
        });
        $('ul.management li').mouseout(function (e) {
            $(this).siblings().stop().animate({
                opacity: 1
            }, 200, 'swing');
        });
    }
    
    $('ul.follow li').mouseover(function (e) {
        $(this).siblings().stop().animate({
            opacity: 0.5
        }, 200, 'swing');
        $(this).stop().animate({
            opacity: 1
        }, 200, 'swing');
    });
    $('ul.follow li').mouseout(function (e) {
        $(this).siblings().stop().animate({
            opacity: 1
        }, 200, 'swing');
    });
});
