Migrated a bunchof stff to jquery
don't fall off the end
Moved everything to jquery