jQuery(document).ready(function() {

	// Search box text.
	jQuery("input#keywords").focus(function() {
		if (this.value == "Enter Search Term") {
			this.value = "";
		}
	});
	jQuery("input#keywords").blur(function() {
		if (this.value == '') {
			this.value = "Enter Search Term";
		}
	});

	// Initiate feature gallery.
	jQuery('#feature-gallery').before('<div id="gallery-nav">').cycle({
		speed: 1200, 
		timeout: 9000,
		pager: '#gallery-nav',
		pause: 1
	});

	// Southeast map image rollovers.
	var img = jQuery("#southeast");
	var orig_src = jQuery("#southeast").attr("src");
	jQuery(".state-highlight").hide();
	jQuery("#se-map").children("area.state").each(function() {
		var rollover_src = "/images/assets/southeast_" + jQuery(this).attr("id") + ".png";
		// IE chokes here when using hover. mouseover and mouseout work fine.
		jQuery(this).mouseover(
			function() {
				img.attr("src", rollover_src);
			}
		);
		jQuery(this).mouseout(
			function() {
				img.attr("src", orig_src);
			}
		);
	});

});

