rem: .each(function () {  this.key = this.id.substring(13);   farb.linkTo(function () {}).setColor('#000').linkTo(this);   var i = inputs.length; if (inputs.length) { var lock = $('<div class="lock"></div>').toggle( function () { $(this).addClass('unlocked'); $(hooks[i - 1]).attr('class', locks[i - 2] && $(locks[i - 2]).is(':not(.unlocked)') ? 'hook up' : 'hook' ); $(hooks[i]).attr('class', locks[i] && $(locks[i]).is(':not(.unlocked)') ? 'hook down' : 'hook' ); }, function () { $(this).removeClass('unlocked'); $(hooks[i - 1]).attr('class', locks[i - 2] && $(locks[i - 2]).is(':not(.unlocked)') ? 'hook both' : 'hook down' ); $(hooks[i]).attr('class', locks[i] && $(locks[i]).is(':not(.unlocked)') ? 'hook both' : 'hook up' ); } ); $(this).after(lock); locks.push(lock); };   var hook = $('<div class="hook"></div>'); $(this).after(hook); hooks.push(hook);  $(this).parent().find('.lock').click(); this.i = i; inputs.push(this); }) 
add: farb.linkTo(function () {}).setColor('#000').linkTo(this); 
context:     .each(function () {      // Extract palette field name      this.key = this.id.substring(13);      // Link to color picker temporarily to initialize.      farb.linkTo(function () {}).setColor('#000').linkTo(this);      // Add lock      var i = inputs.length;      if (inputs.length) {        var lock = $('<div class="lock"></div>').toggle(          function () {            $(this).addClass('unlocked');            $(hooks[i - 1]).attr('class',              locks[i - 2] && $(locks[i - 2]).is(':not(.unlocked)') ? 'hook up' : 'hook'            );            $(hooks[i]).attr('class',              locks[i] && $(locks[i]).is(':not(.unlocked)') ? 'hook down' : 'hook'            );          },          function () {            $(this).removeClass('unlocked');            $(hooks[i - 1]).attr('class',              locks[i - 2] && $(locks[i - 2]).is(':not(.unlocked)') ? 'hook both' : 'hook down'            );            $(hooks[i]).attr('class',              locks[i] && $(locks[i]).is(':not(.unlocked)') ? 'hook both' : 'hook up'            );          }        );        $(this).after(lock);        locks.push(lock);      };      // Add hook      var hook = $('<div class="hook"></div>');      $(this).after(hook);      hooks.push(hook);      $(this).parent().find('.lock').click();      this.i = i;      inputs.push(this);    })
meta: 6801	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6801/c11cb4ec24479e801076c094f043f2084b344d0c/color.js/buggy/modules/color/color.js