document.observe('dom:loaded', function () {
	$$('.group_clients .client_logo').each(function (logo) {
		var fader = logo.down('.fade');
		var options = { duration: 0.618 };
		var Timer = {
			counter: null,
			start: function (fn) { this.counter = setTimeout(fn, 100); },
			stop: function () {
				if (this.counter !== null) clearInterval(this.counter);
				this.counter = null;
			}
		};
		
		logo.observe('mouseover', function (event) {
			Timer.stop();
			fader.setStyle({ display: 'block' });
			fader.morph('opacity:0', options);
		});
		
		logo.observe('mouseout', function (event) {
			Timer.start(function () {
				fader.setStyle({ display: 'block' });
				fader.morph('opacity:1', options);
			});
		});
	});
	
	var highlight_boxes = $$('.main_column .highlight_box .bottom'),
		box_height = highlight_boxes.inject(0, function (height, element) {
			var h = element.getHeight();
			return (h > height) ? h : height;
		});
	
	highlight_boxes.invoke('setStyle', { height: (box_height - 35) + 'px' });
	
	if (document.getElementById('team_members')) {
		$('team_members').observe('change', function () {
			if (!$F(this).blank()) {
				window.location.href = $F(this);
			}
		});
	} // team members
});