$(function() {
						   
  $('.qtext').focus(function(){
    $(this).css({backgroundColor:"#333333"});
	$(this).select();
  });
  $('.qtext').blur(function(){
    $(this).css({backgroundColor:"#232323"});
  });

  $('.qtarea').focus(function(){
    $(this).css({backgroundColor:"#333333"});
	$(this).select();
  });
  $('.qtarea').blur(function(){
    $(this).css({backgroundColor:"#232323"});
  });


  $(".qbutton").click(function() {
							   
							   /*alert('boo');*/
		// validate and process form
		// first hide any error messages
    /*$('.error').hide();*/
		
	  var name = $("input#name").val();
		if (name == "") {
      /*$("label#name_error").show();
      $("input#name").focus();*/
      return false;
    }
		var email = $("input#email").val();
		if (email == "") {
      /*$("label#email_error").show();*/
      /*$("input#email").focus();*/
      return false;
    }
	var comments = $("#comments").val();
		if (comments == "") {
      /*$("label#email_error").show();*/
      /*$("input#email").focus();*/
      return false;
    }

	/*	var phone = $("input#phone").val();
		if (phone == "") {
      $("label#phone_error").show();
      $("input#phone").focus();
      return false;
    }*/
		
		var dataString = 'name='+ name + '&email=' + email + '&comments=' + comments;
		//alert (dataString);return false;
		
		$.ajax({
      type: "POST",
      url: "/includes/process.php",
      data: dataString,
      success: function() {
        $('#qform').html("<div id='message'></div>");
        $('#message').html("<h2>Message Sent!</h2>")
        .append("<p>We will be in contact ASAP.</p>")
        .hide()
        .fadeIn(1500, function() {
          $('#message').append("<img id='checkmark' src='/templates/default/images/check.png' />");
        });
      }
     });
    return false;
	});
});