Use JavaScript to set class of selected tabs