/* --- cteni kotev jako GET parametru --- */
function getAnchor(){
	hash = document.location.hash.replace(new RegExp('^(.*)#'), '');
	var get = {}
	if (hash) {
		hash = hash.split('&');
		for (i in hash) {
			hash[i] = hash[i].split('=');
			get[hash[i][0]] = (hash[i][1] ? hash[i][1] : null);
	}	}
	return get;
};

/* --- slideshow --- */ 
function slideShow() {
	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}, 1500, function() {
		$a.removeClass('active last-active');
	});
};

if($("body").attr("id") == "hlavni-stranka") {
		setInterval( "slideShow()", 5000 );
};
