/* */ (function ($) { function AMFPHPCommConfig(base) { this.mediaPath = function (path, thumb) { if(thumb === undefined || thumb === null) thumb = false; if (path.match(/:\/\//)) { // absolute uri return path; } else { return (thumb ? this.thumbs : this.medias) + '/' + path } } this.mediaURI = function(path, thumb) { if(thumb) { return this.gateFile + 'thumbs/' + path + '.gif'; } else { return this.gateFile + 'medias/' + path; } } this.noCache = function () { return '_=' + new Date().getTime(); } this.absolutize = function(relativeURI) { return this.base + this.normalize(relativeURI); } this.normalize = function(uri) { uri = uri !== null && uri !== undefined ? $.trim(uri) : '' ; return (uri.length > 1 && uri.charAt(0) != '/') ? '/' + uri : uri ; } this.base = this.normalize(base); this.amfphp = this.base + '/amfphp'; this.store = this.base + '/warehouse'; this.medias = this.store + '/medias'; this.thumbs = this.store + '/thumbs'; this.gateHttp = this.amfphp + '/http.php/'; this.gateFile = this.amfphp + '/file.php/'; }; jQuery.AMFPHP = new AMFPHPCommConfig(''); })(jQuery);