lots of javascript and jquery prep