Fixing javascript for the homepage.