I've got a tutorial here that might help: http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/
It's simple in that it's a reusable plugin, but it doesn't have any logic outside of the 'each' loop - which is where you can really beef up the power of your plugin. I'm sure there will be other examples the community can offer, otherwise I'll knock up a quick tutorial. Good luck.