window.media issue