var nextElementSibling = function (el) {

    do { el = el.nextSibling; } while (el && el.nodeType !== 1);
    return el;