tag on yout theme's header.php
Read the detailed step-by-step at https://humbertosilva.com/visual-composer-infinite-image-carousel/
*/
// auxiliary code to create triggers for the add and remove class for later use
(function($){
$.each(["addClass","removeClass"],function(i,methodname){
var oldmethod = $.fn[methodname];
$.fn[methodname] = function(){
oldmethod.apply( this, arguments );
this.trigger(methodname+"change");
return this;
}
});
})(jQuery);
// main function for the infinite loop
function vc_custominfiniteloop_init(vc_cil_element_id){
var vc_element = '#' + vc_cil_element_id; // because we're using this more than once let's create a variable for it
window.maxItens = jQuery(vc_element).data('per-view'); // max visible items defined
window.addedItens = 0; // auxiliary counter for added itens to the end
// go to slides and duplicate them to the end to fill space
jQuery(vc_element).find('.vc_carousel-slideline-inner').find('.vc_item').each(function(){
// we only need to duplicate the first visible images
if (window.addedItens < window.maxItens) {
if (window.addedItens == 0 ) {
// the fisrt added slide will need a trigger so we know it ended and make it "restart" without animation
jQuery(this).clone().addClass('vc_custominfiniteloop_restart').removeClass('vc_active').appendTo(jQuery(this).parent());
} else {
jQuery(this).clone().removeClass('vc_active').appendTo(jQuery(this).parent());
}
window.addedItens++;
}
});
// add the trigger so we know when to "restart" the animation without the knowing about it
jQuery('.vc_custominfiniteloop_restart').bind('addClasschange', null, function(){
// navigate to the carousel element , I know, its ugly ...
var vc_carousel = jQuery(this).parent().parent().parent().parent();
// first we temporarily change the animation speed to zero
jQuery(vc_carousel).data('vc.carousel').transition_speed = 0;
// make the slider go to the first slide without animation and because the fist set of images shown
// are the same that are being shown now the slider is now "restarted" without that being visible
jQuery(vc_carousel).data('vc.carousel').to(0);
// allow the carousel to go to the first image and restore the original speed
setTimeout("vc_cil_restore_transition_speed('"+jQuery(vc_carousel).prop('id')+"')",100);
});
}
// restore original speed setting of vc_carousel
function vc_cil_restore_transition_speed(element_id){
// after inspecting the original source code the value of 600 is defined there so we put back the original here
jQuery('#' + element_id).data('vc.carousel').transition_speed = 600;
}
// init
jQuery(document).ready(function(){
// find all vc_carousel with the defined class and turn them into infine loop
jQuery('.vc_custominfiniteloop').find('div[data-ride="vc_carousel"]').each(function(){
// allow time for the slider to be built on the page
// because the slider is "long" we can wait a bit before adding images and events needed
var vc_cil_element = jQuery(this).prop("id");
if (window.innerWidth <= 480) {
// jQuery(vc_element).attr('data-per-view',1);
jQuery('.vc_item').each(function(){
this.style.width = '25%'
this.style.height = 'auto'
})
} else {
setTimeout("vc_custominfiniteloop_init('"+vc_cil_element+"')",2000);
}
});
});
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TZHJ474');
var interval1 = setInterval(function(){
//console.log('ou no interval');
jQuery('.box-news .vc_gitem-zone-a').each(function() {
if((!jQuery(this).css('background-image').includes('vc_gitem_image'))) {
jQuery(this).css('background-image','none')
}
})
jQuery('.box-news .vc_gitem-zone-a a').each(function() {
jQuery(this).attr('data-hover','Leia mais')
})
}, 1000);
setTimeout(function() {
clearInterval(interval1);
},5000);
@font-face {
font-family: "FontAwesome";
src: url("/local/fonts/fa-brands-400.eot"),
url("/local/fonts/fa-brands-400.eot?#iefix") format("embedded-opentype"),
url("/local/fonts/fa-brands-400.woff2") format("woff2"),
url("/local/fonts/fa-brands-400.woff") format("woff"),
url("/local/fonts/fa-brands-400.ttf") format("truetype"),
url("/local/fonts/fa-brands-400.svg#fontawesome") format("svg");
}
@font-face {
font-family: "FontAwesome";
src: url("/local/fonts/fa-solid-900.eot"),
url("/local/fonts/fa-solid-900.eot?#iefix") format("embedded-opentype"),
url("/local/fonts/fa-solid-900.woff2") format("woff2"),
url("/local/fonts/fa-solid-900.woff") format("woff"),
url("/local/fonts/fa-solid-900.ttf") format("truetype"),
url("/local/fonts/fa-solid-900.svg#fontawesome") format("svg");
}
@font-face {
font-family: "FontAwesome";
src: url("/local/fonts/fa-regular-400.eot"),
url("/local/fonts/fa-regular-400.eot?#iefix") format("embedded-opentype"),
url("/local/fonts/fa-regular-400.woff2") format("woff2"),
url("/local/fonts/fa-regular-400.woff") format("woff"),
url("/local/fonts/fa-regular-400.ttf") format("truetype"),
url("/local/fonts/fa-regular-400.svg#fontawesome") format("svg");
unicode-range: U+F004-F005,U+F007,U+F017,U+F022,U+F024,U+F02E,U+F03E,U+F044,U+F057-F059,U+F06E,U+F070,U+F075,U+F07B-F07C,U+F080,U+F086,U+F089,U+F094,U+F09D,U+F0A0,U+F0A4-F0A7,U+F0C5,U+F0C7-F0C8,U+F0E0,U+F0EB,U+F0F3,U+F0F8,U+F0FE,U+F111,U+F118-F11A,U+F11C,U+F133,U+F144,U+F146,U+F14A,U+F14D-F14E,U+F150-F152,U+F15B-F15C,U+F164-F165,U+F185-F186,U+F191-F192,U+F1AD,U+F1C1-F1C9,U+F1CD,U+F1D8,U+F1E3,U+F1EA,U+F1F6,U+F1F9,U+F20A,U+F247-F249,U+F24D,U+F254-F25B,U+F25D,U+F267,U+F271-F274,U+F279,U+F28B,U+F28D,U+F2B5-F2B6,U+F2B9,U+F2BB,U+F2BD,U+F2C1-F2C2,U+F2D0,U+F2D2,U+F2DC,U+F2ED,U+F328,U+F358-F35B,U+F3A5,U+F3D1,U+F410,U+F4AD;
}
jQuery(document).ready(function(){
jQuery('.single-item').slick({
centerMode: true,
centerPadding: '60px',
slidesToShow: 5,
variableWidth: true,
autoplay: true,
autoplaySpeed: 2000,
responsive: [
{
breakpoint: 768,
settings: {
arrows: false,
centerMode: true,
centerPadding: '40px',
slidesToShow: 3
}
},
{
breakpoint: 520,
settings: {
arrows: false,
centerMode: true,
centerPadding: '40px',
slidesToShow: 1
}
}
]
});
});
.single-item img {
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
}
.single-item img:hover {
-webkit-filter: grayscale(0);
filter: grayscale(0);
}
422n14
Tracing Anti-deforestation Enforcement in the Brazilian Amazon (MITGOV/LAB) 5u379
A Q&A with Clemente Sanchez, MIT PhD Candidate in Political Science and MIT GOV/LAB Graduate Fellow, about his field research in Brazil.
MIT GOV/LAB is committed to ing MIT graduate students conducting original field research and data collection on MIT GOV/LAB topics and themes of interest. One way we students is through our seed grant program that enables students to conduct their research.
We spoke with Clemente Sanchez, a PhD candidate from the Department of Political Science about his experience conducting fieldwork in the Brazilian Amazon. His main research interests revolve around environmental enforcement, bureaucratic politics, and contemporary state building.
MIT GOV/LAB: Can you talk about how you spent this past summer?
I spent most of the summer in the city of Belém, the capital of the Brazilian state of Pará and second biggest city in the Amazon region. I was there working with a local organization called Imazon, which is one of the main non-governmental institutions that monitors deforestation in the Brazilian Amazon. Specifically, I worked with the teams that contribute to the MapBiomas Alerta initiative, as well as the PrevisIA project. MapBiomas Alerta cross-references deforestation events with official permits and enforcement actions in order to keep track of illegal activity that goes unpunished. On the other hand, PrevisIA manages an artificial intelligence model that seeks to predict future patterns of deforestation. With from these teams, I conducted a series of spatial and statistical analyses to identify broad patterns of where enforcement is taking place, which would allow us to assess its efficiency and effectiveness. In addition to these activities, I also conducted interviews with bureaucrats in federal and state-level environmental agencies in the cities of Belém, Parauapebas, and Macapá to better understand their experience with environmental protection in the region.
MIT GOV/LAB: What drew you to look into these topics in more detail?
In general, the economics literature on deforestation has found that enforcement that prioritizes the most pressing instances of lawbreaking—what we usually call “targeted enforcement” as opposed to a more all-encoming approach—is a cost-effective approach at curbing deforestation. However, it is less clear to what degree enforcement tends to prioritize these cases to begin with. Therefore, some descriptive patterns of where enforcement is more likely to take place could speak to whether authorities are using their limited resources in an efficient fashion. Thanks to my partnership with Imazon, I found that enforcement usually takes place in the cases that authorities say they prioritize: after large deforestation events, in conservation areas, and areas where there was already a higher deforestation risk. In that sense, the stated policy goals and reality on the ground do not seem to be that far off. Though these were encouraging results, slightly less positive news came from an analysis on the effectiveness of enforcement. It turns out that most areas that are embargoed for engaging in deforestation without proper permits see no secondary growth afterwards, which is concerning.
MIT GOV/LAB: How does this tie in with the rest of your dissertation?
This experience was crucial as a way of familiarizing myself with the main case study of my dissertation. My overarching goal is to understand the “internal” drivers of enforcement in the Brazilian Amazon, as opposed to “external” ones. Research on environmental politics—and the literature on enforcement more broadly—tends to focus on the role of politicians, activists, businesses, and others. However, I think this obscures the role that bureaucrats themselves play; after all, they are the ones responsible for enforcement. In a context shaped by strong civil service protections and relative autonomy from politics, what actors inside the state think will be crucial for shaping enforcement. In line with that, with from MIT GOV/LAB I was able to interview bureaucrats to understand their experience on the job. I am still working through this material, but these interviews were crucial for getting an initial sense of the challenges that these actors face on their day-to-day.
Left: Ipê tree near Santa Bárbara, Pará. Right: Imazon and MISTI teams. From left to right: Carlos Souza, Paulo Amaral, Rosabelli Coelho, and Clemente Sanchez. Photos courtesy Clemente Sanchez.
MIT GOV/LAB: If you had one piece of advice for students planning to do fieldwork what would it be?
My advice would be that while it is important to plan things in advance, a lot of my most insightful interviews happened serendipitously. If you are not having any luck reaching out to people over email or WhatsApp, my advice is to simply show up in person and ask to speak with someone. While this might not fly in more formal settings (I would not attempt this in Brasilia), in other areas people are much more laid back and willing to accommodate foreign researchers. So just show up, and hope for the best!
MIT GOV/LAB: What was your favorite thing about Belém?
If I had to name one thing, I would have to say the food. It is absolutely delicious. I am a huge fan of fried fish in all its forms, but the Pirarucu has become my favorite fish preparation by far. I am also a huge fan of the rest of the regional cuisine, which includes a lot of crab (my favorite preparation was the unha de carangueijo), vatapá (a shrimp stew), and tacacá (a soup that includes shrimp and a local herb called jambú, which leaves your mouth feeling a little numb afterwards). Special mention goes to the traditional way of consuming açaí, which is not as a dessert, but rather as a side dish mixed in with mandioca flour, which complements fried fish perfectly.