Logic on how to create thumbnail buttons that replace the main screen?

Got a bit of logic question. I want to a navigation that consist of 6 thumbnail buttons and a main screen. Once you click on any button, the main screen will become smaller and fit into the button that you have just clicked and the button will zoom out to fill the main screen.

Still stumble over this? Appreciate greatly with the kind help.(-: