Element.isParent = function (child, element) {
    if (!child.parentNode || child == element) return false;

    if (child.parentNode == element) return true;