1$(function () { 2 $(".site-container").css('opacity', '1'); 3 configUserData(); 4 detectIE(); 5}); //Exibe o componente assim que todo o seu conteúdo for carregado. 6 7$('.carousel').on('init', function (event, slick) { 8 $(this).css('opacity', '1'); 9}); //Menu Mobile 10 11$('.main-header .menu-mobile').on('click', function () { 12 $('body').addClass('opened-menu'); 13 14 if ($('body').hasClass('IE')) { 15 alert('oi'); 16 $('.IE #govsph-topbarGlobal').css('z-index', '0!important'); 17 } 18}); 19 20function closeMenu() { 21 $('body').removeClass('opened-menu'); 22 $('.main-header_search-mobile-wrapper').removeClass('active'); 23} //Busca 24 25 26$('.main-menu_acessibility__search').on('click', function () { 27 $('.overlay').addClass('active'); 28 $('.main-header_search-wrapper').addClass('active'); 29 $('.main-header_search-mobile-wrapper').addClass('active'); 30}); 31$('.main-header_search-wrapper .close-search').on('click', function () { 32 $('.overlay').removeClass('active'); 33 $('.main-header_search-wrapper').removeClass('active'); 34}); //Fade em cada mudança de um item do carousel 35 36$('.carousel').on('beforeChange', function (event, slick, currentSlide, nextSlide) { 37 $(this).find($('.carousel [data-slick-index="' + currentSlide + '"]')).fadeTo('fast', 0); 38}); //Menu collapse 39 40$('.arrow-menu').on('click', function () { 41 var arrow = $(this); 42 43 if ($(this).hasClass('closed')) { 44 $(this).next().slideDown(300, function () { 45 arrow.removeClass('closed'); 46 }); 47 } else { 48 $(this).next().slideUp(300, function () { 49 arrow.addClass('closed'); 50 }); 51 } 52}); //Conteúdo collapse 53 54$(document).on('click', '.collapse__item', function () { 55 $(this).closest('.collapse__container').toggleClass('collapsed'); 56}); //Barra de acessibilidade. 57 58$('.main-menu_acessibility__font .change-font').on('click', function () { 59 createCookie('font-site', $(this).data('font')); 60 $('body').css('font-size', $(this).data('font')); 61}); 62$('.main-menu_acessibility .main-menu_acessibility__contrast').on('click', function () { 63 $('.opacity-banner').removeClass('contrast-active'); 64 var value = $(this).attr('data-contrast'); 65 66 if (value == '0') { 67 value = '1'; 68 $('.opacity-banner').addClass('contrast-active'); 69 createCookie('contrast', value); 70 } else { 71 value = '0'; 72 createCookie('contrast', value); 73 } 74 75 $(this).attr('data-contrast', value); 76}); //Barra do governo 77 78$('.govsph-kebab').on('click', function () { 79 var height = $('.govsph-dropdown.govsph-active').outerHeight(); 80 var heightMenu = $('.header-container').outerHeight(); 81 82 if (height) { 83 $('.header-container').css('margin-top', height + 20); 84 } else { 85 $('.header-container').css('margin-top', '0.9375em'); 86 } 87}); 88 89function configUserData() { 90 var fontSite = getCookie('font-site'); 91 var contrast = getCookie('contrast'); 92 $('body').css('font-size', fontSite); 93 $('.main-menu_acessibility .main-menu_acessibility__contrast').attr('data-contrast', contrast); 94 95 if (contrast == '1') { 96 $('.opacity-banner').addClass('contrast-active'); 97 } 98} 99 100; 101 102function createCookie(keyName, value) { 103 localStorage.setItem(keyName, value); 104} 105 106function getCookie(keyName) { 107 var item = localStorage.getItem(keyName); 108 109 if (keyName == 'font-site') { 110 return item == null ? '1em' : item; 111 } else if (keyName == 'contrast') { 112 return item == null ? '0' : item; 113 } 114 115 return null; 116} 117 118function detectIE() { 119 var ua = window.navigator.userAgent; 120 var msie = ua.indexOf('MSIE '); 121 122 if (msie > 0) { 123 // IE 10 or older => return version number 124 var ieV = parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); 125 document.querySelector('body').className += 'IE'; 126 } 127 128 var trident = ua.indexOf('Trident/'); 129 130 if (trident > 0) { 131 // IE 11 => return version number 132 var rv = ua.indexOf('rv:'); 133 var ieV = parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); 134 document.querySelector('body').className += 'IE'; 135 } 136 137 var edge = ua.indexOf('Edge/'); 138 139 if (edge > 0) { 140 // IE 12 (aka Edge) => return version number 141 var ieV = parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); 142 document.querySelector('body').className += 'IE'; 143 } // other browser 144 145 146 return false;
147} 148 149; //função debounce 150 151function debounce(func, wait, immediate) { 152 var timeout; 153 return function () { 154 var context = this, 155 args = arguments; 156 157 var later = function later() { 158 timeout = null; 159 if (!immediate) func.apply(context, args); 160 }; 161 162 var callNow = immediate && !timeout; 163 clearTimeout(timeout); 164 timeout = setTimeout(later, wait); 165 if (callNow) func.apply(context, args); 166 }; 167} 168 169;
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.