// adds hover class for dropdown li's in IE.
$(function() {
	$("#nav>li").hover(
		function() { $(this).addClass('hover'); },
		function() { $(this).removeClass('hover'); }		    	
	);
});
// keeps hover state on main nav while hoving over subnav menu
$(function() {
	$('#nav li ul').hover(
		function(){ $(this).parent().find('a:first').addClass('hover'); },
		function(){ $(this).parent().find('a:first').removeClass('hover'); }
	);
});

$(document).ready(function() {
	// sets up carousel
	$(".photo_carousel").jCarouselLite({
	    btnNext: ".next",
	    btnPrev: ".prev",
	    visible: 4
	});

	// sets up slideshow
	$(".photo_slideshow").jCarouselLite({
		btnNext: ".next_slide",
		btnPrev: ".prev_slide",
		visible: 1
	});
	
	// sets up fancybox
	$(".zoom").fancybox({
		titlePosition   : 'over',
		transitionIn	: 'elastic',
		transitionOut	: 'none'
	});

	// sets up input hint overlay
	$("form").inputHintOverlay(4,5);
	
	$(".print").click(function(e){
		e.preventDefault();
		var newWin = window.open($(this).attr('href'), 'newWin', 'width=640,height=500,location=1,toolbar=1,resize=1,scrollbars=1');
		newWin.focus();
	});
});