(function ($, paw, utils) {
    var _localization = null;
    var _activePopup = null;

    $.fn.noteEditorPopupTrigger = function (settings, getContent) {
        
        $(this).on('click', function () {
            _activePopup = new paw.com.noteEditor.NoteEditorPopup(settings, _localization);
            _activePopup.show(utils.value.isFunction(getContent) ? getContent() : null);
        });
        return _activePopup;
    };

    $.noteEditorPopupTrigger = function (localization) {
        if (utils.value.isSet(localization)) {
            _localization = localization;
        }
    }
})(jQuery, paw, paw.utils);