auto select first tab, gallery images