$(document).ready(function(){
	Cufon.replace('h1')('#main h2 a', {hover: true})('#main h3 a', {hover: true})('.hp #title-bar h1')('#title-bar p')('#menu li a', {hover: true})('#submenu-box a', {hover: true})('#submenu2-box a', {hover: true})('#newsletter-box h2')/*('.navigation a', {hover: true})('.navigation strong')('.navigation .disabled')*/;
	$("#datum").datepicker(/*{
		showOn: "button",
		buttonImage: "/gfx/calendar.gif",
		buttonImageOnly: true
	}*/);
	$.fn.hoverClass = function(c){
		return this.each(function(){
			$(this).hover(
				function(){$(this).addClass(c);},
				function(){$(this).removeClass(c);}
			);
		});
	};
	$("a.fancybox").fancybox({
		/*'padding'		:	'0',*/
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	300,
		'speedOut'		:	300,
		'overlayShow'	:	true,
		'overlayOpacity':	0.9,
		'overlayColor'	:	'#000',
		'titleShow'		:	true,
		'titlePosition'	:	'over',
		'centerOnScroll':	true
	});
	//if(document.all){$(".img-box-outer").hoverClass("sfHover");}
	$(window).load(function() {
		$('#slider').nivoSlider({
			effect: 'boxRainGrow',
			pauseTime: 5000,
			animSpeed: 1000,
			boxCols: 8,
			boxRows: 4
		});
	});
});
// zmena obrazku u formulorovych tlacitek a obrazku s tridou "button"
$(function()
{
	$("input[type='image'].button, img.button").each(function() {
		var path = this.src;
		var hoverPath = path.substring(0, path.length - 5) + '1.gif';

		imgs = Array(1);
		i = imgs.length + 1;
		imgs[i] = new Image();
		imgs[i].src = hoverPath;

		$(this).hover(
      		function () {
        		this.src = hoverPath;
      		},
     		function () {
       			 this.src = path;
      		}
		)
		.focus(function() {
			this.src = hoverPath;
		})
		.blur(function () {
			this.src = path;
		});
	})
})
