/* =============================================
	rollover
============================================= */

$(document).ready(function(){
  $('ul#subNavi a img, ul#sideMenu a img, #toTop a img, table.basic a img, img.roll')
    .mouseover(function(){
      var onSrc = $(this).attr('src').replace('.jpg', '_o.jpg');
      $(this).attr('src', onSrc);
    })
    .mouseout(function(){
      var offSrc = $(this).attr('src').replace('_o.jpg', '.jpg');
      $(this).attr('src', offSrc);
    });

});

/* =============================================
	fade
============================================= */

$(document).ready(function(){
$("img.fade").fadeTo(0,1.0);
$("img.fade").hover(function(){
        $(this).fadeTo("fast",0.8);
    },
    function(){
        $(this).fadeTo(300,1.0);
    });
});


/* =============================================
	form
============================================= */

jQuery(function(){
	jQuery("#search").val("キーワードを入力して検索...")
	   .css("color","#969696");
	jQuery("#search").focus(function(){
		if(this.value == "キーワードを入力して検索..."){
			jQuery(this).val("").css("color","#000");
		}
	});
	jQuery("#search").blur(function(){
		if(this.value == ""){
			jQuery(this).val("キーワードを入力して検索...")
			     .css("color","#969696");
		}
		if(this.value != "キーワードを入力して検索..."){
			jQuery(this).css("color","#000");
		}
	});
});

/* =============================================
	scroll
============================================= */

$(function(){
     $("#toTop a, .basic a, .listwrap a, ul.scroll li a, table.pub a").click(function(){
     $('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
     return false;
     })
});

