fixed bug with innerWidth/Height
window.parent only works when in an iframe