 
   setAction: (url, method) ->
     methodLower = method.toLowerCase()
-    # console.log "Setting form action to #{methodLower} #{url}"
+    # log "Setting form action to #{methodLower} #{url}"
     @form.attr("action", url)
     @form.attr("method", "post")
     @form.formwizard("option", remoteAjax: this.ajaxEvents())

    $form = $("form.wizard")
    window.hatTrick = {} unless window.hatTrick?
    unless window.hatTrick.wizard?
      # console.log "Creating new HatTrickWizard instance"
      window.hatTrick.wizard = new HatTrickWizard($form, hatTrick.metadata)

camelizeString = (string) ->

    $button

  setButton: (stepId, name, button) ->
    # log "Setting button for #{stepId} named #{name} to #{JSON.stringify(button)}"
    $buttonsDiv = $("fieldset##{stepId}").find("div.buttons")
    switch name
      when "next"
        # log "Setting #{stepId} submit button val to #{button.label}"
        $button = $buttonsDiv.find('input:submit')
        unless $button.length > 0
          $button = $('<input class="wizard_button wizard_next" type="submit" />').appendTo $buttonsDiv
        $button.val(button.label)
        $button.attr("id", button.id) if button.id?
      when "back"
        # log "Setting reset button val to #{button.label}"
        $button = $buttonsDiv.find('input:reset').val(button.label)
        unless $button.length > 0
          $button = $('<input class="wizard_button wizard_back" type="reset" />').appendTo $buttonsDiv
