$("#comment_form").remove();

<% if @comment.parent_id == nil %>
$('#comments').append("<%= escape_javascript(render(:partial => "form"))%>");

<% else %>
$('#comment_<%= @comment.parent_id %>').children(".child_comments").append("<%= escape_javascript(render(:partial => "form"))%>");

<% end %>
