function refreshComments(blogID){
	$("#blog_comments_area").load("/blog/refresh_comments/"+blogID);
}

function submitComment(id){
	var errorList = "";
	if($("#fullname").val()=="") errorList = "Name is Required";
	else if($("#comment").val()=="") errorList = "Comment/Question is Required";
	if(errorList>"") alert(errorList);
	
	$("#comment_form").load("/blog/comment", { fullname:$("#fullname").val(), comment:$("#comment").val(), blog_id:id }, function(){
		refreshComments(id);
	});
}


function submitContactForm(id){
	var errorList = "";
	if($("#fullname").val()=="") errorList = "Name is Required";
	else if($("#email").val()=="") errorList = "Email is Required";
	else if($("#comment").val()=="") errorList = "Comment/Question is Required";
	if(errorList>"") alert(errorList);
	else {	
		$("#comment_form").load("/contact/comment", { fullname:$("#fullname").val(), email:$("#email").val(), comment:$("#comment").val() }, function(){
			refreshComments(id);
		});
	}
}



$(document).ready(function(e) {
	
});
