Accordion menu

I want to make an accordion menu with the exact same functionality as Senoculars XML menu example, except my menu has to use a different image for each of the buttons. So I’m not sure how to approach this. There are six main category buttons and I’m looking for an efficient way to code it.

So when you click one of the category buttons the script has to check if another category is already open, close it, and then open the clicked category.

I’m just looking for some general tips on how to approach this. Make a movieclip prototype that checks to see if category is open, and also add a listener object to check for mouse clicks? Attach these two to each movieclip?