/* NAMESPACE */

	if (typeof JS == 'undefined') {
		var JS = {};
	}


/* CSS FIX */

	JS.CssFix = function(parent) {};
	

/* SCRIPT */

	JS.Writer = new Class({
		initialize: function()
		{
			
			this.elements = $$('.write');
			this.elements.each(function(element) {
				element.setOpacity(0);
			});
			this.i = 0;
			this.fade();
			this.timer = this.fade.periodical(1000, this);
		},
		fade: function()
		{			
			if (!this.elements[this.i]) {
				$clear(this.timer);
				return;	
			}			
			this.elements[this.i].get('tween', {property: 'opacity', duration: 'long'}).start(1);
			this.i++;
		}					  
	});

	JS.Slider = new Class({
		initialize: function()
		{
			$$('#sections a').each(function(element) {
				element
					.set('tween', {duration: 250})
					.setStyle('background-position', '0 -100px')
					.addEvent('mouseover', function() {
						element.tween('background-position', '0 0');
					})
					.addEvent('mouseout', function() {
						element.tween('background-position', '0 -100px');
					});
			});
		}
	});
