Add general resolver to importer

`closest` moves up the tree just like `parent().parent()` but is more resilient to possible template changes.
http://api.jquery.com/closest/