//Header JavaScript Nav

window.onload = rolloverInit;

function rolloverInit() {
	for (var i=0; i<document.images.length; i++) {
		if (document.images[i].parentNode.tagName == "A") {
			setupRollover(document.images[i]);
		}
	}
}

function setupRollover(thisImage) {
	thisImage.outImage = new Image();
	thisImage.outImage.src = thisImage.src;
	thisImage.onmouseout = rollOut;
	
	thisImage.overImage = new Image();
	thisImage.overImage.src = "images/" + thisImage.id + "_on.png";
	thisImage.onmouseover = rollOver;
	
}

function rollOut() {
	this.src = this.outImage.src;	
}

function rollOver() {
	this.src = this.overImage.src;	
}

//EasySLider 1.7

$(document).ready(function(){	
$("#slider").easySlider({
	controlsBefore:	'<p id="controls">',
	controlsAfter:	'</p>',
	auto: true, 
	continuous: true,
	speed: 2000,
	pause: 8000
});
});

//Homepage jquery nav hovering

	$(function() {
		$('#one').hover(function(){
			$(this).stop().animate({"left" : "30px"}, 200);
		}, function() {
			$(this).stop().animate({"left" : "0px"}, 700);
		});
	});

	$(function() {
		$('#two').hover(function(){
			$(this).stop().animate({"left" : "30px"}, 200);
		}, function() {
			$(this).stop().animate({"left" : "0px"}, 700);
		});
	});
	
		$(function() {
		$('#three').hover(function(){
			$(this).stop().animate({"left" : "30px"}, 200);
		}, function() {
			$(this).stop().animate({"left" : "0px"}, 700);
		});
	});
		
		$(function() {
		$('#four').hover(function(){
			$(this).stop().animate({"left" : "30px"}, 200);
		}, function() {
			$(this).stop().animate({"left" : "0px"}, 700);
		});
	});		

		$(function() {
		$('#five').hover(function(){
			$(this).stop().animate({"left" : "30px"}, 200);
		}, function() {
			$(this).stop().animate({"left" : "0px"}, 700);
		});
	});	
