$(document).ready(function(){

		$("#input_search").click(function(){$(this).val('')});
				
		// AFFICHAGE SOUS MENU 
			$(".sousmenu").hide();
         	$(".rac").mouseover(function(){
            	var cible=$("+ .sousmenu",this);
				testvis=$("+ .sousmenu:visible",this);
				if(testvis.size()==0){
				   $(".sousmenu:visible").slideUp();
				   cible.slideDown();
				}
            });
			$("#rightbody, #content_index, #content_rub").mouseover(function(){$(".sousmenu").hide();});
			
			// AFFICHAGE SOUSSOUS MENU 
			$(".ssmenu").hide();
         	$(".secrac").mouseover(function(){
            	var cible=$("+ .ssmenu",this);
				testvis=$("+ .ssmenu:visible",this);
				if(testvis.size()==0){
				   $(".ssmenu:visible").hide();
				   cible.show();
				}
            });
			$("#rightbody, #content_index, #content_rub").mouseover(function(){$(".ssmenu").hide();});
		// FIN GESTION MENU
		
			$("a[rel='galerie']").colorbox({transition:"none", width:"75%", height:"75%"});
		
			$("a.popup, a.icone_auto, a.icone_train, a.icone_avion").attr("rel","facebox");
			$('a[rel*=facebox]').facebox();
		
			$("#bic > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
			
			$("#slider").easySlider({
				auto: true,
				continuous: true 
			});
			
			$('table.tableau tr:even').addClass('pair');
						
			/*if($.cookie('majeur') != 1){
				tb_show('', 'vosges_map.html?height=530&width=780&inlineId=myOnPageContent', 'false');
			}else{
				return(false);
			}*/
			
			function ScanCookie(variable)
			   {
			   cook = document.cookie;
			   variable += "=";
			   place = cook.indexOf(variable,0);
			   if (place <= -1)
				  return("0");
			   else
				  {
				  end = cook.indexOf(";",place)
				  if (end <= -1)
					 return(unescape(cook.substring(place+variable.length,cook.length)));
				  else
					 return(unescape(cook.substring(place+variable.length,end)));
				  }
			   }
			   
			function CreationCookie(nom,valeur,permanent)
			   {
			   if(permanent)
				  {
				  dateExp = new Date(2020,11,11);
				  dateExp = dateExp.toGMTString();
				  ifpermanent = '; expires=' + dateExp + ';';
				  }
			   else
				  ifpermanent = '';
			   document.cookie = nom + '=' + escape(valeur) + ifpermanent;
			   }
			if(ScanCookie("dejapopup")==0)
			   {
			$(document).ready(function() {
			tb_show('', 'vosges_map.html?height=530&width=780&inlineId=myOnPageContent', 'false');
			});
			   CreationCookie("dejapopup","oui",false)
			}
			
			$(function () {
                  document.oswidget = new OsFG("OSRecherche","22412-770","fr");
                  document.oswidget.Affiche();
          	}); 

			

});


