$(document).ready(function() {

	$(window).everyTime(750, 'controlled', function() {
		$jumpers = $('.jumping');
		var r = Math.round(Math.random()*$jumpers.length);
		var jumper = $jumpers[r];
		$(jumper).effect("bounce", { times:3 }, 300 );
	});

	$('.jumping').bind('mouseover',function() {
		var caption = $(this).data('caption');
		$('#'+caption).fadeIn();
	});
	$('.jumping').bind('mouseout',function() {
		var caption = $(this).data('caption');
		$('#'+caption).fadeOut();
	});
	
	$('#leadership_nav li').click(function(){
		var section = $(this).html();
		$('.leadership_panel').each(function() {
			if($(this).attr('id').replace(/leadership_/,'') != section) {
				$(this).fadeOut();
			}
			else $(this).fadeIn();
		});
		$('#leadership_nav li').each(function() {
			$(this).removeClass('selected');
		});
		$(this).addClass('selected');
	});
	
} );

