﻿
jQuery(document).ready(function($)
{


//$("ul li ul").slideToggle("slow");
//$("ul.nomenklatura a").click(function(){ $("ul li ul").slideToggle("slow"); });

//$("ul.nomenklatura a").click(function(){ $(this).slideToggle("slow"); });


	$('#nav > li > ul').hide();
	
    $('#nav > li').click(function (event) {
		//if (this !== event.target && String(event.target).indexOf('http') == -1) { 
			//return false; 
		//}


        if ($('#nav ul').is(':animated')) {
            return false;
        }

        $heading = $(this);
        $expandedSiblings = $heading.siblings().find('ul:visible');

        if ($expandedSiblings.size() > 0) {
            $expandedSiblings.slideUp(300, function () {$heading.find('ul').slideDown(300);});
        } else {
            $heading.find('ul').slideToggle(300);
        }

    });
	
	
	$("a.expand").click(function(){ $('#nav > li > ul').slideToggle();});
	








$("a.eng").click(function(){ window.location.href = '/en';});
$("a.cze").click(function(){ window.location.href = '/cs';}); 

	




















$(function () {
  if ($.browser.msie && $.browser.version < 7) return;
  $('#navigation li')
    .removeClass('highlight')
    .find('a')
    .append('<span class="hover" />').each(function () {
      var $span = $('> span.hover', this).css('opacity', 0);
      $(this).hover(function () {
        $span.stop().fadeTo(250, 1);
      }, function () {

        $span.stop().fadeTo(250, 0);
      });
    });
	$('#tlacitko li')
    .removeClass('highlight')
    .find('a')
    .append('<span class="hover" />').each(function () {
      var $span = $('> span.hover', this).css('opacity', 0);
      $(this).hover(function () {
        $span.stop().fadeTo(250, 1);
      }, function () {

        $span.stop().fadeTo(250, 0);
      });
    });
});
	
$('a[rel*=lightbox]').lightBox();
	

});



/* nospam */
function nospamf(box, domain) {
 if(typeof(domain)=="undefined") domain="ppa.cz";
 var proto=String.fromCharCode(109,97,105,108,116,111,58)
 w=window.open(proto+box+String.fromCharCode(64)+domain);
 if (w!=null) w.close(); //FF
}
function nospam(box, domain, title, attr) {
 if(typeof(domain)=="undefined") domain="ppa.cz";
 if(typeof(attr)=="undefined") attr="";
 if(typeof(title)=="undefined") title=box+String.fromCharCode(64)+domain;
 document.write("<a href=\"javascript:nospamf('"+box+"', '"+domain+"')\""+(attr.length>0?" ":"")+attr+">"+title+"</a>");
}
function zavinac() {
 document.write(String.fromCharCode(64));
}
/* /nospam */


