add navbar active function