$(document).ready(function (){
	var cli = 0;
	var ftp = 0;
	$('#botclientea').live('click',function(){
		$('#ftp').animate({'height':0},500);
		$('#botftp').css('color','#757575');
		ftp = 0;			
		if(cli == 0){
			$('#clienta').animate({'height':40},500);
			$('#botclientea').css('color','#DBC359');
			cli = 1;
		}else{
			$('#clienta').animate({'height':0},500);
			$('#botclientea').css('color','#757575');
			cli = 0;			
		}
	});
	/*$('#botftp').live('click',function(){
		$('#clienta').animate({'height':0},500);
		$('#botclientea').css('color','#757575');
		cli = 0;		
		if(ftp == 0){
			$('#ftp').animate({'height':40},500);
			$('#botftp').css('color','#DBC359');
			ftp = 1;
		}else{
			$('#ftp').animate({'height':0},500);
			$('#botftp').css('color','#757575');
			ftp = 0;			
		}
	});*/
	$('#ftp input[name="login"]').live('focus',function (){
		if($(this).val() == 'Login'){
			$(this).val('');
		}
	});
	$('#ftp input[name="login"]').live('blur',function (){
		if($(this).val() == ''){
			$(this).val('Login');
		}
	});
	$('#ftp input[name="password"]').live('focus',function (){
			$('#ftp .spsen').fadeOut(0);
	});
	$('#ftp input[name="password"]').live('blur',function (){
		if($(this).val() == ''){
			$('#ftp .spsen').fadeIn(0);
		}
	});
	$('#clienta input[name="login"]').live('focus',function (){
		if($(this).val() == 'Login'){
			$(this).val('');
		}
	});
	$('#clienta input[name="login"]').live('blur',function (){
		if($(this).val() == ''){
			$(this).val('Login');
		}
	});
	$('#clienta input[name="password"]').live('focus',function (){
			$('#clienta .spsen').fadeOut(0);
	});
	$('#clienta input[name="password"]').live('blur',function (){
		if($(this).val() == ''){
			$('#clienta .spsen').fadeIn(0);
		}
	});
	$('#botagencia a').live('click',function (){
		$('#meiwork').fadeOut(500);
		$('#meio').fadeOut(500);
		$('#loader').fadeIn(500);
		$('#meio').load(RAIZ+'agencia.ajx',function (){
			$('hmtl,body').animate({'scrollTop':'0'},1000);
			$('#loader').fadeOut(500);
			$('#meio').fadeIn(500);
		});
	});
	$('#botcontato a').live('click',function (){
		$('#meiwork').fadeOut(500);
		$('#meio').fadeOut(500);
		$('#loader').fadeIn(500);
		$('#meio').load(RAIZ+'contato.ajx',function (){
			$('hmtl,body').animate({'scrollTop':'0'},1000);
			$('#loader').fadeOut(500);
			$('#meio').fadeIn(500);
		});
	});
	$('#botworks a').live('click',function (){
		$('#meiwork').fadeOut(500);
		$('#meio').fadeOut(500);
		$('#loader').fadeIn(500);
		$('#meiwork').load(RAIZ+'meio.ajx',function (){
			$('hmtl,body').animate({'scrollTop':'0'},1000);
			$('#loader').fadeOut(500);
			$('#meiwork').fadeIn(500);
			$('.iniout').fadeIn(1000);
			SetMyscroll();
		});
	});
	$('#botcliente a').live('click',function (){
		$('#meiwork').fadeOut(500);
		$('#meio').fadeOut(500);
		$('#loader').fadeIn(500);
		$('#meiwork').load(RAIZ+'clientes.ajx',function (){
			$('hmtl,body').animate({'scrollTop':'0'},1000);
			$('#loader').fadeOut(500);
			$('#meiwork').fadeIn(500);
			$('.iniout').fadeIn(1000);
			SetMyscroll();
		});
	});
	$('#botequipe a').live('click',function (){
		$('#meiwork').fadeOut(500);
		$('#meio').fadeOut(500);
		$('#loader').fadeIn(500);
		$('#meiwork').load(RAIZ+'equipe.ajx',function (){
			$('hmtl,body').animate({'scrollTop':'0'},1000);
			$('#loader').fadeOut(500);
			$('#meiwork').fadeIn(500);
			$('.iniout').fadeIn(1000);
			SetMyscroll();
		});
	});
});
