// Javascript Document - http://ameduparquet.fr
window.addEvent('domready', function(){
	$('menuparquets').addEvents({'mouseenter':function(){this.set('tween',{duration:940,transition:Fx.Transitions.Cubic.easeInOut}).tween('height','118px');},'mouseleave':function(){this.set('tween',{}).tween('height','20px');}});
	$('menuposes').addEvents({'mouseenter':function(){this.set('tween',{duration:560,transition:Fx.Transitions.Cubic.easeInOut}).tween('height','80px');},'mouseleave':function(){this.set('tween',{}).tween('height','20px');}});
	$('menurealisations').addEvents({'mouseenter':function(){this.set('tween',{duration:750,transition:Fx.Transitions.Cubic.easeInOut}).tween('height','99px');},'mouseleave':function(){this.set('tween',{}).tween('height','20px');}});
	
	var imgposition=$('image');var fx=new Fx.Morph(imgposition,{duration:300,transition:Fx.Transitions.Sine.easeOut});var fx2=new Fx.Morph(imgposition,{duration:200,transition:Fx.Transitions.Sine.easeOut});
	$$('.Img').each(function(Img){Img.addEvent('click',function(e){e=new Event(e).stop();fx2.start({'opacity':0}).chain(function(){imgposition.empty();var load=new Element('div').inject(imgposition);fx2.start({'opacity':1});var largeImage=new Element('img',{'src':Img.href});fx.start({'opacity':0}).chain(function(){imgposition.empty();var description=Img.getElement('span');if(description)var des=new Element('p').set('text',description.get('text')).inject(imgposition);largeImage.inject(imgposition);fx.start({'opacity':1});});});});});imgposition.empty();var description=$('first').getElement('span');if(description)var des=new Element('p').set('text',description.get('text')).inject(imgposition);var largeImage=new Element('img',{'src':$('first').href}).inject(imgposition);
});

hs.graphicsDir='images/';hs.outlineType='custom';hs.dimmingOpacity=0.65;hs.fadeInOut=true;hs.captionEval='this.a.title';hs.registerOverlay({html:'<div class="closebutton" onclick="return hs.close(this)" title="Fermer"></div>',position:'top right',useOnHtml:true,fade:2});

hs.addSlideshow({slideshowGroup:'epe1',interval:5000,repeat:false,useControls:true,fixedControls:'fit',overlayOptions:{opacity:'0.75',position:'bottom center',offsetX:'0',offsetY:'-15',hideOnMouseOut:true}});
hs.addSlideshow({slideshowGroup:'epe2',interval:5000,repeat:false,useControls:true,fixedControls:'fit',overlayOptions:{opacity:'0.75',position:'bottom center',offsetX:'0',offsetY:'-15',hideOnMouseOut:true}});
hs.addSlideshow({slideshowGroup:'epe3',interval:5000,repeat:false,useControls:true,fixedControls:'fit',overlayOptions:{opacity:'0.75',position:'bottom center',offsetX:'0',offsetY:'-15',hideOnMouseOut:true}});
hs.addSlideshow({slideshowGroup:'chantier1',interval:5000,repeat:false,useControls:true,fixedControls:'fit',overlayOptions:{opacity:'0.75',position:'bottom center',offsetX:'0',offsetY:'-15',hideOnMouseOut:true}});
hs.addSlideshow({slideshowGroup:'chantier2',interval:5000,repeat:false,useControls:true,fixedControls:'fit',overlayOptions:{opacity:'0.75',position:'bottom center',offsetX:'0',offsetY:'-15',hideOnMouseOut:true}});
hs.addSlideshow({slideshowGroup:'chantier3',interval:5000,repeat:false,useControls:true,fixedControls:'fit',overlayOptions:{opacity:'0.75',position:'bottom center',offsetX:'0',offsetY:'-15',hideOnMouseOut:true}});
hs.addSlideshow({slideshowGroup:'chantier4',interval:5000,repeat:false,useControls:true,fixedControls:'fit',overlayOptions:{opacity:'0.75',position:'bottom center',offsetX:'0',offsetY:'-15',hideOnMouseOut:true}});


var epe1={slideshowGroup:'epe1',thumbnailId:'epe1',transitions:['expand','crossfade']};
var epe2={slideshowGroup:'epe2',thumbnailId:'epe2',transitions:['expand','crossfade']};
var epe3={slideshowGroup:'epe3',thumbnailId:'epe3',transitions:['expand','crossfade']};

var chantier1={slideshowGroup:'chantier1',thumbnailId:'chantier1',transitions:['expand','crossfade']};
var chantier2={slideshowGroup:'chantier2',thumbnailId:'chantier2',transitions:['expand','crossfade']};
var chantier3={slideshowGroup:'chantier3',thumbnailId:'chantier3',transitions:['expand','crossfade']};
var chantier4={slideshowGroup:'chantier4',thumbnailId:'chantier4',transitions:['expand','crossfade']};
