/* zalozky */
function activeBox(id) {
	$(".boxes .active").removeClass("active");
	$("#"+id).addClass("active");
}

$(document).ready(function(){
	$(".boxesMenu .hMenuL a").click(function() {
		$(".boxesMenu .active").removeClass("active");
		$(this).addClass("active");
		return false;
	});
});

/* slide show */
function slideSwitch() {
	var $a = $('.slideshow img.active');
	if ( $a.length == 0 ) $a = $('.slideshow img:last');
	var $n =  $a.next().length ? $a.next() : $('.slideshow img:first');
	$a.addClass('last-active');
	$n.css({opacity: 0.0}).addClass('active').animate({opacity: 1.0}, 1000, function() {
		$a.removeClass('active last-active');
	});
};

$(document).ready(function(){
	setInterval("slideSwitch()",5000);
});
