Últimas Notícias
Direitos Humanos
Número de crianças vítimas de acidente de trabalho cresceu 30% em 2020
var imageDescription = $('#bau-photos-list li:eq(' + currentSlide + ') img').attr('data-desc'); return { imageTitle, imageSource, imageDescription }; }; function setFacebookShareAttributes(slider) { var image = getImgAttributes(slider.getCurrentSlide()); $('#bt-fb-bau').attr({ 'data-title': image.imageTitle, 'data-image': image.imageSource, 'data-desc': image.imageDescription }); }; function setTwitterShareAttributes(slider) { var image = getImgAttributes(slider.getCurrentSlide()); var url = window.location.href; $('#bt-tw-bau').attr('href', 'https://twitter.com/intent/tweet?text=' + image.imageTitle + '&url=' + url); }; function hideAllElements(element) { element.each(function(index, el) { $(el).removeClass('animate'); }); } $(document).ready(function() { // $('html, body').on('click', function(e) { // e.stopPropagation(); // if (!$(e.toElement).is('[data-action]')) { // hideAllElements($('.share-buttons-animate')); // } // }); $('[data-action="toggle-share-options"]').on('click', function() { $(this).prev('.share-buttons-animate').toggleClass('animate'); }); $('.share-bt-twitter').on('click', function(event) { event.preventDefault(); var url = this.href; ShareModal(url, 'twitter'); }); $('.share-bt-gplus').on('click', function(event) { event.preventDefault(); var url = this.href; ShareModal(url, 'Google+'); }); $('.share-bt-face').on('click', function(e) { event.preventDefault(); var title = $(this).attr('data-title'), desc = $(this).attr('data-desc'), url = $(this).attr('href'), image = $(this).attr('data-image'); postToFeed(title, desc, url, image); return false; }); });