updated jquery to work when page is resized