jQuery('#xcapCommentForm').submit(function() {
	commentSubmit();
	return false;
});

function commentSubmit() {
	if (validate('#xcapCommentForm')) {
		jQuery("#xcapCommentForm").ajaxSubmit( {
			target :'#commentBox', // target element(s) to be updated
			// with server response
			success : function(responseText, textStatus) {
				if (jQuery(".errorMessage li").size() == 0) {
					jQuery('#xcapCommentForm').submit( function() {
						commentSubmit();
						return false;
					});

				}

			}

		});
		
	}
	
	return false;
}