function $$(sel, parent) { var nodes = (parent || document).querySelectorAll(sel); return Array.prototype.slice.call(nodes, 0); }