Moved jQuery loading to front, fix race condition jQuery dependency