Add some code to do the main view transitons when clicking on the nav bar