619
| <![CDATA[<script>jQuery(function ($) {
$(function() {
$('#banner-popup').modal('show');
}); setTimeout(function() { $('#banner-popup').modal('hide') }, 40000);
jQuery('#modal-calendario').modal({"show":false,"backdrop":"static","keyboard":false});
function addLeadingZero(num) {
return (num < 10) ? "0" + num : num;
}
$(document).ready(function () {
var groupedData = {};
$.getJSON('/site/json-calendario?data-inicio=27-09-2019&data-fim=27-09-2021', function( data ) {
for (var it = 0; it < data.length; it++) {
var item = data[it];
if (!groupedData[item.dataInicio.substring(0, 10)])
groupedData[item.dataInicio.substring(0, 10)] = [];
groupedData[item.dataInicio.substring(0, 10)].push(item);
}
var converteData = function(d) {
var day = d.getUTCDate();
var month = d.getUTCMonth() + 1;
var year = d.getFullYear();
if (day < 10) {
day = "0" + day;
}
if (month < 10) {
month = "0" + month;
}
var date = day + "/" + month + "/" + year;
return date;
};
$(".responsive-calendar").responsiveCalendar({
onActiveDayClick: function(events) {
var thisDayEvent, key;
key = $(this).data('year')+'-'+addLeadingZero($(this).data('month'))+'-'+addLeadingZero($(this).data('day'));
thisDayEvent = events[key];
$('.div-calendario').empty();
for (var it = 0; it < thisDayEvent.length; it++) {
var evento = thisDayEvent[it];
var data = converteData(new Date(evento.dataInicio.substring(0, 10)));
var beginDiv = '<div class="block text-left borderB padding10">';
var endDiv = '</div>';
var content = '<a href="'+evento.url + '"><h4><strong>' + evento.title + '</strong></h4></a>' +
'Data: ' + data;
if (evento.local != null) {
content += '<br>Local: '+evento.local;
}
var texto = beginDiv+content+endDiv;
$('.div-calendario').append(texto);
}
$("#modal-calendario").modal({
show: true
})
},
time: "2020-09-27",
translateMonths: [
"Janeiro",
"Fevereiro",
"Março",
"Abril",
"Maio",
"Junho",
"Julho",
"Agosto",
"Setembro",
"Outubro",
"Novembro",
"Dezembro"
],
events: groupedData
});
});
});
jQuery("#container-id").owlCarousel(
{"nav":false,"dots":false,"autoplay":true,"autoplayTimeout":5000,"items":1,"loop":true}
);
var owl = $('.owl-carousel');
owl.owlCarousel();
$('.owlPrevBtn').click(function() {
owl.trigger('prev.owl.carousel', [500]);
});
$('.owlNextBtn').click(function() {
owl.trigger('next.owl.carousel', [500]);
});
var fonteOriginal = 14;
var teclas = 'ctrl+';
$(document).bind('keydown', teclas+'1', function(){
$('#linkMenu').trigger('click');
return false;
});
$(document).bind('keydown', teclas+'1', function(){
$('#linkMenu')[0].click();
return false;
});
$(document).bind('keydown', teclas+'2', function(){
$('#linkConteudo')[0].click();
return false;
});
$(document).bind('keydown', teclas+'3', function(){
$('#linkBusca')[0].click();
return false;
});
$(document).bind('keydown', teclas+'4', function(){
$('#linkMapaSite')[0].click();
return false;
});
$(document).bind('keydown', teclas+'5', function(){
$('#aumentarFonte')[0].click();
return false;
});
$(document).bind('keydown', teclas+'6', function(){
$('#diminuirFonte')[0].click();
return false;
});
$(document).bind('keydown', teclas+'7', function(){
$('#fonteOriginal')[0].click();
return false;
});
$(document).bind('keydown', teclas+'8', function(){
$('#corOriginal')[0].click();
return false;
});
$(document).bind('keydown', teclas+'9', function(){
$('#contraste')[0].click();
return false;
});
$(document).bind('keydown', teclas+'0', function(){
$('#acessibilidade')[0].click();
return false;
});
//link menu
$('#linkMenu').click(function(){
$('.btnMenu').trigger('click');
$('#acessibilidade').css('right',0);
});
//link busca
$("#linkBusca").click(function(){
$('#pesquisa').focus();
$('#pesquisa').val('');
$('#acessibilidade').css('right',0);
});
//aumentar fonte
$("#aumentarFonte").click(function(){
var tamanhoFonte = $('body').css('font-size');
tamanhoFonte = parseInt(tamanhoFonte.substr(0,2));
if (tamanhoFonte <= 16){
tamanhoFonte++;
$('body').css('font-size',tamanhoFonte);
}
return false;
});
//diminuit fonte
$("#diminuirFonte").click(function(){
var tamanhoFonte = $('body').css('font-size');
tamanhoFonte = parseInt(tamanhoFonte.substr(0,2));
if (tamanhoFonte >= 10) {
tamanhoFonte--;
$('body').css('font-size',tamanhoFonte);
}
return false;
});
$("#fonteOriginal").click(function(){
$('body').css('font-size',fonteOriginal);
return false;
});
$("#contraste").click(function(){
cssFile = $('#contrasteCSS');
if(!cssFile.attr('id')){
$('head').append('<link id="contrasteCSS" rel="stylesheet" href="/css/contraste.css" type="text/css" />');
}
$.cookie("css",'contraste', {expires: 365, path: '/'});
return false;
});
//remover contraste
$("#corOriginal").click(function(){
$('#contrasteCSS').remove();
$.cookie("css",'corOriginal', {expires: 365, path: '/'});
return false;
});
if($.cookie("css")) {
$('#'+$.cookie("css")).trigger('click');
}
});</script>]]>
|