1(function( $ ) { 2 3 window.btGetNavHTML = function( count ) { 4 var html = '<div class="btAnimNavHolder"><ul class="btAnimNav">'; 5 html += '<li class="btAnimNavPrev">'; 6 for ( var i = 0; i < count; i++ ) { 7 html += '<li class="btAnimNavDot" data-count="' + i + '">'; 8 } 9 html += '<li class="btAnimNavNext">'; 10 html += '</ul></div>'; 11 12 return html; 13 } 14 15 /* Animate elements */ 16 17 function btAnimateElements() { 18 var $elems = $( '.btCounter:not(.animated), .btProgressBar:not(.animated)' ); 19 // classic animations 20 $elems.each(function() { 21 $elm = $( this ); 22 if ( 23 ( $elm.isOnScreen() && ! $( 'body' ).hasClass( 'impress-enabled' ) ) || 24 ( $elm.isOnScreen() && $( 'body' ).hasClass( 'impress-enabled' ) && $elm.closest( '.boldSection' ).hasClass( 'active' ) ) 25 ) { 26 $elm.addClass( 'animated' ); 27 if ( $elm.hasClass( 'btCounter' ) ) { 28 btAnimateCounter( $elm ); 29 } 30 if ( $elm.hasClass( 'btProgressBar' ) ) { 31 btAnimateProgress( $elm ); 32 } 33 } 34 }); 35 } 36 37 function btAnimateCounter( elm ) { 38 var number_length = elm.data( 'digit-length' ); 39 for ( var i = parseInt( number_length ); i > 0; i-- ) { 40 var digit = elm.children( '.p' + i ).data( 'digit' ); 41 for ( var j = 0; j <= parseInt( digit ); j++ ) { 42 elm.children( '.p' + i ).children( '.n' + j ).css( 'transform', 'translateY(-' + parseInt( digit ) * elm.height() + 'px)' ); 43 } 44 45 } 46 return false; 47 } 48 49 function btAnimateCounterReset( elm ) { 50 var number_length = elm.data( 'digit-length' ); 51 for ( var i = parseInt( number_length ); i > 0; i-- ) { 52 var digit = elm.children( '.p' + i ).data( 'digit' ); 53 for ( var j = 0; j <= parseInt( digit ); j++ ) { 54 elm.children( '.p' + i ).children( '.n' + j ).css( 'transform', 'translateY(0px)' ); 55 } 56 57 } 58 return false; 59 } 60 61 function btAnimateProgress( elm ) { 62 elm.find( '.btProgressAnim' ).css( 'transition-delay', Math.round( Math.random() * 250 ) + 'ms' ); 63 elm.find( '.btProgressAnim' ).css( 'transform', 'translateX(-' + ( 100 - elm.find( '.btProgressAnim' ).data( 'percentage' ) ) + '%)' ); 64 return false; 65 } 66 67 function btAnimateProgressReset( elm ) { 68 elm.find( '.btProgressAnim' ).css( 'transition-delay', Math.round( Math.random() * 250 ) + 'ms' ); 69 elm.find( '.btProgressAnim' ).css( 'transform', 'translateX(-100%)' ); 70 return false; 71 } 72 73 $( window ).on( 'btload', function() { 74 if ( ! $( 'body' ).hasClass( 'btPageTransitions' ) ) { 75 btAnimateElements(); 76 $( window ).scroll(function(){ 77 btAnimateElements(); 78 }); 79 } 80 }); 81 82 $( window ).on( 'bt_section_animation_end', function( e, el ) { 83 $( 'span.headline u, span.headline b, span.headline i' ).addClass( 'animate' ); 84 var $elems = $( el ).find( '.btCounter, .btProgressBar, span.headline u, span.headline b, span.headline i' ); 85 // classic animations 86 $elems.each(function() { 87 $elm = $( this ); 88 $elm.addClass( 'animated' ); 89 if ( $elm.hasClass( 'btCounter' ) ) { 90 btAnimateCounter( $elm ); 91 } 92 if ( $elm.hasClass( 'btProgressBar' ) ) { 93 btAnimateProgress( $elm ); 94 } 95 }); 96 }); 97 98 $( window ).on( 'bt_section_animation_out', function( e, el ) { 99 var $elems = $( el ).find( '.btCounter, .btProgressBar, span.headline u, span.headline b, span.headline i' ); 100 // classic animations 101 $elems.each(function() { 102 $elm = $( this ); 103 $elm.removeClass( 'animated' ); 104 if ( $elm.hasClass( 'btCounter' ) ) { 105 btAnimateCounterReset( $elm ); 106 } 107 if ( $elm.hasClass( 'btProgressBar' ) ) { 108 btAnimateProgressReset( $elm ); 109 } 110 }); 111 }); 112 113 /* Accordions and tabs */ 114 115 $( document ).ready(function () { 116 117 /* Accordions */ 118 119 $( '.tabsVertical .tabAccordionContent' ).hide(); 120 121 $( '.tabsVertical .tabAccordionTitle' ).click(function() { 122 if ( $( this ).hasClass( 'on' ) ) { 123 $( this ).removeClass( 'on' ).next().slideUp( 250 ); 124 } else { 125 $( this ).closest( '.tabsVertical' ).find( '.tabAccordionTitle' ).removeClass( 'on' ); 126 $( this ).closest( '.tabsVertical' ).find( '.tabAccordionContent' ).delay( 250 ).slideUp( 250 ); 127 $( this ).addClass( 'on' ).next().slideDown( 250 ); 128 } 129 }); 130 131 $( '.tabsVertical' ).each(function() { 132 var open_first = $( this ).data( 'open-first' ); 133 if ( open_first == 'yes' ) { 134 $( this ).find( '.tabAccordionTitle' ).first().click(); 135 } 136 }); 137 138 /* Tabs */ 139 140 $( '.tabsHorizontal ul.tabsHeader li' ).click(function() { 141 $(this).siblings().removeClass( 'on' ); 142 $( this ).addClass( 'on' ); 143 $( this ).parent().parent().find( '.tabPanes .tabPane' ).removeClass( 'on' ); 144 $( this ).parent().parent().find( '.tabPanes .tabPane' ).eq( $(this).index() ).addClass( 'on' ); 145 }); 146 147 $( '.tabsHorizontal ul.tabsHeader' ).each(function(){ 148 $( this ).find( 'li' ).first().click(); 149 }); 150 151 /* Dropdown */ 152 153 $( '.btDropdownSelect' ).fancySelect({forceiOS: true}).on( 'change.fs', function( e ) { 154 var url = $( this ).parent().find( '.options .selected' ).data( 'raw-value' ); 155 if ( url != '' ) window.location = url; 156 }); 157 158 // Wrap inline row 159 $( '.btIconImageRow > div' ).wrap( '<div class="btIconImageCell"></div>' ); 160 $.each( $( '.btIconImageRow' ), function() { 161 $( this ).addClass( 'btCells-' + $( this ).children( 'div' ).length ); 162 }); 163 164 165 }); 166 167})( 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.