move script for tabbed panels to seperate js file