Rushed and probably full of horribleness, but it's something, I suppose:

http://gist.github.com/588341