       e.attr('href', url)
 
 
+
+# A behavior to toggle CSS classes on an element when a particular state
+# (with or without specific state parameters) is active.
+# Targets elements with a ui-sref-active attribute.
+# ui-sref-active can optionally have a value selecting the specific state
+# you want to watch for. If no value is provided, it will look to the state
+# referenced by ui-sref.
+# To help with lists that point at the same state with different state params,
+# the behavior will also compare the contents of ui-sparams, if present.
+# The default class is 'ui-state-active' but this can be customized in the
+# behavior options:
+# class MyView extends Marionette.ItemView
+#   behaviors:
+#     UISref: {}
+#     UISrefActive: {activeClasses: 'state-is-active'}
+#
 exports.UISrefActive = class UISrefActive extends Mn.Behavior
   ui:
     active: '[ui-sref-active]'

{ UIRouterMarionette } = require('../index')



exports.UISref = class UISref extends Mn.Behavior
  ui:
    sref: '[ui-sref]'


  onClickLink: ->
    # maybe parse and navigate to state if this element was inserted after
    # original dom insertion (through data binding or whatever)

  onAttach: ->
    # Go through all the ui-sref links and turn their ui-sref and HTML-escaped
