adds scrolltop functionality and changes div on window resize