I'm working on similar feature, but it's not completed yet. It's based on a bit different idea, but I have a few experiences with this, so if you want some help... -MGrabovsky
wikitech-l@lists.wikimedia.org