How do I fade in a div by id if cookie=1?
<p>I have a page with few tabs.
I am looking for a way that if you select tab 5 and cookie = 1 then show tab6 otherwise show tab5.</p>

<p>The code for the tabs is:</p>

<pre><code>jQuery(".tabs a").click(function () {
    stringref = jQuery(this).attr("href").split('#')[1];
    jQuery('.tab_content:not(#' + stringref + ')').hide();
    jQuery('.tab_content#' + stringref).fadeIn();
    return false;
});
</code></pre>

<p>I want the tab number 5, if clicked and cookie=1 to show tab6.
The code that shows the div5 or Div6 if cookie is 1 or null is:</p>

<pre><code>alreadyClosed = $.cookie(stateCookieName);

if (alreadyClosed != 1) {
    $DIV5.show();
    $DIV6.hide();
} else {
    $DIV5.hide();
    $DIV6.show();
}
</code></pre>

<p>How do I add them together? I assume their should be a way to say:</p>

<pre><code>If tab1.click and cookie = 1 then show $div1
else tab1.click and cookie = null then show $div2
</code></pre>

<p>The body looks like:</p>

<pre><code>&lt;!-- buttons --&gt;
&lt;ul id="boxes" class="tabs"&gt;
&lt;li&gt;&lt;a href="#Div5"&gt;Div 5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Div6"&gt;Div 6&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;!-- content --&gt;
&lt;div class="tab_content" id="Div5"&gt;DIV 5&lt;/div&gt;
&lt;div class="tab_content" id="Div6"&gt;DIV 6&lt;/div&gt;
</code></pre>

<p>I hope you guys can help me. 
Thanks alot &amp; Regards,
rallyboy.</p>
