function isPageHidden() {
			return document.hidden || document.msHidden || document.webkitHidden || document.mozHidden;
		}
Cross-browser page visibility shim
http://stackoverflow.com/questions/12536562/detect-whether-a-window-is-visible