
  $(document).ready(function(){
    $('#zajimavepripadyslideshow img:not(:first)').hide();
    $('.accordion div div').hide();
    $('.thickbox').lightbox();
    $('.accordion h3 a').click(function(){
      url=$(this).attr('href');
      $(this).closest('h3').next('div').load(url,function(){$('.accordion div div').slideUp('slow'); $(this).slideDown('slow'); $('.thickbox').lightbox();});
      return false;
    });
    animateslideshow();
  });
  
  var aktimg=0;
  var animspeed=3000;
  
  function animateslideshow(){
    pocet=$('#zajimavepripadyslideshow img').size();
    aktimg=(aktimg+1)%pocet;
    $('#zajimavepripadyslideshow img').fadeOut('slow');
    $('#zajimavepripadyslideshow img:eq('+aktimg+')').fadeIn('slow');
    setTimeout(function(){animateslideshow();},animspeed);
  }
