This javascript DOM hack creates the collapse/expand buttons for the otherwise flat menu.
In this case, though, the master categories are also actual links. Effectively, the javascript is only adding the expand/collapse functionality.
See the javascript for this experiment.