function shadows(){
	$("div.wrapper").prepend("<div class='shadow_left'></div><div class='shadow_right'></div>");
	$("div.wrapper").append("<div class='shadow_bottom'></div>");
	var pageHeight = $("div.wrapper").height();
	$("div.shadow_left").css({height:pageHeight});
	$("div.shadow_right").css({height:pageHeight});
}

function headerFields(){
	// manipulate search field
	var searchVal = "Search...";
	$("input#search").val(searchVal);
	$("input#search").focus(function(){
		if (searchVal == "Search..."){
			searchVal = "";
			$(this).val(searchVal);
		}
	});
	$("input#search").blur(function(){
		searchVal = $("input#search").val();
		if (searchVal == ""){
			searchVal = "Search...";
			$(this).val(searchVal);
		}
	});
	
	// manipulate username field
	var usernameVal = "Username...";
	$("input#username").val(usernameVal);
	$("input#username").focus(function(){
		if (usernameVal == "Username..."){
			usernameVal = "";
			$(this).val(usernameVal);
		}
	});
	$("input#username").blur(function(){
		usernameVal = $("input#username").val();
		if (usernameVal == ""){
			usernameVal = "Username...";
			$(this).val(usernameVal);
		}
	});

	// manipulate password field
	var passwordVal = "Password...";
	$("input#password").val(passwordVal);
	$("input#password").focus(function(){
		if (passwordVal == "Password..."){
			$(this).replaceWith("<input type='password' class='text' id='password' name='password'/>");
			$("input#password").focus();
		}
	});
}

function newsClick(){
	$("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 calloutsRotate(){
	$('div.callouts ul#one').innerfade({
		speed: 750,
		timeout: 12000,
		type: 'random',
		containerheight: '200px'
	});
	$('div.callouts ul#two').innerfade({
		speed: 750,
		timeout: 15000,
		type: 'random',
		containerheight: '200px'
	});
}

function biosRotate(){
	$('div.bios').innerfade({
		speed: 750,
		timeout: 10000,
		type: 'random',
		containerheight: '200px'
	});

	$('div.bios_second').innerfade({
		speed: 750,
		timeout: 4000,
		type: 'random',
		containerheight: '200px'
	});
}

function dropDown(){
	$("div.nav ul li").hover(
		function() {
			$(this).addClass("active");
			$(this).children("ul").show();
		}, 
		function() {
			$(this).removeClass("active");
			$(this).children("ul").hide();
		}
	);
}

function services(){
	$("div.servicesContent").show();
	$("div.servicesContent").children().hide();
	$("div.servicesContent h2").show();
	$("div.servicesContent h2").click(function(){
		$("div.servicesContent").show();
		$("div.servicesContent").children().hide();
		$("div.servicesContent").css({
			padding:"0px",
			border:"0"
		})
		$("div.servicesContent h2").show();
		$(this).siblings().show();
		$(this).parent().css({
			padding:"10px",
			borderWidth:"1px",
			borderStyle:"dashed",
			borderColor:"#009999"
		})
		$("div.shadow_left").remove();
		$("div.shadow_right").remove();
		$("div.shadow_bottom").remove();
		shadows();
	});

}



