// декорирование различных элементов (назначение каждой функции ясно из названия)


function TableFix()
{
	$("#middle_content table td table tr td:first-child, #middle_content table td table tr th:first-child").css("border-left", "1px solid #bfbebe");
	$("#middle_content table td table tr td:last-child, #middle_content table td table tr th:last-child").css("border-right", "1px solid #bfbebe");
	$("#middle_content table td table tr:last-child td").css("border-bottom", "1px solid #bfbebe");
	
	$("#middle_content table td table tr td.no_left:first-child").css("border-left", "none");
	$("#middle_content table td table tr td.no_right:last-child").css("border-right", "none");
	
	$("#middle_content table td table.hidden_table tr td:first-child, #middle_content table td table.hidden_table tr th:first-child").css("border-left", "none");
	$("#middle_content table td table.hidden_table tr td:last-child, #middle_content table td table.hidden_table tr th:last-child").css("border-right", "none");
	$("#middle_content table td table.hidden_table tr:last-child td").css("border-bottom", "none");
	
	$("#middle_content table td table tr td.bottom").css("border-bottom", "1px solid #bfbebe");
}


$(document).ready(function(){
	TableFix();
	/*$("a:has(div), a:has(img)").css('text-decoration', 'none');*/
	$("#middle_content img").each(function(){
		if($(this).hasClass('content_photo')) $(this).wrap('<div class="content_photo inline_block" />');
	});
	$("div.content_document a").attr("target", "_blank");
});
