update js for index page