jQuery(document).ready(function($) {
	var postfix = '_on';
	$('img.rollover , #map a img ,form input.rollover:image').not('[src*="'+ postfix +'."]').each(function() {
		var img = $(this);
		var src = img.attr('src');
		var src_on = src.substr(0, src.lastIndexOf('.'))
		           + postfix
		           + src.substring(src.lastIndexOf('.'));
		$('<img>').attr('src', src_on);
		img.hover(
			function() {
				img.attr('src', src_on);
			},
			function() {
				img.attr('src', src);
			}
		);
	});
});

// Easingの追加
jQuery.easing.quart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};
jQuery(document).ready(function(){

	//
	// <a href="#***">の場合、スクロール処理を追加
	//
	jQuery('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var $target = jQuery(this.hash);
			$target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				jQuery('html,body').animate({ scrollTop: targetOffset }, 500, 'quart');
				return false;
			}
		}
	});

});

$(function() {
	$('#user #user_list ul li:even').addClass('bgc');
});


// first-child IE6 対応
$(function() {  
	$('header #breadcrumb li:first-child , article #article_box .art_box ul li:first-child , article #article_box .art_list dd ul li:first-child , article #vicinity ul li:first-child , article #result_box .art_box ul li:first-child , article #result_box .art_list dd ul li:first-child ').addClass('first-child');  
});
