Added selected_index support to accordion view.