$(function() {		
		// main nav		
		$('#nav-main-driving, #nav-main-driving ul').hover(
			function() {
				$('#nav-main').addClass('driving');
			},
			function() {
				$('#nav-main').removeClass('driving');
			}			
		);
		
		$('#nav-main-motorcycle, #nav-main-motorcycle ul').hover(
			function() {
				$('#nav-main').addClass('motorcycle');
			},
			function() {
				$('#nav-main').removeClass('motorcycle');
			}			
		);
		
		$('#nav-main-instructor, #nav-main-instructor ul').hover(
			function() {
				$('#nav-main').addClass('instructor');
			},
			function() {
				$('#nav-main').removeClass('instructor');
			}			
		);
		
		$('#nav-main-join, #nav-main-join ul').hover(
			function() {
				$('#nav-main').addClass('join');
			},
			function() {
				$('#nav-main').removeClass('join');
			}			
		);
		
		
		// content tabs
		var link = $('#content-nav-top li a');
		var tabs = $('.tab');
		
		link.click(
			function() {			
				link.parent().removeClass('current');
				$(this).parent().addClass('current');	
				
				// hide any tab thats showing before showing correct tab
				tabs.hide();				
				$('#' + $(this).attr( 'rel' )).show();
			}		
		);

		
		//code for the footer
		var footer = $('#wrapper-promos');
		
		footer.addClass('hide');
		
		footer.hover(
			function() {
				footer.stop().animate({bottom: "0px"}, 500);
			},
			function() {
				footer.stop().animate({bottom: "-220px"},500);
			}			
		);
});
