Jquery conditional statement
<p>I'm really sorry if this come across as stupid but i've searched everywhere but i didn't find any tip on how to go about it.
i have this variable </p>

<pre><code> var id = $('#sometextfield').val(); 
</code></pre>

<p>This text field value is dynamically generated eg.</p>

<pre><code> &lt;input type="text" name="id" id="id" value="&lt;?php echo $_get[something];?&gt;" /&gt;)
</code></pre>

<p>The problem here is that i have an if condition saying</p>

<pre><code>if(id == 100 || id ==120) {
   // i have these variables
   var mulitiplier = 0.005
   var price = (some alog) * mulitiplier;

   // do some very long piece of code
}
else if (id == 200 || id == 220) {
   // Then i have these variables
   var mulitiplier = 0.090;
   var price = (some alog) * mulitiplier;
   // Do the same very long piece of code(its practically the same thing as 
   // the first if statement and the only change is the ariable multiplier)        
}
</code></pre>

<p>This works and all but is there any way to not repeat the same thing. I don't like the look of it atm.
Many thanks in advance..</p>
