Cufon.replace('.headline, .billboardHeadline', { fontFamily: 'alfalfa' });
Cufon.replace('#billboardMessage h1, #billboardMessage p, #featuredQuote p, #content h1, #fullCol h1, #pageNotFound h1, #colA h1, h2, h3, h4, .view, .grid th, .more-link, #footer p, #footer li, .cta', { fontFamily: 'gotham', hover: true });
jQuery('.headline, .billboardHeadline, #billboardMessage h1, #billboardMessage p, h1, h2, h3, h4, .view, .grid th, .more-link, #footer p, #footer li, .cta').css('visibility','visible');

jQuery("a[rel='external']").attr("target","_blank");


// back to top scroll function. Any link with a hash () will scroll to that id on the page

$('a[href*=]').click(function() {
	if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
		&& location.hostname == this.hostname) {
		var $target = $(this.hash);
		$target = $target.length && $target
		|| $('[name=' + this.hash.slice(1) +']');
		if ($target.length) {
		var targetOffset = $target.offset().top;
		$('html,body')
		.animate({scrollTop: targetOffset}, 500);
		return false;
		}
	}
});

jQuery("form").validate({
  rules: {
    confirmEmail: {
      equalTo: "#email"
    }
  }
});

jQuery('img.imgBW').mouseover(function() {
	jQuery(this).fadeOut('slow');
	jQuery(this).next().fadeIn('slow'); // the next sibling should be .imgColor
});

jQuery('img.imgColor').mouseout(function() {
	jQuery(this).fadeOut('slow');
	jQuery(this).prev().fadeIn('slow'); // the previous sibling should be .imgBW
});


Cufon.now();