initial port to jquery
use jQuery's deep extend rather than my merge function
a few more small changes to the jquery version