   constructor: (select_element, @opts={}) ->
     @select         = jQuery(select_element)
     @multiple       = @select.attr("multiple") == "multiple"
+    @limit          = parseInt(@select.data("limit")) || @opts.limit
+    @limit_reached  = @select.data("limit-reached") || @opts.limit_reached
     @build_and_append_picker()
 
   build_and_append_picker: () ->

#
# Image Picker source
# by Rodrigo Vera
#

jQuery.fn.extend({
  imagepicker: (opts = {}) ->

    changed:      undefined,
    clicked:      undefined,
    selected:     undefined,
    limit:        0,
    limit_reached:undefined,
  }
  jQuery.extend(default_options, opts)

