window.addEvent('domready', function(){
	
	var scroll = new Fx.Scroll(window, {
		wait: false,
		duration: 1000,
		offset: {'x': 0, 'y': -5},
		transition: Fx.Transitions.Quad.easeInOut
	});
	
	$('link1').addEvent('click', function(event) {
		event = new Event(event).stop();
		scroll.toElement('header');
	});
	
	var Tips2 = new Tips($$('.Tips2'), {
		initialize:function(){
			this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 200, wait: false}).set(0);
		},
		onShow: function(toolTip) {
			this.fx.start(1);
		},
		onHide: function(toolTip) {
			this.fx.start(0);
		}
	});
	
	var Tips4 = new Tips($$('.Tips4'), {
		className: 'custom',
		initialize:function(){
			this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 200, wait: false}).set(0);
		},
		onShow: function(toolTip) {
			this.fx.start(1);
		},
		onHide: function(toolTip) {
			this.fx.start(0);
		}
	});
	
	var menu = $$('#header li a');
	menu.each(function(element) {

		var fx = new Fx.Styles(element, {duration:200, wait:false});

		element.addEvent('mouseleave', function(){
			fx.start({
				'color': '#fff',
				'background-color': '#000'
			});
		});
		
		element.addEvent('mouseenter', function(){
			fx.start({
				'color': '#0daee9',
				'background-color': '#fff'
			});
		});

	});
	
	var bg = $$('.appwrap1');
	bg.each(function(element) {

		var fx = new Fx.Styles(element, {duration:400, wait:false});

		element.addEvent('mouseleave', function(){
			fx.start({
				'background-color': '#fff'
			});
		});
		
		element.addEvent('mouseenter', function(){
			fx.start({
				'background-color': '#bbe4f3'
			});
		});
	});
	
});