$(document).ready(
	function() {


		// Open links with rel="external" in new window - like ye ole' target="_blank"
		$('a[rel="external"]').click(function() {window.open( $(this).attr('href') ); return false;});


		// Zebra-stripe data tables
		$("table.data tbody").each(function() {
			$(this).removeClass("odd even");
			$("tr:odd", this).addClass("odd");
			$("tr:even", this).addClass("even");
		});


		// Initialize Lightbox
		$(".lightbox a").lightbox();

		$("#bottomlaunch").removeClass('nojs'); 

		$("#bottomlaunch li").hoverIntent(function(){
			$(this).children('p').show();
			$(this).children('a.more').slideDown('fast')
		}, function(){
			$(this).children('p').hide();
			$(this).children('a.more').hide();
		});
		$("#bottomlaunch li").click(function(){
			$(this).children('a.more').click();
		});

		//Valley Hover
		$("ul.footernav li.first a:not(.on)").hoverIntent(function(){
			$("#valleyhover").slideDown();
			$(this).addClass('on');
			return false;
		}, function(){
			return false;
		});
		$("ul.footernav li.first a").click(function(){
			if ($(this).hasClass('on')){
				$("#valleyhover").slideUp('fast');
				$("ul.footernav li.first a").removeClass('on');
			} else {
				$("#valleyhover").slideDown();
				$(this).addClass('on');
			}
			return false;
		});
		$("#valleyhover h4").click(function(){
			$("#valleyhover").slideUp('fast');
			$("ul.footernav li.first a").removeClass('on');
		});


	}
);

