Add jQuery, re-write JavaScript