function addComment(scene) {
	var comment = $('#newComment').val();
	var data = { action: "add", type_id: 5, item_id: scene, body: comment };
	if (comment == "") {
		alert("Unable to add your comment since it contains no text.");
		return;
	}
	$.post('/ajax/comment_action.php', data, function(data) {
		if (data.code == 0) {
			$("#newCommentContainer").hide();
			$("#thankYouContainer").show();
		}
	}, "json");
}

function rateComment(member, comment_id, rating) {
    var data = { action: "bump", comment_id: comment_id, rating: rating };
    var bump_rating = $("#" + member).html();
    $.post('/ajax/comment_action.php', data, function(data) {
    	alert(data.message);
        if (data.code == 0) {
            var new_rating = parseInt(bump_rating) + parseInt(rating);
            $("#" + member).text(new_rating).toggleClass("neg", new_rating < 0).toggleClass("pos", new_rating >= 0);
        }
    }, "json");
}
