Actually, it's not mine. I don't remember when I found it, actually.
It's one that I bookmarked awhile back when I was trying to do something similar.
My snippet library is nuts these days. Something for every occasion.
Anyway, if you need any help with it, I'll be back online tonight-ish.
Good luck, man.