
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


jQuery(document).ready(function($){

	$('#news2').innerfade({
		animationtype: 'slide',
		speed: 750,
		timeout: 2000,
		type: 'random',
		containerheight: '1em'
	});

	$('#jumbotronShow').cycle({
		fx:     'scrollHorz',
		prev:   '#prev',
		next:   '#next',
		speed:   400,
		timeout: 5000,
		pager:  '#jumbotronPager',
		pagerEvent: 'click',
		pause:  '0',
		pauseOnPagerHover: '0' // true to pause when hovering over pager link
	});

	var btnPlay = "images/slideshow/jumbo-play.png";
	var btnPause = "images/slideshow/jumbo-pause.png";

	$('#control').toggle(
	function() {
		$('img', this).attr({src: btnPlay, alt: "Play"});
		$('#jumbotronShow').cycle('pause');
	},
	function() {
		$('img', this).attr({src: btnPause, alt: "Pause"});
		$('#jumbotronShow').cycle('resume', true);
	});
});
