<div class="gallary_list">
	<h3 class="p-b5">{$lang.gallary.popular_categories}</h3>
	<div class="albums">
		{section name=c loop=$categories start=0 max=5}
			<div class="float_left" style="width:190px;">
				<div class="albums_item">
					{if !$categories[c].icon}
						<a {if $categories[c].is_adult}onclick="launchWindowAlbums('{$categories[c].view_link}','',800,580); return false;"{else}href="{$site_root}/{$seo.gallery}?sel=category&id_category={$categories[c].id}&upload_type={$form.upload_type}"{/if}>
					{/if}
					<div class="album_icon {if $form.upload_type eq 'f'}photo{elseif $form.upload_type eq 'a'}audio{elseif $form.upload_type eq 'v'}video{/if}">
						{if $categories[c].icon}<a href="{$site_root}/{$seo.gallery}?sel=category&id_category={$categories[c].id}&upload_type={$form.upload_type}"><img src="{$categories[c].icon}" /></a>{/if}
					</div>
					{if !$categories[c].icon}
						</a>
					{/if}
				</div>
				<div class="albums_descr">
					<div style="clear:both;">
						<span class="float_left">{$lang.gallary.category}:&nbsp;</span>
						<a class="float_left" href="{$site_root}/{$seo.gallery}?sel=category&id_category={$categories[c].id}&upload_type={$form.upload_type}">{$categories[c].name|truncate:15:"...":true}</a>
					</div>
					<div style="clear:both;">
						<span class="float_left">{if $upload_type eq 'f'}{$lang.gallary.photos}{else}{$lang.gallary.videos}{/if}:&nbsp;</span>
						<span class="float_left">{$categories[c].photo_count}</span>
					</div>
					<div style="clear:both;">
						<span class="float_left">{$lang.gallary.author}:&nbsp;</span>
						<a class="float_left" href="{$categories[c].profile_link}" target="_blank">{$categories[c].author_name|truncate:15:"...":true}</a>
					</div>
				</div>
			</div>
		{/section}
	</div>	
</div>	
{include file="$gentemplates/pager.tpl" links=$links_pc update_div='pop_cat' ajax=1}