jQuery(document).ready(function() {
    
    
});

function link_to_remote(path,sucess,use_confirm){
    if(use_confirm){
        use_confirm = confirm('This action will remove this comment from view and alert an Admin.  Are you sure you want to flag this comment as inappropriate?',"test");
    }else{
        use_confirm = true
    }

    if(use_confirm){
        jQuery.ajax({
            type: "POST",
            url: path,
            data: "&authenticity_token=" + encodeURIComponent(AUTH_TOKEN),
            success: function (html) {
                eval(sucess +"(html)");
                return false;
            }
        });
        return false;
    }
    return false;
}

function remove_comment(html){
    jQuery("#commentPost_" + html).slideUp(function(){
        jQuery("#commentPost_" + html).remove();
    });
}