
	function setUpComments() {
		$('#post-comment form#comments-form').submit(function() {
			$.post('/applications/comments/blog_send_js.rm', $(this).find('.forposting').serialize(), function(data) {
				$('#post-comment').html(data);
				
				if($('#post-comment div p.thanks').length ) {
					
				}
				else {
					setUpComments();
				}
			});
			
			return false;
		});
	}
	
	$(document).ready(function() {
		if( $('#comments').length) {
		$('<div id="post-comment"></div>').appendTo($('#comments'));
		
		var pageID = $('#comments h2 a').attr('href').replace(/\/display_includes\/blog\/post_comment.rm\?article_id=/,"");
		$('#post-comment').load('/display_includes/blog/post_comment.rm?js=true&article_id=' + pageID,setUpComments);
		$('#comments h2 a').attr('href','#post-comment');
		}
		
		$('div#right-col div.sign-out').load('/display_includes/blog/signout.rm');
	});
