I have a dropdown menu and I want different text colors for menu out state, menu hover state, submenu out state, submenu hover state and menu active state when submenu is hovered.

The problem with the script is:

When I hover the submenu and hover next a menu item(without menu mouse out), the active color don't change, stays red.

Link for the script:

I trying (and others too) at several weeks to solve this problem so if anybody could help..
If anyone knows other way of doing this.. (javascript, not css)