// JavaScript Document
$(function()
{
//詳細タブ
	var animspeed = 500;
	$('#contents .spec_detail').slideUp(animspeed);
	$('#contents .detail_button').toggle(function()
	{
		$(this).children('img').attr('src','/images/button/rank/spec_foot_close.gif').parents('.spec').find('.spec_detail').slideDown(animspeed);
	},function()
	{
		$(this).children('img').attr('src','/images/button/rank/spec_foot_open.gif').parents('.spec').find('.spec_detail').slideUp(animspeed);
	});
//スクロールトップ
	$('a[href ^= #]').click(function()
	{
		var crtID = $(this).attr('href');
		$(this).blur();
		if($(this).attr('href') == '#')
		{
			if($('#sort_table').height() > 0)
			{
				crtTop = $('#sort_table').position().top;
			}else{
				crtTop = 0;
			}
		}else{
			crtTop = $(crtID).position().top;
		}
		$('html, body').animate({ scrollTop: crtTop }, 'nomal');
		return false;
	});
});
