{assign var="cnt" value=0}
{foreach from=$images item=image name="inner_pictures"}
  {assign var="cnt" value=$cnt+1}
  {if $cnt==1}
    {assign var="first_image_original" value=$image->file}
    {assign var="first_title" value=$gallerytitle.$kalba}
    {if !$first_title}
      {assign var="first_title" value=$image->title.$kalba}
    {/if}  
  {else}
  <div class="galhide" style="display:none">
    <a href="{$image->file}" class="fancy" rel="gal_{$image->galleryid}" title="{$image->title}"></a>
  </div>
{/if}
{/foreach}
