
$(document).ready(function(){

	// navigation
	$('.nav li').mouseenter(function(){
		$(this).children('.subnav').slideDown(300);
		$(this).siblings().children('.subnav').hide();
	});

	$('.nav li').mouseleave(function(){
		$(this).children('.subnav').stop(false, true);
		$(this).children('.subnav').hide();
	});

	// small slider
	$('.student-view ul').cycle({
		prev: '.student-view .prev',
		next: '.student-view .next'
	});
	$('.student-view .pause').click(function(){
		$('.student-view ul').cycle('pause');
	});
	$('.student-view .play').click(function(){
		$('.student-view ul').cycle('resume');
	});
	$('.student-view .stop').click(function(){
		$('.student-view ul').cycle(0);
		$('.student-view ul').cycle('pause');
		return false;
	});
	// lightbox
	$('.student-view .small-slider-pic').fancybox({
		overlayColor: '#000',
		overlayOpacity: 0.5
	});
	
	
	// home page slider
	$('.large-slider ul').cycle({
		fx: 'scrollHorz',
		prev: '.large-slider .prev',
		next: '.large-slider .next',
		pause: 1,
		timeout: 6000,
		after: function(){
			$('.caption').html($(this).children('img').attr('alt'));
		}
	});


	// staff pages
	$('.staff.new .date').datepicker();
	$('.staff.edit .date').datepicker();
	

});

