change div class name if other div is empty
<p>Hi hope someone can help out with this one:</p>

<p>What I basically want is that when div introtext is empty it has to hide the div and change the parent div (grid-6) to class=grid-12. I can't seem to get this job done! Here's what I have (samplecode):</p>

<blockquote>
  <p><strong>HTML</strong></p>
</blockquote>

<pre><code>&lt;div class=header&gt;
    &lt;img src="[[DTIMAGE]]" alt="inuit.css logo"&gt;
&lt;/div&gt;
&lt;h1 style="font-size:10px;"&gt;[[TITLE]]&lt;/h1&gt;
&lt;div class=grids&gt;
    &lt;div class=grid-12&gt;
        [[FULLTEXT]]
    &lt;/div&gt;&lt;!-- /grid-6 --&gt;
&lt;/div&gt;&lt;!-- /grids --&gt;
&lt;hr&gt;
&lt;div class=grids&gt;
    &lt;div class=grid-6&gt;
        [[FULLTEXT]]
    &lt;/div&gt;&lt;!-- /grid-6 --&gt;
    &lt;div class=grid-6&gt;
        &lt;div class="introtext"&gt;&lt;/div&gt;
    &lt;/div&gt;&lt;!-- /grid-6 --&gt;
&lt;/div&gt;&lt;!-- /grids --&gt;
&lt;hr&gt;
&lt;div class=footer&gt;
    [[FOOTER]]
&lt;/div&gt;
</code></pre>

<blockquote>
  <p><strong>Script</strong> [<em>using jQuery 1.7.2</em>]</p>
</blockquote>

<pre><code>$(document).ready(function(){
    if ($(".introtext").text() === ""){
        $(".introtext").hide();
    }
});
</code></pre>

<p>Thanks in advance</p>
