	function pgSetup() {
		$('.add-post-reply').hide();
		$('.open-reply').click(function() {
			var post_id = $(this).attr('id').substr(11);
			$('#reply-' + post_id).slideToggle('slow');
			return false;
		});
	}
	$(document).ready(function() {
		pgSetup();
		$('.open-private-post').click(function() {
			var post_id = $(this).attr('name').substr(5);
			$.ajax({
				type: "POST",
				url: '/posts/' + post_id + '/',
				data: 'password=' + $('input[name="private-post-'+post_id+'"]').val(),
				success: function(post_html) {
					$('#post-' + post_id).html(post_html);
					pgSetup();
				},
				error: function(req, status, error) {
					$('#post-error-' + post_id).show().text('Sorry, that\'s incorrect. Please contact me directly.');
				}
			});
			// $('#post-' + post_id).load('/posts/' + post_id + '/');
		});
	});
