(function(a) {    
	if (a.tuntron.editor) {
		
		  var c = a("#J_PostCmtSegment"),
              d = a("#J_PostCmtArea");
            a("#J_PostCmt").click(function() {
               a("html, body").scrollTop(c.offset().top - 50);
                a.tuntron.editor ? a.tuntron.editor.iframe.contentWindow.focus() : d.find("textarea").focus()
            });
		   a(".J_PostCmtReply").click(function() {
                var b = a(this).closest("li"),
                f = b.find(".J_UserNick:first").html(),
                g = b.find(".J_PostCon:first").html();
				 a.tuntron.simpleEditor && (g = a.tuntron.simpleEditor.richText2text(b.find(".J_PostCon:first").data("content")));
                a.tuntron.editor && (g = a.tuntron.editor.richText2text(b.find(".J_PostCon:first").attr("data-content")));
                var h = b.find(".time").html(),
                b = "<blockquote>" + ('<input type="hidden" name="referid" value="' + b.data("cmtid") + '"/>'),
                b = b + ('<span class="info g-daren">\u56de\u590d ' + f + ' <span class="time">' + h + "</span></span>") + ("<p>" + a.trim(g).substring(0, 40) + "</p>");
                c.html(b + '<a class="close">X</a></blockquote>');
                a("html, body").scrollTop(c.offset().top - 50);
				a.tuntron.editor ? a.tuntron.editor.iframe.contentWindow.focus() : d.find("textarea").focus()
                c.find(".close:first").unbind("click").click(function() {
                    c.html("")
                })
            });
		
        var d = a.tuntron.editor,
        h = d.contentDecode;
		b = a("#J_PostArtical").html();
		b = h.call(d, b);
		
		 a("#J_ForumPost .J_PostCon").each(function() {
            var c = a(this),
            b = c.html(),
            b = h.call(d, b);
            c.html(b)
        });
		
		d.imgviewDoms && d.imgDecode();
		a("#J_PostArtical").html(b)
      	a("#J_PostArtical").show();
    }
	})(jQuery);