// Homepage "In the Headlines" tabs
(function($) {
	$.fn.headlines = function() {
		$('#headlines div').hide();
		return this.each(function() {
			// this.togglee = $($(this).attr('href')).hide();
			this.togglee = $($(this).attr('href'));
			$(this).click(onClick);
		});

		function onClick() {
			$('#headlines>div').hide();

			$('#tabs li').removeClass('active');
			$(this).parent().addClass('active');
			this.togglee.show();
			return false;
		}
	}

  $(document).ready(function() {
		$('#tabs a').headlines();
		$('#tabs li:first').addClass('active');
		$('#inaction').show();
  });
})(jQuery);

$(document).ready(function(){
    cycleFacSpotlight();
});

function cycleFacSpotlight() {
	var fac = $('.featured_faculty');
	if(fac.length > 0) {
		fac.each(function() {$(this).hide();});
		num  = Math.floor(Math.random()*(fac.length));
		fac[num].style.display = 'block';
	}
}