      $(document).ready(function() {

 

      
      
    //UPLOAD IMAGENS MINIATURA

    new AjaxUpload('#uploadmini', {

      action: 'gercont/phpexe/uploadarquivos.php',
      name: 'arquivo', 
      autoSubmit: true,
      responseType: "json",
      onChange:function(){
          $('#trabalhe_conosco #enviar').hide();
          $('#trabalhe_conosco #arquivoTem').val("");
      },
      onComplete: function(minitura,data) { 
          if(data.status == 'ok'){
             $('#trabalhe_conosco #enviar').show();
             $('#trabalhe_conosco #arquivoTem').val(data.imagem);
          }else{
             if(data.status == 'erro'){
               alert('Extensão inválida, é permitido apenas .doc e .pdf');
             }else{
               $('#trabalhe_conosco #enviar').hide();
               $('#trabalhe_conosco #arquivoTem').val(" ");
             }
          }
      }

    });

    

    $('#form_busca').submit(function(){
        var key = $(this).children('input.campo_pesquisar').val();       
        if ( key == '') {
            alert('Ainda não temos bola de cristal para adivinhar o que você quer buscar!');
            return false;
        } else {           
            return true;
        }
        return false;
    });
        
    $("a.bt_trabalheconosco").click(function(){
			
        $('.bt_login_painel').removeClass('menuativa');
        $('div.login_painel').slideUp();	
			 
        if ( $(this).hasClass('menuativa') ) {
				
            $('.bt_trabalheconosco').removeClass('menuativa');
					
        }else{
					
            $('.bt_trabalheconosco').addClass('menuativa');
        }
			 
        $('div.trabalhe_conosco').slideToggle();
			 
    });
    
        
    $("a.bt_login_painel").click(function(){
			
        $('.bt_trabalheconosco').removeClass('menuativa');
        $('div.trabalhe_conosco').slideUp();
			
        if ( $(this).hasClass('menuativa') ){				
            $('a.bt_login_painel').removeClass('menuativa');					
        }else{					
            $('.bt_login_painel').addClass('menuativa');
        }
        $('div.login_painel').slideToggle();
			 
    });
    
		
				
	
    $('#bt_procurar').hide();
    $('#pesquisar').focus(function(){
        $(this).parent('form').parent('div').parent('div').addClass('bg2');
        $('#bt_procurar').show();
        $('#tx_digite').addClass('oculta');
    }).keyup(function(){
        if ( $(this).val() != '' ) {
            $('#tx_digite').addClass('some_texto');
        } else {
            $('#tx_digite').removeClass('some_texto');
        }
    }).blur(function() {
        $(this).parent('form').parent('div').parent('div').removeClass('bg2');
        if ( $(this).val() != '' ) {
            $('#tx_digite').addClass('some_texto');
        } else {
            $('#tx_digite').removeClass('some_texto oculta');
            $('#bt_procurar').hide();
        }
    });
    
    $("#faleconosco").validate();
    $("#trabalhe_conosco").validate({
                                       submitHandler: function(form) {

                                             var params = $("#trabalhe_conosco").serialize();
                                              $.ajax({
                                              type: "POST",
                                              data: params,
                                              url:  "php/enviarCurriculo.php",
                                              beforeSend: function(){},

                                              success: function(txt){//executa quando o servidor responde
                                                 alert('Currículo enviado com sucesso!');
                                                 $('#trabalhe_conosco #enviar').hide();
                                                 $('#trabalhe_conosco #nome_trabalhe_conosco').val("");
                                                 $('#trabalhe_conosco #email_trabalhe_conosco').val("");
                                                 $('#trabalhe_conosco #arquivoTem').val("");
                                              },

                                              error: function(txt){}

                                            });

                                       }
                                    });

    $("#login_painel").validate();
    
    setTimeout("$('#tooltex').html('ok, tchau!');$('#tooltex').fadeOut('fast'); $('#tooltip').slideUp('slow');",3000);

});


        /*********************************************************
        <!-- Script Aumentar/Diminuir Fonte -->
        Script original por: http://www.mundoblogger.com.br/
        Script modificado por: http://bloggandonaweb.blogspot.com/
        *********************************************************/
        //<![CDATA[
     

        function fontReset() {

        var obj = document.getElementById("textFontButtons");
        if (obj.style.fontSize==""){obj.style.fontSize="12px"};
        if (obj.style.fontSize=="10px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="11px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="12px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="13px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="14px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="15px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="16px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="17px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="18px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="19px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="20px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="21px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="22px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="23px"){obj.style.fontSize = "";}
        if (obj.style.fontSize=="24px"){obj.style.fontSize = "";}

        }

        function fontUp(){

        var obj = document.getElementById("textFontButtons");
        if (obj.style.fontSize==""){obj.style.fontSize="12px"};
        if (obj.style.fontSize=="10px"){obj.style.fontSize = "11px";}
        else if (obj.style.fontSize=="11px"){obj.style.fontSize = "12px";}
        else if (obj.style.fontSize=="12px"){obj.style.fontSize = "13px";}
        else if (obj.style.fontSize=="13px"){obj.style.fontSize = "14px";}
        else if (obj.style.fontSize=="14px"){obj.style.fontSize = "15px";}
        else if (obj.style.fontSize=="15px"){obj.style.fontSize = "16px";}
        else if (obj.style.fontSize=="16px"){obj.style.fontSize = "17px";}
        else if (obj.style.fontSize=="17px"){obj.style.fontSize = "18px";}
        else if (obj.style.fontSize=="18px"){obj.style.fontSize = "19px";}
        else if (obj.style.fontSize=="19px"){obj.style.fontSize = "20px";}
        else if (obj.style.fontSize=="20px"){obj.style.fontSize = "21px";}
        else if (obj.style.fontSize=="21px"){obj.style.fontSize = "22px";}
        else if (obj.style.fontSize=="22px"){obj.style.fontSize = "23px";}
        else if (obj.style.fontSize=="23px"){obj.style.fontSize = "24px";}

        }

        function fontDown(){

        var obj = document.getElementById("textFontButtons");
        if (obj.style.fontSize==""){obj.style.fontSize="12px"};
        if (obj.style.fontSize=="24px"){obj.style.fontSize = "23px";}
        else if (obj.style.fontSize=="23px"){obj.style.fontSize = "22px";}
        else if (obj.style.fontSize=="22px"){obj.style.fontSize = "21px";}
        else if (obj.style.fontSize=="21px"){obj.style.fontSize = "20px";}
        else if (obj.style.fontSize=="20px"){obj.style.fontSize = "19px";}
        else if (obj.style.fontSize=="19px"){obj.style.fontSize = "18px";}
        else if (obj.style.fontSize=="18px"){obj.style.fontSize = "17px";}
        else if (obj.style.fontSize=="17px"){obj.style.fontSize = "16px";}
        else if (obj.style.fontSize=="16px"){obj.style.fontSize = "15px";}
        else if (obj.style.fontSize=="15px"){obj.style.fontSize = "14px";}
        else if (obj.style.fontSize=="14px"){obj.style.fontSize = "13px";}
        else if (obj.style.fontSize=="13px"){obj.style.fontSize = "12px";}
        else if (obj.style.fontSize=="12px"){obj.style.fontSize = "11px";}
        else if (obj.style.fontSize=="11px"){obj.style.fontSize = "10px";}

        }




