Attached is a .zip file that contains the source code and a set of example web pages that will allow you to dynamically render links (or any html tag for that matter) with one of two classes depending on which page you are viewing
It gives you the ability to render nav bars that display items as selected and unselected.