jquery : focus out for windows (browser page)
<p>I came up with a problem that my website users are cheating on online games . For the cheating part they need to do some part of the flash games and then switch the window and use their desktop applications to cheat and change the records </p>

<p>Now , I think if I find a way to stop users from switching windows while they are playing I can stop these cheats.</p>

<p>I used this function on jquery but It didn't work.</p>

<pre><code>$(window).focus(); or $(document).focus();
</code></pre>

<p>when the window focus is out I need to alert the user and then refresh the page </p>

<p>I saw something like this in Comet Chat script when the focus is out and the window is changed there was a function to recall sounds (dings)</p>

<p>Is there anything compatible with Jquery to handle window focus ?</p>
