function highlight(el,endcolor,duration) {
$(el).style.background = '#FF9F28';
var fx = $(el).effects({duration: 1000, transition: Fx.Transitions.linear});
fx.start.delay(duration/2,fx,{
'background-color': endcolor
});
return false;
}

window.addEvent('domready', function() {
	
Fx.Morph = Fx.Styles.extend({
 
	start: function(className){
 
		var to = {};
 
		$each(document.styleSheets, function(style){
			var rules = style.rules || style.cssRules;
			$each(rules, function(rule){
				if (!rule.selectorText.test('\.' + className + '$')) return;
				Fx.CSS.Styles.each(function(style){
					if (!rule.style || !rule.style[style]) return;
					var ruleStyle = rule.style[style];
					to[style] = (style.test(/color/i) && ruleStyle.test(/^rgb/)) ? ruleStyle.rgbToHex() : ruleStyle;
				});
			});
		});
		return this.parent(to);
	}
 
});
 
Fx.CSS.Styles = ["backgroundColor", "backgroundPosition", "color", "width", "height", "left", "top", "bottom", "right", "fontSize", "letterSpacing", "lineHeight", "textIndent", "opacity"];
 
Fx.CSS.Styles.extend(Element.Styles.padding);
Fx.CSS.Styles.extend(Element.Styles.margin);
 
Element.Styles.border.each(function(border){
	['Width', 'Color'].each(function(property){
		Fx.CSS.Styles.push(border + property);
	});
});
 
var myMorph = new Fx.Morph('morpher', {wait: false});
 
$('morpher').addEvent('mouseleave', function(e){
	new Event(e).stop();
 
	myMorph.start('morph1');
 
});
 
$('morpher').addEvent('mouseenter', function(e){
	new Event(e).stop();
 
	myMorph.start('morph2');
 
});
	
	
var accordion = new Accordion('h3.atStart', 'div.atStart', {
	opacity: false,
	onActive: function(toggler, element){
		toggler.setStyle('color', '#B22222');
	},
 
	onBackground: function(toggler, element){
		toggler.setStyle('color', '#878787');
	}
}, $('accordion'));
 
/* Tips 1 */
var Tips1 = new Tips($$('.Tips1'));

/* Tips 2 */
var Tips2 = new Tips($$('.Tips2'), {
	initialize:function(){
		this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
	},
	onShow: function(toolTip) {
		this.fx.start(1);
	},
	onHide: function(toolTip) {
		this.fx.start(0);
	}
});

Element.Events.extend({
	'wheelup': {
		type: Element.Events.mousewheel.type,
		map: function(event){
			event = new Event(event);
			if (event.wheel >= 0) this.fireEvent('wheelup', event)
		}
	},
 
	'wheeldown': {
		type: Element.Events.mousewheel.type,
		map: function(event){
			event = new Event(event);
			if (event.wheel <= 0) this.fireEvent('wheeldown', event)
		}
	}
});
/* Color */
var background = $('color').getStyle('background-color');
var color = new Color(background).hsb;
 
$('color').addEvents({
	'wheelup': function(e) {
		e = new Event(e).stop();
 
		var hue = color[0] + 3;
		if (hue > 360) {
			hue = 0;
		}
		color[0] = hue;
		this.setStyle('background-color', color.hsbToRgb().rgbToHex());
	},
 
	'wheeldown': function(e) {
		e = new Event(e).stop();
 
		var hue = color[0] - 3;
		if (hue < 0) {
			hue = 360;
		}
		color[0] = hue;
		this.setStyle('background-color', color.hsbToRgb().rgbToHex());
	}
});
activateSearch();
});
