Added logic to determine active nav pill.