$(document).ready(function() {
	//limpa os valores dos inputs
	swapValue = [];
	$(".formularios ul li input, #login ul li input, .mapa fieldset ul input, textarea").each(function(i){
		swapValue[i] = $(this).val();
		$(this).focus(function(){
			if ($(this).val() == swapValue[i]) {
				$(this).val("");
			}
			$(this).addClass("focus");
		}).blur(function(){
			if ($.trim($(this).val()) == "") {
				$(this).val(swapValue[i]);
				$(this).removeClass("focus");
			}
		});
	});
	
	
	//exibe clientes da home
	/*$(function(){  
		$.ajax({  
			type: "GET",  
			url: "xml/clientes.xml",  
			dataType: "xml",  
			success: function(xml) { 
				var cliente = $(xml).find("cliente");
				var total = $(cliente).length;
				
				var currentPosition = 0;
				var slideWidth = 420;
				var slides = $(".box-clientes");
				var largura = slideWidth * total;
				
				$("#container-clientes").css({ 'width': largura + 'px', });
				$("#cliente-1").remove();
				
				$(cliente).each(function(){
					var nome =  $(this).find("nome").text();
					var imagem = $(this).find("imagem").text();
					var descricao = $(this).find("descricao").text();
					var id = $(this).attr("id");
					//alert(id);
					
					var html = '<div id="cliente-'+ id +'" class="box-clientes">';
					html += '<img src="imgs/'+ imagem +'" alt="'+ nome +'" />';
					html += '<h4>'+ nome +'</h4>';
					html += '<div class="descricao">'+ descricao +'</div>';
					html += '</div>';
					
					$(html).appendTo("#container-clientes");
				});// close each()
				
				manageControls(currentPosition);
				$('.controls')
					.bind('click', function(){
					currentPosition = ($(this).attr('id')=='next') ? currentPosition+1 : currentPosition-1;
					
					manageControls(currentPosition);
					$('#container-clientes').animate({
					  'marginLeft' : slideWidth*(-currentPosition)
					});
				});
			
				function manageControls(position){
					if(position==0){
						$('#prev').hide()
					} else { 
						$('#prev').show()
					}
					
					if(position==total-1){
						$('#next').hide()
					} else {
						$('#next').show()
					}
				}	
				
			}  
		}); //close $.ajax(  
	});*/ // close function()

});
