anchor.diff:          }
         });
         $('#add button').click(function() { addlist(); });
  -      tabs.tabs('select', -1);
  +      oncomplete();
       });
     }
  -  reload();
  +  reload(function() { tabs.tabs('select', -1); });
   });
   /* ]]> */
   </script>
  
positive.code: 
    function addlist() {
      $.post('api/', {list: $('#add input').val()}, function(data) {
        reload();
        //tabs.tabs('select', $('a[title="' + data + '"]').attr('href'));
        var link = $('a[title="' + data + '"]');
        var myid = link.attr('href');
        tabs.tabs('option', 'selected', $('a[title="' + data + '"]').attr('href'));
      });
    }
  
    function reload() {
      $.getJSON('api/', function(data) {
        while (tabs.tabs('length') > 0) {
          tabs.tabs('remove', 0);
  
negative.code:             .append($('<button>Rename</button>').click(function() {
                $.post('api/' + $(ui.tab).attr('title'),
                  {newname: $('input', $(this).parent()).val(), _method: 'put'},
                  function(data) {
                    reload(function() {
                      var link = $('a[title="' + data + '"]');
                      var myid = link.attr('href');
                      tabs.tabs('option', 'selected', myid);
                    });
                  });
              }))
              .append($('<button>Delete</button>').click(function() {
                $.post('api/' + $(ui.tab).attr('title'), { _method: 'delete'},
                  function() { reload(function() { tabs.tabs('select', -1); });});
              }))
              .hide())
            .appendTo($(ui.panel));
  