1/* Main JS */ 2 3jQuery(".navbar-default .navbar-nav > .parent > :first-child") 4 .attr("data-toggle", "dropdown") 5 .append("<span class='caret'></span>"); 6 7jQuery(document).ready(function ($) { 8 $(".item-133").click(function (e) { 9 // Se a área interna existir na página, NÃO impede o comportamento padrão 10 if ($("#interna").length === 0) { 11 e.preventDefault(); // Impede o comportamento padrão 12 $("html, body").animate( 13 { 14 scrollTop: $("#fx4").offset().top, 15 }, 16 1500 17 ); 18 } 19 }); 20}); 21 22var animar_scroll_para = function (alvo, gap) { 23 gap = gap == undefined ? 0 : gap; 24 var altura_elemento = jQuery(alvo).offset().top - gap; 25 jQuery("html, body").stop().animate({ scrollTop: altura_elemento }, 800); 26}; 27 28jQuery(document).ready(function () { 29 jQuery(".lupin").click(function () { 30 jQuery(".search").toggleClass("ativo"); 31 }); 32 jQuery(".feche-busca").click(function () { 33 jQuery(".search").toggleClass("ativo"); 34 }); 35}); 36 37jQuery(".map-container") 38 .click(function () { 39 jQuery(this).find("iframe").addClass("clicked"); 40 }) 41 .mouseleave(function () { 42 jQuery(this).find("iframe").removeClass("clicked"); 43 }); 44 45/* Scroll Top */ 46 47var selectorTopo = jQuery("#irTopo"); 48 49jQuery(document).on("scroll", function () { 50 if (window.pageYOffset >= 400 && selectorTopo.css("bottom") == "-40px") { 51 selectorTopo.stop().animate( 52 { 53 bottom: 0, 54 }, 55 300 56 ); 57 } 58 if (window.pageYOffset < 400 && selectorTopo.css("bottom") == "0px") { 59 selectorTopo.stop().animate( 60 { 61 bottom: -40, 62 }, 63 300 64 ); 65 } 66}); 67 68selectorTopo.on("click", function () { 69 jQuery("html, body").stop().animate( 70 { 71 scrollTop: 0, 72 }, 73 800 74 ); 75}); 76 77/* Animar header */ 78 79jQuery(document).on("scroll", function () { 80 if (jQuery(this).scrollTop() > 0) 81 jQuery("body").removeClass("top").addClass("scrolled"); 82 else jQuery("body").removeClass("scrolled").addClass("top"); 83}); 84 85/* Font Size */ 86 87var defaultFontSize = 140; 88var currentFontSize = defaultFontSize; 89 90var changeFontSize = function (sizeDifference) { 91 currentFontSize = 92 parseInt(currentFontSize, 10) + parseInt(sizeDifference * 10, 10); 93 if (currentFontSize > 200) { 94 currentFontSize = 200; 95 } else if (currentFontSize < 60) { 96 currentFontSize = 60; 97 } 98 jQuery("body") 99 .stop() 100 .animate({ fontSize: currentFontSize / 100 + "em" }, 300); 101}; 102 103var changeDefaultFontSize = function () { 104 currentFontSize = defaultFontSize; 105 changeFontSize(0); 106}; 107 108/* High Contrast */ 109 110var highContrast = function () { 111 var sectionPrincipal = document.getElementById("sectionPrincipal"); 112 var classSectionPrincipalString = sectionPrincipal.className; 113 114 if (classSectionPrincipalString.search("high-contrast") == -1) 115 sectionPrincipal.className = classSectionPrincipalString + " high-contrast"; 116 else 117 sectionPrincipal.className = classSectionPrincipalString.replace( 118 "high-contrast", 119 "" 120 ); 121}; 122jQuery("button#Enviar").click(function () { 123 var ac = jQuery(".formContainer.formHorizontal").attr("id").substr(7, 1); 124 var ac = ac.substr(0, 2); 125 var d = new Date(); 126 var n = d.getTime(); 127 var x = Date.now(); 128 var z = Math.random(); 129 var s = "" + z; 130 s = s.substr(2, 5); 131 var ticket = "2023." + ac + s; 132 /*escrever ticket*/ 133 jQuery("input[ID=ticket]").val(ticket); 134 console.log(ticket); 135}); 136 137function selecionarEspanhol() { 138 var selects = document.getElementsByClassName("goog-te-combo"); 139 var select = selects[0]; 140 for (var i = 0; i < select.options.length; i++) { 141 if (select.options[i].value == "es") { 142 select.options[i].selected = true; 143 select.dispatchEvent(new Event("change")); 144 break; 145 } 146 } 147} 148function selecionarEngles() { 149 var selects = document.getElementsByClassName("notranslate"); 150 var select = selects[0]; 151 for (var i = 0; i < select.options.length; i++) { 152 if (select.options[i].value == "pt|en") { 153 select.options[i].selected = true; 154 select.dispatchEvent(new Event("change")); 155 break; 156 } 157 } 158} 159 160function brasil() { 161 var selects = document.getElementsByClassName("notranslate"); 162 var select = selects[0]; 163 for (var i = 0; i < select.options.length; i++) { 164 if (select.options[i].value == "pt|pt") { 165 select.options[i].selected = true; 166 select.dispatchEvent(new Event("change")); 167 break; 168 } 169 } 170} 171 172//menu lateral com subitens 173// Selecionar o elemento pai com a classe "modlist" 174const modlist = document.getElementsByClassName("mod-list"); 175 176// Selecionar todos os elementos filhos com a classe "deeper parent" dentro do elemento "modlist" 177// const deeperParents = modlist[0].getElementsByClassName("deeper parent"); 178 179// Adicionar o evento de clique a cada elemento "deeper parent" 180for (let i = 0; i < deeperParents.length; i++) { 181 deeperParents[i].addEventListener("click", function (event) { 182 event.stopPropagation(); 183 184 // Selecionar o elemento "ul.nav-child" dentro do elemento atual 185 const ul = this.querySelector("ul.nav-child"); 186 187 // Selecionar o elemento ".s" dentro do elemento atual 188 const s = this.querySelector(".s"); 189 190 // Alternar a classe "show" para a lista "ul" e a classe "hide" para o elemento ".s" 191 ul.classList.toggle("show"); 192 s.classList.toggle("hide"); 193 }); 194} 195// adicionar o css abaixo para o menu lateral funcionar 196// ul.nav-child.show { 197// display: block; 198// } 199 200// .s.hide { 201// display: none; 202// } 203document.addEventListener("DOMContentLoaded", function () { 204 const modlist = document.getElementsByClassName("mod-list"); 205 const deeperParents = modlist[0].getElementsByClassName("deeper parent"); 206 for (let j = 0; j < deeperParents.length; j++) { 207 if (deeperParents[j].classList.contains("active")) { 208 deeperParents[j].querySelector(".nav-child").classList.toggle("show"); 209 deeperParents[j].querySelector(".s").classList.toggle("hide"); 210 } else { 211 deeperParents[j].querySelector(".nav-child").classList.remove("show"); 212 } 213 } 214});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.