(function($){
$.aqString = {
	trim: function(str,dim) {
		if (!str) return null;
		if (!dim) dim = ',';
		var re = new RegExp(dim+'+','g');
		var m = new RegExp('^'+dim+'+|'+dim+'+$','g');
		return str.replace(re,',').replace(m,'');
	},
	size: function(bytes,type) {
		var s = bytes;
		switch(type.toLowerCase()) {
			case 'k': s = Math.round((bytes/1024)*100)/100 + 'k'; break;
			case 'm': s = Math.round((bytes/1048576)*100)/100 + 'M'; break;
			case 'g': s = Math.round((bytes/1073741824)*100)/100 + 'G'; break;
		};
		return s;
	}
};
})(jQuery);
