
$(document).ready(function(){

	$("#jigyoButton").click(function(){
		if($("#jigyo21").css("display")=="none"){
		$("#jigyo21").slideDown();
		$("#jigyoButton img").attr("src", "image/buttonb.gif");
		}else{
		$("#jigyo21").slideUp();
		$("#jigyoButton img").attr("src", "image/buttona.gif");
		}
	});
});

$(document).ready(function(){

	$("#kousinBox").load("../sitehistory.html #hisList" , function(){
		$("#kousinBox li:gt(3)").css("display", "none");
	});

});

$(function(){
	$("img.imgMenu").mouseover(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
	}).mouseout(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
	}).each(function(){
		$("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
	});
});



$(function(){
	$.ajax({
		url: 'http://jinenbito.jp/js/tenki3.php',
		dataType: 'xml',
		success: function(data){
			$("item:eq(1)",data).each(function(){
				$("#tenki").append("<a href='"+$("link",this).text()+"'>"
				+$("title:eq(1)",this).text()+"</a><br />"
				+$("description",this).text()+"<br />");
				$("#tenkiIcon").append("<img src='"+$("url",this).text()+"'>");
			});
		}
	});
});

$(function(){
     $(".footerToTop a").click(function(){
     $('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
     return false;
     })
});


