<{strip}>

<script>
$(function(){
	var mywidth = $(document).find('.gazoimg').width() * 0.8;
	var op = {
		width: mywidth,
		type: 'cover',
		bgColor:'#fff'
	};
	$('img.cube').within(op);

	$(window).resize(function(){
    var mywidth = $(document).find('.gazoimg').width() * 0.8;
		$('span.cube').css('width',mywidth);
		$('span.cube').css('height',mywidth);
	});

});

</script>

<{include file="db:`$mydirname`_header.html"}>
<div class="row">
  <div class="one half padded align-left small">
    <a href='index.php'><{$lang_album_main}></a>&nbsp;&gt;&nbsp;<{$album_sub_title}>
  </div>
  <div class="one half padded align-right small">
    <{if $lang_add_photo}><a href="index.php?page=submit&cid=<{$category_id}>"><{$lang_add_photo}><i class="icon-camera"></i><i class="icon-plus-sign"></i></a><{/if}>
  </div>
</div>
<{if count($subcategories) > 0 }>
  <hr />
  <{include file="db:`$mydirname`_categories.html"}>
<{/if}>

<{if $photo_small_sum < 1 }>
  <div align="center">
    <{$lang_nomatch}>
  </div>
<{else}>
 <div class="row">
   <div class="padded align-center">
     <{$lang_sortby}>&nbsp;&nbsp;
     <{$lang_title}> (<a href="index.php?page=viewcat&amp;cid=<{$category_id}>&amp;orderby=titleA"><i class="icon-arrow-up"></i></a><a href="index.php?page=viewcat&amp;cid=<{$category_id}>&amp;orderby=titleD"><i class="icon-arrow-down"></i></a>)&nbsp;
     <{$lang_date}> (<a href="index.php?page=viewcat&amp;cid=<{$category_id}>&amp;orderby=dateA"><i class="icon-arrow-up"></i></a><a href="index.php?page=viewcat&amp;cid=<{$category_id}>&amp;orderby=dateD"><i class="icon-arrow-down"></i></a>)&nbsp;
     <{if $canrateview }>
       <{$lang_rating}> (<a href="index.php?page=viewcat&amp;cid=<{$category_id}>&amp;orderby=ratingA"><i class="icon-arrow-up"></i></a><a href="index.php?page=viewcat&amp;cid=<{$category_id}>&amp;orderby=ratingD"><<i class="icon-arrow-down"></i></a>)&nbsp;
     <{/if}>
     <{$lang_popularity}> (<a href="index.php?page=viewcat&amp;cid=<{$category_id}>&amp;orderby=hitsA"><i class="icon-arrow-up"></i></a><a href="index.php?page=viewcat&amp;cid=<{$category_id}>&amp;orderby=hitsD"><i class="icon-arrow-down"></i></a>)
     <br />
     <strong><{$lang_cursortedby}></strong>
     <br />
     <br />
     <div class="row">
       <div class="one half mobile padded align-left">
         <{$photonavinfo}>
       </div>
       <div class="one half mobile padded align-right">
         <{$photonav}>
       </div>
     </div>
   </div>

  <div class="row padded">
    <{foreach from=$photos item=photo}>
     <div class="one fourth two-up-mobile padded align-center gazoimg">
       <a href='<{$mod_url}>/index.php?page=photo&lid=<{$photo.lid}>'><img src="<{$mod_url}>/index.php?page=image&id=<{$photo.lid}>&sz=0" alt='<{$photo.title}>' title='<{$photo.title}>' class="cube" border='0' /><br /><{$photo.title}></a>
     </div>
    <{/foreach}>
  </div>
  <hr />
  <div class="row">
    <div class="one half mobile padded align-left">
      <{$photonavinfo}>
    </div>
    <div class="one half mobile padded align-right">
      <{$photonav}>
    </div>
  </div>
<{/if}>

<{include file="db:`$mydirname`_footer.html"}>
<{/strip}>
