Close tabs with the 'active' class when changing tabs.
Improvements to _findLinkByHref to work out weirdness in changeTab and friends