PageSourceSearch

https://studyhub.org.uk/wp-content/plugins/vibe-shortcodes/js/shortcodes.js?ver=999

js studyhub.org.uk collected 2026-10-08 05:15:05 UTC 26,685 bytes, 795 lines download raw bytes

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

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.