function hideall()

{

  $("ul[id^='submenu_']").hide();

}



function time_hide()

{



}



$(function(){

$("#titleBar").hide(); 

	$(".calendar").datepicker(

  {

    dateFormat:'dd.mm.yy',

    dayNamesMin: ['Ne', 'Po', 'Ut', 'St', 'Čt', 'Pá', 'So', 'Ne'],

    firstDay: 1,

    monthNames: ['Leden','Únor','Březen','Duben','Květen','Červen','Červenec','Srpen','Září','Říjen','Listopad','Posinec']

  }

  );

});



$(document).ready(function(){

  $("ul[id^='submenu_']").hover(

    function(){return true;},

    function(){time_hide();}

  );

  

  $("li[id^='menuitem_']").hover(function(){

    var myid     = $(this).attr("id");

    hideall();

    var submenu = $("#submenu_"+myid.split("menuitem_")[1]);

    submenu.show()

           .css("position","absolute")

  });



  $("a.zoom").fancybox();$("a.zoom1").fancybox({

  'overlayOpacity':0.0,

  'overlayColor':'#FFFFFF'

  });

  

  $("a.zoom2").fancybox({

  'zoomSpeedIn':500,

  'zoomSpeedOut':500,

  'overlayShow':false

  });



	$(".iframe").fancybox({

		'width'			: 640,

		'height'			: 480,

    'autoScale'     	: false,

    'transitionIn'		: 'none',

		'transitionOut'		: 'none',

		'type'				: 'iframe',

		'overlayOpacity': '0.0',

		'overlayColor': '#000000',

		'centerOnScroll' : false

	});	

	

	$('a.email').each(function(){
		e = this.title.replace('[A]','@');

	  var mail_array = e.split('[+]');

    var mail = mail_array.join('') 

		this.href = 'mailto:' + mail;

		this.title = 'email';
	
		$(this).text(mail);

	});	



  $(".refHover").mousemove(function(e){
//    var myid     = $(this);

    /*mystatus = $(this).css("position");
    $(this).css("position","absolute");
    x = $(this).css("top");
    $(this).css("position", mystatus);

    $("#titleBar").show()
                  .css("top", x)
                  .css("left", );
*/

    $("#titleBar").css("top",  e.pageY)
                  .css("left", e.pageX+20)
                  .html( $(this).attr("rel") )
                  .show()
                  ;
 
  });
  $(".refHover").mouseleave(function(){
    $("#titleBar").hide();    
  });



});


function show(id)
{
    $("#showbutton_"+id).hide();
    $("#refzone_"+id).show();
}

function hide(id)
{
    $("#showbutton_"+id).show();
    $("#refzone_"+id).hide();
}


 
  function googleTranslateElementInit() 
  {
      new google.translate.TranslateElement({
      pageLanguage: 'cs',
//      includedLanguages: 'de'
      }, 'google_translate_element_');
  }

