// JavaScript Document

/* ////////////////////////////////////////////////////////

	
	
//////////////////////////////////////////////////////// */


$(function(){
	
	//$("#debugtext").html($("html").attr("class"));

	$("img.hover").each(function(){
	  //var testdata = 0;
	  //var testdata2 = 0;
	  
	  $(this).mouseover(function(){
		  
		  var src = $(this).attr("src");
		  
		  src = src.replace('_normal', '_hover');
		  
		  $(this).attr("src", src);
		  
		  //$("#debugtext").html($(this).attr("src"));
		  
		  $(this).css("cursor","pointer");
		  
		  //testdata++;
		  
		  //$("#debugtext").html(testdata);
		
	  });
	
	  $(this).mouseout(function(){
		  
		  var src = $(this).attr("src");
		  
		  src = src.replace('_hover', '_normal');
		  
		  $(this).attr("src", src);
		  
		  //$("#debugtext").html($(this).attr("src"));
		  
		  $(this).css("cursor","default");
		  		  
		  //testdata2++;
		  
		  //$("#debugtext").html("out"+testdata2);
		
  	  });
		
	});
	
	$("div.bannerlinkarea").each(function(){
      		
	  $(this).mouseover(function(){
		  
		  $(".text a",this).css("text-decoration", "underline");
		  
		  
		  $(this).css("cursor","pointer");
		  
  		  var src = $(".banner img", this).attr("src");
		  
		  src = src.replace(/^(.+)_(.+)(\.[a-z]+)$/, "$1_hover$3");
		  
		  $(".banner img", this).attr("src", src);

		  
		  
		  /*
		  src = src.replace('_normal', '_hover');
		  
		  $(this).attr("src", src);
		  
		  //$("#debugtext").html($(this).attr("src"));
		  
		  $(this).css("cursor","pointer");
		  
		  //testdata++;
		  
		  //$("#debugtext").html(testdata);
		  */
		
	  });
	
	  $(this).mouseout(function(){
		  
		  $(".text a", this).css("text-decoration", "none");
		  
		  $(this).css("cursor","default");
		  
  		  var src = $(".banner img", this).attr("src");
		  
		  src = src.replace(/^(.+)_(.+)(\.[a-z]+)$/, "$1_normal$3");
		  
		  $(".banner img", this).attr("src", src);
		  
		  /*
		  src = src.replace('_hover', '_normal');
		  
		  $(this).attr("src", src);
		  
		  //$("#debugtext").html($(this).attr("src"));
		  
		  $(this).css("cursor","default");
		  		  
		  //testdata2++;
		  
		  //$("#debugtext").html("out"+testdata2);
		  */
		
  	  });
	  
	  $(this).click(function(){
		  
		  var href = $(".text a", this).attr("href");
		  
		  //window.location.href = href;
		  //window.location.target= "_blank";
		  
		  window.open(href,'_self');
　　　　　　return false;
		  
		  //alert(href);
		  
	
	  });
	  
	  var src = $(".banner img", this).attr("src");
		  
	  src = src.replace(/^(.+)_(.+)(\.[a-z]+)$/, "$1_hover$3");
	  
	  $("<img>").attr("src", src);
	  
	  
		
	});
	
		$("ul.linkover li").each(function(){
      		
	  $(this).mouseover(function(){
		  
		  $(".titlearea a", this).css("text-decoration", "underline");
		  
		  
		  $(this).css("cursor","pointer");
		  
  		  var src = $(".logoimage img", this).attr("src");
		  
		  src = src.replace(/^(.+)_(.+)(\.[a-z]+)$/, "$1_hover$3");
		  
		  $(".logoimage img", this).attr("src", src);

		  
		  
		  /*
		  src = src.replace('_normal', '_hover');
		  
		  $(this).attr("src", src);
		  
		  //$("#debugtext").html($(this).attr("src"));
		  
		  $(this).css("cursor","pointer");
		  
		  //testdata++;
		  
		  //$("#debugtext").html(testdata);
		  */
		
	  });
	
	  $(this).mouseout(function(){
		  
		  $(".titlearea a", this).css("text-decoration", "none");
		  
		  $(this).css("cursor","default");
		  
  		  var src = $(".logoimage img", this).attr("src");
		  
		  src = src.replace(/^(.+)_(.+)(\.[a-z]+)$/, "$1_normal$3");
		  
		  $(".logoimage img", this).attr("src", src);
		  
		  /*
		  src = src.replace('_hover', '_normal');
		  
		  $(this).attr("src", src);
		  
		  //$("#debugtext").html($(this).attr("src"));
		  
		  $(this).css("cursor","default");
		  		  
		  //testdata2++;
		  
		  //$("#debugtext").html("out"+testdata2);
		  */
		
  	  });
	  
	  $(this).click(function(){
		  
		  var href = $(".titlearea a", this).attr("href");
		  
		  //window.location.href = href;
		  //window.location.target= "_blank";
		  
		  window.open(href,'_blank');
　　　　　　return false;
		  
		  //alert(href);
		  
	
	  });
	  
	  var src = $(".logoimage img", this).attr("src");
		  
	  src = src.replace(/^(.+)_(.+)(\.[a-z]+)$/, "$1_hover$3");
	  
	  $("<img>").attr("src", src);
	  
	  
		
	});

	
	
});


