setup.mediaPath = function(rawPath:string){
    if(rawPath.substring(0,6) == 'https:' || rawPath.substring(0,5) == 'http:')
        return rawPath;

    let path = State.variables.media_path + rawPath;
	return path;
}

setup.mediaPathImage = function(rawPath:string){
    if(rawPath.substring(0,6) == 'https:' || rawPath.substring(0,5) == 'http:')
        return rawPath;

    let path = State.variables.media_path + rawPath;
    if(setup.isWebVersion)
		path = path.replace(path.split('.').pop(),'webp');
	return path;
}