switched jquery & javscript order