// Exosphere JavaScript Document

var targetServiceDiv;

$(function() {
		   
		   $('#menu li').click(function() {
										 
											 if ($(this).attr('class') != 'active') {
												 
												 $('#services ul li').removeClass('active');
												 $(this).addClass('active');
												 
												 targetServiceDiv = '#serv-' + this.id;
												 
												 $('.service').each(function() {
																			 
																				 if ($(this).css('display') == 'block') {
																								  
																								  $(this).fadeOut(300, changeServiceDiv);
																								  
																				 }
																			 
																			 });
												 
												 return false;
												 
											 }
											 
											
										 
										 });
		   
		   });

function changeServiceDiv() {
	
	$(targetServiceDiv).fadeIn(300);
	
}