Auto Calculating for input field values
<p>My Html is like this:</p>

<pre><code>&lt;input class="gbTransform" type="text" name="maxdl" value=""/&gt;
</code></pre>

<p>And javascript like this:</p>

<pre><code>$('.gbTransform').change(function(){
        var sz = $(this).val().match(/(\d+)gb/i);
        if(sz.length &gt; 1){
          $(this).val(parseInt(sz[1])*1024);
        }
    });
</code></pre>

<p>What this does is when a user types 1gb it will automatically calculate into mbs (1 * 1024 = 1024) and change the input fields value.</p>

<p>This works fine but when user types <code>1.5gb</code> its calculates <code>5 * 1024</code> which is incorrect it should be <code>1.5 * 1024</code></p>

<p>Thank You.</p>
