function comments_ajax() { var ajax_php_url = ajaxcomment.ajax_php_url; txt1 = '
', txt2 = '
#
', txt3 = '">
', num = 1, comm_array = []; comm_array.push(""); jQuery(document).ready(function($) { $comments = $("#comments-title"); $cancel = $("#cancel-comment-reply-link"); cancel_text = $cancel.text(); $submit = $("#commentform #submit"); $submit.attr("disabled", false); $("#comment").after(txt1 + txt2); $("#loading").hide(); $("#error").hide(); $body = (window.opera) ? (document.compatMode == "CSS1Compat" ? $("html") : $("body")) : $("html,body"); $("#commentform").submit(function() { $("#loading").fadeIn(); $submit.attr("disabled", true).fadeTo("slow", 0.5); $.ajax({ url: ajax_php_url, data: $(this).serialize(), type: $(this).attr("method"), error: function(request) { $("#loading").fadeOut(); $("#error").fadeIn().html("" + request.responseText); setTimeout(function() { $submit.attr("disabled", false).fadeTo("slow", 1); $("#error").fadeOut() }, 3000); }, success: function(data) { $("#loading").hide(); comm_array.push($("#comment").val()); $("textarea").each(function() { this.value = "" }); var t = addComment, cancel = t.I("cancel-comment-reply-link"), temp = t.I("wp-temp-form-div"), respond = t.I(t.respondId), post = t.I("comment_post_ID").value, parent = t.I("comment_parent").value; new_htm = '" id="new_comm_' + num + '">") : ('\n