1722
| <![CDATA[<script>
(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-55157016-1', 'auto');
ga('send', 'pageview');
</script>]]>
|
1733
| <![CDATA[<script type="text/javascript">
$(document).ready(function(){
if($('.galeria-abrir').length > 0){
setTimeout(function(){
$('.galeria-abrir').trigger('click');
console.log('click');
}, 500);
}
$('a[href="#ver-album"]').click(function(){
$(this).parent().find('.link-galeria1').trigger('click');
});
$('#load_more').click(function(){
BloqueiaTela.open();
var ids = new Array();
$('.bloco-galeria').each(function(){
ids.splice(1, 0, $(this).attr('data-id'));
});
$.ajax({
type: "POST",
url: 'http://www.carlosbarbosa.rs.gov.br/ajax/galerias/carregar-mais',
data: {ids: ids}
}).done(function(data){
var html = '';
for(i in data){
html = '<div class="bloco-galeria" data-id="'+data[i].galeria.id+'">'+
'<a href="http://www.carlosbarbosa.rs.gov.br/contents/galerias/g/'+data[i].capa.link+'" rel="galeria-'+data[i].galeria.id+'" class="link-galeria1 fancybox">'+
'<img src="http://www.carlosbarbosa.rs.gov.br/contents/galerias/m/'+data[i].capa.link+'"/></a>'+
'</a>';
for(n in data[i].imagens){
html += '<a class="fancybox" href="http://www.carlosbarbosa.rs.gov.br/contents/galerias/g/'+data[i].imagens[n].link+'" rel="galeria-'+data[i].galeria.id+'"></a>'
}
html += '<h2 class="tit-galeria">'+data[i].galeria.titulo+'</h2>'+
'<p class="data-galeria">'+data[i].data+'</p>'+
'<a href="#" class="link-galeria2 fancybox"><span>+</span>Ver álbum</a></div>';
$('.galerias').append(html);
}
BloqueiaTela.close();
});
});
});
</script>]]>
|