<div class="gallary_list">
	<div class="photogallery_header" onclick="showCatBlock();">
		<h3 class="p-b5" style="margin: 0;">{$lang.gallary.categories} ({$categories|@count})</h3>
		<a class="icons slidedown_icon"  href="javascript:void(0);" id="show_hide_icon">&nbsp;</a>
	</div>
	<div id="gallery_cats" style="display:none;">
		{foreach from=$categories item=cat}
			<div class="float_left gallery_cat_div">
				<div class="float_left gallery_cat_name text-overflow"><a href="{$site_root}/{$seo.gallery}?sel=category&id_category={$cat.id}&upload_type={$form.upload_type}">{$cat.name}</a></div>
				<div class="float_left text-overflow">({$cat.photo_count}&nbsp;{if $upload_type eq 'f'}{$lang.gallary.photos}{else}{$lang.gallary.videos}{/if})</div>
			</div>
		{/foreach}
	</div>	
</div>

{literal}
	<script>
		function showCatBlock(){
			if($('#show_hide_icon').hasClass('slidedown_icon')){
				$('#gallery_cats').slideDown(300);
				$('#show_hide_icon').removeClass('slidedown_icon').addClass('slideup_icon');
			}else{
				$('#gallery_cats').slideUp(300);
				$('#show_hide_icon').removeClass('slideup_icon').addClass('slidedown_icon');
			}
		}
	</script>
{/literal}