 
   # The widgets instances are stored in a Hash with the DOM element they
   # target as key. The instances hashes are stored per widget type.
-  instances = widgets.instances[name] ||= new widgets.Hash
+  instances = __instances__[name] ||= new widgets.Hash
 
   # This method execute a test condition for the given element. The condition
   # can be either a function or a value converted to boolean.

# It's the widget responsibility to clean up its dependencies during
# the `dispose` call.
widgets.release = (name) ->
  widgets.instances[name].each (value) -> value?.dispose?()

#### widgets.activate

# Activates all the widgets instances of type `name`.
widgets.activate = (name) ->
  widgets.instances[name].each (value) -> value?.activate?()

#### widgets.deactivate

# Deactivates all the widgets instances of type `name`.
widgets.deactivate = (name) ->
  widgets.instances[name].each (value) -> value?.deactivate?()

window.widgets = widgets

    Array::forEach.call elements, (element) ->
      return unless can_be_handled element

      res = __widgets__[name] element, Object.create(options), elements
      element.className += " #{handled_class}"
      instances.set element, res
      block?.call element, element, res
