typeof number + typeof number = NaN?
<p>Why this is <code>NaN</code> in JavaScript?</p>

<pre><code>alert(typeof settings.mouse.x + ' --- ' + typeof getScalePercent((bg_w - a_w)/2, settings.bg.perc_position));
// alerts: number --- number

var pos_x = settings.mouse.x - getScalePercent((bg_w - a_w)/2, settings.bg.perc_position);    
alert(pos_x);
// alerts: NaN

// this syntax because a jQuery plug-in
var getScalePercent = function (value, perc) {
    return value * perc / 100;
}

// settings.mouse.x == 102 basically an integer
// getScalePercent(...) == 10 or 12.0390394028 basically an number

alert(settings.mouse.x + ' (' + typeof settings.mouse.x + ') --- ' + getScalePercent(((bg_w - a_w)/2), settings.bg.perc_position) + '(' + typeof getScalePercent(((bg_w - a_w)/2), settings.bg.perc_position) + ')');
// returns 102 (number) --- 12.000340563 (number)
</code></pre>

<p>Where I'm wrong?</p>
