Add basic functionality for switching tabs in Middle page.