1"use strict"; 2/* ------------------------------------- 3 CUSTOM FUNCTION WRITE HERE 4-------------------------------------- */ 5$(document).ready(function() { 6 7 $('#map').addClass('scrolloff'); // set the mouse events to none when doc is ready 8 9 $('#overlay').on("mouseup",function(){ // lock it when mouse up 10 $('#map').addClass('scrolloff'); 11 //somehow the mouseup event doesn't get call... 12 }); 13 $('#overlay').on("mousedown",function(){ // when mouse down, set the mouse events free 14 $('#map').removeClass('scrolloff'); 15 }); 16 17 $("#map").mouseleave(function () { // becuase the mouse up doesn't work... 18 $('#map').addClass('scrolloff'); // set the pointer events to none when mouse leaves the map area 19 // or you can do it on some other event 20 }); 21 22 // ---------- Sticky ---------- // 23 $(".sticky-1, .sticky-2").sticky({topSpacing: 0}); 24 // ---------- Sticky ---------- // 25 26 // ------- Scroll to Top ------- // 27 $(window).scroll(function () { 28 if ($(this).scrollTop() > 1000) { 29 $('#scrollup').fadeIn(); 30 } else { 31 $('#scrollup').fadeOut(); 32 } 33 }); 34 $('#scrollup').on('click', function () { 35 $("html, body").animate({ 36 scrollTop: 0 37 }, 1000); 38 return false; 39 }); 40 // ------- Scroll to Top ------- // 41 42 // ------- Auto height function ------- // 43 var setElementHeight = function() { 44 var width = $(window).width(); 45 /*if ($('.tg-hero-slider li img') >= height) {*/ 46 var height = $(window).height(); 47 $('.fullscreen').css('height', (height)); 48 } 49 // else { 50 // $('.autoheight').css('min-height', (800)); 51 // } 52 //}; 53 $(window).resize(function() { 54 setElementHeight(); 55 }).resize(); 56 // ------- Auto height function ------- // 57 58 // ---------- Banner Slider ---------- // 59 $('#banner-slider').owlCarousel({ 60 items: 1, 61 nav: true, 62 dots: true, 63 // loop:true, 64 autoplay:true, 65 autoplayTimeout:8000, 66 autoplayHoverPause:true 67 }); 68 // ---------- Banner Slider ---------- // 69 70 $('#tg-filterbale-nav').owlCarousel({ 71 margin:2, 72 autoWidth:true, 73 items:4, 74 nav: true, 75 dots: false, 76 loop:true 77 // autoplay:true, 78 // autoplayTimeout:8000, 79 // autoplayHoverPause:true 80 }); 81 82 // ---------- Enquiry Form ---------- // 83 // $('.enquiry-form-holder .bars-icon').on('click', function() { 84 // $('.enquiry-form-holder').toggleClass("in-hieght"); 85 // }); 86 // ---------- Enquiry Form ---------- // 87 88 // ---------- Wow Animation ---------- // 89 // var wow = new WOW({ 90 // boxClass: 'animate', 91 // animateClass: 'animated', 92 // offset: 100, 93 // mobile: false 94 // }); 95 // wow.init(); 96 // ---------- Wow Animation ---------- // 97 98 // ---------- slider Post ---------- // 99 $('#slider-post').owlCarousel({ 100 items: 1, 101 nav: true, 102 loop: true, 103 dots: false, 104 smartSpeed: 450 105 }); 106 // ---------- slider Post ---------- // 107 108 // ------- Full Page Search Bar ------- // 109 $('a[href="#search"]').on('click', function(event) { 110 event.preventDefault(); 111 $('#search').addClass('open'); 112 $('#search > form > input[type="search"]').focus(); 113 }); 114 $('#search, #search button.close').on('click', function(event) { 115 if (event.target == this || event.target.className == 'close' || event.keyCode == 27) { 116 $(this).removeClass('open'); 117 } 118 }); 119 //Do not include! This prevents the form from submitting for DEMO purposes only! 120 // $('form').submit(function(event) { 121 // event.preventDefault(); 122 // return false; 123 // }); 124 // ------- Full Page Search Bar ------- // 125 126 // ------- MODAL BOX ------- // 127 $('a.modal-box-iesp').on('click', function(event) { 128 event.preventDefault(); 129 var url = $(this).attr("href"); 130 $(url).addClass('open'); 131 $("body").addClass("modal-iesp-open"); 132 // $('#search > form > input[type="search"]').focus(); 133 }); 134 $('.modal-iesp button.close').on('click', function(event) { 135 if (event.target == this || event.target.className == 'close' || event.keyCode == 27) { 136 $('.modal-iesp').removeClass('open'); 137 $("body").removeClass("modal-iesp-open"); 138 } 139 }); 140 // ------- MODAL BOX ------- // 141 142 143 // // ------- Color Picker ------- // 144 // $('.chose-color').colorpicker(); 145 // // ------- Color Picker ------- // 146 147 // ------- Service Slider ------- // 148 $('#services-slider').owlCarousel({ 149 loop:true, 150 margin:30, 151 nav:true, 152 dots: false, 153 smartSpeed:200, 154 responsiveClass:true, 155 responsive:{ 156 0:{ items:1}, 157 320:{ items:1}, 158 480:{ items:1}, 159 640:{ items:2}, 160 768:{ items:2}, 161 800:{ items:2}, 162 960:{ items:2}, 163 991:{ items:2}, 164 1024:{ items:3}, 165 1199:{ items:3} 166 } 167 }) 168 // ------- Service Slider ------- // 169 170 // ------- Service V2 Slider ------- // 171 $('.service-v2-slider').owlCarousel({ 172 loop:true, 173 margin:30, 174 nav:false, 175 dots: false, 176 smartSpeed:200, 177 responsiveClass:true, 178 responsive:{ 179 0:{ items:1}, 180 320:{ items:1}, 181 480:{ items:1}, 182 640:{ items:2}, 183 768:{ items:2}, 184 800:{ items:2}, 185 960:{ items:3}, 186 991:{ items:3}, 187 1024:{ items:4}, 188 1199:{ items:4} 189 } 190 }) 191 // ------- Service V2 Slider ------- // 192 193 // ------- Service Slider ------- // 194 $('#brand-icons-slider').owlCarousel({ 195 loop:true, 196 margin:30, 197 nav:false, 198 dots: false, 199 autoplay: true, 200 smartSpeed:200, 201 responsiveClass:true, 202 responsive:{ 203 0:{ items:1}, 204 320:{ items:1}, 205 480:{ items:2}, 206 640:{ items:2}, 207 768:{ items:3}, 208 800:{ items:4}, 209 960:{ items:4}, 210 1200:{ items:4} 211 } 212 }) 213 // ------- Service Slider ------- // 214 215 // ------- Product Slider ------- // 216 $('#bags-slider').owlCarousel({ 217 loop:true, 218 margin:30, 219 nav:true, 220 dots: false, 221 smartSpeed:200, 222 responsiveClass:true, 223 responsive:{ 224 0:{ items:1}, 225 320:{ items:1}, 226 480:{ items:2}, 227 640:{ items:2}, 228 768:{ items:2}, 229 800:{ items:3}, 230 991:{ items:3}, 231 1200:{ items:4} 232 } 233 }) 234 // ------- Product Slider ------- // 235 236 // ------- Product Slider ------- // 237 $('#uniform-slider').owlCarousel({ 238 loop:true, 239 margin:30, 240 nav:true, 241 dots: false, 242 smartSpeed:200, 243 responsiveClass:true, 244 responsive:{ 245 0:{ items:1}, 246 320:{ items:1}, 247 480:{ items:2}, 248 640:{ items:2}, 249 768:{ items:2}, 250 800:{ items:3}, 251 991:{ items:3}, 252 1200:{ items:4} 253 } 254 }) 255 // ------- Product Slider ------- // 256 257 // ------- Product Slider ------- // 258 $('#other-products').owlCarousel({ 259 loop:true, 260 margin:30, 261 nav:true, 262 dots: false, 263 smartSpeed:200, 264 responsiveClass:true, 265 responsive:{ 266 0:{ items:1}, 267 320:{ items:1}, 268 480:{ items:2}, 269 640:{ items:2}, 270 768:{ items:2}, 271 800:{ items:3}, 272 991:{ items:3}, 273 1200:{ items:4} 274 } 275 }) 276 // ------- Product Slider ------- // 277 278 // ------- Team Slider ------- // 279 // $('#team-slider').owlCarousel({ 280 // loop:true, 281 // margin:30, 282 // nav:true, 283 // dots: false, 284 // smartSpeed:200, 285 // responsiveClass:true, 286 // responsive:{ 287 // 0:{ items:1}, 288 // 320:{ items:1}, 289 // 480:{ items:2}, 290 // 640:{ items:2}, 291 // 768:{ items:2}, 292 // 800:{ items:2}, 293 // 960:{ items:2}, 294 // 991:{ items:2}, 295 // 1024:{ items:3}, 296 // 1200:{ items:3} 297 // } 298 // }) 299 // ------- Team Slider ------- // 300 301 // ------- Team Slider ------- // 302 $('#testimonial-slider').owlCarousel({ 303 loop:true, 304 margin:30, 305 nav:true, 306 dots: false, 307 smartSpeed:200, 308 responsiveClass:true, 309 responsive:{ 310 0:{ items:1}, 311 320:{ items:1}, 312 480:{ items:1, nav: false}, 313 640:{ items:2}, 314 768:{ items:2}, 315 800:{ items:2}, 316 960:{ items:2}, 317 991:{ items:2}, 318 1024:{ items:3}, 319 1200:{ items:3} 320 } 321 }) 322 // ------- Team Slider ------- // 323 324 // ------- Thumbnail Slider Vertical ------- // 325 $("#product-tumbnail-slider").owlCarousel({ 326 loop: true, 327 autoplay: true, 328 items: 1, 329 nav: true, 330 autoplayHoverPause: true, 331 animateOut: 'slideOutUp', 332 animateIn: 'slideInUp', 333 dots: false, 334 }); 335 // ------- Thumbnail Slider Vertical ------- // 336 337 // ------- Team Slider ------- // 338 $('#team-slider-thumnail').owlCarousel({ 339 loop:true, 340 margin:30, 341 nav:true, 342 dots: false, 343 smartSpeed:200, 344 responsiveClass:true, 345 responsive:{ 346 0:{ items:1}, 347 320:{ items:1}, 348 480:{ items:3}, 349 640:{ items:3}, 350 768:{ items:2}, 351 800:{ items:3}, 352 960:{ items:3}, 353 1200:{ items:4} 354 } 355 }) 356 // ------- Team Slider ------- // 357 358 // ------- Time Counter ------- // 359 $('#countdown-1, #countdown-2, #countdown-3, #countdown-4, #countdown-5, #countdown-6').countdown({ 360 date: '3/30/2016 2:17:59', 361 offset: -2100, 362 day: 'Day', 363 days: 'Days' 364 }, function() { 365 // alert('Done!'); 366 }); 367 368 $(".form-buscar").submit(function(){ 369 var termo = $(".form-buscar input[name=termo]").val(); 370 371 if(termo){ 372 var busca = termo.toLowerCase().replace(/ /g, "+"); 373 window.location.replace("busca/"+busca); 374 } else { 375 $(".form-buscar input[name=busca]").addClass("error"); 376 } 377 return false;
378 }); 379 380 // ------- Time Counter ------- // 381 // $('#evento_1').countdown({ 382 // date: '10/30/2016 10:30:00', 383 // day: 'Dia', 384 // days: 'Dias' 385 // }, function() { 386 // // alert('Done!'); 387 // }); 388 389 // $('#evento_2').countdown({ 390 // date: '11/22/2016 10:30:00', 391 // day: 'Dia', 392 // days: 'Dias' 393 // }, function() { 394 // // alert('Done!'); 395 // }); 396 // ------- Time Counter ------- // 397 398 // ------- Counter ------- // 399 try { 400 $('#tc-counters').appear(function() { 401 setTimeout(function() { 402 odometer1.innerHTML = 2000; 403 }, 0); 404 setTimeout(function() { 405 odometer2.innerHTML = 1000; 406 }, 0); 407 setTimeout(function() { 408 odometer3.innerHTML = 188; 409 }, 0); 410 setTimeout(function() { 411 odometer4.innerHTML = 200; 412 }, 0); 413 }); 414 } catch (err) {} 415 // ------- Counter ------- // 416 417 // ------- Google Map ------- // 418 // $("#location-map").gmap3({ 419 // marker: { 420 // address: "Haltern am See, Weseler Str. 151" 421 // }, 422 // map: { 423 // options: { 424 // zoom: 16, 425 // scrollwheel: false, 426 // } 427 // }, 428 // }); 429 // ------- Google Map ------- // 430 431 // ------- Google Map ------- // 432 // $("#contact-map").gmap3({ 433 // marker: { 434 // address: "Haltern am See, Weseler Str. 151" 435 // }, 436 // map: { 437 // options: { 438 // zoom: 16, 439 // scrollwheel: false, 440 // } 441 // }, 442 // }); 443 // ------- Google Map ------- // 444 445 // ------- Accodian ------- // 446 $(".panel-heading").addClass("collapsed"); 447 // ------- Accodian ------- // 448 449 // ------- Prety Photo ------- // 450 $("a[data-rel]").each(function() { 451 $(this).attr("rel", $(this).data("rel")); 452 }); 453 $("a[data-rel^='prettyPhoto']").prettyPhoto({ 454 animation_speed: 'normal', 455 slideshow: 1000, 456 autoplay_slideshow: false, 457 social_tools: false, 458 deeplinking: false 459 }); 460 // ------- Prety Photo ------- // 461 462 // ------- Video ------- // 463 // $(".youtube").each(function() { 464 // // Based on the YouTube ID, we can easily find the thumbnail image 465 // $(this).css('background-image', +this.id + '/sddefault.jpg)'); 466 467 // // Overlay the Play icon to make it look like a video player 468 // $(this).append($('<div/>', { 469 // 'class': 'play' 470 // })); 471 472 // $(document).delegate('#' + this.id, 'click', function() { 473 // // Create an iFrame with autoplay set to true 474 // var iframe_url = "https://www.youtube.com/embed/" + this.id + "?autoplay=1&autohide=1"; 475 // if ($(this).data('params')) iframe_url += '&' + $(this).data('params'); 476 477 // // The height and width of the iFrame should be the same as parent 478 // var iframe = $('<iframe/>', { 479 // 'frameborder': '0', 480 // 'src': iframe_url, 481 // 'width': $(this).width(), 482 // 'height': $(this).height() 483 // }) 484 485 // // Replace the YouTube thumbnail with YouTube HTML5 Player 486 // $(this).replaceWith(iframe); 487 // }); 488 // }); 489 // ------- Video ------- // 490 491 // ------- Mesonary ------- // 492 var $container = $('.gallery-masonry'); 493 var $optionSets = $('.option-set'); 494 var $optionLinks = $optionSets.find('a'); 495 496 function doIsotopeFilter() { 497 if ($().isotope) { 498 var isotopeFilter = ''; 499 $optionLinks.each(function() { 500 var $this = $(this); 501 var selector = $(this).attr('data-filter'); 502 var link = window.location.href; 503 var firstIndex = link.indexOf('filter='); 504 if ($this.hasClass('selected')) { 505 // var id = link.substring(firstIndex + 7, link.length); 506 // if ('.' + id == selector) { 507 isotopeFilter = selector; 508 // } 509 } 510 // if (firstIndex > 0) { 511 // var id = link.substring(firstIndex + 7, link.length); 512 // if ('.' + id == selector) { 513 // isotopeFilter = '.' + id; 514 // } 515 // } 516 }); 517 $container.isotope({ 518 itemSelector: '.masonry-grid', 519 filter: isotopeFilter, 520 layoutMode: 'fitRows' 521 }); 522 $optionLinks.each(function() { 523 var $this = $(this); 524 var selector = $this.attr('data-filter'); 525 if (selector == isotopeFilter) { 526 if (!$this.hasClass('selected')) { 527 var $optionSet = $this.parents('.option-set'); 528 $optionSet.find('.selected').removeClass('selected'); 529 $this.addClass('selected'); 530 } 531 } 532 }); 533 $optionLinks.on('click', function() { 534 var $this = $(this); 535 var selector = $this.attr('data-filter'); 536 $container.isotope({ 537 itemSelector: '.masonry-grid', 538 filter: selector 539 }); 540 if (!$this.hasClass('selected')) { 541 var $optionSet = $this.parents('.option-set'); 542 $optionSet.find('.selected').removeClass('selected'); 543 $this.addClass('selected'); 544 } 545 return false;
546 }); 547 } 548 } 549 var isotopeTimer = window.setTimeout(function() { 550 window.clearTimeout(isotopeTimer); 551 doIsotopeFilter(); 552 }, 1000); 553 // ------- Mesonary ------- // 554 555 556 // var sidebarTagFeed = new Instafeed({ 557 // target: 'sidebar-instafeed', 558 // get: 'user', 559 // userId: '301261117', 560 // limit: 6, 561 // accessToken: '301261117.5c0003b.779864e7338848a795fef4bd5ca6c460', 562 // template: '<li><a target="_blank" href="{{link}}"><img class="animate fadeInUp" data-wow-delay="0.2s" src="{{image}}" /></a>' 563 // }); 564 // // CÃDIGO PARA PEGAR O TOKEN: 565 // // https://api.instagram.com/oauth/authorize/?client_id=5c0003bd9c6642e5b9fbde263347ac21&redirect_uri=http://www.iesp.edu.br&response_type=token 566 // https://api.instagram.com/oauth/authorize?client_id={1839056359567804}&redirect_uri={https://iesp.edu.br/}&scope=user_profile,user_media&response_type=code 567 // // headerTagFeed.run(); 568 // sidebarTagFeed.run(); 569 // ID do aplicativo do Instagram 570 // 1839056359567804 571 // Chave secreta do aplicativo do Instagram 572 // 8503c30f8006e9ea86ce5a4059ec404a 573 574 // var formagendamento = $(".form-agendamento"); 575 // formagendamento.validate(); 576 577 $('.form-agendamento').each(function(key, form) { 578 $(form).validate(); 579 }); 580 581 $('.form-agendamento').submit(function(){ 582 var formagendamento = $(this); 583 var idform = formagendamento.attr('id'); 584 if(formagendamento.valid()){ 585 $(".modal-form-agendamento .msg-enviando").fadeIn(); 586 var curso = $("#"+idform+" select[name=curso_id] option:selected").text(); 587 $.ajax({ 588 type: "POST", 589 url: "myths/ajax/form-agendamento.php", 590 data: $(this).serialize() + '&curso=' + curso, 591 success: function(msg) { 592 $(".modal-form-agendamento .msg-enviando").hide(); 593 if(msg == 1) { 594 $(".modal-form-agendamento .msg-sucesso").fadeIn(); 595 $('.form-agendamento').trigger("reset"); 596 grecaptcha.reset(); 597 setTimeout(function(){ 598 $(".alerta").fadeOut(); 599 $('.modal-iesp').removeClass('open'); 600 $("body").removeClass("modal-iesp-open"); 601 }, 8000); 602 } else if(msg == 5) { 603 $(".modal-form-agendamento .msg-erro-recaptcha1").fadeIn(); 604 } else if(msg == 4) { 605 $(".modal-form-agendamento .msg-erro-recaptcha2").fadeIn(); 606 } else { 607 $(".modal-form-agendamento .msg-erro").fadeIn(); 608 } 609 setTimeout(function(){ 610 $(".alerta").fadeOut(); 611 }, 8000); 612 } 613 }); 614 return false; 615 } 616 return false; 617 }); 618 619 var formbolsassaibamais = $(".form-bolsas-saiba-mais"); 620 formbolsassaibamais.validate(); 621 622 formbolsassaibamais.submit(function(){ 623 if(formbolsassaibamais.valid()){ 624 $(".form-saiba-mais .alerta").hide(); 625 $(".form-saiba-mais .msg-enviando").fadeIn(); 626 var str = $(this).serialize(); 627 $.ajax({ 628 type: "POST", 629 url: "myths/ajax/form-bolsas-saiba-mais.php", 630 data: str, 631 success: function(msg) { 632 // alert(msg); 633 $(".form-saiba-mais .msg-enviando").hide(); 634 if(msg == 1) { 635 $(".form-saiba-mais .msg-sucesso").fadeIn(); 636 formbolsassaibamais.trigger("reset"); 637 grecaptcha.reset(); 638 } else if(msg == 5) { 639 $(".form-saiba-mais .msg-erro-recaptcha1").fadeIn(); 640 } else if(msg == 4) { 641 $(".form-saiba-mais .msg-erro-recaptcha2").fadeIn(); 642 } else { 643 $(".form-saiba-mais .msg-erro").fadeIn(); 644 } 645 setTimeout(function(){ 646 $(".alerta").fadeOut(); 647 }, 8000); 648 } 649 }); 650 return false; 651 } 652 return false; 653 }); 654 655 var formlive = $(".form-live"); 656 formlive.validate(); 657 658 formlive.submit(function(){ 659 if(formlive.valid()){ 660 $(".cont-form-live .alerta").hide(); 661 $(".cont-form-live .msg-enviando").fadeIn(); 662 var str = $(this).serialize(); 663 $.ajax({ 664 type: "POST", 665 url: "myths/ajax/form-live.php", 666 data: str, 667 success: function(msg) { 668 $(".cont-form-live .msg-enviando").hide(); 669 if(msg == 1) { 670 $(".cont-form-live .msg-sucesso").fadeIn(); 671 formlive.trigger("reset"); 672 grecaptcha.reset(); 673 $(".form-live").hide(); 674 } else if(msg == 5) { 675 $(".cont-form-live .msg-erro-recaptcha1").fadeIn(); 676 setTimeout(function(){ 677 $(".alerta").fadeOut(); 678 }, 8000); 679 } else if(msg == 4) { 680 $(".cont-form-live .msg-erro-recaptcha2").fadeIn(); 681 setTimeout(function(){ 682 $(".alerta").fadeOut(); 683 }, 8000); 684 } else { 685 $(".cont-form-live .msg-erro").fadeIn(); 686 setTimeout(function(){ 687 $(".alerta").fadeOut(); 688 }, 8000); 689 } 690 } 691 }); 692 return false;
693 } 694 return false; 695 }); 696 697 $(".btn-e-corporativa").on('click', function(){ 698 var id = $(this).attr("rel"); 699 $('select[name=educacao_corporativa_item_id] option:eq('+id+')').prop('selected', true); 700 }); 701 702 var formeducacaocorporativa = $(".form-educacao-corporativa"); 703 formeducacaocorporativa.validate(); 704 705 formeducacaocorporativa.submit(function(){ 706 if(formeducacaocorporativa.valid()){ 707 $(".modal-educacao-corporativa-leads .alerta").hide(); 708 $(".modal-educacao-corporativa-leads .msg-enviando").fadeIn(); 709 var str = $(this).serialize(); 710 $.ajax({ 711 type: "POST", 712 url: "myths/ajax/form-educacao-corporativa-leads.php", 713 data: str, 714 success: function(msg) { 715 alert(msg); 716 $(".modal-educacao-corporativa-leads .msg-enviando").hide(); 717 if(msg == 1) { 718 $(".modal-educacao-corporativa-leads .msg-sucesso").fadeIn(); 719 formeducacaocorporativa.trigger("reset"); 720 grecaptcha.reset(); 721 } else if(msg == 5) { 722 $(".modal-educacao-corporativa-leads .msg-erro-recaptcha1").fadeIn(); 723 } else if(msg == 4) { 724 $(".modal-educacao-corporativa-leads .msg-erro-recaptcha2").fadeIn(); 725 } else { 726 $(".modal-educacao-corporativa-leads .msg-erro").fadeIn(); 727 } 728 setTimeout(function(){ 729 $(".alerta").fadeOut(); 730 }, 8000); 731 } 732 }); 733 return false; 734 } 735 return false; 736 }); 737 738 var formpesquisaegresso = $(".form-pesquisa-egresso"); 739 $("select.selectpicker.required").on("change", function() { 740 $(this).valid(); 741 $(this).prevAll("button").removeClass('error'); 742 }); 743 $( ".form-pesquisa-egresso input[type=radio]" ).on( "click", function() { 744 $(this).valid(); 745 $(this).closest(".col-sm-12").removeClass('error'); 746 }); 747 formpesquisaegresso.validate({ 748 errorPlacement: function (error, element) { 749 if (element.is("select.selectpicker")) { 750 element.prevAll("button").append(error); 751 element.prevAll("button").addClass('error'); 752 } else { 753 // error.insertAfter(element); 754 } 755 if (element.is("input[type=radio]")) { 756 element.closest(".col-sm-12").append(error); 757 element.closest(".col-sm-12").addClass('error'); 758 } else { 759 // error.insertAfter(element); 760 } 761 } 762 }); 763 764 765 formpesquisaegresso.submit(function(){ 766 if(formpesquisaegresso.valid()){ 767 $(".form-pesquisa-egresso .msg-enviando").fadeIn(); 768 var str = $(this).serialize(); 769 $.ajax({ 770 type: "POST", 771 url: "myths/ajax/form-pesquisa-egresso.php", 772 data: str, 773 success: function(msg) { 774 $(".form-pesquisa-egresso .msg-enviando").hide(); 775 if(msg == 'OK') { 776 $(".form-pesquisa-egresso .msg-sucesso").fadeIn(); 777 formpesquisaegresso.trigger("reset"); 778 $('.selectpicker').selectpicker('refresh'); 779 } else { 780 $(".form-pesquisa-egresso .msg-erro").fadeIn(); 781 } 782 setTimeout(function(){ 783 $(".alerta").fadeOut(); 784 }, 8000); 785 } 786 }); 787 return false; 788 } 789 return false; 790 }); 791 792 var formindiqueamigo = $(".form-indiqueamigo"); 793 formindiqueamigo.validate(); 794 795 formindiqueamigo.submit(function(){ 796 if(formindiqueamigo.valid()){ 797 $("#indique-amigo .msg-enviando").fadeIn(); 798 var str = $(this).serialize(); 799 $.ajax({ 800 type: "POST", 801 url: "myths/ajax/form-indiqueamigo.php", 802 data: str, 803 success: function(msg) { 804 $("#indique-amigo .msg-enviando").hide(); 805 if(msg == 'OK') { 806 $("#indique-amigo .msg-sucesso").fadeIn(); 807 formindiqueamigo.trigger("reset"); 808 } else { 809 $("#indique-amigo .msg-erro").fadeIn(); 810 } 811 setTimeout(function(){ 812 $(".alerta").fadeOut(); 813 }, 8000); 814 } 815 }); 816 return false; 817 } 818 return false; 819 }); 820 821 var maskBehavior = function (val) { 822 return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009'; 823 }, 824 options = {onKeyPress: function(val, e, field, options) { 825 field.mask(maskBehavior.apply({}, arguments), options); 826 } 827 }; 828 829 $('.hora').mask('00:00'); 830 $('.telefone').mask(maskBehavior, options); 831 832 // Initialize Datepicker 833 $('.input-datepicker').datepicker({weekStart: 1, todayHighlight: true, startDate: "today", daysOfWeekDisabled: "0", daysOfWeekHighlighted: "0"}).on('changeDate', function(e){ $(this).datepicker('hide'); }); 834 835}); 836 837 838 839// ------- Contact Form ------- // 840function checkmail(input){ 841 var pattern1=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; 842 if(pattern1.test(input)){ return true; }else{ return false; }} 843 function proceed(){ 844 var name = document.getElementById("name"); 845 var email = document.getElementById("email"); 846 var company = document.getElementById("company"); 847 var msg = document.getElementById("message"); 848 var errors = ""; 849 if(name.value == ""){ 850 name.className = 'error'; 851 return false;} 852 else if(email.value == ""){ 853 email.className = 'error'; 854 return false;} 855 else if(checkmail(email.value)==false){ 856 alert('Please provide a valid email address.'); 857 return false;} 858 else if(company.value == ""){ 859 company.className = 'error'; 860 return false;} 861 else if(msg.value == ""){ 862 msg.className = 'error'; 863 return false;} 864 else 865 { 866 $.ajax({ 867 type: "POST", 868 url: "php/submit.php", 869 data: $("#contact_form").serialize(), 870 success: function(msg){ 871 //alert(msg); 872 if(msg){ 873 $('#contact_form').fadeOut(1000); 874 $('#contact_message').fadeIn(1000); 875 document.getElementById("contact_message"); 876 return true; 877 }} 878 }); 879 880}}; 881// ------- Contact Form ------- // 882 883 884$('.form-minha-biblioteca').each(function(key, form) { 885 $(form).validate(); 886}); 887 888// $('.form-minha-biblioteca').submit(function(){ 889// var formminhabiblioteca = $(this); 890// if(formminhabiblioteca.valid()){ 891// $(".modal-form-minha-biblioteca .msg-enviando").fadeIn(); 892// var str = $(this).serialize(); 893// $.ajax({ 894// type: "POST", 895// url: "myths/ajax/form-minha-biblioteca.php", 896// data: str, 897// success: function(msg) { 898// $(".modal-form-minha-biblioteca .msg-enviando").hide(); 899// if(msg == 1) { 900// $(".modal-form-minha-biblioteca .msg-erro").fadeIn(); 901// } else if(msg == 2){ 902// $(".modal-form-minha-biblioteca .msg-erro").fadeIn(); 903// } else { 904// $(".modal-form-minha-biblioteca .msg-sucesso").fadeIn(); 905// $('.form-minha-biblioteca').trigger("reset"); 906// window.location.href = msg; 907// } 908// setTimeout(function(){ 909// $(".alert").fadeOut(); 910// $('.modal-iesp').removeClass('open'); 911// $("body").removeClass("modal-iesp-open"); 912// }, 8000); 913// } 914// }); 915// return false;
916// } 917// return false; 918// }); 919 920if ($(window).width() < 480) { 921 $('.cabecalhos-internas').addClass("inner-banner overlay-gray"); 922} 923 924var formbancoestagio = $(".form-bancoestagio"); 925formbancoestagio.validate(); 926 927formbancoestagio.submit(function(){ 928 if(formbancoestagio.valid()){ 929 $("#formulario-banco-estagio .alerta").hide(); 930 $("#formulario-banco-estagio .msg-enviando").fadeIn(); 931 var str = $(this).serialize(); 932 $.ajax({ 933 type: "POST", 934 url: "myths/ajax/form-banco-estagio.php", 935 data: str, 936 success: function(msg) { 937 // alert(msg); 938 $("#formulario-banco-estagio .msg-enviando").hide(); 939 if(msg == 1) { 940 $("#formulario-banco-estagio .msg-sucesso").fadeIn(); 941 formbancoestagio.trigger("reset"); 942 grecaptcha.reset(); 943 } else if(msg == 5) { 944 $("#formulario-banco-estagio .msg-erro-recaptcha1").fadeIn(); 945 } else if(msg == 4) { 946 $("#formulario-banco-estagio .msg-erro-recaptcha2").fadeIn(); 947 } else { 948 $("#formulario-banco-estagio .msg-erro").fadeIn(); 949 } 950 setTimeout(function(){ 951 $(".alerta").fadeOut(); 952 }, 8000); 953 } 954 }); 955 return false; 956 } 957 return false; 958});
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.