Updated library, now as a jQuery plugin