var NoSubmit = new Class({
	initialize : function(form){
		this.form = form;
		this.submitButton = this.form.getElement('a.go');
		if(!this.submitButton) return;
		
		this.submitButton.addEvent('click', function(e){
			new Event(e).stop();
			this.form.submit();
		}.bind(this));
	}
});


window.addEvent('domready', function(){
	$$('form').each(function(form){
		if(!form.hasClass('ajax')) new NoSubmit(form);
	});
	
	if($('gamePage')){
		$('nwo').set('html', 'If you are the owner of this game and wish it to be removed from our site, please <a href="/contact/" title="Contact us">contact us</a>.');
	} else {
		$('nwo').destroy();
	}
	
	// Right Col Scroller
	/*var scrollCol = $('r');
	var scrollBase = $('content').getPosition().y;
	
	var scrollMax = $('content').getSize().y - 700;
	var scrollFx = new Fx.Tween(scrollCol, {'link' : 'cancel'});
	if(scrollMax > 0) {
		var autoscroll = (function(){
			var curScroll = Window.getScroll().y
			var tmpValue = curScroll - scrollBase;
			if(tmpValue<0){
				tmpValue = 0;
			}
			if(tmpValue>scrollMax){
				tmpValue = scrollMax;
			}
			var newValue =  tmpValue;
			scrollFx.start('padding-top', newValue);		
		}).periodical(1000);
	}*/
	new SmoothScroll({ duration:900 }, window);
	
});