Inertia at www.mamanbebecafe.com

Hello guys. I received a newsletter today from a coffee / baby site I’m subscribed to.
They just changed the website. As soon as you get there, you’ll see the language option and after you click on the language, there is a great effect I was trying to achieve (with no success) for a long time, and didn’t know how to explain it. Now that I see it, I need some help.
I know that it is created with math function. However, I don’t know how.
Could someone just create a simple square and make that animation so I can understand how to do it?

Here is the link: http://www.mamanbebecafe.com

Thanks so much community.