jQuery(document).ready(function(){
		jQuery("#quotes").quotator({
    		speed : 5000,
    		json : "/js/quotator_quotes.js"
		});


	 	var afterExpand = jQuery("#sliderContent");
			//afterExpand.fadeIn("slow");
			//jQuery('#afterCool-box').children('.top').addClass('selected');
			
		
  			jQuery("#afterCool-box").children(".top").hover(function(){ 
    		if(afterExpand .is(":hidden"))
				workExpand.fadeOut("slow");
				traneExpand.fadeOut("slow");
      			afterExpand.fadeIn("slow");
			
				//animate( params, duration, easing, callback )
				
				jQuery('#trainFrame-box').children('.mid').removeClass('selected');
				jQuery('#workWellness').children('.mid').removeClass('selected');
				
				jQuery(this).addClass('selected');
				
				jQuery('#workWellness').children('.mid').children('.arrow').animate({ right: 75 }, 1000 );
				jQuery('#trainFrame-box').children('.mid').children('.arrow').animate({ right: 145 }, 1000 );
				jQuery('#afterCool-box').children('.top').children('.arrow').animate({ right: 35 }, 1000 );

			});
			
			
			var traneExpand = jQuery("#sliderTrane");
  			jQuery("#trainFrame-box").children(".mid").hover(function(){ 
    		if(traneExpand  .is(":hidden"))
				afterExpand.fadeOut("slow");
				workExpand.fadeOut("slow");
      			traneExpand.fadeIn("slow");
				
				jQuery('#trainFrame-box').children('.mid').children('.arrow').animate({ right: 35 }, 1000 );
				jQuery('#workWellness').children('.mid').children('.arrow').animate({ right: 75 }, 1000 );
				jQuery('#afterCool-box').children('.top').children('.arrow').animate({ right: 119 }, 1000 );
				//animate( params, duration, easing, callback )
				
				jQuery('#afterCool-box').children('.top').removeClass('selected');
				jQuery('#workWellness').children('.mid').removeClass('selected');
				
				jQuery(this).addClass('selected');

			});
			
			var workExpand = jQuery("#sliderWork");
  			jQuery("#workWellness").children(".mid").hover(function(){ 
    		if(workExpand  .is(":hidden"))
				afterExpand.fadeOut("slow");
				traneExpand.fadeOut("slow");
      			workExpand.fadeIn("slow");
			
				//animate( params, duration, easing, callback )
				
				jQuery('#afterCool-box').children('.top').removeClass('selected');
				jQuery('#trainFrame-box').children('.mid').removeClass('selected');
				
				jQuery(this).addClass('selected');
				
				jQuery('#trainFrame-box').children('.mid').children('.arrow').animate({ right: 145 }, 1000 );
				jQuery('#workWellness').children('.mid').children('.arrow').animate({ right: 35 }, 1000 );
				jQuery('#afterCool-box').children('.top').children('.arrow').animate({ right: 119 }, 1000 );
			});
			
			jQuery("#go-submit").click(function(){ 
						jQuery("#newsletter-form").hide();	
						jQuery("#newsletter-form-loading").fadeIn();
						jQuery("#newsletter-form-loading").animate({ opacity: 1.0 }, 1000 ).fadeOut("fast");
						jQuery("#newsletter-form-result").animate({ opacity: 1.0 }, 1700 ).fadeIn();

						

			
			});
				
		
		});	