JQuery is great, and it's really not worth reinventing the wheel by trying to write something like that yourself. The examples on the JQuery site are so sickeningly bad to read, though - their formatting really obfuscates the flow of what's going on because he's trying to push the "OOoh, look at what I can do with 3 lines of code!" type cack.
Prototype is also good, and combined with scriptaculous offers plenty of toys. There's a nice tutorial course here for it. The guy knows how to write.
http://www.phpriot.com/series/8-weeks-of-prototype
You'll probably end up using both, and at least two more (Moo, Yahoo, Google) if you're picking up bits from here and there, but if you're coding yourself you might as well stick to one you prefer.