change tabs javascript for a modular script