$(document).ready(function(){
$('#freeform').ajaxForm(
	{
	target:"#hiddenDIV",     //set response to go into hidden div    
	beforeSubmit:function()  //before sending submit, give user notification...
  {
     $("#msg").html("<p>Contacting the server....</p>");
  },
   success:function(rtn) 
   { 
    if(rtn=="success")
    {
	$("#msg").load("/includes/thanks");
		}else{
	$("#msg").html($("#hiddenDIV ul").html());
		$("#hiddenDIV").empty();
		}
	} 
  }
);
});
