<script>

// TAB
	$(function() {
		$("ul.tabs").tabs("div.panes > div");}
	);

//OVERLAY
	$(".overlay-btn[rel]").overlay({effect: 'apple',mask: '#ddd',});
	
	$(function() {
 
    // if the function argument is given to overlay,
    // it is assumed to be the onBeforeLoad event listener
    $(".overlay-ajax[rel]").overlay({
 
        mask: '#ddd',
        effect: 'apple',
 
        onBeforeLoad: function() {
 
            // grab wrapper element inside content
            var wrap = this.getOverlay().find(".contentWrap");
 
            // load the page specified in the trigger
            wrap.load(this.getTrigger().attr("href"));

			$(".contentWrap").html('<div class="loading-gif"></div> ');
        },
 
    });
});


// TOOLTIP

$(".tooltip-trigger").tooltip({ 
	effect: 'fade',
	events: {
		def:     "click, blur",
        tooltip: "click"
        }	
}).dynamic({ bottom: { direction: 'down', bounce: true } });

$('.close-tooltip').click(function(){
	var id = $(this).attr("rel");
	$('#'+id).tooltip().hide();
	$('.error').hide();
});

// MASQUE TEL
jQuery(function($){
   $(".phone-mask").masque("99 99 99 99 99",{placeholder:" "});
});

// DATE INPUT

	// fr
	$.tools.dateinput.localize("fr",  {
	   months:        'janvier,fevrier,mars,avril,mai,juin,juillet,' +
					  'aout,septembre,octobre,novembre,decembre',
	   shortMonths:   'jan,f&eacute;v,mar,avr,mai,jun,jul,' +
					  'aou,sep,oct,nov,dec',
	   days:          'dimanche,lundi,mardi,mercredi,jeudi,vendredi,samedi',
	   shortDays:     'dim,lun,mar,mer,jeu,ven,sam'
	});

	// initialization
	$(".date_pick").dateinput({
		lang: 'fr',
		format: 'dd / mm / yyyy',
		offset: [0, 25]
	});



$(document).ready(contact());


$.tools.tabs.addEffect('slideLeft', function (d, e) {
	var c = this.getConf();
	var current = this.getPanes().index(this.getPanes().filter(':visible'));
	var next        = this.getPanes().index(this.getPanes().eq(d));
	var curDirection= 'left';
	var nextDirection= 'right';
	if(current>next)
	{
	curDirection = 'right';
	nextDirection = 'left';
	}
	this.getPanes().filter(':visible').hide('slide', { direction: curDirection }, 'slow');
	this.getPanes().eq(d).show('slide', { direction: nextDirection }, 'slow',e);

	done.call();

});


</script>

</body>
</html>