if (!RedactorPlugins) var RedactorPlugins = {}; (function($) { RedactorPlugins.imagemanager = function() { return { init: function() { if (!this.opts.imageManagerJson) return; this.modal.addCallback('image', this.imagemanager.load); }, load: function() { var $modal = this.modal.getModal(); this.modal.createTabber($modal); this.modal.addTab(1, 'Upload', 'active'); this.modal.addTab(2, 'Choose'); $('#redactor-modal-image-droparea').addClass('redactor-tab redactor-tab1'); var $box = $('