make navigation highlighting dynamic

the main navigation now uses more ruby functions