 #       belong to the same confirmation group; their values have to match to
 #       trigger the "win" condition
 #   data-pwnfx-confirm-class: the CSS class that is added to hidden elements;
-#       (default: hidden)
+#       by default, this is {PwnFx.hiddenClassName}, which gets its value from
+#       the data-pwnfx-hidden-class attribute on <body>
 #   data-pwnfx-confirm-win: CSS selector identifying the elements to be shown
 #       when the "win" condition is triggered, and hidden otherwise
 #   data-pwnfx-confirm-fail: CSS selector identifying the elements to be hidden
 #       when the "win" condition is triggered, and shown otherwise
 class PwnFxConfirm
   constructor: (element, identifier, scopeId) ->
-    hiddenClass = element.getAttribute('data-pwnfx-confirm-class') || 'hidden'
+    hiddenClass = element.getAttribute('data-pwnfx-confirm-class') ||
+                  PwnFx.hiddenClassName
     sourceSelector = "[data-pwnfx-confirm-done=\"#{identifier}\"]"
     winSelector = "[data-pwnfx-confirm-win=\"#{identifier}\"]"
     failSelector = "[data-pwnfx-confirm-fail=\"#{identifier}\"]"

        targetElement.classList.add hiddenClass
      for targetElement in PwnFx.queryScope(scope, showSelector)
        targetElement.classList.remove hiddenClass
      if trigger == 'click'
        event.preventDefault()
        false
      else
        true

    if trigger == 'click'
      element.addEventListener 'click', onChange, false
    else if trigger == 'checked'
      element.addEventListener 'change', onChange, false
      onChange()
    else


    onChange = ->
      value = element.value
      return true if value is refreshOldValue
      refreshOldValue = value

      window.clearTimeout changeTimeout if changeTimeout isnt null
      changeTimeout = window.setTimeout ajaxRefresh, refreshDelay
      true

