Apply active state to links