"use strict";
(function ($) {
    $.field_alias = function (element, options) {
        var defaults = {
            input_name: ""
        }
        var plugin = this;
        plugin.settings = {}
        var $element = $(element), 
            element = element;    
        
        plugin.init = function () {
            $element.keyup(function() {
                this.value = this.value.replace(/\s/g,'-');
            });

        }
        plugin.example_function = function () {
        };
        plugin.init();
    }
    
    $.fn.field_alias = function (options) {
        
        return this.each(function () {
            
            if (undefined == $(this).data('field_alias')) {
                var plugin = new $.field_alias(this, options);
                $(this).data('field_alias', plugin);
            }
        });
    }
})(jQuery);
