$(document).ready(function(){
	
	$("#home-slider").easySlider({
		auto: true,
		pause: 5000,
		numeric: true
	});
	
	$("#li1").click(function () {
		$("#ulLi1").css("display","block");
		$("#li1").addClass("actLi1");
		
		
		$("#ulLi2").css("display","none");
		$("#ulLi3").css("display","none");
		
		if ($("#li2").hasClass("actLi2")) {
			$("#li2").removeClass("actLi2");
		}
		if ($("#li3").hasClass("actLi3")) {
			$("#li3").removeClass("actLi3");
		}
		
	});
	$("#li2").click(function () {
		$("#ulLi2").css("display","block");
		$("#li2").addClass("actLi2");
		
		
		$("#ulLi1").css("display","none");
		$("#ulLi3").css("display","none");
		
		if ($("#li1").hasClass("actLi1")) {
			$("#li1").removeClass("actLi1");
		}
		if ($("#li3").hasClass("actLi3")) {
			$("#li3").removeClass("actLi3");
		}
		
	});
	$("#li3").click(function () {
		$("#ulLi3").css("display","block");
		$("#li3").addClass("actLi3");
		
		
		$("#ulLi1").css("display","none");
		$("#ulLi2").css("display","none");
		
		if ($("#li1").hasClass("actLi1")) {
			$("#li1").removeClass("actLi1");
		}
		if ($("#li2").hasClass("actLi2")) {
			$("#li2").removeClass("actLi2");
		}
		
	});
	
	/* SUBMENU */
	$('#menu li').mouseenter(function() {
		$(this).find('a:first').addClass('act');
		$(this).find('.submenu').show();
	}).mouseleave(function() {
		$(this).find('a:first').removeClass('act');
		$(this).find('.submenu').hide();
	});

	
	$("a[rel^='photo']").prettyPhoto({
		animationSpeed: 'fast', /* fast/slow/normal */
		padding: 0, /* padding for each side of the picture */
		opacity: 0.8, /* Value betwee 0 and 1 */
		showTitle: true, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: ' ze ' /* The separator for the gallery counter 1 "of" 2 */
	});
	
	
	/*******************/
	/* PRETTYPHOTO & TRANSITIONAL
	/*
	/* CELEJ TENHLE SRANEC JE PRO IE V TRANSITIONAL, KDE SE LIGHTBOX ZOBRAZUJE PATNĚ
	/* NESCROLUJE JAKO V OSTATNICH PROHLIZECICH A VZDY SE OBRAZEK ZOBRAZI NAHORE
	/*******************/
	
	/* ZJISTIME ZDA JE PROHLIZEC IE */
	var isMSIE = /*@cc_on!@*/false;
	if (isMSIE) {
		
		/* ZJISTIME ZDA KLIKNUL NA HREF S REL A MA SE SPOUSTET PRETTYPHOTO */
		$("a[rel^='photo']").click(function() {
			
			/* VYPISE OBSAH PRVNIHO RADKU KDE SE NACHAZI DOCTYPE, A POKUD JE TRANSITIONAL, TAK SE SCROLL PRESUNE NAHORU */
			if (document.all[0].text.indexOf("Transitional") > 0) {
			
				window.scrollTo(0, 0);
				
			}
		});	
	}
	
});



function showMapDetail(id) {

	$('.mapDetail').css('display', 'none');
	document.getElementById('mapDetail' + id).style.display = 'block';

}





