code: function getSibling(node, relativeIndex) {
    var parent = node.parentNode;
    if (parent === null) {
      return null;
    }
    var currentIndex = parent.childNodes.indexOf(node);
    var siblingIndex = currentIndex + relativeIndex;
    if (siblingIndex < 0 || siblingIndex > parent.childNodes.length - 1) {
      return null;
    }
    return parent.childNodes[siblingIndex];
  }
docs: returns a sibling of given node