$(document).ready(function(){

	$('.nav_whoweare').mouseover(function(){
		$('#sub_whoweare').show();
		$('#sub_whatwedo').hide();		
		$('#sub_ourwork').hide();		
	});
	$('.nav_whatwedo').mouseover(function(){
		$('#sub_whatwedo').show();
		$('#sub_whoweare').hide();
		$('#sub_ourwork').hide();				
	});
	//now we need to make the other hovers clear the nav
	$('.nav_home').mouseover(function(){
		$('#sub_whatwedo').hide();
		$('#sub_whoweare').hide();
		$('#sub_ourwork').hide();		
	});
	$('.nav_ourwork').mouseover(function(){
		$('#sub_ourwork').show();
		$('#sub_whoweare').hide();
		$('#sub_whatwedo').hide();		
		
	});
	$('.nav_blog').mouseover(function(){
		$('#sub_whatwedo').hide();
		$('#sub_whoweare').hide();
		$('#sub_ourwork').hide();		
	});
	$('.nav_sayhello').mouseover(function(){
		$('#sub_whatwedo').hide();
		$('#sub_whoweare').hide();
		$('#sub_ourwork').hide();		
	});





	$('#container').mouseover(function(){
		
		//set em all to hide, then see which we need to show
		$('#sub_whoweare').hide();
		$('#sub_whatwedo').hide();					
		$('#sub_ourwork').hide();		
	
	
	
		if($('#sub_whoweare').attr('class') == 'subnav-cur')
		{
			$('#sub_whoweare').show();
		}
		else if($('#sub_whatwedo').attr('class') == 'subnav-cur'){
			$('#sub_whatwedo').show();
		}
		else if($('#sub_ourwork').attr('class') == 'subnav-cur'){
			$('#sub_ourwork').show();
			}
		
	});
	
	//for wide nav
	$('#content').mouseover(function(){
		
		//set em all to hide, then see which we need to show
		$('#sub_whoweare').hide();
			$('#sub_whatwedo').hide();					
			$('#sub_ourwork').hide();		
	

	
	
		if($('#sub_whoweare').attr('class') == 'subnav-cur')
		{
			$('#sub_whoweare').show();
		}
		else if($('#sub_whatwedo').attr('class') == 'subnav-cur'){
			$('#sub_whatwedo').show();
		}
		else if($('#sub_ourwork').attr('class') == 'subnav-cur'){
			$('#sub_ourwork').show();
		}
	});
	
	
	

	$('#client-login').click(function(){

		var $switcherval = $('#switcher').val();

		if($switcherval == 1)
		{
			//nav showing we need to show login
			$('#header_nav').hide();
			$('#header_login').fadeIn();
			$('#client-login').text("menu");
			$('#switcher').val('2');
		}
		else if($switcherval == 2){
			//login showing we need to show nav now
			$('#header_login').hide();
			$('#header_nav').fadeIn();
			$('#client-login').text("client login");
			$('#switcher').val('1');
			
		}
	
	
	
	});
	
	
	
});




