/**
 * ruzne funkce, utf8 (ěščřžýáíéúů)
 */
$(document).ready(function(){
  init();
});

var init = function() {
  $('div.c-hiding').addClass('c-hidden').find('h2').click(function() {
    $(this).parent().toggleClass('c-hidden');
  });
  $("#vyber-sekce ul").show().append('<li class="top">&nbsp;</li><li class="bottom">&nbsp;</li>').find('li').hide().filter('.active, .p-active').show().click(function() {
      $("#vyber-sekce ul li").not('.active, .p-active').toggle();
      return false;
  });
  var whead = $('#whead');
  var whead_lpos = 0;
  var mousepos = null;
  $('body').mousemove(function(e) {
      if(mousepos===null) {
          mousepos = e.pageX;
      } else {
        whead_lpos -= (e.pageX - mousepos);
        mousepos = e.pageX;
        whead.css('backgroundPosition', whead_lpos+'px 0px');
      }
      return true;
  });
  $('div.karta a.nahled').each(function() {
    $(this).closest('.karta').mouseenter(function() {
        $(this).find('p').fadeIn();
    }).mouseleave(function() {
        $(this).find('p').fadeOut();
    }).find('p').css({position:'absolute',top:'44px',left:'0'}).hide();
  });
}
var options = {
    handleOversize:     'drag',
    handleUnsupported:  'remove',
    autoplayMovies:     true,
    language:           'cs',
    players:            ['img', 'qt', 'wmp', 'swf', 'flv']
};
Shadowbox.init(options);
      
