if ($) {
	$(document).ready(function() {
		// Makes sure that hover resets 
		$('body').mouseover(function() {
			allCold();
		});
		// Change footer text color 
		$('div#foot').mouseover(function(event) {
			allCold();
			$(this).addClass('hot');
			$(this).removeClass('cold');
			if (jQuery.browser.msie) {
				event.cancelBubble = true;
			} else {
				event.stopPropagation();
			}
		});
		$('div#foot').mouseout(function() {
			$(this).addClass('cold');
			$(this).removeClass('hot');
		});
		// Change sidebar widget top border color 
		$('div#sbWidgets').mouseover(function(event) {
			allCold();
			$(this).addClass('hot');
			$(this).removeClass('cold');
			if (jQuery.browser.msie) {
				event.cancelBubble = true;
			} else {
				event.stopPropagation();
			}
		});
		$('div#sbWidgets').mouseout(function() {
			$(this).addClass('cold');
			$(this).removeClass('hot');
		});
		// Change sidebar testimonials top border color 
		$('div#sbTestimonial').mouseover(function(event) {
			allCold();
			$(this).addClass('hot');
			$(this).removeClass('cold');
			if (jQuery.browser.msie) {
				event.cancelBubble = true;
			} else {
				event.stopPropagation();
			}
		});
		$('div#sbTestimonial').mouseout(function() {
			$(this).addClass('cold');
			$(this).removeClass('hot');
		});
		// Change sidebar tax tips top border color 
		$('div#sbTips').mouseover(function(event) {
			allCold();
			$(this).addClass('hot');
			$(this).removeClass('cold');
			if (jQuery.browser.msie) {
				event.cancelBubble = true;
			} else {
				event.stopPropagation();
			}
		});
		$('div#sbTips').mouseout(function() {
			$(this).addClass('cold');
			$(this).removeClass('hot');
		});
		// Change sidebar tax tips ITEM background color 
		$('div.item').mouseover(function(event) {
			allCold();
			$(this).addClass('hot');
			$(this).removeClass('cold');
			// Removed cancelBubble b/c .item is nested in sbTips
			// otherwise mouseover event is cancelled on parent
		});
		$('div.item').mouseout(function() {
			$(this).addClass('cold');
			$(this).removeClass('hot');
		});
		// Change content sections top border color 
		$('div#inlineContent').mouseover(function(event) {
			allCold();
			$(this).addClass('hot');
			$(this).removeClass('cold');
			if (jQuery.browser.msie) {
				event.cancelBubble = true;
			} else {
				event.stopPropagation();
			}
		});
		$('div#inlineContent').mouseout(function() {
			$(this).addClass('cold');
			$(this).removeClass('hot');
		});
	});
	// Change homepage top border color 
		$('div#hpHelp').mouseover(function(event) {
			allCold();
			$(this).addClass('hot');
			$(this).removeClass('cold');
			if (jQuery.browser.msie) {
				event.cancelBubble = true;
			} else {
				event.stopPropagation();
			}
		});
		$('div#hpHelp').mouseout(function() {
			$(this).addClass('cold');
			$(this).removeClass('hot');
		});
		$('div#hpAbout').mouseover(function(event) {
			allCold();
			$(this).addClass('hot');
			$(this).removeClass('cold');
			if (jQuery.browser.msie) {
				event.cancelBubble = true;
			} else {
				event.stopPropagation();
			}
		});
		$('div#hpAbout').mouseout(function() {
			$(this).addClass('cold');
			$(this).removeClass('hot');
		});
		$('div#hpContact').mouseover(function(event) {
			allCold();
			$(this).addClass('hot');
			$(this).removeClass('cold');
			if (jQuery.browser.msie) {
				event.cancelBubble = true;
			} else {
				event.stopPropagation();
			}
		});
		$('div#hpContact').mouseout(function() {
			$(this).addClass('cold');
			$(this).removeClass('hot');
		});
	// Interior page navigation fade in effect 
	$('.homeInFade').append('<span class="hover"></span>').each(function () {
	  var $span = $('> span.hover', this).css('opacity', 0);
	  $(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(900, 0);
	  });
	});
	$('.aboutInFade').append('<span class="hover"></span>').each(function () {
	  var $span = $('> span.hover', this).css('opacity', 0);
	  $(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(900, 0);
	  });
	});
	$('.servicesInFade').append('<span class="hover"></span>').each(function () {
	  var $span = $('> span.hover', this).css('opacity', 0);
	  $(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(900, 0);
	  });
	});
	$('.resourceInFade').append('<span class="hover"></span>').each(function () {
	  var $span = $('> span.hover', this).css('opacity', 0);
	  $(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(900, 0);
	  });
	});
	$('.contactInFade').append('<span class="hover"></span>').each(function () {
	  var $span = $('> span.hover', this).css('opacity', 0);
	  $(this).hover(function () {
	    $span.stop().fadeTo(250, 1);
	  }, function () {
	    $span.stop().fadeTo(900, 0);
	  });
	});
}


// Makes sure that no mouseover event gets 'stuck' 
function allCold()
{
	$('div#foot,div#sbWidgets,div#sbTestimonial,div#inlineContent').addClass('cold');
	$('div#foot,div#sbWidgets,div#sbTestimonial,div#inlineContent').removeClass('hot');
}


// Resets form fields
function clearText(field){
    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;
}
