$(document).ready(function() {

    $('li').each(function() {

        if (!$(this).hasClass('current')) {

            if ($(this).find('ul').length) {

                $(this).children('a').hover(function() {

                    $('.subnav:not(li.current .subnav)').hide('slow');

                    var return_value;

                    if ($(this).next('ul:hidden').length) {
                        return_value = false;
                    } else {
                        return_value = true;
                    }

                    if (!return_value) $(this).next('ul').toggle('slow');

                    return return_value;


                });

            }
        }

        $(this).find('li:last').css('border-bottom','none');

    });

});