        
		var a_time;
		var b_time;
		var c_time;
		var d_time;
		
		var a_showed = false;
		var b_showed = false;
		var c_showed = false;
		var d_showed = false;
		
		function spusti_a(){
         $("#show_a").hide("slide", { direction: "down" }, 400, function () { a_showed = false });
        }
        function spusti_b(){
         $("#show_b").hide("slide", { direction: "down" }, 400, function () { b_showed = false });
        }
        function spusti_c(){
         $("#show_c").hide("slide", { direction: "down" }, 400, function () { c_showed = false });
        }
        function spusti_d(){
         $("#show_d").hide("slide", { direction: "down" }, 400, function () { d_showed = false });
        }

        function skry_vsetky(){
           $("#podmenu_a,#podmenu_b,#podmenu_c,#podmenu_d,#podmenu_e,#podmenu_f,#podmenu_g").slideUp();
           $("#h2_podmenu_a,#h2_podmenu_b,#h2_podmenu_c,#h2_podmenu_d,#h2_podmenu_e,#h2_podmenu_f,#h2_podmenu_g").hide();
           $("#h3_podmenu_a,#h3_podmenu_b,#h3_podmenu_c,#h3_podmenu_d,#h3_podmenu_e,#h3_podmenu_f,#h3_podmenu_g").show();
        }

      function jjj(){
         $("#aktualne_b").show("slide", { direction: "right" }, 1000);
      }
      function jjjj(){
         $("#aktualne_b").show("slide", { direction: "left" }, 1000);
      }
      function jjjjj(){
         $("#aktualne_a").show("slide", { direction: "right" }, 1000);
      }
      function jjjjjj(){
         $("#aktualne_a").show("slide", { direction: "left" }, 1000);
      }
      
      
    $(document).ready(function(){
      	  
	  $("#projekt_a,#show_a").mouseover(function () {
		clearTimeout(a_time);
       if(!a_showed) {
		  // alert('in');
		if ($("#show_a").is(":hidden")) {
			a_showed = true;
        	$("#show_a").show("slide", { direction: "down" }, 400, function () { a_showed = true; });       
		}
		else
			a_showed = true;
      }
      });
	  
	  $("#projekt_a,#show_a").mouseout(function () {
		 if(a_showed) {
			a_showed = false; 
			 //alert('out');
			a_time = window.setTimeout("spusti_a()", 50);        
		  }	  
      });
	  
	  $("#projekt_b,#show_b").mouseover(function () {
		clearTimeout(b_time);
       if(!b_showed) {
		  // alert('in');
		if ($("#show_b").is(":hidden")) {
			b_showed = true;
        	$("#show_b").show("slide", { direction: "down" }, 400, function () { b_showed = true; });       
		}
		else
			b_showed = true;
      }
      });
	  
	  $("#projekt_b,#show_b").mouseout(function () {
		 if(b_showed) {
			b_showed = false; 
			 //alert('out');
			b_time = window.setTimeout("spusti_b()", 50);        
		  }	  
      });
		  
      $("#projekt_c,#show_c").mouseover(function () {
		clearTimeout(c_time);
       if(!c_showed) {
		  // alert('in');
		if ($("#show_c").is(":hidden")) {
			c_showed = true;
        	$("#show_c").show("slide", { direction: "down" }, 400, function () { c_showed = true; });       
		}
		else
			c_showed = true;
      }
      });
	  
	  $("#projekt_c,#show_c").mouseout(function () {
		 if(c_showed) {
			c_showed = false; 
			 //alert('out');
			c_time = window.setTimeout("spusti_c()", 50);        
		  }	  
      });
	  
	  $("#projekt_d,#show_d").mouseover(function () {
		clearTimeout(d_time);
       if(!d_showed) {
		  // alert('in');
		if ($("#show_d").is(":hidden")) {
			d_showed = true;
        	$("#show_d").show("slide", { direction: "down" }, 400, function () { d_showed = true; });       
		}
		else
			d_showed = true;
      }
      });
	  
	  $("#projekt_d,#show_d").mouseout(function () {		
			
		 if(d_showed) {
			d_showed = false; 
			 //alert('out');
			d_time = window.setTimeout("spusti_d()", 50);        
		  }	  
      });
	  

    });
	
	var coumime_selected = 1;
	
	function show_coumime(id)
	{		
        if(id != coumime_selected )
			hide_coumime(coumime_selected);
			
        $("#h3_podmenu_"+id).hide();
        $("#h2_podmenu_"+id).show();
        $("#podmenu_"+id).show("slow");     
		
		coumime_selected = id;		
	}
	
	function hide_coumime(id)
	{		
        $("#podmenu_"+id).slideUp();
        $("#h2_podmenu_"+id).hide();
        $("#h3_podmenu_"+id).show();     
	}
	
	var newsel = 1;
	var speed = 500;
	
	function turnleft()
	{
		
		if(newsel == newssize - 2)
			return;
		
		if(newsel + 3 == newssize)
			skovajpravu();
		else
			zobrazpravu();
		
		//posuvanie jednotlivych kuskov
		
		
		$("#akt_"+newsel).animate({"left": "-=295px"}, speed);
		
		$("#akt_"+(newsel+1)).animate({"left": "-=295px"}, speed);
		
		$("#akt_"+(newsel+2)).animate({"left": "-=295px"}, speed);
		
		$("#akt_"+(newsel+3)).animate({"left": "-=295px"}, speed);
		
		// zmenime classu predposlednemu 
		
		document.getElementById("akt_"+(newsel+2)).className ='aktualne_item_notlast';
		
		newsel++;
		
		if(newsel > 1)
			zobrazlavu();
		
	}
	
	function turnright()
	{
		if(newsel == 1)
			return;
		
		if(newsel <= 2)
			skovajlavu();
		else
			zobrazlavu();
		
		//posuvanie jednotlivych kuskov
		
		
		$("#akt_"+newsel).animate({"left": "+=295px"}, speed);
		
		$("#akt_"+(newsel-1)).animate({"left": "+=295px"}, speed);
		
		$("#akt_"+(newsel+1)).animate({"left": "+=295px"}, speed);
		
		$("#akt_"+(newsel+2)).animate({"left": "+=295px"}, speed);
		
		// zmenime classu predposlednemu 
		
		document.getElementById("akt_"+(newsel+1)).className ='aktualne_item';
		
		newsel--;
		
		if(newsel + 2 < newssize)
			zobrazpravu();
		
	}
	
	function skovajlavu()
	{
		document.getElementById('arrow_left_a').style.visibility = 'hidden';
	}
	
	function skovajpravu()
	{
		document.getElementById('arrow_right_a').style.visibility = 'hidden';
	}
	
	function zobrazlavu()
	{
		document.getElementById('arrow_left_a').style.visibility = 'visible';
	}
	
	function zobrazpravu()
	{
		document.getElementById('arrow_right_a').style.visibility = 'visible';
	}
	
	var oknotop;

function clonashow()
{

	obsahclony = '';

	if(!document.getElementById('clonka'))

	{

		setTimeout('clonashow(obsahclony)',200);

		return;

	}

	

	scrollx = (document.all)?document.body.scrollLeft:window.pageXOffset;

  	scrolly = (document.all)?document.body.scrollTop:window.pageYOffset;

	

	clona = document.getElementById('clonka');

	clona.style.top = scrolly+"px";

	cont = 	document.getElementById('contentwindow');
	
	contsc = scrolly-160.5;
	
	cont.style.marginTop = contsc+'px';
	
	
	
	//posunuite odscrollovania



	//alert(doing);

	

	

	document.body.style.overflow = "hidden";

	

	document.getElementById('clonka').style.display = "block";

	document.getElementById('oknoobsah').innerHTML = '';

	$('#clonka').fadeTo(500,0.50, function () {

									

			$('#contentwindow').fadeIn(500);

			

			});	

}




function clonahide()

{

	document.getElementById('clonka').style.display = "none";

	$('#clonka').fadeOut(500, function () {

									

			$('#contentwindow').fadeOut(500, function () {

													   		document.body.style.overflow = "auto";

													   });

			

			});

	clona = document.getElementById('clonka');

	okno = document.getElementById('contentwindow');

	//okno.style.marginTop = oknotop+"px";

}	

var showed = Array();
var timessh = Array();

function refnazovshow(i)
{
	clearTimeout(timessh[i])
	
	if(showed[i])
		return;
	
	hideall(i);
	
	$("#show_"+i).slideDown(200,function() {
			showed[i] = true;						
									});
	
}

function refnazovhide(i)
{
	if(!showed[i])
		return;
	
	timessh[i] = setTimeout("refnazovreallyhide("+i+")",200);
	
}

function refnazovreallyhide(i)
{
	$("#show_"+i).slideUp(200,function() {
		showed[i] = false;								
	});
}

function hideall(expect)
{
	for(i=1;i<=9;i++)
	{
		
		if(document.getElementById('show_'+i) && expect!=i)
			refnazovreallyhide(i);
	}
}
