$.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase());

function go_slidemenu(current) {
    var speed = 300;
    var openclass = 'open';
    
    // CODE
    var toHide = $(current).parents('ul:first').find('li div:last-child:visible').parent().removeClass(openclass).end();
    var toShow = $(current).next(':hidden').parent().addClass(openclass).end();
    if (toHide.length > 0) {
        var hideHeight = toHide.height();
        var difference = toShow.height() / hideHeight;
        toShow.css({ height: 0, overflow: 'hidden' }).show();
        toHide.animate({ height: "hide" }, {
            step: function(now) {
                var height = (hideHeight - now) * difference;
                if ($.browser.msie || $.browser.opera || $.browser.chrome) height = Math.ceil(height);
                toShow.height(height);
            },
            easing: 'swing',
            duration: speed
        });
    }
    else {
        toShow.slideDown(speed);
    }
}