Dynamically mark navigation links as active