title: Disallow numbers divided not equally in jquery
body: <p>There is table of records, where columns are 12 month + summary.
  I have simple jQuery action which <code>onChange</code> of summary row divide number equaly for each month.</p>
  
  <p>Because it's accounting stuff I round number to .00 and store it in DB.
  I want to disallow entering numbers which are not dividable by 12.</p>
  
  <p><strong>Unfortunatelly my algorithm has a flaws :/</strong> </p>
  
  <p><strong>(ex. entering 11, changes to 11.08 != 12 * 0.93)</strong></p>
  
  <pre><code>function round(num) {
      return Math.ceil(num * 100) / 100;
  }
  
  $("#summary").change(function() {
      var summaryValue = $(this).val();
      var monthCount = $('.month').length;
  
      var remainder = (summaryValue * 100) % monthCount;
      summaryValue = (summaryValue * 100 + remainder) / 100; 
      $(this).val(summaryValue);    
  
      var avarage = round(summaryValue / monthCount);
  
      $('.month').each( function( key, value ) {
          $(this).val(avarage);
      });
  });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/igos/z3EEQ/" rel="nofollow">http://jsfiddle.net/igos/z3EEQ/</a></p>
  
  <p>Any ideas how to implement it better?</p>
  
  <ol>
  <li>By dividable by 12 I mean, every number allow is devided with max 2
  numbers after coma.</li>
  <li>So 11 will be changed to 11,04 because 0.92 * 12 = 11.04;</li>
  <li>1324 => 1324,08 = 110,34*12</li>
  <li>I can not say: bad number, because I want to offer to user closest number to which he originally wanted to enter.</li>
  </ol>