PageSourceSearch

https://rethinkwords.com/js/custom.js

js rethinkwords.com collected 2026-10-01 10:17:54 UTC 46,275 bytes, 1,114 lines download raw bytes

1/*
2
3Template:  Webster - Responsive Multi-purpose HTML5 Template
4Author: potenzaglobalsolutions.com
5Design and Developed by: potenzaglobalsolutions.com
6
7NOTE: This file contains all scripts for the actual Template.
8
9*/
10
11/*================================================
12[  Table of contents  ]
13================================================
14
15:: Predefined Variables
16:: Tooltip
17:: Preloader
18:: Mega menu
19:: Owl carousel 
20:: Raindrops
21:: Php Contact Form 
22:: Counter
23:: Isotope
24:: Masonry
25:: Magnific Popup
26:: Back to top
27:: Accordion
28:: Audio video
29:: Progressbar
30:: Countdown
31:: placeholder
32:: Mobile slider
33:: One page nav
34:: NiceScroll
35:: Mailchimp
36:: PieChart
37:: Datetimepicker
38:: DataTable
39:: Wow animation on scroll
40:: Google.maps
41:: Select
42:: typer
43:: Search
44:: Cart
45:: Menu left-header
46:: Sidepanel
47:: Slickslider
48:: Javascript
49
50======================================
51[ End table content ]
52======================================*/
53//POTENZA var
54 
55 (function($){
56  "use strict";
57  var POTENZA = {};
58
59  /*************************
60  Predefined Variables
61*************************/ 
62var $window = $(window),
63    $document = $(document),
64    $body = $('body'),
65    $countdownTimer = $('.countdown'),
66    $bar = $('.bar'),
67    $pieChart = $('.round-chart'),
68    $progressBar = $('.skill-bar'),
69    $counter = $('.counter'),
70    $datetp = $('.datetimepicker');
71    //Check if function exists
72    $.fn.exists = function () {
73        return this.length > 0;
74    };
75
76
77/*************************
78      tooltip
79*************************/
80  $('[data-toggle="tooltip"]').tooltip();
81  $('[data-toggle="popover"]').popover()
82  
83/*************************
84        Preloader
85*************************/  
86  POTENZA.preloader = function () {
87       $("#load").fadeOut();
88       $('#pre-loader').delay(0).fadeOut('slow');
89   };
90 
91/*************************
92       Mega menu
93*************************/    
94 POTENZA.megaMenu = function () { 
95    loadScript(plugin_path + 'mega-menu/mega_menu.js', function() {
96      var nav =  $('#menu');
97      var l = nav.attr('data-pos');
98      var pos = 'horizontal';
99      if(l) pos = l;
100      nav.megaMenu({
101              // DESKTOP MODE SETTINGS
102              logo_align          : 'left',         // align the logo left or right. options (left) or (right)
103              links_align         : 'left',         // align the links left or right. options (left) or (right)
104              socialBar_align     : 'left',         // align the socialBar left or right. options (left) or (right)
105              searchBar_align     : 'right',        // align the search bar left or right. options (left) or (right)
106              trigger             : 'hover',        // show drop down using click or hover. options (hover) or (click)
107              effect              : 'expand-top',   // drop down effects. options (fade), (scale), (expand-top), (expand-bottom), (expand-left), (expand-right)
108              effect_speed        : 400,            // drop down show speed in milliseconds
109              sibling             : true,           // hide the others showing drop downs if this option true. this option works on if the trigger option is "click". options (true) or (false)
110              outside_click_close : true,           // hide the showing drop downs when user click outside the menu. this option works if the trigger option is "click". options (true) or (false)
111              top_fixed           : false,          // fixed the menu top of the screen. options (true) or (false)
112              sticky_header       : true,           // menu fixed on top when scroll down down. options (true) or (false)
113              sticky_header_height: 250,            // sticky header height top of the screen. activate sticky header when meet the height. option change the height in px value.
114              menu_position       : pos,            // change the menu position. options (horizontal), (vertical-left) or (vertical-right)
115              full_width          : false,          // make menu full width. options (true) or (false)
116             // MOBILE MODE SETTINGS
117              mobile_settings     : {
118                collapse            : true,         // collapse the menu on click. options (true) or (false)
119                sibling             : true,         // hide the others showing drop downs when click on current drop down. options (true) or (false)
120                scrollBar           : true,         // enable the scroll bar. options (true) or (false)
121                scrollBar_height    : 400,          // scroll bar height in px value. this option works if the scrollBar option true.
122                top_fixed           : false,        // fixed menu top of the screen. options (true) or (false)
123                sticky_header       : true,         // menu fixed on top when scroll down down. options (true) or (false)
124                sticky_header_height: 200           // sticky header height top of the screen. activate sticky header when meet the height. option change the height in px value.
125             }
126        });
127    });
128  }
129
130  /*************************
131       owl carousel 
132*************************/
133    POTENZA.carousel = function () {
134      var owlslider = jQuery("div.owl-carousel");
135      if(owlslider.length > 0) {  
136         loadScript(plugin_path + 'owl-carousel/owl-carousel.min.js', function() {
137           owlslider.each(function () {
138            var $this = $(this),
139                $items = ($this.data('items')) ? $this.data('items') : 1,
140                $loop = ($this.attr('data-loop')) ? $this.data('loop') : true,
141                $navdots = ($this.data('nav-dots')) ? $this.data('nav-dots') : false,
142                $navarrow = ($this.data('nav-arrow')) ? $this.data('nav-arrow') : false,
143                $autoplay = ($this.attr('data-autoplay')) ? $this.data('autoplay') : true,
144                $autospeed = ($this.attr('data-autospeed')) ? $this.data('autospeed') : 5000,
145                $smartspeed = ($this.attr('data-smartspeed')) ? $this.data('smartspeed') : 1000,
146                $autohgt = ($this.data('autoheight')) ? $this.data('autoheight') : false,
147                $space = ($this.attr('data-space')) ? $this.data('space') : 30;    
148           
149                $(this).owlCarousel({
150                    loop: $loop,
151                    items: $items,
152                    responsive: {
153                      0:{items: $this.data('xx-items') ? $this.data('xx-items') : 1},
154                      480:{items: $this.data('xs-items') ? $this.data('xs-items') : 1},
155                      768:{items: $this.data('sm-items') ? $this.data('sm-items') : 2},
156                      980:{items: $this.data('md-items') ? $this.data('md-items') : 3},
157                      1200:{items: $items}
158                    },
159                    dots: $navdots,
160                    autoplayTimeout:$autospeed,
161                    smartSpeed: $smartspeed,
162                    autoHeight:$autohgt,
163                    margin:$space,
164                    nav: $navarrow,
165                    navText:["<i class='fa fa-angle-left fa-2x'></i>","<i class='fa fa-angle-right fa-2x'></i>"],
166                    autoplay: $autoplay,
167                    autoplayHoverPause: true   
168                }); 
169           }); 
170         });
171      }
172    }
173    
174/*************************
175      raindrops
176*************************/
177POTENZA.raindrops = function () {
178  if ($('.raindrops').exists()) {
179     loadScript(plugin_path + 'raindrops/raindrops.js', function() {
180         $('#raindrops').raindrops({color:'#84ba3f',
181         canvasHeight:50});
182     });
183    }
184};
185
186/*************************
187  PHP Contact Form 
188*************************/
189 POTENZA.contactform = function () {
190      $( "#contactform" ).submit(function( event ) {
191          $("#ajaxloader").show();
192          $("#contactform").hide();
193          $.ajax({
194            url:'mail/contact-form.php', /* original - url:'php/contact-form.php' */
195            data:$(this).serialize(),
196            type:'post',
197            success:function(response){
198              $("#ajaxloader").hide();
199              $("#contactform").show();
200              
201              $("#formmessage").html(response).show().delay(20000).fadeOut('slow');
202            }
203          });
204          event.preventDefault();
205        });
206    }
207 
208/*************************
209  PHP WeThinkReThink Form 
210*************************/
211 POTENZA.wethinkrethinkform = function () {
212      $( "#wethinkrethinkform" ).submit(function( event ) {
213          $("#ajaxloader").show();
214          $("#wethinkrethinkform").hide();
215          $.ajax({
216            url:'mail/wethinkrethink-form.php', 
217            data:$(this).serialize(),
218            type:'post',
219            success:function(response){
220              $("#ajaxloader").hide();
221              $("#wethinkrethinkform").show();
222              
223              $("#formmessage").html(response).show().delay(20000).fadeOut('slow');
224            }
225          });
226          event.preventDefault();
227        });
228    }
229
230/*************************
231  PHP Student Ambassador Form 
232*************************/
233 POTENZA.studentambdform = function () {
234      $( "#studentambdform" ).submit(function( event ) {
235          $("#ajaxloader").show();
236          $("#studentambdform").hide();
237          $.ajax({
238            url:'mail/studentambd-form.php', 
239            data:$(this).serialize(),
240            type:'post',
241            success:function(response){
242              $("#ajaxloader").hide();
243              $("#studentambdform").show();
244              
245              $("#formmessage").html(response).show().delay(20000).fadeOut('slow');
246            }
247          });
248          event.preventDefault();
249        });
250    }
251
252/*************************
253  PHP Law Enforcement Form 
254*************************/
255 POTENZA.lawenforcementform = function () {
256      $( "#lawenforcementform" ).submit(function( event ) {
257          $("#ajaxloader").show();
258          $("#lawenforcementform").hide();
259          $.ajax({
260            url:'mail/lawenforcement-form.php', 
261            data:$(this).serialize(),
262            type:'post',
263            success:function(response){
264              $("#ajaxloader").hide();
265              $("#lawenforcementform").show();
266              
267              $("#formmessage").html(response).show().delay(20000).fadeOut('slow');
268            }
269          });
270          event.preventDefault();
271        });
272    }
273
274/*************************
275  PHP Find Chapter Form 
276*************************/
277 POTENZA.findchapterform = function () {
278      $( "#findchapterform" ).submit(function( event ) {
279          $("#ajaxloader").show();
280          $("#findchapterform").hide();
281          $.ajax({
282            url:'mail/findchapter-form.php', 
283            data:$(this).serialize(),
284            type:'post',
285            success:function(response){
286              $("#ajaxloader").hide();
287              $("#findchapterform").show();
288              
289              $("#formmessage").html(response).show().delay(20000).fadeOut('slow');
290            }
291          });
292          event.preventDefault();
293        });
294    }
295
296/*************************
297  PHP Sponsor ReThink Form 
298*************************/
299 POTENZA.sponsorrethinkform = function () {
300      $( "#sponsorrethinkform" ).submit(function( event ) {
301          $("#ajaxloader").show();
302          $("#sponsorrethinkform").hide();
303          $.ajax({
304            url:'mail/sponsorrethink-form.php', 
305            data:$(this).serialize(),
306            type:'post',
307            success:function(response){
308              $("#ajaxloader").hide();
309              $("#sponsorrethinkform").show();
310              
311              $("#formmessage").html(response).show().delay(20000).fadeOut('slow');
312            }
313          });
314          event.preventDefault();
315        });
316    }
317
318/*************************
319  PHP Adopt ReThink Form 
320*************************/
321 POTENZA.adoptrethinkform = function () {
322      $( "#adoptrethinkform" ).submit(function( event ) {
323          $("#ajaxloader").show();
324          $("#adoptrethinkform").hide();
325          $.ajax({
326            url:'mail/adoptrethink-form.php', 
327            data:$(this).serialize(),
328            type:'post',
329            success:function(response){
330              $("#ajaxloader").hide();
331              $("#adoptrethinkform").show();
332              
333              $("#formmessage").html(response).show().delay(20000).fadeOut('slow');
334            }
335          });
336          event.preventDefault();
337        });
338    }
339
340/*************************
341  PHP Start Chapter Form 
342*************************/
343 POTENZA.startchapterform = function () {
344      $( "#startchapterform" ).submit(function( event ) {
345          $("#ajaxloader").show();
346          $("#startchapterform").hide();
347          $.ajax({
348            url:'mail/startchapter-form.php', 
349            data:$(this).serialize(),
350            type:'post',
351            success:function(response){
352              $("#ajaxloader").hide();
353              $("#startchapterform").show();
354              
355              $("#formmessage").html(response).show().delay(20000).fadeOut('slow');
356            }
357          });
358          event.preventDefault();
359        });
360    }
361
362/*************************
363  PHP Bulk Order Form 
364*************************/
365 POTENZA.bulkorderform = function () {
366      $( "#bulkorderform" ).submit(function( event ) {
367          $("#ajaxloader").show();
368          $("#bulkorderform").hide();
369          $.ajax({
370            url:'mail/bulkorder-form.php', 
371            data:$(this).serialize(),
372            type:'post',
373            success:function(response){
374              $("#ajaxloader").hide();
375              $("#bulkorderform").show();
376              
377              $("#formmessage").html(response).show().delay(20000).fadeOut('slow');
378            }
379          });
380          event.preventDefault();
381        });
382    }
383
384/*************************
385  PHP Nominate Student Form 
386*************************/
387 POTENZA.nominatestudentform = function () {
388      $( "#nominatestudentform" ).submit(function( event ) {
389          $("#ajaxloader").show();
390          $("#nominatestudentform").hide();
391          $.ajax({
392            url:'mail/nominatestudent-form.php', 
393            data:$(this).serialize(),
394            type:'post',
395            success:function(response){
396              $("#ajaxloader").hide();
397              $("#nominatestudentform").show();
398              
399              $("#formmessage").html(response).show().delay(20000).fadeOut('slow');
400            }
401          });
402          event.preventDefault();
403        });
404    }
405
406	
407/*************************
408       counter
409*************************/  
410 POTENZA.counters = function () {
411  var counter = jQuery(".counter");
412  if(counter.length > 0) {  
413      loadScript(plugin_path + 'counter/jquery.countTo.js', function() {
414        $counter.each(function () {
415         var $elem = $(this);                 
416           $elem.appear(function () {
417             $elem.find('.timer').countTo();
418          });                  
419        });
420      });
421    }
422  };
423 
424/*************************
425         Isotope
426*************************/
427POTENZA.Isotope = function () {
428   loadScript(plugin_path + 'isotope/isotope.pkgd.min.js', function() {
429      var $isotope = $(".isotope"),
430          $itemElement = '.grid-item',
431          $filters = $('.isotope-filters');      
432        if ($isotope.exists()) {
433            $isotope.isotope({
434            resizable: true,
435            itemSelector: $itemElement,
436              masonry: {
437                gutterWidth: 10
438              }
439            });     
440       $filters.on( 'click', 'button', function() {
441         var $val = $(this).attr('data-filter');
442             $isotope.isotope({ filter: $val });       
443             $filters.find('.active').removeClass('active');
444             $(this).addClass('active');
445      });     
446    }
447   }); 
448}
449
450/*************************
451         masonry
452*************************/
453POTENZA.masonry = function () {
454  loadScript(plugin_path + 'isotope/isotope.pkgd.min.js', function() {
455    setTimeout(function() {
456      var $masonry = $('.masonry-main .masonry'),
457          $itemElement = '.masonry-main .masonry-item',
458          $filters = $('.masonry-main .isotope-filters');  
459          if ($masonry.exists()) {
460            $masonry.isotope({
461              resizable: true,
462              percentPosition: true,
463              itemSelector: $itemElement,
464              masonry: {
465                gutterWidth: 0
466              }              
467            });
468               // bind filter button click
469           $filters.on( 'click', 'button', function() {
470              var filterValue = $(this).attr('data-filter');
471               $masonry.isotope({ filter: filterValue });
472            });
473
474          $filters.each( function( i, buttonGroup ) {
475            var $buttonGroup = $( buttonGroup );
476            $buttonGroup.on( 'click', 'button', function() {
477              $buttonGroup.find('.active').removeClass('active');
478              $(this).addClass('active');
479            });
480          }); 
481       } 
482        }, 100); 
483   }); 
484  }
485
486/*************************
487    Magnific Popup
488*************************/  
489  POTENZA.mediaPopups = function () {
490     if ($(".popup-single").exists() || $(".popup-gallery").exists() || $('.modal-onload').exists() || $(".popup-youtube, .popup-vimeo, .popup-gmaps").exists()) {
491      loadScript(plugin_path + 'magnific-popup/jquery.magnific-popup.min.js', function() {
492        if ($(".popup-single").exists()) {
493             $('.popup-single').magnificPopup({type:'image'});
494          }
495           if ($(".popup-gallery").exists()) {
496              $('.popup-gallery').magnificPopup({
497                  delegate: 'a.portfolio-img',
498                  type: 'image',
499                  tLoading: 'Loading image #%curr%...',
500                  mainClass: 'mfp-img-mobile',
501                  gallery: {
502                      enabled: true,
503                      navigateByImgClick: true,
504                      preload: [0,1] // Will preload 0 - before current, and 1 after the current image
505                  },
506                  image: {
507                      tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
508                      titleSrc: function(item) {
509                          return item.el.attr('title') + '<small>by Marsel Van Oosten</small>';
510                      }
511                 }
512             }); 
513          }
514        if ($(".popup-youtube, .popup-vimeo, .popup-gmaps").exists()) {
515                  $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
516                  disableOn: 700,
517                  type: 'iframe',
518                  mainClass: 'mfp-fade',
519                  removalDelay: 160,
520                  preloader: false,
521                  fixedContentPos: false
522            });
523        }
524        var $modal = $('.modal-onload');
525        if( $modal.length > 0 ) {
526           $('.popup-modal').magnificPopup({
527            type: 'inline'
528          });
529          $(document).on('click', '.popup-modal-dismiss', function (e) {
530            e.preventDefault();
531            $.magnificPopup.close();
532          });
533          var elementTarget   = $modal.attr('data-target');
534           setTimeout(function() {
535                  $.magnificPopup.open({
536                      items: { src: elementTarget },
537                      type: "inline",
538                      mainClass: "mfp-no-margins mfp-fade",
539                      closeBtnInside: !0,
540                      fixedContentPos: !0,
541                      removalDelay: 500
542                  }, 0)
543              }, 1500);
544         }
545       }); 
546    }
547  }
548
549/*************************
550     Back to top
551*************************/
552 POTENZA.goToTop = function () {
553  var $goToTop = $('#back-to-top');
554      $goToTop.hide();
555        $window.scroll(function(){
556          if ($window.scrollTop()>100) $goToTop.fadeIn();
557          else $goToTop.fadeOut();
558      });
559    $goToTop.on("click", function () {
560        $('body,html').animate({scrollTop:0},1000);
561        return false;
562    });
563  }
564
565 /*************************
566      Accordion
567*************************/
568  POTENZA.accordion = function () {
569
570    $('.accordion').each(function (i, elem) {
571       var $elem = $(this),
572           $acpanel = $elem.find(".acd-group > .acd-des"),
573           $acsnav =  $elem.find(".acd-group > .acd-heading");
574          $acpanel.hide().first().slideDown("easeOutExpo");
575          $acsnav.first().parent().addClass("acd-active");
576          $acsnav.on('click', function () {
577            if(!$(this).parent().hasClass("acd-active")){
578              var $this = $(this).next(".acd-des");
579              $acsnav.parent().removeClass("acd-active");
580              $(this).parent().addClass("acd-active");
581              $acpanel.not($this).slideUp("easeInExpo");
582              $(this).next().slideDown("easeOutExpo");
583            }else{
584               $(this).parent().removeClass("acd-active");
585               $(this).next().slideUp("easeInExpo");
586            }
587            return false;
588        });
589      });
590  } 
591
592/*************************
593     audio video
594*************************/ 
595    POTENZA.mediav = function () {
596      if ($(".audio-video").exists()) {
597        loadScript(plugin_path + 'mediaelement-and-player/mediaelement-and-player.js', function() {
598        $('audio,video').mediaelementplayer();
599        });
600       }
601     }
602
603 /*************************
604       Progressbar
605*************************/  
606    POTENZA.progressBar = function () {
607        if ($progressBar.exists()) {
608            $progressBar.each(function (i, elem) {
609                var $elem = $(this),
610                    percent = $elem.attr('data-percent') || "100",
611                    delay = $elem.attr('data-delay') || "100",
612                    type = $elem.attr('data-type') || "%";
613
614                if (!$elem.hasClass('progress-animated')) {
615                    $elem.css({
616                        'width': '0%'
617                    });
618                }
619                var progressBarRun = function () {
620                    $elem.animate({
621                        'width': percent + '%'
622                    }, 'easeInOutCirc').addClass('progress-animated');
623
624                    $elem.delay(delay).append('<span class="progress-type animated fadeIn">' + type + '</span><span class="progress-number animated fadeIn">' + percent + '</span>');
625                };
626
627                    $(elem).appear(function () {
628                        setTimeout(function () {
629                            progressBarRun();
630                        }, delay);
631                    });
632            });
633        }
634    };
635 
636/*************************
637         Countdown
638*************************/
639    POTENZA.countdownTimer = function () {
640        if ($countdownTimer.exists()) {
641            loadScript(plugin_path + 'countdown/jquery.downCount.js', function() {
642                $countdownTimer.downCount({
643                    date: '12/25/2018 12:00:00', // Month/Date/Year HH:MM:SS
644                    offset: -4
645                });
646            });
647        }
648    }
649
650/*********************************
651         Mobile slider
652*********************************/  
653    POTENZA.mobileslider = function () { 
654        var mobileslider = jQuery("#mobile-slider");
655          if(mobileslider.length > 0) { 
656             loadScript(plugin_path + 'mobile-slider/zenith.min.js', function() {
657               $('#mobile-slider').zenith({
658                layout: 'mobile-slider' , 
659                slideSpeed: 450, 
660                autoplaySpeed: 2000
661            });
662        });
663      }
664    }
665 
666/*************************
667        One page
668*************************/
669    POTENZA.onepagenav = function () { 
670
671            // Cache selectors
672      var lastId,
673          topMenu = $("#onepagenav"),
674          topMenuHeight = topMenu.outerHeight()-30,
675          // All list items
676          menuItems = topMenu.find("a"),
677          // Anchors corresponding to menu items
678          scrollItems = menuItems.map(function(){
679            var item = $($(this).attr("href"));
680            if (item.length) { return item; }
681          });
682
683      // Bind click handler to menu items
684      // so we can get a fancy scroll animation
685      menuItems.on('click', function(e) {
686        var href = $(this).attr("href"),
687            offsetTop = href === "#" ? 0 : $(href).offset().top-topMenuHeight+1;
688        $('html, body').stop().animate({ 
689            scrollTop: offsetTop
690        }, 1200);
691        if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { 
692          $('#onepagenav .menu-mobile-collapse-trigger,.vertical-header a.but').click();
693        }
694        e.preventDefault();
695      });
696
697      // Bind to scroll
698      $window.scroll(function(){
699         // Get container scroll position
700         var fromTop = $(this).scrollTop()+topMenuHeight;
701         
702         // Get id of current scroll item
703         var cur = scrollItems.map(function(){
704           if ($(this).offset().top < fromTop)
705             return this;
706         });
707         // Get the id of the current element
708         cur = cur[cur.length-1];
709         var id = cur && cur.length ? cur[0].id : "";
710         
711         if (lastId !== id) {
712             lastId = id;
713             // Set/remove active class
714             menuItems
715               .parent().removeClass("active")
716               .end().filter("[href='#"+id+"']").parent().addClass("active");
717         }                   
718      });
719
720         $("#myNavbar a,.move").on('click', function(event) {
721            if (this.hash !== "") {
722               event.preventDefault();
723                var hash = this.hash; 
724                var offsetheight = 0;          
725                if($('nav').hasClass('affix-top')){
726                    offsetheight = 100;
727                }
728                 $('html, body').animate({
729                  scrollTop: $(hash).offset().top - offsetheight
730                 }, 800, function(){
731                 window.location.hash = hash;
732               });          
733              } // End if
734             if($('.navbar-toggle').css('display') != 'none'){
735               $(".navbar-toggle").trigger( "click" );
736             }
737        });
738    }
739
740  /*************************
741        NiceScroll
742*************************/ 
743    POTENZA.pniceScroll = function () { 
744        loadScript(plugin_path + 'nicescroll/jquery.nicescroll.js', function() {
745        $(".scrollbar").niceScroll({
746          scrollspeed: 150,
747          mousescrollstep: 38,
748          cursorwidth: 5,
749          cursorborder: 0,
750          cursorcolor: '#2f3742',
751          autohidemode: true,
752          zindex: 9,
753          horizrailenabled: false,
754          cursorborderradius: 0,
755        });
756       });  
757    }
758
759/*************************
760     mailchimp
761*************************/
762  POTENZA.mailchimp = function () {
763         $(document).on('click','#mc-embedded-subscribe',function(event){
764          event.preventDefault();       
765          var email_id = $('#mce-EMAIL').val();
766          var val_email_id = validateEmail(email_id);        
767          if (email_id != "" && val_email_id === true) {
768              var failure_message = 'Whoops, looks like there was a problem. Please try again later.';
769              var memberid=email_id.toLowerCase();
770              var url = memberid;
771              
772              $.ajax({
773                 type: 'POST',
774                 url: 'mail/mailchimp-action.php', /* original - url: 'php/mailchimp-action.php', */
775                 data: {url:url},
776                 dataType: 'json',
777                 success: function(data){
778                      $('#msg').html(data);           
779                 },
780              });
781          } else {
782              $('#msg').html('<p style="color: #EA4335">Enter the E-mail id</p>'); 
783              return false;    
784          }
785          return false;
786      });
787      function validateEmail(email) {
788          var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
789          return re.test(email);
790      }             
791   }
792
793/****************************************************
794              pieChart
795****************************************************/
796 POTENZA.pieChart = function () {
797        if ($pieChart.exists()) {
798            loadScript(plugin_path + 'easy-pie-chart/easy-pie-chart.js', function() {
799            $pieChart.each(function () {
800                var $elem = $(this),
801                    pieChartSize = $elem.attr('data-size') || "160",
802                    pieChartAnimate = $elem.attr('data-animate') || "2000",
803                    pieChartWidth = $elem.attr('data-width') || "6",
804                    pieChartColor = $elem.attr('data-color') || "#84ba3f",
805                    pieChartTrackColor = $elem.attr('data-trackcolor') || "rgba(0,0,0,0.10)";
806                $elem.find('span, i').css({
807                    'width': pieChartSize + 'px',
808                    'height': pieChartSize + 'px',
809                    'line-height': pieChartSize + 'px'
810                });
811                $elem.appear(function () {
812                    $elem.easyPieChart({
813                        size: Number(pieChartSize),
814                        animate: Number(pieChartAnimate),
815                        trackColor: pieChartTrackColor,
816                        lineWidth: Number(pieChartWidth),
817                        barColor: pieChartColor,
818                        scaleColor: false,
819                        lineCap: 'square',
820                        onStep: function (from, to, percent) {
821                            $elem.find('span.percent').text(Math.round(percent));
822                        }
823                    });
824               });
825            });
826         });
827      }
828    }
829
830/*************************
831      datetimepicker
832*************************/
833POTENZA.datetimepick = function () {
834   if ($datetp.exists()) {
835     loadScript(plugin_path + 'bootstrap-datetimepicker/moment-datepicker.js', function() {
836       loadScript(plugin_path + 'bootstrap-datetimepicker/bootstrap-datetimepicker.min.js', function() {
837          $datetp.each(function(){
838            var frmt = 'DD/MM/YYYY';
839            if($(this).attr('data-format')) frmt = $(this).attr('data-format');
840            $(this).datetimepicker({ format: frmt});
841           });
842        });
843      });
844     }
845   }
846
847/*************************
848      DataTable
849*************************/  
850POTENZA.datatables = function () {
851   if ($('#datatable').exists()) {
852       loadScript(plugin_path + 'bootstrap-datatables/jquery.dataTables.min.js', function() {
853       loadScript(plugin_path + 'bootstrap-datatables/dataTables.bootstrap4.min.js', function() {
854      $('#datatable').DataTable();
855     });
856       });
857    }
858 };
859
860/*********************************
861    Wow animation on scroll
862*********************************/
863POTENZA.wowanimation = function () {
864    if ($('.wow').exists()) {
865        var wow = new WOW({
866           animateClass: 'animated',
867           offset: 100,
868           mobile: false
869        });
870       wow.init();
871     }
872  } 
873 
874/*************************
875       Google.maps
876*************************/
877POTENZA.googlemaps = function () {
878  if ($('.g-map').exists()) {
879    /* loadScript('https://maps.googleapis.com/maps/api/js?key=AIzaSyDfHfEurgj3epj0uPevQ-djOoIsLSc7HkY&callback=initMap', function() {  ** Provided by Webster **/
880    loadScript('https://maps.googleapis.com/maps/api/js?key=AIzaSyDGCjCDZlx8dLobSAK1iw-JYw_kDRPoD-M', function() {  /* decided against it as Google Cloud Platform - GCP Maps requires Credit Card */
881      $('.g-map').each(function(){
882            var id = $(this).attr('id');
883            var color = $(this).attr('data-type');
884            var clr = [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#000000"},{"lightness":16}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":17}]}];
885            if(color === 'green') clr = [{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#84ba3f"},{"visibility":"on"}]}];
886            else if(color === 'midnight') clr = [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"color":"#000000"},{"lightness":13}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#144b53"},{"lightness":14},{"weight":1.4}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#08304b"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#0c4152"},{"lightness":5}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#0b434f"},{"lightness":25}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"color":"#0b3d51"},{"lightness":16}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"}]},{"featureType":"transit","elementType":"all","stylers":[{"color":"#146474"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#021019"}]}];
887            else if(color === 'light') clr = [{"featureType":"administrative.locality","elementType":"all","stylers":[{"hue":"#2c2e33"},{"saturation":7},{"lightness":19},{"visibility":"on"}]},{"featureType":"landscape","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"simplified"}]},{"featureType":"poi","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"off"}]},{"featureType":"road","elementType":"geometry","stylers":[{"hue":"#bbc0c4"},{"saturation":-93},{"lightness":31},{"visibility":"simplified"}]},{"featureType":"road","elementType":"labels","stylers":[{"hue":"#bbc0c4"},{"saturation":-93},{"lightness":31},{"visibility":"on"}]},{"featureType":"road.arterial","elementType":"labels","stylers":[{"hue":"#bbc0c4"},{"saturation":-93},{"lightness":-2},{"visibility":"simplified"}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"hue":"#e9ebed"},{"saturation":-90},{"lightness":-8},{"visibility":"simplified"}]},{"featureType":"transit","elementType":"all","stylers":[{"hue":"#e9ebed"},{"saturation":10},{"lightness":69},{"visibility":"on"}]},{"featureType":"water","elementType":"all","stylers":[{"hue":"#e9ebed"},{"saturation":-78},{"lightness":67},{"visibility":"simplified"}]}]
888            else if(color === 'grey') clr = [{"featureType":"landscape","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"stylers":[{"hue":"#00aaff"},{"saturation":-100},{"gamma":2.15},{"lightness":12}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"visibility":"on"},{"lightness":24}]},{"featureType":"road","elementType":"geometry","stylers":[{"lightness":57}]}]
889            else if(color ==='blackandwhite') clr = [{"featureType":"water","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"on"}]},{"featureType":"landscape","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"on"}]},{"featureType":"road","elementType":"geometry","stylers":[{"hue":"#000000"},{"saturation":-100},{"lightness":-100},{"visibility":"simplified"}]},{"featureType":"road","elementType":"labels","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"off"}]},{"featureType":"poi","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"off"}]},{"featureType":"administrative","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":0},{"lightness":100},{"visibility":"off"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"hue":"#000000"},{"saturation":0},{"lightness":-100},{"visibility":"on"}]},{"featureType":"transit","elementType":"labels","stylers":[{"hue":"#ffffff"},{"saturation":0},{"lightness":100},{"visibility":"off"}]}]
890            google.maps.event.addDomListener(window, 'load', init(id,clr));   
891         });
892         function init(id,clr) {
893                var mapOptions = {
894                    zoom: 11,
895                    center: new google.maps.LatLng(41.88841, -87.63545), //Update Latitude and Longitude here
896                    styles:clr 
897                };
898                var mapElement = document.getElementById(id);
899                var map = new google.maps.Map(mapElement, mapOptions);
900                var marker = new google.maps.Marker({
901                    position: new google.maps.LatLng(41.88841, -87.63545),
902                    map: map,
903                    title: 'Snazzy!'
904                });
905          }
906       });
907    }
908} 
909
910/*************************
911      select
912*************************/ 
913POTENZA.fancyselect = function () {
914  if ($('.fancyselect').exists()) {
915    loadScript(plugin_path + 'jquery-nice-select/jquery-nice-select.js', function() {
916       $('select.fancyselect:not(.ignore)').niceSelect();      
917      });
918    }     
919};
920
921/*************************
922      typer
923*************************/
924POTENZA.typer = function () {
925  if ($('.typer').exists()) {
926    loadScript(plugin_path + 'typer/jquery.typer.js', function() {
927      });
928    }     
929};
930
931/*************************
932       Search
933*************************/ 
934POTENZA.searchbox = function () {
935   if (jQuery('.search').exists()) {
936      jQuery('.search-btn').on("click", function () {
937         jQuery('.search').toggleClass("search-open");
938           return false;
939          });
940       jQuery("html, body").on('click', function (e) {
941        if (!jQuery(e.target).hasClass("not-click")) {
942
943             jQuery('.search').removeClass("search-open");
944         }
945     });
946    }
947}
948
949/*************************
950       cart
951*************************/ 
952POTENZA.cartbox = function () { 
953      $(".cart-btn").on("click", function (e) {
954          $(".shpping-cart .cart").toggleClass('cart-open');
955          e.stopPropagation();
956      });
957      $(document).on("click", function (e) {
958          if (!$(e.target).is('.shpping-cart .cart, .shpping-cart .cart *')) {
959              $(".shpping-cart .cart").removeClass('cart-open');
960          }
961      });
962}
963
964 /*************************
965        menu left-header
966*************************/ 
967POTENZA.mobileview = function () { 
968    $('a.but').on("click", function (e) {
969        if(!$(this).hasClass('active')){
970          $(this).addClass('active');
971          $('#left-header').animate({'margin-left':230},300);
972        } else {
973          $(this).removeClass('active');
974          $('#left-header').animate({'margin-left':0},300);
975        }
976      return false;
977    });  
978};
979POTENZA.googlemapopen = function () { 
980 $(".map-icon").on("click", function (e) {
981  jQuery('.google-map').toggleClass("google-map-open");
982 });
983};
984
985/*************************
986        sidepanel
987*************************/
988POTENZA.sidepanel = function () { 
989   $(".st-pusher").on("click", function (e) {
990     if($(e.target).closest(".st-menu").length === 0)
991        if($body.hasClass('st-menu-open')) {
992           $body.toggleClass("st-menu-open");
993             return false; 
994         }
995   });
996    $(".side-panel-trigger" ).on("click", function () {
997      $body.toggleClass("st-menu-open");
998      return false; 
999   });
1000    $(".admin-sidebar-toggler" ).on("click", function () {
1001      $body.toggleClass("sidebar-icon-only");
1002      return false; 
1003   });
1004};
1005
1006 /*************************
1007        slickslider
1008*************************/ 
1009POTENZA.slickslider = function () {
1010  if ($('.slider-for').exists()) {
1011    loadScript(plugin_path + 'slick/slick.min.js', function() {
1012     $('.slider-for').slick({
1013                slidesToShow: 1,
1014                slidesToScroll: 1,
1015                arrows: true,
1016                asNavFor: '.slider-nav'
1017              });
1018            $('.slider-nav').slick({
1019              slidesToShow: 3,
1020              slidesToScroll: 1,
1021              asNavFor: '.slider-for',
1022          dots: false,
1023          centerMode: true,
1024          focusOnSelect: true
1025        });
1026     });
1027   }     
1028};
1029
1030 /*************************
1031        stickyFooter
1032*************************/ 
1033POTENZA.stickyFooter = function () { 
1034  var  $footerfixed = $("#footer-fixed");
1035     if ($footerfixed.exists()) {
1036       var footerheight = $('#footer-fixed').height();
1037        $('.wrapper').css('margin-bottom',(footerheight + "px"))
1038       }
1039    };
1040 
1041/****************************************************
1042          javascript
1043****************************************************/
1044var _arr  = {};
1045  function loadScript(scriptName, callback) {
1046    if (!_arr[scriptName]) {
1047      _arr[scriptName] = true;
1048      var body    = document.getElementsByTagName('body')[0];
1049      var script    = document.createElement('script');
1050      script.type   = 'text/javascript';
1051      script.src    = scriptName;
1052      // then bind the event to the callback function
1053      // there are several events for cross browser compatibility
1054      // script.onreadystatechange = callback;
1055      script.onload = callback;
1056      // fire the loading
1057      body.appendChild(script);
1058    } else if (callback) {
1059      callback();
1060    }
1061  };
1062
1063/****************************************************
1064     POTENZA Window load and functions
1065****************************************************/
1066  //Window load functions
1067    $window.on("load",function(){
1068          POTENZA.preloader(),
1069          POTENZA.Isotope(),
1070          POTENZA.masonry(),
1071          POTENZA.pieChart(),
1072          POTENZA.progressBar();
1073    });
1074 //Document ready functions
1075    $document.ready(function () {
1076        POTENZA.megaMenu(),
1077        POTENZA.counters(),
1078        POTENZA.accordion(),
1079        POTENZA.carousel(),
1080        POTENZA.mailchimp(),
1081        POTENZA.contactform(),
1082        POTENZA.findchapterform(),
1083        POTENZA.wethinkrethinkform(),
1084        POTENZA.studentambdform(),
1085        POTENZA.lawenforcementform(),
1086        POTENZA.sponsorrethinkform(),
1087        POTENZA.adoptrethinkform(),
1088        POTENZA.startchapterform(),
1089        POTENZA.bulkorderform(),
1090        POTENZA.nominatestudentform(),
1091        POTENZA.countdownTimer(),
1092        POTENZA.goToTop(),
1093        POTENZA.mediav(),
1094        POTENZA.googlemapopen(),
1095        POTENZA.mobileslider(),
1096        POTENZA.onepagenav(),
1097        POTENZA.mediaPopups(),
1098        POTENZA.pniceScroll(),        
1099        POTENZA.datetimepick(),
1100        POTENZA.datatables(),
1101        POTENZA.wowanimation(),
1102        POTENZA.googlemaps(),
1103        POTENZA.fancyselect(),
1104        POTENZA.searchbox(),
1105        POTENZA.cartbox(),
1106        POTENZA.raindrops(),
1107        POTENZA.sidepanel(),
1108        POTENZA.slickslider(),
1109        POTENZA.typer(),
1110        POTENZA.stickyFooter(),
1111        POTENZA.masonry(),
1112        POTENZA.mobileview();
1113    });
1114})(jQuery);

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.