// JavaScript Document

//コピーライト
function year() {  var data = new Date();  var now_year = data.getFullYear();  document.write(now_year);  }


//スクロール
$(function(){
     $("#gotop a").click(function(){
     $('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 200,'swing');
     return false;
     })
});


//ロールオーバー
$(document).ready(function() {
	$("img").each(function(){
	var offSrc = $(this).attr("src");
	var onSrc = offSrc.replace("_off.","_on.");
	$(this).hover(
		function() { $(this).attr("src",onSrc); }
		,function() { $(this).attr("src",offSrc); }
		);
	});
});


//アコーディオン
$(function() {
	$('dl.accordion>dd').hide();
	$('dl.accordion>dt.opened').nextUntil('dl.accordion>dt').show('slow');
	$('dl.accordion>dt').click(function(e) {
		$(this).toggleClass('opened');
		$(this).nextUntil('dl.accordion>dt').toggle('slow');
	});
});

//タブ
$(function(){
	$("ul.panel li:not("+$("ul.tab li a.selected").attr("href")+")").hide();
	$("ul.tab li a").click(function(){
		$("ul.tab li a").removeClass("selected");
		$(this).addClass("selected");
		$("ul.panel li").slideUp("fast");
		$($(this).attr("href")).slideDown("fast");
		return false;
	});

});

//スライドパネル
$(function(){  
     $(".open").click(function(){  
      $("#slidebox").slideToggle("slow");  
     });  
}); 

		
