<!--

/*-----------------------------
 スムースアンカー for JQuery
------------------------------*/

$(function() {
	
	$('a.page_top').click( function()
	{
		var temp1 = $(this).attr('href').split('#');
		var temp2 = document.URL.split('#');
		
		if ( temp1.length > 1 ) {
			
			if ( temp1[0] == '' || temp1[0] == temp2[0] ) {
				
				$.each( $('div'), function( target )
				{
					var anc = $(this).attr('id');
					
					if ( anc == target ) {
						
						var target_top = $(this).offset().top;
						
						$('html,body').animate({scrollTop:target_top},'normal');
					}
				},
				[temp1[1]]);
				
				return false;
			}
		}
		return true;
	});
});

// -->
