Merge main.js with scripts.js

footer has also been altered to load jQuery plugins before loading
main.js