document.observe("dom:loaded", function() {
	$$('a[href^=#]:not([href=#])').each(function(e){
		e.observe('click', function(event){
			Event.stop(event);
			var speed = (this.hash.substr(1)) ? 500 : 1000;
			new Effect.ScrollTo($(this.hash.substr(1)), speed);
			return false;
		}.bindAsEventListener(e));
	});
	
	$$('.products-grid li').invoke('observe', 'mouseover', function(){this.addClassName('hover');});
	$$('.products-grid li').invoke('observe', 'mouseout', function(){this.removeClassName('hover');});
});

/* Extend Prototype to select browser version*/
Prototype.Browser.Version = (navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1];

