$(function() {

    $("form div.quantity").append('<div class="inc button">+</div><div class="dec button">-</div>');

    $(".button").click(function() {
        var $button = $(this);
        var oldValue = $button.parent().find("input").val();
    
        if ($button.text() == "+") {
    	  var newVal = parseFloat(oldValue) + 1;
    	} else {
    	  // Don't allow decrementing below 1
    	  if (oldValue > 1) {
    	      var newVal = parseFloat(oldValue) - 1;
    	  }
    	}
    	$button.parent().find("input").val(newVal);
    });
});

$(function() {
   			$('.button').hover( function(){
      		$(this).css('background-position', 'left bottom');
  		 },
  		function(){
     		$(this).css('background-position', 'left top');
   		});
		});