Javascript: Checked radio button
<p>In one page I have two form for search:</p>

<pre><code>&lt;form class="search-panel" method="post" action="" onsubmit="return searchRedirect(this)"&gt;
        &lt;input type="test" name="searchFor" /&gt;
        &lt;div class="additional-search-button"&gt;&lt;/div&gt;
        &lt;div id="additional-search-box"&gt;
            &lt;div class="as-cont"&gt;
                Books&lt;input type="radio" name="category" value="Books" checked="1" /&gt;&lt;br/&gt;
                School&lt;input type="radio" name="category" value="School" /&gt;&lt;br/&gt;
                Music&lt;input type="radio" name="category" value="Music" /&gt;
            &lt;/div&gt;
        &lt;/div&gt;
       &lt;input type="submit" name="search" /&gt;
    &lt;/form&gt;

&lt;form class="search-panel" method="post" action="" onsubmit="return searchRedirect(this)"&gt;
            &lt;input type="test" name="searchFor" /&gt;
            Games&lt;input type="radio" name="category" value="Games" checked="1" /&gt;
            &lt;input type="submit" name="search" /&gt;
        &lt;/form&gt;
</code></pre>

<p>My problem is that if I click search for Games in searchRedirect always alert Books, School or Music if they checked:</p>

<p>That is my javascript function:</p>

<pre><code>function searchRedirect(form) {
    alert($(form['category']+':checked').val());

    if($(form['category']+':checked').val() == 'Форум')
        window.location.href = '/forum/search.php?keywords='+form['searchFor'].value;
    else {
        window.location.href = '/Search/'+$(form['category']+':checked').val()+'/'+form['searchFor'].value;
    }

    return false;
}
</code></pre>

<p>I need if I click to search games - search only for games, if click to search books,school or music - searching only for them. But now search form for games always use first form checked buttons.</p>
