$(document).ready(function() {
	// load the quote "carousel" on the home page
	$('#quote_carousel').jCarouselLite({
		btnNext: '#quote_handle_right',
		btnPrev: '#quote_handle_left',
		visible: 1,
		speed: 300,
		easing: 'easeinout'
	});
	
	
	/*
	 * image viwer
	 */
	$('.lightbox').lightbox();
	/*
	$('.facility_photos a').fancybox({
		'hideOnContentClick': true, 
		'overlayShow':	true
	});
	*/
	
	/*
	 * accordion faq
	 */
	$('.faqbox .element:first').show('fast');
	$('.faqbox .toggler:first').addClass('active');
	
	$('.faqbox .toggler').click(function() {
		// close everything down
		$('.faqbox .element').hide('fast');
		$('.faqbox .toggler').removeClass('active');
		
		// display this
		$(this).next().show('fast');
		$(this).addClass('active');
	});
	
	// department filter
	$('select#filter_department').change(function() {
		var department = $('select#filter_department option:selected').val();
		window.location='/intranet/directory?department=' + department;
	});
});