$(document).ready(function(){
	$("input[type='radio'],input[type='checkbox']").css({ borderStyle:"none" });
	
	//menu
	$('#nav').droppy();
	
	//calendrier
	$.datepicker.setDefaults($.extend({showMonthAfterYear: false}, $.datepicker.regional['']));
	$(".datepicker").datepicker({  
		monthNames: ['Janvier ','F&eacute;vrier ','Mars ','Avril ','Mai ','Juin ','Juillet ','Ao&ucirc;t ','Septembre ','Octobre ','Novembre ','D&eacute;cembre '],
		dayNamesMin: ['D', 'L', 'M', 'M', 'J', 'V', 'S'],
		nextText: '',
		prevText: '',
		showOtherMonths: false,
		firstDay: 1,
		minDate: '0',
		changeMonth: false,
		changeYear: false,
		dateFormat: 'dd/mm/yy'});
	
	//moteur de recherche

	$("#sr-bouton").click(function(){
	  $("#sr-moteur1").slideToggle("slow");
	  $("#sr-bouton").css({ background:"url(http://www.asia.fr/images/bg-btnmoteur_d.png) no-repeat" });
	});
	
	
	//moteur de recherche old
	/*$("#sr-bouton").mouseover(function(){
	  $("#sr-moteur1").slideDown("slow");
	  $("#sr-bouton").css({ background:"url(../images/bg-btnmoteur_u.png) no-repeat" });
	});
	$("#sr-bouton").click(function(){
	  $("#sr-moteur1").slideToggle("slow");
	  $("#sr-bouton").css({ background:"url(../images/bg-btnmoteur_d.png) no-repeat" });
	});*/
	
	//diaporama produit
	$("#btndiapo").click(function(){
		$("#prod-diapo").slideDown("slow");	
		$("div#controller").jFlow({
			slides: "#prod-diapo2",
			width: "595px",
			height: "394px"
		});
	});
	$("#prod-diapoclose").click(function(){
		$("#prod-diapo").slideUp("slow");						  
	});	
	
	//popup voyages de noces
	$("#pop-nocesvalider").click(function(){
		$("#pop-noces").slideDown("slow");					  
	});
	$("#pop-nocesclose").click(function(){
		$("#pop-noces").slideUp("slow");						  
	});
	
	//popup cartes
	$(".opencarte").click(function(){
		$("#popcarte").slideDown("slow");					  
	});
	$("#popcarte1 img").click(function(){
		$("#popcarte").slideUp("slow");						  
	});
	
	//4 produits
	$(".mi-vignette").css({ cursor:"pointer" });
	var thumb = '';
	//$(".mi-detail").css({ cursor:"pointer" });
	$(".mi-detail").bind("mouseleave", function(e){
        $(this).slideUp("fast");
		thumb = '';
    });
	/*$(".mi-vignette").css({ cursor:"pointer" });
	$(".mi-vignette").bind("mouseover", function(e){
		//fermer le detail en cours
		newthumb = this.id.substr(3);
		thumb = newthumb;
		if(thumb != '') {
			$("#dt-"+thumb).slideDown("slow", function() {
			//$("#dt-"+newthumb).slideDown("fast");
			});
		}else{
			$("#dt-"+newthumb).slideUp("slow");
		}
		thumb = newthumb;
	});
	*/
	//page voyages de noces	
	$(".ttlnoces").css({ cursor:"pointer" });
	$(".ttlnoces").click(function(){
		numnoces = this.id.substr(8);
		$("#lm-detail"+numnoces).slideToggle("middle");					  
	});
	
	//tooltip page circuits
	if($("*").index($("a.tooltip")) != -1) {
		$(".tooltip").cluetip({local:true, width:207, height:152, showTitle:false, waitImage:false, dropShadow:false, topOffset:10, leftOffset:10, positionBy:'auto'});
	}
	
	
	tooltip2();
});

/*$(window).load(function () {
	$("#sr-moteur1").slideToggle(700);
	$("#sr-moteur1").slideToggle("middle");
});*/


 <!--
 function favoris() {
 if ( navigator.appName != 'Microsoft Internet Explorer' ){
 window.sidebar.addPanel("Asia - Inventeur de voyages en Asie","http://www.asia.fr","");
 }
 else {
 window.external.AddFavorite("http://www.asia.fr","Asia - Inventeur de voyages en Asie");
 }
 }
 //-->
 <!-- 
 function PopupCentrer(page,field,largeur,hauteur,options)
{
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  villefield=field;
  
villewnd=window.open(page,"villewnd","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
 //-->
/*
 * Tooltip script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
 


this.tooltip2 = function(){	
	/* CONFIG */		
		xOffset = -10;
		yOffset = 1;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

// Affichage des 4 detail home
function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v='hide')?'none':v; }
    obj.display=v; }
}

function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); 
  return x;
  
}


// starting the script on page load
//$(document).ready(function(){
	
//});

//4 produits OLD
/*	var thumb = '';
	$(".mi-detail").bind("mouseleave", function(e){
        $(this).slideUp("slow");
		thumb = '';
    });
	
	$(".mi-vignette").bind("mouseover", function(e){
		//fermer le detail en cours
		newthumb = this.id.substr(3);
		if(thumb != '') {
			$("#dt-"+thumb).slideDown("slow", function() {
				//$("#dt-"+newthumb).slideDown("fast");
			});
		}else{
			$("#dt-"+newthumb).slideUp("slow");
		}
		thumb = newthumb;
	}); */