Update lib-dom.js

 - added search for parent element with given depth (or default)