// this tells jquery to run the function below once the DOM is read
$(document).ready(function() {

	// choose text for the show/hide link
	var showText="...více";
	var hideText="skrýt";

	// create the toggle link
	$("#hide_this").before("<a href='#' class='toggle_link'>"+showText+"</a>");

	// hide the content
	$('#hide_this').hide();

	// capture clicks on the newly created link
	$('a.toggle_link').click(function() {		
		// change the link text
			if ($('a.toggle_link').text()==showText) {
				$('a.toggle_link').text(hideText);
			}
			else {
				$('a.toggle_link').text(showText);
			}
			
			// toggle the display
			$('#hide_this').toggle('slow');
		
			// return false so any link destination is not followed
			return false;
	});


	// create the toggle link
	$("#hide_this2").before("<a href='#' class='toggle_link2'>"+showText+"</a>");

	// hide the content
	$('#hide_this2').hide();

	// capture clicks on the newly created link
	$('a.toggle_link2').click(function() {		
		// change the link text
			if ($('a.toggle_link2').text()==showText) {
				$('a.toggle_link2').text(hideText);
			}
			else {
				$('a.toggle_link2').text(showText);
			}
			
			// toggle the display
			$('#hide_this2').toggle('slow');
		
			// return false so any link destination is not followed
			return false;
	});
	
		// create the toggle link
	$("#hide_this3").before("<a href='#' class='toggle_link3'>"+showText+"</a>");

	// hide the content
	$('#hide_this3').hide();

	// capture clicks on the newly created link
	$('a.toggle_link3').click(function() {		
		// change the link text
			if ($('a.toggle_link3').text()==showText) {
				$('a.toggle_link3').text(hideText);
			}
			else {
				$('a.toggle_link3').text(showText);
			}
			
			// toggle the display
			$('#hide_this3').toggle('slow');
		
			// return false so any link destination is not followed
			return false;
	});
	
	
		// create the toggle link
	$("#hide_this4").before("<a href='#' class='toggle_link4'>"+showText+"</a>");

	// hide the content
	$('#hide_this4').hide();

	// capture clicks on the newly created link
	$('a.toggle_link4').click(function() {		
		// change the link text
			if ($('a.toggle_link4').text()==showText) {
				$('a.toggle_link4').text(hideText);
			}
			else {
				$('a.toggle_link4').text(showText);
			}
			
			// toggle the display
			$('#hide_this4').toggle('slow');
		
			// return false so any link destination is not followed
			return false;
	});
	
		// create the toggle link
	$("#hide_this5").before("<a href='#' class='toggle_link5'>"+showText+"</a>");

	// hide the content
	$('#hide_this5').hide();

	// capture clicks on the newly created link
	$('a.toggle_link5').click(function() {		
		// change the link text
			if ($('a.toggle_link5').text()==showText) {
				$('a.toggle_link5').text(hideText);
			}
			else {
				$('a.toggle_link5').text(showText);
			}
			
			// toggle the display
			$('#hide_this5').toggle('slow');
		
			// return false so any link destination is not followed
			return false;
	});

});

