﻿// JavaScript Document

(function() { var f = document.getElementById('cse-search-box'); if (!f) { f = document.getElementById('searchbox_demo'); } if (f && f.q) { var q = f.q; var n = navigator; var l = location; var su = function () { var u = document.createElement('input'); var v = document.location.toString(); var existingSiteurl = /(?:[?&]siteurl=)([^&#]*)/.exec(v); if (existingSiteurl) { v = decodeURI(existingSiteurl[1]); } var delimIndex = v.indexOf('://'); if (delimIndex >= 0) { v = v.substring(delimIndex + '://'.length, v.length); } u.name = 'siteurl'; u.value = v; u.type = 'hidden'; f.appendChild(u); }; if (n.appName == 'Microsoft Internet Explorer') { var s = f.parentNode.childNodes; for (var i = 0; i < s.length; i++) { if (s[i].nodeName == 'SCRIPT' && s[i].attributes['src'] && s[i].attributes['src'].nodeValue == unescape('http:\x2F\x2Fwww.google.co.jp\x2Fcse\x2Fbrand?form=cse-search-box\x26amp\x3Blang=ja')) { su(); break; } } } else { su(); } if (n.platform == 'Win32') { q.style.cssText = ''; } if (window.history.navigationMode) { window.history.navigationMode = 'compatible'; } var b = function() { if (q.value == '') { q.style.color = '#969696'; } }; var f = function() { q.style.background = ''; }; q.onfocus = f; q.onblur = b; if (!/[&?]q=[^&]/.test(l.search)) { b(); } } })();

$(function(){
	$('#menu input[value=""]').val("サイト内検索").css("color","#969696");

    $("#menu input").focus(function(){   
        if(this.value == "サイト内検索"){   
        	$(this).val("").css({"color":"#000","background":"url(/common/img/menu/sbox.gif) no-repeat"});
			 
        }else {
	        	$(this).css({"color":"#000","background":"url(/common/img/menu/sbox.gif) no-repeat"});
		}
    });   
    $("#menu input#sbox").blur(function(){   
        if(this.value == ""){   
            $(this).val("サイト内検索")
            	.css("color","#969696");   
        }   
        if(this.value != "サイト内検索"){   
            $(this).css("color","#000");  
             
        }   
    });
    $("#menu input#sbox").click(function(){
		$('input[value="サイト内検索"]').val("").css({"color":"#000","background":"url(/common/img/menu/sbox.gif) no-repeat"});
	});
});