jQuery(document).ready(function($) {    

  $(".moveAmountUp").click(function(e) { 
      e.preventDefault();
      var eId = $(this).attr('id');
      var inputAmount = "#iAm"+eId;
      var amountVal = parseInt($(inputAmount).val());
      if(isNaN(amountVal) || amountVal < 0) {
        amountVal = 1;
      }
      else {
        amountVal = amountVal + 1;
      }
      $(inputAmount).val(amountVal); 
    });
    
    $(".moveAmountDown").click(function(e) { 
      e.preventDefault();
      var eId = $(this).attr('id');
      var inputAmount = "#iAm"+eId;
      var amountVal = parseInt($(inputAmount).val());
      if(isNaN(amountVal) || amountVal <= 1) {
        amountVal = 1;
      }
      else {
        amountVal = amountVal - 1;
      }
      $(inputAmount).val(amountVal); 
    });



});
