title: Dynamically checking two checkboxes to select one radio button using javascript
body: <p>I've been trying all weekend to solve this problem I may be overcomplicating it. The simplfied code that I'm working is below. Any help would be greatly appreciated - as I'm racking my brains with this for a long while now.</p>
  
  <p><strong>Problem</strong>: Upon checking of two checkboxes, the respective radio button is selected. So selecting Earth and Wind checkboxes will select the 'Earth and Wind' radio button.</p>
  
  <pre><code>&lt;input name="single" type="checkbox" id="Earth"/&gt;Earth&lt;br&gt;
  &lt;input name="single" type="checkbox" id="Wind"/&gt;Wind&lt;br&gt;
  &lt;input name="single" type="checkbox" id="Emotion"/&gt;Emotion&lt;br&gt;
  &lt;input name="single" type="checkbox" id="Grass"/&gt;Grass&lt;br&gt;
  &lt;input name="single" type="checkbox" id="Good"/&gt;Good&lt;br&gt;
  
  &lt;hr&gt;
  
  &lt;input name="pair" type="radio" class="Earth Wind"/&gt;Earth and Wind&lt;br&gt;
  &lt;input name="pair" type="radio" class="Earth Emotion"/&gt;Earth and Emotion&lt;br&gt;
  &lt;input name="pair" type="radio" class="Earth Grass"/&gt;Earth and Grass&lt;br&gt;
  &lt;input name="pair" type="radio" class="Earth Good"/&gt;Earth and Good&lt;br&gt;
  &lt;input name="pair" type="radio" class="Wind Emotion"/&gt;Wind and Emotion&lt;br&gt;
  &lt;input name="pair" type="radio" class="Wind Grass"/&gt;Wind and Grass&lt;br&gt;
  &lt;input name="pair" type="radio" class="Wind Good"/&gt;Wind and Good&lt;br&gt;
  &lt;input name="pair" type="radio" class="Emotion Grass"/&gt;Emotion and Grass&lt;br&gt;
  &lt;input name="pair" type="radio" class="Emotion Good"/&gt;Emotion and Good&lt;br&gt;
  </code></pre>
  
  <p>EDIT: To evidence, my efforts: <a href="http://jsfiddle.net/rsF6w/" rel="nofollow">http://jsfiddle.net/rsF6w/</a>: where I've also disabled the checkboxes after two are checked.</p>