1jQuery(document).ready(function($) { 2 3 setTimeout(function(){ 4 $('.main_banner').find('video').attr('src', 'wp-content/uploads/2022/10/vapor-home-banner-video.mp4'); 5 }, 3000); 6 7 setTimeout(function() { 8 jQuery('.custom_site_preloader').addClass('hide_preloader'); 9 }, 500); 10 setTimeout(function() { 11 jQuery('.custom_site_preloader').hide(); 12 }, 500); 13 14 jQuery(".background-list-wrapper").each(function() { 15 var parentDiv = jQuery(this); 16 parentDiv.children('.background-list-column').hover(function() { 17 parentDiv.find('.background-list-img').removeClass('hover'); 18 jQuery(this).next('.background-list-img').addClass('hover'); 19 }); 20 }); 21 22 $(document).keyup(function(e) { 23 if (e.key === "Escape") { 24 $('.custom_active').removeClass('custom_active'); 25 } 26 }); 27 28 29 /* Data Layer Adding */ 30 $('.data-layer-elem').each(function(){ 31 let buttonName = $(this).find('a').children('span').children('span').text().trim(); 32 let newButtonName = (buttonName) ? buttonName : $(this).find('a').text().trim(); 33 $(this).find('a').attr('data-object', 'button'); 34 $(this).find('a').attr('data-buttonname', newButtonName); 35 }); 36 37 /* Data Layer on Site Logo */ 38 $('.vp-site-logo').each(function(){ 39 //let buttonName = $(this).find('a').children('span').children('span').text().trim(); 40 $(this).find('a').attr('data-object', 'top menu'); 41 $(this).find('a').attr('data-top-menu-item', 'vapor icon'); 42 }); 43 44 /* Data Layer on Sidebar Menu */ 45 $('.data-layer-menu').each(function(){ 46 $(this).find('a').each(function(){ 47 let buttonName = $(this).text().trim(); 48 $(this).attr('data-object', 'button'); 49 $(this).attr('data-buttonname', buttonName); 50 }); 51 }); 52 $('.res_menu_cont_class').each(function(){ 53 $(this).find('a').each(function(){ 54 let buttonName = $(this).text().trim(); 55 $(this).attr('data-object', 'button'); 56 $(this).attr('data-buttonname', buttonName); 57 }); 58 }); 59 60 61}); 62 63function openWindow( url ){ 64 window.open(url, '_blank'); 65 window.focus(); 66} 67 68 69 70jQuery(document).ready(function($) { 71 72 if ($('#mapBox').length != '') { 73 74 mapboxgl.accessToken = 'pk.eyJ1IjoiYW51ajMxMTIiLCJhIjoiY2ttYWcxbHlhMXA1dDMzb2N6N2g2MHBjeCJ9.Yk16RyTlB61mceAfaapwmw'; 75 var map = new mapboxgl.Map({ 76 container: 'mapBox', // container ID 77 style: 'mapbox://styles/mapbox/dark-v10', // style ID 78 center: [-97.800300, 30.354180], // starting position [lng, lat] 79 zoom: 10 // starting zoom 80 }); 81 map.scrollZoom.disable(); 82 // Set options 83 var marker = new mapboxgl.Marker({ 84 color: "#247FEB", 85 draggable: false 86 }).setLngLat([-97.800300, 30.354180]) 87 .addTo(map); 88 89 // var layerList = document.getElementById('menu'); 90 // var inputs = layerList.getElementsByTagName('input'); 91 92 function switchLayer(layer) { 93 var layerId = layer.target.id; 94 map.setStyle('mapbox://styles/mapbox/' + layerId); 95 } 96 97 // for (var i = 0; i < inputs.length; i++) { 98 // inputs[i].onclick = switchLayer; 99 // } 100 } 101 102 103 104 if ($("lottie-player").length) { 105 $("lottie-player").each(function() { 106 this.play(); 107 }); 108 109 110 } 111 $('.mem_car').owlCarousel({ 112 loop: true, 113 items: 1, 114 margin: 0, 115 dots: false, 116 nav: true, 117 mouseDrag: false, 118 autoplay: false, 119 smartSpeed: 1000, 120 animateIn: 'fadeIn', 121 animateOut: 'fadeOut', 122 responsive: { 123 320: { 124 nav: false, 125 dots: true 126 }, 127 800: { 128 nav: true, 129 dots: false 130 } 131 } 132 }); 133 134 135 $(document).on('click', '.c-vertical-expander_item', function() { 136 $('.c-vertical-expander_item').removeClass('is--active'); 137 $(this).addClass('is--active'); 138 }); 139 140 $(window).on('scroll', function() { 141 // return false;
142 if ($(".custom_active").length != '') { 143 $('.custom_active').removeClass('custom_active'); 144 } 145 }); 146 147 if ($('.slide-wrapper').length != '') { 148 149 150 const options = { 151 threshold: .25, 152 } 153 const observer = new IntersectionObserver(handleIntersection, options); 154 155 $('.slide-wrapper .slick-slide').each(function() { 156 observer.observe(this); 157 }); 158 159 function handleIntersection(entries) { 160 entries.forEach(entry => { 161 if (entry.isIntersecting) { 162 163 var itemid = $(entry.target).find('.desc_col').attr('data-itemid') 164 165 var cr_slide = $(entry.target).attr("data-slick-index"); 166 var count = $('.slide-wrapper .slide.slick-slide').length; 167 168 $('.desc_col').removeClass("do_animation"); 169 $('.media_col').removeClass("do_animation"); 170 $('.head_part').removeClass("do_animation"); 171 $('.content_part').removeClass("do_animation"); 172 $('.logos_part').removeClass("do_animation"); 173 $('.footer_part').removeClass("do_animation"); 174 175 $('.desc_col' + itemid).addClass("do_animation"); 176 $('.media_col' + itemid).addClass("do_animation"); 177 $(entry.target).find('.head_part').addClass("do_animation"); 178 $(entry.target).find('.content_part').addClass("do_animation"); 179 $(entry.target).find('.logos_part').addClass("do_animation"); 180 $(entry.target).find('.footer_part').addClass("do_animation"); 181 182 183 184 } 185 }); 186 } 187 188 } 189 190 191 192 193 $('.slider-for').slick({ 194 slidesToShow: 1, 195 slidesToScroll: 1, 196 adaptiveHeight: true, 197 arrows: false, 198 fade: true, 199 asNavFor: '.slider-nav' 200 }); 201 202 $('.slider-nav').slick({ 203 slidesToShow: 3, 204 slidesToScroll: 1, 205 vertical: true, 206 centerMode: true, 207 asNavFor: '.slider-for', 208 dots: false, 209 focusOnSelect: true, 210 adaptiveHeight: true, 211 // variableWidth: true, 212 verticalSwiping: true 213 }); 214 215 $(document).on('click', '.toggle_view', function() { 216 if ($(this).hasClass('view_active')) { 217 $(this).removeClass('view_active'); 218 } else { 219 $(this).addClass('view_active'); 220 } 221 if ($(this).parents('.elementor-element-b5c1a53').find(".partner_slider_js").hasClass('d-none')) { 222 $(this).parents('.elementor-element-b5c1a53').find(".partner_slider_js").removeClass('d-none'); 223 } else { 224 $(this).parents('.elementor-element-b5c1a53').find(".partner_slider_js").addClass('d-none'); 225 } 226 227 }); 228 229 var $filterType = $('#filterOptions li.active a').attr('class'); 230 var $holder = $('ul.ourHolder'); 231 var $data = $holder.clone(); 232 var ar = []; 233 $('#filterOptions li a').click(function(e) { 234 235 $('#filterOptions li').removeClass('active'); 236 237 238 var $filterType = $(this).attr('class'); 239 240 $(this).parent().addClass('active'); 241 242 if ($filterType == 'all') { 243 244 245 var $sortedData = $data.sorted({ 246 by: function(v) { 247 248 return parseInt($(v).find('li').attr('data-id')); 249 250 } 251 }); 252 var $filteredData = $sortedData.find('li'); 253 } else { 254 // parseInt($(v).find('li[data-type=' + $filterType + ']').attr('data-id')); 255 var $sortedData = $data.sorted({ 256 by: function(v) { 257 // console.log(parseInt($(v).find('li[data-type=' + $filterType + ']').attr('data-id'))); 258 return parseInt($(v).find('li[data-type=' + $filterType + ']').attr('data-id')); 259 260 } 261 }); 262 263 // var $filteredData = $sortedData.find('li[data-type=blog]'); 264 // var $filteredData = $sortedData.find('li[data-type=' + $filterType + ']'); 265 var $filteredData = $sortedData.find('.' + $filterType); 266 // var $filteredData1 = $sortedData.find('.blog'); 267 268 // $('.ourHolder .p_item_col').each(function(){ 269 // if ($(this).hasClass($filterType)) { 270 // ar.push($(this)); 271 // } 272 // }); 273 // console.log(ar); 274 // console.log($filteredData); 275 // console.log($filteredData1); 276 } 277 278 279 280 $holder.quicksand($filteredData, {
281 duration: 800, 282 easing: 'easeInOutQuad' 283 }); 284 285 286 return false; 287 }); 288 289 (function($) { 290 291 $.fn.sorted = function(customOptions) { 292 // console.log(customOptions); 293 var options = { 294 reversed: true, 295 by: function(a) { 296 return a.text(); 297 } 298 }; 299 $.extend(options, customOptions); 300 $data = $(this); 301 arr = $data.get(); 302 // console.log(arr); 303 arr.sort(function(a, b) { 304 var valA = options.by($(a)); 305 var valB = options.by($(b)); 306 if (options.reversed) { 307 return (valA < valB) ? 1 : (valA > valB) ? -1 : 0; 308 } else { 309 return (valA < valB) ? -1 : (valA > valB) ? 1 : 0; 310 } 311 }); 312 // console.log($(arr)); 313 return $(arr); 314 }; 315 })(jQuery); 316 317 $('.partner_slider').owlCarousel({ 318 stagePadding: 50, 319 loop: true, 320 margin: 30, 321 nav: false, 322 dots: false, 323 dotsData: false, 324 autoplay: true, 325 slideTransition: 'linear', 326 autoplayTimeout: 5000, 327 autoplaySpeed: 5000, 328 mouseDrag: false, 329 autoplayHoverPause: true, 330 touchDrag: false, 331 responsive: { 332 0: { 333 items: 2 334 }, 335 350: { 336 items: 2 337 }, 338 600: { 339 items: 5 340 }, 341 1000: { 342 items: 5 343 } 344 } 345 }); 346 347 $('.as_seen_slider').owlCarousel({ 348 stagePadding: 50, 349 loop: true, 350 margin: 20, 351 nav: false, 352 dots: false, 353 dotsData: false, 354 autoplay: true, 355 slideTransition: 'linear', 356 autoplayTimeout: 5000, 357 autoplaySpeed: 5000, 358 mouseDrag: false, 359 autoplayHoverPause: true, 360 touchDrag: false, 361 responsive: { 362 0: { 363 items: 1 364 }, 365 768: { 366 items: 3 367 }, 368 1024: { 369 items: 4 370 }, 371 1025: { 372 items: 5 373 } 374 } 375 }); 376 377 // $('.owl-carousel').owlCarousel({ 378 // loop:true, 379 // margin:10, 380 // nav:true, 381 // responsive:{ 382 // 0:{ 383 // items:1 384 // }, 385 // 600:{ 386 // items:3 387 // }, 388 // 1000:{ 389 // items:5 390 // } 391 // } 392 // }) 393 $(document).on('change', '.switch_inp', function() { 394 var markets = $(this).parent().attr('data-m'); 395 var pc = $(this).parent().attr('data-pc'); 396 var sites = $(this).parent().attr('data-sites'); 397 var pfn = $(this).parent().attr('data-pfn'); 398 if ($(this).is(":checked")) { 399 $('#' + $(this).val()).show(); 400 if (markets != 'null' && pc != 'null' && sites != 'null') { 401 var mVal = $('.itemData_markets').find('h3.elementor-icon-box-title > span').text(); 402 var pcVal = $('.itemData_PC').find('h3.elementor-icon-box-title > span').text(); 403 var sitesVal = $('.itemData_LocationSites').find('h3.elementor-icon-box-title > span').text(); 404 if(mVal == '-'){ 405 mVal = 0; 406 } 407 if(pcVal == '-'){ 408 pcVal = 0; 409 } 410 if(sitesVal == '-'){ 411 sitesVal = 0; 412 } 413 414 var newmVal = (parseInt(mVal) + parseInt(markets)); 415 var newpcVal = (parseFloat(pcVal) + parseFloat(pc)); 416 var newsiteVal = (parseInt(sitesVal) + parseInt(sites)); 417 if(newmVal == 0){ 418 newmVal = '-'; 419 } 420 if(newsiteVal == 0){ 421 newsiteVal = '-'; 422 } 423 if(newpcVal == 0){ 424 newpcVal = '-'; 425 }else{ 426 var newpcVal = newpcVal.toFixed(2)+' MW'; 427 } 428 $('.itemData_markets').find('h3.elementor-icon-box-title > span').text(newmVal); 429 $('.itemData_PC').find('h3.elementor-icon-box-title > span').text(newpcVal); 430 $('.itemData_LocationSites').find('h3.elementor-icon-box-title > span').text(newsiteVal); 431 }else{ 432 var pfnVal = $('.itemData_PFN').find('h3.elementor-icon-box-title > span').text(); 433 if(pfnVal == '-'){ 434 pfnVal = 0+","; 435 } 436 437 var newpfnVal = (parseInt(pfnVal.replace(',','')) + parseInt(pfn)); 438 if(newpfnVal == 0){ 439 newpfnVal = '-'; 440 }else{ 441 var newpfnVal = newpfnVal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")+' mi'; 442 } 443 $('.itemData_PFN').find('h3.elementor-icon-box-title > span').text(newpfnVal); 444 } 445 } else { 446 $('#' + $(this).val()).hide(); 447 if (markets != 'null' && pc != 'null' && sites != 'null') { 448 var mVal = $('.itemData_markets').find('h3.elementor-icon-box-title > span').text(); 449 var pcVal = $('.itemData_PC').find('h3.elementor-icon-box-title > span').text(); 450 var sitesVal = $('.itemData_LocationSites').find('h3.elementor-icon-box-title > span').text(); 451 if(mVal == '-'){ 452 mVal = 0; 453 } 454 if(pcVal == '-'){ 455 pcVal = 0; 456 } 457 if(sitesVal == '-'){ 458 sitesVal = 0; 459 } 460 var newmVal = (parseInt(mVal) - parseInt(markets)); 461 var newpcVal = (parseFloat(pcVal) - parseFloat(pc)); 462 var newsiteVal = (parseInt(sitesVal) - parseInt(sites)
462); 463 464 if(newmVal == 0){ 465 newmVal = '-'; 466 } 467 if(newsiteVal == 0){ 468 newsiteVal = '-'; 469 } 470 if(newpcVal == 0){ 471 newpcVal = '-'; 472 }else{ 473 var newpcVal = newpcVal.toFixed(2)+' MW'; 474 } 475 476 $('.itemData_markets').find('h3.elementor-icon-box-title > span').text(newmVal); 477 $('.itemData_PC').find('h3.elementor-icon-box-title > span').text(newpcVal); 478 $('.itemData_LocationSites').find('h3.elementor-icon-box-title > span').text(newsiteVal); 479 }else{ 480 var pfnVal = $('.itemData_PFN').find('h3.elementor-icon-box-title > span').text(); 481 if(pfnVal == '-'){ 482 pfnVal = 0+","; 483 } 484 var newpfnVal = (parseInt(pfnVal.replace(',','')) - parseInt(pfn)); 485 if(newpfnVal == 0){ 486 newpfnVal = '-'; 487 }else{ 488 var newpfnVal = newpfnVal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")+' mi'; 489 } 490 $('.itemData_PFN').find('h3.elementor-icon-box-title > span').text(newpfnVal); 491 } 492 493 } 494 }); 495 496 497 var urlParams = new URLSearchParams(window.location.search); 498 var a = window.location.hash; 499 var slug = a.split("#")[1]; 500 // console.log(); 501 502 // var slug = urlParams.get('tab'); 503 // var Qry = urlParams.get('q'); 504 if (slug) { 505 $('.filter-btn').removeClass('active'); 506 $('#filterOptions').find('.' + slug).trigger('click').find('.filter-btn').addClass('active'); 507 } 508 509 function search_result(search) { 510 jQuery(".sresults").empty(); 511 // var str ='&search=' + search + '&action=ajax_search'; 512 jQuery.ajax({ 513 type: "post", 514 dataType: "json", 515 url: ajaxUrl.ajax_url, 516 data: { 517 action: "ajax_search", 518 search: search 519 }, 520 beforeSend: function() { 521 // jQuery(".preresults").fadeOut("fast"); 522 jQuery(".preloader").fadeIn("fast"); 523 $(".results").mCustomScrollbar("destroy"); 524 }, 525 success: function(response) { 526 // console.log(response); 527 if (response.length) { 528 // jQuery(".preresults").fadeOut("fast"); 529 jQuery(".preloader").fadeOut("fast"); 530 jQuery(".sresults").empty(); 531 532 jQuery.each(response, function(index, value) { 533 534 jQuery(".sresults").fadeIn(); 535 jQuery(".sresults").append('<li><a href="' + value.href + '">' + value.title + '<br><span>' + value.href + '</span></a></li>'); 536 537 538 }); 539 } else { 540 // jQuery(".preresults").fadeIn("fast"); 541 jQuery(".preloader").fadeOut("fast"); 542 jQuery(".sresults").empty(); 543 } 544 545 }, 546 complete: function() { 547 windowWidth = jQuery(window).width(); 548 if (windowWidth > 1100) { 549 $('.results').mCustomScrollbar({ 550 theme: "minimal-dark" 551 }); 552 } 553 554 }, 555 error: function(jqXHR, textStatus, errorThrown) { 556 console.log(jqXHR + " :: " + textStatus + " :: " + errorThrown); 557 } 558 559 }); 560 } 561 562 563 564 var jQuerywindow = jQuery(window), 565 previousScrollTop = 0, 566 scrollLock = false; 567 jQuerywindow.scroll(function(event) { 568 if (scrollLock) { 569 jQuerywindow.scrollTop(previousScrollTop); 570 } 571 previousScrollTop = jQuerywindow.scrollTop(); 572 }); 573 574 575 jQuery('.searchicon').on("click", function() { 576 jQuery('.search-section').fadeIn(); 577 jQuery('.search-box').focus(); 578 scrollLock = true; 579 580 }); 581 582 jQuery('.searchclose').on("click", function() { 583 jQuery('.search-section').fadeOut('fast'); 584 scrollLock = false; 585 586 }); 587 jQuery(".search-box").focusin(function(e) { 588 jQuery('.search-box-container').addClass('focused'); 589 }); 590 jQuery(".search-box").blur(function(e) { 591 jQuery('.search-box-container').removeClass('focused'); 592 }); 593 jQuery(".search-box").on("keyup", function(e) { 594 595 var search = jQuery.trim(jQuery(this).val()); 596 jQuery(".sresults").empty(); 597 // jQuery(".preloader").fadeIn("fast"); 598 if (search.length >= 2) { 599 jQuery(".preloader").css({ 600 'opacity': '1' 601 }); 602 search_result(search); 603 } else { 604 var search = 0; 605 search_result(search); 606 jQuery(".sresults").fadeOut("fast"); 607 jQuery(".sresults").empty(); 608 jQuery(".preloader").css({ 609 'opacity': '0' 610 }); 611 } 612 }); 613 614 615 616 $('.mobile_menu_custom .nav-item.elementskit-dropdown-has').each(function() { 617 var a = $(this).find('.active').hasClass('active'); 618 if (a) { 619 $(this).addClass('custom_main_menu_item'); 620 $(this).find('ul.elementskit-dropdown.elementskit-submenu-panel').addClass('elementskit-dropdown-open'); 621 } 622 }); 623 $(document).on('click', '.mobile_menu_custom .nav-item.elementskit-dropdown-has ul li', function(e) { 624 e.stopPropagation(); 625 }); 626 $(document).on('click', '.mobile_menu_custom .nav-item.elementskit-dropdown-has', function(e) { 627 var $this = $(this).attr('id'); 628 629 if ($(this).hasClass('custom_main_menu_item')) { 630 console.log('if'); 631 $(this).removeClass('custom_main_menu_item'); 632 } else { 633 console.log('else'); 634 $('.mobile_menu_custom .nav-item.elementskit-dropdown-has').removeClass('custom_main_menu_item'); 635 $(this).addClass('custom_main_menu_item'); 636 } 637 638 $('.mobile_menu_custom .nav-item.elementskit-dropdown-has').each(function() { 639 if ($this != $(this).attr('id')) { 640 $(this).find('ul.elementskit-dropdown.elementskit-submenu-panel').removeClass('elementskit-dropdown-open'); 641 } 642 }); 643 }); 644 $(document).click(function() { 645 $('.desk_mega_menu #main-menu > li').removeClass('custom_active'); 646 }); 647 $(document).on('click', '.desk_mega_menu #main-menu > li', function(e) { 648 // $('.desk_mega_menu #main-menu > li').each(function(){ 649 // $('.desk_mega_menu #main-menu > li').removeClass('custom_active'); 650 e.stopPropagation(); 651 // }); 652 if ($(this).hasClass('custom_active')) { 653 $(this).removeClass('custom_active'); 654 } else { 655 $('.desk_mega_menu #main-menu > li').removeClass('custom_active'); 656 $(this).addClass('custom_active'); 657 } 658 }); 659}); 660 661jQuery(document).ready(function($) { 662 if ($('.custom-select-wrapper').length != '') { 663 $('.mobile-select-change').on('change', function() { 664 let _this_val = $(this).val(); 665 window.location.href = _this_val; 666 }); 667 668 669 document.querySelector('.custom-select-wrapper').addEventListener('click', function() { 670 this.querySelector('.custom-select').classList.toggle('open'); 671 }) 672 673 for (const option of document.querySelectorAll(".custom-option")) { 674 option.addEventListener('click', function() { 675 window.location.href = $(this).data('value'); 676 }) 677 } 678 679 window.addEventListener('click', function(e) { 680 const select = document.querySelector('.custom-select') 681 if (!select.contains(e.target)) { 682 select.classList.remove('open'); 683 } 684 }); 685 } 686}); 687 688 689 690 691jQuery(document).ready(function($) { 692 // var currentScroll1 = window.pageYOffset; 693 if(window.pageYOffset != 0){ 694 $('body').addClass('scroll-up'); 695 $('body').addClass('headBlack'); 696 } 697 698 const body = document.body; 699 const scrollUp = "scroll-up"; 700 const scrollDown = "scroll-down"; 701 let lastScroll = 0; 702 703 704 window.addEventListener("scroll", () => { 705 const currentScroll = window.pageYOffset; 706 if (currentScroll <= 0) { 707 body.classList.remove(scrollUp); 708 body.classList.remove('headBlack'); 709 return; 710 } 711 if (currentScroll > lastScroll && !body.classList.contains(scrollDown)) { 712 // down 713 714 body.classList.remove(scrollUp); 715 body.classList.add(scrollDown); 716 /*setTimeout(function() { 717 body.classList.remove("headBlack"); 718 }, 500);*/ 719 } else if (currentScroll < lastScroll && body.classList.contains(scrollDown)) { 720 // up 721 body.classList.remove(scrollDown); 722 body.classList.add(scrollUp); 723 body.classList.add("headBlack"); 724 } 725 lastScroll = currentScroll; 726 727 }); 728 729 730 731 $(document).on('click', '.link_sec', function() { 732 console.log($(window).width()); 733 if ($(window).width() < 767) { 734 $('html,body').animate({ 735 scrollTop: 600 736 }, 1000); 737 } else if ($(window).width() >= 768 && $(window).width() < 1200) { 738 $('html,body').animate({ 739 scrollTop: 660 740 }, 1000); 741 742 } else { 743 744 $('html,body').animate({ 745 scrollTop: 740 746 }, 1000); 747 } 748 }); 749 750 751 $(".contactFormValid").validate({ 752 submitHandler: function(form) { 753 754 /* Contact Form Data Layer Add */ 755 window.dataLayer.push({ 756 'event':'submitContactUs', 757 'vaporFormName':'contactUs', 758 'companyName':$('#contactForm').find('input[name="company"]').val(), 759 'message':$('#contactForm').find('textarea[name="message"]').val() 760 }); 761 /* End of Contact Form Data Layer Add */ 762 763 $('#copyOfContactFrm').find('input[name="cu_firstname"]').val($('#contactForm').find('input[name="firstname"]').val()); 764 $('#copyOfContactFrm').find('input[name="cu_lastname"]').val($('#contactForm').find('input[name="lastname"]').val()); 765 $('#copyOfContactFrm').find('input[name="cu_email"]').val($('#contactForm').find('input[name="email"]').val()); 766 $('#copyOfContactFrm').find('input[name="cu_area_of_interest"]').val($('#contactForm').find('select[name="area_of_interest"]').val()); 767 $('#copyOfContactFrm').find('input[name="cu_company"]').val($('#contactForm').find('input[name="company"]').val()); 768 $('#copyOfContactFrm').find('input[name="cu_job_title"]').val($('#contactForm').find('input[name="job_title"]').val()); 769 $('#copyOfContactFrm').find('input[name="cu_location"]').val($('#contactForm').find('input[name="location"]').val()); 770 $('#copyOfContactFrm').find('input[name="cu_message"]').val($('#contactForm').find('textarea[name="message"]').val()); 771 772 var contactData = $('#copyOfContactFrm').serialize(); 773 $.post(ajaxUrl.ajax_url, contactData, function(resp) { 774 }, 'json'); 775 776 $('#copyOfContactFrm').submit(); 777 778 elementorProFrontend.modules.popup.showPopup({ 779 id: 4581 780 }); 781 setTimeout(function() { 782 location.reload(); 783 }, 3000); 784 }, 785 rules: { 786 "firstname": { 787 required: true 788 }, 789 "lastname": { 790 required: true 791 }, 792 "email": { 793 required: true, 794 email: true, 795 }, 796 "area_of_interest": { 797 required: true, 798 }, 799 "company": { 800 required: true 801 }, 802 "job_title": { 803 required: true 804 }, 805 "location": { 806 required: true, 807 }, 808 "message": { 809 required: true, 810 }, 811 hiddenRecaptcha: { 812 required: function() { 813 if (grecaptcha.getResponse() == '') { 814 return true; 815 } else { 816 return false;
817 } 818 } 819 }, 820 }, 821 messages: { 822 "firstname": { 823 required: "Enter your first name." 824 }, 825 "lastname": { 826 required: "Enter your last name." 827 }, 828 "email": { 829 required: "Enter a valid email address" 830 }, 831 "area_of_interest": { 832 required: "Select your area of interest." 833 }, 834 "company": { 835 required: "Enter your company name." 836 }, 837 "job_title": { 838 required: "Enter your job title." 839 }, 840 "location": { 841 required: "Enter your location." 842 }, 843 "message": { 844 required: "Enter your message." 845 }, 846 hiddenRecaptcha: { 847 required: "Captcha is Required." 848 }, 849 }, 850 ignore: [], 851 errorClass: "invalid-feedback animated fadeInUp", 852 errorElement: "div", 853 errorPlacement: function(e, a) { 854 jQuery(a).parent().append(e) 855 // e.insertAfter(a) 856 }, 857 858 }); 859 860 $(".InzoneFormValid").validate({ 861 submitHandler: function(form) { 862 863 $('#copyOfInzoneFrm').find('input[name="in_firstname"]').val($('#inzoneForm').find('input[name="firstname"]').val()); 864 $('#copyOfInzoneFrm').find('input[name="in_lastname"]').val($('#inzoneForm').find('input[name="lastname"]').val()); 865 $('#copyOfInzoneFrm').find('input[name="in_email"]').val($('#inzoneForm').find('input[name="email"]').val()); 866 $('#copyOfInzoneFrm').find('input[name="in_company"]').val($('#inzoneForm').find('input[name="company"]').val()); 867 $('#copyOfInzoneFrm').find('input[name="in_job_title"]').val($('#inzoneForm').find('input[name="job_title"]').val()); 868 $('#copyOfInzoneFrm').find('input[name="in_location"]').val($('#inzoneForm').find('input[name="location"]').val()); 869 $('#copyOfInzoneFrm').find('input[name="in_message"]').val($('#inzoneForm').find('input[name="message"]').val()); 870 871 /* Inzone Form Data Layer Add */ 872 window.dataLayer.push({ 873 'event':'submitInzoneForm', 874 'vaporFormName':'inzoneForm', 875 'name':$('#inzoneForm').find('input[name="firstname"]').val(), 876 'email':$('#inzoneForm').find('input[name="email"]').val() 877 }); 878 /* 'companyName':$('#inzoneForm').find('input[name="company"]').val(), 879 'message':$('#inzoneForm').find('input[name="message"]').val() */ 880 /* End of Inzone Form Data Layer Add */ 881 882 var inzoneFormData = $('#copyOfInzoneFrm').serialize(); 883 $.post(ajaxUrl.ajax_url, inzoneFormData, function(resp) { 884 }, 'json'); 885 886 $('#copyOfInzoneFrm').submit(); 887 888 setCookie("inzoneFromState", 1, 90); 889 setTimeout(function() { 890 $("#inzone-pdf-form").hide(); 891 $("#inzone-pdf").show(); 892 $("html, body").animate({ scrollTop: 0 }, 1000); 893 }, 2000); 894 895 /* elementorProFrontend.modules.popup.showPopup({ 896 id: 4581 897 }); 898 setTimeout(function() { 899 $('#elementor-popup-modal-4581').find('dialog-lightbox-close-button').trigger('click'); 900 }, 3000); */ 901 }, 902 rules: { 903 "firstname": { 904 required: true 905 }, 906 "lastname": { 907 required: true 908 }, 909 "email": { 910 required: true, 911 email: true, 912 }, 913 "company": { 914 required: false 915 }, 916 "job_title": { 917 required: false 918 }, 919 "location": { 920 required: false, 921 }, 922 "message": { 923 required: false, 924 }, 925 hiddenRecaptcha: { 926 required: function() { 927 if (grecaptcha.getResponse() == '') { 928 return true; 929 } else { 930 return false;
931 } 932 } 933 }, 934 }, 935 messages: { 936 "firstname": { 937 required: "Enter your first name." 938 }, 939 "lastname": { 940 required: "Enter your last name." 941 }, 942 "email": { 943 required: "Enter a valid email address" 944 }, 945 "company": { 946 required: "Enter your company name." 947 }, 948 "job_title": { 949 required: "Enter your job title." 950 }, 951 "location": { 952 required: "Enter your location." 953 }, 954 "message": { 955 required: "Enter your message." 956 }, 957 hiddenRecaptcha: { 958 required: "Captcha is Required." 959 }, 960 }, 961 ignore: [], 962 errorClass: "invalid-feedback animated fadeInUp", 963 errorElement: "div", 964 errorPlacement: function(e, a) { 965 jQuery(a).parent().append(e) 966 // e.insertAfter(a) 967 }, 968 969 }); 970 971 $(document).on('click', '#backtoinzone', function() { 972 if (document.referrer == "") { 973 window.location.href = "/inzone/"; 974 } else { 975 if (document.referrer == "https://www.vapor.io/inzone/economic-impact-of-inzone-las-vegas" 976 || document.referrer == "https://www.vapor.io/inzone/economic-impact-of-inzone-las-vegas/" 977 || document.referrer == "https://vapor.io/inzone/economic-impact-of-inzone-las-vegas" 978 || document.referrer == "https://vapor.io/inzone/economic-impact-of-inzone-las-vegas/") { 979 window.location.href = "/inzone/"; 980 } else { 981 window.history.back(); 982 } 983 } 984 }); 985 986// $(".speakToSales-form").validate({ 987// submitHandler: function(form) { 988 989// let industryValues = []; 990// $('#speakToSales').find('input[name="industry[]"]:checked').each(function(){ 991// if($(this).val() == 'Other') { 992// var otherOrganizationTypeVal = $('#other_industry').val(); 993// if(otherOrganizationTypeVal) { 994// industryValues.push(otherOrganizationTypeVal); 995// } 996// } else { 997// industryValues.push($(this).val()); 998// } 999 1000// }); 1001// let userIndustry = industryValues.join(); 1002 1003// /* Copying Original Form Data To Duplicate One */ 1004// $('#copyOfTalkToSalesFrm').find('input[name="tts_firstname"]').val($('#speakToSales').find('input[name="firstname"]').val()); 1005// $('#copyOfTalkToSalesFrm').find('input[name="tts_lastname"]').val($('#speakToSales').find('input[name="lastname"]').val()); 1006// $('#copyOfTalkToSalesFrm').find('input[name="tts_title"]').val($('#speakToSales').find('input[name="title"]').val()); 1007// $('#copyOfTalkToSalesFrm').find('input[name="tts_organization"]').val($('#speakToSales').find('input[name="organization"]').val()); 1008// $('#copyOfTalkToSalesFrm').find('input[name="tts_email"]').val($('#speakToSales').find('input[name="email"]').val()); 1009// $('#copyOfTalkToSalesFrm').find('input[name="tts_phone"]').val($('#speakToSales').find('input[name="phone"]').val()); 1010// $('#copyOfTalkToSalesFrm').find('input[name="tts_location"]').val($('#speakToSales').find('input[name="set_new_locations"]').val()); 1011// $('#copyOfTalkToSalesFrm').find('input[name="tts_budget"]').val($('#speakToSales').find('input[name="budgetCheckbox"]:checked').val()); 1012// $('#copyOfTalkToSalesFrm').find('input[name="tts_message"]').val($('#speakToSales').find('textarea[name="message"]').val()); 1013// /* End of Copying Original Form Data To Duplicate One */ 1014 1015// var typeOfNeedVal = $('input[name="type-of-need"]:checked').val(); 1016// var otherTypeOfNeedVal = $('#other_type_of_need').val(); 1017 1018// var timeframeVal = $('input[name="TimeframeRadio"]:checked').val(); 1019// var otherTimeframeVal = $('#other_timeframe').val(); 1020 1021// var industryErrorCheck = true; 1022// $('input[name="industry[]"]:checked').each(function(){ 1023// var otherOrganizationTypeVal = $('#other_industry').val(); 1024// if($(this).val() == 'Other' && !otherOrganizationTypeVal) { 1025// $('.other-organization-error').show(); 1026// industryErrorCheck = false;
1027// return; 1028// } else { 1029// $('.other-organization-error').show(); 1030// } 1031// }); 1032 1033 1034 1035// /* Set Other Value of Type Of Need */ 1036// if(typeOfNeedVal == 'Other' && otherTypeOfNeedVal) { 1037// $('#copyOfTalkToSalesFrm').find('input[name="tts_type_of_need"]').val(otherTypeOfNeedVal); 1038// } else { 1039// $('#copyOfTalkToSalesFrm').find('input[name="tts_type_of_need"]').val($('#speakToSales').find('input[name="type-of-need"]:checked').val()); 1040// } 1041 1042// /* Set Other Value of Timeframe */ 1043// if(timeframeVal == 'Other' && otherTimeframeVal) { 1044// $('#copyOfTalkToSalesFrm').find('input[name="tts_timeframe"]').val(otherTimeframeVal); 1045// } else { 1046// $('#copyOfTalkToSalesFrm').find('input[name="tts_timeframe"]').val($('#speakToSales').find('input[name="TimeframeRadio"]:checked').val()); 1047// } 1048 1049// $('#copyOfTalkToSalesFrm').find('input[name="tts_industry"]').val(userIndustry); 1050 1051// if(!industryErrorCheck) { 1052// /*$('html, body').animate(function(){ 1053// scrollTop: $('#other_industry').offset().top 1054// }, 1000);*/ 1055// $("html, body").animate({ scrollTop: $('.speakToSales-industry-form').offset().top }, 1000); 1056// return; 1057// } else { 1058// //alert('Your form is ready to submit in AutoPilot. Check it on live once we push there.'); 1059// /*console.log('All okay'); 1060// console.log($('#copyOfTalkToSalesFrm').serialize()); 1061// return;*/ 1062// } 1063 1064 1065// /* Speak To Sales Data Layer Add */ 1066// window.dataLayer.push({ 1067// 'event':'submitSpeakToSales', 1068// 'vaporFormName':'speakToSales', 1069// 'title':$('#speakToSales').find('input[name="title"]').val(), 1070// 'organization':$('#speakToSales').find('input[name="organization"]').val(), 1071// 'typeOfNeed': (otherTypeOfNeedVal) ? otherTypeOfNeedVal : $('#speakToSales').find('input[name="type-of-need"]:checked').val(), 1072// 'industryList':userIndustry, 1073// 'selectLocationsList':$('#speakToSales').find('input[name="set_new_locations"]').val(), 1074// 'timeFrame': (otherTimeframeVal) ? otherTimeframeVal : $('#speakToSales').find('input[name="TimeframeRadio"]:checked').val(), 1075// 'approvedBudget':$('#speakToSales').find('input[name="budgetCheckbox"]:checked').val(), 1076// 'additionalDetails':$('#speakToSales').find('textarea[name="message"]').val(), 1077// }); 1078// /* End of Speak To Sales Data Layer Add */ 1079 1080// var contactData = $('#copyOfTalkToSalesFrm').serialize(); 1081// $.post(ajaxUrl.ajax_url, contactData, function(resp) { 1082// }, 'json'); 1083 1084// $('#copyOfTalkToSalesFrm').submit(); 1085// elementorProFrontend.modules.popup.showPopup( { id: 4581 } ); 1086// setTimeout(function () { 1087// location.reload(); 1088// }, 5000); 1089// }, 1090// rules: { 1091// "firstname": { 1092// required: true 1093// }, 1094// "lastname": { 1095// required: true, 1096// }, 1097// "phone": { 1098// /*required: true,*/ 1099// digits: true 1100// }, 1101// "organization": { 1102// required: true, 1103// }, 1104// "title": { 1105// required: true 1106// }, 1107// "email": { 1108// required: true, 1109// email: true, 1110// }, 1111// "set_new_locations": { 1112// required: true, 1113// }, 1114// "type-of-need": { 1115// required: true 1116// }, 1117// "budgetCheckbox": { 1118// required: true 1119// }, 1120// "TimeframeRadio": { 1121// required: true 1122// }, 1123// "message": { 1124// required: true 1125// }, 1126// "industry[]": { 1127// required: function(element) { 1128// if ($('.checkBox').is(':checked') == false) { 1129// return true; 1130// } else { 1131// return false;
1132// } 1133 1134// // return $(".checkBox").is(':empty'); 1135// } 1136// }, 1137 1138// hiddenRecaptcha: { 1139// required: function() { 1140// if (grecaptcha.getResponse() == '') { 1141// return true; 1142// } else { 1143// return false; 1144// } 1145// } 1146// }, 1147// "other_timeframe": { 1148// required: function() { 1149// var timeframeVal = $('input[name="TimeframeRadio"]:checked').val(); 1150// var otherTimeframeVal = $('#other_timeframe').val(); 1151// if(timeframeVal == 'Other' && !otherTimeframeVal) { 1152// return true; 1153// } else { 1154// return false; 1155// } 1156// } 1157// }, 1158// "other_type_of_need": { 1159// required: function() { 1160// var typeOfNeedVal = $('input[name="type-of-need"]:checked').val(); 1161// var otherTypeOfNeedVal = $('#other_type_of_need').val(); 1162// if(typeOfNeedVal == 'Other' && !otherTypeOfNeedVal) { 1163// return true; 1164// } else { 1165// return false; 1166// } 1167// } 1168// }, 1169// /*"other_industry": { 1170// required: function() { 1171// $('input[name="industry[]"]:checked').each(function(){ 1172// var otherOrganizationTypeVal = $('#other_industry').val(); 1173// if($(this).val() == 'Other' && !otherOrganizationTypeVal) { 1174// return true; 1175// } else { 1176// return false; 1177// } 1178// }); 1179// } 1180// },*/ 1181// }, 1182// messages: { 1183 1184// "firstname": { 1185// required: "Enter your firstname." 1186// }, 1187// "organization": { 1188// required: "Enter the organization." 1189// }, 1190// "lastname": { 1191// required: "Enter your lastname." 1192// }, 1193// "phone": { 1194// /*required: "Enter your phone no.",*/ 1195// digits: "Enter only digits." 1196// }, 1197// "title": { 1198// required: "Enter the title." 1199// }, 1200// "email": { 1201// required: "Enter a valid email address" 1202// }, 1203// "set_new_locations": { 1204// required: "Enter the location." 1205// }, 1206// "type-of-need": { 1207// required: "Please select the type of need." 1208// }, 1209// "budgetCheckbox": { 1210// required: "Please select any one." 1211// }, 1212// "TimeframeRadio": { 1213// required: "Please select timeframe." 1214// }, 1215// "message": { 1216// required: "Type your message." 1217// }, 1218// hiddenRecaptcha: { 1219// required: "Captcha is Required." 1220// }, 1221// "industry[]": { 1222// required: "Please select or type the name of industry." 1223// }, 1224// "other_timeframe": { 1225// required: "Please enter other timeframe." 1226// }, 1227// "other_type_of_need": { 1228// required: "Please enter other type of needs." 1229// } 1230// /*, 1231// "other_industry": { 1232// required: "Please enter other organization type." 1233// },*/ 1234 1235// }, 1236// ignore: [], 1237// errorClass: "invalid-feedback animated fadeInUp", 1238// errorElement: "div", 1239// errorPlacement: function(e, a) { 1240// if (a.hasClass('radio-need-input')) { 1241// jQuery(a).parent().parent().parent().parent().append(e); 1242// } else if (a.parent().hasClass('check-container')) { 1243// jQuery(a).parents('ul').append(e); 1244// } else if (a.hasClass('set_new_locations')) { 1245// //jQuery(a).parents('.locationDiv').append(e); 1246// jQuery(a).parents('.locationDiv').after(e); 1247// } else if (a.hasClass('project-checkbox-input')) { 1248// jQuery(a).parents('.project-checkbox-group').append(e); 1249// } else { 1250// jQuery(a).parent().append(e); 1251// } 1252// // e.insertAfter(a) 1253// }, 1254 1255// }); 1256 1257// }); 1258 1259 $(".speakToSales-form").validate({ 1260 submitHandler: function(form) { 1261 1262 let industryValues = []; 1263 $('#speakToSales').find('input[name="industry[]"]:checked').each(function(){ 1264 if($(this).val() == 'Other') { 1265 var otherOrganizationTypeVal = $('#other_industry').val(); 1266 if(otherOrganizationTypeVal) { 1267 industryValues.push(otherOrganizationTypeVal); 1268 } 1269 } else { 1270 industryValues.push($(this).val()); 1271 } 1272 1273 }); 1274 let userIndustry = industryValues.join(); 1275 1276 /* Copying Original Form Data To Duplicate One */ 1277 $('#copyOfTalkToSalesFrm').find('input[name="tts_firstname"]').val($('#speakToSales').find('input[name="firstname"]').val()); 1278 $('#copyOfTalkToSalesFrm').find('input[name="tts_lastname"]').val($('#speakToSales').find('input[name="lastname"]').val()); 1279 $('#copyOfTalkToSalesFrm').find('input[name="tts_title"]').val($('#speakToSales').find('input[name="title"]').val()); 1280 $('#copyOfTalkToSalesFrm').find('input[name="tts_organization"]').val($('#speakToSales').find('input[name="organization"]').val()); 1281 $('#copyOfTalkToSalesFrm').find('input[name="tts_email"]').val($('#speakToSales').find('input[name="email"]').val()); 1282 $('#copyOfTalkToSalesFrm').find('input[name="tts_phone"]').val($('#speakToSales').find('input[name="phone"]').val()); 1283 $('#copyOfTalkToSalesFrm').find('input[name="tts_location"]').val($('#speakToSales').find('input[name="set_new_locations"]').val()); 1284 $('#copyOfTalkToSalesFrm').find('input[name="tts_budget"]').val($('#speakToSales').find('input[name="budgetCheckbox"]:checked').val()); 1285 $('#copyOfTalkToSalesFrm').find('input[name="tts_message"]').val($('#speakToSales').find('textarea[name="message"]').val()); 1286 /* End of Copying Original Form Data To Duplicate One */ 1287 1288 var typeOfNeedVal = $('input[name="type-of-need"]:checked').val(); 1289 var otherTypeOfNeedVal = $('#other_type_of_need').val(); 1290 1291 var timeframeVal = $('input[name="TimeframeRadio"]:checked').val(); 1292 var otherTimeframeVal = $('#other_timeframe').val(); 1293 1294 var industryErrorCheck = true; 1295 $('input[name="industry[]"]:checked').each(function(){ 1296 var otherOrganizationTypeVal = $('#other_industry').val(); 1297 if($(this).val() == 'Other' && !otherOrganizationTypeVal) { 1298 $('.other-organization-error').show(); 1299 industryErrorCheck = false;
1300 return; 1301 } else { 1302 $('.other-organization-error').show(); 1303 } 1304 }); 1305 1306 1307 1308 /* Set Other Value of Type Of Need */ 1309 if(typeOfNeedVal == 'Other' && otherTypeOfNeedVal) { 1310 $('#copyOfTalkToSalesFrm').find('input[name="tts_type_of_need"]').val(otherTypeOfNeedVal); 1311 } else { 1312 $('#copyOfTalkToSalesFrm').find('input[name="tts_type_of_need"]').val($('#speakToSales').find('input[name="type-of-need"]:checked').val()); 1313 } 1314 1315 /* Set Other Value of Timeframe */ 1316 if(timeframeVal == 'Other' && otherTimeframeVal) { 1317 $('#copyOfTalkToSalesFrm').find('input[name="tts_timeframe"]').val(otherTimeframeVal); 1318 } else { 1319 $('#copyOfTalkToSalesFrm').find('input[name="tts_timeframe"]').val($('#speakToSales').find('input[name="TimeframeRadio"]:checked').val()); 1320 } 1321 1322 $('#copyOfTalkToSalesFrm').find('input[name="tts_industry"]').val(userIndustry); 1323 1324 if(!industryErrorCheck) { 1325 /*$('html, body').animate(function(){ 1326 scrollTop: $('#other_industry').offset().top 1327 }, 1000);*/ 1328 $("html, body").animate({ scrollTop: $('.speakToSales-industry-form').offset().top }, 1000); 1329 return; 1330 } else { 1331 //alert('Your form is ready to submit in AutoPilot. Check it on live once we push there.'); 1332 /*console.log('All okay'); 1333 console.log($('#copyOfTalkToSalesFrm').serialize()); 1334 return;*/ 1335 } 1336 1337 1338 /* Speak To Sales Data Layer Add */ 1339 window.dataLayer.push({ 1340 'event':'submitSpeakToSales', 1341 'vaporFormName':'speakToSales', 1342 'title':$('#speakToSales').find('input[name="title"]').val(), 1343 'organization':$('#speakToSales').find('input[name="organization"]').val(), 1344 'typeOfNeed': (otherTypeOfNeedVal) ? otherTypeOfNeedVal : $('#speakToSales').find('input[name="type-of-need"]:checked').val(), 1345 'industryList':userIndustry, 1346 'selectLocationsList':$('#speakToSales').find('input[name="set_new_locations"]').val(), 1347 'timeFrame': (otherTimeframeVal) ? otherTimeframeVal : $('#speakToSales').find('input[name="TimeframeRadio"]:checked').val(), 1348 'approvedBudget':$('#speakToSales').find('input[name="budgetCheckbox"]:checked').val(), 1349 'additionalDetails':$('#speakToSales').find('textarea[name="message"]').val(), 1350 }); 1351 /* End of Speak To Sales Data Layer Add */ 1352 1353 var contactData = $('#copyOfTalkToSalesFrm').serialize(); 1354 $.post(ajaxUrl.ajax_url, contactData, function(resp) { 1355 }, 'json'); 1356 1357 $('#copyOfTalkToSalesFrm').submit(); 1358 elementorProFrontend.modules.popup.showPopup( { id: 4581 } ); 1359 setTimeout(function () { 1360 location.reload(); 1361 }, 3000); 1362 }, 1363 rules: { 1364 "firstname": { 1365 required: true 1366 }, 1367 "lastname": { 1368 required: true, 1369 }, 1370 "phone": { 1371 /*required: true,*/ 1372 digits: true 1373 }, 1374 "organization": { 1375 required: true, 1376 }, 1377 "title": { 1378 required: true 1379 }, 1380 "email": { 1381 required: true, 1382 email: true, 1383 }, 1384 "set_new_locations": { 1385 required: true, 1386 }, 1387 "type-of-need": { 1388 required: true 1389 }, 1390 "budgetCheckbox": { 1391 required: true 1392 }, 1393 "TimeframeRadio": { 1394 required: true 1395 }, 1396 "industry[]": { 1397 required: function(element) { 1398 if ($('.checkBox').is(':checked') == false) { 1399 return true; 1400 } else { 1401 return false;
1402 } 1403 1404 // return $(".checkBox").is(':empty'); 1405 } 1406 }, 1407 1408 hiddenRecaptcha: { 1409 required: function() { 1410 if (grecaptcha.getResponse() == '') { 1411 return true; 1412 } else { 1413 return false; 1414 } 1415 } 1416 },/**/ 1417 "other_timeframe": { 1418 required: function() { 1419 var timeframeVal = $('input[name="TimeframeRadio"]:checked').val(); 1420 var otherTimeframeVal = $('#other_timeframe').val(); 1421 if(timeframeVal == 'Other' && !otherTimeframeVal) { 1422 return true; 1423 } else { 1424 return false; 1425 } 1426 } 1427 }, 1428 "other_type_of_need": { 1429 required: function() { 1430 var typeOfNeedVal = $('input[name="type-of-need"]:checked').val(); 1431 var otherTypeOfNeedVal = $('#other_type_of_need').val(); 1432 if(typeOfNeedVal == 'Other' && !otherTypeOfNeedVal) { 1433 return true; 1434 } else { 1435 return false; 1436 } 1437 } 1438 }, 1439 /*"other_industry": { 1440 required: function() { 1441 $('input[name="industry[]"]:checked').each(function(){ 1442 var otherOrganizationTypeVal = $('#other_industry').val(); 1443 if($(this).val() == 'Other' && !otherOrganizationTypeVal) { 1444 return true; 1445 } else { 1446 return false; 1447 } 1448 }); 1449 } 1450 },*/ 1451 }, 1452 messages: { 1453 1454 "firstname": { 1455 required: "Enter your firstname." 1456 }, 1457 "organization": { 1458 required: "Enter the organization." 1459 }, 1460 "lastname": { 1461 required: "Enter your lastname." 1462 }, 1463 "phone": { 1464 /*required: "Enter your phone no.",*/ 1465 digits: "Enter only digits." 1466 }, 1467 "title": { 1468 required: "Enter the title." 1469 }, 1470 "email": { 1471 required: "Enter a valid email address" 1472 }, 1473 "set_new_locations": { 1474 required: "Enter the location." 1475 }, 1476 "type-of-need": { 1477 required: "Please select the type of need." 1478 }, 1479 "budgetCheckbox": { 1480 required: "Please select any one." 1481 }, 1482 "TimeframeRadio": { 1483 required: "Please select timeframe." 1484 }, 1485 hiddenRecaptcha: { 1486 required: "Captcha is Required." 1487 },/**/ 1488 "industry[]": { 1489 required: "Please select or type the name of industry." 1490 }, 1491 "other_timeframe": { 1492 required: "Please enter other timeframe." 1493 }, 1494 "other_type_of_need": { 1495 required: "Please enter other type of needs." 1496 } 1497 /*, 1498 "other_industry": { 1499 required: "Please enter other organization type." 1500 },*/ 1501 1502 }, 1503 ignore: [], 1504 errorClass: "invalid-feedback animated fadeInUp", 1505 errorElement: "div", 1506 errorPlacement: function(e, a) { 1507 if (a.hasClass('radio-need-input')) { 1508 jQuery(a).parent().parent().parent().parent().append(e); 1509 } else if (a.parent().hasClass('check-container')) { 1510 jQuery(a).parents('ul').append(e); 1511 } else if (a.hasClass('set_new_locations')) { 1512 //jQuery(a).parents('.locationDiv').append(e); 1513 jQuery(a).parents('.locationDiv').after(e); 1514 } else if (a.hasClass('project-checkbox-input')) { 1515 jQuery(a).parents('.project-checkbox-group').append(e); 1516 } else { 1517 jQuery(a).parent().append(e); 1518 } 1519 // e.insertAfter(a) 1520 }, 1521 1522 }); 1523 // New Vapor Common Form 1524 $(".vaporCommonForm-form").validate({ 1525 submitHandler: function(form) { 1526 1527 var formType = ($( "#area_of_interest" ).val() == 'Sales' || $( "#area_of_interest" ).val() == 'Business Opportunity' || $( "#area_of_interest" ).val() == 'Partnership') ? true : false;
1528 let industryValues = []; 1529 $('#vaporCommonForm').find('input[name="industry[]"]:checked').each(function(){ 1530 if($(this).val() == 'Other') { 1531 var otherOrganizationTypeVal = $('#other_industry').val(); 1532 if(otherOrganizationTypeVal) { 1533 industryValues.push(otherOrganizationTypeVal); 1534 } 1535 } else { 1536 industryValues.push($(this).val()); 1537 } 1538 1539 }); 1540 let userIndustry = industryValues.join(); 1541 1542 /* Copying Original Form Data To Duplicate One */ 1543 $('#copyOfVaporCommonForm').find('input[name="tts_firstname"]').val($('#vaporCommonForm').find('input[name="firstname"]').val()); 1544 $('#copyOfVaporCommonForm').find('input[name="tts_lastname"]').val($('#vaporCommonForm').find('input[name="lastname"]').val()); 1545 $('#copyOfVaporCommonForm').find('input[name="tts_title"]').val($('#vaporCommonForm').find('input[name="title"]').val()); 1546 $('#copyOfVaporCommonForm').find('input[name="tts_organization"]').val($('#vaporCommonForm').find('input[name="organization"]').val()); 1547 $('#copyOfVaporCommonForm').find('input[name="tts_email"]').val($('#vaporCommonForm').find('input[name="email"]').val()); 1548 $('#copyOfVaporCommonForm').find('input[name="tts_phone"]').val($('#vaporCommonForm').find('input[name="phone"]').val()); 1549 $('#copyOfVaporCommonForm').find('input[name="tts_area_of_interest"]').val($('#vaporCommonForm').find('select[name="area_of_interest"]').val()); 1550 $('#copyOfVaporCommonForm').find('input[name="tts_location"]').val($('#vaporCommonForm').find('input[name="set_new_locations"]').val()); 1551 $('#copyOfVaporCommonForm').find('input[name="tts_budget"]').val($('#vaporCommonForm').find('input[name="budgetCheckbox"]:checked').val()); 1552 $('#copyOfVaporCommonForm').find('input[name="tts_message"]').val($('#vaporCommonForm').find('textarea[name="message"]').val()); 1553 /* End of Copying Original Form Data To Duplicate One */ 1554 1555 var typeOfNeedVal = $('input[name="type-of-need"]:checked').val(); 1556 var otherTypeOfNeedVal = $('#other_type_of_need').val(); 1557 1558 var timeframeVal = $('input[name="TimeframeRadio"]:checked').val(); 1559 var otherTimeframeVal = $('#other_timeframe').val(); 1560 1561 var industryErrorCheck = true; 1562 $('input[name="industry[]"]:checked').each(function(){ 1563 var otherOrganizationTypeVal = $('#other_industry').val(); 1564 if($(this).val() == 'Other' && !otherOrganizationTypeVal) { 1565 $('.other-organization-error').show(); 1566 industryErrorCheck = false; 1567 return; 1568 } else { 1569 $('.other-organization-error').show(); 1570 } 1571 }); 1572 if(formType == false){ 1573 industryErrorCheck = true; 1574 } 1575 1576 1577 1578 /* Set Other Value of Type Of Need */ 1579 if(typeOfNeedVal == 'Other' && otherTypeOfNeedVal) { 1580 $('#copyOfVaporCommonForm').find('input[name="tts_type_of_need"]').val(otherTypeOfNeedVal); 1581 } else { 1582 $('#copyOfVaporCommonForm').find('input[name="tts_type_of_need"]').val($('#vaporCommonForm').find('input[name="type-of-need"]:checked').val()); 1583 } 1584 1585 /* Set Other Value of Timeframe */ 1586 if(timeframeVal == 'Other' && otherTimeframeVal) { 1587 $('#copyOfVaporCommonForm').find('input[name="tts_timeframe"]').val(otherTimeframeVal); 1588 } else { 1589 $('#copyOfVaporCommonForm').find('input[name="tts_timeframe"]').val($('#vaporCommonForm').find('input[name="TimeframeRadio"]:checked').val()); 1590 } 1591 1592 $('#copyOfVaporCommonForm').find('input[name="tts_industry"]').val(userIndustry); 1593 1594 if(!industryErrorCheck) { 1595 /*$('html, body').animate(function(){ 1596 scrollTop: $('#other_industry').offset().top 1597 }, 1000);*/ 1598 $("html, body").animate({ scrollTop: $('.vaporCommonForm-industry-form').offset().top }, 1000); 1599 return; 1600 } else { 1601 //alert('Your form is ready to submit in AutoPilot. Check it on live once we push there.'); 1602 /*console.log('All okay'); 1603 console.log($('#copyOfVaporCommonForm').serialize()); 1604 return;*/ 1605 } 1606 1607 1608 /* Vapor Common Form Data Layer Add */ 1609 window.dataLayer.push({ 1610 'event':'submitvaporCommonForm', 1611 'vaporFormName':'vaporCommonForm', 1612 'title': $('#vaporCommonForm').find('input[name="title"]').val(), 1613 'organization': $('#vaporCommonForm').find('input[name="organization"]').val(), 1614 'first': $('#vaporCommonForm').find('input[name="firstname"]').val(), 1615 'last': $('#vaporCommonForm').find('input[name="lastname"]').val(), 1616 'email': $('#vaporCommonForm').find('input[name="email"]').val(), 1617 'phone': $('#vaporCommonForm').find('input[name="phone"]').val(), 1618 'interest': $('#vaporCommonForm').find('select[name="area_of_interest"]').val(), 1619 'organizationType': userIndustry, 1620 'selectLocationsList': $('#vaporCommonForm').find('input[name="set_new_locations"]').val(), 1621 'timeFrame': (otherTimeframeVal) ? otherTimeframeVal : $('#vaporCommonForm').find('input[name="TimeframeRadio"]:checked').val(), 1622 'approvedBudget': $('#vaporCommonForm').find('input[name="budgetCheckbox"]:checked').val(), 1623 'yourProject': $('#vaporCommonForm').find('textarea[name="message"]').val() 1624 }); 1625 /* End of Vapor Common Form Data Layer Add */ 1626 1627 var contactData = $('#copyOfVaporCommonForm').serialize(); 1628 $.post(ajaxUrl.ajax_url, contactData, function(resp) { 1629 }, 'json'); 1630 1631 $('#copyOfVaporCommonForm').submit(); 1632 elementorProFrontend.modules.popup.showPopup( { id: 4581 } ); 1633 setTimeout(function () { 1634 location.reload(); 1635 }, 3000); 1636 }, 1637 rules: { 1638 "firstname": { 1639 required: true 1640 }, 1641 "lastname": { 1642 required: true, 1643 }, 1644 "phone": { 1645 /*required: true,*/ 1646 digits: true 1647 }, 1648 "organization": { 1649 required: true, 1650 }, 1651 "title": { 1652 required: true 1653 }, 1654 "email": { 1655 required: true, 1656 email: true, 1657 }, 1658 "set_new_locations": { 1659 required: function() { 1660 if ($( "#area_of_interest" ).val() == 'Sales' || $( "#area_of_interest" ).val() == 'Business Opportunity' || $( "#area_of_interest" ).val() == 'Partnership') { 1661 return true; 1662 } else { 1663 return false;
1664 } 1665 } 1666 }, 1667 "type-of-need": { 1668 required: function() { 1669 if ($( "#area_of_interest" ).val() == 'Sales' || $( "#area_of_interest" ).val() == 'Business Opportunity' || $( "#area_of_interest" ).val() == 'Partnership') { 1670 return true; 1671 } else { 1672 return false; 1673 } 1674 } 1675 }, 1676 "budgetCheckbox": { 1677 required: function() { 1678 if ($( "#area_of_interest" ).val() == 'Sales' || $( "#area_of_interest" ).val() == 'Business Opportunity' || $( "#area_of_interest" ).val() == 'Partnership') { 1679 return true; 1680 } else { 1681 return false; 1682 } 1683 } 1684 }, 1685 "TimeframeRadio": { 1686 required: function() { 1687 if ($( "#area_of_interest" ).val() == 'Sales' || $( "#area_of_interest" ).val() == 'Business Opportunity' || $( "#area_of_interest" ).val() == 'Partnership') { 1688 return true; 1689 } else { 1690 return false; 1691 } 1692 } 1693 }, 1694 "industry[]": { 1695 required: function(element) { 1696 if ( ($( "#area_of_interest" ).val() == 'Sales' || $( "#area_of_interest" ).val() == 'Business Opportunity' || $( "#area_of_interest" ).val() == 'Partnership') && $('.checkBox').is(':checked') == false) { 1697 return true; 1698 } else { 1699 return false; 1700 } 1701 } 1702 }, 1703 1704 hiddenRecaptcha: { 1705 required: function() { 1706 if (grecaptcha.getResponse() == '') { 1707 return true; 1708 } else { 1709 return false; 1710 } 1711 } 1712 },/**/ 1713 "other_timeframe": { 1714 required: function() { 1715 var timeframeVal = $('input[name="TimeframeRadio"]:checked').val(); 1716 var otherTimeframeVal = $('#other_timeframe').val(); 1717 var formType = ($( "#area_of_interest" ).val() == 'Sales' || $( "#area_of_interest" ).val() == 'Business Opportunity' || $( "#area_of_interest" ).val() == 'Partnership') ? true : false; 1718 if(formType && timeframeVal == 'Other' && !otherTimeframeVal) { 1719 return true; 1720 } else { 1721 return false; 1722 } 1723 } 1724 }, 1725 "other_type_of_need": { 1726 required: function() { 1727 var typeOfNeedVal = $('input[name="type-of-need"]:checked').val(); 1728 var otherTypeOfNeedVal = $('#other_type_of_need').val(); 1729 var formType = ($( "#area_of_interest" ).val() == 'Sales' || $( "#area_of_interest" ).val() == 'Business Opportunity' || $( "#area_of_interest" ).val() == 'Partnership') ? true : false; 1730 if(formType && typeOfNeedVal == 'Other' && !otherTypeOfNeedVal) { 1731 return true; 1732 } else { 1733 return false; 1734 } 1735 } 1736 }, 1737 /*"other_industry": { 1738 required: function() { 1739 $('input[name="industry[]"]:checked').each(function(){ 1740 var otherOrganizationTypeVal = $('#other_industry').val(); 1741 if($(this).val() == 'Other' && !otherOrganizationTypeVal) { 1742 return true; 1743 } else { 1744 return false; 1745 } 1746 }); 1747 } 1748 },*/ 1749 }, 1750 messages: { 1751 1752 "firstname": { 1753 required: "Enter your firstname." 1754 }, 1755 "organization": { 1756 required: "Enter the organization." 1757 }, 1758 "lastname": { 1759 required: "Enter your lastname." 1760 }, 1761 "phone": { 1762 /*required: "Enter your phone no.",*/ 1763 digits: "Enter only digits." 1764 }, 1765 "title": { 1766 required: "Enter the title." 1767 }, 1768 "email": { 1769 required: "Enter a valid email address" 1770 }, 1771 "set_new_locations": { 1772 required: "Enter the location." 1773 }, 1774 "type-of-need": { 1775 required: "Please select the type of need." 1776 }, 1777 "budgetCheckbox": { 1778 required: "Please select any one." 1779 }, 1780 "TimeframeRadio": { 1781 required: "Please select timeframe." 1782 }, 1783 hiddenRecaptcha: { 1784 required: "Captcha is Required." 1785 },/**/ 1786 "industry[]": { 1787 required: "Please select or type the name of industry." 1788 }, 1789 "other_timeframe": { 1790 required: "Please enter other timeframe." 1791 }, 1792 "other_type_of_need": { 1793 required: "Please enter other type of needs." 1794 } 1795 }, 1796 ignore: [],
1797 errorClass: "invalid-feedback animated fadeInUp", 1798 errorElement: "div", 1799 errorPlacement: function(e, a) { 1800 if (a.hasClass('radio-need-input')) { 1801 jQuery(a).parent().parent().parent().parent().append(e); 1802 } else if (a.parent().hasClass('check-container')) { 1803 jQuery(a).parents('ul').append(e); 1804 } else if (a.hasClass('set_new_locations')) { 1805 //jQuery(a).parents('.locationDiv').append(e); 1806 jQuery(a).parents('.locationDiv').after(e); 1807 } else if (a.hasClass('project-checkbox-input')) { 1808 jQuery(a).parents('.project-checkbox-group').append(e); 1809 } else { 1810 jQuery(a).parent().append(e); 1811 } 1812 }, 1813 1814 }); 1815 1816}); 1817 1818// Map slider animation start 1819jQuery(document).ready(function($) { 1820 if ($('.location-dots').length != '') { 1821 let dots = document.querySelectorAll('.location-dots li'); 1822 let lines = document.querySelectorAll('.svg-wrapper [id^="line"]'); 1823 let locations = document.querySelectorAll('.svg-wrapper [id^="location"]'); 1824 let shadows = document.querySelectorAll('.svg-wrapper [id^="shadow"]'); 1825 1826 dots.forEach(el => { 1827 el.addEventListener('click', (e) => { 1828 let target = e.target; 1829 console.log(e) 1830 // Find the Index 1831 let index = [...target.parentNode.children].indexOf(target); 1832 1833 changeInMap(target, index); 1834 setRangeValue(document.querySelector("#rangeSlider"), index); 1835 }) 1836 }) 1837 1838 function changeInMap(target, index) { 1839 // States 1840 if (target.classList.contains('active')) { 1841 console.log('active found'); 1842 [...target.parentNode.children].map((el, i) => { 1843 // console.log(i) 1844 if (i > index) { 1845 // console.log(i) 1846 el.classList.remove('active') 1847 lines[i].classList.remove('active'); 1848 } else { 1849 console.log('first') 1850 } 1851 }) 1852 } else if (target.previousElementSibling && target.previousElementSibling.classList.contains('active')) { 1853 console.log('sibling got active'); 1854 target.classList.add('active'); 1855 lines[index].classList.add('active'); 1856 } else if (index == 0) { 1857 console.log('first'); 1858 target.classList.add('active'); 1859 lines[index].classList.add('active'); 1860 } else { 1861 console.log('jump'); 1862 let count = 0; 1863 for (let i = 0; i <= index; i++) { 1864 if (!dots[i].classList.contains('active')) { 1865 animate(i, count); 1866 count++; 1867 } 1868 } 1869 1870 function animate(i, times) { 1871 setTimeout(function() { 1872 // console.log(i); 1873 target.parentNode.children[i].classList.add('active') 1874 lines[i].classList.add('active'); 1875 }, 500 * times); 1876 } 1877 } 1878 } 1879 1880 // Range Slider Thumb 1881 let currentRangeVal = document.querySelector("#rangeSlider").value; 1882 document.querySelector("#rangeSlider").addEventListener('change', (e) => { 1883 let cvp = (currentRangeVal / 100).toFixed(2); 1884 let trv = (e.target.value / 100).toFixed(2); 1885 let diffForward, diffBackward; 1886 let value = 0; 1887 console.log(currentRangeVal, e.target.value) 1888 if (e.target.value > currentRangeVal) { 1889 console.log('+') 1890 diffForward = (trv - Math.floor(cvp)) > 0.3 ? true : false; 1891 console.log(trv - Math.floor(cvp)) 1892 if (trv - cvp < 1) { 1893 console.log('near') 1894 } else { 1895 console.log('far') 1896 } 1897 // value = diffForward ? Math.ceil(e.target.value / 100) : Math.floor(e.target.value / 100); 1898 value = (trv - cvp < 1) ? Math.ceil(e.target.value / 100) : Math.floor(e.target.value / 100); 1899 } else { 1900 console.log('-') 1901 diffBackward = (cvp - trv) > 0.3 ? true : false;
1902 console.log((cvp - trv)) 1903 value = (cvp - trv < 1) ? Math.floor(e.target.value / 100) : Math.ceil(e.target.value / 100); 1904 // value = diffBackward ? Math.floor(e.target.value / 100) : Math.ceil(e.target.value / 100); 1905 } 1906 console.log(e.target.value); 1907 // let value = e.target.value < 600 ? Math.ceil(e.target.value / 100) : Math.ceil(e.target.value / 100); 1908 console.log(value); 1909 setRangeValue(e.target, value); 1910 changeInMap(dots[value], value); 1911 }) 1912 document.querySelector("#rangeSlider").addEventListener('input', (e) => { 1913 console.log(e.target.value); 1914 }) 1915 1916 function setRangeValue(target, value) { 1917 target.value = (value * 100) < 700 ? value * 100 : 650; 1918 currentRangeVal = target.value; 1919 } 1920 } 1921}); 1922// Map slider animation end 1923 1924jQuery(document).ready(function($) { 1925 $('.location_image_box').each(function(){ 1926 var a = $(this).find('h3.elementor-image-box-title').clone(); 1927 $(this).find('h3.elementor-image-box-title').remove(); 1928 $(this).find('figure.elementor-image-box-img').append(a); 1929 1930 }); 1931 if ($(window).width() > 1024) { 1932 $('.custom_mega_menu ul.sub-menu').each(function(){ 1933 $(this).find('li').each(function(){ 1934 if (!$(this).hasClass('gr_full_box')) { 1935 var liClone = $(this); 1936 var aClone = $(this).find('a'); 1937 var childClone = $(this).find('a').children(); 1938 var aTextClone = $(this).find('a').clone().children().remove().end().text(); 1939 1940 var newText = "<span class='menuLinkText'>"+aTextClone+"</span>"; 1941 $(this).find('a').empty().append(newText).append(childClone); 1942 } 1943 }); 1944 }); 1945} 1946 1947if($('.datasheetNav').length != ''){ 1948 $('.datasheetNav .custom-option[data-value="#VEM20"]').hide(); 1949 $(document).on('click','.datasheetNav .custom-option',function(){ 1950 $('.datasheetNav .custom-option').show(); 1951 var item = $(this).text(); 1952 $('.datasheetNav .custom-select__trigger > span').text(item); 1953 $(this).hide(); 1954 1955 1956 }); 1957} 1958 1959$('.aboutsub a').click(function () { 1960 $( ".aboutsub" ).removeClass('active'); 1961 $( this ).parent().addClass('active'); 1962}); 1963 1964}); 1965 1966function setCookie(cname, cvalue, exdays) { 1967 const d = new Date(); 1968 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 1969 let expires = "expires="+d.toUTCString(); 1970 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 1971} 1972 1973function getCookie(cname) { 1974 let name = cname + "="; 1975 let ca = document.cookie.split(';'); 1976 for(let i = 0; i < ca.length; i++) {
1977 let c = ca[i]; 1978 while (c.charAt(0) == ' ') { 1979 c = c.substring(1); 1980 } 1981 if (c.indexOf(name) == 0) { 1982 return c.substring(name.length, c.length); 1983 } 1984 } 1985 return ""; 1986}
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.