If you're going to use the `dom` lib you can simplify a lot of this:

```js
dom(selector).each(function(el){
   var $el = dom(el);
   $el.toggleClass(className, $el.attr('data-url') === window.location.pathname);
});
```

jQuery-style.