$(document).ready(function () {
    $('.slideshow').cycle({
		fx: 'fade',
		timeout: 7000,
		speed: 2000
	});
	
	$('.slideshowonas').cycle({
		fx: 'fade',
		timeout: 4000,
		speed: 2000
	});
	
	Shadowbox.init({
		language:	"cs",
		players:	["img", "iframe"]
	});
	
	$(".kontakt_light").hover(
		function () {
			$(this).addClass("hover");
		},
		function () {
			$(this).removeClass("hover");
		}
	);
});

//	#####

function IsEmail(address) {
	re = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	return address.search(re) == 0;
}

function IsBlank(value) {
	re = /^( )*$/;
	return value.search(re) == 0;
}

function IsNick(value) {
	'/^[a-z]+[a-z0-9-_]*[a-z0-9]$/i'
	re = /^[a-z]+[a-z0-9-_]*[a-z0-9]$/i;
	return value.search(re) == 0;
}

function KontaktStart() {
	$('#kontakt .mapa li div').attr('style', 'display: none;');
	$('#kontakt li').click(function() {
		$('#kontakt .info-box').html($(this).children().html());
	});
}
