move all js to external js file from index page