$(function(){
	$('a[href*=#].scroll').click(function() {
		if(location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var $target = $(this.hash);
			$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
			if($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body').animate({scrollTop: targetOffset}, 1000);
				return false;
			}
		}
	});
});

/*
window.addEvent('domready', function(){

var scroll = new Fx.Scroll(window, {
	wait: false,
	duration: 1500,
	offset: {'x': 0, 'y': 0},
	transition: Fx.Transitions.Quad.easeInOut
});

$$('.home').each(function(el){
	el.href = "javascript: void(0)";
	el.addEvent('click', function(event) {
		// event = new Event(event).stop();
		scroll.toElement('header');
	});
});

$$('.events').each(function(el){
	el.href = "javascript: void(0)";
	el.addEvent('click', function(event) {
		// event = new Event(event).stop();
		scroll.toElement('events');
	});
});

$$('.models').each(function(el){
	el.href = "javascript: void(0)";
	el.addEvent('click', function(event) {
		event = new Event(event).stop();
		scroll.toElement('models');
	});
});

$$('.contact').each(function(el){
	el.href = "javascript: void(0)";
	el.addEvent('click', function(event) {
		event = new Event(event).stop();
		scroll.toElement('contact');
	});
});



});

*/
