
$(document).ready(function() {
	// Close announcement
	if ($.cookie('announcement-state') == 0) {
		$('.announce').hide(0);
	}
	$('.announce .close a').click(function() {		
		$('.announce').animate(
			{
				height: '0px',
				paddingTop: 0,
				paddingBottom: 0,
				opacity: '0'
			},
			400,
			function() {
				$('.announce').css('display', 'none');
			}
		);
		
		// Set cookie to remember the announcement state for the session.
		$.cookie('announcement-state', 0, {path: '/'});
	});
	
	$('#s').focus(function() {
		if (this.value == 'Search') {
			this.value = ''
		}
	});
	$('#s').blur(function() {
		if (this.value == '') {
			this.value = 'Search'
		}
	});
});

