

			var oldBox2 = 6; //set the deafault featured village
			var stopAnimation2 = "false";

			$(document).ready(function(){

				  $("#new7").animate( {opacity: 0.0}, 1, function() { $("#new7").hide("fast");} );
				  $("#new8").animate( {opacity: 0.0}, 1, function() { $("#new8").hide("fast");} );
				  $("#new9").animate( {opacity: 0.0}, 1, function() { $("#new9").hide("fast");} );
				  $("#new10").animate( {opacity: 0.0}, 1, function(){ $("#new10").hide("fast");} );

				document.getElementById("box"+oldBox2).style.backgroundColor = "#553e30";

				automate2();

			});
			// function for changing the featured village on the home page

				function fade2(newBox2, stopMotion2){

					// when nav is clicked the varibale stop motion is set to true. This perminantly stops all animations
					if (stopMotion2 == "true"){

						window.clearTimeout(animationTimer2);
						stopAnimation2 = "clicked";

					}

					//alert("oldBox = "+oldBox+" newBox ="+newBox);

					if ((newBox2) != oldBox2){

						var villageIn2 = ('#new'+newBox2); //set div id to a string for animation
						var villageOut2 = ('#new'+oldBox2);

						$(villageIn2).show("fast");
						// animate the old box out and the new box in
						$(villageOut2).animate( {opacity: 0}, 500, function() {
							$(villageIn2).animate( {opacity: 1.0}, 500, function() {$(villageOut2).hide("fast");});
						});
						
						var activeNav2 = ("box"+newBox2); //set nav div id to a string for animation
						var oldNav2 = ("box"+oldBox2);
					
						//set the nav to an active color then resets to old one to default color

						document.getElementById(activeNav2).style.backgroundColor = "#553e30";

						document.getElementById(oldNav2).style.backgroundColor = "#e2d6c3";
						oldBox2 = newBox2; //set newBox as the oldBox so we now what to fade out next time

						automate2();

					}

   				}; //close fade

				// function to set automation timer



				var animationTimer2 = '';
				function automate2(change){

						if (stopAnimation2 == "false"){
							animationTimer2 = window.setTimeout(function() { setBox2(); }, 7000); // set time
						}
				};


				//sets which box to load and to fade

				function setBox2(){
					newBox2 = (oldBox2+1); // adds 1 to the current box

					if (newBox2 >= 11){									   
						newBox2 = 6;
					} 

					fade2(newBox2); // starts the function fade as if it was clicked with a newBox to load
				};

				// pauses animation on mouse over
				function mouseOver2(){ 
					if (stopAnimation2 != "clicked"){
						stopAnimation2 = "true";
						window.clearTimeout(animationTimer2);
					}
				};

				// unpauses animation on mouse out

				function mouseOut2(){ 

					if (stopAnimation2 != "clicked"){
						stopAnimation2 = "false";
						automate2();
					}

				};


