1var theme_url = phpFunctionVars.theme_url; 2var msie = document.documentMode; 3var ua = window.navigator.userAgent.indexOf("Edge/"); 4if (ua > 0) { 5 $(".border-image-orange").addClass("bg-image-100"); 6 $(".border-image-blue").addClass("bg-image-100"); 7} 8//check if element is on screen 9$.fn.isOnScreen = function () { 10 var win = $(window); 11 var viewport = { 12 top: win.scrollTop(), 13 left: win.scrollLeft(), 14 }; 15 viewport.right = viewport.left + win.width(); 16 viewport.bottom = viewport.top + win.height(); 17 var bounds = this.offset(); 18 bounds.right = bounds.left + this.outerWidth(); 19 bounds.bottom = bounds.top + this.outerHeight(); 20 return !(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom); 21}; 22if (msie <= 10) { 23 //alert("a") 24 $("#mainContent").html('<div id="unsupported-browser"><div class="container"> <p>Este browser não é suportado.</p></div></div>'); 25} else { 26 if (msie > 10) { 27 document.querySelector("#menuTriggerButton").addEventListener("click", function () { 28 var resizeEvent = document.createEvent('HTMLEvents'); 29 resizeEvent.initEvent('resize', true, true); 30 document.dispatchEvent(resizeEvent); 31 }) 32 33 $(".bongo-card").css({ 34 backgroundSize: "100% 100% !important", 35 }); 36 $(".stroke-circle-left").css("background-image", "unset"); 37 $(".stroke-circle-right").css("background-image", "unset"); 38 } else { 39 //Firefox dispatch resize 40 window.setTimeout(function () { 41 window.dispatchEvent(new Event('resize')); 42 }, 10); 43 44 var interval; 45 46 function triggerInterval() { 47 48 interval = setInterval(function () { 49 50 // debugger; 51 window.dispatchEvent(new Event('resize')) 52 window.setTimeout(function () { 53 clearInterval(interval) 54 }, 10) 55 }); 56 } 57 58 $("#nav-hamburger").on("click", function () { 59 triggerInterval(); 60 61 initialMenuHeight = $("#navbarSupportedContent").height(); 62 resizeMenu(); 63 if ($("#navbarSupportedContent").height() <= $(window).height()) { 64 $("#menuUlContainer").css({ 65 overflowY: "scroll", 66 height: $(window).height() - imagePlaceholder.height() + "px", 67 }); 68 } else { 69 $("#menuUlContainer").css({ 70 overflowY: "", 71 height: $(window).height() - imagePlaceholder.height() + "px", 72 }); 73 $("#scrollMenuContainer").css({ 74 display: "block" 75 }) 76 } 77 }) 78 79 //Fix for IE + Compatibility 4 all browsers 80 document.querySelector("#menuTriggerButton").addEventListener("click", function () { 81 triggerInterval(); 82 }) 83 } 84 $(".stroke-circle-left").whenInView({ 85 elementIn: function () { 86 setTimeout(function () { 87 $(".stroke-circle-left").css("background-image", "url("+theme_url+"/assets/ui/elements/stroke-circle-80.gif?v=" + Math.random() + ")"); 88 }, 800); 89 }, 90 elementOut: function () { 91 $(".stroke-circle-left").css("background-image", "unset"); 92 }, 93 }); 94 $(".stroke-circle-right").whenInView({ 95 elementIn: function () { 96 setTimeout(function () { 97 $(".stroke-circle-right").css("background-image", "url("+theme_url+"/assets/ui/elements/stroke-circle-20.gif?v=" + Math.random() + ")"); 98 }, 1000); 99 }, 100 elementOut: function () { 101 $(".stroke-circle-right").css("background-image", "unset"); 102 }, 103 }); 104 /* Mobile menu */ 105 $(".collapse").on("show.bs.collapse", function () { 106 $("#nav-hamburger").addClass("open"); 107 }); 108 $(".collapse").on("shown.bs.collapse", function () { 109 $(".bongo-navbar").addClass("position-fixed"); 110 }); 111 $(".collapse").on("hide.bs.collapse", function () { 112 $("#nav-hamburger").removeClass("open"); 113 $(".bongo-navbar").removeClass("position-fixed"); 114 }); 115 /* Start AOS Plugin */ 116 AOS.init({ 117 duration: 600, 118 mirror: false, 119 easing: "ease-in-out", 120 once: true, 121 }); 122 /* UI Kit grid center fix */ 123 $("[uk-filter]").on("beforeFilter", function () { 124 $(".js-filter").addClass("justifyCenter"); 125 }); 126 $("[uk-filter]").on("afterFilter", function () { 127 // $(".js-filter").removeClass("justifyCenter") 128 $(".filter-item:visible").length <= 3 ? $(".js-filter").addClass("justifyCenter") : $(".js-filter").removeClass("justifyCenter"); 129 }); 130 /* Hover simulation on mobile */ 131 var windowHeight = $(window).height(); 132 var documentHeight = $(document).height(); 133 var scrollTop = $(window).scrollTop(); 134 $.fn.isInViewport = function () { 135 var elementTop = $(this).offset().top; 136 var elementBottom = elementTop + $(this).outerHeight(); 137 var viewportTop = $(window).scrollTop() - windowHeight / 2; 138 var viewportBottom = viewportTop + windowHeight; 139 return elementBottom > viewportTop && elementTop < viewportBottom; 140 // console.log(viewportTop); 141 }; 142 $(window).on("resize scroll", function () { 143 if ($(window).width() <= 639) { 144 // $(".opacity100").removeClass("opacity100"); 145 $(".masonry-item-content-text-container").each(function () { 146 if ($(this).isInViewport()) { 147 console.log("a"); 148 $(".opacity100").removeClass("opacity100"); 149 $(this).addClass("opacity100"); 150 } else { 151 $(this).removeClass("opacity100"); 152 } 153 }); 154 } 155 if ($(window).width() >= 640 && $(window).width() <= 1024) { 156 $(".masonry-item-content-text-container").each(function () { 157 if ($(this).isInViewport()) { 158 $(this).addClass("opacity100"); 159 } else { 160 $(this).removeClass("opacity100"); 161 } 162 }); 163 } 164 if ($(window).width() <= 849) { 165 $(".image-change-shadow-orange").removeClass("img-shadow-orange-light").addClass("img-shadow-orange-dark"); 166 $(".image-change-shadow-blue").removeClass("img-shadow-blue-light").addClass("img-shadow-blue-dark"); 167 } else { 168 $(".image-change-shadow-orange").removeClass("img-shadow-orange-dark").addClass("img-shadow-orange-light"); 169 $(".image-change-shadow-blue").removeClass("img-shadow-blue-dark").addClass("img-shadow-blue-light"); 170 } 171 }); 172 if ($(window).width() <= 992 && $(".flip-card").length) { 173 $(".flip-card").click(function () { 174 $(this).toggleClass("flip-active"); 175 }); 176 } 177 if ($(window).width() > 992 && $(".flip-card").length) { 178 $(".flip-card").hover( 179 function () { 180 $(this).addClass("flip-active"); 181 }, 182 function () { 183 $(this).removeClass("flip-active"); 184 } 185 ); 186 } 187 // $(window).one("load", function () { 188 // var CurrentText = $(".active").children(".especialista-item").
188children(".especialista-item-description").text(); 189 // var textRecipient = $("#especialista_bio_container") 190 // textRecipient.html(CurrentText) 191 // }); 192 $("#especialistas").on("slide.bs.carousel", function (e) { 193 var active = $(e.target).find(".carousel-inner > .active"); 194 var from = active.index(); 195 var next = $(e.relatedTarget); 196 var to = next.index(); 197 // console.log(from + ' => ' + to); 198 // console.log(to) 199 var carouselItems = $(".carousel-item"); 200 var bioHeight = $(".expert-more-info").innerHeight(); 201 var i; 202 for (i = 0; i < carouselItems.length; i++) { 203 // console.log($(".especialista-item-description").eq(to).text()) 204 var CurrentText = $(".especialista-item-description").eq(to).text(); 205 var textRecipient = $("#especialista_bio_container"); 206 textRecipient.html(CurrentText); 207 var textHeight = textRecipient.innerHeight() + 130; 208 // console.log(textHeight) 209 if ($(".especialista-cta-image").hasClass("less")) { 210 $(".especialista-cta-image").attr("src", theme_url+"/assets/ui/elements/btn-white-vermenos.svg"); 211 $(".expert-bio-container").animate({ 212 height: textHeight, 213 }, 214 300 215 ); 216 } 217 // console.log($(this).children(".carousel-inner").children(".active").next().children(".especialista-item").children(".especialista-item-description").text()) 218 } 219 }); 220 $(".especialista-cta-image").on("click", function () { 221 if ($(".especialista-cta-image").hasClass("more")) { 222 $(".especialista-cta-image").removeClass("more"); 223 $(".especialista-cta-image").addClass("less"); 224 $(".especialista-cta-image").attr("src", theme_url+"/assets/ui/elements/btn-white-vermenos.svg"); 225 $(".expert-bio-container").animate({ 226 height: $(".expert-more-info").innerHeight(), 227 }, 228 300, 229 function () { 230 // Animation complete. 231 } 232 ); 233 } else if ($(".especialista-cta-image").hasClass("less")) { 234 $(".especialista-cta-image").removeClass("less"); 235 $(".especialista-cta-image").addClass("more"); 236 $(".especialista-cta-image").attr("src", theme_url+"/assets/ui/elements/btn-white-vermais.svg"); 237 $(".expert-bio-container").animate({ 238 height: 0, 239 }, 240 300, 241 function () { 242 // Animation complete. 243 } 244 ); 245 } 246 }); 247 // fix UI Kit equal grid 248 $("#equalGrid a:nth-child(3)").nextAll().addClass("uk-grid-margin"); 249 $("#equalGridAll").on("click", function () { 250 $("#equalGrid a:nth-child(3)").nextAll().addClass("uk-grid-margin"); 251 }); 252 //Abrir video no YT 253 if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { 254 // //remover o input que abre a modal 255 // alert("mobile") 256 // $(".videotoggle").attr('data-toggle', 0); 257 $(".mobilevideoviewer").on("click", function () { 258 "#videocontent" [0].src = $(this).data("videourl"); 259 //videocontent 260 $(".modal-content").addClass("mobileVideo"); 261 // screen.orientation.lock('landscape'); 262 // $(".video-modal-content").addClass("w-100") 263 // var id = $(this).data("videoid"); 264 // window.location = "vnd.youtube://" + id; 265 }); 266 } 267 // $(".mobilevideoviewer").on("click", function () { 268 // $("#videocontent")[0].src += "&autoplay=1"; 269 // }) 270 $(".mobilevideoviewer").on("click", function () { 271 var videoURLcontainer = $(this).attr("data-videourl"); 272 if (videoURLcontainer.includes("watch?v=")) { 273 newvideoURLcontainer = videoURLcontainer.replace("watch?v=", "embed/"); 274 $("#videocontent")[0].src = newvideoURLcontainer; 275 } else { 276 $("#videocontent")[0].src = videoURLcontainer; 277 } 278 }); 279 $("#videoModal").on("shown.bs.modal", function (e) { 280 $("#videocontent")[0].src += "?autoplay=1"; 281 }); 282 $("#videoModal").on("hide.bs.modal", function (e) { 283 var videoURL = $("#videocontent")[0].src; 284 $("#videocontent")[0].src = videoURL.replace("?autoplay=1", ""); 285 }); 286 $(".mobilevideoviewer").on("click", function () { 287 var videoURLcontainer = $(this).attr("data-videourl"); 288 if (videoURLcontainer.includes("watch?v=")) { 289 newvideoURLcontainer = videoURLcontainer.replace("watch?v=", "embed/"); 290 $("#videocontent")[0].src = newvideoURLcontainer; 291 } else { 292 $("#videocontent")[0].src = videoURLcontainer; 293 } 294 }); 295 $("#videoModal").on("shown.bs.modal", function (e) { 296 $("#videocontent")[0].src += "?autoplay=1"; 297 }); 298 $("#videoModal").on("hide.bs.modal", function (e) { 299 var videoURL = $("#videocontent")[0].src; 300 $("#videocontent")[0].src = videoURL.replace("?autoplay=1", ""); 301 }); 302 $(".dual-menu").on("show.bs.collapse", function () { 303 $("#navbarContainer").addClass("position-fixed"); 304 }); 305 $(".dual-menu").on("hidden.bs.collapse", function () { 306 $("#navbarContainer").removeClass("position-fixed"); 307 }); 308 imageHeight = $("#logoMenu").height() + 20; 309 imagePlaceholder = $("#imagePlaceholder"); 310 imagePlaceholder.css({ 311 height: imageHeight, 312 }); 313 314 315 initialMenuHeight = $("#navbarSupportedContent").height(); 316 317 function resetStyles() { 318 $("#menuUl").css({ 319 height: "auto", 320 }); 321 $("#menuUlContainer").css({ 322 overflowY: "", 323 height: "", 324 }); 325 $("#scrollMenuContainer").css({ 326 display: "" 327 }) 328 } 329 330 function resizeMenu() { 331 if (window.innerWidth <= 1200) { 332 initialMenuHeight = $("#navbarSupportedContent").height(); 333 if (initialMenuHeight <= $(window).height()) { 334 $("#menuUlContainer").css({ 335 overflowY: "", 336 height: $(window).height() - imagePlaceholder.height() + "px", 337 }); 338 } else { 339 $("#menuUlContainer").css({ 340 overflowY: "scroll", 341 height: $(window).height() - imagePlaceholder.height() + "px", 342 }); 343 $("#scrollMenuContainer").css({ 344 display: "block" 345 }) 346 } 347 } else { 348 $("#navbarContainer").removeClass("position-fixed"); 349 resetStyles(); 350 } 351 } 352 window.addEventListener('resize', function () { 353 imageHeight = $("#logoMenu").height() + 20; 354 imagePlaceholder.css({ 355 height: imageHeight, 356 }); 357 imagePlaceholder.css({ 358 height: imageHeight, 359 }); 360 resetStyles(); 361 resizeMenu(); 362 }) 363 364 //triggers nos ifs no inÃcio da página 365 366 $("#nav-hamburger").on("show.bs.collapse", function () { 367 $("#navbarContainer").addClass("position-fixed"); 368 }); 369 $("#nav-hamburger").on("hidden.bs.collapse", function () { 370 $("#navbarContainer").removeClass("position-fixed"); 371 }); 372 $("#scrollDown").click(function () { 373 $('#menuUlContainer').animate({ 374 scrollTop: '+=50px' 375 }, 300); 376 }); 377 $("#scrollUp").click(function () { 378 $('#menuUlContainer').animate({ 379 scrollTop: '-=50px' 380 }, 300); 381 }); 382 383}
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.