Cool effect question

Hi,

Please check out http://big.dk/big.html 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.