var ajax_comments={locked:[],onsubmit:function(){var D=this;if(ajax_comments.locked[D]){return false}else{ajax_comments.locked[D]=true}jQuery.ajax({type:"POST",url:"http://jandan.net/wp-content/plugins/ajax-comments/ajax-comments-post.php",data:jQuery(this).formSerialize(),dataType:"json",cache:false,timeout:60000,beforeSend:function(E){jQuery(".ajax_comments_error",D).remove();jQuery("input[@type=submit]",D).attr("disabled","disabled").hide().after('
\u4f20\u9001\u4e2d...
')},success:function(I,K){if(typeof (I.comment_type)=="undefined"||typeof (I.comment_ID)=="undefined"||typeof (I.comments_template)=="undefined"||!I.comments_template){this.error({responseText:""},"","");return }var J=jQuery(D).parents("div#ajax_comments_wrapper"),H=jQuery(".commentlist",J),G=jQuery(I.comments_template),F=jQuery("#comment-"+I.comment_ID+", .commentlist *:last",G).eq(0).hide();if(I.comment_type=="conventional"&&H.length>0){H.append(F);jQuery("#comments",J).after(jQuery("#comments",G)).remove()}else{var E=jQuery("//textarea[@name=comment]",G).parents("form");if(E.length){E.after(D).remove()}else{G.append(D)}J.after(G).remove()}F.fadeIn("slow");if(typeof (AjaxEditComments)!="undefined"){AjaxEditComments.init()}this.cleanup()},error:function(F,H,G){var E="";if(typeof (F.responseText)=="string"&&F.responseText!=""){E=F.responseText}else{if(H=="timeout"){E="\u670d\u52a1\u5668\u5931\u53bb\u54cd\u5e94\uff0c\u8bf7\u5c1d\u8bd5\u5237\u65b0\u9875\u9762\u770b\u770b."}else{E="\u60a8\u7684\u7559\u8a00\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u672a\u77e5\u9519\u8bef\uff0c\u91cd\u65b0\u53d1\u9001\u5417\uff1f"}}jQuery(D).prepend('
'+E+"
");this.cleanup()},cleanup:function(){jQuery("#comment",D).clearFields();jQuery(".ajax_comments_spinner",D).remove();jQuery("input[@type=submit]",D).removeAttr("disabled").show();ajax_comments.locked[D]=false}});return false}};jQuery(function(){jQuery("#commentform").bind("submit",ajax_comments.onsubmit)});$(document).ready(function(){if($("input#author[value]").length>0){$(".hide-input").css("display","none");var D='EDIT';$("p#respond").append(D);$(".editinfo").click(function(){$(".hide-input").slideToggle()})}});function ctrlEnter(D){var E=D?D:window.event;if(E.ctrlKey&&E.keyCode==13){document.getElementById("submit").click()}}var C=/^@/;var A=/^#comment-/;$(".commentlist li .list p a").each(function(){if($(this).text().match(C)&&$(this).attr("href").match(A)){$(this).addClass("replybox")}});var B=$(".commentlist").offset();$(".replybox").hover(function(){$($(this).attr("href")).clone().hide().attr("id","").insertAfter($(this).parents("li")).addClass("commentTip").show("slow")},function(){$(".commentTip").fadeOut("normal",function(){$(this).remove()})}).mousemove(function(E){$(".commentTip").css({left:(E.pageX-B.left-60),top:(E.pageY-B.top+5)})})