(function(){var a=$("#location"),d=0,b=window.setInterval(function(){d++;if(Cookie.get("citydata")||d>30){window.clearInterval(b);if(!(d>30)){var e=Cookie.get("citydata").split(",")[3];if(e){a.el.href="/difang.php?local="+encodeURIComponent(e);if(e.length>2){a.el.title=e;e=e.substring(0,2)}a.el.innerHTML=e}}a.el.style.visibility="visible"}},13)})();$("#jp_today,#jd_fromDate,#jd_toDate").each(function(a){a.value=Calendar.date()});
$("#skinlist a").on("click",function(a){a=parseInt(a.innerHTML)-1;Cookie.set("style",a);skinSelector.set("style",a)});
var MailLogin={mailCache:[],sendMail:function(){var a=$("#mail_user_114la").el.value,d=$("#mail_passwd_114la").el.value,b=$("#mail_server_114la").el,e=document.mail;b=b.selectedIndex;var g=Config.Mail[b];a={u:a,p:d};if(g.val==0)alert("\u60a8\u6ca1\u6709\u9009\u62e9\u90ae\u7bb1\uff01");else if(Yl.trim(a.u)==""){alert("\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a\uff01");$("#mail_user_114la").el.focus()}else if(Yl.trim(a.p)==""){alert("\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a\uff01");$("#mail_passwd_114la").el.focus()}else{if(this.mailCache.index!=
b){this.mailCache.forEach(function(f){e.removeChild(f)});this.mailCache=[]}e.action=g.action;for(I in g.params)$(e).create("input",{type:"hidden",name:I,value:format(g.params[I],a)},function(f){MailLogin.mailCache.push(f);this.append(f)});e.submit();$("#mail_passwd_114la").el.value=""}},change:function(a){var d=Config.Mail[a.selectedIndex];if(d.type=="link"){window.open(d.action);a.selectedIndex=17}else cache.set("SE_ONFOCUS",true)}},SE=function(){function a(b){function e(f){for(var h=0,j=f.length;h<
j;h++)$("#searchForm").remove(f[h]);return[]}$("#searchForm").el.action=b.action;$("#s_label img").el.src=b.img[0];$("#s_label img").el.setAttribute("alt",b.img[1]);$("#s_int input").el.name=b.name;$("#s_btn input.searchint").el.value=b.btn;$("#s_label a").el.href=b.url;if(d.length>0)d=e(d);for(var g in b.params)$("#searchForm").create("input",{name:g,value:b.params[g],type:"hidden"},function(f){d.push(f);this.append(f)})}var d=[$("#searchForm").el.tn,$("#searchForm").el.ch];$("#s_int input").el.focus();
$("#s_int input").on("mouseover",function(b){if(!cache.get("SE_ONFOCUS")){b.value=b.value;b.focus()}});$("#mail_passwd_114la,#s_int input").on("blur",function(){cache.remove("SE_ONFOCUS")});$("#s_int input").on("focus",function(b){cache.set("SE_ONFOCUS",true);Browser.isIE?Yl.getFocus(b):b.focus()});return{set:a}}();
document.onclick=function(a){a=a||window.event;a=a.srcElement||a.target;var d=a.id;d!="ms-button"&&$("#ms").hide();d!=="showSetting"&&$("#settingBox").el&&$("#settingBox").hide();if(a.tagName&&a.tagName.toUpperCase()=="A"||a.parentNode.tagName&&a.parentNode.tagName.toUpperCase()=="A"||a.parentNode.parentNode.tagName&&a.parentNode.parentNode.tagName.toUpperCase()=="A"){if(a.rel&&a.rel=="nr")return;var b,e;if(a.parentNode.tagName.toUpperCase()=="A"&&a.tagName.toUpperCase()=="IMG"){b=a.parentNode.href;
e=a.alt}else if(a.parentNode.parentNode.tagName.toUpperCase()=="A"){b=a.parentNode.parentNode.href;e=a.innerHTML}else{b=a.href;e=a.innerHTML;if(Yl.trim(b)=="javascript:void(0);"||Yl.trim(b)=="javascript:void(0)")b=e;if(a.getAttribute("rel"))b=e=a.innerHTML}KeywordCount({u:b,n:e,q:0});UserTrack.add(a)}Config.Track.forEach(function(g){d==g[0]&&KeywordCount(g[1])})};$(".tg-ms").on("click",function(){$("#ms").el.style.display=="none"?$("#ms").show():$("#ms").hide()});
$("#showSetting").on("click",function(a){a.blur();$("#settingBox").el?$("#settingBox").show():$("#wrap").create("div",{id:"settingBox"},function(d){var b=Yl.createFrame({src:"/themes/114la10.7/widget/setting/index.html",width:"260",height:"230"});d.innerHTML='<span class="h2">\u4e2a\u6027\u8bbe\u7f6e</span><div id="LSIMG" class="loading"></div><div id="loadSettingBox" style="display:none;">'+b+"</div>";this.append(d);var e=d.getElementsByTagName("iframe")[0];Yl.loadFrame(e,function(){$("#LSIMG").hide();
d.innerHTML='<span class="h2">\u4e2a\u6027\u8bbe\u7f6e</span>'+b;$("#settingBox .h2").on("click",function(){$("#settingBox").hide()})})})});
(function(){if($("#topsite em").el){var a,d=true,b,e=function(){if(d&&a)a.style.display="none"};$("#topsite em").each(function(g){g.onmouseover=function(){e();var f=g.parentNode.getElementsByTagName("div")[0];b=window.setTimeout(function(){$(f).show()},200);a=f;d=false;if(!f.onmouseover){f.onmouseover=function(){d=false};f.onmouseout=function(){d=true;window.setTimeout(e,200)}}};g.onmouseout=function(){d=true;window.setTimeout(e,200);b!=undefined&&window.clearTimeout(b)}})}})();
var qucikSearch=function(){function a(i){g.hide();if(f){b.el.removeChild($("#qs-btn").el);f=false}if(j==0||i==true)e.el.value=h;cache.remove("HAS_SHOW_QS")}function d(i){function r(s){g.el.innerHTML=s.responseText==""?"<ul><li>\u6ca1\u6709\u641c\u7d22\u5230\u76f8\u5173\u7ad9\u70b9!</li></ul>":'<ul class="clearfix">'+s.responseText+"</ul>"}if(i!=""){p=i;n=window.setTimeout(function(){g.show();cache.set("HAS_SHOW_QS",true);g.el.innerHTML="<ul><li>\u6b63\u5728\u641c\u7d22\u4e2d...</li></ul>";var s="/search.php?keyword="+
encodeURIComponent(i);Ajax(s+"&rd="+(new Date).getTime(),r)},o);l=window.setTimeout(function(){KeywordCount({type:"qs",word:i,url:window.location.href},"http://www.tjj.com/click.php")},1E3)}}var b=$("#q_int"),e=$("#q_int input"),g=$("#qs-result"),f=false,h=e.el.value="\u8bf7\u8f93\u5165\u7f51\u7ad9\u540d\u6216\u62fc\u97f3",j=0,n,l,o=200,p;e.on("focus",function(i){b.el.className="f";if(i.value==h)i.value="";j=1});e.on("keyup",function(i){if(i.value=="")a();else if(!(p&&i.value==p)){if(!f){b.create("a",
{id:"qs-btn",rel:"nr",href:"javascript:void(0);",target:"_parent",title:"\u5173\u95ed"},function(r){r.onclick=function(){j=0;a()};this.append(r)});f=true}if(i.value!=""){n&&window.clearTimeout(n);l&&window.clearTimeout(l);d(i.value)}}});e.on("blur",function(i){b.el.className="n";if(i.value=="")i.value=h});return{close:a}}();
$("#sm_tab li").on("click",function(a){$("#s_int input").el.focus();$("#sm_tab li").removeClass("active");$(a).addClass("active");a=a.getAttribute("rel");KeywordCount({u:a,n:a,q:0});cache.set("CURRENT_SE_TAB",a);SE.set(Config.Search[a]);if(Browser.isIE)$("#s_int input").el.value=$("#s_int input").el.value;$("#sw p").hide();$("p#sw_"+a).show();return false});
var HoverTab=function(a,d){var b,e=a.getAttribute("rel");["click","mouseover"].forEach(function(g){switch(g){case "click":b&&window.clearTimeout(b);a["on"+g]=function(){d();e&&KeywordCount({u:e,n:e,q:0})};break;case "mouseover":a["on"+g]=function(){b&&window.clearTimeout(b);b=window.setTimeout(function(){d();e&&KeywordCount({u:e,n:e,q:0})},300)};a.onmouseout=function(){b!=undefined&&window.clearTimeout(b)};break}})};
$("#bm_tab li").each(function(a){function d(){if(cache.get("HAS_SHOW_QS")){qucikSearch.close(true);$("#q_int input").el.blur()}$("#bm_tab li").removeClass("active");a.className="active";b(a.firstChild)}function b(e){function g(){var l=document.createElement("div");l.id=f;l.innerHTML='<iframe width="100%" height="242" frameborder="0" scrolling="no" allowtransparency="true" src="'+h+'"></iframe>';$("#bb .box").el.insertBefore(l,$("#bb .box").el.firstChild);if(j)l.className="nocache";cache.set("BOARD_BOX_TAB",
f,1)}var f=e.getAttribute("rel"),h=e.getAttribute("url"),j=e.getAttribute("nocache");if(f){e=cache.get("BOARD_BOX_TAB");if("#"+f!=cache.get("LAST_BOXTAB")){if(cache.is("LAST_BOXTAB")){var n=$(cache.get("LAST_BOXTAB"));if(n.el.className=="nocache")n.el.getElementsByTagName("iframe")[0].src="";n.hide()}else $("#fm").hide();if(h){if(cache.is("BOARD_BOX_TAB")==false)g();else e.indexOf(f)==-1&&g();cache.set("LAST_BOXTAB","#"+f);if(j){$("#"+f).show();$("#"+f).el.getElementsByTagName("iframe")[0].src=h}else $("#"+
f).show()}else{$("#"+f).show();cache.set("LAST_BOXTAB","#"+f)}}}}HoverTab(a,d)});
var Suggest=function(){function a(){if(i){var c=i.length;s=true;if(l<0)l=c-1;else if(l>=c)l=0;var k=0;for(c=i.length;k<c;k++)i[k].className="";i[l].className="hover";h.el.value=i[l].innerHTML}}function d(){if(!(typeof p!="object"||typeof p=="undefined")){var c="<ul>";p.forEach(function(k,m){c+=cache.get("CURRENT_SE_TAB")=="taobao"?'<li key="'+m+'">'+k[0]+"</li>":'<li key="'+m+'">'+k+"</li>"});c+='</ul><div class="close"><a id="closeSugBtn">\u5173\u95ed</a></div>';i=j.el.getElementsByTagName("li");
j.el.innerHTML=c;j.show();l=-1;t=false;g()}}function b(){j.hide();t=true}function e(){h.el.setAttribute("autocomplete","on");h.el.focus();j.hide();u=true}function g(){j.el.onmouseover=function(c){c=c||window.event;c=c.target||c.srcElement;if(c.tagName.toUpperCase()=="LI"){for(var k=0,m=i.length;k<m;k++)i[k].className="";c.className="hover";l=parseInt(c.getAttribute("key"));$(c).on("mouseout",function(q){q.className=""})}r=true};j.el.onmouseout=function(){r=false};j.el.onclick=function(c){c=c||window.event;
c=c.target||c.srcElement;if(c.tagName.toUpperCase()=="LI"){h.el.value=c.innerHTML;h.el.focus();b();var k=document.getElementById("searchForm");cache.set("Handdle_Key","S");k.onsubmit();k.submit()}c.id=="closeSugBtn"&&e()}}function f(){var c=$("head").el,k=cache.get("CURRENT_SE_TAB");if(o)o.charset=k=="taobao"?"utf-8":"gb2312";if(!Browser.isIE){o&&c.removeChild(o);o=null}if(!o){var m=document.createElement("script");m.type="text/javascript";m.charset=k=="taobao"?"utf-8":"gb2312";c.insertBefore(m,c.firstChild);
o=m}c=(new Date).getTime();m=encodeURIComponent(h.el.value);var q="http://suggestion.baidu.com/su?wd="+m+"&sc=114la&rd="+c;switch(k){case "mp3":q="http://nssug.baidu.com/su?wd="+m+"&prod=mp3&sc=114la&rd="+c;break;case "image":q="http://nssug.baidu.com/su?wd="+m+"&prod=image&fm=114la&rd="+c;break;case "v115":q="http://nssug.baidu.com/su?wd="+m+"&prod=video&sc=114la&rd="+c;break;case "zhidao":q="http://zhidao.sug.baidu.com/su?wd="+m+"&prod=zhidao&sc=114la&rd="+c;break;case "web":q="http://suggestion.baidu.com/su?wd="+
m+"&sc=114la&rd="+c;break;case "taobao":q="http://suggest.taobao.com/sug?code=utf-8&callback=TB.Suggest.callback&q="+m+"&rd="+c;break}o.src=q}var h=$("#s_int input"),j=$("#suggest"),n,l=-1,o=null,p,i,r=false,s=false,t=false,u=false;h.el.onkeydown=function(c){c=c||window.event;if(!u)switch(c.keyCode){case 38:if(t){if(this.value=="")return;j.show();t=false}else l--;a();break;case 40:if(t){if(this.value=="")return;j.show();t=false}else l++;a();break;case 27:this.value=n;b();break;case 13:cache.set("Handdle_Key",
"13");b();break;default:break}};h.el.onkeyup=function(c){c=c||window.event;if(!u){n=this.value;switch(c.keyCode){case 38:s=true;break;case 40:s=true;break;case 8:this.value==""?b():f();break;case 27:this.value=n;b();case 13:cache.set("Handdle_Key","13");b();break;default:n!=""&&f();break}}};h.el.onblur=function(){r||b()};$("#searchForm").el.onsubmit=function(){KeywordCount({type:cache.get("CURRENT_SE_TAB")?cache.get("CURRENT_SE_TAB"):"web",word:h.el.value,url:window.location.href,key:cache.get("Handdle_Key")},
"http://www.tjj.com/click.php");var c=false;Config.Keywords.forEach(function(k){if(h.el.value==k[0]){window.open(k[1]);c=true}});if(c)return false};$("#search_btn").on("click",function(){cache.set("Handdle_Key","B")});window.baidu={};window.baidu.sug=function(c){if(typeof c=="object"&&typeof c.s!="undefined"&&typeof c.s[0]!="undefined"){p=c.s;d()}else b()};window.TB={};window.TB.Suggest={};window.TB.Suggest.callback=function(c){if(typeof c=="object"&&typeof c.result!="undefined"&&typeof c.result[0][0]!=
"undefined"){p=c.result;d()}else b()}}(),UserTrack=function(){function a(d){try{if(d.tagName.toUpperCase()=="A"&&d.href.indexOf("http://")==0&&d.href.indexOf("http://"+Yl.getHost())!=0)if(!(d.rel&&d.rel=="nr")){var b={url:d.href,content:d.innerHTML},e=b.url+"+"+b.content+"_[YLMF]_",g=Cookie.get("history");if(g){if(g.indexOf(e)>-1)g=g.replace(e,"");e+=g}Cookie.set("history",e);var f;if(document.getElementById("bb1"))f=document.getElementById("bb1").getElementsByTagName("iframe");f&&f.length&&f[0].contentWindow.History.show()}}catch(h){}}
return{add:a}}(),miniSearch=function(){function a(){KeywordCount({type:b,word:e.value,url:window.location.href,key:cache.is("CLICK_BS_BTN")?"B":13},"http://www.tjj.com/click.php");cache.remove("CLICK_BS_BTN")}function d(g){if(b=="s0"){a();g.submit()}else{var f;switch(b){case "s1":f="www.google.com.hk/search?client=pub-0194889602661524&channel=2000040001&forid=1&prog=aff&hl=zh-CN&source=sdo_cts_html&q=";break;case "s2":f="116.com/s?q=";break;case "s3":$("#taobao-q").el.value=e.value;if(!cache.get("TAOBAO_PARM")){f=
Config.Search.taobao.params;for(var h in f)$("#taobao-form").create("input",{type:"hidden",name:h,value:f[h]},function(j){this.append(j)});cache.set("TAOBAO_PARM",true)}a();$("#taobao-form").el.submit();return;case "s4":f="116.com/s?q=";break;case "s5":window.open("http://114la.gouwuke.com/search-"+e.value+".html?oid=46962&gsid=126762");a();return;default:break}window.open("http://"+f+encodeURIComponent(e.value));a()}}var b="s0",e=$("#f_int input").el;$("#f_radio input.radio").each(function(g){if(g.checked==
true)b=g.id;g.onclick=function(){b=this.id}});$("#f_btn input").on("click",function(){cache.set("CLICK_BS_BTN",1)});return{gosearch:d}}();$("#tool-tab li").each(function(a){HoverTab(a,function(){$("#tool-tab li").removeClass("active");a.className="active";d(a.getAttribute("rel"))});var d=function(b){$(".tbox").hide();$("#"+b).show()}});
function KeywordCount(a){if(!(!a||a=="")){(new Date).getTime();new Image;var d="";for(var b in a)d+=b=="u"?"?"+b+"="+encodeURIComponent(a[b]):"&"+b+"="+encodeURIComponent(a[b])}}
DOMReady(function(){if(Browser.isIE)$("#s_int input").el.value="";$("#mail_user_114la,#mail_passwd_114la,#f_int input,#q_int input").on("mouseover",function(a){cache.get(a.id+"GETFOCUS")&&a.parentNode.id=="q_int"||(document.all?Yl.getFocus(a):a.focus())});$("#mail_user_114la,#mail_passwd_114la,#f_int input,#q_int input").on("blur",function(a){cache.remove(a.id+"GETFOCUS")});$("#mail_user_114la,#mail_passwd_114la").on("focus",function(a){cache.set(a.id+"GETFOCUS",true)})});
var daodao=function(){return{searchTravel:function(){var a=document.getElementById("daodao_travel_q").value,d=document.getElementById("daodao_travel_k").value,b="http://www.daodao.com/Search?m=13078";if(a&&!d)b+="&q="+encodeURIComponent(a);else if(!a&&d)b+="&q="+encodeURIComponent(d);else if(a&&d)b+="&q="+encodeURIComponent(a+"+"+d);window.open(b)}}}();function ResumeError(){return true}window.onerror=ResumeError;
