I love jQuery, but I don't see why it is required here. Wouldn't this code work just as well with a couple of element IDs, and add library independence to the bargain?
I used this recently and it does largely the exact same thing... without the reliance on jQuery...
However people like their shiny things, and their jQuery.
/sigh