function activateHeroCycle() {
	/* Variables */
	var $heroBanners = $("#heroBanners li");
	var current = 0;
	var next = 1;
	var speed = 5000;
	var transitionSpeed = 3000;
	var $heroBannerThumbs = $("#heroBannerThumbs li");
	var thumbTransparency = 0.3;
	var $heroLink = $("#heroMoreInfo");
		
	function cycleHeros() {
		$($heroBannerThumbs[current]).find("a").removeClass("active");
		$($heroBannerThumbs[next]).find("a").addClass("active");
		$($heroBanners[current]).fadeOut(transitionSpeed);
		$($heroBanners[next]).fadeIn(transitionSpeed, function() {
			current = current + 1;
			if ( current > $heroBanners.length - 1 ) {
				current = 0;
			} else {    
			}
			next = next + 1;
			if ( next > $heroBanners.length - 1 ) {
				next = 0;
			}
			var link = $($heroBanners[current]).find("a").attr("href");
			$heroLink.attr("href", link);
		});
	}
		
	var heroInterval = setInterval(cycleHeros, speed);

	$heroBannerThumbs.mouseover(function() {
		clearInterval(heroInterval);
		var thisElem = $(this);
		$("#heroBannerThumbs li:not(this)").find("a").removeClass("active");
		$("#heroBannerThumbs li:not(this)").find("a").addClass("none");
		thisElem.find("a").addClass("active");
		var slideIndex = parseInt(thisElem.find("a").text()) - 1;
		if ( slideIndex != current ) {
			$($heroBanners[current]).stop().animate({ opacity: 0 }, function() {
				$(this).hide();
			});
			$($heroBanners[slideIndex]).stop().css({ display: "block", opacity: 0 }).animate({ opacity: 1 });
			var link = $($heroBanners[slideIndex]).find("a").attr("href");
			$heroLink.attr("href", link);
		}
		current = slideIndex;
	});

	/* End Hero Banner SlideShow */
}

var bodyID = $("body").attr("id");
switch(bodyID){
    case "home":

		$(function() {
			
			/* Hero Banner SlideShow */
			if ( $("#heroBanners").length > 0 ) {
				activateHeroCycle();
			}  
				
		});  		
		
        break;
   
    default:
        break;
}