some jquery and other changes that may need merging.
first attempt using vimdiff