Fixed loading of mathjax library, moved jquery loading to header.