function login(){
	$("div.header input#username").val("Username");
	$("div.header input#password").val("Password");
	$("div.header form input").focus(function(){
		$(this).val("");
	});
	$("div.header form input#password").focus(function(){
		$(this).after("<input class='text' type='password' id='password' name='password' />");
		$(this).remove();
		$("div.header form input#password").focus();
	});
}

function subnav(){
	$("ul.nav li").hover(
		function () {
			$(this).addClass("active");
			$(this).children("ul.subnav").show();
		},
		function () {
			$(this).removeClass("active");
			$(this).children("ul.subnav").hide();
		}
	);
	$("ul.subnav li").hover(
		function () {
			$(this).children("ul.nav2").show();
		},
		function () {
			$(this).children("ul.nav2").hide();
		}
	);
}


function equalHeight() {
	var leftHeight = $("div.left").outerHeight(); //outerHeight because div.left has padding
	var rightHeight = $("div.right").height(); // just height because div.right doesn't have padding
	if ( leftHeight > rightHeight ){
		$("div.right").css({height:leftHeight + "px"});
	}
	if ( rightHeight > leftHeight ){
		$("div.left").css({height:rightHeight + "px"});
	}
	$("div.wrapper").prepend("<img class='shadow-wrapper' src='/images/shadow_wrapper.png' alt='' width='988' height='495;' />")
}


function newsLinks(){
	$("div.news ul li").hover(
		function () { $(this).addClass("active"); },
		function () { $(this).removeClass("active"); }
	);
	$("div.news ul li").click(function () {
		var url = $(this).find("a").attr('href');
		window.location = url;
	}); 
}

function calloutLinks(){
	$("div.callout").hover(
		function () { $(this).addClass("active"); },
		function () { $(this).removeClass("active"); }
	);
	$("div.callout").click(function () {
		var url = $(this).find("a").attr('href');
		window.location = url;
	}); 
}

function rotate(){
	$("div.flash img#background-01").show();
	$("div.flash img#background-01").animate({opacity:"1"},1000, function(){
		$("div.flash img#pioneers").fadeIn(1000, function(){
			$("div.flash img#pioneers").animate({opacity:"1"},2000, function(){
				$("div.flash img#background-01").fadeOut(2000);
				$("div.flash img#background-02").fadeIn(2000);
				$("div.flash img#leaders").fadeIn(2000, function(){
					$("div.flash img#leaders").animate({opacity:"1"}, 2000, function(){
						$("div.flash img#background-02").fadeOut(2000);
						$("div.flash img#background-03").fadeIn(2000);
						$("div.flash p").fadeIn(2000);
						$("div.flash a").fadeIn(2000);
					});
				});			
			});
		});
	});
}


