jQuery(document).ready(function() {

	/* Suppression des boutons OK et initialisation du select */
	if(jQuery('#bouton_RG')) {
		jQuery('#bouton_RG').css('display', 'none');
	}
	if(jQuery('#bouton_RC')) {
		jQuery('#bouton_RC').css('display', 'none');
	}
	if(jQuery('#soum_comp')) {
		jQuery('#soum_comp').css('display', 'none');

	}
	if(jQuery('bouton_form_region')) {
		jQuery('bouton_form_region').css('display', 'none');

	}

	/* Autovalidation des formulaires */
	if(jQuery('#region')) {
		jQuery('#region').bind('change', function() {
			jQuery('#rechercheG').submit();
		});
	}
	if(jQuery('#camping')) {
		jQuery('#camping').bind('change', function() {
			jQuery('#rechercheC').submit();
		});
	}
	if(jQuery('#choix')) {
		jQuery('#choix').bind('change', function() {
			jQuery('#form_ajout').submit();
		});
	}
});

jQuery.noConflict(); // __Compatibilité de jQuery avec Mootools

jQuery(document).ready(function($){

	/* Menu Latéral */

	jQuery("#slide").toggle('slide',{},50);
	setTimeout("jQuery('#bandeau_gauche').css('visibility','visible')",400);
 	setTimeout("jQuery('#cont_slide').css('visibility','visible')",400);
 	setTimeout("jQuery('#slide').css('visibility','visible')",400);
	var domaine = '"'+document.location+'"';
	if(domaine.indexOf(".fr") != "-1")
		LANG = "fr";
		else if(domaine.indexOf(".com") != "-1")
			LANG = "en";
			else if(domaine.indexOf(".de") != "-1")
				LANG = "de";
				else LANG = "nl";

	jQuery('a[rel=boxed]').fancybox({titleShow: false, 'overlayOpacity':'0.7', 'overlayColor':'#000', 'transitionIn':'elastic', 'transitionOut':'elastic'});	

	jQuery('#video').fancybox({type: 'iframe', centerOnScroll: true, width: '440px', height: '360px'});
    jQuery('a.fb_dynamic').each(function(){var dWidth  = parseInt(jQuery(this).attr('href').match(/width=[0-9]+/i)[0].replace('width=',''));var dHeight =  parseInt(jQuery(this).attr('href').match(/height=[0-9]+/i)[0].replace('height=',''));
    jQuery(this).fancybox({'width':dWidth,'height':dHeight,'autoScale':false,'transitionIn':'elastic','transitionOut':'elastic','type':'iframe','titleShow':false,'overlayOpacity':'0.7','overlayColor':'#000'});});
	jQuery("#bandeau_gauche").click(function(){jQuery("#slide").toggle('slide',{},500);});
	jQuery("#onglets").tabs();
	jQuery( "#datepicker" ).datepicker({autoSize: true, firstDay : 1, showOn: "both", buttonImage: "/img/calendrier/calendar.gif", buttonImageOnly: true, buttonText:""});
	jQuery( "#datepicker" ).blur();
		
});

function showTypo(nb) {
	var height = jQuery("#tooltip_"+nb).height()+50;
	jQuery("#tooltip_"+nb).css('margin-top', -height);
	jQuery("#tooltip_"+nb).css('display', 'block');
}
function delTypo(nb) {
	jQuery("#tooltip_"+nb).css('display', 'none');
}

