/*
 * js-шаблонизатор
 * howto: http://sreznikov.blogspot.com/2010/01/supplant.html
 */
String.prototype.supplant = function(o) {
	return this.replace(/{([^{}]*)}/g,
		function(a, b) {
			var r = o[b];
			return typeof r === 'string' || typeof r === 'number' ? r : a;
		}
	);
};