/*
Date : 22.11.2008 
Auteur : Adrien Heury thanks to Guillaume Philippon
Projet : clotilde-heury.co.uk
*/

window.addEvent('domready', function() {

/********** SmoothScoll sur clic : **************/

	new SmoothScroll({wait:false, duration:1500, transition:Fx.Transitions.Circ.easeInOut});
	
/************************************************/	


/********************* Fade sur les liens **********************/
	// 1 - Liens avec la classe fade uniquement 
	$$('.fade').each(function(e){
		couleurcontenu = '#5fe1bb' ;
		var fadein = new Fx.Morph(e, {duration: 300, transition: Fx.Transitions.Quad.easeOut, wait:false});
		
		e.addEvent('mouseenter', function(){
			fadein.start({
				'color': '#000000'
			});
		});
		
		e.addEvent('mouseleave', function(){
			fadein.start({
				'color': couleurcontenu
			});
		});
	});
	
	
/********************* Fin Fade sur les liens **********************/

/****************** Infobulles ***********************/
	
	// infobulle credits : 
	var infobulle3 = new Tips($$('.infobulleCredits'), {
		className: 'bulleCredits',
		fixed: false,
		offsets: {'x': 8, 'y': -100},
		hideDelay: 200
	});
	infobulle3.addEvent('show', function(tip){
		tip.set('morph', {duration: 500, transition: Fx.Transitions.linear, wait:false });
	    tip.morph({
			'opacity': [0.1,1],
			'margin-top': [20,1]
		});
	});
	infobulle3.addEvent('hide', function(tip){
	    tip.morph({
	    	'opacity': [1,0],
			'margin-top': [1,20]
		});
	});

	$$('.infobulleCredits').store('tip:title', '<strong>CREDITS</strong>');
	$$('.infobulleCredits').store('tip:text', '<em>Handmade with love by my brother<br /><br />&copy; Clotilde Heury &bull; 01.12.2008</em>');
	
	//

/********************* Fin Infobulles **********************/

});

