PageSourceSearch

https://www.saint-berthevin.fr/js/global.js

js saint-berthevin.fr collected 2026-10-02 18:33:12 UTC 4,726 bytes, 142 lines download raw bytes

1var varisMobile,
2  varIsTouch = false,
3  body;
4
5function isTouchDevice() {
6  return (('ontouchstart' in window) ||
7    (navigator.maxTouchPoints > 0) ||
8    (navigator.msMaxTouchPoints > 0));
9}
10
11function init(){
12  varisMobile = (!window.matchMedia("(min-width:800px)").matches);
13  varIsTouch = isTouchDevice();
14  if(varIsTouch || varisMobile){
15    if(body){
16      body.classList.remove("u-hover-on");
17      body.classList.add("u-hover-off");
18    }
19  }else{
20    if(body){
21      body.classList.remove("u-hover-off");
22      body.classList.add("u-hover-on");
23    }
24  }
25}
26
27$(document).ready(function(){
28
29  varisMobile = (!window.matchMedia("(min-width:60em)").matches);
30  body = document.querySelector("body");
31
32  init();
33
34	/* Comportement Rollover avec class="rollover" */
35	$(".rollover").each(function(){
36		attachRollOverEvent(this);
37	});
38    
39    $.mlp ={x:0,y:0};function documentHandler(){var $current =this=== document ? $(this): $(this).contents(); $current.mousemove(function(e){jQuery.mlp ={x:e.pageX,y:e.pageY}}); $current.find("iframe").load(documentHandler);}$(documentHandler); $.fn.ismouseover =function(overThis){var result =false;this.eq(0).each(function(){var $current = $(this).is("iframe")? $(this).contents().find("body"): $(this);var offset = $current.offset(); result
40
41 result = offset.left<=$.mlp.x && offset.left + $current.outerWidth()> $.mlp.x && offset.top<=$.mlp.y && offset.top + $current.outerHeight()> $.mlp.y;});return result;};
42      
43
44	/* Fancybox Propriétés */
45  $("a.fancy").fancybox({ 'overlayShow': true, 'overlayOpacity': 0.70, 'hideOnContentClick': true });
46  $("a#fenetre").fancybox({ 'overlayShow': true, 'zoomSpeedOut':0, 'zoomSpeedIn':0, 'overlayOpacity': 0.70, 'hideOnContentClick': true });
47  
48      
49        
50    /* GESTION DU MENU MOBILE */
51    
52    var deplieMM=false;
53    
54    $('#launchMenuMobile').bind("click",function(e){
55       if(deplieMM==false){
56         $("#contentMenuMobile").show();
57         $("#encaps").css('width',$("#encaps").width());
58         $("#contentMenuMobile").css('height',$("#encaps").height());
59         $("#encaps").animate({left: "90%"}, 300);
60         deplieMM=true;
61       }else{
62          $("#contentMenuMobile").css('border-left','none');
63         $("#encaps").css('width','100%');
64         $("#encaps").animate({left: "0"}, 300);
65         $("#contentMenuMobile").hide();
66         deplieMM=false;
67       }
68       e.preventDefault();
69    });
70    
71    $('#closemm').bind('click',function(e){
72       $("#encaps").css('width','100%');
73       $("#encaps").animate({left: "0"}, 300);
74       deplieMM=false;
75       $("#contentMenuMobile").hide();
76       e.preventDefault();
77    });
78    
79    /* sous menus nav */
80    
81    $("#contentMenuMobile div.dev:not(.actif)").hide();
82    $("#contentMenuMobile a.titre").bind('click',function(e){
83       $(this).next().toggle();
84       $(this).toggleClass('titreActif');
85        e.preventDefault();
86    });
87    
88    /* ------------------------- */
89    
90    $('#body table tr:odd').addClass("odd");
91    
92        
93    /* même hauteur cellule projet */
94    $(".cell_real div.legende").matchHeight(true);
95    
96    $('input#search_header').bind('click',function(){
97		if($(this).val()=='Recherche par mot clé')$(this).val('');
98	}).bind("blur",function() {
99	  if($(this).val()=='')$(this).val('Recherche par mot clé');
100  });
101  
102  if($("span#fixResponsive").width()>=4){
103       $( "#coordmob" ).append( $( "#linksHeader a" ) );
104    }
105    
106    $( window ).resize(function() {
107       if($("span#fixResponsive").width()>=4){
108         $( "#coordmob" ).append( $( "#linksHeader a" ) );
109      }
110      if($("span#fixResponsive").width()<4){
111         $( "#linksHeader" ).append( $( "#coordmob a" ) );
112      }
113   });
114
115
116}); /* fin doc ready */
117
118
119/* ======== Fonctions ========================================================================== */
120
121/* Comportement Rollover avec class="rollover" */
122attachRollOverEvent = function(imageId){
123	$(imageId).mouseover( function(){ $(this).attr("src", $(this).attr("src").replace('.','_roll.')) } );
124	$(imageId).mouseout( function(){ $(this).attr("src", $(this).attr("src").replace('_roll','')) } );
125}
126
127
128
129/* Impression des documents */
130function imprimer(){
131	if(window.print) window.print();
132	else alert("Désolé mais votre navigateur ne supporte pas cette fonctionnalité. Pour la plupart des navigateurs, vous pouvez imprimer cette page  en allant dans le menu 'Fichier' > 'Imprimer'");
133}
134
135/* Ajouter aux favoris */
136
137function favoris() {
138if ( navigator.appName != 'Microsoft Internet Explorer' )
139{ window.sidebar.addPanel("le nom du site","http://www.tonsite.com",""); }
140else { window.external.AddFavorite("http://www.tonsite.com","le nom du site"); } }
141
142window.addEventListener('resize', init);

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.