Menu

The menu shown above for this application uses a simple jQuery Script.

JavaScript Source

(function($) {
    $.fn.extend({
        maxWidth: function() {
            if (this.is(":hidden")) {
                return this;
            }

            var maxW = 0;
            this.each(function() {
                var item = $(this);
                maxW = (item.width() > maxW) ? item.width() : maxW;
            });
            return this.width(maxW);
        }
    });

    $(function() {
        $("#menuroot li:has('ul')").click(function() {
            var $menurootitem = $(this);
            $menurootitem
            .children("ul")
            .toggle()
            .children("li")
            .maxWidth();

            $menurootitem
            .find("a>span")
            .toggleClass("menuopen")
            .toggleClass("menuclosed");

        });
    });
})(jQuery);