﻿/*::::::::::::::::::::::::::::::::::::::::::::
		Base JS
		Copyright © 2010 McMurry
::::::::::::::::::::::::::::::::::::::::::::*/

(function($) {
	$(function() {
		// jQuery

		$('#header input').val('Search the site...').focus(function() {
			$(this).filter(function() {
				return $(this).val() == '' || $(this).val() == 'Search the site...';
			}).val('').parent('.site-search').addClass('site-search-focus');
		}).blur(function() {
			$(this).filter(function() {
				return $(this).val() == '';
			}).val('Search the site...').parent('.site-search').removeClass('site-search-focus');
		}).keydown(function (event) {
			if (event.keyCode == '13') {
				event.preventDefault();
				if ($(this).val().length > 0) {
					window.location = '/SearchResults.aspx?searchterm=' + $(this).val();
				}
			}
		});
		
		$('#footer .ctas .newsletter-signup .btn-signup').click(function() {
			$('#footer .ctas .newsletter-signup div.registration').fadeIn('fast');
		});
		$('#footer .ctas .newsletter-signup div.registration .menubar a').click(function() {
			$('#footer .ctas .newsletter-signup div.registration').fadeOut('medium');
		});

	});
})(jQuery);

// Cufon
Cufon.replace('#footer .ctas .newsletter-signup .btn-signup', { fontFamily: 'HelveticaNeueCondensed', hover: true, textShadow: '1px 1px #ffffff' });
Cufon.replace('#footer .footer-list li h3 a', { fontFamily: 'HelveticaNeueCondensed', hover: true, textShadow: '1px 1px #ffffff' });
