   ###
   # Takes dialog box data and returns a dialog box for nextUp actions
   ###
-  dlg = $('<div></div>').addclass("dlg")
-  dlg.append(markdown.toHTML(dlgData.text))
-  buttons = $('div').addclass("buttons")
+  dlg = $('<div></div>').addClass("dlg")
+  dlg.append(markdown.makeHtml(dlgData.text))
+  buttons = $('div').addClass("buttons")
   for item in dlgData.buttons
-    button = $('div').addclass("button")
+    button = $('div').addClass("button")
     button.attr {onclick: "#{item.action}"}
     button.content(item.label)
     buttons.append(button)

  # Get the stats for the challenge and display the count of remaining
  # tasks
  ###
  $.getJSON "c/#{challenge}/stats", (data) ->
    remaining = data.total - data.done
    $("#counter").text remaining

updateChallenge = (challenge) ->
  ###
  # Use the current challenge metadata to fill in the web page
  ###
  $.getJSON "/c/#{challenge}/meta", (data) ->
    currentChallenge = data
    $('#challengeDetails').text currentChallenge.name
    if data.tileurl? and data.tileurl != tileURL
      tileURL = data.tileurl
      tileAttrib = data.tileasttribution if data.tileattribution?
      changeMapLayer(tileURL, tileAttrib)
    currentChallenge.help = markdown.makeHTML(data.help)
    currentChallenge.doneDlg = makeDlg(data.doneDlg)


enableKeyboardShortcuts = ->

  ###
  # Displays a task to the display and waits for the user prompt
  ###
  drawFeatures(task.features)
  revGeocode()
  setDelay 3, msgClose()
  msgTaskText()
