jQuery - toggle "checked" and class of external element
<p>First: I'm not really good at javascript and I want to use jQuery functions.</p>

<p>This should happen:</p>

<ul>
<li><code>input[type="radio"].select-editor</code> - if is checked, should hide the <code>#alt-box</code> show only the <code>#editor-box</code>.</li>
<li><code>input[type="radio"].select-alt-a</code>, <code>input[type="radio"].select-alt-b</code> and <code>input[type="radio"].select-alt-c</code> - if is checked, should hide the <code>#editor-box</code> and show the <code>#alt-box</code>.</li>
<li><code>input[type="radio"].select-alt-a</code> - if is checked, should show the <code>#alt-a</code> inside <code>#alt-box</code> and hide the other divs inside the <code>#alt-box</code></li>
</ul>

<p>If one of the radio buttons gets clicked, it should get <code>checked="checked"</code> and the other ones should loose the attribute.</p>

<p><em>I don't mind if the function uses <code>hide()</code> or adds the class of <code>.hidden</code> to the elements.</em></p>

<pre><code>&lt;!-- here's where the action happens --&gt;
&lt;div id="select-container"&gt;
    &lt;input type="radio" class="select-editor" checked="checked" /&gt;
    &lt;input type="radio" class="select-alt-a" /&gt;
    &lt;input type="radio" class="select-alt-b" /&gt;
    &lt;input type="radio" class="select-alt-c" /&gt;
&lt;/div&gt;

&lt;div id="editor-box"&gt;
    &lt;!-- my text editor --&gt;
&lt;/div&gt;

&lt;div id="alt-box"&gt;
    &lt;div id="alt-a"&gt;
        &lt;!-- some content --&gt;
    &lt;/div&gt;
    &lt;div id="alt-b"&gt;
        &lt;!-- some content --&gt;
    &lt;/div&gt;
    &lt;div id="alt-c"&gt;
        &lt;!-- some content --&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>The following is likely to be nonsense. I hope someone can tell me how to handle this...</p>

<pre><code>&lt;script type="text/javascript"&gt;
    jQuery( document ).ready( function($)
        {
            $( "#select container input[type=\"radio\"]" ).click( function()
            {
                // something should happen here
            } );
        }
    );
&lt;/script&gt;
</code></pre>

<p>This is driving me crazy, so thanks a lot for any help!</p>
