Base js for sidescroll