Mini Navigation Project

I’m currently working on a personal website and I want to implement an amazon type 'shop by category" drop down menu, I have found this great example of a similar menu:

My current navigation structure is very restricted so I can’t change any of the id’s or classes. I am relatively new to javascript and I would love some help to get this done, I think it would be a great experiment and aid my learning. If someone could get an example of this to work, I would be very grateful.

This is my current restricted navigation menu:,css,js,output