// Block Skip

$(function(){
	$(".skip a").focus(function(){
		$(this).addClass("show");
	});
	$(".skip a").blur(function(){
		$(this).removeClass("show");
	});
});


// Google Custom Search

$(function(){
	$("#cse-search-box").attr("action","/search_result/");
	$("#cse-search-box dd").prepend("<input type='hidden' name='cof' value='FORID:11' />");
});


// New Window Icon

$(function(){
	$("div#wrap a[target='_blank']").append("<img src='/images/new_win.gif' alt='新しいウィンドウで開きます' title='新しいウィンドウで開きます' width='15' height='14' class='newWin' />");
});


// File Icon

$(function(){
	$("div#wrap a[href$='.pdf']").prepend("<img src='/images/pdf_icon.gif' alt='PDFファイル' width='16' height='16' class='fileIcon' />");
	$("div#wrap a[href$='.doc']").prepend("<img src='/images/doc_icon.gif' alt='Wordファイル' width='16' height='16' class='fileIcon' />");
	$("div#wrap a[href$='.docx']").prepend("<img src='/images/doc_icon.gif' alt='Wordファイル' width='16' height='16' class='fileIcon' />");
	$("div#wrap a[href$='.xls']").prepend("<img src='/images/xls_icon.gif' alt='Excelファイル' width='16' height='16' class='fileIcon' />");
	$("div#wrap a[href$='.xlsx']").prepend("<img src='/images/xls_icon.gif' alt='Excelファイル' width='16' height='16' class='fileIcon' />");
});


// Form

$(function(){
	$(":input.inputField").focus(function(){
		$(this).css("background","#fff");
	}).blur(function(){
		$(this).css("background","#f7fbff");
	});
});


// Word Break

$(function(){
	if($.browser.msie){
		$("td.inquiry").css("word-break","break-all");
	}else if($.browser.opera){
		$("td.inquiry").css("word-wrap","break-word");
	}else{
		$("td.inquiry a").each(function () {
			var spTxt = $(this).text().split("");
			$(this).html(spTxt .join("<wbr />"));
		});
	}
});



