jQuery code that registers click events and on each 3rd event the user will be redirected to a custom url
<p>I have created a <a href="http://jsfiddle.net/sexywebteacher/TLkPB/1/" rel="nofollow">fiddle</a> with the following situation and I'd like an idea on how to implement it with jQuery.</p>

<p>I have several divs like so:</p>

<pre><code>&lt;div class="mydiv"&gt;&lt;a href="http://www.google.com"&gt;google.com&lt;/a&gt;&lt;/div&gt;

&lt;div class="mydiv"&gt;&lt;a href="http://www.yahoo.com"&gt;yahoo.com&lt;/a&gt;&lt;/div&gt;

&lt;div class="mydiv"&gt;&lt;a href="http://www.baidu.com"&gt;baidu.com&lt;/a&gt;&lt;/div&gt;
</code></pre>

<p>The list goes on (O have about 20 divs).</p>

<ol>
<li><p>When the user clicks on the first div (1st event), he will go to the
page of that link (in my case google.com);</p></li>
<li><p>When the user clicks on the second div (2nd event), he will go to the page of that link (yahoo.com);</p></li>
<li><p>When the user clicks on the third div (3rd event), he will go to a
CUSTOM URL and not baidu.com;</p></li>
<li><p>But if the user clicks on the third div again (4th event), he will go to baidu.com</p></li>
</ol>

<p><strong>To summarize, I need an idea for a jQuery code that registers click events and on each 3rd event the user will be redirected to a custom url.</strong></p>

<p>My first taught is to use toggle, but I'm not sure it can be implemented.</p>
