

/*ロールオーバー*/

$(function(){
     $('a img').hover(function(){
        $(this).attr('src', $(this).attr('src').replace('_off', '_on'));
          }, function(){
             if (!$(this).hasClass('currentPage')) {
             $(this).attr('src', $(this).attr('src').replace('_on', '_off'));
        }
   });
});

$(function(){
     $('form input').hover(function(){
        $(this).attr('src', $(this).attr('src').replace('_off', '_on'));
          }, function(){
             if (!$(this).hasClass('currentPage')) {
             $(this).attr('src', $(this).attr('src').replace('_on', '_off'));
        }
   });
});

/*複数のページ内スクロール*/
  
$(function() {

	//ページ内スクロール
	$(".pagelink li").click(function () {
		var i = $(".pagelink li").index(this)
		var p = $("#mainContent h2").eq(i).offset().top;
		$('html,body').animate({ scrollTop: p }, 'fast');
		return false;
	});

	//ページ上部へ戻る
	$(".btn_top").click(function () {
		$('html,body').animate({ scrollTop: 0 }, 'fast');
		return false;
	});

});
  
  
/*IE6 透過png対策*/
    $(document).ready(function(){   
        $(document).pngFix();   
    });   

/*Divの高さをそろえる*/

    'jQuery' in window && (function($) {  
        function equalHeight(group) {  
            tallest = 0;  
            group.each(function() {  
                thisHeight = $(this).height();  
                if(thisHeight > tallest){  
                    tallest = thisHeight;  
                }  
            });  
            group.height(tallest);  
        }  
      
        $(document).ready(function() {  
            //.hogeの中にあるdivの高さを全て同じにする  
            equalHeight($("div.hoge > div"));  
      
            //.hoge-singleを付与された要素同士の高さを揃える  
            equalHeight($("div.hoge-single"));  
      
            //.hoge-Lと.hoge-Rの高さを揃える  
            equalHeight($("div.hoge-L,div.hoge-R"));  
        });  
		        $(document).ready(function() {  
            //.pagelinkの中にあるliの高さを全て同じにする  
            equalHeight($("ul.pagelink > li"));  

        }); 
    })(jQuery);  
	
//外部リンク

 $(document).ready( function () {
 $("a[href^=http]").not("[href*="+location.hostname+"]").attr("target","_blank");
})





