$(function() {
	// ページトップへ（笑）
	$('#content').append('<p class="totop" id="hoge"><a href="#top">ページTOPへ</a></p>');

	$('#totop a, .totop a').live('click', function(e) {
		$(this).blur();
		$('html, body').animate({ scrollTop: 0 }, 'fast');
		e.preventDefault();
	});

	// 外部リンク（笑）
	$('a[href^="http"]').attr('target', '_blank');

	// ろーるおーばー
	$('a img').hover(
		function() { $(this).css('opacity', 0.75) },
		function() { $(this).css('opacity', 1.0) }
	);

	$('#header-menu a').each(function() {
		if ($(this).attr('href') == $('#topicpath a:last').attr('href')) {
			$(this).addClass('current');
		}
	});

	$('.error-message')
		.css(formEffects.errorCSS)
		.click(function() {
			$(this).animate(formEffects.errorCSSAnimate, 'normal', function() {
				$(this).css('display', 'none');
			});
		});
});

formEffects = {
	'errorCSS': {
		'position': 'absolute',
		'zIndex': 100,
		'top': -2, 'right': 0, 'bottom': -2, 'left': 0,
		'border': '1px solid #C00',
		'backgroundColor': '#FFC',
		'cursor': 'pointer'
	},

	'errorCSSAnimate': {
		'width': 0,
		'opacity': 0.1
	}
};

