// JavaScript Document

/************ サイト内検索用Ajax ***************/

$(document).ready(function() {

$("input#searchBox").css("color","#999999");
$("input#searchBox").focus(function(){
if ( this.value == "google検索" ) this.value = "";
$(this).css("color","#333333");
});
$("input#searchBox").blur(function(){
if ( this.value == "" ) {
this.value = "google検索";
$(this).css("color","#999999");
}
});
$("input#searchBtn").click(function() {
if ( $("input#searchBox")[0].value == "google検索" ) $("input#searchBox")[0].value = "";
tb_show("メルマガ登録","#TB_inline?height=550&width=480&inlineId=mailMagWrap&modal=true","");
this.form.target = "mailMagFrame";
this.blur();
return true;
});

});

/************ mother01 TreeMenu ***************/
function tree2(menu_class,menu_id) {
 var div=document.getElementById(menu_id);
 if (div.style.display == "block") div.style.display="none";
 else {
  var sib=div.parentNode.childNodes;
  for (var i=0; i < sib.length; i++)
   if (sib[i].className == menu_class) sib[i].style.display="none";
  div.style.display="block";
 }
}
