$(document).ready(function(){
		
	$("div.answer").hide();
	$("ul#caption").hide();
	$("a.question").click(function(){
		$(this).siblings("div.answer").slideToggle("slow");
		return false;
		});		
	
	var hash_id = document.location.hash;
	if (hash_id.length > 0) {		
		var highlight_div = hash_id.substr(1);	
		$("#"+highlight_div).hide();	
		}

	$("ul#caption").fadeIn("slow");
	if (hash_id.length > 0) {
		// alert (highlight_div);		
        if ($("#"+highlight_div).is(":hidden")) {
        	// alert (3);
        	} else {
        	// alert (5);
        	}

		$("#"+highlight_div).slideDown("slow");	
		}

	$("input.more").click(function(){
		if ( $(this).hasClass("active") ) {
			$("input.more").removeClass("active");
			$("div.details").hide("slow");
			} else {
			$("input.more").addClass("active");
			$("div.details").show("slow");
			}
		});		
		
		
	$("input.map").click(function() {
		var src = $(this).attr("id");
		if ( $(this).hasClass("active") ) {
			$("img#map").attr("src","/img/contact_map_czech_republic.jpg");
			$(this).removeClass("active");
			} else {
			$("input.map").removeClass("active");
			$(this).addClass("active");
			$("img#map").attr("src","/img/contact_map_" + src + ".jpg");
			}
		});
		
		
	});
