
$(document).ready(function() {

	$(".blog_comment_form").submit(function() {

		blog_val = $(this).children(".blog_id").attr("value");
		
		copy_val = $(this).children(".blog_single_bottom_comments_form_fields").children(".comment_copy").attr("value");

		if (copy_val.length > 0) {		
			$(this).children(".blog_single_bottom_comments_form_fields").children(".comment_copy").attr("value", "");

			$.post("listener_content.php", { blog_id: blog_val, template: "blog", blog_form: "add_comment", copy: copy_val },
				function(data) {
					console.log("returned: " + data);

					current_html = $("#blog_single_bottom_comments_new").html();

					$("#blog_single_bottom_comments_new").html(data + current_html);


				});


		}

		return false;
		
	});

});
