$(document).ready(function(){
	Cufon.replace('h1')('#reasons-box h3');
	$("a.fancybox").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	300, 
		'speedOut'		:	300, 
		'overlayShow'	:	true,
		'overlayOpacity':	0.5,
		'overlayColor'	:	'#000',		
		'titleShow'		:	true,
		'titlePosition'	:	'over'
	});
	$.fn.hoverClass = function(c){
		return this.each(function(){
			$(this).hover(
				function(){$(this).addClass(c);},
				function(){$(this).removeClass(c);}
			);
		});
	};
	if(document.all){$(".img-box-outer").hoverClass("sfHover");}
	$('.cluetip').cluetip({
		splitTitle: '|',
		showTitle: false
	});
});
// 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;
		});
	})
})
