
$(document).ready(function(){
  $(".str").css('height','36px');
if ( window.location == "http://hornomlynska.cz/" )  //"http://localhost/wp_klub/" )
  $('.str').eq(0).css('height','36px').children('.stranka').addClass('vstr').css('height','auto');
else
  $('div.str').eq(0).children('.stranka').addClass('prvni');
  
  

  $(".stranka").each(function(){
    if ( $(this).children('a').attr('href') == window.location ){
      $(this).parent('.str').css('height','auto');
      $(this).addClass('vstr');
      $(this).removeClass('prvni');
      $(this).children('a').css({'font-weight':'bold'});
      //$(this).parent('.str').next('.str').children('.stranka').addClass('prvni');
      //$(this).css({'background-color':'#fff'});
    }

   $(this).parent(".str").children(".podstranka").children('a').each(function(){
      if ( $(this).attr('href') == window.location ){
        $(this).parent(".podstranka").parent(".str").css('height','auto');
        $(this).css('font-weight','bold');
        $(this).parent(".podstranka").parent('.str').children('.stranka').addClass('vstr');
        $(this).parent('.podstranka').parent('.str').next('.str').children('.stranka').addClass('prvni');
      }
   
   
   });

  });
  
  //$('.vstr').parent('.str').next('.str').addClass('prvni');
 
  if ($(".sidebar").height() > $(".content").height() )
    $('.content').css('min-height', $(".sidebar").height());
  else
    $('.sidebar').css('min-height', $(".content").height());

/*   
$('.motto').click(function() {
$('.rok-klik').animate({height: 'toggle'},500);    
});
*/


$("#rok-06").click(function() {
    $(this).next('.rok-detail').animate({height: 'toggle'},500);
});
$("#rok-07").click(function() {
    $(this).next('.rok-detail').animate({height: 'toggle'},500);
});

$("#rok-08").click(function() {
    $(this).next('.rok-detail').animate({height: 'toggle'},500);
});
$("#rok-09").click(function() {
    $(this).next('.rok-detail').animate({height: 'toggle'},500);
});

$("div#rozbalovaci h3").hover(function() {
  $(this).css('cursor','pointer');
});
$("div#rozbalovaci h3").click(function() {
    $(this).parent('div#rozbalovaci').children('.rozbaleny').animate({height: 'toggle'},500);
});
$("#sponzori").click(function(){
  window.location = "http://hornomlynska.cz/podekovani-darcum/prehled/";
});

});
