initial javascript for scroll