IF THEN Issue jQuery(function()

IF THEN Issue jQuery(function()

Hi,

I am really sorry to bother you folks with such basics but I am pulling my hair out over using an if statement with this function below. I have next to 0 java experience and have spend all day trying to get this working.

I am trying to make a slider/calculator to allow someone to work out total cost/discount

Inputs: 
      Course Type Wanted (Drop down but would like an option list if I can figure it out)
      No of Weeks

Outputs
PricePerWeek (Works OK)
TotalToPay (Works OK for now but will need to deduct the discount)
Discount (Needs IF No of Weeks >= 3 THEN give a 10% discount)

At the moment its hardcoded to  discount = 765 and when I try something like  
if  (noofweeks >= 3 ) { noofweeks * priceperweek * 0.1  ; }
it just results in the slider not appearing. 

  1. jQuery(function() {
  2.   var tarif = 600000,
  3.   //  result_outptut = jQuery("#revenue span"),
  4.    // discount_outptut = jQuery("#discount span"),
  5.     client = 0,
  6.     revenue = 0,
  7.     check = 0,
  8.     bob = 66,
  9.     time = 0;
  10.     

  11.   function recount() {
  12.     revenue = (client + check + time) * tarif;
  13.     discount = 765
  14. //if($a > $b) { echo "<p>A is larger than B</p>";}
  15.  //   result_outptut.html(revenue + ' COP');
  16.     jQuery("#revenue span").html(revenue + ' COP');
  17.     jQuery("#discount span").html(discount + ' COP');
  18.     jQuery("#priceperweek span").html(tarif + ' COP');
Any ideas?