Adding check to ensure the window is iframed before resizing it