$(document).ready(function(){	
	bind_hover ();
	bind_cyclehome ();
});

/**
 * hover efekt na menu
 **/
function bind_hover ()
{
	$(".menu li").hover(
		function() {
			$(this).addClass("sfhover");
		},
		function() {
			$(this).removeClass("sfhover");
		}
	);
}

/**
 * rotujici clanky na home
 **/
function bind_cyclehome ()
{
	if ($('.news dl dd div').length > 1)
	{
		$('.news dd').after('<ul id="buttons"></ul>').cycle({ 
			fx:     'fade', 
			speed:  1000,
			pause: 1,  
			timeout: 8000, 
			startingSlide: 0,
			pager:  '#buttons', 
		 
			// callback fn that creates a thumbnail to use as pager anchor 
			pagerAnchorBuilder: function(idx, slide) { 
				return '<li><a href="#">'+(idx+1)+'</a></li>'; 
			}
		});
	}
}

