$(function() {
	$('a.light ').lightBox();
	// Select all links with lightbox class
});

$(document).ready(function() {
	$('.slideshow').cycle({
		fx: 'fade'
		// choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});

	$('ul.items li').hover(function()
	{
		$(this).find('span.itemoverlay').fadeIn(500);
	},
	function()
	{
		$(this).find('span.itemoverlay').animate({
			opacity: 1.0
		},
		100).fadeOut(500);
	}

);

$('.staffoverlay').hide();

$(window).load(function() {

	$('div.hover-area').hoverIntent(
		function()
		{
			$(this).siblings(".staffoverlay").show().animate({
				opacity: 1.0
			},
			100).animate({
				left: "-170px"
			},
			{
				queue: false,
				duration: 100
			});
		},
		function()
		{
			$(this).siblings(".staffoverlay").animate({
				opacity: 0.0
			},
			100).animate({
				left: "-300px"
			},
			{
				queue: false,
				duration: 100
			});
		}

	);

});


$('ul.filter a').click(function() {
	$(this).css('outline', 'none');
	$('ul.filter .current').removeClass('current');
	$(this).addClass('current');

	var filterVal = $(this).text().toLowerCase().replace(' ', '_');

	if (filterVal == 'all') {
		$('ul#staff-members li.hidden').fadeIn('slow').removeClass('hidden');
	} else {

		$('ul#staff-members li').each(function() {
			if (!$(this).hasClass(filterVal)) {
				$(this).fadeOut('normal').addClass('hidden');
			} else {
				$(this).fadeIn('slow').removeClass('hidden');
			}
		});
	}

	return false;
});




});














sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i = 0; i < sfEls.length; i++) {
		sfEls[i].onmouseover = function() {
			this.className += " sfhover";
		}
		sfEls[i].onmouseout = function() {
			this.className = this.className.replace(new RegExp(" sfhoverb"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


