$(document).ready(function() {


/* fonction fade alpha  */
	$('#menu img').fadeTo('fast',0.5);
	$('#menu img').hover(function()
	{
		$(this).fadeTo('fast',1);
	},
	function()
	{
		$(this).fadeTo('fast',0.5);
	});


/* fonction scroll  */
	$('a.panel').click(function () {

		$('a.panel').removeClass('selected');
		$(this).addClass('selected');
		
		current = $(this);
				
		$('#wrapper').scrollTo($(this).attr('href'), 1200);
		
		return false;
	});
	



/* fonction fancybox  */
	$("a.group").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayOpacity':	0.7,
		'overlayColor'	:	'#000',
		'padding'		:	1,
	});


/* fonction mail  */
	var options = { 
	target:        '#alert',
	}; 
	$('#contactForm').ajaxForm(options); 
	



/* fermeture du (document).ready */
});



/* fonction mail bis */
	$.fn.clearForm = function() {
		return this.each(function() {
			var type = this.type, tag = this.tagName.toLowerCase();
			if (tag == 'form')
				return $(':input',this).clearForm();
			if (type == 'text' || type == 'password' || tag == 'textarea')
				this.value = '';
			else if (type == 'checkbox' || type == 'radio')
				this.checked = false;
			else if (tag == 'select')
				this.selectedIndex = -1;
		});
	};
