
jQuery(function(){
	jQuery('a img.current').each(function(){
			jQuery(this).attr('src',jQuery(this).attr('src').replace('_off','_on'));
	})	
	//gNav rollOver
	jQuery('#header #gNav li').each(function(){
		jQuery(this).css('background','no-repeat');
		jQuery(this).css('background-image','url' + '(' + jQuery('img',this).attr('src').replace('_off','_on') + ')');
	})
	jQuery('#header #gNav a img').hover(
		function(){
			jQuery(this).stop().animate({'opacity':'0'},250);

		},
		function(){
			if(!jQuery(this).hasClass('current')){
				jQuery(this).stop().animate({'opacity':'1'},500);
			}
		}
	);
	
	//uNav rollOver
	jQuery('#header #uNav a img').hover(
		function(){
			jQuery(this).attr('src',jQuery(this).attr('src').replace('_off','_on'));
		},
		function(){
			if(!jQuery(this).hasClass('current')){
				jQuery(this).attr('src',jQuery(this).attr('src').replace('_on','_off'));
			}
		}
	);
	
	//rollOver
	jQuery('img.rollover').hover(
		function(){
			jQuery(this).attr('src',jQuery(this).attr('src').replace('_off','_on'));
		},
		function(){
			if(!jQuery(this).hasClass('current')){
				jQuery(this).attr('src',jQuery(this).attr('src').replace('_on','_off'));
			}
		}
	);
	
	//ページトップボタン
	jQuery(window).scroll(function(){
		var scrollNum = jQuery(window).scrollTop();
		if( scrollNum >= 60){
			jQuery('#forTop').animate({'right':'0px'},{easing:'easeOutSine',queue:false});
		} else {
			jQuery('#forTop').animate({'right':'-64px'},{easing:'easeOutSine',queue:false});
	} 
	})
	
	//アーカイブリストのロールオーバー&リンク
	    jQuery('li.archivesBox').hover(function() {
	        jQuery(this).stop().animate({backgroundPosition:'0px 0px'}, 200); // マウスオーバー時の文字色とアニメーションの速さ
	        jQuery(this).find('a').css('color','#990000');
	    }, function() {
	        jQuery(this).stop().animate({backgroundPosition:'-10px 0px'}, 200); // マウスオーバー後の文字色とアニメーションの速さ 
	        jQuery(this).find('a').css('color','#000000');
	    });
		 jQuery('li.archivesBox').click(function(){
			window.location=jQuery(this).find("a").attr("href");
        	return false;
		 	
		 });
		 
		jQuery(function(){
		     jQuery("#forTop a").click(function(){
		     jQuery('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
		     return false;
		     })
		});

		
})

