$(document).ready(function() {

	$('input.email_field').click(function() {
		$(this).val('');
	});

	
	/*$('li#slideshow1').delay(1500).fadeIn(3000);
	$('li#slideshow2').delay(3000).fadeIn(3000);
	$('li#slideshow3').delay(6000).fadeIn(3000);
	$('li#slideshow4').delay(9000).fadeIn(3000);
	$('li#slideshow5').delay(12000).fadeIn(3000);*/
	
	
	$("#home-nav li").prepend("<span></span>"); //Throws an empty span tag right before the a tag
	
		$("#home-nav li").each(function() { //For each list item...
			var linkText = $(this).find("a").html(); //Find the text inside of the <a> tag
			$(this).find("span").show().html(linkText); //Add the text in the <span> tag
		}); 
	
		$("#home-nav li").hover(function() {	//On hover...
			$(this).find("span").stop().animate({
				marginTop: "-43" //Find the <span> tag and move it up 40 pixels
			}, 250);
		} , function() { //On hover out...
			$(this).find("span").stop().animate({
				marginTop: "0"  //Move the <span> back to its original state (0px)
			}, 250);
		});
		
		
		$('li#field_2_5, li#field_2_6, li#field_2_9, li#field_2_8').wrap('<div class="wrap-form-left">');
		       
		
    // New menu functions for home page menu
    $("#home-nav li").hover(function(){
      if($(this).children('ul').length > 0) { 
        var top = $(this).index() * 44;
        $(this).addClass('hover')
        $(this).children('ul').css({top : top }).fadeIn();            
      }    
    },function(){
      $(this).removeClass('hover');
      $(this).children('ul').fadeOut();                
    });
    
    // Inner page sub menu functions.
    $("#nav li").hover(function(){
      $(this).addClass("hover");
      $('ul:first',this).css('visibility', 'visible');
    }, function(){
      $(this).removeClass("hover");
      $('ul:first',this).css('visibility', 'hidden');
    });
});






