// JavaScript Document
jQuery(document).ready(function($){
	
	//alert('hello... jQuery is running');

$(function() {
    setInterval( "homeAnimation()", 6500 ); 
});	

jQuery("a.dropDown").hover(
      function () {
	  jQuery(".subNav").hide();
	  var navTarget = "#" + $(this).attr("href");
	  jQuery(navTarget).fadeIn(100);
      },
	  function () {
     //$(this).next("div").fadeOut("slow");
	 //var navTarget = "#" + $(this).attr("href");
	 //alert(navTarget);
	 //jQuery(navTarget).animate({opacity: 1.0}, 5000).fadeOut();
	 //jQuery(navTarget).fadeIn(100).delay(5000).fadeOut(200);
      }
    );

jQuery("#content").hover(
      function () {
	  jQuery(".subNav").hide();
	  //var navTarget = "#" + $(this).attr("href");
	  //jQuery(navTarget).fadeIn(100);
      },
	  function () {
      }
    );

//jQuery("a.dropDown").hover(makeTall,makeShort); 


jQuery("a.dropDown").click(function(){
	//alert('clicked');
	return false;
});


						   
}); //jQuery(document).ready(function($){




//functions:

var homeImageCounter = 1;
var sloganCounter = 2;

function homeAnimation() {
	//alert('functioned');
	homeImageCounter += 1;
	sloganCounter += 1;
	if(homeImageCounter==6){homeImageCounter=1;}
	if(sloganCounter==15){sloganCounter=2;}
	homeImageID = "#homeImage" + homeImageCounter;
	sloganCounterID = "#slogan" + sloganCounter;
	jQuery("#homePageAnimationWrapper img").fadeOut(2000);
	jQuery(homeImageID).fadeIn(2000);
	if (sloganCounter % 2 == 0) {
	  jQuery(".slogan").fadeOut('slow');
	  //alert(sloganCounterID);
	  jQuery(sloganCounterID).slideDown('slow');
	}
}
