$(function(){
	$.i81.setScrolls();
	$.i81.rollOver();
	$.i81.setClass();
});
	
$.i81 = {
	setScrolls: function(){
		$('a[href^=#]').click(function(){
			var top = $(this.hash).offset().top; 
   $($.browser.safari ? 'body' : 'html').animate({scrollTop:top}, 700, 'swing');
			return false;
		});
	},
	rollOver: function(){
		$('img.btn').each(function(){
			this.oSrc = $(this).attr("src");
			this.hSrc = this.oSrc.replace(/(\.gif|\.jpg|\.png)$/, "_over$1");
			this.cache = new Image();
			this.cache.src = this.hSrc;
		}).hover(function(){
			$(this).attr('src',this.hSrc);
		},function(){
			$(this).attr('src',this.oSrc);
		});
	},
	setClass: function() {
		$('.shocase_thumb_list li:nth-child(3n)').each(function() {
			$(this).addClass('third-child').next().addClass('third-child-next');
		});
	}
}