added window resize events to js file