CSS Vertical Accordian Menu with Javascript

AWARDED
Bids
8
Avg Bid (USD)
$53
Project Budget (USD)
$30 - $250

Project Description:
I need to customize a css menu. I don't need help with the styling, only the functionality of the menu itself. What I need is a menu that will do this:

When the website visitor first visits the website the accordian menu is collapsed so that only the main menu items are visible, such as:

Home
About
Departments
Procedures
Contact

Each of these main links will link to their own pages. In addition, when a user clicks on one of these main links, such as Departments, they will be directed to the Department page of the website, but the submenu items under Departments should expand and be visible until the user leaves that section of the main nav or any items in the subnav for that particular item, so if they are on on Anatomy they will still see the subnav as visible. i.e.

Home
About
Departments
Anatomy
Psychology
Physiology
Procedures
Contact

As a side note I will be using the menu as a PHP include on the site.
This must be cross browser compatible. There will be about 4 more links with subnavs but I am just trying to illustrate what I am looking for. Please PM with questions.

Skills required:
HTML, Javascript, PHP
About the employer:
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.