PageSourceSearch

https://intercampus.edu.pe/wp-content/plugins/wplms_plugin/include…/js/shortcodes.js?ver=1.9.9.2

js intercampus.edu.pe collected 2026-09-26 06:31:53 UTC 27,171 bytes, 779 lines download raw bytes

1(function () {
2  if(typeof jQuery==='undefined')return false;
3  jQuery(document).ready(function($){  
4
5    $('.v_parallax_block').each(function(){
6        var $bgobj = $(this);
7        var i = parseInt($bgobj.attr('data-scroll'));
8        var rev = parseInt($bgobj.attr('data-rev'));
9        var ptop = $bgobj.parent().position().top;
10        var adjust = parseInt($bgobj.attr('data-adjust'));
11        var height = $bgobj.height();
12
13        var v_parallax_block_height = $bgobj.find('.parallax_content').height();
14        if(height<v_parallax_block_height)
15          height = v_parallax_block_height;
16
17
18        if(rev == 2){
19          
20        }else{
21          var $parent = $bgobj.parent().parent();
22          if($parent.hasClass('stripe')){
23              $parent.css('height',height+'px');
24          }
25        }
26        
27        $(window).scroll(function(e) {
28            e.preventDefault();
29            var $window = jQuery(window);
30            var yPos = Math.round((($window.scrollTop())/i));
31            var coords;
32             if(rev != undefined){
33                 if(rev == 2){
34                  yPos = Math.round((($window.scrollTop()-ptop)/i));
35                  $bgobj.parent().css('-webkit-transform', 'translateY('+yPos+'px)');
36                  $bgobj.parent().css('transform', 'translateY('+yPos+'px)');
37                 }else if(rev == 1){
38                    yPos = yPos  - adjust;
39                    coords = '50% '+yPos+ 'px';
40                    $bgobj.css('background-position', coords);
41                  }else{
42                    yPos =  adjust - yPos;
43                    coords = '50% '+yPos + 'px';//console.log(coords);
44                    $bgobj.css('background-position', coords);
45                  }
46              }
47        }); 
48      });   
49
50    $('section.stripe').each(function(){  
51        var style = $(this).find('.v_column.stripe_container .v_module').attr('data-class');
52        if(style){style='stripe '+style;
53            $(this).find('.v_column.stripe .v_module').removeAttr('data-class');
54            $(this).attr('class',style);
55        }
56        var style = $(this).find('.v_column.stripe .v_module').attr('data-class');
57        if(style){style='stripe '+style;
58            $(this).find('.v_column.stripe .v_module').removeAttr('data-class');
59            $(this).attr('class',style);
60        }
61    });
62  }); 
63
64  jQuery(document).ready(function($){
65      
66  $('.nav-tabs').each(function(){
67    if(!$(this).find('li').hasClass('active')){
68        $(this).find('a:first').tab('show');
69        $(this).find('li:first').addClass('active');
70    }
71  }); 
72
73  $('.nav-tabs a').click(function (e) {
74          e.preventDefault();
75
76      if($(this).parent().parent().find('li a[style]').length){
77          let style = $(this).parent().parent().find('li a[style]').attr('style');
78          $(this).parent().parent().find('li a').attr('style','');
79          $(this).attr('style',style);
80      }
81      if((typeof $().tab == 'function')){
82        $(this).tab('show');
83      }
84  });
85  jQuery('.accordion').each(function(){
86    if($(this).hasClass('load_first')){
87      $(this).find('.accordion-group:first-child').addClass('check_load_first');
88      $(this).find('.accordion-group:first-child .accordion-toggle').trigger('click');
89    }
90  });
91  jQuery(document).ready(function($){
92    if($('.accordion-group.panel').is(':not(.check_load_first)')){
93      $('.accordion').on('shown.bs.collapse', function () {
94          var offset = $(this).find('.collapse.in').prev('.accordion-heading');
95          if(offset) {
96              $('html,body').animate({
97                  scrollTop: $(offset).offset().top -150
98              }, 500);
99          }
100      });
101    }
102  });
103
104  $('.image_slider').each(function(){
105    $(this).flexslider({
106      prevText: "<i class='icon-arrow-1-left'></i>",
107      nextText: "<i class='icon-arrow-1-right'></i>",
108    });
109  });
110
111  if ($.isFunction($.fn.magnificPopup)) {
112    $('.ajax-popup-link').magnificPopup({
113        type: 'ajax',
114        alignTop: true,
115        fixedContentPos: true,
116        fixedBgPos: true,
117        overflowY: 'auto',
118        closeBtnInside: true,
119        preloader: false,
120        midClick: true,
121        removalDelay: 300,
122        mainClass: 'my-mfp-zoom-in'
123    });
124
125    jQuery('.pop').magnificPopup({
126      type: 'image',
127      gallery:{
128        enabled:true
129      }
130    });
131
132    jQuery('.gallery').magnificPopup({
133      delegate: 'a',
134      type: 'image',
135      tLoading: 'Loading image #%curr%...',
136      mainClass: 'mfp-img-mobile',
137      gallery: {
138        enabled: true,
139        navigateByImgClick: true,
140        preload: [0,1] // Will preload 0 - before current, and 1 after the current image
141      },
142      image: {
143        tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
144        titleSrc: function(item) {
145          return item.el.attr('title');
146        }
147      }
148    });
149  };
150  $('.knob').each(function(){
151      var $this = $(this).find('.dial');
152      var myVal = $this.val();
153      $this.knob({
154          draw : function () {
155                // "tron" case
156              if(this.$.data('skin') == 'tron') {
157                  var a = this.angle(this.cv)  // Angle
158                  , sa = this.startAngle          // Previous start angle
159                  , sat = this.startAngle         // Start angle
160                  , ea                            // Previous end angle
161                  , eat = sat + a                 // End angle
162                  , r = true;
163
164              this.g.lineWidth = this.lineWidth;
165              this.o.cursor
166                  && (sat = eat - 0.3)
167                  && (eat = eat + 0.3);
168
169              if (this.o.displayPrevious) {
170                  ea = this.startAngle + this.angle(this.value);
171                  this.o.cursor
172                      && (sa = ea - 0.3)
173                      && (ea = ea + 0.3);
174                  this.g.beginPath();
175                  this.g.strokeStyle = this.previousColor;
176                  this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sa, ea, false);
177                  this.g.stroke();
178              }
179
180              this.g.beginPath();
181              this.g.strokeStyle = r ? this.o.fgColor : this.fgColor ;
182              this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sat, eat, false);
183              this.g.stroke();
184
185              this.g.lineWidth = 2;
186              this.g.beginPath();
187              this.g.strokeStyle = this.o.fgColor;
188              this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false);
189              this.g.stroke();
190
191              return false;
192          }
193    }
194    });
195     $({
196       value: 0
197    }).animate({
198
199       value: myVal
200    }, {
201       duration: 2400,
202       easing: 'swing',
203       step: function () {
204           $this.val(Math.ceil(this.value)).trigger('change');
205
206       }
207    })
208    });
209
210  });
211
212  //AJAX CONTACT FORM
213  jQuery(document).ready(function ($) {
214    // SUBSCRIPTION FORM AJAX HANDLE
215   $( 'body' ).delegate( '.form .form_submit', 'click', function(event){
216      event.preventDefault();
217      var parent = $(this).parent();
218
219      var $response= parent.find(".response");
220      var nonce =  $response.attr('data-security');
221      var error= '';
222      var to = []
223      var data = [];
224      var label = [];
225      var regex = [];
226      var attachment =[];
227      var to = parent.attr('data-to');
228      var subject = parent.attr('data-subject');
229      regex['email'] = /^([a-z0-9._-]+@[a-z0-9._-]+\.[a-z]{2,4}$)/i;
230      regex['phone'] = /[A-Z0-9]{7}|[A-Z0-9][A-Z0-9-]{7}/i;
231      regex['numeric'] = /^[0-9]+$/i;
232      regex['captcha'] = /^[0-9]+$/i;
233      regex['required'] = /([^\s])/;
234      var i=0;
235      
236      parent.find('.form_field').each(function(){
237          i++;
238          var validate=$(this).attr('data-validate');
239          var value = $(this).val();
240          if($(this).attr('type') == 'checkbox'){
241            if($(this).prop("checked")){
242              value = $(this).val();
243            }else{
244              value = 0;
245            }
246          }
247          if(!value.match(regex[validate])){
248              error += ' '+vibe_shortcode_strings.invalid_string+$(this).attr('placeholder');
249              $(this).css('border-color','#e16038');
250          }else{
251              data[i]=value;
252              label[i]=$(this).attr('placeholder');
253              if(parent.hasClass('isocharset')){
254                label[i]=encodeURI(label[i]);
255                data[i]=encodeURI(value);
256              }
257              
258          }
259          if(validate === 'captcha' && error === ""){
260              var $num = $(this).attr('id');
261              var $sum=$(this).closest('.math-sum');
262              var num1 = parseInt($('#'+$num+'-1').text());
263              var num2 = parseInt($('#'+$num+'-2').text());
264              var sumval = parseInt($(this).val());
265              if( sumval != (num1+num2))
266                error += vibe_shortcode_strings.captcha_mismatch;
267          }
268      });
269      var attachment_id = parent.find('.attachment_ids').val();
270      attachment_id = parseInt(attachment_id);
271      if( typeof(attachment_id) == 'number' ){
272        attachment[0] = parent.find('.form_upload_label').text();
273        attachment[1] = attachment_id;
274      }
275      
276    if (error !== "") {
277      $response.fadeIn("slow");
278      $response.html("<span style='color:#D03922;'>"+vibe_shortcode_strings.error_string+" " + error + "</span>");
279    } else {
280
281      if(parent.attr('data-event')){
282          var postevent = new CustomEvent(parent.attr('data-event'), { "detail": {'data':data,'label':label,'attachment':attachment}});
283          document.dispatchEvent(postevent);
284      }
285      if(parent.attr('data-to') && parent.attr('data-to').length){
286          $response.css("display", "block");
287          $response.html("<span style='color:#0E7A00;'>"+vibe_shortcode_strings.sending_mail+"... </span>");
288          $response.fadeIn("slow");
289          setTimeout(function(){sendmail(to,subject,data,label,parent,nonce,attachment);}, 2000);
290      }
291      
292    }
293      
294    return false;
295    });
296
297    function sendmail(to,subject,formdata,labels,parent,nonce,attachment) { 
298      var $response= parent.find(".response");
299      var isocharset = false;
300      
301      if(parent.hasClass('isocharset'))
302        isocharset=true;
303
304      $.ajax({
305            type: "POST",
306            url: ajaxurl,
307                  data: {   action: 'vibe_form_submission', 
308                            to: to,
309                            subject : subject,
310                            data:JSON.stringify(formdata),
311                            label:JSON.stringify(labels),
312                            isocharset:isocharset,
313                            attachment:attachment,
314                            security:nonce
315                        },
316            cache: false,
317            success: function (html) {
318                console.log(html);
319                $response.fadeIn("slow");
320                $response.html(html);
321                if(html.indexOf('<span') === 0) {
322                  parent.find('textarea').val('');
323                  parent.find('input[type="text"]').val('');
324                }
325                setTimeout(function(){$response.fadeOut("slow");}, 10000);
326            }
327        });
328    }
329         
330  });
331
332  jQuery(document).load(function($){
333    $('.mejs-container').each(function(){
334      $(this).addClass('mejs-mejskin');
335    });  
336  });
337
338   function vibe_carousel(){
339      let $ = jQuery;
340      if ($.isFunction($.fn.flexslider)) {
341
342        $('.image_slider').each(function(){
343          $(this).flexslider({
344            prevText: "<i class='icon-arrow-1-left'></i>",
345            nextText: "<i class='icon-arrow-1-right'></i>",
346          });
347        });
348        
349        $('.vibe_carousel.flexslider').each(function(){
350          var $this = $(this);
351          if($(this).find('.slides').length){
352            var dnav = parseInt($this.attr('data-directionnav'));
353            if (typeof dnav === typeof undefined || dnav === false) {
354                dnav = 1;
355            }
356            $this.flexslider({
357              animation: "slide",
358              rtl: false,
359              controlNav: parseInt($this.attr('data-controlnav')),
360              directionNav: dnav,
361              animationLoop: parseInt($this.attr('data-autoslide')),
362              slideshow: parseInt($this.attr('data-autoslide')),
363              itemWidth:parseInt($this.attr('data-block-width')),
364              itemMargin:30,
365              minItems:parseInt($this.attr('data-block-min')),
366              maxItems:parseInt($this.attr('data-block-max')),
367              prevText: "<i class='icon-arrow-1-left'></i>",
368              nextText: "<i class='icon-arrow-1-right'></i>",
369              move:parseInt($this.attr('data-block-move')),
370              start: function(slider){
371                $(slider).removeClass('loading');
372              },
373              before:function(slider){
374                console.log(slider);
375              },
376              after: function(slider){
377                console.log(slider);
378              }
379            });
380          }
381          if($this.hasClass('woocommerce')){
382            $this.flexslider({
383              selector: ".products > li",
384              animation: "slide",
385              rtl: false,
386              controlNav: false,
387              directionNav: true,
388              animationLoop: false,
389              slideshow: false,
390              minItems:1,
391              maxItems:1,
392              itemWidth:100,
393              itemMargin:0,
394              prevText: "<i class='icon-arrow-1-left'></i>",
395              nextText: "<i class='icon-arrow-1-right'></i>",
396            });
397          }
398          if($this.find('.woocommerce').length){
399            $this.find('.woocommerce').flexslider({
400              selector: ".products > li",
401              animation: "slide",
402              controlNav: false,
403              rtl: false,
404              directionNav: true,
405              animationLoop: false,
406              slideshow: false,
407              minItems:1,
408              maxItems:1,
409              itemWidth:100,
410              itemMargin:0,
411              prevText: "<i class='icon-arrow-1-left'></i>",
412              nextText: "<i class='icon-arrow-1-right'></i>",
413            });
414          }
415        });
416      }
417    }
418  jQuery(document).ready(function ($) {
419   
420    vibe_carousel();
421    if ( window.elementorFrontend && window.elementorFrontend.hooks && window.elementorFrontend.hooks.hasOwnProperty('addAction')) {
422      window.elementorFrontend.hooks.addAction( 'init', function() {
423          //run when init no need
424      });
425      window.elementorFrontend.hooks.addAction( 'frontend/element_ready/widget', function( $scope ) {
426          vibe_carousel();
427      });
428    }
429  });
430
431
432  /*======= FILTERABLE=======*/
433
434  jQuery(window).load(function ($) {
435   var $ = jQuery;
436   $('.custom_post_filterable').each(function(){
437          var $container = $(this).find('.filterableitems_container'),
438        $filtersdiv = $(this).find('.vibe_filterable'),
439          $checkboxes = $(this).find('.vibe_filterable a');
440      
441      if(jQuery.fn.imagesLoaded){
442        $container.imagesLoaded( function(){  
443          $container.isotope({
444            itemSelector: '.filteritem',
445            layoutMode: 'fitRows',
446            fitRows: {
447              gutter: 10
448            }
449          }); 
450        });
451      } else{
452        $container.isotope({
453            itemSelector: '.filteritem',
454            layoutMode: 'fitRows',
455            fitRows: {
456              gutter: 10
457            }
458          });
459      }    
460    
461      $checkboxes.click(function(event){
462        event.preventDefault();
463        var me = $(this);
464        $filtersdiv.find('.active').removeClass();
465        var filters = me.attr('data-filter');
466        me.parent().addClass('active');
467        $container.isotope({filter: filters});
468      });
469     
470     $('.vibe_filterable a:first').trigger('click');
471     $('.vibe_filterable a:first').parent().addClass('active');
472   });
473  });
474
475  jQuery(window).load(function ($) { 
476
477
478  jQuery('.grid.masonry').each(function($){
479
480  var $container = jQuery(this);
481  $container.imagesLoaded( function(){ 
482
483        var width= parseInt($container.attr('data-width'));
484        var gutter= parseInt($container.attr('data-gutter'));
485          if(jQuery('body').hasClass('rtl')){
486              $container.isotope({
487                  itemSelector: '.grid-item',
488                  columnWidth: width,
489                  gutterWidth: gutter,
490                  layoutMode: 'masonry',
491                  isRTL:true,
492            });
493          }else{
494              $container.isotope({
495                  itemSelector: '.grid-item',
496                  columnWidth: width,
497                  gutterWidth: gutter,
498                  layoutMode: 'masonry',
499              });  
500          }
501        
502
503          });
504      });
505  });
506
507  jQuery(document).ready(function ($) {
508      
509      $('.fitvids').each(function(){
510        $(this).fitVids();
511      });
512
513      if($('.vibe_grid').length && $('.vibe_grid').hasClass('inifnite_scroll')){
514          
515          var $this= $('.vibe_grid.inifnite_scroll:not(.loaded)');
516          var end = $this.parent().find('.end_grid');
517          var load = $this.parent().find('.load_grid');
518          var args = $this.find('.wp_query_args').html();
519          var max = parseInt($this.find('.wp_query_args').attr('data-max-pages'));
520          
521          var top = $('.vibe_grid.inifnite_scroll:not(.loaded) li:last').offset().top -500;
522          var rel = parseInt($('.vibe_grid.inifnite_scroll:not(.loaded)').attr('data-page')); 
523          
524       $(window).data('ajaxready', true).scroll(function(e) {
525           
526             if ($(window).data('ajaxready') == false) return;
527            
528            if(!$('.vibe_grid.inifnite_scroll').hasClass('loaded'))
529              top = $('.vibe_grid.inifnite_scroll:not(.loaded) li:last').offset().top -500;
530            else
531                rel = max;
532
533           if ($(window).scrollTop() >= top && rel < max ) {
534              
535          $(window).data('ajaxready', false);
536          
537         
538          $.ajax({
539                  type: "POST",
540                  url: ajaxurl,
541                        data: {action: 'grid_scroll', 
542                                  args: args,
543                                  page: rel
544                              },
545                  cache: false,
546                  success: function (html) {
547                           
548                            if(html){
549                                rel++;
550                                $this.attr('data-page',rel);
551                                if($this.hasClass('masonry')){
552                                    $('.vibe_grid.inifnite_scroll .grid.masonry').isotope('insert',$(html));
553                                    $('.vibe_grid.inifnite_scroll .grid.masonry').imagesLoaded( function(){
554                                        $('.vibe_grid.inifnite_scroll .grid.masonry').isotope('layout');
555                                    });
556                                }else{
557                                  $('.vibe_grid.inifnite_scroll:not(.loaded)>.grid>li:last').after(html); 
558                                } 
559                            } 
560                             $(window).data('ajaxready', true);
561                             $('body').trigger('grid_scroll_done');
562                  }
563              }); 
564              }else{
565               if(rel == max){
566                               end.fadeIn(200);
567                                  load.fadeOut(200);
568                                $this.addClass('loaded');
569               }     
570              }
571          });
572      }
573  });
574
575  jQuery(document).ready(function($){
576      // Uploading files
577    var zip_uploader;
578    jQuery('#upload_zip_button').on('click', function( event ){
579        event.preventDefault();
580        var url = $(this).attr('data-admin-url')+'media-upload.php?type=upload&tab=upload&TB_iframe=1';
581        tb_show('Upload ZIP package', url );
582      });
583  });
584
585
586
587
588  jQuery('body').undelegate('.submit_registration_form','click');
589  jQuery('body').delegate('.submit_registration_form','click',function(event){
590      var $ = jQuery;
591      event.preventDefault();
592      window.onbeforeunload = null;
593      var $this = $(this);
594      var parent = $this.closest('.wplms_registration_form');
595      parent.find('.message').remove();
596      if($this.hasClass('loading'))
597          return;
598
599      $('.field_error').each(function(){$(this).removeClass('field_error')});
600      $this.addClass('loading');
601      
602      var settings = [];
603      let formdata = new FormData();
604      let filesdata = [];
605
606      parent.find('input,textarea,select').each(function(){
607          if($(this).is(':radio')){
608              if($(this).is(':checked')){
609                  var data = {id:$(this).attr('name'),value: $(this).val()};
610              }
611          }else if($(this).is(':checkbox')){
612            if($(this).is(':checked')){
613                var data = {id:$(this).attr('name'),value: $(this).val()};
614            }
615          }else if($(this).is('select')){
616              var data = {id:$(this).attr('name'),value: $(this).val()};
617          }else if($(this).is('input')){
618              if($(this).attr('type') == 'file'){
619                filesdata.push({id:$(this).attr('name'),value:$(this).get()[0].files[0]});
620                var data = {id:$(this).attr('name'),value:  $(this).val()};
621              }else{
622                var data = {id:$(this).attr('name'),value: $(this).val()};
623              }
624              
625          }else if($(this).is('textarea')){
626            if($(this).hasClass('wp-editor-area') && $(this).attr('aria-hidden') == 'true'){
627              var data = {id:$(this).attr('name'),value:tinyMCE.get($(this).attr('id')).getContent({format : 'raw'})};
628            }else{
629             var data = {id:$(this).attr('name'),value: $(this).val()};   
630            }
631          }
632          if(data)
633            settings.push(data);
634      });
635      var response='';
636      if(typeof grecaptcha != 'undefined' && $('.g-recaptcha').length != 0){
637        response = grecaptcha.getResponse();
638        if(response.length == 0){
639          parent.append('<div class="message">'+vibe_shortcode_strings.captcha_mismatch+'</div>');
640          $this.removeClass('loading');
641          return;
642        }
643      }
644
645
646      formdata.append("action", 'wplms_register_user');
647
648      formdata.append("security", $('#bp_new_signup').val());
649      formdata.append("name", $this.parent().parent().closest('.wplms_registration_form').data('form-name'));
650      formdata.append("settings", JSON.stringify(settings));
651
652      if(filesdata.length){
653          filesdata.map(function(file,i){
654              formdata.append("file_"+file.id, file.value);
655          });
656      }
657
658      $.ajax({
659          type: "POST",
660          url: ajaxurl,
661          data:formdata ,
662          cache: false,
663          contentType: false,
664          processData: false
664,
665          success: function (html) {
666              $this.removeClass('loading');
667              parent.append(html);
668              $('.field_error .message.error').click(function(){$(this).fadeOut(100);});
669          }
670      });
671  });
672
673
674  function init_vibe_iframe_content_popup(){
675    jQuery('.vibe_iframe_content_popup').each(function(){
676      var $this = jQuery(this);
677       $this.magnificPopup({
678          type: 'iframe',
679          mainClass: 'mfp-fade vibe_iframe_content_popup',
680          removalDelay: 160,
681          preloader: true,
682          fixedContentPos: false
683        });
684    });
685  }
686
687
688
689  var vscountdown = function(){
690      jQuery('.wp-block-vibe-shortcodes-countdown').each(function(){
691
692          clearInterval(timer_);
693          let $this = jQuery(this);
694          var vibetimer={
695              'days':parseInt($this.find('.days .tenday').attr('data-num'))*10+parseInt($this.find('.days .day').attr('data-num')),
696              'hours':parseInt($this.find('.hours .tenhour').attr('data-num'))*10+parseInt($this.find('.hours .hour').attr('data-num')),
697              'minutes':parseInt($this.find('.minutes .tenmin').attr('data-num'))*10+parseInt($this.find('.minutes .min').attr('data-num')),
698              'seconds':parseInt($this.find('.seconds .tensec').attr('data-num'))*10+parseInt($this.find('.seconds .sec').attr('data-num')),
699          };
700
701          function getupdatedtimer(){
702              vibetimer.seconds = vibetimer.seconds - 1;
703
704              if(vibetimer.seconds < 0){
705                  vibetimer.minutes = vibetimer.minutes - 1;
706                  vibetimer.seconds = 59;
707              }
708              if(vibetimer.minutes < 0){
709                  vibetimer.hours = vibetimer.hours - 1;
710                  vibetimer.minutes = 59;
711              }
712              if(vibetimer.hours < 0){
713                  vibetimer.days = vibetimer.days - 1;
714                  vibetimer.hours = 23;
715              }
716              if(vibetimer.days < 0){
717                  vibetimer.days = vibetimer.seconds = vibetimer.minutes = vibetimer.hours = 0;
718              }
719          }
720
721          function flipTo(digit, n){
722              var current = digit.attr('data-num');
723              digit.attr('data-num', n);
724              digit.find('.front').attr('data-content', current);
725              digit.find('.back, .under').attr('data-content', n);
726              digit.find('.flap').css('display', 'block');
727              setTimeout(function(){
728                  digit.find('.base').text(n);
729                  digit.find('.flap').css('display', 'none');
730              }, 350);
731          }
732
733          function jumpTo(digit, n){
734              digit.attr('data-num', n);
735              digit.find('.base').text(n);
736          }
737
738          function updateGroup(group, n, flip){
739              var digit1 = $this.find( '.ten'+group);
740              var digit2 = $this.find( '.'+group);
741              n = String(n);
742              if(n.length == 1) n = '0'+n;
743              var num1 = n.substr(0, 1);
744              var num2 = n.substr(1, 1);
745              if(digit1.attr('data-num') != num1){
746                  if(flip) flipTo(digit1, num1);
747                  else jumpTo(digit1, num1);
748              }
749              if(digit2.attr('data-num') != num2){
750                  if(flip) flipTo(digit2, num2);
751                  else jumpTo(digit2, num2);
752              }
753          }
754
755          function setTime(flip){
756              getupdatedtimer();
757
758              updateGroup('day', vibetimer.days, flip);
759              updateGroup('hour', vibetimer.hours, flip);
760              updateGroup('min', vibetimer.minutes, flip);
761              updateGroup('sec', vibetimer.seconds, flip);
762              if(vibetimer.days == 0 && vibetimer.hours == 0 && vibetimer.minutes == 0 && vibetimer.seconds == 0){
763                  clearInterval(timer_);
764                  jQuery('body').trigger('event');
765              }
766          }
767
768          setTime(false);
769          var timer_ = setInterval(function(){
770              setTime(true);
771          }, 1000);
772      });
773  }
774
775  jQuery(document).ready(function(){
776    init_vibe_iframe_content_popup();
777    vscountdown();
778  });
779})();

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.