jQuery(function(jQuery){

// ===============================================

	jQuery('#madd01, #madd02').hover(
		function () {
			jQuery(this).css({
				'cursor': 'pointer'
			});
		},
		function () {
			jQuery(this).css({
				'cursor': 'normal'
			});
		}
	);
	jQuery('#madd01').click(function() {
		location.href = 'mailto:nyushi-adv~07@spc.ritsumei.ac.jp'
	});
	jQuery('#madd02').click(function() {
		location.href = 'mailto:office~07@spc.ritsumei.ac.jp'
	});

// ===============================================


	var refad = document.referrer.split('/');
	if (refad[refad.length-1].indexOf('whatsnew') != -1) {
		;
	} else {
		jQuery('a#refbtn').addClass('prebtn');
	}
	jQuery('a#refbtn').click( function() {
		if (refad[refad.length-1].indexOf('whatsnew') != -1) {
			;
		} else {
			//alert(refad[refad.length-1]);
			//location.href = '../';
			history.back(-1);
			return false;
		}
	});

	// h-soccer.html
	if (jQuery('img#cimg000').length) {
		tm = setInterval(function() {
			jQuery('img#cimg000').attr('src') == '4.jpg'?jQuery('img#cimg000').attr('src','1.jpg'):jQuery('img#cimg000').attr('src','4.jpg');
		}, 4000);
	}

	// kounai_HP/guardians/index/topics.html
	if (jQuery('body.topicsf').length) {
		if (window.parent.name != 'guardians') {
			jQuery('body.topicsf').prepend('<ul class="snavi"><li><A href="http://www.spc.ritsumei.ac.jp/" target="_top">ŒcËTOP</A> &gt; </li><li><A href="body.html" target="guardians">•ÛŒìŽÒ—pTOP</A></li></ul>');
		}
	}

/*

*/

});


function backToTop() {
	var x1 = x2 = x3 = 0;
	var y1 = y2 = y3 = 0;
	if (document.documentElement) {
		x1 = document.documentElement.scrollLeft || 0;
		y1 = document.documentElement.scrollTop || 0;
	}
	if (document.body) {
		x2 = document.body.scrollLeft || 0;
		y2 = document.body.scrollTop || 0;
	}
	x3 = window.scrollX || 0;
	y3 = window.scrollY || 0;
	var x = Math.max(x1, Math.max(x2, x3));
	var y = Math.max(y1, Math.max(y2, y3));
	window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));
	if (x > 0 || y > 0) {
		window.setTimeout("backToTop()", 25);
	}
}



