$(document).ready(function(){
	$.fn.hoverClass = function(c) {
		return this.each(function(){
			$(this).hover(
				function() { $(this).addClass(c);  },
				function() { $(this).removeClass(c); }
			);
		});
	};
	if(document.all){$(".cluetip").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;
		});
	})
})
