$(function() {

	// wrap the #nav <a> tags in a span and add a last <li> to nested <ul>'s for css rounded corners
	$('#nav a').wrap('<span />');
	$('#nav>li>ul').append('<li class="botrnd"><span><p /></span></li>');

	
	// add an animated reveal to the nested <ul>'s in the #nav
	$('#nav>li').hover(function() {
		$(this).addClass('hovered');
		$(this).children('ul').stop(true, true).slideDown(200);
	}, function() {
		$(this).removeClass('hovered');
		$(this).children('ul').stop(true, true).hide();
	});
	

	// page-not-found stuff
	$('#nav-hilite').css('color', '#114C8C');
	$('#nav-hilite').hover(function() {
		$(this).css('cursor', 'help');
		$('#nav>li').addClass('hovered');
	}, function() {
		$('#nav>li').removeClass('hovered');
	});

	$('#search-hilite').css('color', '#114C8C');
	$('#search-hilite').hover(function (e) {
		$(this).css('cursor', 'help');
		$('.wrapper').append('<div id="arrow" />').children('#arrow').hide().fadeIn(500).animate({top: '-=230', left: '+=375'}, 1000);
		$('.search input:first').focus();
	}, function() {
		$('#arrow').remove();
	});
	

	// round corners for certain classes
	$('.figure').corner('bottom');
	
	$('.marketcontact').corner();
	
	$('.marketcontact h3').corner('top cc:#fff');
	
	$('.newsPR hr').corner();
	
	
	//remove arbitrary padding that kentico sticks in
	$('.PagerNumberArea span:not(.SelectedPage)').css('padding', '0');

	
	//adding curly quotes to quotes
	$('.cite blockquote q').prepend('&ldquo;');
	$('.cite blockquote q').append('&ldquo;');
	$('#content blockquote.quote p').prepend('&ldquo;');
	$('#content blockquote.quote p').append('&ldquo;');
	
	
	
	//Add the current year to the footer copyright text
	$("#theyear").text( (new Date).getFullYear() );		

});



