// attach events to all the comment posts in the page
Event.observe(document, 'dom:loaded', function(){
  $$('.notice').each( function( post ){
    var remove_link = post.down('.remove-link');
    var edit_link   = post.down('.edit-link');
    comment_add_link_events(remove_link, edit_link,  post);
  });
});

// now add the functions used for show/hide the remove link
function comment_add_link_events(remove, edit, post) {
  if (post.down('.remove-link')) {
  	Event.observe(post, 'mouseover', function(){ comment_show_remove( remove, edit ); });
  	Event.observe(post, 'mouseout', function(){ comment_hide_remove( remove, edit ); });
  }
}  
  
function comment_show_remove(remove, edit) {
	remove.show();
  edit.show();        
}
		      
function comment_hide_remove(remove, edit) { 
	remove.hide();      
  edit.hide();        
}
