﻿		var scrollSpeed = 30; 		// Speed in milliseconds
		var step = 1; 				// How many pixels to move per step
		var current = Math.random()*10000;// The current pixel row
		var imageWidth = 8268;		// Background image height
		var slideshowWidth = 800;		// How tall the header is.
			
		//The pixel row where to start a new loop
		var restartPosition = -(imageWidth - slideshowWidth );
			
		function rozsvit(nadpis,obsah)
		{			
			document.getElementById(nadpis).style.color='#fff';
			document.getElementById(obsah).style.color='#fff';
		}
		
		function zhasni(nadpis,obsah)
		{
			document.getElementById(nadpis).style.color='#6c6c6c';
			document.getElementById(obsah).style.color='#868686';
		}

		function scrollBg()
		{
				
			//Go to next pixel row.
			current -= step;
				
			//If at the end of the image, then go to the top.
			if (current == restartPosition){
				current = 0;
			}
				
			//Set the CSS of the header.
			$('.slideshow').css("background-position",current+"px");
		}
			
		//Calls the scrolling function repeatedly
		var init = setInterval("scrollBg()", scrollSpeed);
		
		$(document).ready(function() {
	
		/* This is basic - uses default settings */
		
		$("a[rel=fancybox]").fancybox({
			'transitionIn'	:	'fade',
			'transitionOut'	:	'fade',
			'speedIn'		:	100,
			'speedOut'		:	100,
			'type'          : 	'image',
			'padding'		: 	0,
			'overlayOpacity': 	0.7,
			'overlayColor'	:	'#000000',
			'overlayShow'	:	true,
			'changeFade'	:	'quick',
			'titleShow'		:	false
		});
		
		$('.menu_item').hover(function() {
			$(this).addClass("menu_item_hover");
		});
		
		$('.menu_item').mouseleave(function() {
			$(this).removeClass("menu_item_hover");
		});
  	});
