﻿$(document).ready(function(){
 	// Máscara de texto
	$(":text").labelify();
	 
	// Mostrar boxes
	
	// Tabs
	$("#links_crit a").click(function(){
		$("#links_crit a").removeClass("act_cri");
		$(this).addClass("act_cri");
		var href = $(this).attr("href");
		var target = href.slice();
		$(".box_crit").hide();
		$(target).show();
		return false;
	});
	$("#tab-ape, #tab-ext").hide();	
	
	// LAYER P/ ENVIAR TRABALHO
	$('#bt_produc').click(function(){
		$('#content_layer').show();
		$('select').hide();
	});
	$('#bt_trab').click(function(){
		$('#content_layer').hide();
		$('select').show();
	});	
	$('#close_lay').click(function(){
		$('#content_layer').hide();
		$('select').show();
	});		
	/*
	$('#bt_cont').click(function(){
		
		// valida e-mail
		var validaEmail = function(s) {
			var regexpEmail = /\w{1,}[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/;
		return regexpEmail.test(s);
		}; // fim validaEmail 		
		
		var erro = "";
		if (!$('#nome').val()) {
			erro += "- Informe seu nome.\n";
		}
		if (!$('#email').val()) {
			erro += "- Informe seu e-mail.\n";
		}
		else if (!validaEmail($('#email').val())) {
			erro += "- E-mail inválido.\n";
		}
		if (!$('#mensagem').val()) {
			erro += "- Informe sua mensagem.\n";
		}		
		if(erro.length>0){
			alert(erro);
			return false;
		}		
		
	});
	*/

	
	
});