Would like to implement an expanding menu similar to the following:

What I like about it is that for a category, you can either:
1) click on the arrow to expand the menu
2) click on the name to goto the category page

Unfortunately the page isn't very standards friendly. How would you accomplish this using css/xhtml/js?