;(function(){qtool.load.css('.edu-logo,.edu-form,.edu-hotkw{position:absolute}.edu-logo{top:14px;left:0px;text-align:center;width:120px}.edu-form{top:16px;left:120px}.edu-kw{margin-right:5px;padding-left:3px;width:365px;height:28px;line-height:28px;border:1px solid #cdcdcd;background:#fff url(http://h1.qhimg.com/images/search_kw_bg.png) repeat-x;font-size:14px}.edu-btn{width:80px;height:30px;text-align:center;font-size:14px}.edu-hotkw{top:16px;left:620px}.edu-hide{display:none}#edu-tips{width:365px;border:1px solid #666;background:#fff;position:absolute;z-index:999;display:none}#edu-tips a{height:20px;line-height:20px;margin-bottom:1px;padding-left:5px;cursor:pointer;font-size:14px;display:block;color:#000000}#edu-tips a.hover{background:#F3F0A5}#edu-tips a:hover{text-decoration:none}');var tabHtml='<div class="edu-logo"><a href="http://edu.360.cn/?refer=logo"><img src="http://p7.qhimg.com/d/home_tab/zhida-edu.png"></a></div><div class="edu-form" name="edu-form"><form action="http://edu.360.cn/" target="_blank"><input class="edu-kw" type="text" id="edu-kw" name="kw" autocomplete="off" ><button class="edu-btn" type="submit">\u6559\u80b2\u641c\u7d22</button><span class="edu-hide"><input type="hidden" value="button"  name="refer"></span></form></div><div class="edu-hotkw"><iframe src="http://zhida.360.cn/edu/html/hao360cn.html" width="348" height="53" style="overflow:hidden;" allowTransparency="true" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"></iframe></div>';$('.tabs-box[type=edu]').html(tabHtml);$("body").append('<div id="edu-tips"></div>');$("#edu-kw").keyup((function(){var kw="",currindex=-1,day=(new Date()).getDate(),kwRes={};$("#edu-tips a").live("mouseover",function(){$("#edu-tips a.hover").removeClass("hover");$(this).addClass("hover");currindex=$(this).index();}).live("mouseout",function(){$(this).removeClass("hover");}).live("mousedown",function(){$("#edu-kw").val($(this).text());$("#edu-tips").hide();$('form[name=edu-form]').submit();});$(document).mousedown(function(){$("#edu-tips").hide();});hao360.educallback=function(resObj){var query=resObj.query,res=resObj.res||[],tipsHtml="";kwRes[query]=resObj;if(res.length===0){$("#edu-tips").hide();return;}if(res.length>0){$('#edu-tips').html("<a>"+(res.join("</a><a>"))+"</a>");$("#edu-tips").show();}};return function(e){var suggests=$("#edu-tips"),size=suggests.children().length;if(!$(this).val()||e.keyCode===27||e.keyCode===13){suggests.hide();}else if(e.keyCode===38||e.keyCode===40){if(suggests.css("display")!=="none"){if(e.keyCode===38){if(currindex===-1){currindex=size-1;}else{currindex--;}}else{currindex++;}if(currindex>=size){$(this).val(kw);}suggests.children().removeClass("hover");if(currindex>-1&&currindex<size){var newkw=suggests.children().eq(currindex).addClass("hover").text();$(this).val(newkw);}else{$(this).val(kw);currindex=-1}}}else{kw=$(this).val(),currindex=-1;if(kwRes[kw]){hao360.educallback(kwRes[kw]);}else{qtool.load("http://zhida.360.cn/edu/index/haosug2?callback=hao360.educallback&query="+encodeURIComponent(kw)+"&_d="+day+".js");}suggests.css({left:$(this).offset().left,top:$(this).offset().top+$(this).outerHeight()});}}})());})();