$(document).ready(function(){
	var hoverIntentConfig = {    
	     sensitivity: 10, // number = sensitivity threshold (must be 1 or higher)    
	     interval: 1, // number = milliseconds for onMouseOver polling interval    
	     over: showIt, // function = onMouseOver callback (REQUIRED)    
	     timeout: 300, // number = milliseconds delay before onMouseOut    
	     out: hideIt // function = onMouseOut callback (REQUIRED)    
		};
	function showIt() {
		$(this).find("#subnav").show();
	}
	function hideIt() {
		$(this).find("#subnav").hide();
	}
	$("ul#nav li").hoverIntent(hoverIntentConfig);
	////////////
	$("#slide-content ul").jcarousel({
		scroll: 1,
		wrap: 'both',
		initCallback: mycarousel_initCallback,
		buttonNextHTML: null,
		buttonPrevHTML: null
    });
    ///////////////////////
   Cufon.replace('#museum-news h2', { fontFamily: 'helvetica' });
   Cufon.replace('#main-section h2', { fontFamily: 'helvetica' });
   Cufon.replace('#get-updates h3', { fontFamily: 'helvetica' });
   ////////////////////////////
   
   $('.blink').focus(function () {
		if ($(this).val() == $(this).attr('title')) {
			$(this).css('color', '#fcead0').val('');
		}
	})
	$('.blink').blur(function () {
		if ($(this).val() == '') {
			$(this).css('color', '#fcead0').val($(this).attr('title'));
		}
	})
});
function mycarousel_initCallback(carousel) {
	$('a.mycarousel-next').bind('click', function() {
		carousel.next();
		return false;
	});
	
	$('a.mycarousel-prev').bind('click', function() {
		carousel.prev();
		return false;
	});
	
	$("#slides a").click(function(){
    	var stitle = parseInt($(this).attr("title"));
    	carousel.scroll(stitle);
    	return false;
    });
	
};
