         @modal.data('target', this)
         fn = =>
           $('#modal_form form input[name$="[name]"]').val(term)
-          @modal.modal()
+          @runModal()
         $.get @el.data('add'), {modal: true}, fn, 'script'
       null
 

        e.preventDefault()
        @modal.data('target', this)
        fn = =>
          @modal.modal()
        $.get $el.attr('href'), {modal: true}, fn, 'script'

  buildOptions: ->

        results: data
        more: data.length > 0

  buildImageOptions: ->
    @options.formatResult = (item) ->
      html = '<div class="fancy_select-result">'
      html += "<img src='#{item.image}' alt='#{item.text}'>" if item.image
