refactor js; add scrolling effects for mobile