added JS for page resize