function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 5,
	scroll: 1,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
	mainmenu();
	$("a#engage").click(function() {
		$("div#engage_video").animate({opacity: 1}, "slow");
		$("div#meeting_manager").animate({opacity: 0}, "slow");
		$("div#engage_video").css('z-index',1);
		$("div#meeting_manager").css('z-index',0);
	});
	$("a#mymm").click(function() {
		$("div#engage_video").animate({opacity: 0}, "slow");
		$("div#meeting_manager").animate({opacity: 1}, "slow");
		$("div#engage_video").css('z-index',0);
		$("div#meeting_manager").css('z-index',1);
	});

	$("img.carousel_img").css('display','block');

});

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);