Cool effect question


Please check out and click @bottom any menu item > see the thumbnails rearranging themselves.
My question: How do you realize that effect ? What’s the underlying concept / logic / elements necessary to achieve such a filtering effect by categories?
I am no expert but I would appreciate a somewhat technical explanation. Thanks.