$(function() {
	// Remove IDs from the campus menus to work around
	// a positioning bug.
	$('#campuses li').attr('id', '');

	// Set up the carousel.
	$('#campuses').jcarousel({
		animation: 'slow',
		buttonNextHTML: null,
		buttonPrevHTML: null,
		easing: 'easeOutBack',
		initCallback:
			function(carousel) {
				$('#campus_nav a').bind('click', function() {
					carousel.scroll($('#campus_nav a').index(this) + 1);
					
					$('#campus_nav a.current').removeClass('current');
					$(this).addClass('current');
					
					return false;
				});
			},
		scroll: 1,
		start: (start + 1)
	});
	
	// Highlight the active link in the campus navigation.
	$('#campus_nav a').eq(start).addClass('current');
	
	// If we're in IE 5.5 or 6, turn off the pretty sticky note
	// formatting, which requires alpha PNG support.
	if (($.browser.msie) && ($.browser.version < 7)) {
		$('#sticky_nearby').attr('id', 'nearby');
	}

	// Nav arrow mouseovers
	$('#nav_arrow_back').hover(
		function() {
			$('#nav_arrow_back img').attr('src', '../images/arrow_back_hover.gif');
		},
		function() {
			$('#nav_arrow_back img').attr('src', '../images/arrow_back.gif');
		}
	);
	
	$('#nav_arrow_forward').hover(
		function() {
			$('#nav_arrow_forward img').attr('src', '../images/arrow_forward_hover.gif');
		},
		function() {
			$('#nav_arrow_forward img').attr('src', '../images/arrow_forward.gif');
		}
	);
});