window.addEvent('domready', function(){
	new SmoothScrollX({
		'links': 'a.scroll',
		'anchors': $$('ul.artists li')
	});
});



var SmoothScrollX = new Class({
	Extends: SmoothScroll,

	initialize: function(options, context){

		this.addEvents({
			'start': this.onStart.bindWithEvent(this),
			'complete': this.onComplete.bindWithEvent(this)
		});

		this.parent(options, context);
	},

	onStart: function(link){
		this.currentTarget= $(this.anchor);

		this.filteredAnchors = this.options.anchors.filter(this.anchorFilter, this);
		
		this.filteredAnchors.each(function(anchor){ anchor.set('opacity', 0.3); });
	},

	onComplete: function(){
		this.filteredAnchors.each(function(anchor){
			anchor.get('tween', {'duration': 1000, 'delay': 1000, 'property': 'opacity'}).start(0.3, 1);
		});
	},

	anchorFilter: function(anchor){
		return anchor != this.currentTarget;
	}
});