"use strict";
(function ($) {
    $.field_amenity = function (element, options) {
        var defaults = {
            input_name: ""
        }
        var plugin = this;
        plugin.settings = {}
        var $element = $(element), 
            element = element;
        plugin.init = function () {
            plugin.settings = $.extend({}, defaults, options);
            $element.find('select.list-amenity').select2();
           
        };
        plugin.example_function = function () {
        };
        plugin.init();
    }
    
    $.fn.field_amenity = function (options) {
        
        return this.each(function () {
            
            if (undefined === $(this).data('field_amenity')) {
                var plugin = new $.field_amenity(this, options);
                $(this).data('field_amenity', plugin);
            }
        });
    }
})(jQuery);
