(function(a,b,c,d){function h(f,k,n){function l(a,b){h[a]=b}function m(a){function c(a){f.appendChild(a)}var f=d,g=[];m=function(a){(f=b.body)?(m=c,u(g,function(a,b){m(b)}),m(a),g=d):g.push(a)};m(a)}function o(a){function c(a){h.appendChild(a)}function f(){var a;return(a=b.getElementsByTagName("head"))&&a.length&&a[0]}function g(a){(h=f())?(u(j,function(a,b){c(b)}),j=d,c(a),o=c):j.push(a)}var h=d,j=[];g(a);o=g}function q(a,b){var d=F(arguments,2);return function(){return b.apply(a,d.concat(F(arguments)))}}
function p(a,b,d,c){function f(){var a=h.length,b=j,d,c,r,i,k;for(d=0;d<a;d++)if(c=h[d],r=c.j,k=c.d,i=c.g,c=c.i,(r=r())||(b=i&&+new Date>i))b&&c&&c(),h.splice(d,1),a--,d--,k(r);h.length||(clearInterval(g),g=0)}var g=0,h=[];p=function(a,b,d,c){h.push({d:a,g:d?d+ +new Date:0,j:b,i:c});g||(f(),h.length&&(g=setInterval(f,10)))};p(a,b,d,c)}function r(a,d,c){var f,g;f=b.createElement(a);g=f.style;d&&u(d,function(a,b){f[a]=b});g&&c&&u(c,function(a,b){g[a]=b});return f}function u(a,b){C(a,function(a,d){b(a,
d);return j})}function v(a){for(var b="Boolean,Number,String,Function,Array,Date,RegExp,Object".split(","),d=b.length,c=Object.prototype.toString,f={},g;d--;)g=b[d],f["[object "+g+"]"]=g.toLowerCase();v=function(a){return a==i?""+a:f[c.call(a)]||"object"};return v(a)}function x(a){function b(a){return"array"===v(a)}x=Array.isArray||b;return x(a)}function C(a,b){var c;c=a.length;return(c===d||"function"===v(a)?function(a,b){for(var d in a)if(a.hasOwnProperty(d)&&b(d,a[d]))return g;return j}:function(a,
b){var d;for(d=0;d<c;d++)if(b(d,a[d]))return g;return j})(a,b)}function D(a,b){var c=x(a)?[]:{};"function"!=typeof b&&(b=b===d?function(a,b){return!!b}:function(a,d){return d==b});u(a,function(a,d){b(a,d)&&(c[a]=d)});return c}function fa(a){return C([1,2],"function"===v(a)?a:function(b,d){return d==a})}function H(a){a.parentNode&&a.parentNode.removeChild(a)}function F(){return Function.prototype.call.apply(Array.prototype.slice,Array.prototype.slice.call(arguments))}function w(a){return(""+a).replace(/(^\s*)|(\s*$)/g,
"")}function z(a){var b;(b=A[a])||(b={id:a},J([b]));return b}function y(a,b,d){var c=z(a),f,g,h,j;if(c&&(c.a=b?6:7,c=E[a])){E[a]=i;delete E[a];for(f=c.length;f--;)g=c[f],h=g.h,j=g.d,g=g.f,d&h&&(j(b),g&&c.splice(f,1));E[a]=c}}function s(a){var b,d=z(a);d&&4==d.a&&(d.a=5,(b=V[d.c])&&b(a,d.b,function(b){y(a,b,1)}))}function t(a){var b,d,c,f,h;b=z(a);d=b.a;c=j;switch(d){case 1:b.a=2;c=j;break;case 3:b.a=4;c=g;break;case 2:case 4:case 5:c=j;break;case 6:y(a,g,2);c=j;break;case 7:y(a,j,2),c=j}c&&(b=b.e,
(f=b.length)?(h=function(){--f||s(a)},u(b,function(a,b){W(b,h,3,g);t(b)})):s(a))}function J(a){u(a,function(a,b){var d,c,f=b.id||a;if(!A[f]||fa(A[f].a)){d=A[f]||{k:f,a:1};c=d.a||1;d.c=b.type||d.c||j;d.b=b.src||d.b||j;d.e=(d.e||[]).concat(b.depends||[]);if(d.c&&d.b&&(1==c||2==c))d.a=3;A[f]=d;2==c&&3==d.a&&t(f)}})}function ga(a){u(a,function(a,b){var d,c="string"==typeof b&&b||b.id||a;if(d=A[c])d.a=1,delete A[c]})}function W(a,b,d,c){(E[a]=E[a]||[]).push({h:d||1,f:c,d:b})}function K(a,b){V[a]=b}function ha(d,
c){var f=r("div",{id:"css_"+d},{cssText:"position:absolute;top:0;left:0;visibility:hidden"});m(f);p(q(this,function(a,b){H(a);c(!!b)},f),q(this,function(d){var c=ia,f;return d.offsetHeight==c||d.currentStyle&&d.currentStyle.height==c+"px"||a.getComputedStyle&&(f=b.defaultView.getComputedStyle(d,i))&&f.getPropertyValue("height")==c+"px"},f),ja)}function ka(a){var b=j;if(a&&(a=w(a)))b=D(a.split(" "),function(a,b){return!!w(b)});return b}function X(a){var b,d;for(b="A";a&&a.nodeName!=b;)a=a.parentNode;
if(!a)return j;b=a.href;if(!b)return j;b=N(b);if(!b)return j;(a=a.rel)&&(d=ka(a));if(!d)return j;Y(b,d);return g}function N(a){return a==L||0==a.indexOf(L+"/")?a.substring(Z)||"/":j}function aa(a){var b=a.id,d=b+"[onload]",c=a.css||[],f=a.js||[],g=a.parent;g&&c.push(g);J([{id:b,type:ba,src:a,depends:c}]);O.push(b);a.onload?(f.push(b),J([{id:d,type:ca,src:a.onload,depends:f}]),O.push(d),t(d)):t(b)}function Y(a,b){var d,c=M[a],g=[];ga(O);if(c){u(b,function(a,b){c[b]?aa(c[b]):g.push(b)});if(0==g.length)return;
b=g}P++;da[P]={uri:a};d=[a,/.*\?.*/.test(a)?"&":"?",f,b?"="+b.join(n):"","&",k,"=",P].join("");switch(B){case Q:case R:case ea:case S:U=r("iframe",{src:d},{display:"none"}),m(U)}B=Q}var A={},V={},E={};h.setResources=J;h.loadResource=t;h.onResourceLoad=W;var I=b.createStyleSheet?[]:j,ja=3E3,ia=88;K("css",function(a,d,c){var f,g;if(I){for(g=f=I.length;g--&&!(25>I[g].imports.length););-1==g&&(I.push(b.createStyleSheet()),g=f);I[g].addImport(d)}else d=r("link",{rel:"stylesheet",type:"text/css",media:"all",
href:d}),o(d);ha(a,c)});K("js",function(a,b,d){function c(a){f.onload=i;f.onerror=i;f.onreadystatechange=i;H(f);d(a)}var f;f=r("script",{src:b,type:"text/javascript",async:g,onload:function(){c(g)},onerror:function(){c(j)},onreadystatechange:function(){f.readyState in{loaded:1,complete:1}&&c(g)}});o(f)});var ba="fragment",ca="fragment_js";K(ba,function(a,d,c){if(a=b.getElementById(d.id))a.innerHTML=d.html;c(!!a)});K(ca,function(b,d,c){u(d,function(b,d){"string"==typeof d&&""!=w(d)&&(new Function(d)).call(a)});
c(g)});var L,Z;L=[c.protocol,"//",c.host].join("");Z=L.length;N(c.href);b.documentElement.onclick=function(b){try{return b=b||a.event,!X(b.target||b.srcElement)}catch(d){}};h.triggerClick=X;N(c.href);var U,P=0,O=[],S=0,Q=1,R=2,ea=3,B=S,M={},da={};l("sessionStart",function(){switch(B){case Q:B=R}});l("fragmentArrive",function(a,b){var d;if(d=da[a])d=d.uri,M[d]||(M[d]={}),M[d][b.id]=b;aa(b)});l("sessionEnd",function(){switch(B){case R:B=ea,H(U),B=S}});h.goURI=function(a,b){Y(a,b)}}var g=!0,i=null,j=
!1;a.xAjax=h})(window,document,location);
(function(a,b){var c=a.cleanData;a.cleanData=function(b){for(var h=0,g;null!=(g=b[h]);h++)try{a(g).triggerHandler("remove")}catch(i){}c(b)};a.widget=function(b,c,g){var i=b.split("."),j=i[0],b=i[1],i=j+"-"+b;g||(g=c,c=a.Widget);a.expr[":"][i]=function(c){return!!a.data(c,"__widget__"+b)};a[j]=a[j]||{};a[j][b]=function(a,b){arguments.length&&this._createWidget(a,b)};c=new c;c.options=a.extend(!0,{},c.options);a[j][b].prototype=a.extend(!0,c,{namespace:j,widgetName:b,widgetEventPrefix:a[j][b].prototype.widgetEventPrefix||
b,widgetBaseClass:i},g);a.widget.bridge(b,a[j][b])};a.widget.bridge=function(d,c){a.fn[d]=function(g){var i="string"===typeof g,j=Array.prototype.slice.call(arguments,1),f=this,g=!i&&j.length?a.extend.apply(null,[!0,g].concat(j)):g;if(i&&"_"===g.charAt(0))return f;i?this.each(function(){var c=a.data(this,"__widget__"+d),h=c&&a.isFunction(c[g])?c[g].apply(c,j):c;if(h!==c&&h!==b)return f=h,!1}):this.each(function(){var b=a.data(this,"__widget__"+d);b?b.option(g||{})._init():a.data(this,"__widget__"+
d,new c(g,this))});return f}};a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,"__widget__"+this.widgetName,this);this.element=a(c);this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var g=this;this.element.bind("remove."+this.widgetName,function(){g.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return this.element.data(this.widgetName)},
_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData("__widget__"+this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(d,c){var g=d;if(0===arguments.length)return a.extend({},this.options);if("string"===typeof d){if(c===b)return this.options[d];g={};g[d]=c}this._setOptions(g);return this},
_setOptions:function(b){var c=this;a.each(b,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,b){this.options[a]=b;"disabled"===a&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",b);return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,g){var i,j=this.options[b],g=g||{},c=a.Event(c);c.type=(b===this.widgetEventPrefix?
b:this.widgetEventPrefix+b).toLowerCase();c.target=this.element[0];if(b=c.originalEvent)for(i in b)i in c||(c[i]=b[i]);this.element.trigger(c,g);return!(a.isFunction(j)&&!1===j.call(this.element[0],c,g)||c.isDefaultPrevented())}}})(jQuery);$.hao123={version:"0.1"};$.hao123.preventDefault=function(a){a=a||window.event;a.preventDefault?a.preventDefault():a.returnValue=!1};$.hao123.flashCookie={wait:function(a){a(!0)}};
$.hao123.ievent={addEventListener:function(a,b){this._events[a].push(b)},removeEventListener:function(a,b){for(var c=this._events[a],d=0;d<c.length;d++)c[d]===b&&c.splice(d,1)},dispatchEvent:function(a,b){for(var c=this._events[a],d=0;d<c.length;d++)c[d](b)}};hao={vaersion:"0.1"};
(function(a,b){function c(a){function h(a){l=a;c=n;h=function(){};j(a)}function j(a){var b,d,c;b=m.length;for(d=0;d<b;d++)c=m[d],c(a)}function f(a){var b;a<o?(b=d[a],b(function(b){b?h(b):f(a+1)})):h(!1)}function k(a){m.push(a)}function n(a){setTimeout(function(){a(l)},0)}var l=b,m=[],o=d.length;c=k;k(a);setTimeout(function(){f(0)},0)}var d,h;a.widget("hao123.storage",{options:{cache:!0},_create:function(){var a=this,b=a.options;a.state=1;a.cache=[];c(function(d){d?(a.storage=d,a.state=2,b.cache&&
a._popCache(),a._trigger("ready",null,d)):(a.state=3,a._trigger("fail"))})},_popCache:function(){var a=this.cache,b=a.length,d,c,h;for(d=0;d<b;d++)c=a[d],h=c[0],c=c[1],this._valAfterReady(2,h,c)},_valCallback:function(a,d){var c;c=d.call(this.element[0],this.storage.get(a),a);c!==b&&this.storage.set(a,c)},_valBeforReady:function(a,d,c){var f=this.options,h=b;switch(a){case 0:case 1:h=null;break;default:f.cache&&this.cache.push([d,c])}return h},_valAfterReady:function(d,c,h){var f=b;switch(d){case 0:f=
null;break;case 1:f=this.storage.get(c);f===b&&(f=null);break;default:a.isFunction(h)?this._valCallback(c,h):this.storage.set(c,h)}return f},_valAfterError:function(a){var d=b;switch(a){case 0:case 1:d=null}return d},val:function(a,d){var c=b,c=arguments.length;switch(this.state){case 0:case 1:c=this._valBeforReady(c,a,d);break;case 2:c=this._valAfterReady(c,a,d);break;default:c=this._valAfterError(c,a,d)}return c}});d=[function(b){function d(){return m=m||baidu.swf.getMovie(h)}function c(a){var b,
f;(b=d())&&(f=b.call("read",[n,""+a]));return f}function f(a,b){var c;(c=d())&&c.call("write",[n,""+a,b])}var h="flashStorage",n="$hao123$",l,m;(l=baidu.swf.createHTML({id:h,url:"http://s1.hao123img.com/index/swf/LocalStorage.swf",width:"1",height:"1",allowscriptaccess:"always",ver:"9.0.0",vars:{width:1,height:1}}))?(target=[0],baidu.dom.insertHTML(a('<div style="font-size:0;line-height:0;height:1px"></div>').appendTo("body")[0],"beforeEnd",l)):b(!1);(function(a){var b,c;c=setInterval(function(){if((b=
d())&&b.flashInit&&b.flashInit())clearInterval(c),a()},50)})(function(){b({get:c,set:f})})}];a.hao123.storage.getInstance=function(){return h?h:h=a(document).storage()}})(jQuery);
$.hao123.format=function(a,b){var c=Array.prototype.slice.call(arguments,1),d=Object.prototype.toString;return c.length?(c=1==c.length?null!==b&&/\[object Array\]|\[object Object\]/.test(d.call(b))?b:c:c,a.replace(/#\{(.+?)\}/g,function(a,b){var i,j,f,k,n;if(!c)return"";i=b.split("|");j=c[i[0]];"[object Function]"==d.call(j)&&(j=j(i[0]));for(f=1,k=i.length;f<k;++f)n=$.hao123.format.filters[i[f]],"[object Function]"==d.call(n)&&(j=n(j));return"undefined"==typeof j||null===j?"":j})):a};
$.hao123.format.filters={escapeJs:function(a){if(!a||"string"!=typeof a)return a;var b,c,d,h=[];for(b=0,c=a.length;b<c;++b)d=a.charCodeAt(b),255<d?h.push(a.charAt(b)):h.push("\\x"+d.toString(16));return h.join("")},escapeString:function(a){return!a||"string"!=typeof a?a:a.replace(/["'<>\\\/`]/g,function(a){return"&#"+a.charCodeAt(0)+";"})},toInt:function(a){return parseInt(a,10)||0}};$.hao123.format.filters.js=$.hao123.format.filters.escapeJs;$.hao123.format.filters.e=$.hao123.format.filters.escapeString;
$.hao123.format.filters.i=$.hao123.format.filters.toInt;jQuery.extend({stringify:function(a){if("JSON"in window)return JSON.stringify(a);var b=typeof a;if("object"!=b||null===a)return"string"==b&&(a='"'+a+'"'),""+a;var c,d,h=[],g=a&&a.constructor==Array;for(c in a)d=a[c],b=typeof d,a.hasOwnProperty(c)&&("string"==b?d='"'+d+'"':"object"==b&&null!==d&&(d=jQuery.stringify(d)),h.push((g?"":'"'+c+'":')+(""+d)));return(g?"[":"{")+(""+h)+(g?"]":"}")}});
var shortConfig={max:5,bodyElem:$("<div class='short' id='short'></div>"),closedElem:$("<a class='short-closed' style='display:none;' href='###' title='\u6d4f\u89c8\u8fc7\u7684\u7f51\u5740' hidefocus='true'></a>"),openedElem:$("<div class='short-opened' style='display:none;' href='###'  hidefocus='true'><div class='short-head'><span class='short-title'>\u6700\u8fd1\u70b9\u8fc7</span><a class='short-close' href='###'  hidefocus='true'></a></div><ul class='short-list'></ul><div class='short-foot'><a class='short-empty' title='\u6e05\u7a7a'></a></div></div>"),
listClass:"short-list",itemTpl:'<li><a target="_blank" class="short-text" href="#{url}" #{title}>#{text}</a><a class="short-delete" title="\u5220\u9664" href="###"></a></li>',delOneClass:"short-delete",delAllClass:"short-empty",closeClass:"short-close",textClass:"short-text",footClass:"short-foot",listen:"#box-starbar,#box-erji,#layout-famoussite,#box-inner-adbar,#box-coolsite",dataKey:"short_data",animateStep:600,maxletter:10};
(function(a,b,c){var d=encodeURIComponent,h=decodeURIComponent,g=function(a,c,d){var d=d||{},f=Number(d.expires);f=null===c?-1:0===d.expires||f?f:365;if(0===f)f="";else{var g=new Date;g.setTime((new Date).getTime()+864E5*f);f=g.toUTCString()}d={expires:"; expires="+f,domain:"; domain="+(d.domain+""===d.domain&&""!==d.domain?d.domain:"hao123.com"),path:"; path="+(d.path+""===d.path&&""!==d.path?d.path:"/"),secure:d.secure?"; secure":""};b.cookie=a+"="+c+d.expires+d.domain+d.path+d.secure},i=function(a){return(a=
a+""===a&&""!==a?b.cookie.match("(?:^| )"+a+"(?:(?:=([^;]*))|;|$)"):null)?a[1]:a},j=function(a,b){var c=(b||"").match("(?:^|,)("+d(a)+"\\|[^,]+)");return c&&c[1]},f=function(a,b,c){return b||null===b||""===b?g(d(a),d(b),c):h(i(d(a)))};f.set=function(a,b,c){g(d(a),null);var h=i("HCD_0")||"",o=j(a,h)||"";g("HCD_0",h.replace(o,[d(a),d(b),(new Date).getTime()+864E5*(c||365)].join("|")+(h.length&&!o?",":"")),{domain:"hao123.com"});return f};f.get=function(a){var b=i(d(a));if(null!==b)return h(b);b=i("HCD_0")||
"";b=j(a,b);if(!b)return b;b=b.split("|");if(Array(b[2])>(new Date).getTime()+0)return h(b[1]);f.del(d(a));return null};f.move=function(a,b){var c=i(d(a));null!==c&&f.set(a,h(c),b||365);return f};f.del=function(a){g(d(a),null);var b=i("HCD_0")||"",a=j(a,b)||"",c=RegExp(",?"+a.replace(/\|/g,"\\|")+",?","g");a&&g("HCD_0",b.replace(c,""));return f};f.clear=function(){g("HCD_0","");return f};f.is=!!navigator.cookieEnabled;a.hao123||(a.hao123={});a.hao123[c]=f})(jQuery,document,"cookie");
(function(a,b){function c(){var c=a.cookie.match("(?:^|; )"+d+"=([^;]*)");if(null!==c)return(c=$.parseJSON(b.decodeURIComponent(c[1])))?c:void 0}var d="index_one";$.hao123.onecookie={get:function(a){var b,d=c();d&&(b=d[a]);return b},set:function(a,g){var i=c()||{};i[a]=g;var j=new Date;j.setTime(j.getTime()+31536E6);document.cookie=d+"="+b.encodeURIComponent($.stringify(i))+";expires="+j.toUTCString()+";path=/"},del:function(b){var g=c();if(!g||!g[b])return!1;delete g[b];a.cookie=d+"="+$.stringify(g)}}})(document,
window);
$(function(){var a=$("<a class='gotop' style='display:none'><span>\u56de\u9876\u90e8</span></a>"),b=!1,c=$(window),d=$.browser.msie&&6>=$.browser.version;window.onscroll=function(){200<c.scrollTop()?(d&&(a.css({top:document.documentElement.scrollTop+document.documentElement.clientHeight-273}),a.hover(function(){a.find("span").css({"background-color":"#e5e5e8",color:"#f30"})},function(){a.find("span").css({"background-color":"#EDEDF0",color:"#498949"})})),b||($("body").append(a),b=!0),a.fadeIn()):a.fadeOut()};
a.click(function(){c.scrollTop(0);a.hide()})});
$(function(){if(!(0>window.navigator.userAgent.toLocaleLowerCase().indexOf("bidubrowser"))&&(browser=window.location.search.match(/[?&]browser=([^&<>'"]+)/))&&"baidu"==browser[1])$("#userBar .g_fr").css({"padding-right":80}),$("#userBar").before(" <a id='baidubrowser' href='bdbrowser://tabpage/#source=hao123' target='_self' style='position:absolute;left:50%;margin-left:412px;top:6px;width:58px; font-size:12px;background:url(http://s0.hao123img.com/res/img/baidulink.png) no-repeat; padding-left:20px;line-height:18px'>\u6700\u5e38\u8bbf\u95ee</a>"),isAppended=
!0,$("#box-userbar").delegate("#baidubrowser","mousedown",function(){$.hao123.log.send({level:1,page:window.pageId,type:"baidubrowser"})})});
$(function(){function a(a){(a=$.hao123.cookie.get(a))&&32<a.length&&(a=a.substring(0,32));return a}var b=0;$("#box-site .js_site-item").each(function(a,c){if(0==$(c).attr("data-status"))return b=1,!1});var c=$.hao123.log.conf.data;$.hao123.log.conf.data={};$.hao123.log.send({v:"rpidmapping",pid:113,hao123_baiduid:a("BAIDUID"),url:"http://nsclick.baidu.com/h.gif",hao123_flashid:a("FLASHID"),isrpuser:b});$.hao123.log.conf.data=c});
$(function(){if(!(0>window.location.search.indexOf("browser=startup"))){var a=$('<div class="hao123b"></div>').appendTo("body"),b=$('<div class="hao123c"></div>');$("body div:first").before(b);window.setTimeout(function(){a.animate({height:0},1E3,function(){})},3E3);window.setTimeout(function(){b.fadeOut()},33E3)}});
hao.uvfix=function(a,b){function c(){var a,c,d=["3w.hao123.com","ww.hao123.com","www.hao123.com","hao123.com"];for(a=d.length;a--;)c=d[a],d.push(c+"/","http://"+c,"http://"+c+"/");d.push(document.URL);for(a=d.length;a--;){c=d[a];var g;a:{var h=c;try{j||(j=document.createElement("div"),j.style.display="none",j.style.behavior="url(#default#homePage)",document.body.appendChild(j));g=j.isHomePage(h);break a}catch(i){}g=b}if(g)return c}return!1}function d(b,c){var d=g,j=b||"null",m=[],o=new Date;o.setTime(+o+
i);m.push(d,"=",encodeURIComponent(j),"; path=/;"," expires=",o.toGMTString(),"; domain=hao123.com");document.cookie=m.join("");a.hao123.storage.getInstance().storage("val",g,b).storage("val",h,c)}var h="REFLAT",g="REF",i=2592E5,j=!1;return function(){var b,j;a.browser.msie&&(b=a.hao123.storage.getInstance(),j=+new Date,b.storage("val",g,function(a){a?b.storage("val",h,function(b){b&&j-b>i&&(a=c());d(a,j)}):(a=c())&&d(a,j)}))}}(jQuery);
(function(a,b){var c;a.widget("hao123.localcookie",a.hao123.storage,{options:{localKey:"FLASHID",cookieKey:"BAIDUID"},_create:function(){var b=this;b.readyState=0;b.callbackList=[];b.element.bind("localcookieready",function(){b.readyState=1;b._calllback(!0)}).bind("localcookiefail",function(){b.readyState=2;b._calllback(!1)});a.hao123.storage.prototype._create.call(this)},_calllback:function(a){var b,c,i;for(i=0,c=this.callbackList.length;i<c;i++)b=this.callbackList[i],b(a)},_init:function(){var a=
this,c=a.options;a.val(c.localKey,function(g){var i;if(g)return i=a.cookie(c.localKey),g!=i&&a.cookie(c.localKey,g),b;i=a.cookie(c.cookieKey);a.cookie(c.localKey,i);return i})},cookie:function(a,c){var g=b,i,j;switch(arguments.length){case 0:break;case 1:g=(c=RegExp("(^| )"+a+"=([^;]*)(;|$)").exec(document.cookie))?c[2]:null;break;default:j=[],i=new Date,i.setTime(+i+31536E6),j.push(a,"=",c,"; path=/;"," expires=",i.toGMTString(),"; domain=hao123.com"),document.cookie=j.join("")}return g},wait:function(a,
c){var g=!1;switch(this.readyState){case 0:this.callbackList.push(function(b){!1!==g&&(!0!==g&&clearTimeout(g),a(b))});g=c!==b?setTimeout(function(){g=!1;a(!1)},c):!0;break;case 1:setTimeout(function(){a(!0)},0);break;default:setTimeout(function(){a(!1)},0)}}});a.hao123.localcookie.getInstance=function(){return c?c:c=a(document).localcookie()}})(jQuery);
$.widget("hao123.page",{options:{type:"",helpurl:"http://www.hao123.com/redian/sheshouyef.htm",shell:{"360se":"02",maxthon:"03",se:"04",qqbrowser:"05",tencenttraveler:"06",theworld:"10",greenbrowser:"12",lbbrowser:"16",bidubrowser:"17"},browser:{firefox:"ff",chrome:"08",opera:"09",safari:"11",msie:"01"}},_create:function(){var a=this;a.element.bind("click",function(b){b.preventDefault();a._action()})},_action:function(){var a=window;switch(this.options.type){case "refresh":a.location.reload();break;
case "none":break;default:this.setHome()}},setHome:function(){var a=window,b=this.options,c=this.element.get(0),d=b.helpurl,h=b.shell,b=b.browser,g;g=$.hao123.user.getIsHomeSrc();g=1==g?"http://www.hao123.com/?f=hao123":0==g?"http://www.hao123.com/?from=hao123":"http://www.hao123.com/";var i=$.hao123.user.getLiveType();if($.hao123.browser.isShell)return a.open(d+"#"+h[$.hao123.browser.shell[0]]),!1;if(!$.hao123.browser.ie&&$.hao123.browser.types[0]||"open"==this.options.type)return a.open(d+"#"+b[$.hao123.browser.types[0]]),
!1;h=window.location.search.match(/[?&](tn|src)=([^&<>'"]+)/)?1:0;i="iehome"==i||"iestandardhome"==i?1:0;if($.hao123.browser.ie)try{c.style.behavior="url(#default#homepage)",c.setHomePage(g),$.hao123.homePgaeDom.isHomePage(g)?$.hao123.log.send({type:"ubclick",tn:h,ie:1,ho:i,set:1==$.hao123.user.getIsHomeSrc()?2:1}):$.hao123.log.send({type:"ubclick",tn:h,ie:1,ho:i,set:1==$.hao123.user.getIsHomeSrc()?3:0})}catch(j){$.hao123.log.send({type:"ubclick",tn:h,ie:1,ho:i,set:0}),a.open(d+"#"+b[$.hao123.browser.types[0]])}}});
$.hao123.user=function(a,b){function c(c){try{return h||(h=document.createElement("div"),h.style.display="none",h.style.behavior="url(#default#homePage)",a.hao123.homePgaeDom=h,document.body.appendChild(h)),h.isHomePage(c)}catch(d){}return b}var d="other",h=!1,g=0,i={getIsHomeSrc:function(){return g},getLiveType:function(){this.init();return d},type:function(){return d},init:function(){if(a.hao123.browser.ie){for(var b in whitelist)if(c(whitelist[b].url)){d="iehome";return}a:{var f,g;b=["3w.hao123.com",
"ww.hao123.com","www.hao123.com","hao123.com"];for(f=b.length;f--;)g=b[f],b.push(g+"/","http://"+g,"http://"+g+"/");b.push(document.URL);b=b.concat("http://www.hao123.com/?from=hao123,http://www.hao123.com/?f=hao123,http://www.hao123.com/index.html,http://www.hao123.com/?tn=29065018_59_hao_pg,http://www.hao123.com/?tn=29065018_235_hao_pg,http://www.hao123.com/?tn=00082064_7_hao_pg,http://www.hao123.com/?tn=98012088_1_hao_pg,http://www.hao123.com/?tn=00082064_9_hao_pg,http://www.hao123.com/?tn=29065018_76_hao_pg,http://www.hao123.com/?tn=39015028_45_hao_pg,http://www.hao123.com/?tn=29065018_181_hao_pg,http://www.hao123.com/?tn=09070098_1_hao_pg,http://www.hao123.com/?tn=29065018_234_hao_pg,http://www.hao123.com/?tn=67014086_5_hao_pg,http://www.hao123.com/?tn=82013038_96_hao_pg,http://www.hao123.com/?src=10017701_hao,http://www.hao123.com/?tn=62002018_5_hao_pg,http://www.hao123.com/?src=10019004_hao,http://www.hao123.com/?tn=82013038_111_hao_pg".split(","));
for(f=b.length;f--;)if(g=b[f],c(g)){b=!0;break a}b=!1}d=b?"iestandardhome":"nothome"}}};a(function(){var b=0,c=0,d;a.hao123.browser.ie&&(b=1);window.location.search.match(/[?&](tn|src)=([^&<>'"]+)/)&&(c=1);a("#userBar").on("mousedown",".js_setHome",function(){g=0;d="nothome"==i.getLiveType()?0:1;a.hao123.log.send({pageId:window.pageId,ho:d,ie:b,tn:c,link:0,type:"ubclick"})});a("#userBar").on("mousedown",".setBack",function(){d="nothome"==i.getLiveType()?0:1;a.hao123.log.send({pageId:window.pageId,
ho:d,ie:b,tn:c,link:1,type:"ubclick"})});a("#box-logo").on("mousedown","a",function(){g=1})});return i}(jQuery);$.hao123.initProfile=function(){var a=!0;if(1!=isStatic){for(obj in currentProfile)if(currentProfile[obj]!=defaultProfile[obj]){a=!1;break}if(a&&!HLogin.loginModel.isLogin)$.hao123.cookie("static",1);else try{$.hao123.cookie.del("static")}catch(b){}}};
$.hao123.setProfile=function(a,b){var c=!0,d="/api/setprof?";if(1!=isStatic&&defaultProfile[a]&&!(currentProfile[a]&&currentProfile[a]==b)){currentProfile[a]=b;for(obj in currentProfile)if(currentProfile[obj]!=defaultProfile[obj]){c=!1;break}if(c&&!HLogin.loginModel.isLogin)$.hao123.cookie("static",1);else try{$.hao123.cookie.del("static")}catch(h){}d+="c="+function(){var a="",a=!$.hao123.cookie("FLASHID")||32>$.hao123.cookie("FLASHID").length?$.hao123.cookie("BAIDUID"):$.hao123.cookie("FLASHID");
return a.substr(0,32)}()+"&key="+(new Date).getTime()+"&k="+encodeURIComponent(a)+"&v="+encodeURIComponent(b);$.ajax({type:"GET",url:d,dataType:"json",success:function(){},error:function(){$.hao123.cookie.del("static")}})}};
$.hao123.getProfile=function(){var a;a="/api/getprof?"+("c="+function(){var a="",a=!$.hao123.cookie("FLASHID")||32>$.hao123.cookie("FLASHID").length?$.hao123.cookie("BAIDUID"):$.hao123.cookie("FLASHID");return a.substr(0,32)}()+"&key="+(new Date).getTime());$.ajax({type:"GET",url:a,dataType:"json",success:function(a){currentProfile=a.data.profile;$(document).trigger("getprof",a.data)},error:function(){alert("error")}})};
(function(a,b,c){String.trim||(String.prototype.trim=function(){var a;a=this.replace(/^\s\s*/,"");for(var b=/\s/,c=a.length;b.test(a.charAt(--c)););return a.slice(0,c+1)});String.replaceTpl||(String.prototype.replaceTpl=function(a){return this.replace(/#\{([^}]*)\}/mg,function(b,c){return a[c.trim()]})});String.htmlEncode||(String.prototype.htmlEncode=function(){return(""+this).replace(/\x26/g,"&amp;").replace(/\x3c/g,"&lt;").replace(/\x3E/g,"&gt;").replace(/\x22/g,"&quot;").replace(/\x27/g,"&#39;").replace(/\xA9/g,
"&copy;")});var d=document.documentElement.classList!==c,h=/\w/.test("\u0130"),g=b.documentMode&&9===b.documentMode,i=function(a){if(a){var a=a.split("."),b=a.length,c=window,d=0,f;if(1<b)for(;d<b-1;d++)f=a[d],c=0===d&&c[f]?c[f]:f in c?c[f]:c[f]={};return c}},j=d?function(a,b){return a.classList.contains(b)}:function(a,b){return-1<(" "+a.className+" ").indexOf(" "+b+" ")},f=d?function(a,b){a.classList.add(b)}:function(a,b){j(a,b)||(a.className+=(a.className?" ":"")+b)},k=d?function(a,b){a.classList.remove(b)}:
function(a,b){j(a,b)&&(a.className=a.className.replace(RegExp("(\\s|^)"+b+"(\\s|$)")," "))},n=b.addEventListener?function(a,b,c){a.addEventListener(b,c,!1)}:function(a,b,c){a.attachEvent("on"+b,c)},l=function(b,c,d){n(b,c,function(b){b=b||a.event;d.call(b.srcElement||b.target,b)})},m=h?function(a,b){b=b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()});return a.currentStyle[b]}:function(a,c){return b.defaultView.getComputedStyle(a,null).getPropertyValue(c)},o=function(a,d){if(!(this instanceof
o))return new o(a,d);if(this.el=a+""===a?b.getElementById(a):a)this.o={classNameWrap:d.classNameWrap||"sug-wrap",classNameQuery:d.classNameQuery,classNameQueryNull:d.classNameQueryNull,classNameSelect:d.classNameSelect||"sug-select",classNameClose:d.classNameClose||"sug-close",classNameShim:d.classNameShim||"sug-shim",locAbs:d.locAbs||!1,pressDelay:d.pressDelay===c?3:d.pressDelay,autoFocus:d.autoFocus||!1,delay:d.delay||200,n:d.n||10,t:d.t||!0,autoCompleteData:d.autoCompleteData||!1,url:d.url||!1,
charset:d.charset,callbackFn:d.callbackFn||!1,callbackName:d.callbackName||!1,callbackDataKey:d.callbackDataKey||!1,callbackDataNum:d.callbackDataNum||!1,requestQuery:d.requestQuery||!1,requestParas:d.requestParas||{},noSubmit:d.noSubmit||!1,onSelect:d.onSelect,onMouseSelect:d.onMouseSelect,onShow:d.onShow,onHide:d.onHide,onRequest:d.onRequest,onSucess:d.onSucess,onError:d.onError,onEnable:d.onEnable,customUrl:d.customUrl||!1,templ:d.templ||!1},this.wrap=this.el.parentNode,this.init()},d=o.prototype;
d.init=function(){var a=this,b=a.o;a.layoutInit();a.reset();a.inputHandle();b.autoFocus&&setTimeout(function(){a.el.focus()},16);if(!b.autoCompleteData){var c=b.callbackFn,b=i(c,!0),d=c.split(".").pop();a.callback=function(b){b=b||{};$.hao123.sugFlag=b.z?!0:!1;var d=arguments.callee;a=c&&d.repeat?d.context||a:a;a.o.onSucess&&a.o.onSucess.call(a);d=(d=a.o.callbackDataKey||a.o.callbackDataNum)?b[d]:b;if(!d||!d.length)if(!b||!b.z||0>b.z.length){a.hide(1);a.isHide=!1;return}a.fill(b,a.q);a.show();a.cache[a.q]=
b};b[d]?b[d].repeat=!0:c&&(b[d]=a.callback)}};d.reset=function(a){for(var b in a)this.o[b]=a[b];this.cache={};this.q="";this.s=null;this.subType=this.i=-1;this.inputTimer();this.isHide=!1;this.hide(1)};d.layoutInit=function(){var a=this.o,c=a.locAbs?b.body:this.wrap,d=this.sugWrap=b.createElement("div");this.el.setAttribute("autocomplete","off");this.content=d;f(d,a.classNameWrap);!a.locAbs&&"static"===m(c,"position")&&(c.style.position="relative");c.appendChild(d)};d.show=function(){this.sugWrap.style.display=
"";this.o.onShow&&this.o.onShow.call(this)};d.hide=function(a){window.isShow1||(this.sugWrap.style.display="none",this.q=this.el.value,2!=a&&(this.s=null,this.i=-1),1==a&&this.fill(),this.o.onHide&&this.o.onHide.call(this))};d.holdFocus=function(b,c){c.preventDefault?c.preventDefault():b.onbeforedeactivate=function(){a.event.returnValue=!1;b.onbeforedeactivate=null}};d.inputTimer=function(a){var b=this,c=b.el,d=b.t,f;a?d||(b.t=setInterval(function(){f=c.value;if(!b.o.onEnable||b.o.onEnable(b.el))f.trim()?
f!==b.q&&b.updata(f):(b.hide(1),b.q=f)},b.o.delay)):(d&&clearInterval(b.t),b.t=0)};d.getIndex=function(a,b){for(var c=b.length;c--;)if(b[c]===a)return c;return-1};d.matchEl=function(a,b,c){for(;a!==b;){if(c.call(a))return a;a=a.parentNode}return null};d.submitForm=function(){var a=this.el.form;if(a.onsubmit)a.onsubmit();else a.submit()};d.keydownMove=function(a){var b=this.sugWrap.getElementsByTagName("OL")[0];if(b)if(this.isHide)this.isHide=!1;else{var d=b.getElementsByTagName("LI"),g=d.length,b=
this.el,h=this.s,j=this.o,i=j.classNameSelect,m=this.q||"";h&&(k(h,i),this.i=this.getIndex(h,d),this.s=null);this.i===c&&(this.index=-1);-1!==this.i&&k(d[this.i],i);40===a?this.i++:38===a&&this.i--; -2===this.i?this.i=g-1:this.i===g?(b.value=m,this.i=-1):-1===this.i&&(b.value=m);-1!==this.i&&this.i!==g&&(a=d[this.i],f(a,i),!j.autoCompleteData&&(b.value=a.getAttribute("q")),this.s=a)}};d.inputHandle=function(){var a=this,b=a.o,c=a.el,d=a.sugWrap,g=b.classNameSelect,i=b.autoCompleteData,m=0,o;c.onkeydown=
function(f){f=f||window.event;o=f.keyCode;if(27===o)return a.hide(2),d.getElementsByTagName("ol")[0]&&(a.isHide=!0),!i&&(c.value=a.q),a.inputTimer(),!1;if(32<o&&41>o)if(!c.value&&"none"===d.style.display)c.blur();else{if((40===o||38===o)&&(!a.o.onEnable||a.o.onEnable(a.el)))!b.pressDelay||0===m++?(a.isHide&&a.show(),a.keydownMove(o),a.inputTimer()):m===b.pressDelay&&(m=0),!h&&f.preventDefault()}else if(13===o){a.inputTimer();a.hide(2);b.onSelect&&b.onSelect.call(a,a.q,a.s?a.s.getAttribute("site"):
"","fromEnter");if(i)return c.value=a.s?a.s.getAttribute("q"):"",!1;a.subType=2;if(b.noSubmit)return!1;var f=d.getElementsByTagName("LI")[0],g=f.getAttribute&&f.getAttribute("class")||f.className,j=document.getElementById("js_sug-form1"),k=document.getElementById("js_sug-params");if(f&&f.getAttribute("action")&&-1<g.indexOf("sug-select"))return j.setAttribute("action",f.getAttribute("action").split("|")[1]),a.lastWord=j.word.value,a.lastParamers=k.innerHTML,j.word.value="hao123",k.innerHTML="",window.setTimeout(function(){j.setAttribute("action",
"http://www.baidu.com/s");j.word.value=a.lastWord;k.innerHTML=a.lastParamers},150),!0}else 8<o&&19>o?9!==o&&a.holdFocus(c,f):a.inputTimer(1)};n(c,"keyup",function(){m=0});n(c,"blur",function(){a.hide(2);d.getElementsByTagName("ol")[0]&&(a.isHide=!0);a.inputTimer()});l(d,"mouseover",function(){var b=a.matchEl(this,d,function(){return"LI"===this.tagName});b&&(a.s&&k(a.s,g),f(b,g),a.s=b)});l(d,"mouseout",function(){var b=a.matchEl(this,d,function(){return"LI"===this.tagName});"LI"===this.tagName&&this!==
b&&k(b,g)});n(d,"mousedown",function(b){a.inputTimer();a.holdFocus(c,b)});l(d,"mouseup",function(f){a.subType=3;var g=d.getElementsByTagName("OL")[0];if(g&&!(f.which&&2<f.which||f.button&&1!==f.button&&4!==f.button))if(j(this,b.classNameClose)&&a.hide(),f=a.matchEl(this,d,function(){return"LI"===this.tagName}))c.value=f.getAttribute("q"),a.hide(),a.inputTimer(),a.i=a.getIndex(f,g.getElementsByTagName("LI")),b.onSelect&&b.onSelect.call(a,f.getAttribute("q"),f.getAttribute("site")),b.onMouseSelect&&
b.onMouseSelect.call(a,f.getAttribute("q"),f.getAttribute("site")),f.getAttribute("action")||!b.autoCompleteData&&!b.noSubmit&&a.submitForm()})};d.fill=function(a,b){var d=this.content,f=!1;if(2>arguments.length)d.innerHTML="";else{a&&a.z&&a.z[0]&&(f=a.z[0]);var g=this.o,h=g.templ,j=g.classNameQueryNull,i=g.classNameQuery,d=this.content;if(h)f=h.call(this,a,b);else{var a=a[g.callbackDataKey||g.callbackDataNum]||[],h=0,g=Math.min(a.length,g.n),k=[],m,b=b.trim();(2==f.type||1==f.type)&&f?(m=f.key,f.id&&
(this.o.sugId=f.id),f.word_add?m!==c&&k.push('<li  q="'+m+'"'+(j&&-1<m.indexOf(b)?' class="li-aladdin':' class="li-aladdin '+j)+'"><img src="http://s1.hao123img.com/index/images/xiongzhang.png">'+m+(2==f.type?" - \u767e\u5ea6\u5b89\u5168\u8ba4\u8bc1":"")+'<span class="sug-word">'+f.word+'<span class="sug-word-add">('+f.word_add+")</span></span></li>"):m!==c&&k.push('<li  q="'+m+'"'+(j&&-1<m.indexOf(b)?' class="li-aladdin':' class="li-aladdin '+j)+'"><img src="http://s1.hao123img.com/index/images/xiongzhang.png">'+
m+(2==f.type?" - \u767e\u5ea6\u5b89\u5168\u8ba4\u8bc1":"")+'<span class="sug-word">'+f.word+"</span></li>"),h=1):h=0;for(;h<g;h++)m=a[h],m!==c&&k.push('<li q="'+m+'"'+(j&&-1<m.indexOf(b)?"":" class="+j)+">"+(i?m.replace(b,'<span class="'+i+'">'+b+"</span>"):m)+"</li>");f="<ol>"+k.join("")+"</ol>"}d.innerHTML=f}};d.updata=function(a){var b=this.o.autoCompleteData||this.cache[a];this.q=a;this.i=-1;this.isHide=!1;b!==c?(this.fill(b,a),this.show()):this.request(a)};d.request=function(a){var d=this,f=
d.o,j=f.callbackFn,m=f.callbackName,k=f.onSucess,o=f.onError,l=f.onRequest,n=d.callback,H=f.url,F=f.customUrl,w=f.requestParas,z=[],y,s;if(j){var t=i(j),j=j.split(".").pop();t[j]=d.callback;t[j].repeat&&(t[j].context=d)}else m&&(s=d.script,s.readyState?s.onreadystatechange=function(){if("loaded"==s.readyState||"complete"==s.readyState)s.onreadystatechange=null,k&&k.call(d),n(m)}:s.onload=function(){k&&k.call(d);n(m)});o&&(d.script.onerror=function(){o.call(d)});if(!d.script||!h||g)t=b.getElementsByTagName("script")[0],
s=b.createElement("script"),s.type="text/javascript",s.async=!0,d.script?t.parentNode.replaceChild(s,d.script):t.parentNode.insertBefore(s,t),d.script=s;l&&l.call(this);for(y in w)(s=w[y])!==c&&z.push(y+"="+w[y]);f.t&&z.push("t="+ +new Date);w=z.join("&");d.script.charset=f.charset?f.charset:"";d.script.src=F&&F.call(d,w)||H+"?"+f.requestQuery+"="+encodeURIComponent(a)+"&"+w};a.G||(a.G={});G.suggest=G.sug=o})(window,document);
var HLogin={g:function(a){return document.getElementById(a)},extend:function(a,b,c){var a=a||{},d;for(d in b)c?a[d]=b[d]:a.hasOwnProperty(d)||(a[d]=b[d]);return a},addClass:function(a,b){var b=b.trim(),c=a.className.split(/\s+/);c.push(b);a.className=c.join(" ")},removeClass:function(a,b){for(var c=a.className.split(/\s+/),d=0;d<c.length;d++)b==c[d]&&c.splice(d,1);a.className=c.join(" ")},ievent:{addEventListener:function(a,b){this._events[a].push(b)},removeEventListener:function(a,b){for(var c=this._events[a],
d=0;d<c.length;d++)c[d]===b&&c.splice(d,1)},dispatchEvent:function(a,b){for(var c=this._events[a],d=0;d<c.length;d++)c[d](b)}},format:function(a){var b=Array.prototype.slice.call(arguments,1);return a.replace(/{\d}/g,function(a){a=a.charAt(1);return b[a]})},imageRequest:function(a,b){var c="imageRequest"+(new Date).getTime(),d=new Image;window[c]=d;d.onload=function(){window[c]=null;b("success")};d.onerror=function(){window[c]=null;b("error")};d.src=a}};
HLogin.loginConfig={passUrl:"http://passport.baidu.com/v2/api/?getapi&class=login&tpl=hao123&tangram=true&callback=loginCallback",outerDomId:"popup-login",loginType:1,staticpage:"http://"+window.location.host+"/jump.htm",tpl:"hao123",phoneText:"\u624b\u673a\u53f7",userNameText:"\u5e10\u3000\u53f7",userNameTextShort:"\u5e10\u53f7",passWordText:"\u5bc6\u3000\u7801",passWordText1:"\u5bc6\u3000\u7801",passWordTextShort:"\u5bc6\u7801",veryfyCodeText:"\u9a8c\u8bc1\u7801",errorText6:"\u9a8c\u8bc1\u7801\u4e0d\u5339\u914d\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165",
errorText4:"\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef\uff01",errorText1:"\u7528\u6237\u540d\u683c\u5f0f\u9519\u8bef",errorText2:"\u6b64\u5e10\u53f7\u4e0d\u5b58\u5728",errorText3:"\u624b\u673a\u53f7\u4e0d\u6b63\u786e",errorText110024:'\u6b64\u5e10\u53f7\u8fd8\u672a\u6fc0\u6d3b\uff0c\u8bf7\u5230\u9a8c\u8bc1\u90ae\u4ef6\u4e2d\u6fc0\u6d3b\uff0c\u6216\u8005<a href="{0}">\u91cd\u53d1\u9a8c\u8bc1\u90ae\u4ef6</a>',errorText00:"\u7cfb\u7edf\u9519\u8bef",errorText01:"\u8bf7\u8f93\u5165{0}",veryfyEmailBack:"http://www.hao123.com/",
cookieUrl:"http://hao123.baidu.com/static/getcookie.php?noredirect=1",signoutTpl:'<a href="{0}" class="{1}" target="_self">\u767b\u5f55</a><a target="_self" class="{2}" href="http://'+window.location.host+'/registe.htm">\u6ce8\u518c</a>',signinTpl:'<span class="{2}">\u60a8\u597d\uff0c</span><span class="{3}">{0}</span><a class="{4}" target="_self" href="http://www.hao123.com/api/logout?gotourl={1}">\u9000\u51fa</a>',getUserUrl:"http://www.hao123.com/api/user?key=100&c={0}",loginUrl:"http://www.hao123.com/login.htm?gotourl={0}"};
HLogin.loginModel=function(a,b){return b.extend({_events:{signin:[],otherSignin:[]},isLogin:!1,signin:function(a){this.isLogin=!0;this.dispatchEvent("signin",a)},otherSignin:function(a){this.dispatchEvent("otherSignin",a)}},b.ievent)}(this,HLogin);
HLogin.loginView=function(a,b){var c=HLogin.loginConfig;return{onCommonReady:function(){b.g("pass_login_input_submit_0").value="";b.g("pass_login_label_username_0").innerHTML=c.userNameText;b.g("pass_login_label_password_0").innerHTML=c.passWordText;b.g("pass_login_label_verifycode_0").innerHTML=c.veryfyCodeText;b.g("pass_login_username_0").onfocus=b.g("pass_login_password_0").onfocus=b.g("pass_login_verifycode_0").onfocusin=function(){b.removeClass(this,"login_input_err");b.addClass(this,"login_input_focus")};
b.g("pass_login_username_0").onblur=b.g("pass_login_password_0").onblur=b.g("pass_login_verifycode_0").onfocusout=function(){b.removeClass(this,"login_input_focus")}},onPhoneReady:function(){$("#login_tab_1").click(function(){$("#login_holder_1").show();$("#login_holder_2").hide();this.className="curr";$("#login_tab_2").attr("class","");$("#pass_login_phoneNumber_1").removeClass("login_input_err");$("#errHolder").html("");$("#pass_login_password_1").removeClass("login_input_err")});$("#login_tab_2").click(function(){$("#login_holder_2").show();
$("#login_holder_1").hide();this.className="curr";$("#login_tab_1").attr("class","");$("#pass_login_username_0").removeClass("login_input_err");$("#errHolder").html("");$("#pass_login_password_0").removeClass("login_input_err")});b.g("pass_login_username_0").focus();b.g("pass_login_input_submit_1").value="";b.g("pass_login_label_phoneNumber_1").innerHTML=c.phoneText;b.g("pass_login_label_password_1").innerHTML=c.passWordText1;b.g("pass_login_label_verifycode_1").innerHTML=c.veryfyCodeText;b.g("pass_login_phoneNumber_1").onfocus=
b.g("pass_login_password_1").onfocus=b.g("pass_login_verifycode_1").onfocus=function(){b.removeClass(this,"login_input_err");b.addClass(this,"login_input_focus")};b.g("pass_login_phoneNumber_1").onblur=b.g("pass_login_password_1").onblur=b.g("pass_login_verifycode_1").onfocus=function(){b.removeClass(this,"login_input_focus")}},onLoginSuccess:function(a){b.imageRequest(("curr"==b.g("login_tab_1").className?b.g("pass_login_rem_0"):b.g("pass_login_rem_1")).checked?"http://hao123.baidu.com/static/getcookie.php?noredirect=1&is_remember=1":
"http://hao123.baidu.com/static/getcookie.php?noredirect=1",function(){a&&a()})},onInputErr:function(a,h){b.addClass(a,"login_input_err");var g=b.g("errHolder");g.style.display="block";switch(h){case "-2":g.innerHTML=b.format(c.errorText01,-1<a.id.indexOf("username")?c.userNameTextShort:-1<a.id.indexOf("phoneNumber")?c.phoneText:-1<a.id.indexOf("password")?c.passWordTextShort:c.veryfyCodeText);break;case "6":g.innerHTML=c.errorText6;break;case "4":g.innerHTML=c.errorText4;break;case "1":g.innerHTML=
c.errorText1;break;case "2":g.innerHTML=c.errorText2;break;case "-3":g.innerHTML=c.errorText3}},onSystemErr:function(a,h,g){"110024"==h?(a=b.format("https://passport.baidu.com/v2/?regnotify&needresend=true&tpl=hao123&user={0}",g.mail),b.g("errHolder").innerHTML=b.format(c.errorText110024,a)):b.g("errHolder").innerHTML=c.errorText00}}}(this,HLogin);
(function(a,b){a.hao123||(a.hao123={});a.hao123[b]={url:"/images/track.gif",send:function(b){var d={},h=b.url=b.url||this.url,g=b.r=+new Date,i=a.hao123["Model.Global.UT"+g]=new Image,j=[];a.extend(d,a.hao123.log.conf.data,b);a.each(d,function(a,b){"url"!=a&&j.push(encodeURIComponent(a)+"="+encodeURIComponent(b))});i.onload=i.onerror=function(){a.hao123["Model.Global.UT"+g]=null};i.src=h+"?"+j.join("&");i=j=null},heartbeat:function(c,d){function h(){var d={};a.each(c,function(b,c){d[b]=a.isFunction(c)?
c():c});a.hao123[b].send(d);g()}function g(){i++;setTimeout(h,a.isFunction(d)?d(i):d)}var i=0;g()}}})(jQuery,"log");var T,baidu=T=baidu||{version:"1.5.2.2"};baidu.guid="$BAIDU$";baidu.$$=window[baidu.guid]=window[baidu.guid]||{global:{}};baidu.dom=baidu.dom||{};baidu.dom.g=function(a){return!a?null:"string"==typeof a||a instanceof String?document.getElementById(a):a.nodeName&&(1==a.nodeType||9==a.nodeType)?a:null};baidu.g=baidu.G=baidu.dom.g;baidu.browser=baidu.browser||{};
baidu.browser.opera=/opera(\/| )(\d+(\.\d+)?)(.+?(version\/(\d+(\.\d+)?)))?/i.test(navigator.userAgent)?+(RegExp.$6||RegExp.$2):void 0;
baidu.dom.insertHTML=function(a,b,c){var a=baidu.dom.g(a),d;a.insertAdjacentHTML&&!baidu.browser.opera?a.insertAdjacentHTML(b,c):(d=a.ownerDocument.createRange(),b=b.toUpperCase(),"AFTERBEGIN"==b||"BEFOREEND"==b?(d.selectNodeContents(a),d.collapse("AFTERBEGIN"==b)):(b="BEFOREBEGIN"==b,d[b?"setStartBefore":"setEndAfter"](a),d.collapse(b)),d.insertNode(d.createContextualFragment(c)));return a};baidu.insertHTML=baidu.dom.insertHTML;baidu.swf=baidu.swf||{};
baidu.swf.version=function(){var a=navigator;if(a.plugins&&a.mimeTypes.length){var b=a.plugins["Shockwave Flash"];if(b&&b.description)return b.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s)+r/,".")+".0"}else if(window.ActiveXObject&&!window.opera)for(a=12;2<=a;a--)try{if(b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a))return b.GetVariable("$version").replace(/WIN/g,"").replace(/,/g,".")}catch(c){}}();baidu.string=baidu.string||{};
baidu.string.encodeHTML=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")};baidu.encodeHTML=baidu.string.encodeHTML;
baidu.swf.createHTML=function(a){var a=a||{},b=baidu.swf.version,c=a.ver||"6.0.0",d,h,g,i;g={};var j=baidu.string.encodeHTML;for(i in a)g[i]=a[i];a=g;if(b){b=b.split(".");c=c.split(".");for(g=0;3>g&&!(d=parseInt(b[g],10),h=parseInt(c[g],10),h<d);g++)if(h>d)return""}else return"";g=a.vars;c="classid,codebase,id,width,height,align".split(",");a.align=a.align||"middle";a.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";a.codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0";
a.movie=a.url||"";delete a.vars;delete a.url;if("string"==typeof g)a.flashvars=g;else{d=[];for(i in g)b=g[i],d.push(i+"="+encodeURIComponent(b));a.flashvars=d.join("&")}d=["<object "];for(g=0,h=c.length;g<h;g++)b=c[g],d.push(" ",b,'="',j(a[b]),'"');d.push(">");g={wmode:1,scale:1,quality:1,play:1,loop:1,menu:1,salign:1,bgcolor:1,base:1,allowscriptaccess:1,allownetworking:1,allowfullscreen:1,seamlesstabbing:1,devicefont:1,swliveconnect:1,flashvars:1,movie:1};for(i in a)b=a[i],i=i.toLowerCase(),g[i]&&
(b||!1===b||0===b)&&d.push('<param name="'+i+'" value="'+j(b)+'" />');a.src=a.movie;a.name=a.id;delete a.id;delete a.movie;delete a.classid;delete a.codebase;a.type="application/x-shockwave-flash";a.pluginspage="http://www.macromedia.com/go/getflashplayer";d.push("<embed");var f;for(i in a)if((b=a[i])||!1===b||0===b)/^salign$/i.test(i)?f=b:d.push(" ",i,'="',j(b),'"');f&&d.push(' salign="',j(f),'"');d.push("></embed></object>");return d.join("")};
baidu.swf.create=function(a,b){var a=a||{},c=baidu.swf.createHTML(a)||a.errorMessage||"";b&&"string"==typeof b&&(b=document.getElementById(b));baidu.dom.insertHTML(b||document.body,"beforeEnd",c)};baidu.browser.ie=baidu.ie=/msie (\d+\.\d+)/i.test(navigator.userAgent)?document.documentMode||+RegExp.$1:void 0;baidu.array=baidu.array||{};baidu.array.remove=function(a,b){for(var c=a.length;c--;)c in a&&a[c]===b&&a.splice(c,1);return a};baidu.lang=baidu.lang||{};
baidu.lang.isArray=function(a){return"[object Array]"==Object.prototype.toString.call(a)};baidu.lang.isFunction=function(a){return"[object Function]"==Object.prototype.toString.call(a)};baidu.lang.toArray=function(a){if(null===a||void 0===a)return[];if(baidu.lang.isArray(a))return a;if("number"!==typeof a.length||"string"===typeof a||baidu.lang.isFunction(a))return[a];if(a.item){for(var b=a.length,c=Array(b);b--;)c[b]=a[b];return c}return[].slice.call(a)};
baidu.swf.getMovie=function(a){var b=document[a],c;return 9==baidu.browser.ie?b&&b.length?1==(c=baidu.array.remove(baidu.lang.toArray(b),function(a){return"embed"!=a.tagName.toLowerCase()})).length?c[0]:c:b:b||window[a]};T.undope=!0;
$.hao123.browser=function(){var a=window,b=document,c=navigator,d=c.userAgent.toLowerCase(),h=function(a){return(a=d.match(RegExp(a+"\\b[ \\/]?([\\w\\.]*)","i")))?a.slice(1):["",""]},g=function(){var b=-1<d.indexOf("360chrome")?!0:!1,c;try{a.external&&a.external.twGetRunPath&&(c=a.external.twGetRunPath)&&-1<c.indexOf("360se")&&(b=!0)}catch(f){b=!1}return b}(),i;a:{try{if(/(\d+\.\d)/.test(a.external.max_version)){i=parseFloat(RegExp.$1);break a}}catch(j){}i=void 0}var f=h("(msie|safari|firefox|chrome|opera)"),
k=h("(maxthon|360se|360chrome|theworld|se|theworld|greenbrowser|qqbrowser|lbbrowser|bidubrowser)"),n=h("(windows nt|macintosh|solaris|linux)"),l=h("(webkit|gecko|like gecko)");"msie"===f[0]?g?k=["360se",""]:i?k=["maxthon",i]:","==k&&(k=h("(tencenttraveler)")):"safari"===f[0]&&(f[1]=h("version")+"."+f[1]);return{cookieEnabled:navigator.cookieEnabled,flash:function(){if(c.plugins&&c.mimeTypes.length){var b=c.plugins["Shockwave Flash"];if(b&&b.description)return b.description.replace(/([a-zA-Z]|\s)+/,
"").replace(/(\s)+r/,".")+".0"}else if(a.ActiveXObject&&!a.opera)for(b=12;2<=b;b--)try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+b);if(d)return d.GetVariable("$version").replace(/WIN/g,"").replace(/,/g,".")}catch(f){}}(),isStrict:"CSS1Compat"==b.compatMode,isShell:!!k[0],shell:k,kernel:l,platform:n,types:f,chrome:"chrome"==f[0]&&f[1],firefox:"firefox"==f[0]&&f[1],ie:"msie"==f[0]&&f[1],opera:"opera"==f[0]&&f[1],safari:"safari"==f[0]&&f[1],maxthon:"maxthon"==k[0]&&k[1],isTT:"tencenttraveler"==
k[0]&&k[1],is360:g}}();
(function(a){a.widget("hao123.sitelinks",{options:{},_create:function(){this._render();this._bindEvent()},_render:function(){var b=this.element;this.$bgbox=a(".js_bgbox",b);this.$openup=a(".js_openup",b);this.$sites=a(".js_bgbox a",b);a.browser.msie&&"6.0"==a.browser.version&&!a.support.style&&this._setWidth(this.$bgbox.width()-16)},_setWidth:function(a){this.$sites.width(a)},_bindEvent:function(){var a=this;a.$bgbox.hover(function(){clearTimeout(a.hideTimer)},function(){clearTimeout(a.showTimer);a.hideTimer=
setTimeout(function(){a._hide()},300)});a.$openup.hover(function(){clearTimeout(a.hideTimer);a.showTimer=setTimeout(function(){a._show()},300)},function(){clearTimeout(a.showTimer);a.hideTimer=setTimeout(function(){a._hide()},300)});a.$sites.bind("click",function(){a._hide()})},_hide:function(){a(this.element).css("z-index","0");this.$bgbox.hide()},_show:function(){a(this.element).css("z-index","90");this.$bgbox.show()},destroy:function(){a.Widget.prototype.destroy.call(this)}})})(jQuery);
(function(){$("#box-tools .js_toolsitegroup").sitelinks();$(document).bind("intoshow",function(){$("#box-tools .js_bottom-item").each(function(a,b){$(b).addClass("bg")});$("#box-tools .js_game-img a").each(function(a,b){b.children[0].src=b.getAttribute("data-imgurl")})});$(document).bind("intoshow",function(){var a=$.hao123.onecookie;$("#bottom-er-btn1").addClass("er-btn1");$("#bottom-er-btn2").addClass("er-btn2");$("#bottom-er-img").attr("src",$("#bottom-er-img").attr("data-imgsrc"));a.get("b")||
($("#bottom-er-t").addClass($("#bottom-er-t").attr("data-class")),$("#erclosehint").addClass($("#erclosehint").attr("data-class")),$("#er-hint").show(),$("#erclosehint").click(function(){$("#er-hint").hide();a.set("b",1);return!1}))})})();$(function(){$("#js_form2").submit(function(){$.hao123.log.send({level:1,page:window.pageId,type:"bsearchclick"})})});
(function(){$(document).bind("intoshow",function(){function a(){$("#funnynew-loading").fadeOut()}$("#box-funnynew  .js_funnynew-detail").each(function(a,b){var h=b.innerHTML;34<h.length&&(b.innerHTML=h.substring(0,33)+"...")});var b=document.getElementById("funnynew-iframe");b.attachEvent?b.attachEvent("onload",function(){a()}):b.onload=function(){a()};$("iframe","#box-funnynew").each(function(a,b){$(b).attr("src",$(b).attr("data-url")+"?r="+(new Date).getTime()+"#top/dayhot")});$("img","#box-funnynew").each(function(a,
b){$(b).attr("src",$(b).attr("data-url"))});$("#box-funnynew .funnynew-link a").mousedown(function(){var a=$.hao123.cookie.get("FLASHID")||$.hao123.cookie.get("BAIDUID");32<a.length&&(a=a.substring(0,32));$.hao123.log.send({url:"http://www.hao123.com/api/incr",link:this.href,c:a})})})})();
(function(){hao.surprise=function(a){var b=$(a||"#box-surprise"),a=$(".ws-prev",b),c=$(".ws-next",b),d=$(".ws-items",b),h=$("img",b),g=1,i=Math.ceil(h.length/5)/2,j=$(".ws-box",b).width()+28,f=function(){var a=$(document).scrollTop(),c=$(window).height(),d=b.offset().top;a+c>d-10&&($(document).trigger("intoshow"),h.each(function(){$(this).attr("src",$(this).attr("imgurl"))}),$(window).unbind("scroll",f),$(window).unbind("resize",f))};$(window).scroll(f);$(window).resize(f);a.click(function(){d.is(":animated")||
(1==g?(d.css({left:-(890*i)}),d.animate({left:"+="+1*j},800),g=i):(d.animate({left:"+="+j},800),g--))});c.click(function(){d.is(":animated")||(g==i?(d.animate({left:"-="+j},800,function(){d.css({left:0})}),g=1):(d.animate({left:"-="+j},800),g++))});a.hover(function(){$(this).addClass("ws-phover")},function(){$(this).removeClass("ws-phover")});c.hover(function(){$(this).addClass("ws-phover")},function(){$(this).removeClass("ws-phover")})}})();
(function(a){a.widget("hao123.service",{options:{helloMsg:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7",errorMsg:"\u624b\u673a\u53f7\u8f93\u5165\u9519\u8bef",grayCls:"gray",hoverCls:"hover",activeCls:"active",priceRangeUrl:"https://www.baifubao.com/callback?cmd=1064&callback=getPhonePriceInterval",detailUrl:"https://www.baifubao.com/callback?cmd=1059&callback=phone"},_create:function(){var b=this.element;this.$money=a(".js_money",b);this.$cost=a(".js_cost",b);this.$phoneNum=a(".js_phone_number",b);this.$submit=
a(".js_cz_submit",b);this.$price=a(".js_price",b);this.$location=a(".js_location",b);this.$popup=a(".js_popup_price",b);this.$choices=a(".js_popup_price a",b);this.$select=a(".js_select",b);this.$text=a(".js_text",b);this.$czform=a("#form_cz");this.priceRange="";this.phoneError=!0},_init:function(){this._bindEvent();this._handlePriceRange(sprize)},_bindEvent:function(){function b(){a.each(c.$choices,function(){a(this).removeClass(d.hoverCls)})}var c=this,d=c.options,h=!1,g="";this.$phoneNum.focus(function(){a(this).val()==
d.helloMsg&&(a(this).val(""),a(this).removeClass(d.grayCls))});this.$phoneNum.blur(function(){""==a(this).val()&&(a(this).val(d.helloMsg),a(this).addClass(d.grayCls))});this.$phoneNum.bind("keydown",function(a){if(13==a.which&&c.phoneError)return c._updataUI(!0,c.priceRange,d.errorMsg),!1});this.$phoneNum.bind("input propertychange keyup",function(b){var j=this,b=b.which;if(h)return!1;h=!0;if(13==b)return h=!1;setTimeout(function(){var b=a(j).val();if(c._verifyPhone(b))g!=b&&c._getDetail();else{var i=
11==a(j).val().length?d.errorMsg:"";c._updataUI(!0,c.priceRange,i)}g=b;h=!1},100)});this.$select.click(function(a){c.$popup.show();a.stopPropagation()});this.$choices.hover(function(){b();a(this).addClass(d.hoverCls)},function(){b()});this.$choices.click(function(){c.$cost.text(a(this).text());c.$money.val(a(this).data("cost")/100);c.phoneError?c._getPriceRange():(c._getDetail(),c._getPriceRange(!0));c.$popup.hide()});this.$submit.bind("mousedown",function(){a(this).addClass(d.activeCls);return!1});
this.$submit.bind("mouseup",function(){a(this).removeClass(d.activeCls);return!1});this.$submit.click(function(){c.phoneError?c._updataUI(!0,c.priceRange,d.errorMsg):c.$czform.submit()});a(document).click(function(){c.$popup.hide()})},_getPriceRange:function(b){var c=this;a.ajax({type:"get",url:c.options.priceRangeUrl,dataType:"jsonp",jsonp:"callback",data:{price:100*c.$money.val()},success:function(a){c._handlePriceRange(a,b)},error:function(){c._updataUI(!1)}})},_handlePriceRange:function(a,c){var d,
h;a&&(a.meta&&0==a.meta.result&&(d=a.data,h=d.low_price/100,d=parseFloat(d.high_price)/100,h=!isNaN(h)&&!isNaN(d)?"\uffe5"+h+"-"+d:!1),h?(this.priceRange=h,c||this._updataUI(!0,h,11==this.$phoneNum.val().length?this.option.errorMsg:"")):this._updataUI(!1))},_handleDetial:function(a){var c,d;a&&(a.meta&&19030==a.meta.result?(this._updataUI(!0,this.priceRange,this.options.errorMsg),this.phoneError=!0):(a.meta&&0==a.meta.result&&(this.phoneError=!1,a=a.data,c=decodeURIComponent(a.area_operator),d=!isNaN(a.sell_price)?
"\uffe5"+a.sell_price/100:!1),d?this._updataUI(!0,d,c):this._updataUI(!0,this.priceRange,c)))},_getDetail:function(){var b=this;a.ajax({type:"get",url:b.options.detailUrl,dataType:"jsonp",jsonp:"callback",data:{price:100*b.$money.val(),phone:b.$phoneNum.val()},success:function(a){b._handleDetial(a)},error:function(){b._updataUI(!1)}})},_updataUI:function(a,c,d){a?(""!=c?this.$text.text("\u552e\u4ef7"):this.$text.text(""),this.$price.text(c),this.$location.text(d)):(this.$text.text(""),this.$price.text(""),
this.$location.text(""))},_verifyPhone:function(a){a=/^((13[0-9])|(15[0-9])|(18[0-9]))\d{8}$/.test(a);a||(this.phoneError=!0);return a},destroy:function(){a.Widget.prototype.destroy.call(this)}});hao.service=function(){a("#service").service()}})(jQuery,window);(function(){var a={};hao.toplistnew=function(b,c){$("#"+b).toptab({id:b,tabName:c});a[b]&&$("#"+b+" .js_tabcnt").hide().fadeIn("slow");a[b]=!0}})();
(function(a){a.widget("hao123.toptab",{options:{tabName:"",id:""},_create:function(){},_init:function(){this.$tabs=a(".js_toptab a",this.element);this._bindEvent()},_bindEvent:function(){var b=this,c=b.options;this.$tabs.click(function(){if("current"!=a(this).data("current"))return xAjax.goURI(a(this).data("url"),[c.id]),a.hao123.setProfile(c.tabName,a(this).data("index")),!1});a(document).bind("getprof",function(){b.$tabs.each(function(b,h){a(h).data("index")==currentProfile[c.tabName]&&xAjax.goURI(a(h).data("url"),
[c.id])})})},destroy:function(){a.Widget.prototype.destroy.call(this)}})})(jQuery);(function(){$.hao123.starbar=function(){var a=$(".widget-starbar li"),b=function(){a.each(function(){$(this).removeClass("js_hover")})};a.hover(function(){b();$(this).addClass("js_hover")},function(){b()})}})();
(function(a){a(function(){a("body").on("mouseenter",".movie-tab .list-item .poster",function(){a(this).find(".player-shadow,.player-shadow-icon").show()}).on("mouseleave",".movie-tab .list-item .poster",function(){a(this).find(".player-shadow,.player-shadow-icon").hide()})})})(jQuery,this);
(function(a){hao.tabgame=function(){function b(){if(0<d.size()){a("#widget-tab-game .hot-recommend").hide();a("#widget-tab-game .stor-list").show();for(var b=a("#widget-tab-game .stor-list .play-list"),c=d.list(),g="",h,i=0,m=c.length;i<m;i++)h=c[i],g+='<div><a title="'+h.title+'" class="played" href="'+h.url+'">'+h.title+'</a><a class="close" href="javascript:void(0);">\u00d7</a></div>';b.html(g)}else a("#widget-tab-game .hot-recommend").show(),a("#widget-tab-game .stor-list").hide()}var c=a.hao123.storage.getInstance(),
d={add:function(a,b){for(var d=c.storage("val","PLAYED_GAME_LIST")||[],g,h=[],i=0,o=d.length;i<o;i++)g=d[i],20>o&&g.title!=a&&h.push(g);h.unshift({title:a,url:b});c.storage("val","PLAYED_GAME_LIST",h)},remove:function(a){for(var b=c.storage("val","PLAYED_GAME_LIST"),d,g=0,h=b.length;g<h;g++)d=b[g],d.title==a&&(b.splice(g,1),g--,h--);c.storage("val","PLAYED_GAME_LIST",b)},list:function(){return c.storage("val","PLAYED_GAME_LIST")},size:function(){var a=this.list(),b=0,c;for(c in a)a.hasOwnProperty(c)&&
b++;return b},removeAll:function(){c.storage("val","PLAYED_GAME_LIST",null)}},h=a(".all-game-list .m"),g=a(".all-game-list .m.play-list"),i=a(".game-tab");h.on("mouseenter","div",function(){a(this).addClass("h-over").find(".close").css("visibility","visible")}).on("mouseleave","div",function(){a(this).removeClass("h-over").find(".close").css("visibility","hidden")});g.on("click","a.close",function(c){d.remove(a.trim(a(this).prev("a").attr("title")));b();c.preventDefault();return!1});a(".all-game-list .all-hd .r").on("click",
function(a){d.removeAll();b();a.preventDefault();return!1});i.on("click","a.game-item,p.game-tle a,li.txt-game-item a",function(){var c=a(this);d.add(a.trim(c.attr("title")),c.attr("href"));b()});c.storage("val","PLAYED_GAME_LIST",function(){b()})}})(jQuery,this);
$.hao123.siteLog=function(a){function b(){return HLogin.loginModel.isLogin}var c={level:1,page:window.pageId};a.bind("sitemanageclick",function(){var a=$.extend({type:"manage",isLogin:b()},c);$.hao123.log.send(a)});a.bind("siteintoaddclick",function(){var a=$.extend({type:"intoadd",isLogin:b()},c);$.hao123.log.send(a)});a.bind("sitenoneaddclick",function(){var a=$.extend({type:"noneadd"},c);$.hao123.log.send(a)});a.bind("sitelogin",function(a,b){var g=$.extend({type:b.login,twicetype:b.twicelogin},
c);$.hao123.log.send(g)});a.bind("sitedefaultlogin",function(){var a=$.extend({type:"defaultLogin"},c);$.hao123.log.send(a)});a.bind("siteadd",function(a,h){$.hao123.log.send($.extend({type:"add",siteId:h.id,siteUrl:h.url,isLogin:b()},c))});a.bind("siteaddsync",function(a,h){$.hao123.log.send($.extend({type:"addsync",siteId:h.id,siteUrl:h.url,isLogin:b()},c))});a.bind("siterecommend",function(a,h){var g=$.extend({type:"recommend",siteId:h.id,siteUrl:h.url,isLogin:b()},c);$.hao123.log.send(g)});a.bind("siteaddclicksync",
function(a,h){var g=$.extend({type:"addclicksync",siteId:h.id,siteUrl:h.url,isLogin:b()},c);$.hao123.log.send(g)});a.bind("sitecms",function(a,h){var g=$.extend({type:"cms",siteId:h.id,siteUrl:h.url,isLogin:b()},c);$.hao123.log.send(g)});a.bind("sitemodify",function(a,h){var g=$.extend({type:"modify",siteId:h.id,siteUrl:h.url,isLogin:b()},c);$.hao123.log.send(g)});a.bind("sitedeletesync",function(){var a=$.extend({type:"syncdelete"},c);$.hao123.log.send(a)});a.bind("sitedodelete",function(a,h){var g=
$.extend({type:"delete",siteId:h.id,siteUrl:h.url,isLogin:b()},c);$.hao123.log.send(g)});a.bind("siterecovered",function(){var a=$.extend({type:"recover",isLogin:b()},c);$.hao123.log.send(a)});a.bind("sitetextclick",function(a,h){var g=$.extend({type:"textclick",siteId:h.id,siteUrl:h.url,status:h.status,isLogin:b()},c);$.hao123.log.send(g)});a.bind("siterefresh",function(){var a=$.extend({type:"refresh"},c);$.hao123.log.send(a)});a.bind("siteerror",function(a,b){var g=$.extend({type:"siteerror",code:b.code},
c);b.info&&(g.info=b.info);$.hao123.log.send(g)});a.bind("siteerrorflash",function(){var a=$.extend({type:"siteerrorflash"},c);$.hao123.log.send(a)});a.bind("sitemanagerecommend",function(){var a=$.extend({type:"managerecommend"},c);$.hao123.log.send(a)});a.bind("sitedeleteallrecommend",function(){var a=$.extend({type:"deleteallrecommend"},c);$.hao123.log.send(a)});a.bind("sitegetusererror",function(a,b){var g=$.extend({type:"getusererror",code:b},c);$.hao123.log.send(g)});a.bind("siterecommend2show",
function(){var a=$.extend({type:"recommend2show"},c);$.hao123.log.send(a)});a.bind("siterecommend2click",function(){var a=$.extend({type:"recommend2click"},c);$.hao123.log.send(a)});a.bind("siterecommend2delete",function(){var a=$.extend({type:"recommend2delete"},c);$.hao123.log.send(a)})};function TimeHint(a,b){this.duration=b||3E3;this.timeHandler=null;this.elem=a}
TimeHint.prototype={show:function(a,b){var c=this,b=b||{};c.timeHandler&&window.clearTimeout(c.timeHandler);b.text&&c.elem.html(b.text);c.elem.css(a);c.elem.show();c.timeHandler=window.setTimeout(function(){c.elem.hide()},c.duration)},hide:function(){this.timeHandler&&(window.clearTimeout(this.timeHandler),this.timeHandler=null);this.elem.hide()}};
$.hao123.siteConfig={css:{siteNormal:"site-normal",siteEdit:"site-edit",hdNormal:"site-hd-normal",hdEdit:"site-hd-edit",itemNormal:"site-item-normal",itemMove:"site-item-move",itemEdit:"site-item-edit",itemCurrent:"site-item-current",itemDashed:"site-item-dashed",itemAdd:"site-item-add",itemAddUp:"site-item-add-up",itemAddDown:"site-item-add-down",item:"site-item",js_item:"js_site-item",bdNormal:"site-bd-normal",itemText:"site-text",itemTpl:"site-tpl",sugError:"error"},sug:{requestQuery:"wd",url:"http://nssug.baidu.com/su",
callbackFn:"baidu.sug",callbackDataKey:"s",requestParas:{prod:"superpage"},n:5,noSubmit:!0},error:{500:'\u51fa\u73b0\u9519\u8bef\uff0c\u8bf7\u70b9 <a href="http://www.hao123.com" target="_self">\u8fd9\u91cc</a> \u5237\u65b0\u9875\u9762',501:"\u8be5\u7f51\u5740\u5df2\u5b58\u5728",510:'\u51fa\u73b0\u9519\u8bef\uff0c\u8bf7\u70b9 <a href="http://www.hao123.com"  target="_self">\u8fd9\u91cc</a> \u5237\u65b0\u9875\u9762',503:'\u51fa\u73b0\u9519\u8bef\uff0c\u8bf7\u70b9 <a href="http://www.hao123.com"  target="_self">\u8fd9\u91cc</a> \u5237\u65b0\u9875\u9762',
511:"\u8bf7\u8f93\u5165\u6b63\u786e\u683c\u5f0f\uff0c\u5982http://www.abc.com",512:"\u7f51\u7ad9\u540d\u79f0\u8fc7\u957f",513:"\u7f51\u5740\u8fc7\u957f",515:"\u8bf7\u8f93\u5165\u7f51\u7ad9\u540d\u79f0",516:"\u8bf7\u8f93\u5165\u7f51\u5740",507:"\u8bf7\u60a8\u5148\u767b\u5f55",514:"\u7f51\u5740\u5df2\u6ee1\uff0c\u8bf7\u5220\u9664\u4e0d\u5e38\u7528\u7684\u7f51\u5740"},info:{loading:"\u6b63\u5728\u8bf7\u6c42\uff0c\u8bf7\u7a0d\u5019",ok:"\u64cd\u4f5c\u6210\u529f\uff01",refresh:"\u6b63\u5728\u5237\u65b0\uff0c\u8bf7\u7a0d\u5019"},
url:{init:"/url/init",add:"/url/add",modify:"/url/modify",doDelete:"/url/delete",recover:"/url/reset",needImport:"/url/isneedimport",doImport:"/url/import",sort:"/url/sort",cr:"/api/paneldata",delRecommend:"/api/delrecom",delRecombyid:"/api/delrecombyid",user:"/api/username"},retry:2,recommendN:3,recommendMaxWord:5,showSaveMax:5,nameMaxLength:40,urlMaxLength:200,siteMaxlength:48,guestMaxLength:10,guestStatus:2,dragHint:"\u62d6\u52a8\u6392\u5e8f",confirmTitle:"\u63d0\u793a",confirmText:"\u767b\u5f55\u540e\u53ef\u7f16\u8f91\u66f4\u591a\u7f51\u5740\uff0c\u968f\u65f6\u968f\u5730\u6536\u85cf\uff0c\u4e0d\u518d\u62c5\u5fc3\u7f51\u5740\u4e22\u5931\uff01",
alertTitle:"\u63d0\u793a",recoverTitle:"\u6062\u590d\u9ed8\u8ba4",recoverText:"\u662f\u5426\u8981\u6062\u590d\u4e3a\u9ed8\u8ba4\u7f51\u5740\uff1f",adddedText:"\u5df2\u6dfb\u52a0\uff0c\u70b9\u51fb\u53d6\u6d88",emptyText:"\u6e05\u7a7a\u5386\u53f2\u8bb0\u5f55\uff01",guestHint:"\u7f51\u5740\u8fc7\u591a\uff0c\u5efa\u8bae\u767b\u5f55\u540e\u6c38\u4e45\u4fdd\u5b58",baiduCookie:"BAIDUID",flashCookie:"FLASHID",dataIdAttr:"data-id",iconBaseUrl:"su.bdimg.com/icon/",defaultIconUrl:"http://1.su.bdimg.com/icon/6000.png",
jsItem:".js_site-item",tpl:{sugMain:'<ol class="site-sugwrap">#{content}<ol>',sugItem:'<li site="#{site}" q="#{q}"><span class="name">#{title}</span><span class="url">#{text}</span></li>',sugSplitChar:"0{#S+_}",recommend:"<li><a class='item item-add js_recommend' data-id='#{id}' hidefocus='true'  data-type='recommend' href='#{url}'>#{name}</a></li>",cms:"<dl><dt><span class='popup-site-cms-title'>#{name}</span></dt>#{content}</dl>",cmsContent:"<dd #{itemStyle}><a href='#{url}' data-id='#{id}' hidefocus='true' data-type='cms' class='#{className}'>#{name}</a></dd>",
itemTag:"<ul>",editItem:"<li title='\u62d6\u52a8\u6392\u5e8f' class='js_site-item' data-id='#{id}' data-name='#{rawName}'  data-url='#{url}'><span class='js_text text' >#{name}</span><a  class='js_modify modify'  href='#' title='\u4fee\u6539' hidefocus='true'></a><a class='js_delete delete'  href='#'  title='\u5220\u9664' hidefocus='true'></a></li>",item:'<li class="js_site-item site-item site-item-normal #{style}" data-status="#{status}" title="#{title}" data-id="#{id}"><a class="js_text" href="#{url}" style="background-image:url(#{icon})" hidefocus="true">#{name}</a></li>',
recommendNone:'<div class="popup-site-recommend-sidenone"><h5>\u60a8\u5e38\u70b9\u7684\uff1a</h5><span>\u8fd8\u6ca1\u6709\u53d1\u73b0\u60a8\u5e38\u70b9\u7684\u7f51\u5740\uff0c\u5efa\u8bae\u60a8\u591a\u4f7f\u7528hao123</span></div>',noData:'<li class="js_no-data nodata">\u6ca1\u6709\u5e38\u7528\u7f51\u5740\uff0c\u8bf7\u60a8<a href="javascript:void(0)">\u6dfb\u52a0</a></li>',addNormalBtn:'<li class="js_item-add site-item site-item-add site-item-add-normal"><i></i><span class="site-item-add-text">\u6dfb\u52a0\u7f51\u5740</span>#{recommend}</li>',
addShortBtn:'<li title="\u6dfb\u52a0\u7f51\u5740" class="js_item-add site-item site-item-add site-item-add-short"><i></i>#{recommend}</li>',addRecommend:'<strong title="\u70b9\u51fb\u67e5\u770b\u63a8\u8350\u7684\u7f51\u5740" class="count js_add-count">#{count}</strong>'}};
$.hao123.siteView=function(a,b){function c(a){a=b.trim(a);/^.+:\/\/.*$/i.test(a)||(a="http://"+a);a=a.replace(/^(.+:\/\/)([^\/?]+)(.*)$/,function(a,b,c,d){return/^(https?|ftp)/i.test(b)?b.toLowerCase()+c.toLowerCase()+d:"http://"+c.toLowerCase()+d});a=a.replace(/^(.+:\/\/[^\/?]+)[\/?]$/,"$1");return a=a.replace(/\x3c/g,"").replace(/\x3E/g,"").replace(/\x22/g,"").replace(/\x27/g,"")}function d(a){return a?"http://"+(a.split(".")[0]%2+1)+"."+k.iconBaseUrl+a:k.defaultIconUrl}function h(a){a=b.trim(a);
a=a.replace(/^(.+:\/\/[^\/?]+)[\/?]$/,"$1");return i(a)}function g(a){a=b.trim(a);2==a.length?a=a.charAt(0)+"&#12288;"+a.charAt(1):3==a.length&&(a=a.charAt(0)+" "+a.charAt(1)+" "+a.charAt(2));return i(a,!0)}function i(a){return a=a.replace(/\x3c/g,"&lt;").replace(/\x3E/g,"&gt;").replace(/\x22/g,"&quot;").replace(/\x27/g,"&#39;")}function j(a,b){return!a||!b?!1:a.replace(/(.*)\/$/,"$1").toLowerCase()==b.replace(/(.*)\/$/,"$1").toLowerCase()}var f,k=b.hao123.siteConfig,n=b.hao123.cookie,l=k.jsItem,
m=b.hao123.format,o=null,q=null,p=this;return{onSecondAdd:function(a){b(m(k.tpl.item,{id:a.id,name:g(a.name),url:h(a.url),icon:d(a.icon),title:6>a.name.length?"":g(a.name),status:a.status})).insertBefore(f.bd.find(".js_item-add"));f.bd.find(".js_item-add").remove();this._addAddBtn()},doBlink:function(){var b=0,c=["#f3f3f3","#f7f7f7"];a.setTimeout(function(){f.blink.css("background-color",c[b%2]);b++;8>b&&a.setTimeout(arguments.callee,200)},200)},_getPosition:function(a){for(var c={left:a.offsetLeft,
top:a.offsetTop},a=a.offsetParent;a&&!b(a).hasClass("popup-site");)c.left+=a.offsetLeft,c.top+=a.offsetTop,a=a.offsetParent;c.top-=34;return c},on517:function(){f.sugName.val("");f.sugUrl.val("");f.modify.hide();f.add.show()},getTopRecommend:function(){return{name:f.topRecommendLink.html(),url:f.topRecommendLink.get(0).getAttribute("href",2),icon:f.topRecommend.attr("data-icon")}},onAddClickSynced:function(a){b(m(k.tpl.item,{id:this.id,name:g(a.name),url:h(a.url),icon:d(a.icon),title:6>a.name.length?
"":g(a.name),status:a.status})).insertBefore(f.topRecommend);f.topRecommend.remove();f.topRecommendHint.remove()},clearHint:function(){f.hintSug.hide();f.hintSave.hide();f.hintNoicon.hide();f.hintAdded.hide()},onRcommendDeleteOver:function(a){a=p._getPosition(a);a.left-=45;a.top-=6;f.hintNoicon.show(a,{text:k.emptyText})},onRcommendDeleteOut:function(){f.hintNoicon.hide()},onImported:function(a){if("none"!=f.psite.get(0).style.display){p.updatePopup(a);p.clearError();f.sugName.val("");f.sugUrl.val("");
f.placeHolderName.hide();f.placeHolderUrl.hide();var c={};b.each(a,function(){c[this.url]=this.id});f.psite.find(".item").each(function(){var a=this.href.replace(/(.*)\/$/,"$1");c[a]&&(this.className="item item-added",this.setAttribute("data-id",c[a]))})}else this.update(a)},onRefreshed:function(a){a?(f.refresh.show(),f.manage.hide(),f.bd.find(".js_item-add").hide()):(f.refresh.hide(),f.manage.show(),f.bd.find(".js_item-add").show())},onRefreshClick:function(a){f.refresh.hide();f.manage.show();p.update(a)},
onAddedClick:function(a){p._recoverAdded(a.href);f.sugName.val("");f.sugUrl.val("");f.modify.hide();f.add.show();f.sites.find(l).each(function(){if(this.getAttribute("data-id")==a.getAttribute("data-id"))return b(this).remove(),!1});this.clearError();f.hintNoicon.hide();f.hintAdded.hide();f.hintSave.hide();f.hintSug.hide();f.recover.show();return a.getAttribute("data-id")},onAddedItemOut:function(){f.hintNoicon.hide()},onAddedItemOver:function(a){f.hintAdded.hide();f.hintNoicon.show(p._getPosition(a),
{text:k.adddedText})},onItemClick:function(a){var d=a.innerHTML,f=a.getAttribute("href",2);return""!=b.trim(d)&&""!=b.trim(f)?(q=a,{name:b.trim(d),url:c(f),type:a.getAttribute("data-type")}):!1},onFirsted:function(a){f.sites.find(l).each(function(){var b=this.getAttribute("data-id");this.setAttribute("data-id",a[b])})},onRecovered:function(a){f.noDataHint.hide();f.recover.hide();f.saveForeverHint.hide();p.updatePopup(a);f.cms.find(".item-added").each(function(){this.className="js_recommend item item-normal"});
f.recommendContent.find(".item-added").each(function(){this.className="js_recommend item item-add"});b.each(a,function(){});this.clearError();f.sugName.val("");f.sugUrl.val("");f.add.show();f.modify.hide();f.hintAdded.hide()},onRecommendControlClick:function(){f.recommend.html(k.tpl.recommendNone);f.options.recommendCount=0;f.hintNoicon.hide()},onSorted:function(){var a=[];f.recover.show();b(l,f.sites).each(function(){var c=this.getAttribute("data-id");""!=b.trim(c)&&a.push(c)});return a},onCred:function(a){f.recommendContent.html("");
if(0<f.recommendData.length){f.recommendCount.html(f.recommendData.length);var c=k.tpl.recommend;b.each(f.recommendData,function(){f.recommendContent.append(m(c,{name:i(this.title),url:h(this.url),id:this.id}))});f.recommend.show()}var d=[];f.cms.html("");b.each(a.data.cms,function(){this.isTitle?(f.cms.append(m(k.tpl.cms,{name:this.name+"\uff1a",content:d.join("")})),d=[]):d.push(m(k.tpl.cmsContent,{className:this.isAdded?"item item-added":"js_recommend item item-normal",name:this.name,url:this.url,
id:this.id,itemStyle:this.isImportant?"class='important'":""}))})},onItemModifyClick:function(a){f.modify.show();f.add.hide();o=a=b(a);f.placeHolderName.hide();f.placeHolderUrl.hide();f.sugName.get(0).focus();f.sugName.val(a.attr("data-name"));f.sugUrl.val(a.attr("data-url"));p.clearError()},_recoverAdded:function(a){f.psite.find(".item-added").each(function(){j(a,this.href)&&(this.className="cms"==this.getAttribute("data-type")?"js_recommend item item-normal":"js_recommend item item-add")})},onItemDeleteClick:function(a){f.psite.find(".item-added").each(function(){var b=
this.getAttribute("data-id");if(b&&b==a.getAttribute("data-id"))return p._recoverAdded(this.href),!1});b(a).remove();f.recover.show();f.sugName.val("");f.sugUrl.val("");f.add.show();f.hintAdded.hide();f.modify.hide();0==f.sites.find(".js_site-item").length&&(f.noDataHint.show(),f.sites.hide())},onAdded:function(a){f.noDataHint.hide();f.hintSave.hide();f.recover.show();f.sites.show();f.sites.append(m(k.tpl.editItem,{id:a.id,url:h(a.url),name:g(a.name),rawName:a.name}));f.sugName.val("");f.sugUrl.val("");
f.placeHolderName.hide();f.placeHolderUrl.hide();a.type&&(f.hintAdded.show(p._getPosition(q),{text:k.addedText}),q=null);b(".js_recommend",f.psite).each(function(){j(this.getAttribute("href",2),a.url)&&(this.className="item item-added",this.setAttribute("data-id",a.id))})},onModified:function(a){f.add.show();f.recover.show();f.modify.hide();b(m(k.tpl.editItem,{id:a.id,url:h(a.url),name:g(a.name),rawName:a.name})).insertBefore(o);o.remove();f.sugName.val("");f.sugUrl.val("");b(".item-added",f.psite).each(function(){j(this.href,
o.attr("data-url"))&&(this.className="cms"==this.getAttribute("data-type")?"js_recommend item item-normal":"js_recommend item item-add")});o=null},_refreshState:function(a){b(".js_recommend",f.psite).each(function(){j(this.href,a.url)&&(this.className="item item-added",this.setAttribute("data-id",a.id))})},onAddClick:function(){if(!this._check())return!1;this.clearError();return{name:b.trim(f.sugName.val()),url:c(f.sugUrl.val())}},onModifyClick:function(){if(!this._check())return!1;this.clearError();
return{name:b.trim(f.sugName.val()),url:c(f.sugUrl.val()),id:o.attr("data-id")}},init:function(a){var b=!1;f=a;p=this;a=n.get(k.flashCookie);!f.isLanding&&null==a&&(b=!0,f.bd.find(".js_item-add").hide(),f.manage.hide());f.isLanding&&f.save.hide();return b},showRefresh:function(){f.refresh.show()},onManageClick:function(a,b){a?f.recover.show():f.recover.hide();f.sugName.val("");f.sugUrl.val("");b?p.showSaveMessage():f.saveForeverHint.hide();0==f.recommendData.length&&(f.recommend.show(),f.recommend.html(k.tpl.recommendNone))},
showSaveMessage:function(){n.get(f.shaveHintCookie)||f.saveForeverHint.show()},getSiteData:function(){var a=[],c=this;b(l+':not(".site-item-recommend")',f.bd).each(function(){var b=this.children[0];a.push({id:this.getAttribute("data-id"),name:b.innerHTML.replace("&#12288;","").replace(/ /g,"").replace("\u3000",""),url:b.getAttribute("href",2),status:this.getAttribute("data-status"),icon:c._getIcon(b),style:this.getAttribute("data-style")})});return a},_getIcon:function(a){var b=a.parentNode.getAttribute("data-icon");
return b?b:""!=a.style.backgroundImage?a.style.backgroundImage.match(/^.*\/([^)]+)/)[1]:"6000.png"},update:function(a){if(0>=a.length)f.bd.html(k.tpl.noData);else{var c=[];b.each(a,function(){var a=m(k.tpl.item,{id:this.id,name:g(this.name),url:h(this.url),icon:d(this.icon),title:6>this.name.length?"":g(this.name),status:this.status,style:this.style});c.push(a)});f.bd.html(c.join(""));this._addAddBtn();f.add.show();f.modify.hide();f.sugName.val("");f.sugUrl.val("")}},_addAddBtn:function(){var a=f.bd.find(".js_site-item").length;
if(6!=a){var b="";0<f.recommendData.length&&(b=m(k.tpl.addRecommend,{count:f.recommendData.length}));0==a%6?(f.bd.find("li:last a").get(0).style.cssText+=";max-width:56px;_width:56px;min-width:56px;",f.bd.append(m(k.tpl.addShortBtn,{recommend:b}))):f.bd.append(m(k.tpl.addNormalBtn,{recommend:b}))}},updatePopup:function(a){var c=[];b.each(a,function(){c.push(m(k.tpl.editItem,{id:this.id,url:h(this.url),name:g(this.name),rawName:this.name}))});0==c.length?(f.noDataHint.show(),f.sites.hide()):(f.noDataHint.hide(),
f.sites.html(c.join("")).show())},initSug:function(){var c=k.sug,d=k.tpl;c.templ=function(a,f){for(var g=[],h=a.s,j={},i=0,k=0;i<h.length&&k<c.n;i++){var o=b.parseJSON(h[i].split(d.sugSplitChar)[1]);o&&(o[1]=o[1]||"",o[4]&&(o[4]=o[4]||"",j[o[4]]||(k++,j[o[4]]=!0,g.push(m(d.sugItem,{site:o[1],q:o[4],title:o[4].replace(f,"<strong>"+f+"</strong>"),text:o[1].replace(f,"<strong>"+f+"</strong>")})))))}return 0>=g.length?null:m(d.sugMain,{content:g.join("")})};f.sugName.focusin(function(){f.placeHolderName.hide()});
f.sugUrl.focusin(function(){f.placeHolderUrl.hide()});f.sugName.focusout(function(){""==this.value&&f.placeHolderName.show();""==f.sugUrl.value&&f.placeHolderUrl.show()});f.sugUrl.focusout(function(){""==this.value&&f.placeHolderUrl.show();""==f.sugName.value&&f.placeHolderName.show()});c.onSelect=function(a,b){a&&b&&(f.sugName.val(a),f.sugUrl.val(b),g.s=null,f.placeHolderName.hide(),f.placeHolderUrl.hide(),p.clearError())};c.onEnable=function(a){a=0<=a.className.indexOf("js_sug-url")?f.sugName:f.sugUrl;
return 0<b.trim(a.val()).length?!1:!0};var g=null;6==b.hao123.browser.ie?a.setTimeout(function(){G.sug(f.sugName.get(0),c);g=G.sug(f.sugUrl.get(0),c);f.placeHolderUrl.show();f.placeHolderName.show()},20):(G.sug(f.sugName.get(0),c),g=G.sug(f.sugUrl.get(0),c))},clearError:function(){f.sugName.removeClass(k.css.sugError);f.sugUrl.removeClass(k.css.sugError);f.hintSug.hide()},showError:function(a){switch(a){case 515:case 512:f.hintSug.show(p._getPosition(f.sugName.get(0)),{text:k.error[a]});f.sugName.addClass(k.css.sugError).get(0).focus();
f.sugUrl.removeClass(k.css.sugError);break;case 516:case 513:case 501:f.hintSug&&(f.hintSug.show(p._getPosition(f.sugUrl.get(0)),{text:k.error[a]}),f.sugUrl.addClass(k.css.sugError).get(0).focus(),f.sugName.removeClass(k.css.sugError));break;case 514:f.hintSave.show(p._getPosition(f.sugUrl.get(0)),{text:k.error[a]});break;case 507:break;case 599:break;case 588:break;case 600:case 601:case 602:case 603:f.hintSug.show(p._getPosition(f.sugUrl.get(0)),{text:"\u7528\u6237\u6807\u8bc6\u4e22\u5931\uff01"});
break;case 900:break;default:f.hintSave&&f.hintSave.show(p._getPosition(f.sugUrl.get(0)),{text:k.error[a]})}},_check:function(){var a=b.trim(f.sugName.val()),c=b.trim(f.sugUrl.val());if(""==a)return this.showError(515);if(0>=c.length||/^(https?:\/\/|ftp:\/\/)$/i.test(c))return this.showError(516);if(a.length>k.nameMaxLength)return this.showError(512);if(c.length>k.urlMaxLength)return this.showError(513);this.clearError();return!0}}}(this,jQuery);
$.hao123.siteModel=function(a,b){function c(){(new Date).getTime();return d()?{key:(new Date).getTime(),c:d()}:null}function d(){var b=n.get(j.baiduCookie);return(b=n.get(j.flashCookie)||b)&&32<=b.length?(b=b.substring(0,32),a.encodeURIComponent(b)):null}function h(b){var c=a.location.search.match(/[?&]tn=([^&<>'"]+)/);1==tnuser&&(b=b+"?tn="+c[1]);return b}function g(a){if(a)for(var b=0;b<k.length;b++)k[b].id=a[k[b].id],k[b].style=""}function i(a){return a.replace(/(.*)\/$/,"$1").toLowerCase()}var j=
b.hao123.siteConfig,f=j.url,k=[],n=b.hao123.cookie,l={_events:{added:[],addtwoed:[],firsted:[],deleted:[],modified:[],recovered:[],recommended:[],addSynced:[],addClickSynced:[],imported:[],sorted:[],error:[],refreshed:[],operated:[],cred:[],getUser:[]},checkLimit:function(a){if(a&&this.getItemById(a).status==j.guestStatus)return 0;for(var b=a=0;b<k.length;b++)k[b].status==j.guestStatus&&a++;return a>=j.guestMaxLength?517:0},getUserDataCount:function(){for(var a=0,b=0;b<k.length;b++)k[b].status==j.guestStatus&&
a++;return a},getData:function(){return k},checkIsShowSave:function(){if(HLogin.loginModel.isLogin)return!1;var a=this.getUserDataCount();return a>=j.showSaveMax?a:!1},checkIsShowRecover:function(){return 0==k.length||500<k[0].id?!0:!1},checkFull:function(){return k.length>=j.siteMaxlength?514:0},checkAddDuplicate:function(a){for(var b=0;b<k.length;b++)if(k[b].url==a)return 501;return 0},checkModifyDuplicate:function(a){if(a.url==this.getItemById(a.id).url)return 0;for(var b=0;b<k.length;b++)if(k[b].url==
a.url)return 501;return 0},init:function(a){k=a},getModifyItem:function(a){return modifyItem=this.getItemById(a)},getItemById:function(a){for(var b=0;b<k.length;b++)if(k[b].id==a)return k[b]},deleteItemById:function(a){for(var b=0;b<k.length;b++)k[b].id==a&&k.splice(b,1)},getUser:function(){var a=c();b.ajax({url:f.user,success:function(a){switch(a.code){case 200:l.dispatchEvent("getUser",{userName:a.name,code:200});break;default:l.dispatchEvent("getUser",{userName:"",code:a.code})}},error:function(){l.dispatchEvent("getUser",
{userName:"",code:"900"})},data:a,dataType:"json",type:"GET"})},sort:function(a){b.post(f.sort,b.extend({ids:a},c()),function(a){l.dispatchEvent("operated");switch(a.code){case 200:l.dispatchEvent("sorted");break;case 201:g(a.data.map);l.dispatchEvent("firsted",a.data.map);break;default:l.dispatchEvent("error",{code:a.code,src:"sort"})}},"json")},doImport:function(){b.getJSON(f.doImport,c(),function(a){l.dispatchEvent("operated");switch(a.code){case 200:k=a.data.sites;l.dispatchEvent("imported",k);
break;default:l.dispatchEvent("error",{code:a.code,src:"doimport"})}})},recover:function(){b.getJSON(f.recover,c(),function(a){switch(a.code){case 200:k=a.data.sites;l.dispatchEvent("recovered",a.data.sites);row=0;break;default:l.dispatchEvent("error",{code:a.code,src:"recover"})}})},addTwo:function(a){var d=l.checkAddDuplicate(a.url);0<d?l.dispatchEvent("error",{code:d,src:"feadd"}):(a.key=(new Date).getTime(),b.post(f.add,b.extend(a,c(),{type:"recommend"}),function(b){l.dispatchEvent("operated");
var c=null;switch(b.code){case 200:c={icon:b.data.icon,name:a.name,url:a.url,id:b.data.id,status:b.data.status,obj:a.obj};k.push(c);l.dispatchEvent("addtwoed",c);break;default:l.dispatchEvent("error",{code:b.code,src:"addtwo"})}},"json"))},add:function(a){var d=l.checkAddDuplicate(a.url);0<d?l.dispatchEvent("error",{code:d,src:"feadd"}):(a.key=(new Date).getTime(),b.post(f.add,b.extend(a,c()),function(b){l.dispatchEvent("operated");var c=null;switch(b.code){case 201:g(b.data.map),l.dispatchEvent("firsted",
b.data.map);case 200:c={isRecommend:a.isRecommend,icon:b.data.icon,name:a.name,url:a.url,id:b.data.id,status:b.data.status,type:a.type,obj:a.obj};k.push(c);l.dispatchEvent("added",c);break;default:c="add",a.isSynadd&&(c="synadd"),l.dispatchEvent("error",{code:b.code,src:c})}},"json"))},addSync:function(a){b.post(f.add,b.extend(a,c(),{type:"recommend"}),function(b){l.dispatchEvent("operated");var c=null;switch(b.code){case 201:g(b.data.map);c={icon:b.data.icon,name:a.name,url:a.url,id:b.data.id,status:b.data.status};
k.push(c);l.dispatchEvent("addSynced",k);break;default:l.dispatchEvent("error",{code:b.code,src:"addSync"})}},"json")},addClickSync:function(a){b.post(f.add,b.extend(a,c(),{type:"recommend"}),function(b){l.dispatchEvent("operated");var c=null;switch(b.code){case 201:g(b.data.map);c={icon:b.data.icon,name:a.name,url:a.url,id:b.data.id,status:b.data.status};k.push(c);l.dispatchEvent("addClickSynced",c);break;default:l.dispatchEvent("error",{code:b.code,src:"addClickSync"})}},"json")},doDelete:function(a){b.getJSON(f.doDelete,
b.extend({id:a},c()),function(b){l.dispatchEvent("operated");switch(b.code){case 201:l.deleteItemById(a);g(b.data.map);l.dispatchEvent("firsted",b.data.map);break;case 200:l.deleteItemById(a);break;default:l.dispatchEvent("error",{code:b.code,src:"del"})}})},delRecommend:function(){b.getJSON(h(f.delRecommend),c(),function(a){500<=a.code&&l.dispatchEvent("error",{code:a.code,src:"delRecommend"})})},delRecombyid:function(a){b.getJSON(h(f.delRecombyid),b.extend({id:a},c()),function(a){500<=a.code&&l.dispatchEvent("error",
{code:a.code,src:"delRecombyid"})})},modify:function(a){var d=l.checkModifyDuplicate(a);if(0<d)l.dispatchEvent("error",{code:d,src:"femodify"});else{var h=this;b.post(f.modify,b.extend(a,c()),function(b){l.dispatchEvent("operated");switch(b.code){case 201:g(b.data.map),l.dispatchEvent("firsted",b.data.map);case 200:var c=h.getItemById(201==b.code?b.data.map[b.data.oldid]:b.data.oldid);c.name=a.name;c.url=a.url;c.id=b.data.id;c.status=b.data.status;c.icon=b.data.icon;l.dispatchEvent("modified",c);
break;default:l.dispatchEvent("error",{code:b.code,src:"modify"})}},"json")}},refresh:function(){var a=c();if(!a)return!1;b.ajax({url:f.init,success:function(a){l.dispatchEvent("operated");switch(a.code){case 200:a.data.isuser?(k=a.data.sites,l.dispatchEvent("refreshed",!0)):l.dispatchEvent("refreshed",!1);break;default:l.dispatchEvent("error",{code:a.code,src:"refreshSuccess"})}},error:function(){b.ajax({url:f,data:c(),success:function(a){l.dispatchEvent("error",{code:"588",src:"refresh"+a.substring(0,
500)})},dataType:"text",type:"GET"})},data:a,dataType:"json",type:"GET"})},sortData:function(a){var c={};b.each(k,function(){c[this.id]=this});k=[];b.each(a,function(){k.push(c[this])});return k},getCRdata:function(){var a=c();a.n=6;var d={};b.each(k,function(){d[i(this.url)]=this.id});0<document.URL.indexOf("sitepopuppreview")&&(a.preview=1);b.ajax({url:h(f.cr),success:function(a){b.each(a.data.cms,function(){this.isTitle||(this.isAdded=Boolean(d[i(this.url)]),this.id=d[i(this.url)])});l.dispatchEvent("cred",
a)},error:function(a,b,c){l.dispatchEvent("error",{code:599,src:"cr"+b+c})},data:a,dataType:"json",type:"GET"})}};b.extend(l,b.hao123.ievent);b(document).ajaxError(function(a,b,c){/forecast|track\.gif|timer\.gif|monkey|lottery|username/.test(c.url)||l.dispatchEvent("error",{code:599,src:b.status+c.url.replace(/^(.*)\?.+/,"$1")})});return l}(this,jQuery);
(function(a,b){function c(a){if(a.pageX||a.pageY)return{x:a.pageX,y:a.pageY};if(document.documentElement&&document.documentElement.scrollTop)return{x:a.clientX+document.documentElement.scrollLeft-document.documentElement.clientLeft,y:a.clientY+document.documentElement.scrollTop-document.documentElement.clientTop};if(document.body)return{x:a.clientX+document.body.scrollLeft-document.body.clientLeft,y:a.clientY+document.body.scrollTop-document.body.clientTop}}var d=null,h=b.hao123.siteConfig,g=h.jsItem;
g.substring(1);var i="item-move";b.hao123.SiteDrag=function(a,b){this.container=a;this.placeHolder=b;this._events={sorted:[]};this.activeIndex=-1};b.hao123.SiteDrag.prototype={setIsCanDrag:function(a){this._isCanDrag=a},dragable:function(){var a=this;this.container.delegate(h.jsItem,"mousedown",function(d){function h(b){var d=c(b),b=d.x,d=d.y,f=b-q+m,g=d-p+o;0<f&&f+r.offsetWidth<a.container.width()+10&&(m=f);0<g&&g<a.container.height()&&(o=g);r.style.left=m+"px";r.style.top=o+"px";q=b;p=d;a._dealMeet(r);
return!1}function n(){b(document).off("mousemove",h);b(document).off("mouseup",n);b.hao123.browser.ie?r.releaseCapture():r.style.opacity="";a._moveTo(r,function(){b(r).insertBefore(a.placeHolder).removeClass(i);a.placeHolder.hide();var c=b(g).index(r);a.activeIndex!=c&&(a.activeIndex=c,a.dispatchEvent("sorted"))});return!1}function l(){return a._isCanDrag?!1:!0}a.container.on("click",l);if(!(0<=d.target.className.indexOf("js_modify")||0<=d.target.className.indexOf("js_delete"))){a.activeIndex=b(g).index(this);
b.hao123.browser.ie?this.setCapture():this.style.opacity=0.8;this.style.left=this.offsetLeft+"px";this.style.top=this.offsetTop+"px";this.className=this.className+" "+i;a.placeHolder.insertBefore(this);a.placeHolder.show();var m=parseInt(this.style.left),o=parseInt(this.style.top),d=c(d),q=d.x,p=d.y;a._registePosition();var r=this;b(document).on("mousemove",h);b(document).on("mouseup",n);b(document).off("mouseup",l);return!1}})},_registePosition:function(){d=[];b(g,this.container).each(function(a){d.push({left:this.offsetLeft,
top:this.offsetTop,index:a,thisObj:this})});this.placeHolder.index=b("li,",this.container).index(this.placeHolder)},_dealMeet:function(a){for(var b=a.offsetLeft,c=a.offsetTop,g=0;g<d.length;g++)if(d[g].thisObj!==a&&Math.abs(d[g].left-b)<0.5*a.offsetWidth&&Math.abs(d[g].top-c)<0.3*a.offsetHeight){this.placeHolder.index>d[g].index?this.placeHolder.insertBefore(d[g].thisObj):this.placeHolder.insertAfter(d[g].thisObj);this._registePosition();break}},_moveTo:function(b,c){var d=b.offsetLeft,g=b.offsetTop,
h=this.placeHolder.get(0).offsetLeft,i=this.placeHolder.get(0).offsetTop,o=d,q=g,p=0;10>Math.abs(h-d)&&10>Math.abs(i-g)?c():a.setTimeout(function(){o+=(h-d)/6;q+=(i-g)/6;b.style.left=o+"px";b.style.top=q+"px";6>p++?a.setTimeout(arguments.callee,20):c()},20)}};b.extend(b.hao123.SiteDrag.prototype,b.hao123.ievent)})(this,jQuery);
$.hao123.popupTpls={_head:'<div class="popup-head"><a class="js_close" href="javascript:void(0);"></a><span class="js_title"></span></div>',_login:'<div class="login_left"><ul class="login_tab"><li class="curr" id="login_tab_1">\u666e\u901a\u767b\u5f55<span></span></li><li id="login_tab_2" class="">\u624b\u673a\u767b\u5f55<span></span></li></ul><div class="err_holder" id="errHolder"></div><div id="login_holder"><div id="login_holder_1"></div><div style="display:none" id="login_holder_2"></div></div></div><div class="login_right"><p class="reg_text">\u8fd8\u6ca1\u6709\u767e\u5ea6\u5e10\u53f7\uff1f</p><p class="reg_link"><a href="https://passport.baidu.com/v2/?reg&amp;tpl=hao123&amp;regType=1&amp;u=http%3A%2F%2F'+window.location.host+
'%2F" target="_blank" id="reg_btn"></a></p><p class="other_title">\u4f7f\u7528\u5408\u4f5c\u7f51\u7ad9\u5e10\u53f7\u767b\u5f55</p><ul class="other_list"><li><a class="other_icon other_icon_qq" href="http://passport.baidu.com/phoenix/account/cloudlogin?tpl=hao123&u=http%3A%2F%2F'+window.location.host+'%2Fcloudjump.htm%3FtimeOut=1000&act=implicit&type=15">QQ\u5e10\u53f7\u767b\u5f55</a></li><li><a class="other_icon other_icon_sina" href="http://passport.baidu.com/phoenix/account/cloudlogin?tpl=hao123&u=http%3A%2F%2F'+
window.location.host+'%2Fcloudjump.htm%3FtimeOut=1000&act=implicit&type=2">\u65b0\u6d6a\u5fae\u535a\u5e10\u53f7\u767b\u5f55</a></li><li><a class="other_icon other_icon_renren" href="http://passport.baidu.com/phoenix/account/cloudlogin?tpl=hao123&u=http%3A%2F%2F'+window.location.host+'%2Fcloudjump.htm%3FtimeOut=1000&act=implicit&type=1">\u4eba\u4eba\u5e10\u53f7\u767b\u5f55</a></li></ul></div>',_confirm:"<div class='popup-body'><i></i><div><strong class='js_text'></strong> <p><button class='button js_ok'  ></button><button class='button js_cancel' >\u53d6\u6d88</button></p></div></div>",
_alert:"<div class='popup-alert-w'><p class='popup-alert-text js_text'></p><p class='popup-alert-control'><button class='button js_ok'>\u786e\u5b9a</button></p></div>",_tpl:"<div class='popup'>#{head}#{content}</div>",maskTpl:'<div class="popup-mask"></div>',getTpl:function(a){return $.hao123.format(this._tpl,{head:this._head,content:this["_"+a]})}};
(function(a,b){function c(){return a.innerHeight?a.innerHeight:n.documentElement.clientHeight}function d(){return a.innerWidth?a.innerWidth:n.documentElement.clientWidth}function h(){var a=document,b=a.body;return Math.max(a.documentElement.scrollHeight,b.scrollHeight,("BackCompat"==a.compatMode?b:a.documentElement).clientHeight)+"px"}function g(b){var f=c(),g=d();if(10<Math.abs(f-l)||10<Math.abs(g-m))j._mask&&j._mask.height(h()),l=f,m=g,b.css({left:(g-b.width())/2+"px",top:(a.pageYOffset||n.documentElement.scrollTop)+
(f-b.height())/2+"px"})}function i(){}b.hao123.popupmask={_mask:null,show:function(){this._mask||(this._mask=b(b.hao123.popupTpls.maskTpl).hide().appendTo("body"));p&&this._mask.height(h());this._mask.show()},hide:function(){this._mask&&this._mask.hide()}};b.hao123.specialmaskTpl={_mask:null,show:function(){this._mask||(this._mask=b(b.hao123.popupTpls.specialmaskTpl).hide().appendTo("body"));p&&this._mask.height(h());this._mask.show()},hide:function(){this._mask&&this._mask.hide()}};b.hao123.christmaskTpl=
{_mask:null,show:function(){this._mask||(this._mask=b(b.hao123.popupTpls.christmaskTpl).hide().appendTo("body"));p&&this._mask.height(h());this._mask.show()},hide:function(){this._mask&&this._mask.hide()}};var j=b.hao123.popupmask,f=b.hao123.specialmaskTpl,k=b.hao123.christmaskTpl,n=a.document,l=0,m=0,o=0,q=0,p=!("[object Opera]"==Object.prototype.toString.call(a.opera)||!a.attachEvent||a.XMLHttpRequest);i.prototype=new b.Widget;i.prototype=b.extend(i.prototype,{_baseCreate:function(){this.element.addClass(this.options.className);
this._appendToBody=!1},_baseShow:function(){this._appendToBody?this.element.show():(this.element.appendTo("body"),this._appendToBody=!0);this.element.css({left:(d()-this.element.width())/2+"px",top:(a.pageYOffset||n.documentElement.scrollTop)+(c()-this.element.height())/2+"px"});this.options.isModel&&j.show();var b=this;a.onresize=function(){g(b.element)}},_baseHide:function(){a.onresize=null;this.options.isModel&&j.hide();this.element.hide()},_christmasShow:function(){this.element.show();this.element.css({left:(d()-
this.element.width())/2+"px",top:(a.pageYOffset||n.documentElement.scrollTop)+(c()-this.element.height())/2+"px"});this.options.isModel&&k.show();var b=this;a.onresize=function(){g(b.element)}},_specialShow:function(b){this.element.css({display:"block",opacity:0,left:(d()-this.element.width())/2+"px",top:(a.pageYOffset||n.documentElement.scrollTop)+(c()-this.element.height())/2+30+"px"}).animate({top:"-=30",opacity:1},500);this.options.isModel&&f.show();var i=this;a.onresize=function(){var f=i.element,
k=c(),l=d();if(10<Math.abs(k-o)||10<Math.abs(l-q))j._mask&&j._mask.height(h()),o=k,q=l,f.css({left:(l-f.width())/2+"px",top:(a.pageYOffset||n.documentElement.scrollTop)+(k-f.height())/2+"px"});g(b)}},_specialhide:function(){this.options.isModel&&f.hide();this.element.fadeOut()},_christmasHide:function(){a.onresize=null;this.options.isModel&&k.hide();this.element.fadeOut()}});b.hao123.popup=i})(this,jQuery);
$.widget("hao123.alert",$.hao123.popup,{options:{className:"popup-alert",isModel:!0,okText:"\u786e\u5b9a"},_create:function(){this._baseCreate();var a=this.element,b=this;$(".js_title",a).html(this.options.title);$(".js_text",a).html(this.options.text);$(".js_close",a).click(function(){b._baseHide();return!1});$(".js_ok",a).click(function(){b._baseHide();b._trigger("ok")}).text(b.options.okText)},show:function(){this._baseShow()}});
$.widget("hao123.login",$.hao123.popup,{options:{className:"popup-login",title:"\u7528\u767e\u5ea6\u5e10\u53f7\u767b\u5f55",isModel:!0},_create:function(){this._baseCreate();var a=this.element,b=this;b._isInit=!1;$(".js_title",a).html(this.options.title);$(".js_close",a).click(function(){b._baseHide();b._isOpen=!1;b._trigger("close");return!1});$(".other_list",a).find("a").click(function(){window.open(this.href,"\u5408\u4f5c\u5e10\u53f7\u767b\u5f55","height=400,width=600,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no");
return!1})},_isOpen:!1,checkIsOpen:function(){return this._isOpen},show:function(){function a(a){if(a[2].username)return decodeURIComponent(decodeURIComponent(a[2].username));if(a[2].phonenumber)return a[2].phonenumber.replace(/^(\d{3})\d{4}(\d{4})$/,"$1****$2");if(a[2].mail)return a[2].mail.replace(/@.+$/,"")}this._isOpen=!0;this._baseShow();if(!this._isInit){this._isInit=!0;var b=HLogin.loginConfig,c=HLogin.loginView,d=HLogin.loginModel,h=this,g={outerDomId:"login_holder_1",u:b.u,loginType:b.loginType,
staticpage:b.staticpage,tpl:b.tpl,bindEnterSubmit:!0,onReady:function(){c.onCommonReady()},onInputErr:c.onInputErr,onLoginSuccess:function(){var b=arguments;h._baseHide();h._isOpen=!1;d.signin({isInit:!1,userName:a(b)});$.hao123.getProfile();h._trigger("ok")},onSystemErr:c.onSystemErr};window.loginCallback=function(){bdPass.api.login.init(g);g.outerDomId="login_holder_2";g.isPhone=!0;g.onReady=function(){c.onPhoneReady()};bdPass.api.login.init(g)};var i;window.imggetcookie=i=new Image;i.onload=i.onerror=
function(){$.ajaxSetup({cache:!0});$.getScript(b.passUrl);$.ajaxSetup({cache:!1});window.imggetcookie=void 0};i.src="http://passport.baidu.com/img/v.gif?r="+(new Date).getTime()}}});
$.widget("hao123.confirm",$.hao123.popup,{options:{className:"popup-confirm",isModel:!0,okText:"\u786e\u5b9a"},_create:function(){this._baseCreate();var a=this.element,b=this;$(".js_title",a).html(this.options.title);$(".js_text",a).html(this.options.text);$(".js_close",a).click(function(){b._baseHide();b._trigger("close");return!1});$(".js_ok",a).click(function(){b._baseHide();b._trigger("ok")}).text(b.options.okText);$(".js_cancel",a).click(function(){b._baseHide();b._trigger("cancel")})},show:function(){this._baseShow()}});
$.widget("hao123.site",{options:{isLanding:!1,userName:""},_create:function(){var a=this.element,b=$.hao123;this.recommendData=this.options.recom||[];var c=[],d=5;window.location.search.match(/[?&]tn=([^&<>'"]+)/)&&0<this.recommendData.length&&(c=this.recommendData[0],d=6);for(;this.recommendData.length>d;)this.recommendData.pop();this.recommend2Text=c.title;this.recommend2Url=c.url;this.retried=0;this.isFromTopLogin=!1;this.config=b.siteConfig;this.view=b.siteView;this.model=b.siteModel;this.login=
HLogin.loginModel;this.loginPopup=$(b.popupTpls.getTpl("login")).login();this.confirmPopup=$(b.popupTpls.getTpl("confirm")).confirm({title:this.config.confirmTitle,text:this.config.confirmText});this.recoverPopup=$(b.popupTpls.getTpl("confirm")).confirm({title:this.config.recoverTitle,text:this.config.recoverText});this.alertPopup=$(b.popupTpls.getTpl("alert")).alert({title:this.config.alertTitle,text:this.config.alertText});this.topRecomendHint=$(".site-item-recommend-hint",a);this.loading=$(".popup-site-loading",
a);this.popContent=$(".popup-site-content",a);this.refresh=$(".js_refresh",a);this.refreshButton=$(".js_refresh-button",a);this.manage=$(".js_manage",a);this.add=$(".js_psite-add",a);this.modify=$(".js_psite-modify",a);this.psite=$(".js_psite",a);this.sugName=$(".js_sug-name",a);this.sugUrl=$(".js_sug-url",a);this.save=$(".js_psite-save",a);this.saveForeverHint=$(".js_hint-saveForever",a);this.bd=$(".js_bd",a);this.dash=$("<li></li>");this.addCount=$(".js_add-count",a);this.topRecommend=$(".site-item-recommend",
a);this.topRecommendLink=this.topRecommend.find(".js_text");this.topRecommendDelete=$(".js_recommend_delete",a);this.topRecommendHint=$(".site-item-recommend-hint",a);this.context=$("#popup-site-holder");this.psite.appendTo(this.context);this.recommend2Js=$($.hao123.format("<div class='rpjs'><div class='rp'><em class='left'></em><span>\u63a8\u8350:</span><a data-max-width='90' href='#{url}'>#{text}</a><i></i></div>",{text:this.recommend2Text,url:this.recommend2Url}));this.recommend2=this.recommend2Js.find(".rp");
this.recommend2Em=this.recommend2Js.find("em");this.recommend2Link=this.recommend2.find("a");this.recommend2key="a";this._bind();this.init();this.shaveHintCookie="site_shave_hint";0<this.topRecommend.length&&(a=this.topRecommend.position(),this.topRecomendHint.css({top:a.top+25,left:a.left-15}));this.model.init(this.view.getSiteData())},init:function(){5<this.options.recommendCount&&(this.options.recommendCount=5);1==this.options.isStatic&&(this.manage.hide(),this.bd.find(".js_item-add").hide());
var a=this,b=a.config.flashCookie,c=a.config.baiduCookie,d=$.hao123.cookie;a.isLanding=a.options.isLanding;a.isLanding&&(a.login.signin({isInit:!0,userName:a.options.userName}),a.options.userName||a.model.getUser());var h;0<a.recommend2Link.length&&(h=a.recommend2Link.get(0).getAttribute("href",2));if(a.view.init(a,h)){var g=d.get(c),i=d.get(b);$.hao123.localcookie.getInstance().localcookie("wait",function(c){i=d.get(b);c&&i&&i!=g?a.model.refresh():(a.bd.find(".js_item-add").show(),a.manage.show())},
2E3)}$("#userBar .user-login").click(function(){a.isFromTopLogin=!0;a.loginPopup.login("show");return!1});this._ajust();this._delete1()},_initPopupVariable:function(){var a=this.context;this.close=$(".js_psite-close",a);this.sites=$(".js_psite-sites",a);this.placeHolderName=$(".js_placeholder-name",a);this.placeHolderUrl=$(".js_placeholder-url",a);this.recover=$(".js_psite-recover",a);this.recommendContent=$(".js_psite-recommend-content",a);this.recommendControl=$(".js_psite-recommend-control",a);
this.recommendCount=$(".js_psite-recommend-count",a);this.cms=$(".js_psite-cms",a);this.recommend=$(".js_psite-recommend",a);this.recover=$(".js_psite-recover",a);this.sug=$(".js_psite-sug",a);this.hintSug=new TimeHint($(".js_hint-sug",a));this.hintAdded=new TimeHint($(".js_hint-added",a));this.hintNoicon=new TimeHint($(".js_hint-noicon",a));this.hintSave=new TimeHint($(".js_hint-save",a),6E3);this.noDataHint=$(".js_nodata-hint",a);this.hintText=$(".popup-site-hinttext",a);this.hintTextButton=$("span",
this.hintText);this.blink=$(".popup-site-blink",a)},_initPopupPopup:function(){var a=this;a.confirmPopup.bind("confirmok",function(){a.loginPopup.login("show");a._hidePsite()});a.confirmPopup.bind("confirmcancel",function(){a._showPopup()});a.confirmPopup.bind("confirmclose",function(){a._showPopup()});a.loginPopup.bind("loginclose",function(){a.isFromTopLogin?a.isFromTopLogin=!1:a._showPopup()});a.loginPopup.bind("loginok",function(){a._showPopup()});a.recoverPopup.bind("confirmok",function(){a.model.recover()});
a.recoverPopup.bind("confirmcancel",function(){a._showPopup()});a.recoverPopup.bind("confirmclose",function(){a._showPopup()})},_initPopupEvent:function(){var a=this;a.hintTextButton.click(function(){a.hintText.remove()});a.save.click(function(){a._hidePsite();a.loginPopup.login("show");a.saveForeverHint.hide();return!1});a.saveForeverHint.click(function(){$.hao123.cookie.set(a.shaveHintCookie,1);a.saveForeverHint.hide()});a.psite.on("mouseover",".item-added",function(){a.view.onAddedItemOver(this)});
a.psite.on("mouseout",".item-added",function(){a.view.onAddedItemOut(this)});a.psite.on("click",".js_recommend",function(){if(!a._checkAdd())return!1;var b=a.view.onItemClick(this);b&&a.model.add(b);return!1});a.psite.on("click",".item-added",function(){var b=a.view.onAddedClick(this);a.model.doDelete(b);a._trigger("dodelete",null,{id:b,url:this.parentNode.getAttribute("data-url")});return!1});a.recover.click(function(){a._hidePsite();a.recoverPopup.confirm("show");return!1});a.recommendControl.find("a").click(function(){a.view.onRecommendControlClick();
a.model.delRecommend();a._trigger("deleteallrecommend");return!1}).hover(function(){a.view.onRcommendDeleteOver(this)},function(){a.view.onRcommendDeleteOut(this)});a.close.click(function(){var b=a.view.onSorted();a.view.clearError();a.view.update(a.model.sortData(b));a.placeHolderName.show();a.placeHolderUrl.show();$.hao123.popupmask.hide();a._hidePsite();a._trigger("backclick");return!1});a.add.click(function(){if(a._checkAdd()){var b=a.view.onAddClick();b&&a.model.add(b)}return!1});a.modify.click(function(){var b=
a.view.onModifyClick();if(!b)return!1;var c=0;if(!a.login.isLogin&&(c=a.model.checkLimit(b.id),517==c))return a.confirmPopup.confirm("show"),a._hidePsite(),a.view.on517(),!1;if(0<c)return a.view.showError(c),!1;b&&a.model.modify(b);return!1});a.sites.on("click",".js_modify",function(){a.view.onItemModifyClick(this.parentNode);a.model.checkIsShowRecover()||a.view.doBlink();return!1});a.sites.on("click",".js_delete",function(){a.view.onItemDeleteClick(this.parentNode);var b=this.parentNode.getAttribute("data-id");
a.model.doDelete(b);a.model.checkIsShowSave()<$.hao123.siteConfig.showSaveMax&&a.saveForeverHint.hide();a._trigger("dodelete",null,{id:b,url:this.parentNode.getAttribute("data-url")});return!1});a.model.addEventListener("firsted",function(b){a.view.onFirsted(b);$.hao123.setProfile("urls","true")});a.model.addEventListener("recovered",function(b){a.view.onRecovered(b);a._showPopup();$.hao123.setProfile("urls","false");a._trigger("recovered")});a.model.addEventListener("modified",function(b){a.view.onModified(b);
a._trigger("modify",null,b)});a.model.addEventListener("cred",function(b){a.view.onCred(b)})},_initPopup:function(){var a=this;a._initPopupVariable();a._initPopupPopup();a._initPopupEvent();a.siteDrag=new $.hao123.SiteDrag(a.sites,a.dash);a.siteDrag.dragable();a.siteDrag.addEventListener("sorted",function(){a.model.sort(a.view.onSorted().join(","))});a.view.initSug();6==$.hao123.browser.ie&&(a.placeHolderUrl.hide(),a.placeHolderName.hide());a.model.getCRdata();a.model.checkIsShowRecover()||a.hintText.show()},
_showPopup:function(){this.psite.show();$.hao123.popupmask.show();this.recommend2Js.remove()},_checkAdd:function(){var a=0;this.login.isLogin||(a=this.model.checkLimit());if(0<a)return this.confirmPopup.confirm("show"),this._hidePsite(),!1;a=this.model.checkFull();return 0<a?(this.view.showError(a),!1):!0},_hidePsite:function(){this.view.clearHint();this.psite.hide()},_addSecondRecommend:function(){var a={name:this.recommend2Link.text(),url:this.recommend2Link.get(0).getAttribute("href",2)};this.model.addTwo(a);
this._trigger("addtwo",null,a)},_bindSecondRecommend:function(){var a=this,b=a.bd.find(".js_site-item").length;if(!(6>=b||b>=$.hao123.siteConfig.siteMaxlength)&&a.recommend2Text&&!a.model.checkFull()){var c=$.hao123.onecookie.get(a.recommend2key);c&&3<=c||(a.recommendData.shift(),0>=a.recommendData.length&&a.addCount.hide(),a.addCount.html(a.recommendData.length),$("#layout-famoussite").append(a.recommend2Js),a.recommend2Js.width(a.recommend2Link.width()+100),(0==b%6||5==b%6)&&$(window).width()<965+
2*a.recommend2Js.width()?a.recommend2Js.remove():(a._trigger("recommend2show"),c=b=0,c=a.bd.find(".js_item-add").offset(),b=c.left+a.bd.find(".js_item-add").width()+8,c=c.top-4,a.recommend2Js.offset({left:b,top:c}),a.recommend2Em.removeClass("left").removeClass("top"),a.recommend2Em.addClass("left"),a.recommend2.click(function(){0<$(".site-item-recommend",a.element).length?(a.view.onAddClickSynced(a.view.getTopRecommend()),a.model.addClickSync(a.view.getTopRecommend()),a.topRecommend.removeClass("site-item-recommend")):
a._addSecondRecommend();a.recommend2Js.remove();a._trigger("recommend2click");return!1}),a.recommend2.find("i").click(function(){a.recommend2Js.fadeOut();var b=$.hao123.onecookie.get(a.recommend2key);void 0===b&&(b=0);b++;$.hao123.onecookie.set(a.recommend2key,b);a._trigger("recommend2delete");return!1}),6==$.hao123.browser.ie&&a.recommend2.find("i").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")})))}},_bindTopRecommend:function(){var a=this;a.topRecommendDelete.click(function(){a.topRecommend.remove();
a.topRecommendHint.hide();var b=$(".js_item-add",a.element);b.hasClass("site-item-add-short")&&b.removeClass("site-item-add-short").addClass("site-item-add-normal").append('<span class="site-item-add-text">\u6dfb\u52a0\u7f51\u5740</span>');a.model.delRecombyid(a.topRecommend.attr("data-id"));a.topRecommend.length=0;a._trigger("deletesync");b=a.recommend2Js.offset();a.recommend2Js.offset({left:b.left-12,top:b.top})});a.topRecommendLink.attr("target","_blank");a.topRecommendLink.click(function(){a.view.onAddClickSynced(a.view.getTopRecommend());
a.model.addClickSync(a.view.getTopRecommend());a.isAddingClickSync=!0;a.topRecommend.removeClass("site-item-recommend")});var b,c;a.topRecommend.mouseenter(function(){window.clearTimeout(c);b=window.setTimeout(function(){a.topRecommendHint.show()},300)});a.topRecommend.mouseleave(function(){window.clearTimeout(b);c=window.setTimeout(function(){a.topRecommendHint.hide()},300)});a.topRecommendHint.mouseover(function(){window.clearTimeout(c)});a.topRecommendHint.mouseout(function(){c=window.setTimeout(function(){a.topRecommendHint.hide()},
300)})},_bind:function(){function a(a){13==a.keyCode&&window.setTimeout(function(){"none"!=b.add.get(0).style.display?b.add.click():b.modify.click()},20)}var b=this;b._bindTopRecommend();b._bindSecondRecommend();$(document).bind("getprof",function(a,d){if(d&&d.urls)switch(result=d.urls,result.code){case 200:d=result.data.sites;b.view.onImported(d);b.model.init(d);break;default:b._trigger("error",null,{code:result.code+"getrof"})}});b.model.addEventListener("getUser",function(a){a.userName?b.login.otherSignin({userName:a.userName}):
b.retried<b.config.retry?(b.retried++,b._trigger("getusererror",null,b.retried+"_"+a.code),b.model.getUser()):(b.login.otherSignin({userName:""}),b.retried++,b._trigger("getusererror",null,b.retried+"_"+a.code))});b.model.addEventListener("operated",function(){$.hao123.setProfile("urls","true")});b.model.addEventListener("addtwoed",function(a){b.view.onSecondAdd(a)});b.model.addEventListener("addSynced",function(a){b.view.onManageClick(!0,!1);b.view.updatePopup(a);b.loading.hide();b.popContent.show();
b._trigger("addsync",null,a[a.length-1])});b.model.addEventListener("addClickSynced",function(a){b.isAddingClickSync||(b._addSecondRecommend(),b.isAddingClickSync=!1);b._trigger("addclicksync",null,a)});b.model.addEventListener("added",function(a){b.view.onAdded(a);b.model.checkIsShowSave()>=$.hao123.siteConfig.showSaveMax&&b.view.showSaveMessage();a.type?b._trigger(a.type,null,a):b._trigger("add",null,a)});b.model.addEventListener("refreshed",function(a){b.view.onRefreshed(a);a&&b._trigger("showrefresh")});
b.model.addEventListener("imported",function(a){b.view.onImported(a)});b.model.addEventListener("error",function(a){b._trigger("error",null,{code:a.code+a.src,info:a.info});b.view.showError(a.code)});b.refreshButton.click(function(){b.view.onRefreshClick(b.model.getData());b._trigger("refresh");return!1});b.login.addEventListener("signin",function(a){b.save.hide();b.saveForeverHint.hide();a.isInit?b._trigger("defaultlogin"):(b._trigger("login",null,{login:"login"}),b.recommend2Js.remove())});6==$.hao123.browser.ie&&
(this.bd.on("mouseover",".js_item-add",function(){$(this).addClass("site-item-add-hover")}),this.bd.on("mouseout",".js_item-add",function(){$(this).removeClass("site-item-add-hover")}));b.sugName.keydown(a);b.sugUrl.keydown(a);b.bd.on("click",".js_item-add",function(){b._trigger("intoaddclick");b._onManageClick()});b.bd.on("click",".js_no-data",function(){b._onManageClick();b._trigger("noneaddclick");return!1});b.manage.click(function(){b._onManageClick()});b.bd.delegate(".js_text","mousedown",function(){var a=
{};a.url=this.href;a.id=this.parentNode.getAttribute("data-id");a.status=this.parentNode.getAttribute("data-status");b._trigger("textclick",null,a)})},_onManageClick:function(){this.isManageClicked||(this.isManageClicked=!0,$("#popup-site").get(0).className="popup-site",this._initPopup());0<this.element.find(".site-item-recommend").length?(this.loading.show(),this.popContent.hide(),this._showPopup(),this.model.addSync(this.view.getTopRecommend())):(this.view.onManageClick(this.model.checkIsShowRecover(),
this.model.checkIsShowSave()),this.view.updatePopup(this.model.getData()),this.loading.hide(),this.popContent.show(),this._showPopup(),this._trigger("manageclick"),0>=$("#popup-site-holder .popup-site-recommend-sidenone").length&&this._trigger("managerecommend"))},_ajust:function(){$("#site").bind("sitebackclick siterecovered siterefresh siteshowrefresh sitelogin",function(){hao.ajust()})},_delete1:function(){$(function(){$("#site .js_text").each(function(a,b){if(null!==window.location.search.match(/[?&]tn=([^&<>'"]+)/)&&
"http://www.baidu.com/index.php?tn=10018801_hao"==b.getAttribute("href",2))return b.href="http://www.baidu.com/index.php?tn=10018802_hao",!1})})}});
(function(a){a.widget("hao123.navigate",{options:{hoverCls:"hoverCls",borderCls:"borderCls",profileKey:"navigate",objID:"box-navigate"},_create:function(){var b=this.element;this.$navigates=a(".js_tab li",b);this.$pics=a(".js_tab li i",b);this.$ie6pics=a(".js_tab li .ie6-icon",b);this.$tip=a(".js_tip",b);this.animation={};this._bindEvent()},_init:function(){"current"!=this.$navigates.eq(0).data("current")&&this.$tip.show();this.$navigates.each(function(){"current"==a(this).data("current")&&0!=a(this).data("index")&&
a(this).prev().css("borderRight","none").css("paddingRight","0").css("width","99")})},_bindEvent:function(){var b=this,c=b.options,d=function(){b.$navigates.each(function(d){a(this).hasClass(c.hoverCls)&&(a(this).removeClass(c.hoverCls),a(this).prev().hasClass(c.borderCls)&&a(this).prev().removeClass(c.borderCls));b.animation[d]=!1})};this.$navigates.hover(function(){d();"current"!=a(this).data("current")&&(a(this).addClass(c.hoverCls),0!=a(this).data("index")&&"current"!=a(this).prev().data("current")&&
a(this).prev().addClass(c.borderCls),b.animation[a(this).data("index")]=!0,b._animationLoop(a(this),b._isIE6()))},function(){d()});this.$tip.click(function(){a.hao123.setProfile(c.profileKey,0)});this.$navigates.click(function(){if("current"!=a(this).data("current"))return a.hao123.setProfile(c.profileKey,a(this).data("index")),xAjax.goURI(a(this).data("url"),[c.objID],!0),!1});a(document).bind("getprof",function(){b.$navigates.each(function(b,d){a(d).data("index")==currentProfile[c.profileKey]&&
xAjax.goURI(a(d).data("url"),[c.objID],!0)})})},_animationLoop:function(a,c){function d(){10==n||!h.animation[i]?c?f.css(k,-20):f.css(k,j+"px -20px"):(g=20*-n,c?f.css(k,g):f.css(k,j+"px "+g+"px"),n++,setTimeout(d,50))}var h=this,g=0,i=a.data("index"),j=20*-i,f=c?a.find(".ie6-icon"):a.find("i"),k=c?"margin-top":"background-position",n=1;d()},_isIE6:function(){return/msie (\d+\.\d+)/i.test(navigator.userAgent)&&6==parseInt(document.documentMode||+RegExp.$1)}})})(jQuery);
(function(){var a,b,c,d,h=0,g=0,i=0;hao.ajust=function(){a=a||$("#box-navigate");b=b||$("#layout-side");c=c||$("#box-service");d=d||$("#layout-content");a.css("height","auto");c.css("height","auto");coolsiteInitHeight=a.height();i=c.height();g=d.height();h=b.height();g<=h?a.height(h-g+coolsiteInitHeight):c.height(g-h+i)};var j={init:function(){this.Map={}},add:function(a){var b=$(a).find("img[imgsrc]");this.Map[a]=b;this.loadImgInview()},remove:function(){},loadImgInview:function(){var a=$(window).height(),
b=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,c=this.Map,d;for(d in c)$.each(c[d],function(c,d){var g=$(d),h=g.offset().top,i=g.height();b<h+i&&b+a>h&&!g.data("imgloaded")&&(g.attr("src",g.attr("imgsrc")),g.data("imgloaded",!0))})}};j.init();hao.imgLoader=j;$(window).scroll(function(){j.loadImgInview()});$(window).resize(function(){j.loadImgInview()});hao.navigate=function(){$("#navigate").navigate();setTimeout(function(){hao&&hao.ajust&&hao.ajust()},
100)}})();
(function(){var a;function b(){l=$("#box-coolsite li:first");m=$('<a href="###" class="recommend-icon" hidefocus="true"></a>');o=$("<ul class='recommend-list' monkey='coolRecommend'></ul>");q=$('<li class="recommend"></li>');p=$("<a class='recommend-close'></a>");r="<li><a href='#{url}'><img src='#{imgurl}'><a class='recommend-navright' href='#{url}'>#{title}</a></li>";o.click(function(){"a"==e.target.tagName.toLowerCase()&&g({type:"coolRecommendClick"})});l.click(function(a){"a"==a.target.tagName.toLowerCase()&&i.count()});
m.mouseover(function(){return!1});m.click(function(){n?(d(),g({type:"hide",src:1})):(c(),g({type:"show",src:1}));return!1});p.click(function(){d();g({type:"hide",src:0})});l.append(m);h();if(f.get(a)||i.getOk())c(),f.get(a)?g({type:"show",src:0}):g({type:"show",src:2})}function c(){q.animate({height:"toggle"},k,function(){hao.ajust()});f.set(a,1);n=!0}function d(){q.animate({height:"toggle"},k,function(){hao.ajust()});f.del(a);n=!1}function h(){for(var a=$.hao123.format,b=[],c=0;c<j.length;c++)b.push(a(r,
j[c]));q.append('<span class="recommend-arrow"></span>').append(o.append(b.join(""))).append(p).hide().insertAfter(l)}hao.coolRecommend="hao123-indexrec0"==window.pageId?b:function(){};var g=function(a){a.pageId=window.pageId;$.hao123.log.send(a)},i=function(){var a=$.hao123.onecookie,b;b=(b=a.get("f"))?b:0;return{getOk:function(){return 3<=b?(b=-1,a.set("f",-1),!0):!1},count:function(){-1!=b&&a.set("f",++b)}}}();a="e";var j=rec0;j.slice(0,5);var f=$.hao123.onecookie,k=600,n=!1,l,m,o,q,p,r})();
(function(){hao.coolsite=function(){$(".js_coolsitegroup").sitelinks();if("hao123-indexrec0"!=window.pageId){var a=$("#box-coolsite .coolsite-item"),b=function(){a.each(function(){$(this).removeClass("js_khover")})};a.hover(function(){b();$(this).addClass("js_khover")},function(){b()})}}})();
(function(a){a.widget("hao123.picmagic",{options:{timer:null,delay:5E3,curindex:1,flag:!0},_init:function(){var b=this;this.options.imgs=a(".widget-picmagic-item .wpi-img",this.element);this.options.titles=a(".widget-picmagic-item .wpi-title",this.element);this.options.hander=a(".widget-picmagic-hander span",this.element);this._start();this.options.hander.hover(function(){b.options.flag=!1;b.options.curindex=parseInt(a(this).text());b._change()},function(){b.options.flag=!0});this.options.imgs.hover(function(){b.options.flag=
!1},function(){b.options.flag=!0})},_change:function(){for(var b=this.options.imgs.length,c=0;c<b;c++)this.options.curindex==c+1?(a(this.options.hander[c]).addClass("hover"),a(this.options.imgs[c]).fadeIn(),a(this.options.titles[c]).show()):(a(this.options.hander[c]).removeClass("hover"),a(this.options.imgs[c]).fadeOut(),a(this.options.titles[c]).hide())},_autoPlay:function(){this.options.flag&&(this.options.curindex++,this.options.curindex>this.options.imgs.length&&(this.options.curindex=1),this._change())},
_start:function(){var a=this;hao=hao||{};hao.tapTimer=hao.tapTimer||[];1<=hao.tapTimer.length&&(clearInterval(hao.tapTimer[0]),hao.tapTimer=[]);hao.tapTimer.push(setInterval(function(){a._autoPlay()},this.options.delay))}})})(jQuery);(function(){hao.famoussite=function(){$(".js_famoussitegroup").sitelinks()}})();
(function(){hao.ipad=function(a){a&&!$.hao123.cookie.get("ipds1")&&($(".widget-ipad").show(),$("#js_ipadbtn").bind("click",function(){$.hao123.log.send({position:"ipad"})}),$("#js_ipadclose").bind("click",function(){$.hao123.cookie.set("ipds1","1");$(".widget-ipad").slideUp()}))}})();$.hao123.search=$.hao123.search||{};
$.hao123.search.config={common:{logoPath:"http://s1.hao123img.com/index/images/search_logo",delay:200,n:10},tab:{web:{alt:"\u767e\u5ea6\u9996\u9875",url:"http://www.baidu.com/index.php?tn=",action:"http://www.baidu.com/s",q:"word",params:{tn:"sitehao123",ie:"utf-8"},sug:{requestQuery:"wd",url:"http://suggestion.baidu.com/su",callbackFn:"baidu.sug",callbackDataKey:"s",charset:"gbk",requestParas:{sc:"hao123"}}},mp3:{alt:"\u767e\u5ea6\u97f3\u4e50",url:"http://music.baidu.com/",action:"http://music.baidu.com/search",
q:"key",params:{fr:"hao123",ie:"utf-8"},sug:{charset:"gbk",requestQuery:"wd",url:"http://nssug.baidu.com/su",callbackFn:"baidu.sug",callbackDataKey:"s",requestParas:{prod:"mp3",sc:"hao123"}}},video:{alt:"\u767e\u5ea6\u89c6\u9891\u641c\u7d22",url:"http://video.baidu.com/",action:"http://video.baidu.com/v",q:"word",params:{sc:"hao123",ie:"utf-8"},sug:{requestQuery:"wd",url:"http://nssug.baidu.com/su",callbackFn:"baidu.sug",callbackDataKey:"s",charset:"gbk",requestParas:{prod:"video",sc:"hao123"}}},
image:{alt:"\u767e\u5ea6\u56fe\u7247",url:"http://image.baidu.com/",action:"http://image.baidu.com/i",q:"word",params:{tn:"baiduimage",ct:"201326592",cl:"2",lm:"-1",ie:"utf-8",fm:"hao123"},sug:{requestQuery:"wd",url:"http://nssug.baidu.com/su",callbackFn:"baidu.sug",callbackDataKey:"s",charset:"gbk",requestParas:{prod:"image",sc:"hao123"}}},tieba:{alt:"\u767e\u5ea6\u8d34\u5427",url:"http://tieba.baidu.com/",action:"http://tieba.baidu.com/f",q:"kw",params:{ie:"utf-8",sc:"hao123"},sug:{requestQuery:"query",
url:"http://tieba.baidu.com/sug",callbackFn:"baiduSugTieba",callbackDataKey:"msg",charset:"gbk",requestParas:{callback:"baiduSugTieba",sc:"hao123"}}},zhidao:{alt:"\u767e\u5ea6\u77e5\u9053",url:"http://zhidao.baidu.com/",action:"http://zhidao.baidu.com/q",q:"word",params:{tn:"ikaslist",ct:"17",ie:"utf-8",sc:"hao123",rn:"20"},sug:{requestQuery:"wd",url:"http://nssug.baidu.com/su",callbackFn:"baidu.sug",callbackDataKey:"s",charset:"gbk",requestParas:{prod:"zhidao",sc:"hao123"}}},news:{alt:"\u767e\u5ea6\u65b0\u95fb\u641c\u7d22",
url:"http://news.baidu.com/",action:"http://news.baidu.com/ns",q:"word",params:{tn:"news",ie:"utf-8",from:"hao123",sr:0,cl:2,rn:20,ct:1,prevct:"no"},sug:{requestQuery:"wd",url:"http://nssug.baidu.com/su",callbackFn:"baidu.sug",callbackDataKey:"s",charset:"gbk",requestParas:{prod:"news",sc:"hao123"}}},map:{alt:"\u767e\u5ea6\u5730\u56fe\u641c\u7d22",url:"http://map.baidu.com/",action:"http://map.baidu.com/m",q:"word",params:{c:1,ie:"utf-8",sc:"hao123"},sug:{requestQuery:"wd",url:"http://map.baidu.com/su",
callbackFn:"baidu.sug",callbackDataKey:"s",charset:"utf-8",requestParas:{cid:1,type:0,newmap:1,sc:"hao123",callback:"baidu.sug"},templ:function(a,b){for(var a=a.s||[],c=0,d=Math.min(a.length,10),h=[],g,i;c<d;c++)if(g=a[c])g=g.split("$"),i=g[0]+g[1],g=g[2]||""+g[3]||"",g||(g=a[c].split("$"),g=g[3]?g[1]:g[0]+g[1],i=!g[3]||0!=g[3]?"":g[0]),g||(g=a[c].split("$"),g=g[3]||"",i=g[0]+g[1]),h.push('<li q="'+g+'"'+(-1<g.indexOf(b)?"":" class=sug-querynull")+">"+g.replace(b,'<span class="sug-query">'+b+"</span>")+
'<span class="sug-sub">'+i+"</span></li>");return"<ol>"+h.join("")+"</ol>"}}}},moreConf:{wenku:{name:"\u6587 \u5e93",url:"http://wenku.baidu.com"},baike:{name:"\u767e \u79d1",url:"http://baike.baidu.com"},jingyan:{name:"\u7ecf \u9a8c",url:"http://jingyan.baidu.com"},hi:{name:"\u7a7a \u95f4",url:"http://hi.baidu.com"},top:{name:"\u98ce\u4e91\u699c",url:"http://top.baidu.com"},dict:{name:"\u8bcd \u5178",url:"http://dict.baidu.com"},s:{name:"\u56e2 \u8d2d",url:"http://tuan.baidu.com"},xiangce:{name:"\u76f8 \u518c",
url:"http://xiangce.baidu.com"}}};
$.widget("hao123.search",{options:{defaultTab:"web",curClass:"cur",parameterTpl:'<input type="hidden" name="#{name}" value="#{value}" />',host:window.location.host,config:$.hao123.search.config},_create:function(){var a=this.element,b=this;b.logoLink=$(".js_logo-href",a);b.logoImg=$(".js_logo-img",a);b.tabs=$(".js_tab a",a);b.word=$(".js_word",a);b.btn=$(".js_btn",a);b.btnWrap=$(".js_btnwraper",a);b.parameter=$(".js_p",a);b.form=$(".js_form",a);b.more=$(".js_more",a);b.moreLink=$(".js_morelink",a);
b.wrapWord=$(".box-search_input",a);b.tabConfig=b.options.config.tab;b.commonConfig=b.options.config.common;b.tn=b._getTNAdapter();b._bind();b.sug=G.sug(b.word.get(0),{classNameQuery:"sug-query",classNameQueryNull:"sug-querynull",requestQuery:"wd",charset:"gbk",delay:100,url:"http://suggestion.baidu.com/su",callbackFn:"baidu.sug",callbackDataKey:"s",requestParas:{sc:"hao123"},onMouseSelect:function(){b._trigger("mouseselect",null,{position:b.getCurTab(),title:b.getWord(),sug:1,pageId:window.pageId,
type:"submit"})},onSelect:function(a,d,h){a=b.getCurTab();0<=this.i?(b.tabConfig[a].params.f=3,b.tabConfig[a].params.rsp=this.i,b.sug.o.sugId&&(b.tabConfig[a].params.rsv_sug5=b.sug.o.sugId),this.i=-1,$("#js_sug-form1 .js_hn-box").removeClass("hn-box-hover")):(delete b.tabConfig[a].params.f,delete b.tabConfig[a].params.rsp,delete b.tabConfig[a].params.rsv_sug5);b._makePrameters(a);"fromEnter"!=h&&b._trigger("submit")}});null!=b.tn&&(b.tabConfig.web.params.tn=b.tn,"web"==b.options.defaultTab&&b._switchTab("web"));
b.word.get(0).focus();b.wrapWord.bind("click",function(){b.word.get(0).focus()})},_getTNOld:function(){var a=window.location.search.match(/[?&]tn=([^&<>'"]+)/);return a?a[1]:null},_getTNAdapter:function(){window.haoConfig=window.haoConfig||{};window.haoConfig.config=window.haoConfig.config||{};return haoConfig.config.tn?this._getTNOld():this._getTN()},_getTN:function(){var a=document.URL,b=window.location.search,c=null;if(c=b.match(/[?&]src=([^&<>'"]+)/i))switch(c=c[1],c){case "skycn_zuoce":return"10018401_hao";
case "happynewyear123":return"10018202_hao";case "newyear":return"10018201_hao";case "xunlei10":return"10003804_hao"}if(c=b.match(/[?&]src=(jife[^&<>'"]+)/i))switch(c=c[1],c){case "jifen":return"10018701_hao";case "jifen2":return"10018702_hao";case "jifen3":return"10018703_hao"}if(c=b.match(/[?&]src=(se_[^&<>'"]+)/i))return c[1];if(/[?&]src=sina(&|$)/.test(b))return"10000401_hao";if(c=b.match(/[?&]tn=([^&<>'"]+)/))return c[1];c=b.match(/[?&]src=([^&<>'"]+)/);null===c&&(c=[],0<=a.indexOf("www.hao123.com/index.html")?
c[1]="srcindex":0<=a.indexOf("www.hao123.com/index.htm")?c[1]="srcieak":0<=a.indexOf("www.hao123.com/?vit=fws")&&(c[1]="srcvit"));if(1<c.length){if(/^.+_hao$/.test(c[1]))return c[1];if(!/^360fixwiz$|^baidu$|^desk$/.test(c[1]))return c[1]+"_hao"}return"sitehao123"},getCurTab:function(){return this.tabs.filter("."+this.options.curClass).attr("data-t")},getSug:function(){return this.sug},getWord:function(){return this.word.val()},_makePrameters:function(a){var b=[],a=this.tabConfig[a].params,c;for(c in a)b.push($.hao123.format(this.options.parameterTpl,
{name:c,value:a[c]}));this.parameter.html(b.join(""))},_bind:function(){var a=this;this.tabs.click(function(){a._switchTab($(this).attr("data-t"));a.word.get(0).focus();a.word.val(a.word.val());a.moreLink.hide();return!1});this.word.keydown(function(b){13==b.keyCode&&a._trigger("wordkeydown",null,{position:a.getCurTab(),title:a.getWord(),type:"submit",pageId:window.pageId})});this.btn.mousedown(function(){a.btnWrap.addClass("box-search_btn_click");a._trigger("btnclick",null,{position:a.getCurTab(),
title:a.getWord(),type:"submit",pageId:window.pageId,btnclick:1});var b=a.getCurTab();delete a.tabConfig[b].params.rsp;delete a.tabConfig[b].params.f;a._makePrameters(b)}).mouseup(function(){a.btnWrap.removeClass("box-search_btn_click")}).mouseout(function(){a.btnWrap.removeClass("box-search_btn_click")});this.more.click(function(){a.moreLink.toggle();a._trigger("moreclick");return!1});$(document).click(function(){a.moreLink.hide()});this.form.submit(function(){var b=a.getCurTab();a._trigger("submit");
"web"==b&&(a.sug.o.sugId?a.tabConfig[b].params.rsv_sug5=a.sug.o.sugId:delete a.tabConfig[b].params.rsv_sug5,a._makePrameters(b),delete a.sug.o.sugId);if(!("tieba"!=b&&"mp3"!=b&&"zhidao"!=b)){var c=a.word.val(),c=c.replace(/[\u3000]/g,""),c=c.replace(/[ ]/g,"");""==c?a.form.attr("action",a.tabConfig[b].url):a.form.attr("action",a.tabConfig[b].action)}})},_switchTab:function(a){this.tabs.removeClass(this.options.curClass).filter('[data-t="'+a+'"]').addClass(this.options.curClass);var b=this.tabConfig[a].url;
this._trigger("switchtab",null,a);"web"==a&&(b=this.tn?b+this.tn:b+"sitehao123");this.logoLink.attr("href",b);this.logoLink.attr("title",this.tabConfig[a].alt);"mp3"==a?this.logoImg.attr("src",this.commonConfig.logoPath+"/yinyue.png"):this.logoImg.attr("src",this.commonConfig.logoPath+"/"+a+".png");this.logoImg.attr("alt",this.tabConfig[a].alt);this._makePrameters(a);this.form.attr("action",this.tabConfig[a].action);b=this.tabConfig[a].sug;this.word.get(0).name=this.tabConfig[a].q;b.templ=b.templ||
!1;b.charset=b.charset;this.sug.reset(this.tabConfig[a].sug)}});
(function(){var a=function(a,c){var d=$("#js_sug-form1 .sug-wrap li"),h=$("#js_sug-form1 .sug-wrap");$(d[0]).attr("action")&&$(d[0]).hasClass("sug-select")&&"none"!=h.css("display")?$.hao123.sugFirstItem=1:($.hao123.sugFirstItem=0,c&&$(d[0]).attr("action")&&$(d[0]).hasClass("sug-select")&&($.hao123.sugFirstItem=1));$.hao123.sugFlag&&(a.exsug=1);$.hao123.sugFirstItem&&(a.exfirst=1);$.hao123.log.send(a);$.hao123.sugFirstItem=0;$.hao123.sugFlag=0};$.hao123.searchInit=function(){$("#search").search().bind("searchmouseselect",
function(b,c){a(c,1)}).bind("searchbtnclick",function(b,c){a(c)}).bind("searchwordkeydown",function(b,c){a(c)})};$(function(){function a(){$("#js_sug-form1 .sug-wrap").hide();i.removeClass(q);window.isShow1=!1}function c(){var a=$("#js_sug-form1 .sug-wrap");a.html(g());m&&($("#js_hotsug_checkbox").get(0).checked=v.get(x)?!0:!1);a.show();i.addClass(q);window.isShow1=!0}function d(){n.addClass("input_blur");n.blur();var a=n.val();n.focus(function(){n.hasClass("input_blur")&&(a="",n.val(""),n.removeClass("input_blur"))});
n.blur(function(){""==n.val()&&(n.val(a),n.addClass("input_blur"))})}function h(){i.removeClass(q);D=2;window.isShow1=!1}function g(){for(var a=[],b=0;b<f.length;b++)a.push($.hao123.format(p,{word:f[b].word,"new":1==f[b].isnew?r:"",cls:3>=b+1?"orange":"dark",index:b+1}));return'<ol class="hot-news">'+a.join("")+"</ol>"+u}var i=$("#js_sug-form1 .js_hn-box"),j=$("#js_sug-form1 .js_hn-tip"),f=[],k=0,n=$("#js_sug-form1 .js_word"),l=$("#js_sug-form1"),m="hao123-indexsuga"==window.pageId?!0:!1,o=0>window.location.search.toLowerCase().indexOf("tn=00082064_6_hao_pg")?
!1:!0,q="hn-box-hover",p='<li q="#{word}" class="sug-querynull"><span class="#{cls}">#{index}</span><span class="word">#{word}</span>#{new}</li>',r='<span class="new">\u65b0!</span>';window.isShow1=!1;var u=m?'<div class="hn-news"></div><div class="hn-copyright"><label hidefocus="true" for="js_hotsug_checkbox"><input  id="js_hotsug_checkbox" type="checkbox">\u4e0d\u518d\u81ea\u52a8\u663e\u793a</label></div>':'<div class="hn-news"></div><div id="sugctr" class="hn-copyright">\u7531\u767e\u5ea6\u641c\u7d22<a href="http://top.baidu.com/">\u98ce\u4e91\u699c</a>\u63d0\u4f9b</div>',
v=$.hao123.onecookie,x="y",C=!0,D=2;$("#search").bind("searchswitchtab",function(c,d){"web"!=d?(C=!1,a(),i.hide()):(C=!0,i.show())});$("#search").bind("searchsubmit",function(){$.hao123.log.send({type:"clicksug",flag:"1",src:D,pageId:window.pageId})});$("#search").bind("searchmoreclick",function(){a()});$(document).click(function(){a()});$("#search").on("click",".hn-copyright",function(){$("#js_hotsug_checkbox").get(0).checked?(v.set(x,1),$.hao123.log.send({type:"checkbox"})):v.del(x)});$("#search").on("click",
".hn-copyright",function(a){a.stopPropagation()});$("#search").on("mousedown",".hn-copyright",function(a){a.stopPropagation()});$.getJSON("/sugdata.js",{r:(new Date).getTime()},function(d){for(var g=0;10>g;g++)f.push(d.data[g+1]),1==d.data[g+1].isnew&&k++;0<f.length&&(i.show(),0<k&&"null"==$.hao123.cookie("index_searchhint")&&j.show().find("span").html(k),i.click(function(){i.hasClass(q)?a():(c(),D=1,$.hao123.log.send({sugposition:1,pageId:window.pageId}));j.hide();$.hao123.cookie("index_searchhint",
1,{expires:1});return!1}),l.submit(h),n.keydown(h),m&&n.click(function(){if(!C||v.get(x)||""!=$.trim(n.val())&&!o)return!1;D=0;$.hao123.log.send({sugposition:0,pageId:window.pageId});i.hasClass(q)?a():c();return!1}))});o&&$.getJSON("/sugcmsdata.js",{r:(new Date).getTime()},function(a){var b=a.length,b=parseInt(Math.random()*b);a&&a[b]&&(n.val(a[b]),d())})})})();
(function(a,b){function c(a,b){var c,d;d=!1;c=g.imgs[a];c||(d=new Image,d.onload=function(){var a,b;c.state=k;b=c.callbacks;for(a=b.length;a--;)b[a].call(window);c.callbacks=null;c.image=null},d.onerror=function(){c.state=n;c.callbacks=null;c.image=null},c={state:f,image:d,callbacks:[]},g.imgs[a]=c);switch(c.state){case f:c.callbacks.push(b);break;case k:b()}d&&(d.src=a)}function d(b,d){var f=d||b.src;c(f,function(){b.src=i;b.style.filter=a.hao123.format(j,{src:f})})}function h(){var a=/msie (\d+\.\d+)/i.test(navigator.userAgent)?
+RegExp.$1:void 0;h=function(){return 6==a};return h()}function g(a){h()&&this.each(function(){d(this,a)});return this}var i="http://s0.hao123img.com/img/1L/Aw/2F/mk/ch/o/blank.gif",j='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="#{src}",sizingMethod="scale")',f=1,k=2,n=3;g.imgs={};a.fn[b]=g})(jQuery,"fixpng");
(function(a,b){var c=["info-err","info-msg"];a.widget("hao123.weather",{options:{forecastUrl:"http://app.hao123.com/weather/forecast2.php?callback=?",areaUrl:"http://app.hao123.com/weather/citymenu.php?callback=?",newForecastUrl:"/api/forecast?callback=?",newAreaUrl:"/api/citymenu?callback=?",loadingTpl:"",errorTpl:'\u5929\u6c14\u6570\u636e\u672a\u627e\u5230\uff0c\u8bf7<a href="#" class="js_reset">\u91cd\u8bbe\u5730\u5740</a>',timeoutTpl:'\u52a0\u8f7d\u8d85\u65f6\uff0c\u8bf7<a href="#" class="js_retry">\u91cd\u8bd5</a>',
selectTpl:"<option value=#{id|e}>#{firstchar|e} #{name|e}</option>",selectEmptyTpl:"<option>\u52a0\u8f7d\u4e2d...</option>",timeout:5E3,province:b,city:b,district:b,sample:0},_create:function(){var b=this.element;this.options.forecastUrl=this.options.newForecastUrl;this.options.areaUrl=this.options.newAreaUrl;this.options.sample=1;this.areaMap={};this.$info=a(".js_info",b);this.$view=a(".js_view",b);this.$control=a(".js_control",b);this.$edit=a(".js_modify",this.$view);this.$detail=a(".js_detail",
this.$view);this.$today=a(".js_today",this.$view).weathericon();this.$tommrrow=a(".js_tomorrow",this.$view).weathericon();this.$tip=a(".js_tip",this.$view);this.$provinceSelect=a(".js_province",this.$control);this.$citySelect=a(".js_city",this.$control);this.$districtSelect=a(".js_district",this.$control);this.$saveBtn=a(".js_save",this.$control);this.$cancleBtn=a(".js_cancle",this.$control);this._bindEvent()},_init:function(){var a=this.options;this.load(a.province,a.city,a.district)},destroy:function(){a.Widget.prototype.destroy.call(this)},
_bindEvent:function(){var c=this,h=c.options;c.element.bind("weatherbeforload",function(){c._info(h.loadingTpl)}).bind("weatherafterload",function(b,i){var j=c._parseData(i);j?(c._setOption("province",j.province),c._setOption("city",j.city),c._setOption("district",j.district),c._render(j),c._switchView(1)):c._info(h.errorTpl,0,!0,function(){a(".js_reset",c.$info).click(function(a){c._trigger("selectchange",a);c._switchView(2);return!1})})}).bind("weathertimeout",function(b,i){c._info(h.timeoutTpl,
0,!0,function(){a(".js_retry",c.$info).click(function(){c.load(i.province,i.city,i.district);return!1})})}).bind("weatherselectchange",function(a,h){h.province===b?c._loadProvince():h.city===b?c._loadCity(h.province):h.district===b&&c._loadDistrict(h.province,h.city)});c.$edit.click(function(){var a={};c._loadSelect(c.$provinceSelect,a,h.province);a.province=h.province;c._loadSelect(c.$citySelect,a,h.city);a.city=h.city;c._loadSelect(c.$districtSelect,a,h.district);c._switchView(2);return!1});c.$saveBtn.click(function(){var a=
c._getSelect();c.load(a.province,a.city,a.district)});c.$cancleBtn.click(function(){c._switchView(1);return!1});c.$provinceSelect.change(function(a){c._trigger("selectchange",a,{province:c.$provinceSelect.val()})});c.$citySelect.change(function(a){c._trigger("selectchange",a,{province:c.$provinceSelect.val(),city:c.$citySelect.val()})})},_switchView:function(b){a.each([this.$info,this.$view,this.$control],function(a,c){a==b?c.show():c.hide()})},_info:function(b,h,g,i){var j,h=parseInt(h,10);j=c[h]||
c[1];this.$info.removeClass(c.join(" ")).addClass(j);g?this.$info.html(b):this.$info.text(b);a.isFunction(i)&&i();this._switchView(0);try{0==h&&a.hao123.log.send({type:"weather",sample:this.options.sample,errorType:b==this.options.timeoutTpl?"timeout":"error"})}catch(f){}},_getAreaName:function(c,h,g){var i=this.areaMap,j,f,k,n;switch(arguments.length){case 0:return b;case 1:j=this._genAreaId();f=c;break;case 2:j=this._genAreaId(c);f=h;break;default:j=this._genAreaId(c,h),f=g}k=!1;i[j]!==b&&a.each(i[j],
function(a,b){b.id==f&&(n=b.name,k=!0);return!k});return k?n:b},load:function(c,h,g){var i=this,j=i.options,f=j.forecastUrl,k,n,l;i._trigger("beforload");k=c!==b&&h!==b&&g!==b?{t:2,provice:i._getAreaName(c),city:i._getAreaName(c,h),district:i._getAreaName(c,h,g)}:{t:1};n=!1;a.getJSON(f,k,function(a){clearTimeout(l);n||i._trigger("afterload",null,a)});l=setTimeout(function(){n=!0;i._trigger("timeout",null,{provice:c,city:h,district:g})},j.timeout)},_parseData:function(b){var c;if(!b||!b.Name||!(b.forecast&&
1<b.forecast.length))return!1;c={province:b.pid,city:b.cid,district:b.zid,name:b.Name,url:b.Link_1,forecast:[],pm:b.pm};a.each(["\u4eca\u5929","\u660e\u5929"],function(a,i){c.forecast[a]={weather:b.forecast[a].Weather,temperaMin:b.forecast[a].Tmin,temperaMax:b.forecast[a].Tmax,url:b.URL,day:i}});return c},_render:function(b){var c=this,g,i,j="";c.$edit.text(b.name);c.$detail.attr("href","http://www.hao123.com/tianqi");c.$today.weathericon("render",b.forecast[0]);c.$tommrrow.weathericon("render",b.forecast[1]);
g=b.forecast[0].weather;i=g.indexOf("\u8f6c");0<i&&(g=g.substring(0,i));/(\u4e2d|\u5927|\u66b4)\u96e8/.test(g)&&(j="\u4eca\u5929\u6709\u96e8\uff0c\u8bb0\u5f97\u5e26\u4f1e");/(\u5c0f|\u4e2d|\u5927|\u66b4|\u9635)\u96ea/.test(g)&&(j="\u4eca\u5929\u6709\u96ea \uff0c\u5c0f\u5fc3\u8def\u6ed1");/\u973e/.test(g)&&(j="\u96fe\u973e\u5929\u6c14\uff0c\u6ce8\u610f\u9632\u62a4");/\u6c99/.test(g)&&(j="\u6c99\u5c18\u5929\u6c14\uff0c\u51cf\u5c11\u51fa\u884c");/\u96fe/.test(g)&&(j="\u4eca\u5929\u6709\u96fe\uff0c\u5c0f\u5fc3\u6162\u884c");
j?(new Date).getDate()!=a.hao123.onecookie.get("c")&&c.$tip.addClass("weather-tip-bg").show().find(".weather-tip-text").text(j):c.$tip.hide();c.$tip.find(".weather-tip-close").click(function(){c.$tip.hide();a.hao123.onecookie.set("c",(new Date).getDate());return!1});j=i=g="";a("#userbar-pm").hide();if(b.pm&&b.pm.level){g=3>b.pm.levelnum?"\u7a7a\u6c14\u8d28\u91cf:":"\u7a7a\u6c14\u6c61\u67d3:";switch(parseInt(b.pm.levelnum)){case 1:i="\u4f18";j="good";break;case 2:i="\u826f";j="ok";break;case 3:i="\u8f7b\u5ea6";
j="low";break;case 4:i="\u4e2d\u5ea6";j="mid";break;case 5:i="\u91cd\u5ea6";j="high";break;case 6:i="\u4e25\u91cd";j="high";break;default:i=""}i&&a("#userbar-pm").find("a").html(g+i).attr({"class":"linkHover "+j,href:"http://www.hao123.com/tianqi#airConditions"}).end().show()}},_loadProvince:function(a){var b=this,c=b.$provinceSelect;b._loadSelect(c,{},a,function(){b._trigger("selectchange",null,{province:c.val()})})},_loadCity:function(a,b){var c=this,i=c.$citySelect;c._loadSelect(i,{province:a},
b,function(){c._trigger("selectchange",null,{province:a,city:i.val()})})},_loadDistrict:function(a,b,c){var i=this,j=i.$districtSelect;i._loadSelect(j,{province:a,city:b},c,function(){i._trigger("selectchange",null,{province:a,city:b,district:j.val()})})},_loadSelect:function(c,h,g,i){var j=this.options;this._loadArea(h.province,h.city,function(f){var h=[];a.each(f,function(b,c){h.push(a.hao123.format(j.selectTpl,c))});c.html(h.join(""));g!==b&&setTimeout(function(){c.val(g)},0);a.isFunction(i)&&
i()})},_genAreaId:function(a,c){var g=["ROOT"];a!==b&&(g.push(a),c!==b&&g.push(c));return g.join()},_loadArea:function(c,h,g){var i=this.options,j=this.areaMap,f={},k=this._genAreaId(c,h);j[k]!==b?g(j[k]):(c!==b&&(f.pid=c,h!==b&&(f.cid=h)),a.getJSON(i.areaUrl,f,function(a){a&&(j[k]=a);g(a)}))},_getSelect:function(){return{province:this.$provinceSelect.val(),city:this.$citySelect.val(),district:this.$districtSelect.val()}}});a.widget("hao123.weathericon",{options:{tpl:'<a href="http://www.hao123.com/tianqi" title="#{desc|e}"><img class="js_img" width="48" height="48" src="#{icon|e}"/><p class="name">#{day}</p><p>#{temp|e}</p></a>',
iconTpl:"http://s0.hao123img.com/index/images/weather/icon/#{id}.png",defaultIcon:"a0",iconMap:{"\u6674":"a0","\u591a\u4e91":"a1","\u9634":"a2","\u9635\u96e8":"a3","\u96f7\u9635\u96e8":"a4","\u96f7\u9635\u96e8\u4f34\u6709\u51b0\u96f9":"a5","\u96e8\u5939\u96ea":"a6","\u5c0f\u96e8":"a7","\u4e2d\u96e8":"a8","\u5927\u96e8":"a9","\u66b4\u96e8":"a10","\u5927\u66b4\u96e8":"a11","\u7279\u5927\u66b4\u96e8":"a12","\u9635\u96ea":"a13","\u5c0f\u96ea":"a14","\u4e2d\u96ea":"a15","\u5927\u96ea":"a16","\u66b4\u96ea":"a17",
"\u96fe":"a18","\u51bb\u96e8":"a19","\u6c99\u5c18\u66b4":"a20","\u5c0f\u96e8-\u4e2d\u96e8":"a21","\u5c0f\u5230\u4e2d\u96e8":"a21","\u4e2d\u96e8-\u5927\u96e8":"a22","\u4e2d\u5230\u5927\u96e8":"a22","\u5927\u96e8-\u66b4\u96e8":"a23","\u5927\u5230\u66b4\u96e8":"a23","\u66b4\u96e8-\u5927\u66b4\u96e8":"a24","\u66b4\u96e8\u5230\u5927\u66b4\u96e8":"a24","\u5927\u66b4\u96e8-\u7279\u5927\u66b4\u96e8":"a25","\u5927\u66b4\u96e8\u5230\u7279\u5927\u66b4\u96e8":"a25","\u5c0f\u96ea-\u4e2d\u96ea":"a26","\u5c0f\u5230\u4e2d\u96ea":"a26",
"\u4e2d\u96ea-\u5927\u96ea":"a27","\u4e2d\u5230\u5927\u96ea":"a27","\u5927\u96ea-\u66b4\u96ea":"a28","\u5927\u5230\u66b4\u96ea":"a28","\u6d6e\u5c18":"a29","\u626c\u6c99":"a30","\u5f3a\u6c99\u5c18\u66b4":"a31"}},render:function(b){var c=this.options,g=this._getWeather(b.weather),i=this._getIcon(g),j=this._getTempera(b.temperaMin,b.temperaMax);this.element.html(a.hao123.format(c.tpl,{day:b.day,url:b.url,desc:g,icon:i,temp:j}));a(".js_img",this.element).fixpng()},_getIcon:function(b){var c=this.options;
return a.hao123.format(c.iconTpl,{id:c.iconMap[b]||c.defaultIcon})},_getTempera:function(b,c){b=a.trim(b);c=a.trim(c);return b==c?b+"\u2103":c+" ~ "+b+"\u2103"},_getWeather:function(a){var b=a.indexOf("\u8f6c");0<b&&(a=a.substring(0,b));return a}})})(jQuery);
(function(){$.widget("hao123.mail",{options:{isShow:!1,top:null,left:null,offsetX:0,offsetY:0,selectListId:"",selectListCls:"mail-list",optionHoverCls:"option-hover",selectMouseDownCls:"mouse-down",mails:[{mail:"163",name:"@163.com",action:"http://reg.163.com/CheckUser.jsp",params:{url:"http://entry.mail.163.com/coremail/fcg/ntesdoor2?lightweight=1&verifycookie=1&language=-1&style=15",username:"#{u|e}",password:"#{p|e}"}},{mail:"126",name:"@126.com",action:"https://reg.163.com/logins.jsp",params:{domain:"126.com",
username:"#{u|e}@126.com",password:"#{p|e}",url:"http://entry.mail.126.com/cgi/ntesdoor?lightweight%3D1%26verifycookie%3D1%26language%3D0%26style%3D-1"}},{mail:"sina",name:"@sina.com",action:"https://login.sina.com.cn/sso/login.php",params:{username:"#{u|e}@sina.com",password:"#{p|e}",entry:"freemail",gateway:0,encoding:"UTF-8",url:"http://mail.sina.com.cn/",returntype:"META"}},{mail:"yahoocomcn",name:"@yahoo.com.cn",action:"https://edit.bjs.yahoo.com/config/login",params:{login:"#{u|e}@yahoo.com.cn",
passwd:"#{p|e}",domainss:"yahoo",".intl":"cn",".src":"ym"}},{mail:"yahoocn",name:"@yahoo.cn",action:"https://edit.bjs.yahoo.com/config/login",params:{login:"#{u|e}@yahoo.cn",passwd:"#{p|e}",domainss:"yahoocn",".intl":"cn",".done":"http://mail.cn.yahoo.com/inset.html"}},{mail:"sohu",name:"@sohu.com",action:"http://passport.sohu.com/login.jsp",params:{loginid:"#{u|e}@sohu.com",passwd:"#{p|e}",fl:"1",vr:"1|1",appid:"1113",ru:"http://login.mail.sohu.com/servlet/LoginServlet",ct:"1173080990",sg:"5082635c77272088ae7241ccdf7cf062"}},
{mail:"yeah",name:"@yeah.net",action:"https://reg.163.com/logins.jsp",params:{domain:"yeah.net",username:"#{u|e}@yeah.net",password:"#{p|e}",url:"http://entry.mail.yeah.net/cgi/ntesdoor?lightweight%3D1%26verifycookie%3D1%26style%3D-1"}},{mail:"139",name:"@139.com",action:"https://mail.10086.cn/Login/Login.ashx",params:{UserName:"#{u|e}",Password:"#{p|e}",clientid:"5015"}},{mail:"21cn",name:"@21cn.com",action:"http://passport.21cn.com/maillogin.jsp",params:{UserName:"#{u|e}@21cn.com",passwd:"#{p|e}",
domainname:"21cn.com"}},{mail:"renren",name:"\u4eba\u4eba\u7f51",action:"http://passport.renren.com/PLogin.do",params:{email:"#{u|e}",password:"#{p|e}",origURL:"http://www.renren.com/Home.do",domain:"renren.com"}}],links:[{name:"\u652f\u4ed8\u5b9d",url:"https://www.alipay.com/user/login.htm"},{name:"\u767b\u5f55\u767e\u5ea6",url:"https://passport.baidu.com/v2/?login"},{name:"@qq.com",url:"http://mail.qq.com"},{name:"QQ\u7a7a\u95f4",url:"http://qzone.qq.com/index.html"},{name:"\u65b0\u6d6a\u5fae\u535a",
url:"http://weibo.com/login.php"},{name:"@gmail.com",url:"http://mail.google.com/mail/"},{name:"@hotmail.com",url:"http://www.hotmail.com"},{name:"\u5f00\u5fc3\u7f51",url:"http://www.kaixin001.com"}]},_create:function(){this.render();this.initEmail();this.bind();-1<window.navigator.userAgent.toLowerCase().indexOf("se")&&this.repairSogouBrower()},initEmail:function(){var a=$.hao123.cookie.get("HAOMAILSV");this.userEl.val($.hao123.cookie.get("HAOMAILUN")||"");this.pwdEl.val("");for(var b=this.options.mails.length,
c=0;c<b;c++)if(this.options.mails[c].mail==a){this.formEl.attr("action",this.options.mails[c].action);var d=this.options.mails[c].name,d=9<d.length?d.substr(0,9)+"...":d;this.selectLabelEl.text(d);this.optionBoxEl.attr("selectindex",c)}this.initMsgTip()},initMsgTip:function(){""==this.pwdEl.val()?this.pwdEl.next(".wm-tip").show():this.pwdEl.next(".wm-tip").hide();""==this.userEl.val()?this.userEl.next(".wm-tip").show():this.userEl.next(".wm-tip").hide()},destroy:function(){this.optionBoxEl.remove();
this.unBindWindow();this.unBindDocument();$.Widget.prototype.destroy.call(this)},render:function(){this.formEl=$(".js_mailForm",this.element);this.userEl=$(".js_userName",this.element);this.pwdEl=$(".js_pwd",this.element);this.inputOuter=$(".js_inputOuter",this.element);this.selectEl=$(".js_select",this.element);this.selectLabelEl=$(".js_selectLabel",this.element);this.mailParasEl=$(".js_mailParas",this.element);this.tipLabelEl=$(".wm-tip",this.element);this.docEl=$(document);this.winEl=$(window);
for(var a=[],b=this.options.mails.length,c=this.options.links.length,d=this.selectEl.height(),h=this.selectEl.position(),g=0;g<b;g++)a.push('<li dn="'+g+'">'+this.options.mails[g].name+"</li>");a.push('<li class="no">\u4ee5\u4e0b\u5f39\u51fa\u767b\u5f55</li>');for(b=0;b<c;b++)a.push('<li><a href="'+this.options.links[b].url+'">'+this.options.links[b].name+"</a></li>");this.options.selectListId=this.options.selectListId||$(this.element).attr("id")+"_list";this.options.selectListCls=this.options.selectListCls||
this.options.selectListId;this.options.top=this.options.top||h.top+d+this.options.offsetY;this.options.left=this.options.left||h.left+this.options.offsetX;$("#layoutContainer").append('<ul id="'+this.options.selectListId+'"  class="'+this.options.selectListCls+'" style="display:none;position:absolute;" selectIndex="0">'+a.join("")+"</ul>");this.optionBoxEl=$("#"+this.options.selectListId);this.optionEls=$("#"+this.options.selectListId+" li");this.optionBoxEl.css({top:this.options.top,left:this.options.left});
this.options.isShow&&this.show()},reSetPosition:function(){var a=this.selectEl.height(),b=this.selectEl.position();this.optionBoxEl.css({top:b.top+a+this.options.offsetY,left:b.left+this.options.offsetX})},bindInputOuterClick:function(){this.inputOuter.bind("click",function(a){"span"==a.target.nodeName.toLowerCase()&&$(this).children("input").focus()})},bindOptionHover:function(){var a=this,b=function(b){a.clearSelected();$(b).hasClass("no")||$(b).toggleClass(a.options.optionHoverCls)};this.optionEls.hover(function(){b(this)},
function(){b(this)})},bindOptionClick:function(){var a=this;this.optionEls.bind("mouseup",function(){var b=$(this).attr("dn");isNaN(parseInt(b))?$(this).hasClass("no")||(a.hide(),$.hao123.log.send({type:"mail",index:$(this).text()})):(a.saveOption(b),a.hide(),a.formEl.attr("action",a.options.mails[parseInt(b)].action))});this.optionBoxEl.bind("mouseout",function(){a.clearSelected()});this.optionBoxEl.bind("mousedown",function(a){a.stopPropagation()})},bindSelect:function(){var a=this;a.selectEl.bind("mousedown",
function(b){a.toggleShow();$(this).addClass(a.options.selectMouseDownCls);b.stopPropagation()});a.selectEl.bind("mouseup",function(){$(this).removeClass(a.options.selectMouseDownCls)})},bindDocument:function(){var a=this;this.docEl.bind("mousedown",function(){a.hide()})},bindWindow:function(){var a=this;this.winEl.bind("resize",function(){a.hide();a.reSetPosition()})},unBindWindow:function(){this.winEl.unbind("resize")},unBindDocument:function(){this.docEl.unbind("mousedown")},bindSubmit:function(){var a=
this;this.formEl.bind("submit",function(){var b=parseInt(a.optionBoxEl.attr("selectindex")),b=isNaN(b)?0:b,c=a.userEl.val(),d=a.pwdEl.val(),h=[];if(!a.trim(c))return alert("\u8bf7\u8f93\u5165\u60a8\u7684\u90ae\u7bb1\u8d26\u53f7\uff0c\u767b\u5f55\u60a8\u7684\u90ae\u7bb1"),a.userEl.focus(),!1;if(!a.trim(d))return alert("\u8bf7\u8f93\u5165\u60a8\u7684\u90ae\u7bb1\u5bc6\u7801\uff0c\u767b\u5f55\u60a8\u7684\u90ae\u7bb1"),a.pwdEl.focus(),!1;$.hao123.cookie.set("HAOMAILUN",c);$.hao123.cookie.set("HAOMAILSV",
a.options.mails[b].mail);$.hao123.log.send({type:"mail",index:a.options.mails[b].name});a.pwdEl.val("");for(var g in a.options.mails[b].params)h.push('<input name="'+g+'" value="'+a.format(a.options.mails[b].params[g]+"",{u:c,p:d})+'" type="hidden">');a.mailParasEl.html(h.join(""))})},repairSogouBrower:function(){var a=this;a.options.timer=setTimeout(function(){a.initMsgTip();a.options.timer&&clearTimeout(a.options.timer)},560)},bindTipMsg:function(){this.userEl.bind("focus",function(){$(this).next(".wm-tip").hide()});
this.pwdEl.bind("focus",function(){$(this).next(".wm-tip").hide()});this.userEl.bind("blur",function(){""==$(this).val()&&$(this).next(".wm-tip").show()});this.pwdEl.bind("blur",function(){""==$(this).val()&&$(this).next(".wm-tip").show()})},bind:function(){this.bindInputOuterClick();this.bindOptionHover();this.bindOptionClick();this.bindSelect();this.bindSubmit();this.bindWindow();this.bindTipMsg()},trim:function(a){return $.trim(a)},format:function(a,b){return $.hao123.format(a,b)},getSelectedIndex:function(){var a=
this.optionBoxEl.attr("selectIndex");return a=isNaN(parseInt(a))?0:parseInt(a)},clearSelected:function(){var a=this;this.optionEls.each(function(){$(this).removeClass(a.options.optionHoverCls)})},selectOption:function(a){0>a?this.clearSelected():(this.clearSelected(),$("li:eq("+a+")",this.optionBoxEl).toggleClass(this.options.optionHoverCls))},saveOption:function(a){this.optionBoxEl.attr("selectindex",a);a=$("li:eq("+a+")",this.optionBoxEl).text();a=9<a.length?a.substr(0,9)+"...":a;this.selectLabelEl.text(a)},
show:function(){this.options.isShow=!0;this.optionBoxEl.show();this.bindDocument()},hide:function(){this.options.isShow=!1;this.optionBoxEl.hide();this.unBindDocument()},toggleShow:function(){this.options.isShow?this.hide():this.show()},isShow:function(){return this.options.isShow}})})();
(function(){var a=function(a,c,d,h,g,i){return a=$.hao123.format('<div class="box-logo-inner" style="margin-top:7px;_margin-top:8px;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="#{4}" height="#{5}" class="holiday-logo"><param name="movie" value="#{0}"><param name="wmode" value="transparent"><\!--[if !IE]>--\><object type="application/x-shockwave-flash" data="#{0}" width="#{4}" height="#{5}" name="holiday-logo" class="holiday-logo"><param name="wmode" value="transparent"><\!--<![endif]--\><a class="hao123-img-logo" href="#{2}" target="_self"><img width="#{4}" height="#{5}" src="#{1}" alt="hao123" title="#{3}"></a><\!--[if !IE]>--\></object><\!--<![endif]--\></object></div><div style="position: absolute;height:#{5}px;width:#{4}px;z-index:10;top: 10px;left: 0px;"><a href="#{2}" title="#{3}" style="display:block;width:#{4}px;height:#{5}px;background:url(http://s0.hao123img.com/img/1L/Aw/2F/mk/ch/o/blank.gif);"></a></div>',d,
c,a,h,g||210,i||68)};hao.header=function(){$(function(){$("#mail").mail({offsetX:-1,offsetY:2})});$("#weather").weather();if(baidu.swf.version&&$("#box-logo").attr("swfurl")&&"nothome"==$.hao123.user.getLiveType()){$.hao123.log.send({type:"showsethomeflash",pageId:window.pageId});var b,c=0;window.location.search.match(/[?&](tn|src)=([^&<>'"]+)/)&&(c=1);$("#box-logo").on("mousedown","a",function(){b=$(this).page();$.hao123.log.send({pageId:window.pageId,ho:0,ie:1,tn:c,link:2,type:"ubclick"})});$("#box-logo").on("click",
"a",function(){b.page("sethome");return!1});var d=$("#box-logo"),h=d.attr("swfurl"),g=$("#indexLogo").attr("href"),i=$("#indexLogo img").attr("src"),j=$("#indexLogo").attr("title"),h=a(g,i,h,j,214,68);d.css("position","relative");d.html(h)}else(function(a){var b=a.attr("src"),b=b.replace(/^(.+)\.png(\?.*)?$/,"$1-24.png$2");a.fixpng(b)})($("#indexLogo img"))}})();
(function(a){hao.wlan=function(){function b(){a("#wlan-loading").fadeOut();c.style.display=""}var c=document.getElementById("wlan-iframe");c.attachEvent?c.attachEvent("onload",function(){b()}):c.onload=function(){b()};c.src=wlanrturl||"http://221.130.120.179:8080/style/default_cmah/wlan_logon.jsp"}})(jQuery);
$.widget("hao123.traclick",{options:{type:"ubclick",ie:$.hao123.browser.ie?1:0},_init:function(){},_create:function(){this.$a=$("a",this.element);this._bindEvent()},_bindEvent:function(){var a=this,b=a.options;a.$a.bind("click",function(){var c=$(this).attr("class");b.link=/(js_setHome)/.test(c)?0:1;a._send()})},_send:function(){var a=this.options,b=window.location.search.match(/[?&](tn|src)=([^&<>'"]+)/);a.tn=b?1:0;a.ho=a.ie&&"nothome"!==$.hao123.user.type()?1:0;$.hao123.log.send(a)}});
$.widget("hao123.credit",{options:{type:"nothome",tipmsg:"",creditUrl:"http://zhuanla.hao123.com/jifen.html",homeUrl:"http://www.hao123.com/?src=jifen",tipCls:"tipicon",delay:1E4},_create:function(){var a=this.element;this.$tip=$(".js_hometip",a);this.$tipicon=$(".js_hometip i",a);this.$tipmsg=$(".js_tipmsg",a);this.$tipclose=$(".js_tipclose",a);this.$sethome=$(".js_setHome",a);this.hover=!1;this._bindEvent()},_init:function(){var a=this,b=a.options;b.tipmsg="iehome"==b.type?"\u4fdd\u6301hao123\u4e3a\u4e3b\u9875\uff0c\u5929\u5929\u90fd\u80fd\u9886\u53d6\u79ef\u5206\uff0c\u6362\u597d\u793c >>":
"\u8bbehao123\u4e3a\u4e3b\u9875\uff0c\u5373\u53ef\u62bd\u5956 >>";a.$tipmsg.text(b.tipmsg);a.$tipicon.addClass(b.tipCls);a.$sethome.text("\u8bbe\u9996\u6709\u793c");a.$tip.fadeIn();a.timer=setTimeout(function(){a.$tip.fadeOut()},a.options.delay)},_bindEvent:function(){var a=this;a.$sethome.mouseover(function(){a.hover||(a.hover=!0,a.$tip.fadeIn(),clearTimeout(a.timer))});a.$sethome.click(function(){a._processAction();return!1});a.$tipmsg.click(function(){a._processAction();return!1});a.$tipclose.click(function(){a.$tip.fadeOut();
a.hover=!1})},_processAction:function(){var a=this,b=a.options,c=a.element.get(0);"iehome"==b.type?(window.open(b.creditUrl),a.$tip.fadeOut(),a.hover=!1):(c.style.behavior="url(#default#homepage)",c.setHomePage(b.homeUrl),$.hao123.homePgaeDom.isHomePage(b.homeUrl)?(b.tipmsg="\u606d\u559c\u60a8\u6210\u529f\u8bbe\u7f6ehao123\u4e3a\u4e3b\u9875\uff0c\u83b7\u5f97\u62bd\u5956\u673a\u4f1a >>",a.$tipmsg.text(b.tipmsg),b.type="iehome",$.hao123.log.send({type:"tempstatistics",pageId:"iehome"})):(a.$tip.fadeOut(),
setTimeout(function(){a.hover=!1},1E3)))}});
(function(a){a.widget("hao123.favorite",{options:{url:"http://www.hao123.com",title:"hao123_\u4e0a\u7f51\u4ece\u8fd9\u91cc\u5f00\u59cb"},_init:function(){var b=this.element;if(a.hao123.browser.ie){var c=window.location.search.match(/[?&]browser=([^&<>'"]+)/);c&&"baidu"!=c[1]&&b.show()}},_create:function(){this.$el=a(".js_favorite",this.element);this._bindEvent()},_bindEvent:function(){var a=this.options;this.$el.bind("click",function(){window.external&&window.external.AddFavorite(a.url,a.title);return!1})}})})(jQuery);
(function(){$.widget("hao123.skin",{options:{debug:!1,isStatic:0,beforeTarget:"#layoutContainer",url:"/api/getallskins/",setUrl:"/api/setskinkey/",getUserUrl:"/api/getuserskin/",defaultSkin:"",curSkin:"",lastSubmitSkin:"",submitSkin:"",lastSkin:"",curColumnClass:"",lastColumnClass:"",cachePages:{},duration:250,cacheData:null,beforeTargetEl:null,skinLibInit:!1,hotSkinText:"\u611f\u6069\u5988\u5988",hotSkinName:"muqinjie",hotSelector:"#userBar .widget-selfhood .hot-skin",delSkinText:"\u70b9\u51fb\u5207\u6362\u9ed8\u8ba4\u76ae\u80a4",
delSkinName:"skin-color-green",skinLibIfShow:!1},_create:function(){this.options.bodyEl=$("body");this.options.moreEl=$(".more",this.element);this.bindLoginIn();this.bindSelfhood();1==this.options.isStatic&&this.processStatic();$("body").hasClass(this.options.hotSkinName)&&($(this.options.hotSelector).attr("title",this.options.delSkinText),$(this.options.hotSelector).attr("action","skin|"+this.options.delSkinName))},processStatic:function(){var a=this,b=a.options.getUserUrl+"?c="+a.getBaiduCookie()+
"&r="+(new Date).getTime();$.ajax({type:"GET",url:b,dataType:"json",success:function(c){var d=c.skinName;b=c[a.options.debug?"skinDebugCss":"skinCss"];a.options.lastSkin=a.options.curSkin;a.options.curSkin=d;a.options.lastSubmitSkin=d;a.options.submitSkin=d;a.selectedSkin();a.viewSkin(d,b)},error:function(){}})},bindLoginIn:function(){var a=this;HLogin.loginModel.addEventListener("signin",function(b){b.isInit||$(document).bind("getprof",function(b,d){var h=d.skin.skinName;url=d.skin[a.options.debug?
"skinDebugCss":"skinCss"];a.options.lastSkin=a.options.curSkin;a.options.curSkin=h;a.options.lastSubmitSkin=h;a.options.submitSkin=h;a.selectedSkin();a.viewSkin(h,url)})})},bindSelfhood:function(){var a=this;a.element.bind("click",function(b){a.processSelfhoodClick(b);return!1})},log:function(a){var b=currentProfile.skin;!a&&(!b||"null"==b)&&HLogin.loginModel.isLogin?(b=this.bodyEl.attr("class"),$.hao123.log.send({pageId:window.pageId,skin:b,islogin:1})):"null"!=a&&$.hao123.log.send({pageId:window.pageId,
skin:a,islogin:0})},processSelfhoodClick:function(a){var b=$(a.target).attr("action");-1<$(a.target).attr("action").indexOf(this.options.hotSkinName)?($(this.options.hotSelector).attr("title",this.options.delSkinText),$(this.options.hotSelector).attr("action","skin|"+this.options.delSkinName)):($(this.options.hotSelector).attr("title",this.options.hotSkinText),$(this.options.hotSelector).attr("action","skin|"+this.options.hotSkinName));b&&this.processByAction(b);return!1},processByAction:function(a){a=
a.split("|");switch(a[0]){case "skin":this.options.lastSkin=this.options.curSkin;this.options.curSkin=a[1];this.options.lastSubmitSkin=this.options.submitSkin;this.options.submitSkin=a[1];this.selectedSkin();this.viewSkin();this.setSkinToCookie();$.hao123.log.send({skin:this.options.curSkin,type:"skin"});break;case "check":this.options.lastSkin=this.options.curSkin;this.options.curSkin=$("#js_skin-checkbox"+a[1]).val();this.selectedSkin(this.options.curSkin,a[1]);this.viewSkin();break;case "submit":this.saveSkin();
break;case "consel":this.canselSkin();break;case "reset":this.resetSkin();break;case "change-column":this.changeColumn(a[1]||"");break;case "prev-page":this.prevPage();break;case "next-page":this.nextPage();break;case "skin-more":this.options.beforeTargetEl||(this.options.beforeTargetEl=$(this.options.beforeTarget)||$(".layout-container")),this.options.initSkinLib?this.canselSkin():this.initSkinLib(),$.hao123.log.send({skin:"more",type:"skin"})}},initSkinLib:function(){if(this.options.cacheData)this.renderSkinLib(b);
else{var a=this,b=this.getRequestParamters();a.options.lockedFlag||(a.options.lockedFlag=!0,$.ajax({type:"GET",url:a.options.url,data:b,dataType:"json",success:function(b){a.options.cacheData=b;a.renderSkinLib(b)},error:function(){},complete:function(){a.options.lockedFlag=!1}}))}},renderSkinLib:function(a){if((a=a||this.options.cacheData)&&a.config&&a.resource){var b=a.config,c=b.data,d=c.length,h="",g="",i=null,j=0;this.options.defaultSkin=a.resource["hao123-default"].skinName||"";this.options.curSkin=
this.options.bodyEl.attr("class")||this.options.defaultSkin;this.options.lastSubmitSkin=this.options.submitSkin=this.options.curSkin;i="";for(a=0;a<d;a++)if(!(0>=c[a].skins.length)){this.storagePage(a+1,c[a].skins.length);c[a].classEnName==b.defaultColumn?(this.options.curColumnClass=a+1,i=0==a?"js_skinclass"+(a+1)+" title curfirst":a==d-1?"js_skinclass"+(a+1)+" last cur":"js_skinclass"+(a+1)+" title cur"):i=a==d-1?"js_skinclass"+(a+1)+" last":"js_skinclass"+(a+1)+" title";for(var h=h+('<li class="'+
i+'"><a action="change-column|'+(a+1)+'">'+c[a].className+"</a></li>"),f="",i=c[a].skins,j=6>i.length?i.length:6,k=0;k<j;k++)this.options.curSkin==i[k].skinName?(this.options.curSkinDivTag=a+1+"_"+(k+1),f+='<li class="skinlib-item js_sitem'+(a+1)+"_"+(k+1)+' cur"><div class="sitem-bg"></div><div class="sitem"><img action="check|'+(a+1)+"_"+(k+1)+'" src="'+i[k].bg_thumb+'" /><label for="js_skin-checkbox'+(a+1)+"_"+(k+1)+'"><input id="js_skin-checkbox'+(a+1)+"_"+(k+1)+'" checked="checked" name="recommand'+
(a+1)+"_"+(k+1)+'" action="check|'+(a+1)+"_"+(k+1)+'" value="'+i[k].skinName+'" type="radio" /><span>'+i[k].title+"</span></label></div>"+(i[k].style?'<span class="g_hf-icon skinlib-new"></span>':"")+"</li>"):f+='<li class="skinlib-item js_sitem'+(a+1)+"_"+(k+1)+'"><div class="sitem-bg"></div><div class="sitem"><img action="check|'+(a+1)+"_"+(k+1)+'" src="'+i[k].bg_thumb+'" /><label for="js_skin-checkbox'+(a+1)+"_"+(k+1)+'"><input id="js_skin-checkbox'+(a+1)+"_"+(k+1)+'" name="recommand'+(a+1)+"_"+
(k+1)+'" action="check|'+(a+1)+"_"+(k+1)+'" value="'+i[k].skinName+'" type="radio" /><span>'+i[k].title+"</span></label></div>"+(i[k].style?'<span class="g_hf-icon skinlib-new"></span>':"")+"</li>";g=c[a].classEnName==b.defaultColumn?g+('<ul class="js_skins'+(a+1)+' skinlib-items curskins">'+f+"</ul>"):g+('<ul class="js_skins'+(a+1)+' skinlib-items">'+f+"</ul>")}this.options.skinLibEl=$('<div id="skinLib" class="widget-skinlib" style="display:none;"><div class="w960px g_clr"><ul class="skinlib-title g_clr">'+
h+'<li class="de_li"><a class="g_hf-icon delbtn" action="reset">\u6062\u590d\u9ed8\u8ba4</a></li></ul><div class="skinlib-content">'+g+'</div><div class="skinlib-opt"><a class="g_hf-icon curbtn" action="submit">\u4fdd\u5b58</a> <a class="g_hf-icon btn" action="consel">\u53d6\u6d88</a><a href="http://hi.baidu.com/hao123/item/73cd6f3274a70f5b81f1a788" class="btn sl-tip" style="width:100px">\u65e0\u6cd5\u4fdd\u5b58\u76ae\u80a4\uff1f</a><div class="pages-box"><span class="js_page-info">1/5</span><a class="g_hf-icon btn2" action="prev-page">\u4e0a\u4e00\u9875</a><a class="g_hf-icon btn2" action="next-page">\u4e0b\u4e00\u9875</a></div></div></div></div>');
this.options.skinLibEl.insertBefore(this.options.beforeTargetEl);var n=this;n.options.skinLibEl.bind("click",function(a){a=$(a.target);if("radio"==a.attr("type")||a.attr("action"))a=a.attr("action")||a.val(),n.processByAction(a)});$(".sitem img",n.options.skinLibEl).hover(function(){var a=$(this).attr("action").split("|")[1],a=$(".js_sitem"+a,n.options.skinLibEl);a.hasClass("cur")||a.addClass("cur")},function(){var a=$(this).attr("action").split("|")[1],b=$(".js_sitem"+a,n.options.skinLibEl),a=$(".js_sitem"+
a+" input",n.options.skinLibEl);b.hasClass("cur")&&!a.attr("checked")&&b.removeClass("cur")});this.showSkinLib();this.options.initSkinLib=!0;this.options.pagesBoxEl=$(".pages-box",this.options.skinLibEl);this.options.skinLibContentEl=$(".skinlib-content",this.options.skinLibEl);this.options.pageInfoEl=$(".js_page-info",this.options.pagesBoxEl);this.setPageInfo(parseInt(this.options.curColumnClass))}},showSkinLib:function(){this.options.skinLibEl&&($.hao123.browser.ie&&8>parseInt($.hao123.browser.ie)?
this.options.skinLibEl.show():this.options.skinLibEl.is(":animated")||this.options.skinLibEl.slideDown(this.options.duration||1E3),this.options.skinLibIfShow=!0,this.options.moreEl.html("\u6536\u8d77"),this.options.moreEl.attr("title","\u70b9\u51fb\u6536\u8d77"),this.options.moreEl.addClass("more-hover"))},hideSkinLib:function(){this.options.skinLibEl&&($.hao123.browser.ie&&8>parseInt($.hao123.browser.ie)?this.options.skinLibEl.hide():this.options.skinLibEl.is(":animated")||this.options.skinLibEl.slideUp(this.options.duration||
1E3),this.options.skinLibIfShow=!1,this.options.moreEl.html("\u6362\u80a4"),this.options.moreEl.attr("title","\u70b9\u51fb\u67e5\u770b\u6240\u6709\u76ae\u80a4"),this.options.moreEl.removeClass("more-hover"))},toggleSkinLib:function(){this.options.skinLibEl&&(this.options.skinLibIfShow?this.hideSkinLib():this.showSkinLib())},changeColumn:function(a){a&&(this.options.lastColumnClass=this.options.curColumnClass,this.options.curColumnClass=a,this.options.curColumnClass!=this.options.lastColumnClass&&
($(".js_skinclass"+this.options.lastColumnClass,this.options.skinLibEl).removeClass("cur"),$(".js_skinclass"+this.options.lastColumnClass,this.options.skinLibEl).removeClass("curfirst"),"1"==a?$(".js_skinclass"+this.options.curColumnClass,this.options.skinLibEl).addClass("curfirst"):$(".js_skinclass"+this.options.curColumnClass,this.options.skinLibEl).addClass("cur"),$(".js_skins"+this.options.lastColumnClass,this.options.skinLibEl).removeClass("curskins"),$(".js_skins"+this.options.curColumnClass,
this.options.skinLibEl).addClass("curskins")));this.setPageInfo(a)},storagePage:function(a,b){var c=1;0<b&&(c=Math.ceil(b/6));this.options.cachePages["page"+a]={cur:1,total:parseInt(c),len:parseInt(b)}},setPageInfo:function(a){a=a||this.options.curColumnClass;a=this.options.cachePages["page"+(isNaN(parseInt(a))?1:a)];1>=a.total?this.options.pagesBoxEl.hide():(this.options.pageInfoEl.html(a.cur+"/"+a.total),this.options.pagesBoxEl.show())},nextPage:function(){var a=this.options.cachePages["page"+this.options.curColumnClass];
a.cur+1>a.total||(this.options.cachePages["page"+this.options.curColumnClass].cur=a.cur+1,this.loadSkins(),this.setPageInfo())},prevPage:function(){var a=this.options.cachePages["page"+this.options.curColumnClass];0>=a.cur-1||(this.options.cachePages["page"+this.options.curColumnClass].cur=a.cur-1,this.loadSkins(),this.setPageInfo())},loadSkins:function(){for(var a=this.options.cachePages["page"+this.options.curColumnClass],b=6*(a.cur-1),a=6*a.cur>a.len?a.len:6*a.cur,c="",d=this.options.cacheData.config.data[parseInt(this.options.curColumnClass)-
1].skins,h=parseInt(this.options.curColumnClass)-1;b<a;b++)c=this.options.curSkin==d[b].skinName?c+('<li class="skinlib-item js_sitem'+(h+1)+"_"+(b+1)+' cur"><div class="sitem-bg"></div><div class="sitem"><img action="check|'+(h+1)+"_"+(b+1)+'" src="'+d[b].bg_thumb+'" /><label for="js_skin-checkbox'+(h+1)+"_"+(b+1)+'"><input id="js_skin-checkbox'+(h+1)+"_"+(b+1)+'" checked="checked" name="recommand'+(h+1)+"_"+(b+1)+'" action="check|'+(h+1)+"_"+(b+1)+'" value="'+d[b].skinName+'" type="radio" /><span>'+
d[b].title+"</span></label></div>"+(d[b].style?'<span class="g_hf-icon skinlib-new"></span>':"")+"</li>"):c+('<li class="skinlib-item js_sitem'+(h+1)+"_"+(b+1)+'"><div class="sitem-bg"></div><div class="sitem"><img action="check|'+(h+1)+"_"+(b+1)+'" src="'+d[b].bg_thumb+'" /><label for="js_skin-checkbox'+(h+1)+"_"+(b+1)+'"><input id="js_skin-checkbox'+(h+1)+"_"+(b+1)+'" name="recommand'+(h+1)+"_"+(b+1)+'" action="check|'+(h+1)+"_"+(b+1)+'" value="'+d[b].skinName+'" type="radio" /><span>'+d[b].title+
"</span></label></div>"+(d[b].style?'<span class="g_hf-icon skinlib-new"></span>':"")+"</li>");$(".js_skins"+this.options.curColumnClass).html(c);var g=this;$(".sitem img",g.options.skinLibEl).hover(function(){var a=$(this).attr("action").split("|")[1],a=$(".js_sitem"+a,g.options.skinLibEl);a.hasClass("cur")||a.addClass("cur")},function(){var a=$(this).attr("action").split("|")[1],b=$(".js_sitem"+a,g.options.skinLibEl),a=$(".js_sitem"+a+" input",g.options.skinLibEl);b.hasClass("cur")&&!a.attr("checked")&&
b.removeClass("cur")})},setSkinToCookie:function(){$.hao123.setProfile("skin",this.options.submitSkin)},saveSkin:function(){this.options.lastSubmitSkin=this.options.submitSkin;this.options.submitSkin=this.options.curSkin;this.setSkinToCookie();this.hideSkinLib()},canselSkin:function(){this.options.lastSkin=this.options.curSkin;this.options.curSkin=this.options.submitSkin;this.selectedSkin();this.viewSkin();this.toggleSkinLib()},resetSkin:function(){this.options.lastSubmitSkin=this.options.submitSkin;
this.options.submitSkin=this.options.defaultSkin;this.options.lastSkin=this.options.curSkin;this.options.curSkin=this.options.submitSkin;this.viewSkin();this.setSkinToCookie();this.hideSkinLib()},getBaiduCookie:function(){var a="",a=!$.hao123.cookie("FLASHID")||32>$.hao123.cookie("FLASHID").length?$.hao123.cookie("BAIDUID"):$.hao123.cookie("FLASHID");return a.substr(0,32)},getRequestParamters:function(){return"key="+(new Date).getTime()+"&c="+this.getBaiduCookie()},selectedSkin:function(a){for(var a=
a||this.options.curSkin,b=$("input[type=radio]",this.options.skinLibContentEl),c=b.length,d=null,h=0;h<c;h++)d=$(b[h]),d.val()==a?(d.attr("checked",!0),d.parents("li.skinlib-item").addClass("cur")):(d.attr("checked",!1),d.parents("li.skinlib-item").removeClass("cur"))},viewSkin:function(a,b){a=a||this.options.curSkin;if(!(-1<a.indexOf("skin-color-")))try{var c=this.options.debug?"skinDebugCss":"skinCss",b=b||this.options.cacheData.resource[a][c]+"?d=8",c=null;0<$("#setSkin").length?(c=$("#setSkin"),
c.attr("href",b)):(c=document.createElement("link"),c.setAttribute("type","text/css"),c.setAttribute("rel","stylesheet"),c.setAttribute("href",b),c.setAttribute("media","all"),c.id="setSkin",$("head").append($(c)))}catch(d){}this.options.bodyEl.attr("class",a)}})})();
$.widget("hao123.calendar",{options:{serverTime:0,intervalDelay:3E4,url:"/images/timer.gif",tpl:"#{m}\u6708#{d}\u65e5 \u661f\u671f#{W}\uff08\u519c\u5386#{CM}#{CD}\uff09 <span>#{hh}:#{mm}</span>",tpl1:"#{m}\u6708#{d}\u65e5 \u661f\u671f#{W}\uff08#{so}\uff09 <span>#{hh}:#{mm}</span>",tpl2:"#{m}\u6708#{d}\u65e5 \u661f\u671f#{W}\uff08#{cf}\uff09 <span>#{hh}:#{mm}</span>",tpl3:"#{m}\u6708#{d}\u65e5 \u661f\u671f#{W}\uff08#{gf}\uff09 <span>#{hh}:#{mm}</span>"},_create:function(){var a=this;a.options.serverTime=
+new Date;a.correction=0;a.render();var b=+new Date,c=b;$.ajax({cache:!1,url:a.options.url,type:"GET",complete:function(d){c=+new Date;d=d.getResponseHeader("Date")?(new Date(d.getResponseHeader("Date"))).getTime()+(c-b):a.options.serverTime+(c-b);a.options.serverTime=d;a.correction=a.options.serverTime-c;a.render()}});a.intervalID=setInterval(function(){a._check()},a.options.intervalDelay)},_check:function(){var a=this,b=+new Date;if(Math.abs(b+a.correction-a.options.serverTime)>a.options.intervalDelay+
3E4){var c=+new Date,d=c;$.ajax({cache:!1,url:a.options.url,type:"GET",complete:function(b){d=+new Date;b=b.getResponseHeader("Date")?(new Date(b.getResponseHeader("Date"))).getTime()+(d-c):a.options.serverTime+(d-c);a.options.serverTime=b;a.correction=a.options.serverTime-d;a.render()}})}else a.options.serverTime=b+a.correction,a.render()},destroy:function(){clearInterval(me.intervalID);$.Widget.prototype.destroy.call(this)},getDate:function(a){a=a||new Date;return{y:a.getFullYear(),m:a.getMonth()+
1,d:a.getDate()}},format:function(a){var b=this.getDate(a),c=this.options.tpl,b=$.hao123.date(b.y,b.m,b.d);b.hh=this.pad(a.getHours(),2);b.mm=this.pad(a.getMinutes(),2);b.ss=this.pad(a.getSeconds(),2);c=b.so?this.options.tpl1:b.cf?this.options.tpl2:b.gf?2012==b.y&11==b.m&&28==b.d?this.options.tpl:this.options.tpl3:this.options.tpl;return this.formatStr(c,b)},render:function(a){var a=this.format(new Date(a||this.options.serverTime)||new Date),b=this.element.html();a!=b&&this.element.html(a)},pad:function(a,
b){var c="",d=0>a,h=""+Math.abs(a);h.length<b&&(c=Array(b-h.length+1).join("0"));return(d?"-":"")+c+h},formatStr:function(a,b){return $.hao123.format(a,b)}});
(function(){function a(a){var d;d=a?'<a href="/url/logout?gotourl=#{gotourl}" class="linkHover loginout m1px" target="_self">\u9000\u51fa</a><span class="username" title="#{username}">#{username}</span><span class="uwl m1px">\u4f60\u597d,</span>':'<a href="/url/logout?gotourl=#{gotourl}" class="linkHover loginout m1px" target="_self">\u9000\u51fa</a><span class="uwl m1px">\u7528\u6237\u4f60\u597d,</span>';$("#userBar .user").html($.hao123.format(d,{username:a,gotourl:window.gotourl})).show();b()}
function b(){if(6==$.hao123.browser.ie||8==$.hao123.browser.ie){var a=$("#box-userbar .username");10<(a.attr("title")||"").replace(/[^0-9,a-z,A-Z]/g,"aa").length?a.css({width:60}):a.css({width:"auto"})}}b();hao.userbar=function(b,d){jQuery.ajax({type:"get",url:"http://s0.hao123img.com/v3/00/Gr/rO/Kc/Au/7/date.js",success:function(){1==d?$("#calendar").calendar({serverTime:(new Date).getTime()}):$("#calendar").calendar()},dataType:"script",cache:!0});$(function(){$.hao123.user.init();var a=$.hao123.user.type();
switch(a){case "iehome":$("#userBar").credit({type:a});break;case "nothome":$("#userBar .js_setHome").page();break;default:$("#userBar .js_setHome").page()}});$("#userBar .js_sethomeBox").traclick();$("#userBar .js_setFavorite").favorite();HLogin.loginModel.addEventListener("signin",function(b){b.isInit||a(b.userName)});HLogin.loginModel.addEventListener("otherSignin",function(b){a(b.userName)});1==d?$(".widget-selfhood").skin({debug:b,isStatic:1}):$(".widget-selfhood").skin({debug:b});1==d?$(".widget-selfhood").skin({debug:b,
isStatic:1}):$(".widget-selfhood").skin({debug:b});1==d&&($("#userBar .user").hide(),$("#userBar .gxxz").get(0).style.borderLeft="none")}})();
