a example code which simulates Win7's pages switch animation