Woooo! Magic!
See the source code here.