This actually does exist! I have it up and running on my work in progress site and it works splendidly, the thread is here;
http://mysidiaadoptables.com/forum/s...ead.php?t=5017
You have to read through it a bit, but it should provide what you're looking for :)