// JavaScript Document

	


/***************************/	
/******* MOSAIC  ***********/
/***************************/	

	
function loadeffect() {

	/* ---- MORPH ---- */
	var overFx = [];
	var underoverFx = [];
	var Mosmargin = 50;
	
	$$('#listing .resultat_listing div.over').each(function(el,i){  
			overFx[i] = new Fx.Morph(el, {duration:300, wait:false,transition:Fx.Transitions.Expo.easeOut}).set({'opacity':0})
	});
	
	$$('#listing .resultat_listing div.item').each(function(el,i){ 
		el.addEvent('click',function(e){ document.location.href=el.getNext().get('href'); 
	}); 
		
	underoverFx[i] = new Fx.Morph(el, {
		duration:300, wait:false,transition:Fx.Transitions.Expo.easeOut}).set({'opacity':0,'margin-top':Mosmargin}) 
	});
	
	
	$$('#listing .resultat_listing').each(function(el,i){
		el.addEvents({
		'mouseover':function(e){  
		
		overFx[i].start({'opacity':0.9}); underoverFx[i].start({'opacity':1,'margin-top':22});  
		
		},
		'mouseleave':function(e){  
		overFx[i].start({'opacity':0}); underoverFx[i].start({'opacity':0,'margin-top':Mosmargin}); 
		
		}			
		
		});
	});

	
	/* ---- TWEEN ----
	var tweenHighlight = function(event) {
		event.target.highlight('#eaea16');
	}
	 
	
	var tweenHighlightChange = function(item) {
			item.target.highlight('#e78b00', '#1c1c1c');
	}
	//$$('#content_realisations div.item_new').addEvent('mouseover', tweenHighlightChange);
	
	/*$$('#content_realisations div.item_new').addEvents({
		mouseenter: function(){
			$(this).highlight('#e78b00', '#1c1c1c');
		},
		mouseleave: function(){
			$(this).highlight('#1c1c1c', '#e78b00');
		}
	});*/
	
	/* ---- TWEEN ---- */
	$$('#content_realisations div.item_new').each(function(el,i){
		el.addEvents({
		'mouseenter':function(e){  
			el.highlight('#FFFFFF', '#1c1c1c');
		},
		'mouseleave':function(e){  
			//el.highlight('#1c1c1c', '#e78b00');
		}			
		
		});
	});
 
	
}
