/**
 * Base.Touchspin 1.0
 *
 * Requiere
 *     Base 1.0
 */
$(function() {
    $.extend(Base, {
        Touchspin : {

            create: function (selector, options) {

                var _i18n = {
                };

                if(options == undefined){
                    options = {}
                }

                _i18n = $.extend(true, _i18n, Base.i18n.touchspin);

                if (options._i18n !== undefined && options._i18n != null) {
                    _i18n = $.extend(true, _i18n, options._i18n);
                }

                var defaultOptions = {
                    min: 0,
                    max: 100,
                    step: 1,
                    decimals: 0
                };

                var finallyOptions = $.extend(true, defaultOptions, options);

                return  $(selector).TouchSpin(finallyOptions);
            },

            _qxTouchspin : function (touchspin) {

                return {

                    ver : function () {

                        console.log("Base.Touchspin 1.0");
                        console.log("Requiere: Base 1.0;");
                    }
                }
            }
        }
    });

    $.fn.qxTouchspin = function () {

        var touchspin = this;

        return Base.Touchspin._qxTouchspin(touchspin);
    }
}); 