jQuery('.fm-container').richFilemanager(jQuery.extend({
    configUrl: '../../../api/filemanager.config.json.php',
    callbacks: {
        beforeCreatePreviewUrl: function(resourceObject, url) {
            return url.replace(/^(\.\.\/){3}/, "");
        }
    }
}, {}));