Whither thy ball?

http://www.blueswami.com/cms/index.php?id=81

A ball is placed under one of three hats, before they shuffle around. The player must then click on the hat which is hiding the ball.