Active tab now works for selectors other than, e.g., :first

Previous behaviour was to simply apply the same selector to the tabs as to the
original list to identify the active tab.

New behaviour activates the tab based on whether or not its panel is active.