       dataType: 'json'
       data: { effective_regions: data }
       async: false
-      success: (data) -> 
-        console.log 'success!'
-        console.log data
+      success: (data) -> console.log 'success!'
 }
 
 Regions = {

  build: (editor, name, values) ->
    snippet = {}

    snippet['snippet_id'] = -> $(this.wrapper.$).find('div.cke_widget_element').data('snippet')
    snippet['configured'] = false
    snippet['template'] = values.template
    snippet['dialog_url'] = values.dialog_url
    snippet['dialog'] = name if values.dialog_url
    snippet['requiredContent'] = "div(#{name})"

        complete: (data) -> $(widget.wrapper.$).find('div.cke_widget_element').html(data.responseText)

    snippet['init'] = ->
      for k, v of $(this.wrapper.$).find('div.cke_widget_element').data('snippet-data')
        this.data[k] = v

      this.on 'dialog', (evt) -> @configured = true
      this.on 'data', (evt) -> @loadTemplate(evt.sender) if @configured

    snippet
}
