var WebActix = {
	'start': function() {
		if($('contact')) this.contactForm($('contact'));
		if($('body').getElement('ul.grid')) this.grids($('body').getElements('ul.grid'));
		this.effects();
	},
	'effects': function() {
		$('body').getElements('a').each(function(el) {
			el.store('original.color', el.getStyle('color')).set('tween', {'property':'color', 'duration':300}).addEvents({
				'mouseenter': function() {
					this.tween('#fc4e01');
				},
				'mouseleave': function() {
					this.tween(el.retrieve('original.color'));
				}
			});
		});
	},
	'contactForm': function(el) {
		var el = $(el);
		el.getElements('.text, select').addEvents({
			'focus': function() {
				el.getElements('label').removeClass('focus');
				this.getPrevious('label').addClass('focus');
			},
			'blur': function() {
				el.getElements('label').removeClass('focus');
			}
		});
		var validator = new FormValidator.Tips(el);
	},
	'grids': function(grids) {
		var grids = $$(grids);
		if(!Browser.Engine.trident) {
			grids.each(function(el) {
				var children = el.getChildren();
				children.each(function(child) {
					var siblings = child.getParent().getChildren().erase(child);
					child.addEvents({
						'mouseenter': function() {
							siblings.tween('opacity', 0.5);
						},
						'mouseleave': function() {
							siblings.tween('opacity', 1);
						}
					});
				});
			});
		}
		new Tips.Pointy(grids.getElements('a'), {
			'pointyTipOptions': {
				'point': 'down'
			}
		});
	}
};