$(function() {
	$("#sendclaim").submit(function(e){
		var opts = {'action': 'json'}
		for(var i = 0; i < this.elements.length; i++) {
			var $set = this.elements[i]
			opts[$set.name] = $set.value
		}

		var form = this;
		$.ajax({
			type:    "POST",
			url:     $(this).attr('action'),
			data:    opts,
			success: function(msg){
				$(form).replaceWith("<p><strong>" + msg + "</strong></p>");
			}
		});

		return false;
	});
});
