use new jquery api to add new tabs. If no tab is selected, select the first one