/**
 * Base.Hint 1.0
 *
 * Requiere
 *     Base 1.0
 */
$(function() {

    $.extend(Base, {
        Hint : {

            create: function (selector, options) {

                var _i18n = {
                    language: {}
                };

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

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

                var defaultOptions = {
                    title: 'Mensaje',
                    trigger: 'manual',
                    delay: 3000,
                    placement: 'auto', //auto | top | bottom | left | right
                    container: 'body'
                };


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

                $(selector).attr('data-original-title', finallyOptions.title);
                $(selector).attr('data-placement', finallyOptions.placement);

                $(selector).tooltip(finallyOptions);
                $(selector).tooltip('show');

                setTimeout(function() {
                        $(selector).tooltip('hide');
                    },
                    finallyOptions.delay);
            },

            _qxHint : function (hint) {

                return {

                    ver : function () {

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

    $.fn.QxHint = function () {

        var hint = this;

        return Base.Modal._qxHint(hint);
    }
});