// show/hide comment form
(function($){
	$(document).ready(function() {
		$("#home_add_comment").click(function(){
			$('#form_home_comment').slideToggle();
			return false;
		});
	});	
	
//	// ajax add Comment
//	$('#CommentSave').live('click',function(){
//		var form = $(this).parents('form');
//		var data = form.serialize();
//	
//		$.ajax({
//			type:"POST",
//			url:form.attr('action'),
//			data:data,
//			success:function(msg) {
//				// inject the HTML
//				$('#form_home_comment').html(msg);
//				// slide the form away
//				$('.slideUp').slideUp();
//			}
//		});
//	
//		return false;
//	});
//	
//	
//	/**
//	 * Refresh all comments for the current page
//	 */
//	function refresh_comments() {
//		// get article id
//		var id = $('#CommentArticleId').val();
//	
//		$.ajax({
//			type:"POST",
//			url:"/comments/ajax_refresh/"+id,
//			success: function(msg) {
//				$('#comments').html(msg);
//			}
//		});
//	}
})(jQuery)
