title: Event for browser tab hidden/shown?
body: <p>Is there any DOM event for when the browser tab loses/gains focus? I know there are the <code>blur</code> and <code>focus</code> events on <code>window</code>, but they also fire when the browser window as a whole loses focus. The browser might then be still visible to the user. Of course such an event would be browser specific, but that's ok.</p>
  
  <p>The reason why I want this is because I run animations that might consume quite some CPU time. When the browser tab is not visible there is no reason to continue animating. Now I know that modern browsers reduce the timer resolution of background tabs, but I could actually pause the animation, so that no CPU time whatsoever is consumed.</p>
  
  <p>In case you are wondering, this is what I'm writing:
  <a href="http://panzi.github.com/Browser-Ponies/" rel="nofollow">http://panzi.github.com/Browser-Ponies/</a></p>