(function(){
var rctm = (function(){
var confirmMessage = "An email will be sent notifying " +
"the moderator of this comment.";
var thanksMessage = "";
var sorryMessage = "";
jq(".reportCommentP").each(function() {
var rcp, rl, rw;
rcp = jq(this);
rl = rcp.find("a.canFlagComment");
if (rl.length==0) { return; }
rw = /^(.*)\/flag_comment_confirm\?commentId=(\d+)$/.exec(rl[0].href);
rl[0].href = rw[1]+'/#';
rl.click(function(){
var url;
if(confirm(confirmMessage)) {
url=rw[1]+"/flag_comment_to_moderator";
jq.post(url, {'commentId':rw[2], 'ajax':1}, function(data) {
rcp.html(String(data)==='1' ? thanksMessage : sorryMessage);
});
}
return false;
});
});
});
if(window.jq!==undefined) { jq(rctm); return }
if (window.post_import_hooks === undefined) {
window.post_import_hooks = [];
}
window.post_import_hooks.push(rctm);
})();