PageSourceSearch

https://parisandco.fr/wp-content/plugins/estato/bt_elements.js?ver=6.8.10

js parisandco.fr collected 2026-10-04 13:26:24 UTC 9,064 bytes, 309 lines download raw bytes

1(function( $ ) {
2	
3	window.btGetNavHTML = function( count ) {
4		var html = '<div class="btAnimNavHolder"><ul class="btAnimNav">';
5		html += '<li class="btAnimNavPrev"></li>';
6		for ( var i = 0; i < count; i++ ) {
7			html += '<li class="btAnimNavDot" data-count="' + i + '"><span>' + ( i + 1 ) + '/' + count + '<span></li>';
8		}
9		html += '<li class="btAnimNavNext"></li>';
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 = parseInt( elm.children( '.p' + i ).data( 'digit' ) );
41			if ( digit == 0 || isNaN( digit ) ) digit = 10;
42			for ( var j = 0; j <= digit; j++ ) {
43				//elm.children( '.p' + i ).children( '.n' + j ).css( 'transform', 'translateY(-' + digit * elm.height() + 'px)' );
44				elm.children( '.p' + i ).css( 'transform', 'translateY(-' + digit * elm.height() + 'px)' );
45			}
46			
47		}
48		return false;
49	}
50	
51	function btAnimateCounterReset( elm ) {
52		var number_length = elm.data( 'digit-length' );
53		for ( var i = parseInt( number_length ); i > 0; i-- ) {
54			var digit = elm.children( '.p' + i ).data( 'digit' );
55			if ( digit == 0 || isNaN( digit ) ) digit = 10;
56			for ( var j = 0; j <= parseInt( digit ); j++ ) {
57				//elm.children( '.p' + i ).children( '.n' + j ).css( 'transform', 'translateY(0px)' );
58				elm.children( '.p' + i ).css( 'transform', 'translateY(0px)' );
59			}
60			
61		}
62		return false;
63	}	
64
65	function btAnimateProgress( elm ) {
66		elm.find( '.btProgressAnim' ).css( 'transition-delay', Math.round( Math.random() * 250 ) + 'ms' );
67		elm.find( '.btProgressAnim' ).css( 'transform', 'translateX(-' + ( 100 - elm.find( '.btProgressAnim' ).data( 'percentage' ) ) + '%)' );
68		return false;
69	}
70	
71	function btAnimateProgressReset( elm ) {
72		elm.find( '.btProgressAnim' ).css( 'transition-delay', Math.round( Math.random() * 250 ) + 'ms' );
73		elm.find( '.btProgressAnim' ).css( 'transform', 'translateX(-100%)' );
74		return false;
75	}	
76	
77	$( window ).on( 'btload', function() {
78		if ( ! $( 'body' ).hasClass( 'btPageTransitions' ) ) {
79			btAnimateElements();
80			$( window ).scroll(function(){
81				btAnimateElements();
82			});
83		}
84	});
85	
86	$( window ).on( 'boldthemes_section_animation_end', function( e, el ) {
87		var $elems = $( el ).find( '.btCounter, .btProgressBar, span.headline .animate' );
88		// classic animations
89		$elems.each(function() {
90			$elm = $( this );
91			$elm.addClass( 'animated' );
92			if ( $elm.hasClass( 'btCounter' ) ) {
93				btAnimateCounter( $elm );
94			}
95			if ( $elm.hasClass( 'btProgressBar' ) ) {
96				btAnimateProgress( $elm );
97			}
98		});
99	});
100	
101	$( window ).on( 'boldthemes_section_animation_out', function( e, el ) {
102		var $elems = $( el ).find( '.btCounter, .btProgressBar, span.headline .animate' );
103		// classic animations
104		$elems.each(function() {
105			$elm = $( this );
106			$elm.removeClass( 'animated' );
107			if ( $elm.hasClass( 'btCounter' ) ) {
108				btAnimateCounterReset( $elm );
109			}
110			if ( $elm.hasClass( 'btProgressBar' ) ) {
111				btAnimateProgressReset( $elm );
112			}
113		});
114	});
115	
116	function bt_video_background() {
117		$( '.boldSection.video' ).each(function() {
118			var video = $( this ).find( 'video' );
119			var w = $( this ).outerWidth();
120			var h = $( this ).outerHeight();
121			if ( w / h > 16 / 9 ) {
122				video.css( 'width', '105%' );
123				video.css( 'height', '' );
124			} else {
125				video.css( 'width', '' );
126				video.css( 'height', '105%' );
127			}
128		});
129	}
130	
131	window.bt_video_callback = function( v ) {
132		$( v ).parent().addClass( 'video_on' );
133	}
134	
135	$( window ).on( 'resize', function( e ) {
136		var $elems = $( '.btCounter' );
137		// classic animations
138		/*$elems.each(function() {
139			$elm = $( this );
140			if ( $elm.hasClass( 'btCounter' ) ) {
141				btAnimateCounterReset( $elm );
142			}
143		});*/
144		setTimeout( function() {
145			var $elems = $( '.btCounter' );
146			$elems.each(function() {
147				$elm = $( this );
148				btAnimateCounter( $elm );
149			});
150		}, 1000 );
151		
152		bt_video_background();		
153		
154	});
155	
156	/* Accordions and tabs */
157
158	$( document ).ready(function () {
159		
160		/* Accordions */
161
162		$( '.tabsVertical .tabAccordionContent' ).hide();
163		
164		$( '.tabsVertical .tabAccordionTitle' ).click(function() {
165			if ( $( this ).hasClass( 'on' ) ) {
166				$( this ).removeClass( 'on' ).next().slideUp( 250 );
167			} else {
168				$( this ).closest( '.tabsVertical' ).find( '.tabAccordionTitle' ).removeClass( 'on' );
169				$( this ).closest( '.tabsVertical' ).find( '.tabAccordionContent' ).delay( 250 ).slideUp( 250 );
170				$( this ).addClass( 'on' ).next().slideDown( 250 );
171			}
172		});
173		
174		$( '.tabsVertical' ).each(function(){
175			$( this ).find( '.tabAccordionTitle' ).first().click();
176		});
177
178		/* Tabs */
179		
180		$( '.tabsHorizontal ul.tabsHeader li' ).click(function() {
181			$(this).siblings().removeClass( 'on' );
182			$( this ).addClass( 'on' );
183			$( this ).parent().parent().find( '.tabPanes .tabPane' ).removeClass( 'on' );
184			$( this ).parent().parent().find( '.tabPanes .tabPane' ).eq( $(this).index() ).addClass( 'on' );
185		});
186
187		$( '.tabsHorizontal ul.tabsHeader' ).each(function(){
188			$( this ).find( 'li' ).first().click();
189		});
190
191		// Wrap inline row
192		$( '.btIconImageRow > div' ).wrap( '<div class="btIconImageCell"></div>' );
193		/*$.each( $( '.btIconImageRow' ), function() {
194			$( this ).addClass( 'btCells-' + $( this ).children( 'div' ).length );
195		});*/
196
197		// Countdown
198		
199		$( '.btCountdownHolder' ).each(function() {
200			
201			var cd = $( this );
202			var s = cd.data( 'init-seconds' );
203			if ( cd.data( 'init-target-seconds' ) ) {
204				var now_utc_seconds = Math.floor( new Date().getTime() / 1000);;
205				var s = cd.data( 'init-target-seconds' ) - now_utc_seconds;
206				if ( s < 0 ) {
207					s = 0;
208				}
209			}
210			
211			var seconds_arr = ['', ''];
212			var seconds_arr_prev = ['', ''];
213			
214			var minutes_arr = ['', ''];
215			var minutes_arr_prev = ['', ''];
216			
217			var hours_arr = ['', ''];
218			var hours_arr_prev = ['', ''];
219
220			var days_prev = 0;
221			
222			var countdown = function( selector, i, arr, arr_prev ) {
223				if ( arr[ i ] !== arr_prev[ i ] ) {
224					cd.find( selector ).children().addClass( 'countdown_anim' );
225					cd.find( selector ).children().eq( 0 ).html( arr[ i ] );
226					cd.find( selector ).children().eq( 1 ).html( arr_prev[ i ] );
227					setTimeout(function() {
228						cd.find( selector ).children().eq( 1 ).html( cd.find( selector ).children().eq( 0 ).html() );
229						cd.find( selector ).children().removeClass( 'countdown_anim' );
230					}, 300 );
231				}
232			}
233			
234			var output = function() {
235				s = s - 1;
236				if ( s < 0 ) {
237					s = 0;
238				}
239				
240				var delta = s;
241				
242				var days = Math.floor( delta / 86400 );
243				delta -= days * 86400;
244
245				var hours = Math.floor( delta / 3600 ) % 24;
246				delta -= hours * 3600;
247
248				var minutes = Math.floor( delta / 60 ) % 60;
249				delta -= minutes * 60;
250
251				var seconds = delta;
252				
253				if ( hours < 10 ) {
254					hours = '0' + hours;
255				}
256				
257				if ( minutes < 10 ) {
258					minutes = '0' + minutes;
259				}
260
261				if ( seconds < 10 ) {
262					seconds = '0' + seconds;
263				}
264				
265				seconds_arr = seconds.toString().split( '' );
266				minutes_arr = minutes.toString().split( '' );
267				hours_arr = hours.toString().split( '' );
268				
269				for ( var i = 0; i <= 1; i++ ) {
270					countdown( '.seconds .n' + i, i, seconds_arr, seconds_arr_prev );
271					countdown( '.minutes .n' + i, i, minutes_arr, minutes_arr_prev );
272					countdown( '.hours .n' + i, i, hours_arr, hours_arr_prev );
273				}
274				
275				if ( days != days_prev ) {
276					days_arr = days.toString().split( '' );
277					
278					var days_html = '';
279					for ( var i = 0; i < days_arr.length; i++ ) {
280						days_html += '<span>' + days_arr[ i ] + '</span>';
281					}
282
283					cd.find( '.days' ).html( days_html + '<span class="days_text"><span>' + cd.find( '.days' ).data( 'text' ) + '</span></span>' );
284				}
285				
286				days_prev = days;				
287				
288				setTimeout(function() {
289					seconds_arr_prev = seconds_arr;
290					minutes_arr_prev = minutes_arr;
291					hours_arr_prev = hours_arr;
292				}, 400 );
293
294			}
295			
296			output();
297
298			setInterval(function() {
299				output();
300			}, 1000 );
301		});
302		
303		// Video
304		
305		bt_video_background();		
306
307	});
308
309})( 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.