/* Fly outs */

$(function() {
	
	$('.fly_out > li').hover (
		function() { $("ul", this).fadeIn('slow'); },
		function() { $("ul", this).fadeOut('slow'); }
	)
	
	$('#fleet_team > div:nth-child(even)').addClass('alt_row');
	$('#fleet_team p:nth-child(1)').addClass('team_pic');
	$('#fleet_team p:nth-child(2)').addClass('team_position');
	$('#fleet_team p:nth-child(3)').addClass('team_details');
	
	$('#dealer_map > div').hover(
		function () { $(this).addClass('over'); }, 
		function () { $(this).removeClass('over'); } 
    )
	
	$('#map_southern').click(function () { 
      $("#southern_region").fadeIn("slow"); 
      $("#northern_region, #central_region").hide();
	 	$(this).addClass('active');
      $("#northern_region, #central_region").removeClass('active');
    }); 
	 
	 $('#map_northern').click(function () { 
      $("#northern_region").fadeIn("slow"); 
		$("#southern_region, #central_region").hide(); 		
	 	$(this).addClass('active');		
		$("#southern_region, #central_region").removeClass('active'); 		
    }); 
	 
	 $('#map_central').click(function () { 
      $("#central_region").fadeIn("slow"); 
      $("#northern_region, #southern_region").hide(); 
	 	$(this).addClass('active');		
      $("#northern_region, #southern_region").addClass('active'); 		
    }); 
	 
	 $("#southern_region").show(); 
	 
	 $('.region_container td:last-child').addClass('last');
	
}); 
