1( function( $ ) { 2 "use strict"; 3 4 /** 5 * debouncing function from John Hann 6 * http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ 7 */ 8 var debounce = function (func, threshold, execAsap) { 9 var timeout; 10 11 return function debounced () { 12 var obj = this, args = arguments; 13 function delayed () { 14 if (!execAsap) 15 func.apply(obj, args); 16 timeout = null; 17 }; 18 19 if (timeout) 20 clearTimeout(timeout); 21 else if (execAsap) 22 func.apply(obj, args); 23 24 timeout = setTimeout(delayed, threshold || 100); 25 }; 26 }; 27 28 /** 29 * Register smartresize plugin 30 */ 31 $.fn['smartresize'] = function(fn){ 32 return fn ? this.bind('resize', debounce(fn)) : this.trigger('smartresize'); 33 }; 34} ).call( this, jQuery ); 35 36 37( function( $ ) { 38 "use strict"; 39 40 var doc = $( document ), 41 win = $( window ); 42 43 $( function() { 44 win.smartresize( Waypoint.refreshAll ) 45 .on( 'load', Waypoint.refreshAll ); 46 47 if ( $.fn.countTo ) { 48 $( '.counter' ).each( function() { 49 var counted = false; 50 51 $( this ).data( 'waypoint.inview', new Waypoint.Inview( { 52 element: this, 53 enter: function() { 54 if ( counted == false ) { 55 counted = true; 56 $( '.counter-value', this.element ).countTo(); 57 } 58 } 59 } ) ) 60 } ); 61 } 62 63 // Countdown 64 if ( $.fn.countdown ) { 65 $( '.countdown' ).each( function() { 66 var format = [], 67 parts = $( this ).attr( 'data-hidden' ).split( ',' ), 68 config = { 69 year: '<span class="years"><span class="number">%-Y</span> %!Y:' + _countdownLocalize['year'] + ',' + _countdownLocalize['year'] + 's;</span>', 70 month: '<span class="months"><span class="number">%-m</span> %!m:' + _countdownLocalize['month'] + ',' + _countdownLocalize['month'] + 's;</span>', 71 week: '<span class="weeks"><span class="number">%-w</span> %!w:' + _countdownLocalize['week'] + ',' + _countdownLocalize['week'] + 's;</span>', 72 day: '<span class="days"><span class="number">%-d</span> %!d:' + _countdownLocalize['day'] + ',' + _countdownLocalize['day'] + 's;</span>', 73 hour: '<span class="hours"><span class="number">%-H</span> %!H:' + _countdownLocalize['hour'] + ',' + _countdownLocalize['hour'] + 's;</span>', 74 minute: '<span class="minutes"><span class="number">%-M</span> %!M:' + _countdownLocalize['minute'] + ',' + _countdownLocalize['minute'] + 's;</span>', 75 second: '<span class="seconds"><span class="number">%-S</span> %!S:' + _countdownLocalize['second'] + ',' + _countdownLocalize['second'] + 's;</span>' 76 }; 77 78 if ( parts.indexOf( 'week' ) != -1 ) { 79 config.day = '<span class="days"><span class="number">%-D</span> %!D:' + _countdownLocalize['day'] + ',' + _countdownLocalize['day'] + 's;</span>'; 80 } 81 82 $.map( config, function( value, key ) { 83 if ( parts.indexOf( key ) == -1 ) 84 format.push( value ); 85 } ); 86 87 $( this ).countdown( $( this ).attr( 'data-time' ), function( evt ) { 88 $(this).html( evt.strftime( format.join( ' ' ) ) ); 89 } ) 90 } ); 91 } 92 93 // Post Carousel 94 $( '.blog-shortcode.blog-carousel' ).each( function() { 95 var container = $( this ), 96 columns = 1; 97 98 if ( container.hasClass( 'blog-two-columns' ) ) columns = 2; 99 if ( container.hasClass( 'blog-three-columns' ) ) columns = 3; 100 if ( container.hasClass( 'blog-four-columns' ) ) columns = 4; 101 if ( container.hasClass( 'blog-five-columns' ) ) columns = 5; 102 103 var entriesWrapper = $( '.entries-wrapper', container ) 104 .addClass( 'owl-carousel' ) 105 .imagesLoaded( function() { 106 entriesWrapper.owlCarousel( { 107 items: columns, 108 navigation: true, 109 autoPlay: true, 110 stopOnHover: true, 111 itemsDesktop : [1199, columns], 112 itemsDesktopSmall : [979, 3], 113 itemsTablet : [768, 2], 114 scrollPerPage: true,
115 slideSpeed: 800, 116 autoHeight : true, 117 responsiveBaseWidth: entriesWrapper 118 } ); 119 } ); 120 } ); 121 122 // Elements Carousel 123 $( '.elements-carousel' ).each( function() { 124 try { 125 var element = $( this ); 126 var config = JSON.parse( element.attr( 'data-config' ) ); 127 128 element.imagesLoaded( function() { 129 $( '.elements-carousel-wrap', element ).owlCarousel( config ); 130 } ); 131 } 132 catch( e ) {} 133 } ); 134 } ); 135 136} ).call( this, 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.