$(document).ready(function() {
    								//hide items in different situations of the form
	$('.num_furniture').hide();
	$('.num_rooms').hide();
	$('.other').hide();
	$('#price').hide();
	
	$("#services").change(function() {
								   
	if ($("#services").val() == "upholstery")
	{ 
	 $('.num_rooms').hide();
	 $('.other').hide(); 
	 $('.num_furniture').show();
	 $('#price').hide();
	}
	else if ($("#services").val() == "carpet")
	 {	 
	  $('.num_furniture').hide();
	  $('.other').hide();
	  $('.num_rooms').show();
	  $('#price').hide();
	 }
	else if ($("#services").val() == "other")
	 {	 
	  $('.num_furniture').hide();
	  $('.num_rooms').hide();
	  $('.other').show();
	  $('#price').hide();
	 }	
		}
)
									//calculate for carpet cleaning and number of rooms
$("#room_quote").click(function() {
								   
	if ($("#rooms").val() <= 0)
	{ 
	 alert('Value Must be atleast 1');
	}
	 
	 else if ($("#rooms").val() > 0)
	 {	 
	 var roomPrice= 75 + (35*($('#rooms').val() - 1));
	 }
	
	$('#contact_form').find('#quote_price').text(roomPrice); 
	$('#price').show();
	})
										//calculate for upholstry, type of upholstry, and number of items.
$("#up_quote").click(function() {
								   
	if ($("#items").val() <= 0)
	{ 
	 alert('Value Must be atleast 1');
	}
	 
	 else if (($("#items").val() > 0) && ($("#furniture").val() == 'chair'))
	 {	 
	 var upPrice = 0;
	 upPrice= 25*($('#items').val());
	 }
	 
	 else if (($("#items").val() > 0) && (($("#furniture").val() == 'seat') || ($("#furniture").val() == 'automin')))
	 {	 
	 var upPrice = 0;
	 upPrice= 50*($('#items').val());
	 }
	 
	 else if (($("#items").val() > 0) && ($("#furniture").val() == 'couch'))
	 {	 
	 var upPrice = 0;
	 upPrice= 75*($('#items').val());
	 }
	 
	 else if (($("#items").val() > 0) && ($("#furniture").val() == 'sofa'))
	 {	 
	 var upPrice = 0;
	 upPrice= 150*($('#items').val());
	 }
	
	$('#contact_form').find('#quote_price').text(upPrice); 
	$('#price').show();
	})

});
