John Resig released a screencast about an “Expandable Sidebar Menu”, in other words: An accordion menu. While his screencast is a great demonstration and tutorial for everyone beginning with jQuery, the menu itself is somewhat limited. If you are looking for a more flexible implementation, you got to just the right place.
Details, demos and documentation can be found on the plugin page. As you can see from the comments there, the plugin is already used and should therefore be pretty bugfree now. Nonetheless, if you spot a bug or need a certain feature, just let me know it.