refactored load order of javascript

moved js to footer