<% selector = ".#{watcher_css(watched)}" %>
$("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link(watched, user) %>")});
<% if watched.first.is_a?(Issue) %>
$('#watchers[data-watchable-id="<%= watched.first.id %>"]').html('<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => watched.first})) %>');
<% else %>
$('#watchers').html('<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => watched.first})) %>');
<% end %>
