PageSourceSearch

http://studiogalande.fr/cine-themes/variantes/faisan/js/script-faisan.js?v=1.0.18

js studiogalande.fr collected 2026-10-02 11:16:21 UTC 16,731 bytes, 576 lines download raw bytes

1var bloc_mobile = "ko";
2var mql = null;
3var isGoogleAdBAFilmLaunched = false;
4var scrollFixed = false;
5var isOnMobile = false;
6
7function mobile_detect() {
8	var isMobile = {
9		Android : function() {
10			return navigator.userAgent.match(/Android/i);
11		},
12		BlackBerry : function() {
13			return navigator.userAgent.match(/BlackBerry/i);
14		},
15		iOS : function() {
16			return navigator.userAgent.match(/iPhone|iPad|iPod/i);
17		},
18		Opera : function() {
19			return navigator.userAgent.match(/Opera Mini/i);
20		},
21		Windows : function() {
22			return navigator.userAgent.match(/IEMobile/i);
23		},
24		any : function() {
25			return (isMobile.Android() || isMobile.BlackBerry()
26				|| isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
27
28		}
29	};
30
31	if (isMobile.any()) {
32		bloc_mobile = "ok";
33		isOnMobile = true;
34		resize_caroussel();
35		$(".petit-vignettes").click();
36
37	}
38}
39
40function resize_caroussel() {
41	// Carrousel Haut
42	var h_actualiteCarousel = $("#actualiteCarousel").children(".carousel-inner").children(".active").children(".imgSlide").height();
43	$("#actualiteCarousel").css("height", $("#actualiteCarousel").children(".carousel-inner").children(".active").children(".imgSlide").height());
44	$("#actualiteCarousel").children(".carousel-inner").css("height", $("#actualiteCarousel").children(".carousel-inner").children(".active").children(".imgSlide").height());
45
46	if ($(document).width() < 1024) {
47		$("#actualiteCarousel").css("height", $("#actualiteCarousel").children(".carousel-inner").children(".active").children(".imgSlide").height());
48	}
49
50	// Mini carrousel
51	if ($(document).width() < 1024) {
52		$(".mini-carrousel").css("height", 'auto');
53	} else {
54		$(".mini-carrousel").each(function() {
55			var that = $(this);
56			that.css("height", that.children(".carousel-inner").children(".active").children(".container").height());
57		});
58	}
59}
60
61function gestionBandeAnnonces() {
62	$(".openplayba").click(function() {
63		var valBA = $(this).attr("rel");
64		var valtitre = $(this).attr("title");
65		var typeBAHTML5 = $(this).hasClass('HTML5');
66		var idfilm = $(this).attr("data-film");
67		$("#myModalLabel").html(valtitre);
68		if (typeBAHTML5) {
69			$("#modal-body-ba").html("<video data-film='" + idfilm + "' width='320' height='240' controls autoplay><source src='" + valBA + "' type='video/mp4'></video>");
70		} else {
71			$("#modal-body-ba").html("<iframe frameborder='0' class='Erk_blogvision_iframe' src='" + valBA + "' allowfullscreen></iframe>");
72		}
73		/*$("#modal-body-ba").html("<iframe frameborder='0' class='Erk_blogvision_iframe' src='" + valBA + "' allowfullscreen></iframe>");*/
74		var slotGoogleAd = $('#modalBandeAnnonce').attr('slot');
75		if (slotGoogleAd && !isGoogleAdBAFilmLaunched) {
76			var contentGoogleAd = '<div class="mentionsAdstitre">LIENS COMMERCIAUX</div><div class="mentionsAds">Ces liens commerciaux sont totalement indépendants et sans lien avec les offres et l\'achat de place en ligne du cinéma.</div><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6532122609221593" data-ad-slot="' + slotGoogleAd + '" data-ad-format="auto"></ins>';
77			$("#modal-body-pub").html(contentGoogleAd);
78			$("#modal-body-pub").css('background-color','#ccc');
79		}
80		$('#modalBandeAnnonce').modal('show');
81	});
82
83	$("#modalBandeAnnonce").on("hide.bs.modal", function(e) {
84		$("#modal-body-ba").html("");
85	});
86
87	$("#modalBandeAnnonce").on("shown.bs.modal", function(e) {
88		if (!isGoogleAdBAFilmLaunched) {
89			(adsbygoogle = window.adsbygoogle || []).push({});
90			isGoogleAdBAFilmLaunched = true;
91		}
92	});
93}
94
95
96
97
98function resize_vignettes(idCompo) {
99	
100	
101	var compo = $('#' + idCompo);
102	
103	var etat = compo.attr('etat');
104    
105	var w_vignette = compo.find(".vignette-aff").first().width();
106
107	//compo.find(".layout-aff").css("width", w_vignette);
108
109	if ((etat == 'max') || (etat == '')) {
110		var h_vignette = compo.find(".vignette-aff").first().height();
111
112		if (h_vignette > 90) {
113			//compo.find(".margeur").css("height", h_vignette);
114		} else {
115			compo.find(".margeur").css("height", "342.75px");
116		}
117	} else if (etat == 'petit') {
118		var h_vignette = compo.find(".vignette-aff").first().height();
119		if (h_vignette > 90) {
120			//compo.find(".margeur-petit").css("height", h_vignette);
121		} else {
122			compo.find(".margeur").css("height", "218.49px");
123		}
124	} else if (etat == 'full') {
125		var h_vignette = compo.find(".vignette-aff-full").first().height();
126		if (h_vignette > 90) {
127			//compo.find(".margeur-full").css("height", h_vignette);
128		} else {
129			compo.find(".margeur-full").css("height", "218.49px");
130		}
131	}
132}
133
134
135
136function resetpetit(idCompo) {
137	var compo = $('#' + idCompo);
138	compo.find(".margeur-petit").addClass("margeur");
139	compo.find(".margeur").removeClass("margeur-petit");
140	var ma = compo.find(".layout-aff").children('.bt_block');
141	$(ma).addClass("col-lg-7");
142	$(ma).removeClass("col-lg-12");
143	var ma = compo.children('.margeur');
144	$(ma).removeClass("youpi");
145	$(ma).addClass("col-lg-3");
146	$(ma).removeClass("col-lg-2");
147	$(ma).addClass("youpi");
148	
149}
150
151function resetfull(idCompo) {
152	var compo = $('#' + idCompo);
153
154	compo.find(".margeur-full").addClass("margeur");
155	compo.find(".margeur").removeClass("margeur-full");
156
157	compo.find('.img-aff').removeClass("col-lg-4");
158	compo.find('.layout-aff-full').removeClass("col-lg-8");
159
160	var ma = compo.children('.margeur');
161	$(ma).removeClass("youpi");
162	$(ma).addClass("col-lg-3");
163	$(ma).removeClass("col-lg-6");
164
165	var ma = compo.find(".img-aff").children('.vignette-aff-full');
166	$(ma).addClass("vignette-aff");
167	$(ma).removeClass("vignette-aff-full");
168
169	compo.find(".layout-aff-full").addClass("layout-aff");
170	compo.find(".layout-aff").removeClass("layout-aff-full");
171
172	compo.find(".img-aff").css("float", 'none');
173	compo.find(".margeur-vignette").css("display", 'block');
174	compo.find(".no-padding-full").addClass("no-padding");
175	compo.find(".no-padding-full").removeClass("no-padding-full");
176	compo.find(".no-padding").addClass("col-lg-7");
177	compo.find(".no-padding").removeClass("col-lg-6");
178	compo.find(".margeur").addClass("youpi");
179	
180}
181
182
183
184window.onresize = function(event) {
185	resize_caroussel();
186	if (bloc_mobile == 'ko') {
187		if ($(document).width() > 992) {
188			$('.cinefilmcompo').each(function() {
189				var etat = $(this).attr('etat');
190				$(this).find("." + etat + '-vignettes').click();
191			});
192		} else {
193			$(".petit-vignettes").trigger("click");
194		}
195	}
196};
197
198
199
200
201
202
203
204$(document).ready(function() {
205	
206	
207	
208
209
210
211  $('[data-toggle="popover"]').popover()
212
213
214	$(".carousel-inner").swipe({
215		//Generic swipe handler for all directions
216		swipeLeft : function(event, direction, distance, duration, fingerCount) {
217			$(this).parent().carousel('next');
218		},
219		swipeRight : function() {
220			$(this).parent().carousel('prev');
221		},
222		//Default is 75px, set to 0 for demo so any distance triggers swipe
223		threshold : 75
224	});
225
226	$(".menu-vignettes-resize").children("div").click(function() {
227		$(this).parent().children('div').removeClass("menu-vignettes-choix");
228		$(this).addClass("menu-vignettes-choix");
229	});
230
231	$(".petit-vignettes").click(function() {
232		var idCompo = $(this).attr('rel');
233		var compo = $('#' + idCompo);
234		var etat = compo.attr('etat');
235
236		if (etat == 'full') {
237			resetfull(idCompo);
238		}
239
240		fauxscroll = document.documentElement.scrollTop + 20;
241
242		window.scrollTo(0, fauxscroll);
243
244		compo.attr('etat', 'petit');
245		compo.find(".margeur").addClass("margeur-petit");
246		compo.find(".margeur-petit").removeClass("margeur");
247
248		var ma = compo.find(".layout-aff").children('.bt_block');
249		$(ma).removeClass("col-lg-7");
250		$(ma).addClass("col-lg-12");
251		var ma = compo.children('.margeur-petit');
252		$(ma).removeClass("youpi");
253		$(ma).removeClass("col-lg-3");
254		$(ma).addClass("col-lg-2");
255		resize_vignettes(idCompo);
256		$(ma).addClass("youpi");
257		
258	});
259
260	$(".max-vignettes").click(function() {
261		var idCompo = $(this).attr('rel');
262		var compo = $('#' + idCompo);
263		var etat = compo.attr('etat');
264
265		if (etat == 'full') {
266			resetfull(idCompo)
267		}
268		if (etat == 'petit') {
269			resetpetit(idCompo)
270		}
271		window.scrollTo(0, 0);
272		compo.attr('etat', 'max');
273		var ma = compo.find(".layout-aff").children('.bt_block');
274		$(ma).removeClass("col-lg-12");
275		$(ma).addClass("col-lg-7");
276		var ma = compo.children('.margeur');
277		$(ma).removeClass("youpi");
278		$(ma).removeClass("col-lg-2");
279		$(ma).addClass("col-lg-3");
280		resize_vignettes(idCompo);
281		$(ma).addClass("youpi");
282		
283	});
284
285	$(".full-vignettes").click(function() {
286		var idCompo = $(this).attr('rel');
287		var compo = $('#' + idCompo);
288		var etat = compo.attr('etat');
289
290		if (etat != 'full') {
291			if (etat == 'petit') {
292				resetpetit(idCompo);
293			}
294			compo.attr('etat', 'full');
295
296			compo.find(".margeur").addClass("margeur-full");
297			compo.find(".margeur-full").removeClass("margeur");
298			compo.find('.img-aff').addClass("col-lg-4");
299			compo.find('.layout-aff').addClass("col-lg-8");
300
301			var ma = compo.children('.margeur-full');
302			$(ma).removeClass("youpi");
303			$(ma).css("height", 'none');
304			$(ma).removeClass("col-lg-3");
305			$(ma).addClass("col-lg-6");
306
307			var ma = compo.find(".img-aff").children('.vignette-aff');
308			$(ma).removeClass("vignette-aff");
309			$(ma).addClass("vignette-aff-full");
310
311			compo.find('.layout-aff-full').css("width", '100%');
312			compo.find("div.layout-aff").addClass("layout-aff-full");
313			compo.find("div.layout-aff").removeClass("layout-aff");
314			compo.find(".img-aff").css("float", 'left');
315			compo.find(".margeur-vignette").css("display", 'none');
316			compo.find(".no-padding").addClass("no-padding-full");
317			compo.find(".no-padding").removeClass("no-padding");
318			compo.find(".no-padding-full").addClass("col-lg-6");
319			compo.find(".no-padding-full").removeClass("col-lg-7");
320			resize_vignettes(idCompo);
321			compo.find(".margeur-full").addClass("youpi");
322			
323		}
324	});
325
326
327	mobile_detect();
328
329	mql = window.matchMedia("(orientation: portrait)");
330	resize_caroussel();
331
332	// Add a media query change listener
333	mql.addListener(function(m) {
334		resize_caroussel();
335		$('.petit-vignettes').trigger("click");
336	});
337
338	$(".case-menu").hover(function() {
339		$(this).addClass("case-menu-hover");
340		$(this).children(".case-menu-contenu").css('display', 'none');
341		$(this).children(".case-menu-contenu-hover").css('display', 'block');
342	}, function() {
343		$(this).children(".case-menu-contenu").css('display', 'block');
344		$(this).children(".case-menu-contenu-hover").css('display', 'none');
345		$(this).removeClass("case-menu-hover");
346	});
347
348	$(".detail-slide").hover(function() {
349		var width = screen.width;
350
351		$(this).addClass("slide-hover");
352
353		var tailleGG = $(this).height();
354		var tailleGi = $(this).children('.contenu-detail-slide').children('.cont-slid').height();
355		var tailleGP = tailleGG - tailleGi - 25;
356
357		$(this).children('.contenu-detail-slide').children("p").css("height", tailleGP);
358	}, function() {
359		$(this).removeClass("slide-hover");
360	});
361
362
363	if (bloc_mobile == 'ok') {
364		$(".carousel").click(function() {
365			$(this).carousel('pause');
366		});
367	}
368
369	gestionHoverAffiches();
370
371	gestionBandeAnnonces();
372
373	$(".opener-info-mob").click(function() {
374		$(this).next().toggle();
375	});
376
377	$('.cinefilmcompo').each(function() {
378		if (bloc_mobile == 'ko') {
379			var etat = $(this).attr('etat-init');
380			$(this).find("." + etat + '-vignettes').click();
381			
382		}
383	});
384	
385	gestionOwlCarousel();
386
387});
388
389
390
391
392
393function gestionHoverAffiches() {
394	
395
396    var isIphone = /iPhone/.test(navigator.userAgent) && !window.MSStream;
397    var hasErakysPage = document.getElementById("Erakys_page_total_prog") !== null;
398
399    if (isIphone && hasErakysPage) {
400        // Désactive les événements hover et click uniquement sur iPhone
401        $("#Erakys_page_total_prog.mini-aff").off('hover click'); // équivalent moderne de unbind
402    } 
403	else {		
404    $(".mini-aff").unbind('hover click');
405    
406    
407    function afficherDetails(img) {
408    	let imgO = $(img);
409        var idCompo = imgO.attr('rel');
410        var etat = $('#' + idCompo).attr('etat');
411        if (etat != 'full') {
412            var tailleG = imgO.height();
413            var tailleh = imgO.children('.layout-aff').children('div.h').height();
414            var taillei = imgO.children('.layout-aff').children('div.margeur-vignette').height();
415            var tailleP = tailleG - tailleh - taillei - 27;
416
417            var bouge = imgO.children('.layout-aff');
418            $(bouge).addClass("layout-aff-roll");
419            imgO.children('.layout-aff').next().addClass("zone-extra-hover");
420
421            $(".layout-aff-roll").css("width", imgO.width());
422            $(".layout-aff-roll").css("height", imgO.height());
423
424            imgO.children('.layout-aff').children('.p').css('height', tailleP);
425        }
426    };
427    
428    function removeDetails(img) {
429    	let imgO = $(img);
430    	let idCompo = imgO.attr('rel');
431        var etat = $('#' + idCompo).attr('etat');
432        if (etat != 'full') {
433            var bouge = imgO.children('.layout-aff');
434            $(bouge).removeClass("layout-aff-roll");
435            $(bouge).next().removeClass("zone-extra-hover");
436        }
437    };
438    
439    if (isOnMobile) {
440    	$(".mini-aff").find('.needHover').hide();
441    }
442
443    /*$(".mini-aff").hover(
444        function(e) {
445        	e.stopPropagation();
446    		this.classList.add('hover-active');
447            afficherDetails(this);
448            $(this).find('.needHover').show();
449        }, 
450        function(e) {
451        	e.stopPropagation();
452    		this.classList.remove('hover-active');
453            removeDetails(this);
454            $(this).find('.needHover').hide();
455        }
456    );*/
457	
458	
459	$(".mini-aff").hover(
460    function(e) {
461        e.stopPropagation();
462        
463        // Stocke la référence à l'élément actuel
464        var self = this;
465        
466        // Ajoute un délai de 0,2s avant d'exécuter la fonction
467        self.hoverTimeout = setTimeout(function() {
468            self.classList.add('hover-active');
469            afficherDetails(self);
470            $(self).find('.needHover').show();
471        }, 200); // 200 millisecondes de temporisation
472    }, 
473    function(e) {
474        e.stopPropagation();
475        
476        // Annule la temporisation si l'utilisateur quitte l'élément avant le délai
477        clearTimeout(this.hoverTimeout);
478        
479        // Retarde la suppression des détails de 0,2s
480        var self = this;
481        self.leaveTimeout = setTimeout(function() {
482            self.classList.remove('hover-active');
483            removeDetails(self);
484            $(self).find('.needHover').hide();
485        }, 200); // 200 millisecondes de temporisation
486    }
487);
488}
489
490}
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506$window = $(window); // cache windows object
507$(window).scroll(function() {
508
509	var menu_scroll = $window.scrollTop();
510	var menu_scroll_limit = '240';
511
512	if (menu_scroll > menu_scroll_limit) {
513		$("#menu-principal").addClass('fixed-top2');
514		$("#menu-principal").removeClass("fixed-top");
515		$("#menu-principal").addClass('slideInDown');
516		$("#menu-principal").removeClass("slideOutUp");
517		scrollFixed = true;
518	}
519
520	if (scrollFixed && menu_scroll < menu_scroll_limit) {
521		$("#menu-principal").addClass('fixed-top');
522		$("#menu-principal").removeClass("fixed-top2");
523		$("#menu-principal").removeClass("slideInDown");
524		$("#menu-principal").removeClass("slideOutUp");
525		// scrollFixed = false ?
526	}
527
528}); // window scroll Ends
529
530$(document).ajaxComplete(function() {
531  $('[data-toggle="popover"]').popover()
532});
533
534
535function gestionOwlCarousel() {
536	try {
537		$('.owl-carousel-prochainement').each(function() {
538			$(this).owlCarousel({
539				stagePadding : 100,
540				loop : $(this).attr('data-loop') == '1',
541				margin : 0,
542				nav : $(this).attr('data-navigation') == '1',
543				dots: $(this).attr('data-navigation') == '1',
544				autoplay:$(this).attr('data-autoplay') == '1',
545				autoplayTimeout:$(this).attr('data-autoplayTimeout') !== undefined && $(this).attr('data-autoplayTimeout') !== false ? $(this).attr('data-autoplayTimeout') : 1000,
546				autoplayHoverPause:true,
547				lazyLoad: true,
548				lazyLoadEager:true,
549				responsive : {
550					0 : {
551						items : 1
552					},
553					600 : {
554						items : 2
555					},
556					850 : {
557						items : 3
558					},
559					1000 : {
560						items : 3
561					},
562					1200 : {
563						items : 3
564					},
565					1400 : {
566						items : 4
567					}
568				}
569			});
570		}); 
571	} catch (e) {
572		console.log(e);
573	}
574}
575
576

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.