$().ready(function() {

									$('#example7 .kwicks').kwicks({

						max: 374,

						duration: 400,

						sticky: true

					});

							});


//==================================================================================================================//
// VALIDAR E ENVIAR FORMULÃƒÂRIOS

function enviaForm(quem) {
	
	var check = true;
	var formulario = quem.parentNode;
	var labels = formulario.getElementsByTagName("input");
	var botao = formulario.getElementsByTagName("a")[0];
	var span = formulario.getElementsByTagName("span")[0];

	//verificar campos
	for (var i = 0; i < labels.length; i++) {
		
		var checkFor = labels[i].getAttributeNode("for");
		
		if (checkFor && checkFor.value != "") {
			
			var campo = document.getElementById(checkFor.value);
			
			if (campo.value.length > 0) { 
				if(campo.value == "Nome:" || campo.value == "E-mail:" ){
					campo.className = "erro"; 
					labels[i].className = "erro"; 
					check = false; 
				}
				else {
					campo.className = "ok";
					labels[i].className = "ok";
					check = true; 					
				}
			}
			else {
			campo.className = "erro"; 
			labels[i].className = "erro"; 
			check = false; 
			}
			
		}

	}
	
	//enviar caso esteja tudo ok
	if (check) {
		span.innerHTML = "Enviando...";
		formulario.submit();
	}
	
}
