function changeMasthead(){
	var mh = $('.masthead').length;
//	console.log('cur = ' + current + ' mh = ' + mh)
	if ((mh-1) == current) {
		$('#masthead-wrapper div').eq(current).fadeOut(1000);
		$('#masthead-wrapper div').eq(0).fadeIn(1000);
		current = 0;
	} else {
		$('#masthead-wrapper div').eq(current).fadeOut(1000);
		$('#masthead-wrapper div').eq(current+1).fadeIn(2000);
		current++;
	}

}

$(function(){
	$('#masthead-wrapper div').css({
		'position' : 'absolute',
		'left' : 0,
		'width' : $(window).width() + 'px'
	})
	
	current = 0;
	setInterval("changeMasthead()", 5000);


	$('#search input[type=text]').focus(function(){ 
		if($(this).val() == $(this).attr('defaultValue'))
		{$(this).val('');}
	});
	
	$('#search input[type=text]').blur(function(){
		if($(this).val() == '')
		{$(this).val($(this).attr('defaultValue'));} 
	});
});

