danik.js, понял.
Доделал.
(function() {
var d = document.documentElement,
m = d.matches || d.webkitMatchesSelector || d.oMatchesSelector || d.mozMatchesSelector || d.msMatchesSelector;
Element.prototype.addEventDelegate = function(type, selector, fn) {
this.addEventListener(type, function(e) {
var t = e && e.target || window.event.srcElement;
while(t != this) {
if(m.call(t, selector)) {
fn.call(t, e);
break;
}
t = t.parentNode;
}
}, false);
}
})();