<table class="block answer" id="answer_{id}">
	<tr>
		<td class="col-xs-2">
			<div class="line">
				<a href="../profile?id={author}" class="fs-17">{login}</a>
			</div>
		</td>
		<td class="col-xs-10">
			<div class="line">
				<a class="f-l" href="#answer_{id}">{date}</a>
				{if(is_worthy("r"))}
					<a class="f-r c-p"><span class="glyphicon glyphicon-trash" data-placement="left" tooltip="yes" data-original-title="Удалить" onclick="dell_answer('{id}');"></span></a>
				{/if}

				{if((is_worthy("r")) or (isset($sessionid) and ($sessionid != null) and ('{author_id}' == '{my_id}') and ('1' == '{check}')))}
					<a class="f-r c-p" href="edit_message?id={topic_id}&id2={id}"><span class="glyphicon glyphicon-pencil" data-placement="left" tooltip="yes" data-original-title="Редактировать"></span></a>
				{/if}
			</div>
		</td>
	</tr>
	<tr>
		<td class="col-xs-2">
			<div class="user mb-10">
				<img src="../{avatar}" alt="{login}"><br>
				<p class="hidden-xs" style="color: {gp_color}">{gp_name}</p>
				<p class="hidden-xs">Рейтинг: {reit}</p>
				<p class="hidden-xs">Сообщений: {answers}</p>
				<p class="hidden-xs">Спасибок: {thanks}</p>
			</div>
		</td>
		<td class="col-xs-10">
			<div id="text_{id}" class="with_code">
				{text}
			</div>
			<div class="clearfix"></div>
			{if('{edited_by_id}' != '')}<div class="edited">Отредактировал: <a href="../profile?id={edited_by_id}" title="{edited_by_login}">{edited_by_login}</a>, {edited_time}</div>{/if}
			{if('{signature}' != '')} <hr class="delimiter"> {signature} <div class="clearfix"></div>{/if}
		</td>
	</tr>
	<tr>
		{if(isset($sessionid) and $sessionid != null and '{author_id}' != '{my_id}')}
		<td class="col-xs-2">
			<div class="btn-group disp-b" role="group">
				<a class="btn btn-default btn-sm c-p pd-5" onclick="answer({id},'{login}','{link}');" type="button">
					<i class="hidden-xs">Ответ</i>
					<span class="visible-xs glyphicon glyphicon-share-alt"></span>
				</a>
				<a class="btn btn-default btn-sm c-p pd-5" onclick="thank({id},0);" type="button">
					<i class="hidden-xs">Спасибо</i>
					<span class="visible-xs glyphicon glyphicon-thumbs-up"></span>
				</a>
			</div>
		</td>
		<td class="col-xs-10">
			{mess_thanks}
		</td>
		{else}
		<td class="col-xs-12" colspan="2">
			{mess_thanks}
		</td>
		{/if}
	</tr>
</table>

<script>
	$(document).ready(function() {
		h1 = $('#answer_{id} tr:nth-child(2) > .col-xs-2').height();
		h2 = $('#answer_{id} tr:nth-child(2) > .col-xs-10').height();

		if(h2 > h1) {
			$('#answer_{id} tr:nth-child(2) > .col-xs-2').height(h2+20);
		}
	});
</script>