Fixes bug 893238 - switch to using jQuery EventListener for tab changes

Previously, this function was only called once on document load. The listener now will execute every time the user clicks on a tab.