Added animations to the navigation

Cleans up css classes, controls the mode on tree, menu and dialog