// JavaScript Document
window.addEvent('domready',function(){
	var szNormal = 30, szSmall  = 30, szFull   = 310;
	 
	var kwicks = $$("#menu .element ");
	var fx = new Fx.Elements(kwicks, {wait: false, duration: 1200});
	kwicks.each(function(kwick, i) {
		kwick.addEvent("mouseenter", function(event) {
			var o = {};
			o[i] = {height: [kwick.getStyle("height").toInt(), szFull]}
			kwicks.each(function(other, j) {
				if(i != j) {
					var w = other.getStyle("height").toInt();
					if(w != szSmall) o[j] = {height: [w, szSmall]};
				}
			});
			fx.start(o);
		});
	});
	$("menu").addEvent("mouseleave", function(event) {
		var o = {};
		kwicks.each(function(kwick, i) {
			o[i] = {height: [kwick.getStyle("height").toInt(), szNormal]}
		});
		fx.start(o);
	})
});
window.addEvent('domready', function(){
			var myFx = new Fx.Style('global', 'opacity', {duration: 900, wait: false}); 
			  $('home').addEvent('mouseenter', function(){
				myFx.start(.01);
			  });
			  $('home').addEvent('mouseleave', function(){
				myFx.start(1);
			  });
});
window.addEvent('domready', function(){
		 var myTips = new Tips($$('.titip'), {
					initialize:function(){
						this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 600, wait: false}).set(0);
					},								  
					fixed: true,
					offsets: {x: 0, y: -100},
					onShow: function(toolTip) {
						this.fx.start(0.6);
					},
					onHide: function(toolTip) {
						this.fx.start(0);
					}
			});
});  
window.addEvent('domready', function(){
				var list = $$('div.element h3', 'div#nav-top a', 'ul.liens a');
				list.each(function(element) {
					var fx = new Fx.Styles(element, {duration:400, wait:false});
					element.addEvent('mouseenter', function(){
						fx.start({
							'line-height': '21px',
							'color': '#0B628C'
						});
					});
					element.addEvent('mouseleave', function(){
						fx.start({
							'line-height': '31px',
							'color': '#042636'
						});
					});
				});
});
window.addEvent('domready', function(){
				var list = $$('div.element a');
				list.each(function(element) {
					var fx = new Fx.Styles(element, {duration:400, wait:false});
					element.addEvent('mouseenter', function(){
						fx.start({
							'line-height': '14px',
							'color': '#0B628C'
						});
					});
					element.addEvent('mouseleave', function(){
						fx.start({
							'line-height': '31px',
							'color': '#042636'
						});
					});
				});
});