function rollOver(){
	var postfix = '_o';
	$('img.o').not('[src*="'+postfix+'."]').each(
		function(){
			var src_org = jQuery(this).attr('src');
			var src_ovr = src_org.substr(0,src_org.lastIndexOf('.')) + postfix + src_org.substr(src_org.lastIndexOf('.'));
			jQuery('<img>').attr('src', src_ovr);
			jQuery(this).hover(
				function(){
					jQuery(this).attr('src',src_ovr);
				},
				function(){
					jQuery(this).attr('src',src_org);
				}
			);
		}
	);
}


// Easingの追加
jQuery.easing.quart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};



/* Event onLoad */
jQuery(document).ready(function(){
	// 
	rollOver();
	
	// スクロール処理を追加
	$('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;
			}
		}
	});
	
	// ポップアップウィンドウ
	if(typeof jQuery.fn.popupwindow=='function'){
		$(".popupwindow").popupwindow();
	}
	
	// 印刷ボタン
	$('#PRINTBUTTON img').click(function() {
		window.print();
	});
	$('#PRINTBUTTON img').css('cursor','pointer');
});

