Drupal: Expand / collapse all dhtml menu items

Like dhtml menus in Drupal? Then you’ll love this.
Two jquery functions that expand or collapse all dhtml menu items in Drupal in link/bookmarklet format:

javascript:$('.collapsed').each( function(){Drupal.dhtmlMenu.toggleMenu($(this));});void("Open all");
javascript:$('.expanded').each( function(){Drupal.dhtmlMenu.toggleMenu($(this));});void("Close all");

Drag this to your bookmark tool bar and enjoy menu control like never before:
Expand all menus
Collapse all menus