Move non browser specific JavaScript into ./lib and upgrade to jQuery 2.0

I moved all of the browser specific JavaScript into `./lib` to remove the duplication and upgraded jQuery to version 2.0.0.