title: Check the first checkbox, if no checkbox is selected
body: <p>I have this HTML code</p>
  
  <pre><code>&lt;input type="checkbox" name="city_pref[]" id="city_all" value="0" checked /&gt;&lt;label for="city_all"&gt;All&lt;/label&gt;
  &lt;input type="checkbox" name="city_pref[]" id="city_pref_1" value="Chicago" /&gt;&lt;label for="city_pref_1"&gt;Chicago&lt;/label&gt;
  &lt;input type="checkbox" name="city_pref[]" id="city_pref_2" value="Texas" /&gt;&lt;label for="city_pref_2"&gt;Texas&lt;/label&gt;
  </code></pre>
  
  <p>And, I have <a href="http://jsfiddle.net/heera/bGwrS/2/" rel="nofollow">placed my code in a fiddle</a>, which is working correctly. What I really want to do is, when none of the checkboxes are selected, then I want the <strong>all</strong> checkbox to get selected automatically. </p>