PageSourceSearch

https://www.anciens-commerces.fr/wp-content/themes/responsiveboat/js/responsive_boat_script.js?ver=201202067

js anciens-commerces.fr collected 2026-10-04 15:31:04 UTC 11,137 bytes, 450 lines download raw bytes

1/* =================================
2
3 LOADER
4
5 =================================== */
6
7// makes sure the whole site is loaded
8
9jQuery(window).load(function() {
10
11	// will first fade out the loading animation
12
13	jQuery(".status").fadeOut();
14
15	// will fade out the whole DIV that covers the website.
16
17	jQuery(".preloader").delay(1000).fadeOut("slow");
18
19
20	jQuery('.carousel').carousel('pause');
21
22})
23
24
25jQuery(document).ready(function() {
26	var current_height = jQuery('.header .container').height();
27	jQuery('.header').css('min-height',current_height);
28
29});
30
31
32/* show/hide reCaptcha */
33jQuery(document).ready(function() {
34
35	var thisOpen = false;
36	jQuery('.contact-form .form-control').each(function(){
37		if ( jQuery(this).val().length > 0 ){
38			thisOpen = true;
39			jQuery('.zerif-g-recaptcha').css('display','block').delay(1000).css('opacity','1');
40			return false;
41		}
42	});
43	if ( thisOpen == false && (typeof jQuery('.contact-form textarea').val() != 'undefined') && (jQuery('.contact-form textarea').val().length > 0) ) {
44		thisOpen = true;
45		jQuery('.zerif-g-recaptcha').css('display','block').delay(1000).css('opacity','1');
46	}
47	jQuery('.contact-form input, .contact-form textarea').focus(function(){
48		if ( !jQuery('.zerif-g-recaptcha').hasClass('recaptcha-display') ) {
49			jQuery('.zerif-g-recaptcha').css('display','block').delay(1000).css('opacity','1');
50		}
51	});
52
53});
54
55
56/* =================================
57
58 ===  Bootstrap Fix              ====
59
60 =================================== */
61
62if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
63
64	var msViewportStyle = document.createElement('style')
65
66	msViewportStyle.appendChild(
67
68		document.createTextNode(
69
70			'@-ms-viewport{width:auto!important}'
71
72		)
73
74	)
75
76	document.querySelector('head').appendChild(msViewportStyle)
77
78}
79
80
81
82/* =================================
83
84 ===  STICKY NAV                 ====
85
86 =================================== */
87
88
89
90jQuery(document).ready(function() {
91
92
93
94	// Sticky Header - http://jqueryfordesigners.com/fixed-floating-elements/
95
96	var top = jQuery('#main-nav').offset().top - parseFloat(jQuery('#main-nav').css('margin-top').replace(/auto/, 0));
97
98
99
100	jQuery(window).scroll(function (event) {
101
102		// what the y position of the scroll is
103
104		var y = jQuery(this).scrollTop();
105
106
107
108		// whether that's below the form
109
110		if (y >= top) {
111
112			// if so, ad the fixed class
113
114			jQuery('#main-nav').addClass('fixed');
115			if(jQuery('body').hasClass('admin-bar')) {
116				jQuery('#main-nav').addClass('rb-fixed');
117			}
118
119		} else {
120
121			// otherwise remove it
122
123			jQuery('#main-nav').removeClass('fixed');
124			if(jQuery('body').hasClass('admin-bar')) {
125				jQuery('#main-nav').removeClass('rb-fixed');
126			}
127		}
128
129	});
130
131});
132
133
134/*=================================
135
136 ===  SMOOTH SCROLL             ====
137
138 =================================== */
139
140jQuery(document).ready(function(){
141	jQuery('#site-navigation a[href*="#"]:not([href="#"]), header.header a[href*="#"]:not([href="#"])').bind('click',function () {
142		var headerHeight;
143		var hash    = this.hash;
144		var idName  = hash.substring(1);    // get id name
145		var alink   = this;                 // this button pressed
146		// check if there is a section that had same id as the button pressed
147		if ( jQuery('section [id*=' + idName + ']').length > 0 && jQuery(window).width() >= 751 ){
148			jQuery('.current').removeClass('current');
149			jQuery(alink).parent('li').addClass('current');
150		}else{
151			jQuery('.current').removeClass('current');
152		}
153		if ( jQuery(window).width() >= 751 ) {
154			headerHeight = jQuery('#main-nav').height();
155		} else {
156			headerHeight = 0;
157		}
158		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
159			var target = jQuery(this.hash);
160			target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']');
161			if (target.length) {
162				jQuery('html,body').animate({
163					scrollTop: target.offset().top - headerHeight + 10
164				}, 1200);
165				return false;
166			}
167		}
168	});
169});
170
171jQuery(document).ready(function(){
172	var headerHeight;
173	jQuery('.current').removeClass('current');
174	jQuery('#site-navigation a[href$="' + window.location.hash + '"]').parent('li').addClass('current');
175	if ( jQuery(window).width() >= 751 ) {
176		headerHeight = jQuery('#main-nav').height();
177	} else {
178		headerHeight = 0;
179	}
180	if (location.pathname.replace(/^\//,'') == window.location.pathname.replace(/^\//,'') && location.hostname == window.location.hostname) {
181		var target = jQuery(window.location.hash);
182		if (target.length) {
183			jQuery('html,body').animate({
184				scrollTop: target.offset().top - headerHeight + 10
185			}, 1200);
186			return false;
187		}
188	}
189});
190
191/* ================================
192
193 ===  PARALLAX                  ====
194
195 ================================= */
196
197jQuery(document).ready(function(){
198
199	var jQuerywindow = jQuery(window);
200
201	jQuery('div[data-type="background"], header[data-type="background"], section[data-type="background"]').each(function(){
202
203		var jQuerybgobj = jQuery(this);
204
205		jQuery(window).scroll(function() {
206
207			var yPos = -(jQuerywindow.scrollTop() / jQuerybgobj.data('speed'));
208
209			var coords = '50% '+ yPos + 'px';
210
211			jQuerybgobj.css({
212
213				backgroundPosition: coords
214
215			});
216
217		});
218
219	});
220
221});
222
223
224/* ======================================
225
226 ============ MOBILE NAV =============== */
227
228jQuery('.navbar-toggle').on('click', function () {
229
230	jQuery(this).toggleClass('active');
231
232});
233
234
235/* SETS THE HEADER HEIGHT */
236jQuery(window).load(function(){
237	setminHeightHeader();
238});
239jQuery(window).resize(function() {
240	setminHeightHeader();
241});
242function setminHeightHeader()
243{
244	jQuery('#main-nav').css('min-height','75px');
245	jQuery('.header').css('min-height','75px');
246	var minHeight = parseInt( jQuery('#main-nav').height() );
247	jQuery('#main-nav').css('min-height',minHeight);
248	jQuery('.header').css('min-height',minHeight);
249}
250/* - */
251
252
253/* STICKY FOOTER */
254jQuery(window).load(fixFooterBottom);
255jQuery(window).resize(fixFooterBottom);
256
257function fixFooterBottom(){
258
259	var header      = jQuery('header.header');
260	var footer      = jQuery('footer#footer');
261	var content     = jQuery('.site-content > .container');
262
263	content.css('min-height', '1px');
264
265	var headerHeight  = header.outerHeight();
266	var footerHeight  = footer.outerHeight();
267	var contentHeight = content.outerHeight();
268	var windowHeight  = jQuery(window).height();
269
270	var totalHeight = headerHeight + footerHeight + contentHeight;
271
272	if (totalHeight<windowHeight){
273		content.css('min-height', windowHeight - headerHeight - footerHeight );
274	}else{
275		content.css('min-height','1px');
276	}
277}
278
279
280/*** CENTERED MENU */
281var callback_menu_align = function () {
282
283	var headerWrap		= jQuery('.header');
284	var navWrap			= jQuery('#site-navigation');
285	var logoWrap    	= jQuery('.responsive-logo');
286	var containerWrap   = jQuery('.container');
287	var classToAdd    	= 'menu-align-center';
288
289	if ( headerWrap.hasClass(classToAdd) )
290	{
291		headerWrap.removeClass(classToAdd);
292	}
293	var logoWidth     = logoWrap.outerWidth();
294	var menuWidth     = navWrap.outerWidth();
295	var containerWidth  = containerWrap.width();
296
297	if ( menuWidth + logoWidth > containerWidth ) {
298		headerWrap.addClass(classToAdd);
299	}
300	else
301	{
302		if ( headerWrap.hasClass(classToAdd) )
303		{
304			headerWrap.removeClass(classToAdd);
305		}
306	}
307}
308jQuery(window).load(callback_menu_align);
309jQuery(window).resize(callback_menu_align);
310
311var isMobile = {
312	Android: function() {
313		return navigator.userAgent.match(/Android/i);
314	},
315	BlackBerry: function() {
316		return navigator.userAgent.match(/BlackBerry/i);
317	},
318	iOS: function() {
319		return navigator.userAgent.match(/iPhone|iPad|iPod/i);
320	},
321	Opera: function() {
322		return navigator.userAgent.match(/Opera Mini/i);
323	},
324	Windows: function() {
325		return navigator.userAgent.match(/IEMobile/i);
326	},
327	any: function() {
328		return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
329	}
330};
331
332/* Rollover on mobile devices */
333if( isMobile.any() ) {
334
335	/* Our team section */
336	jQuery('.team-member').on('click', function(){
337		jQuery('.team-member-open').removeClass('team-member-open');
338		jQuery(this).addClass('team-member-open');
339		event.stopPropagation();
340	});
341	jQuery("html").click(function() {
342		jQuery('.team-member-open').removeClass('team-member-open');
343	});
344
345	/* Portfolio section */
346	jQuery(document).ready(function(){
347		jQuery('.cbp-rfgrid li').prepend('<p class="cbp-rfgrid-tr"></p>');
348	});
349	jQuery('.cbp-rfgrid li').on('click', function(){
350		if ( !jQuery(this).hasClass('cbp-rfgrid-open') ){
351			jQuery('.cbp-rfgrid-tr').css('display','block');
352			jQuery('.cbp-rfgrid-open').removeClass('cbp-rfgrid-open');
353
354			jQuery(this).addClass('cbp-rfgrid-open');
355			jQuery(this).find('.cbp-rfgrid-tr').css('display','none');
356			event.stopPropagation();
357		}
358	});
359	jQuery("html").click(function() {
360		jQuery('.cbp-rfgrid-tr').css('display','block');
361		jQuery('.cbp-rfgrid-open').removeClass('cbp-rfgrid-open');
362	});
363
364}
365
366
367/* fix for IE9 placeholders */
368
369jQuery(document).ready(function(){
370
371	if (document.createElement("input").placeholder == undefined) {
372
373		jQuery('.contact-form input, .contact-form textarea').focus(function () {
374			if ( (jQuery(this).attr('placeholder') != '') && (jQuery(this).val() == jQuery(this).attr('placeholder')) ) {
375				jQuery(this).val('').removeClass('zerif-hasPlaceholder');
376			}
377		}).blur(function () {
378			if ( (jQuery(this).attr('placeholder') != '') && (jQuery(this).val() == '' || (jQuery(this).val() == jQuery(this).attr('placeholder')))) {
379				jQuery(this).val(jQuery(this).attr('placeholder')).addClass('zerif-hasPlaceholder');
380			}
381		});
382
383		jQuery('.contact-form input').blur();
384		jQuery('.contact-form textarea').blur();
385
386		jQuery('form.contact-form').submit(function () {
387			jQuery(this).find('.zerif-hasPlaceholder').each(function() { jQuery(this).val(''); });
388		});
389	}
390});
391
392jQuery( document ).ready( function(){
393	if( jQuery( '.navbar-black' ).length>0 ) {
394		jQuery('.navbar-black-init').css( 'display', 'bloack' );
395		jQuery('.navbar-black').css( 'display', 'none' );
396	}
397} );
398
399jQuery(window).on('scroll', function () {
400
401	var rb_scrollTop = jQuery(window).scrollTop();
402
403	if( typeof jQuery('.rb_logo').offset() != 'undefined' ) {
404		var rb_elementOffset = jQuery('.rb_logo').offset().top;
405
406		var rb_distance = rb_elementOffset - rb_scrollTop;
407		if(rb_distance < 0) {
408			jQuery('.navbar-black-init').css( 'display', 'none' );
409			jQuery('.navbar-black').css( 'display', 'block' );
410			callback_menu_align();
411		}
412		else {
413			jQuery('.navbar-black').css( 'display', 'none' );
414			jQuery('.navbar-black-init').css( 'display', 'block' );
415			callback_menu_align();
416		}
417
418	}
419
420});
421
422
423
424jQuery(window).load(function(){
425	var widthW = jQuery(window).outerWidth();
426	if( widthW>992-15 ){
427		latestNewsHeight(4);		
428	} else if( widthW>600-17 ) {
429		latestNewsHeight(2);
430	} else {
431		latestNewsHeight(1);
432	}
433});
434
435jQuery(window).resize(function(){
436	var widthW = jQuery(window).outerWidth();
437	if( widthW>992-17 ){
438		latestNewsHeight(4);
439	} else if( widthW>600-17 ) {
440		latestNewsHeight(2);
441	} else {
442		latestNewsHeight(1);
443	}
444});
445
446function latestNewsHeight (nr) {
447	var thisH = jQuery(window).width() / nr;
448	jQuery( '.rb-latest-news-image' ).height( thisH );
449}
450

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.