  
  var aktfotka2=0;
  var prestr='';

  $(document).ready(function(){
    if ($('#righcol').text()=='') {
      $('#righcol').hide();
      $('#maincontent').width(860);
    }
    $('#menu li').bind('mouseleave',function(){
      $(this).children('ul').hide();
    }).bind('mouseenter',function(){
      $(this).children('ul').show();
    });
  	$('#menu').css('left',Math.round((902-$('#menu').width()-30)/2)+'px');
  	$('#footermenu').css('margin-left',Math.round((902-$('#footermenu>ul').width())/2)+'px');
  	$('img').closest('a[href$=jpg],a[href$=JPG]').attr('rel','lgal').lightbox();
    xgal();
    //$('img').closest('a[href$=jpg][href$=JPG]').attr('rel','lgal').lightbox();
  });
  
  function xgal(){
        $('#gal img').hide();
        $('#gal img:eq('+aktfotka2+')').show();
        $('#gal>span').text($('#gal img:eq('+aktfotka2+')').attr('title'));
        $('#gal>div>span').text((aktfotka2+1)+'/'+$('#gal img').size());
  }

  function moveleft(){
    aktfotka2=((aktfotka2-1)+$('#gal img').size())%$('#gal img').size();
    xgal();
  }
  function moveright(){
    aktfotka2=(aktfotka2+1)%$('#gal img').size();
    xgal();
  }
  
