This question was asked before this answer was available - but I feel the question is still relevant.
http://net.tutsplus.com/tutorials/javascript-ajax/how-to-build-your-own-custom-jquery/
http://projects.jga.me/jquery-builder/
Hope others find these links as helpful as I have.
Update
Depending on how minimal you want to go you could make your own library, I've used this as a starting concept before:
http://code.tutsplus.com/tutorials/build-your-first-javascript-library--net-26796
Source code available here: https://github.com/andrew8088/dome