$(function() {
    $('.error').hide();
    $("#formbutton").click(function() {

	 var datastring = $(rightspry).serialize(); 
  //alert (datastring);return false;
  $.ajax({
    type: "POST",
    url: "/inc/sendlead.php",
	//url: "https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8",
    data: datastring,
    success: function() {
      $('#lead_form').html("<div id='message'></div>");
      $('#message').html("<p>Your Information was received.  Thank you.</p>")
    },
	error:function (xhr, ajaxOptions, thrownError){
                    alert(xhr.status);
                    alert(thrownError);
                }
  });
  return false;

    });
  });

  

