$(document).ready(function()
{
	$('#contact-form').bind('submit',function(event)
	{
		var the_form = this;

		//if(!validate_form({'data': {'the_form': the_form}}))
		//	return false;

		//First we get the comment key to authorize the post
		var key = Math.floor(Math.random() * 1000000);
		
		$.get('/services/get-comment-key?key=' + key,function(key_response)
		{
			$('#comment_key').val($('key',key_response).text());
			
			the_form.submit();
		});
		
		return false;
	});
});