jQuery calculation & selecting
<blockquote>
  <p>Hello</p>
</blockquote>

<p>I'm trying to learn jQuery, got me some books: jQuery from novice to the ninja. Trying to learn as much as possible.</p>

<p>I try to do a little calculation app that calculates the merit of elementary school students.</p>

<p>To the effect that students will choose a rating of 18 subject, but two are removed. One can choose between four different grades.</p>

<p>no rating, you get: zero points.
A: you get 20 points.
B: you get 15 points.
C: you get 10 points.</p>

<p>The algorithm:
If a student gets to 15 A and three other C so count it out as follows:
15 x 20 = 300 points
3 x 10 = 30 points.
A total of 18 topic = 330 points.
But two of the smallest value scores must be removed for it to be correct. Thus two of the C-rating. So then, merit rating:
15 x 20 = 300 points
3 x 10 = 30 Points
- 2 x of the minimum scores = 2 x 10 = 20 points.
The final answer is = 310points.</p>

<p>I do not really know how I should proceed to select all the radio boxes and perform calculations. How should I think and how should I go about it.</p>

<p>I have helped with some html code that is a bit quickly written, hope you bear with the basic html code.</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Merit rating&lt;/title&gt;
&lt;script type='text/javascript' src='jquery-1.4.4.min.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='script.js'&gt;&lt;/script&gt;
&lt;link rel="stylesheet" href="test.css" type="text/css" media="screen" charset="utf-8" /&gt; 
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;Merit rating is the sum of the 16 best in your grades.&lt;/h1&gt;
    &lt;p&gt;A: 20 points&lt;/p&gt;
    &lt;p&gt;B: 15 points&lt;/p&gt;
    &lt;p&gt;C: 10 points&lt;/p&gt;
    &lt;p&gt;Not rated: 0 points&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;The highest score you can get is 320 which means that it has Distinction in all subjects.&lt;/strong&gt;&lt;/p&gt;
    &lt;p&gt;Do you have 17 or 18 scores, you remove one or two of the worst grade, your meritis made up of your 16 best scores.&lt;/p&gt;

    &lt;div id="Grade"&gt;
        &lt;p&gt;&lt;strong&gt;Swedish:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                    &lt;input type="radio" name="radClass" value="15"/&gt;B
                    &lt;input type="radio" name="radClass" value="10"/&gt;C
                    &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;English:&lt;/strong&gt; &lt;input type="radio" name="radClassEnglish" value="20"/&gt;A
                    &lt;input type="radio" name="radClassEnglish" value="15"/&gt;B
                    &lt;input type="radio" name="radClassEnglish" value="10"/&gt;C
                    &lt;input type="radio" name="radClassEnglish" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Mathematics:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Religion:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Social Studies:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;History:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Geography:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Chemistry:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Physics:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Biology:&lt;/strong&gt;&lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Technology:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Picture class:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Home economics:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Music:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Sports and Health:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;HandCraft:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Language:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;p&gt;&lt;strong&gt;Student Choice:&lt;/strong&gt; &lt;input type="radio" name="radClass" value="20"/&gt;A
                        &lt;input type="radio" name="radClass" value="15"/&gt;B
                        &lt;input type="radio" name="radClass" value="10"/&gt;C
                        &lt;input type="radio" name="radClass" value="0"/&gt;Not rated
        &lt;/p&gt;
        &lt;input type="button" id="calcButton" value="Calculate"/&gt;&lt;p id="answer"&gt;&lt;/p&gt;
    &lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
