55
| <![CDATA[<script>
//Google Analytics
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-40755062-1', 'sp.gov.br');
ga('require', 'displayfeatures');
ga('send', 'pageview');
</script>]]>
|
449
| <![CDATA[<script type="text/javascript">
$('.openmenu').on('click', 'a', function (e) {
e.preventDefault();
var $nav = $('nav'),
$this = $(this);
if ($this.hasClass('close')) {
$nav.removeClass('open');
$this.removeClass('close');
} else {
$nav.addClass('open');
$this.addClass('close');
}
});
$(window).load(function () {
$('#bannerTopo').nivoSlider({
effect: 'sliceDown',
pauseTime: 5000,
directionNav: false
});
});
//Checa campo de busca
function checkquery() {
$val = $('#query').val();
if ($val.length < 3) {
$('#search').find('span').text('Termo muito curto.').show().animate({
top: '10px'
}, 100);
return false;
}
return true;
}
$('#query').on('focus', function () {
$('#search').find('span').hide().animate({
top: 0
}, 100);
});
//Fixed Menu
$nav = $('nav');
$navHeight = $nav.height();
$vdistance = $nav.offset().top;
$(window).on('scroll', function () {
if ($(window).scrollTop() >= ($vdistance) && $('.openmenu').is(':hidden')) {
$('#navDecoi').css({'height': $navHeight + 'px'});
$nav.addClass('fixedNav');
} else {
$('#navDecoi').css({'height': '0px'});
$nav.removeClass('fixedNav');
}
});
$(function () {
//Back to Top
$('#backTop').on('click', function (e) {
e.preventDefault();
$('html, body').animate({scrollTop: 0}, 600);
});
});
</script>]]>
|
512
| <![CDATA[<script>
function refreshCode() {
document.getElementById("refreshiframe").contentWindow.location.reload();
}
$.ajaxSetup({cache: false});
var formulario = $("#frmSugestoes");
formulario.submit(function () {
var dados = formulario.serialize();
$.ajax({
type: 'POST',
url: 'planejamento-municipal/sugestoes-servico/',
data: dados
}).done(function (retorno) {
if (retorno === "1") {
modal("Sugestão enviada com sucesso!", "Sucesso!");
formulario[0].reset();
$('#divFormulario').html("<div><label>Sugestão enviada com sucesso !</label></div>");
} else {
modal(retorno, "Falha!");
}
});
return false;
});
var acc = document.getElementsByClassName("ac-accordion");
var i;
for (i = 0; i < acc.length; i++) {
acc[i].addEventListener("click", function () {
this.classList.toggle("ac-active");
var panel = this.nextElementSibling;
if (panel.style.display === "block") {
panel.style.display = "none";
} else {
panel.style.display = "block";
}
});
}
</script>]]>
|