$(document).ready(function() {
	
$('p:first').css( {margin:'0'} );
$('.post:last').css( {margin:'0', padding:'0', border:'none'} );


$('#rightbox div').hide(); 


 $('#man a').hover(function() {

            $('#man a').removeClass('active'); 
            $(this).addClass('active'); 
		   
                   var currentTab = $(this).attr('href');
				   $(currentTab).siblings().hide();
				   $(currentTab).fadeIn();
                },
                function () {
			
							 
				// code
			
				} 
            );
 
 	// opens external links in a new window
 	$('a.external').click(function() {
 		// open link in new window
 		window.open($(this).attr('href'), '_blank');
 		
 		// prevent natural link
 		return false;
 	});
	
	
	// Menus
	var bi=document.body.id;
	if(bi!='home')
	{
	$('.service-mid').hide();
	}
	if(bi=='aaw')
	{
		document.getElementById("aawmenu").style.display='block';	
	}
	else if(bi=='rta')
	{
		document.getElementById("rtamenu").style.display='block';	
	}
	else if(bi=='stf')
	{
		document.getElementById("stfmenu").style.display='block';	
	}
	else if(bi=='gen')
	{
		document.getElementById("genmenu").style.display='block';	
	}
	
	$('.arrowclose1,.arrowclose2,.arrowclose3').css('cursor', 'pointer');

	$('.arrowclose1').click(function(){
		$(this).next('.service-mid').slideToggle('slow');
		$(this).toggleClass("arrowopen1"); 
		$(this).css('cursor', 'pointer');
		
		return false;
	});
	$('.arrowclose2').click(function(){
		$(this).next('.service-mid').slideToggle('slow');
		$(this).toggleClass("arrowopen2"); 
		$(this).css('cursor', 'pointer');
		
		return false;
	});
	$('.arrowclose3').click(function(){
		$(this).next('.service-mid').slideToggle('slow');
		$(this).toggleClass("arrowopen3"); 
		$(this).css('cursor', 'pointer');
		
		return false;
	});
	
	
});
