code: function(opacity) {
          return function(g, i) {
            gEnter.selectAll(".chord")
                .filter(function(d) {
                  return d.source.index != i && d.target.index != i;
                })
              .transition()
                .style("opacity", opacity);
            var groups = [];
            gEnter.selectAll(".chord")
                .filter(function(d) {
                  if (d.source.index == i) {
                    groups.push(d.target.index);
                  }
                  if (d.target.index == i) {
                    groups.push(d.source.index);
                  }
                });
            groups.push(i);
            var length = groups.length;
            gEnter.selectAll('.group')
                .filter(function(d) {
                  for (var i = 0; i < length; i++) {
                    if(groups[i] == d.index) return false;
                  }
                  return true;
                })
                .transition()
                  .style("opacity", opacity);
          };
        }
docs: Returns an event handler for fading a given chord group.