$(function() {
	$('.fadeout').hover(
		function(){
			$(this).fadeTo(50, 0.7);
		},
		function(){
			$(this).fadeTo(50, 1);
		}
	);
	$('.selected img').fadeTo(0, 0);
	$('.fadeout_gnav').hover(
		function(){
			$(this).fadeTo(50, 0);
		},
		function(){
			$(this).fadeTo(50, 1);
		}
	);

	$(".blank").attr('target', '_blank');
	$(".blank").prepend('<img src="/images/common/icon_blank.gif" height="11" width="13" alt="（別ウィンドウで開きます）" />');
	$(".blank img").css("vertical-align","text-top");
	$(".blank img").css("padding-right","2px");
	$(".pdf").append('&nbsp;<img src="/images/common/icon_pdf_s.gif" height="17" width="17" alt="（PDFファイル）" />');
	$(".pdf img").css("vertical-align","text-top");
	$(".xls").append('&nbsp;<img src="/images/common/icon_xls.gif" height="16" width="16" alt="（Excelファイル）" />');
	$(".xls img").css("vertical-align","text-top");
	$(".doc").append('&nbsp;<img src="/images/common/icon_doc.gif" height="16" width="16" alt="（Wordファイル）" />');
	$(".doc img").css("vertical-align","text-top");
	$(".pps").append('&nbsp;<img src="/images/common/icon_pps.gif" height="16" width="16" alt="（PowerPointファイル）" />');
	$(".pps img").css("vertical-align","text-top");
	$(".pic").append('&nbsp;<img src="/images/common/icon_pic.gif" height="16" width="16" alt="（画像ファイル）" />');
	$(".pic img").css("vertical-align","text-top");
});

$(document).ready( function () {
    
});

function backToTop() {
  var x1 = x2 = x3 = 0;
  var y1 = y2 = y3 = 0;
  if (document.documentElement) {
      x1 = document.documentElement.scrollLeft || 0;
      y1 = document.documentElement.scrollTop || 0;
  }
  if (document.body) {
      x2 = document.body.scrollLeft || 0;
      y2 = document.body.scrollTop || 0;
  }
  x3 = window.scrollX || 0;
  y3 = window.scrollY || 0;
  var x = Math.max(x1, Math.max(x2, x3));
  var y = Math.max(y1, Math.max(y2, y3));
  window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));
  if (x > 0 || y > 0) {
      window.setTimeout("backToTop()", 25);
  }
	//<a href="#" onclick="backToTop(); return false" class="jumpto">このページの先頭へ</a>
}

function cText(obj){
if(obj.value==obj.defaultValue){
obj.value="";
obj.style.color="#000";
}
}

function sText(obj){
if(obj.value==""){
obj.value=obj.defaultValue;
obj.style.color="#62a0cb";
}
}

function cImage(obj){
if(obj.value==obj.defaultValue){
obj.value="";
obj.style.background="none !important";
}
}

function sImage(obj){
if(obj.value==""){
obj.value=obj.defaultValue;
obj.style.background="url(../images/common/input_bg.gif) no-repeat right top !important";
}
}
