               )
       }
 
-      s2UserOptions = $input.data("s2options")
+      s2UserOptions = $input.data("s2-options")
 
       if s2UserOptions is `undefined`
         s2FullOptions = $.extend({}, s2DefaultOptions)

            ajaxData = { term: term, page: page }
            $this = $(this.context)

            additionalUserData = $this.data('s2options')
            paramsCollection = {}
            if additionalUserData isnt `undefined`
              additionalAjaxData = additionalUserData['additional_ajax_data']

    $inputs = $('input.auto-ajax-select2').not('.select2-offscreen')
    $inputs.each ->
      $input = $(this)
      path = $input.data('s2-href')
      limit = $input.data('s2-limit') || 25
      customFormatSelection = $input.data('s2-format-selection')
      customFormatResult = $input.data('s2-format-result')
      if customFormatSelection isnt `undefined` && (window[customFormatSelection] isnt `undefined`)
        formatSelectionFunc = window[customFormatSelection]
      else
        formatSelectionFunc = formatSelection
      if (customFormatResult isnt `undefined`) && (window[customFormatResult] isnt `undefined`)
        formatResultFunc = window[customFormatResult]
      else
        formatResultFunc = formatResult
      s2DefaultOptions = {
        allowClear: true
        multiple: false
        formatSelection: formatSelectionFunc
        formatResult: formatResultFunc
#        INFO: Not documented feature of select2 library, worked very well, but not clearing classes after item removing
#        formatSelectionCssClass: itemSelectionCssClass
        formatResultCssClass: itemResultCssClass
