How to make jQuery accordion menus slide back up?

How to make jQuery accordion menus slide back up?

I'm having a hell of a time with a jQuery project I am working on here:


First off, let me start by saying I AM a newbie to this, I'm learning as a I go as my experience is mostly all front end stuff (HTML, CSS, etc.).

Anyways, what I am trying to accomplish here seems simple, but it's driving me up the wall!

I want the 'Course Schedule' tab to open it's sub-menu when clicked (which it currently does if you see my fiddle above.

Okay, so great, half of it is working! However, now I want the 'Course Schedule' tab to close the sub-menu below it when it's clicked again. In other words, this would function just like an accordion and the top level 'Course Schedule' tab would be the trigger.

Same thing for the second level navigation items that have sub-menus as well.

What am I doing wrong here?