isPageHidden now uses document.hasFocus(), should be more reliable