% for (pic in $xibit_pics){
% picnoext=`{echo $pic |sed 's,(.*)\..+$,\1,g'}
% if(! ~ $pic $xibit_img) {
      <a href="%($picnoext%)#main-img" class="thumb" >
        <img src="%( _werc/xibit/thumbs/^$pic %)" class="thumb"/>
      </a>
% }
% if not {
%      template apps/xibit/image.tpl
% }
% }