Adding variables together returns string rather than number
<p>I've got three variables I'm trying to sum the values. For two of these items, I need the form value to read differently, so i've created an attribute <code>cost</code> to pull the cost through with.  My code is:</p>

<pre><code>var opt1 = parseFloat($('#ac1 option:selected').attr('cost')).toFixed(2);
var opt2 = parseFloat($('#ac2 option:selected').attr('cost')).toFixed(2);
var base = parseFloat($('#original_price').val());
var newprice = opt1+opt2+base;
</code></pre>

<p>if opt1 should be 4.00, opt2 6.50 and base 10.00, it's giving me an output of <code>4.006.5010.00</code> instead of <code>20.50</code></p>

<p>any ideas on where i'm going wrong?</p>
