{strip}
<div class="search_widget_result_cont">
	{if $empty}{assign var="result_count" value=0}{else}{assign var="result_count" value=$search_res|@count}{/if}
	
	<div class="search_widget_result_big_block">
		<div class="search_widget_result_big_photo search_widget_thumb">
			{if $result_count}
				<div>
					<a href="{$search_res[0].profile_link}"><img src="{$search_res[0].icon_dir}gal_big_thumb_{$search_res[0].icon_file}" /></a>
					<div class="search_widget_result_info">
						<div class="text-overflow"><a href="{$search_res[0].profile_link}" title="{$search_res[0].name}">{$search_res[0].name}</a></div>
						<div class="text-overflow" title="{$search_res[0].age}&nbsp;{$lang.home_page.ans}">{$search_res[0].age}&nbsp;{$lang.home_page.ans}</div>
					</div>
				</div>
			{else}
				<img src="{$server}{$index_theme_path}{$template_images_root}/no_search_results.png" />
				<div class="search_widget_no_results_text">{$lang.quick_search.no_search_results}</div>
			{/if}
		</div>
	</div>
	<div class="search_widget_result_big_block">
		{if $result_count >= 0 && $result_count < 4}
			<div class="search_widget_result_big_photo search_widget_thumb">
				<div class="search_widget_button search_widget_big_button" onclick="goSearchFromWidget({if $result_count == 0 || $result_count == 1}'new'{/if})">
					<img src="{$server}{$index_theme_path}{$template_images_root}/button_305_view_more.png">
					<div>{$lang.wall_events.view_more}</div>
				</div>
			</div>
		{elseif $result_count >= 4 && $result_count < 7}
			<div class="search_widget_result_line_block">
				{section loop=$search_res name=s start=1 max=3}
					<div class="search_widget_result_small_block search_widget_thumb">
						<div>
							<a href="{$search_res[s].profile_link}"><img src="{$search_res[s].icon_dir}thumb_{$search_res[s].icon_file}" /></a>
							<div class="search_widget_result_info">
								<div class="text-overflow"><a href="{$search_res[s].profile_link}" title="{$search_res[s].name}">{$search_res[s].name}</a></div>
								<div class="text-overflow" title="{$search_res[s].age}&nbsp;{$lang.home_page.ans}">{$search_res[s].age}&nbsp;{$lang.home_page.ans}</div>
							</div>
						</div>
					</div>
				{/section}
			</div>
			<div class="search_widget_result_3col_block search_widget_thumb">
				<div class="search_widget_button search_widget_mediumbig_button" onclick="goSearchFromWidget()">
					<img src="{$server}{$index_theme_path}{$template_images_root}/button_200_view_more.png">
					<div>{$lang.wall_events.view_more}</div>
				</div>
			</div>
		{elseif $result_count >= 6 && $result_count < 9}
			<div class="search_widget_result_line_block">
				{section loop=$search_res name=s start=1 max=3}
					<div class="search_widget_result_small_block search_widget_thumb">
						<div>
							<a href="{$search_res[s].profile_link}"><img src="{$search_res[s].icon_dir}thumb_{$search_res[s].icon_file}" /></a>
							<div class="search_widget_result_info">
								<div class="text-overflow"><a href="{$search_res[s].profile_link}" title="{$search_res[s].name}">{$search_res[s].name}</a></div>
								<div class="text-overflow" title="{$search_res[s].age}&nbsp;{$lang.home_page.ans}">{$search_res[s].age}&nbsp;{$lang.home_page.ans}</div>
							</div>
						</div>
					</div>
				{/section}
			</div>
			<div class="search_widget_result_col_block">
				{section loop=$search_res name=s start=4 max=2}
					<div class="search_widget_result_small_block search_widget_thumb">
						<div>
							<a href="{$search_res[s].profile_link}"><img src="{$search_res[s].icon_dir}thumb_{$search_res[s].icon_file}" /></a>
							<div class="search_widget_result_info">
								<div class="text-overflow"><a href="{$search_res[s].profile_link}" title="{$search_res[s].name}">{$search_res[s].name}</a></div>
								<div class="text-overflow" title="{$search_res[s].age}&nbsp;{$lang.home_page.ans}">{$search_res[s].age}&nbsp;{$lang.home_page.ans}</div>
							</div>
						</div>
					</div>
				{/section}
			</div>
			<div class="search_widget_result_2col_block search_widget_thumb">
				<div class="search_widget_button search_widget_medium_button" onclick="goSearchFromWidget()">
					<img src="{$server}{$index_theme_path}{$template_images_root}/button_200_view_more.png">
					<div>{$lang.wall_events.view_more}</div>
				</div>
			</div>
		{else}
			{section loop=$search_res name=s start=1 max=8}
				<div class="search_widget_result_small_block search_widget_thumb">
					<div>
						<a href="{$search_res[s].profile_link}"><img src="{$search_res[s].icon_dir}thumb_{$search_res[s].icon_file}" /></a>
						<div class="search_widget_result_info">
							<div class="text-overflow"><a href="{$search_res[s].profile_link}" title="{$search_res[s].name}">{$search_res[s].name}</a></div>
							<div class="text-overflow" title="{$search_res[s].age}&nbsp;{$lang.home_page.ans}">{$search_res[s].age}&nbsp;{$lang.home_page.ans}</div>
						</div>
					</div>
				</div>
			{/section}
			<div class="search_widget_result_small_block search_widget_thumb">
				<div class="search_widget_button search_widget_small_button" onclick="goSearchFromWidget()">
					<img src="{$server}{$index_theme_path}{$template_images_root}/button_100_view_more.png">
					<div>{$lang.wall_events.view_more}</div>
				</div>
			</div>
		{/if}
	</div>
</div>
{/strip}