1var dataPost = {category:[]}; 2var targetContent; 3var videos; 4var marcas; 5var missao_valor_time; 6var missao_valor; 7var instagram_posts; 8var instagram_posts_teste; 9var snd = new Audio(); 10var sndID; 11 12const player = new Plyr('#player-elfa',{ 13 controls: ['play-large', 'play','fullscreen'] 14}); 15 16 17$(function() { 18 // if ($('#videoPrincipal').length > 0) { 19 var videoPrincipal=document.getElementById("videoPrincipal"); 20 $(videoPrincipal).on("click", function(e){ 21 videoPrincipal.muted = !videoPrincipal.muted; 22 $(".toggleVolumeBT i").toggleClass("fa-volume-xmark fa-volume-high active"); 23 }); 24 //} 25 26 $('#carouselHome').on('slide.bs.carousel', function (e) { 27 if ($('#videoPrincipal').length > 0) { 28 if(e.to != 0) videoPrincipal.muted = true; 29 $(".toggleVolumeBT i").attr("class", "fa-solid fa-volume-xmark"); 30 } 31 }); 32 33 $(".show-content-more").on('click',function(){ 34 $("#"+$(this).attr("rel")).animate({height: 'toggle'}); 35 }); 36 37 $(".show-text-on-mouseover").on('mouseenter',function(){ 38 $(".show-text-on-mouseover").removeClass('active'); 39 $(this).addClass('active'); 40 $("#text-show .content").hide(); 41 $("#text-show .content").html($("#"+$(this).attr("data-target")).html()).promise().done(function(){ 42 $("#text-show .content").fadeIn(); 43 }); 44 }); 45 46 if ($('#cultura-elfa .itens').length > 0) { 47 slideMissaoVisao(0); 48 } 49 50 Fancybox.bind('[data-fancybox]', { 51 // Custom options for all galleries 52 }); 53 54 marcas = $('#marcas .itens'); 55 marcas.owlCarousel({ 56 autoplay:true, 57 autoplayTimeout:4000, 58 autoplayHoverPause: true, 59 loop:true, 60 margin:0, 61 nav: false, 62 dots: false, 63 // animateOut: 'fadeOut', 64 responsive:{ 65 0:{ 66 items:2 67 }, 68 600:{ 69 items:4 70 }, 71 1000:{ 72 items:5 73 } 74 } 75 }); 76 77 $('#bt-marcas-next').click(function() { 78 marcas.trigger('next.owl.carousel'); 79 marcas.trigger('stop.owl.autoplay'); 80 marcas.trigger('play.owl.autoplay'); 81 }) 82 $('#bt-marcas-prev').click(function() { 83 marcas.trigger('prev.owl.carousel', [300]); 84 marcas.trigger('stop.owl.autoplay'); 85 marcas.trigger('play.owl.autoplay'); 86 }) 87 88 $(".atuacao-nav-opt a").click(function() { 89 targetContent = $(this).attr('data-target'); 90 $(".atuacao-nav-opt a").removeClass('active'); 91 $(this).addClass('active'); 92 $(".atuacao-nav-content .item").hide(); 93 $(".atuacao-nav-content .item[rel='"+targetContent+"']").fadeIn(); 94 }); 95 96 noticias = $('.noticias-relacionadas .itens'); 97 noticias.owlCarousel({ 98 autoplay:true, 99 autoplayTimeout:4000, 100 autoplayHoverPause: true, 101 loop:true, 102 margin: 55, 103 nav: false, 104 dots: false, 105 // animateOut: 'fadeOut', 106 responsive:{ 107 0:{ 108 items:1 109 }, 110 600:{ 111 items:2 112 }, 113 1000:{ 114 items:3 115 } 116 } 117 }); 118 119 /* 120 missao_valor = $('#cultura-elfa .itens'); 121 missao_valor.owlCarousel({ 122 autoplay:true, 123 autoplayTimeout:3000, 124 // autoplayHoverPause: true, 125 loop:true, 126 margin: 55, 127 nav: false, 128 dots: false, 129 // animateOut: 'fadeOut', 130 responsive:{ 131 0:{ 132 items:2 133 }, 134 600:{ 135 items:2 136 }, 137 1000:{ 138 items:2 139 } 140 } 141 }); 142 */ 143 144 instagram_posts = $('#instagram_posts .itens'); 145 instagram_posts.owlCarousel({ 146 autoplay:true, 147 autoplayTimeout:4000, 148 autoplayHoverPause: true, 149 loop:true, 150 margin:0, 151 nav: false, 152 dots: false, 153 // animateOut: 'fadeOut', 154 responsive:{ 155 0:{ 156 items:1 157 }, 158 600:{ 159 items:4 160 }, 161 1000:{ 162 items:5 163 } 164 } 165 }); 166 167 instagram_posts_teste = $('#instagram_posts_teste #sbi_images'); 168 instagram_posts.owlCarousel({ 169 autoplay:true, 170 autoplayTimeout:4000, 171 autoplayHoverPause: true, 172 loop:true, 173 margin:0, 174 nav: false, 175 dots: false, 176 // animateOut: 'fadeOut', 177 responsive:{ 178 0:{ 179 items:1 180 }, 181 600:{ 182 items:4 183 }, 184 1000:{ 185 items:5 186 } 187 } 188 }); 189 190 function instagram_postsClasses() { 191 instagram_posts.each(function() { 192 var total = $(this).find('.owl-item.active').length; 193 $(this).find('.owl-item').removeClass('firstactiveitem'); 194 $(this).find('.owl-item').removeClass('lastactiveitem'); 195 $(this).find('.owl-item.active').each(function(index) { 196 if (index === 0) { 197 $(this).addClass('firstactiveitem') 198 } 199 if (index === total - 1 && total > 1) { 200 $(this).addClass('lastactiveitem') 201 } 202 }) 203 }) 204 } 205 instagram_postsClasses(); 206 instagram_posts.on('translated.owl.carousel', function(event) { 207 instagram_postsClasses() 208 }); 209 210 $('#bt-instagram-next').click(function() { 211 instagram_posts.trigger('next.owl.carousel'); 212 instagram_posts.trigger('stop.owl.autoplay'); 213 instagram_posts.trigger('play.owl.autoplay'); 214 }) 215 $('#bt-instagram-prev').click(function() { 216 instagram_posts.trigger('prev.owl.carousel', [300]); 217 instagram_posts.trigger('stop.owl.autoplay'); 218 instagram_posts.trigger('play.owl.autoplay'); 219 }) 220 221 $('[placeholder]').focus(function() { 222 var input = $(this); 223 if (input.val() == input.attr('placeholder')) { 224 input.val(''); 225 input.removeClass('placeholder'); 226 } 227 }).blur(function() { 228 var input = $(this); 229 if ( (input.val() == '') || (input.val()) == input.attr('placeholder')) { 230 input.addClass('placeholder'); 231 input.val(input.attr('placeholder')); 232 } 233 }).blur(); 234 235 $('[placeholder]').parents('form').submit(function() { 236 $(this).find('[placeholder]').each(function() { 237 var input = $(this); 238 if (input.val() == input.attr('placeholder')) { 239 input.val(''); 240 } 241 }); 242 }); 243
244 $(".bt-menu-mobile").click(function(){ 245 $("aside#menu-side nav").toggleClass("show"); 246 $("body,main").toggleClass("no-scroll"); 247 //$(this).find("i").toggleClass("fa-times"); 248 }); 249 250 $("#hide-search-box,#show-search-box").click(function(){ 251 $(".search-box").toggleClass("none"); 252 }); 253 254}); 255 256function scrollPage(obj){ 257 var target = $(obj).attr("href"); 258 var rel = $(obj).attr("rel"); 259 if(target == undefined){ 260 target = obj; 261 } 262 if(rel == "select-plano"){ 263 var p = $(obj).parent().find("h3").text(); 264 $("#plano-selecionado").val(p); 265 } 266 $(obj).addClass("ativo"); 267 $('html,body').animate({ 268 scrollTop: $(target).offset().top+5 269 }, 270 { 271 duration: 1000, 272 specialEasing: { 273 scrollTop: "easeInOutCubic" 274 }, 275 }, 800); 276 277 event.preventDefault(); 278 return false; 279} 280 281function goTo(url){ 282 window.location = url; 283} 284 285function WordCount(str) { 286 var c = str.toString().split(" ").length; 287 return c; 288} 289 290function validaForm(){ 291 var err = 0; 292 $("input,select").removeClass("error_field"); 293 $("form #dados input, form #dados select").each(function(){ 294 var v = $(this).val(), n = $(this).attr("name"), t = v.length, p = $(this).attr("placeholder"); 295 if(t <= 2 || v == p || v == 0){ 296 // console.log(n+" > "+v+" > "+t); 297 err++; 298 $(this).addClass("error_field"); 299 }else{ 300 301 } 302 }); 303 if(err>0){ 304 swal("Oops!", "Preencha todos os dados corretamente!", "error"); 305 scrollPage('#dados'); 306 }else{ 307 var dados = $('form').serialize(); 308 swal("Enviando...", { 309 button: false, 310 closeOnClickOutside: false, 311 }); 312 313 var dados_envio = { 314 'cadastro_nonce': js_global.cadastro_nonce, 315 'dados': dados, 316 'categorias' : dataPost.category, 317 'action': 'cadastro' 318 } 319 $.ajax({ 320 url: js_global.xhr_url, 321 type: 'POST', 322 data: dados_envio, 323 dataType: 'html', 324 success: function(response) { 325 if(response == 100){ 326 $("form")[0].reset(); 327 $("#categorias .item").removeClass("selected"); 328 $("input,select").removeClass("error_field"); 329 swal("Obrigado!", "Sua participação vai ajudar a construir O Melhor para João Pessoa!", "success"); 330 }else{ 331 swal("Oops!", response, "error"); 332 } 333 } 334 }); 335 } 336} 337 338function PlaySound(obj){ 339 id = $(obj).attr("id"); 340 $(".sound-btn").find("i").removeClass("fa-stop-circle"); 341 if($(obj).hasClass("playing")){ 342 snd.pause(); 343 $(obj).removeClass("playing"); 344 }else{ 345 if(id != sndID){ 346 $(".sound-btn").removeClass("playing"); 347 } 348 url = $(obj).attr("rel"); 349 snd.src = url; 350 snd.play(); 351 $(obj).find("i").addClass("fa-stop-circle"); 352 $(obj).addClass("playing"); 353 sndID = id; 354 } 355} 356 357function showvideo(obj){ 358 scrollPage("#videos"); 359 var id = $(obj).attr("data-id"); 360 var title = $(obj).attr("data-title"); 361 $("#video-show iframe").attr("src","https://www.youtube.com/embed/"+id+"?autoplay=1") 362 $("#video-show h2").html(title); 363} 364 365function scrollPage(obj){ 366 var target = $(obj).attr("href"); 367 var rel = $(obj).attr("rel"); 368 if(target == undefined){ 369 target = obj; 370 } 371 if(rel == "select-plano"){ 372 var p = $(obj).parent().find("h3").text(); 373 $("#plano-selecionado").val(p); 374 } 375 $(obj).addClass("ativo"); 376 $('html,body').animate({ 377 scrollTop: $(target).offset().top-10 378 }, 379 { 380 duration: 1000, 381 specialEasing: { 382 scrollTop: "easeInOutCubic" 383 }, 384 }, 800); 385 386 event.preventDefault(); 387 return false; 388} 389 390function toggleVolume(videoID){ 391 var video = document.getElementById(videoID); 392 video.muted = !video.muted; 393 $(".toggleVolumeBT i").toggleClass("fa-volume-xmark fa-volume-high active"); 394} 395 396function slideMissaoVisao(i){ 397 clearTimeout(missao_valor_time); 398 $("#cultura-elfa .itens .item").removeClass("active"); 399 $("#cultura-elfa .itens .item").eq(i).addClass("active"); 400 missao_valor_time = window.setTimeout( 401 function() { 402 i = (i == 0) ? 1 : 0; 403 slideMissaoVisao(i); 404 }, 9000); 405} 406 407$(document).ready(function(){ 408 $("#nossos-diferenciais .show-text-on-mouseover[data-target='compromisso']").addClass('active'); 409});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.