$(function() {
	
	// Navigation rollout hovers
	$('#nav ul li p').parent().hover(
		function(){
			$(this).children('p').stop(true, true).fadeIn('normal');
			$(this).css({ 'background' : 'url(images/rollover.jpg)' });
			$(this).append('<div class="nav_cover"></div>');
		}, 
		function(){
			$(this).children('p').stop(true, true).fadeOut('normal');	
			$(this).css({ 'background' : 'none' });
			$('.nav_cover').remove();
		}
	);
	
	// Selects all input values so you can easily replace	
	$('input').click(function(){ $(this).select(); });
	
	// for the subpages
	$('li.about_home a').click(function(){ 
		$('#about_area').load('about_the_company.html #about_area'); 
		return false;
	});
		
	$('li.about_mission a').click(function(){ 
		$('#about_area').load('mission.html #about_area');
		return false;
	});

	$('li.about_team a').click(function(){ 
		$('#about_area').load('restor_team.html #about_area');
		return false;
	});

	$('li.about_affiliations a').click(function(){ 
		$('#about_area').load('affiliations_and_accreditations.html #about_area');
		return false;
	});
	
	$('li.about_careers a').click(function(){ 
		$('#about_area').load('careers.html #about_area');
		return false;
	});

	$('li.about_newsroom a').click(function(){ 
		$('#about_area').load('newsroom.html #about_area');
		return false;
	});
	
	$('li.about_contact a').click(function(){ 
		$('#about_area').load('contact.html #about_area');
		return false;
	});
	
	$('li.cap_industries a').click(function(){ 
		$('#cap_area').load('industries_served.html #cap_area');
		return false;
	});	

	$('li.cap_products a').click(function(){ 
		$('#cap_area').load('products_serviced.html #cap_area');
		return false;
	});			

	$('li.faq_service a').click(function(){ 
		$('#faq_area').load('faq_service.html #faq_area');
		return false;
	});	
	
	$('li.faq_payment a').click(function(){ 
		$('#faq_area').load('faq_payment.html #faq_area');
		return false;
	});	
	
	$('li.faq_shipping a').click(function(){ 
		$('#faq_area').load('faq_shipping.html #faq_area');
		return false;
	});	
	
	$('#addbox2').hide();
	$('#addbox3').hide();
	$('#addbox4').hide();
	$('#addbox5').hide();	
	
	$('#add1').click(function(){ $('#addbox2').slideDown(); return false; });
	$('#add2').click(function(){ $('#addbox3').slideDown();return false; });
	$('#add3').click(function(){ $('#addbox4').slideDown();return false; });
	$('#add4').click(function(){ $('#addbox5').slideDown();return false; });
});
