if($("#reply_message_<%= @comment.id%>").length > 0) {
    $("#reply_message_<%= @comment.id%>").replaceWith("<%= escape_javascript(render :partial => 'comments/simple_ke_reply_form', :locals => {:reply => @comment}) %>");
    $(function(){
        sd_create_editor_from_data(<%= @comment.id%>,null,"100%", "<%=@comment.class.to_s%>");
    });
}else if($("#reply_to_message_<%= @comment.id %>").length >0) {
    $("#reply_to_message_<%= @comment.id%>").replaceWith("<p id='reply_message_<%= @comment.id %>'></p>");
}