
window.addEvent('domready', function() {
	/* OVERTEXT */
	$$('.overtext').each(function(item) { new OverText(item); });
	
	/* FORM VALIDATIES */
	$$('.form').each(function(item) { new Form.Validator(item); });

	/* BANNERS */
	var banners = document.id('topbanners');
	if(banners) {
		new Fx.Animate.Fade(banners, 'a', {
			duration: 800,
			interval: 7000
		});
	}
	
	/* BRANDBOX */
	/*var brandbox = document.id('brandbox');
	if(brandbox) {
		new Fx.Animate.Scroll(brandbox, '.item', {
			duration: 800,
			interval: 15000,
			direction: 'left',
			transition: 'back:out'
		});
	}*/
	
	/* MENU */
	var menu = document.id('mainmenu');
	if(menu) {
		var menuitems = menu.getElements('li');
		menuitems.addEvents({
			'mouseenter': function(e) {
				var submenu = this.getElement('.submenu');
				if(submenu) {
					submenu.setStyle('display', 'block');
					this.getElement('a').addClass('hoveractive');
				}
			},
			'mouseleave': function(e) {
				var submenu = this.getElement('.submenu');
                if(submenu) {
					submenu.setStyle('display', 'none');
					this.getElement('a').removeClass('hoveractive');
                }
			}
		});
	}
	
	

	
});

