window.addEvent('domready', function() {
	if ($('home')) {
		var imgs = $('column_three').getElements('div');
		for (i = 0; i<imgs.length; i++) {
			imgs[i].addEvents({
				'mouseenter': function() {
					this.style.zIndex = '5';
					this.morph({
						'height': '140px',
						'margin-top': '0px',
						'margin-bottom': '0px'
					});
				},
				'mouseleave': function() {
					tmp = this.id.split('_');
					boven = (parseInt(tmp[1]) - 1) * 50;
					onder = 150 - boven;
					this.morph({
						'height': '40px',
						'margin-top': boven+'px',
						'margin-bottom': onder+'px'
					});
					setTimeout("$(tmp[0]+'_'+tmp[1]).style.zIndex = tmp[1]", 400);
				}
			});

		}
	} else if ($('frogmailing')) {
		var myAccordion = new Accordion($('featuring').getElementsByTagName('div'), $('column_one').getElementsByTagName('div'), {
			duration: 750,
			opacity: true,
			transition: Fx.Transitions.Expo.easeOut
		});
		$('head_1').addEvent('mouseenter', function() {
				this.parentNode.setStyle('background-position', '0px 0px');
				$('head_1').className = 'head active';
				$('head_2').className = $('head_3').className = $('head_4').className = 'head';
				myAccordion.display(0);
			}
		);
		$('head_2').addEvent('mouseenter', function() {
				this.parentNode.setStyle('background-position', '0px -220px');
				$('head_2').className = 'head active';
				$('head_1').className = $('head_3').className = $('head_4').className = 'head';
				myAccordion.display(1);
			}
		);
		$('head_3').addEvent('mouseenter', function() {
				this.parentNode.setStyle('background-position', '0px -440px');
				$('head_3').className = 'head active';
				$('head_1').className = $('head_2').className = $('head_4').className = 'head';
				myAccordion.display(2);
			}
		);
		$('head_4').addEvent('mouseenter', function() {
				this.parentNode.setStyle('background-position', '0px -660px');
				$('head_4').className = 'head active';
				$('head_1').className = $('head_2').className = $('head_3').className = 'head';
				myAccordion.display(3);
			}
		);
	} else if ($('kenmerken')) {
		
		var current = 1;
		
		var li = $('column_one').getElementsByTagName('li');
		for (i = 0; i<li.length; i++) {
			$(li[i].id).addEvent('mouseenter', function() {
					tmp = this.id.split('_');
					$('feature_'+current).className = '';
					this.className = 'active';
					$('tekst_'+current).setStyle('display', 'none');
					$('tekst_'+tmp[1]).setStyle('display', 'block');
					current = tmp[1];
				}
			);
		}
	}  else if ($('handleidingen')) {
		
		var h = $('column_one').getElements('div');
		
		for (i=0; i< h.length; i++) {
			
			h[i].addEvents({
				'mouseenter': function() {
					this.morph({
						'background-color': '#F5F3F3'
					});
				},
				'mouseleave': function() {
					this.morph({
						'background-color': '#ffffff'
					});
				}
			});
			
		}
		
	}
	
	var sitemap_slide = new Fx.Slide('inline_sitemap').hide();
	$('inline_sitemap').setStyle('display','block');
	$('tools_sitemap').addEvent('click', function () { sitemap_slide.toggle(); return false; });
	
});
