wait for window load event to run resize