<!-- Contacts -->
var ContactSheets = {
	start: function(){
		if ($('menu')) ContactSheets.parseSheets();
	},
	
	parseSheets: function(){
		var sheets = $$('#menu .sheet');
		var content = $$('#infos .info');
		var fx = new Fx.Elements(content, {wait: false, duration: 200, transition: Fx.Transitions.Quad.easeOut});
		
		sheets.each(function(sheet, i){
							 
			sheet.addEvent('mouseenter', function(e){
								//alert(sheet.id)				  
				var sheetinfo = $(sheet.id+'_info');
				var obj = {};
				obj[i] = {'margin-top': [sheetinfo.getStyle('margin-top').toInt(), 0]};
				content.each(function(other, j){
					if (other != sheetinfo){
						var w = other.getStyle('margin-top').toInt();
						if (w != 95) obj[j] = {'margin-top': [w, 95]};
					}
				});
				fx.start(obj);
			});
			
			sheet.addEvent('click', function(e){		    
					if(sheet.id == 'lease')
						window.open('http://www.leasepoint.nl');
					else if(sheet.id == 'verhuur')
						window.open('http://www.euromobilpartners.nl/a-point');
					else if(sheet.id == 'pon')
						window.open('http://www.pon.nl');
					else if(sheet.id == 'porsche')
						window.open('http://www.porschecentrumamsterdam.nl/');
					else if(sheet.id == 'shop')
						location.href='http://www.a-point.nl/shop';
					else if(sheet.id == 'occasions')
						location.href='/occasions/';
					else
						location.href=sheet.id+'.html';
			})
		});
	}
};

function init(){
		ContactSheets.start()
}

window.addEvent('load',init);