 			$.extend def, options
 			text = def.text
 			text
-				.replace(/\[im(g|age):([a-zA-Z0-9\-\.\/\?%\#_]+) left\]/g,'<img class="pull-left" src="http://oz.st-n.ru/publish/photo/' + sn.region.name + '/$2">')
-				.replace(/\[im(g|age):([a-zA-Z0-9\-\.\/\?%\#_]+) right\]/g,'<img class="pull-right" src="http://oz.st-n.ru/publish/photo/' + sn.region.name + '/$2">')
-				.replace(/\[im(g|age):([a-zA-Z0-9\-\.\/\?%\#_]+)\]/g,'<img src="http://oz.st-n.ru/publish/photo/' + sn.region.name + '/$2">')
+				.replace(/\[?(img|image|picture|photo):([a-zA-Z0-9\-\.\/\?%\#_]+)[\s]+(right|left)\]?/g,'<img class="pull-$3" src="http://oz.st-n.ru/publish/photo/' + sn.region.name + '/$2">')
+				.replace(/\[?(img|image|picture|photo):([a-zA-Z0-9\-\.\/\?%\#_]+)\]?/g,'<img src="http://oz.st-n.ru/publish/photo/' + sn.region.name + '/$2">')
 
 		fonts: (options = {}) ->
 

			$.extend def, options
			text = def.text
			text
				.replace(/\[files?:([a-zA-Z0-9\-\.\/\?%\#_]+) ([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+) \| ([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+) (left|top|right|bottom)\]/g, '<a href="http://oz.st-n.ru/publish/files/' + sn.region.name + '/$1" class="tooltip-toggle" rel="tooltip" data-placement="$4" title="$3" target="_blank"><i class="icon-download-alt"></i> $2</a>')
				.replace(/\[files?:([a-zA-Z0-9\-\.\/\?%\#_]+) ([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+) \| ([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+)\]/g, '<a href="http://oz.st-n.ru/publish/files/' + sn.region.name + '/$1" class="tooltip-toggle" rel="tooltip" title="$3" target="_blank"><i class="icon-download-alt"></i> $2</a>')
				.replace(/\[files?:([a-zA-Z0-9\-\.\/\?%\#_]+) \| ([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+) (left|top|right|bottom)\]/g, '<a href="http://oz.st-n.ru/publish/files/' + sn.region.name + '/$1" class="tooltip-toggle" rel="tooltip" data-placement="$3" title="$2" target="_blank"><i class="icon-download-alt"></i> $1</a>')
				.replace(/\[files?:([a-zA-Z0-9\-\.\/\?%\#_]+) \| ([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+)\]/g, '<a href="http://oz.st-n.ru/publish/files/' + sn.region.name + '/$1" class="tooltip-toggle" rel="tooltip" title="$2" target="_blank"><i class="icon-download-alt"></i> $1</a>')
				.replace(/\[files?:([a-zA-Z0-9\-\.\/\?%\#_]+) ([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+)\]/g, '<a href="http://oz.st-n.ru/publish/files/' + sn.region.name + '/$1" target="_blank"><i class="icon-download-alt"></i> $2</a>')
				.replace(/\[files?:([a-zA-Z0-9\-\.\/\?%\#_]+)\]/g, '<a href="http://oz.st-n.ru/publish/files/' + sn.region.name + '/$1" target="_blank"><i class="icon-download-alt"></i> $1</a>')

		mailTo: (options = {}) ->


			$.extend def, options
			text = def.text
			text
				.replace(/\[badge[\s]+([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+)[\s]+(success|warning|important|info|inverse)\]/g, '<span class="badge badge-$2">$1</span>')
				.replace(/\[badge[\s]+([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+)\]/g, '<span class="badge">$1</span>')

				.replace(/\[label[\s]+([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+)[\s]+(success|warning|important|info|inverse)\]/g, '<span class="label label-$2">$1</span>')
				.replace(/\[label[\s]+([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+)\]/g, '<span class="label">$1</span>')

				.replace(/\[color:\#([a-zA-Z0-9]+)[\s]+([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+)\]/g, '<font style="color:#$1">$2</font>')
				.replace(/\[color:([a-zA-Z0-9]+)[\s]+([\s0-9a-zA-Zа-яА-Я\_\.\/\-\?\!\*\#\'\"\<\>\,\;\:\(\)]+)\]/g, '<span class="$1">$2</span>')
				.replace(/\[\[color:\#([a-zA-Z0-9]+)\](.*?)\]/g, '<font style="color:#$1">$2</font>')
				.replace(/\[\[color:([a-zA-Z0-9]+)\](.*?)\]/g, '<span class="$1">$2</span>')


		ind: (options = {}) ->
