text: (function(e){var t={id:"6622ac7ccae68449cb5ad9e50b3f9856",filename:"hfUtils.js",exports:{}};if(!e.____MODULES){e.____MODULES={}}var n=function(e,t,n){(function(){function e(e,t,n){for(var r in e)if(e.hasOwnProperty(r))t.call(n||window,r,e[r])}var t=Array.prototype.forEach?function(e,t){Array.prototype.forEach.call(e||[],t)}:function(e,t){for(var n=0,r=e&&e.length||0;n<r;n++)t.call(window,e[n],n)};var n=new function(){var n={"http://user.qunar.com":{"pay.qunar.com":"/user_proxy/"}};var r={"http://user.qunar.com":"/user_proxy/"};this.httpsFilter=function(n){function i(e){return e.replace("http:",location.protocol)}var r;if(location.protocol==="https:"){try{switch(Object.prototype.toString.call(n)){case"[object String]":return i(n);case"[object Object]":e(n,function(e,t){n[e]=i(t)});return n;case"[object Array]":t(n,function(e,t){n[t]=i(e)});return n;default:return n}}catch(s){}}return n};this.bindEvent=function(e,t,n){if(!e){return}if(e.addEventListener){e.addEventListener(t,n,false)}else if(e.attachEvent){e.attachEvent("on"+t,function(){n.apply(e,arguments)})}else{e["on"+t]=n}};this.GA={param:function(e){var t=["utmwv=0.1","t="+ +(new Date),"utmsr="+(screen.width+"*"+screen.height),"utmasr="+(screen.availWidth+"*"+screen.availHeight),"utmr="+encodeURIComponent(document.referrer||"-1"),"utmp="+encodeURIComponent(window.location.href.toString()),"utmhn="+encodeURIComponent(window.location.host.toString()),"s="+encodeURIComponent(e||window["_ba_utm_s"]||null)];return t.join("&")},clk:function(e,t){this.send("clk",e,t)},send:function(e,t,n){if(location.protocol!=="https:"){var r=new Image,i=this.param(n);r.src="http://bc.qunar.com/"+(e||window["_ba_utm_l"]||"e")+"?"+i+"&a="+encodeURIComponent(t||"")}}};this.jsonpCall=function(e,t,n){var r=document.head||document.getElementsByTagName("head")[0]||document.documentElement;var i=document.createElement("script");i.async="false";i.defer="false";var s={};s.transportType="JSONP";s.transport=i;s.transportKey="callback_"+Math.ceil(Math.random()*1e6);var o=n;if(undefined===window[s.transportKey]||null===window[s.transportKey]){window[s.transportKey]=function(e){o(e);if(r&&i.parentNode){r.removeChild(i)}window[s.transportKey]=null;if(!!window[s.transportKey]){delete window[s.transportKey]}}}i.onload=i.onreadystatechange=function(){if(!i.readyState||/loaded|complete/.test(i.readyState)){if(s.timeoutId){try{clearTimeout(s.timeoutId)}catch(e){}}i.onload=i.onreadystatechange=null;i.responseText="";i=undefined;s.transport=null}};t+=t?"&":"";t+="callback="+s.transportKey+"&"+(new Date).getTime();i.src=e+"?"+t;if(r.firstChild){r.insertBefore(i,r.firstChild)}else{r.appendChild(i)}};this.contains=function(e,t){if(document.documentElement.contains){return e!==t&&(e.contains?e.contains(t):true)}else if(document.documentElement.compareDocumentPosition){return!!(e.compareDocumentPosition(t)&16)}else{return false}};this.hasClass=function(e,t){return(new RegExp("(\\s|^)"+t+"(\\s|$)")).test(e.className)};this.removeClass=function(e,t){var n=[];if(typeof t=="string"){n.push(t)}else{n=t||n}var r=e.className.split(" ");var i=[],s;for(var o=0;o<r.length;o++){s=false;for(var u=0;u<n.length;u++){if(this.trim(r[o])==n[u]){s=true;break}}if(!s){i.push(this.trim(r[o]))}}e.className=i.join(" ")};this.addClass=function(e,t){if(!e){throw new Error("dom not exist when addClass:"+t)}var n=[];if(typeof t=="string"){n.push(t)}else{n=t||n}var r=e.className.split(" ");var i=[],s;for(var o=0;o<n.length;o++){s=false;for(var u=0;u<r.length;u++){if(this.trim(r[u])==n[o]){s=true;break}}if(!s){i.push(this.trim(n[o]))}}e.className=e.className+" "+i.join(" ")};this.trim=function(e){if("undefined"==typeof e){return""}e=e.toString();if(e.length===0){return""}var t=[];t[" "]=true;t["	"]=true;t["\r"]=true;t["\n"]=true;while(e.length>0&&t[e.substr(0,1)]){e=e.substr(1)}while(e.length>0&&t[e.substr(e.length-1,1)]){e=e.substr(0,e.length-1)}return e};this.insertAfter=function(e,t){var n=t.parentNode;if(n.lastChild==t){n.appendChild(e)}else{n.insertBefore(e,t.nextSibling)}};this.getElementsByClassName=function(e,t){if(e.getElementsByClassName){return e.getElementsByClassName(t)}else{return function(t,n){if(n==null)n=document;var r=[],i=n.getElementsByTagName("*"),s=i.length,o=new RegExp("(^|\\s)"+t+"(\\s|$)"),u,a;for(u=0,a=0;u<s;u++){if(o.test(i[u].className)){r[a]=i[u];a++}}return r}(t,e)}};this.setCookie=function(e,t){var n=new Date;var r=arguments,i=r.length;var s=i>2?r[2]:null;var o=i>3?r[3]:null;var u=i>4?r[4]:null;var a=i>5?r[5]:false;if(s!=null)n.setTime(n.getTime()+s*1e3);document.cookie=e+"="+escape(t)+(s==null?"":"; expires="+n.toGMTString())+(o==null?"":"; path="+o)+(u==null?"":"; domain="+u)+(a==true?"; secure":"")};this.getCookie=function(e){var t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]*)(;|$)"));if(t!=null)return unescape(t[2]);return null};this.extend=function(e){e=e||{};for(var t=1;t<arguments.length;t++){if(!arguments[t])continue;for(var n in arguments[t]){if(arguments[t].hasOwnProperty(n))e[n]=arguments[t][n]}}return e};this.setNav=function(e){if(!e)return;var t=this.getElementsByClassName(document.body,"qhf_"+e)[0];if(t){this.addClass(t,"qhf_cur")}}};if(typeof QNR==="undefined"){window["QNR"]={}}window["QNR"]["hfUtils"]=n})()}(t.exports,t,e);e.____MODULES["6622ac7ccae68449cb5ad9e50b3f9856"]=t.exports})(this);(function(e){var t={id:"b606551ab648394b9a7234773cbf6f82",filename:"userstatus.js",exports:{}};if(!e.____MODULES){e.____MODULES={}}var n=function(e,t,n){(function(){var e={version:"1.1",_COOKIEHASH:null,$:function(e){return document.getElementById(e)},_escapeHTML:function(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&#x2F;").replace(/ /g,"&nbsp;")},_cookie:function(e){this._COOKIEHASH={};var t=document.cookie.split(";");for(var n=0;n<t.length;n++){var r=t[n];var i=r.split("=");if(r.indexOf("=")!=-1)this._COOKIEHASH[this._trim(i[0])]=this._trim(i[1])}return this._COOKIEHASH[e]},_trim:function(e){if(String.prototype.trim){return e.trim()}return e.replace(/^\s+/,"").replace(/\s+$/,"")},_getinfo:function(){var e={from:window["__qunarglobal_from"]||""};var t="";var n="";var r="";var i=this._cookie("QN16");var s=this._cookie("QN42");var o=this._cookie("QN15");if(typeof i!=="undefined"){switch(i){case"1":t=this._getQunarNickName();n=this._getQunarNickName();r=this._getQunarUserName();break;case"0":t=s;n=o;r=o;break;default:t=this._getQunarNickName();n=this._getQunarNickName();r=this._getQunarUserName()}}else{t=this._getQunarNickName();n=this._getQunarNickName();r=this._getQunarUserName()}e.displayName=this._escapeHTML(decodeURIComponent(t).replace(/<(.*?)>/ig,"")).replace(/\"/g,"");e.username=decodeURIComponent(n).replace(/\"/g,"");e.uname=decodeURIComponent(r).replace(/\"/g,"");return e},_getQunarNickName:function(){var e="";var t=this._cookie("_a");var n=this._cookie("QN42");if(!n){n=this._cookie("_q");if(n){n=n.replace("U.","")}}if(n){if(t){e=this._trim(n+"(未激活)")}else{e=this._trim(n)}}return e},_getQunarUserName:function(){var e="";var t=this._cookie("_q");var n=this._cookie("_a");if(t){if(n){e=this._trim(t.replace("U.","")+"(未激活)")}else{e=this._trim(t.replace("U.",""))}}return e},_run:function(e){this.userNameEle=this.$(e["u"]);this.userTitleEle=this.$(e["t"]);this.userListEle=this.$(e["l"]);this.userRegEle=this.$(e["r"])},_html:function(){var e=arguments[0];var t=[];for(var n=1,r=arguments.length;n<r;n++){t.push(arguments[n])}e.innerHTML=t.join("")}};var t={_regEvent:function(){var t=e.userTitleEle.className;e.userTitleEle.onmouseover=function(){e.userTitleEle.className=t+" q_header_tnav_menu_hover"};e.userTitleEle.onmouseout=function(){e.userTitleEle.className=t}},_isLogin:function(){if(e._cookie("_t")&&e._cookie("_q")&&e._cookie("_q").indexOf("G.")<0){return true}else if(e._cookie("QN42")){return true}else{return false}},_render:function(){var n=e._getinfo();var r=encodeURIComponent(window.location.href);var i="http://user.qunar.com";var s=e.userTitleEle?e.userTitleEle.getAttribute("data-header-alwayshow"):false;var o=s&&s==="true";if(t._isLogin()){e._html(e.userNameEle,'<a href="',i,'/index.jsp#home" title="',n.displayName,'" hidefocus="on" class="q_header_uname" rel="nofollow">',n.displayName,"</a>");if(e.userListEle){e.userTitleEle.style.display="";var u=e.userListEle.getElementsByTagName("a");for(var a=0,f=u.length;a<f;a++){u[a].href=u[a].href.replace(/#\[\[username\]\]/g,n.uname)}}e._html(e.userRegEle,'<a id="__headerInfo_logout__" href="',i,"/passport/logout.jsp?ret=",r,'" hidefocus="on" rel="nofollow" class="q_header_logout">退出</a>')}else{e._html(e.userNameEle,'<span>请</span><a id="__headerInfo_login__" href="',i,"/passport/login.jsp?ret=",r,'" hidefocus="on" rel="nofollow">登录</a>');e._html(e.userRegEle,'<span>或</span><a id="__headerInfo_reg__" href="',i,"/passport/register.jsp?ret=",r,'" hidefocus="on" rel="nofollow">免费注册</a>');if(e.userListEle&&!o){e.userTitleEle.style.display="none"}}},_addItem:function(t,n){var r=n||"";var i=document.createElement("DD");i.innerHTML=t;i.className=i.className+" "+r;e.userListEle.appendChild(i)},_getUserName:function(){if(!t._isLogin())return{};var n=e._getinfo();return{username:n.username,displayName:n.displayName,uname:n.uname}},_run:function(n){e._run(n);t._render();if(e.userTitleEle){t._regEvent()}t._checkCookieExpire();t._plantCsrfToken()},_checkCookieExpire:function(){if(!e._cookie("_t")){return}var n=(new Date((e._cookie("_t")||0)*6e4)).getTime(),r=(new Date).getTime();if(n>r||r>n+12096e5){if(window.QNR&&window.QNR.hfUtils){window["___void"]=function(){try{t._plantCsrfToken()}catch(e){}};var i=document.createElement("script");var s=document.head||document.getElementsByTagName("head")[0]||document.documentElement;i.onload=i.onreadystatechange=function(){t._render();if(i.parentNode){s.removeChild(i)}return false};i.src=QNR.hfUtils.httpsFilter("http://user.qunar.com/webApi/forcelogout.jsp?format=js&callback=___void");if(s.firstChild){s.insertBefore(i,s.firstChild)}else{s.appendChild(i)}}setTimeout(function(){t._render()},15e3)}},_plantCsrfToken:function(){var t=function(e){var t="123456789poiuytrewqasdfghjklmnbvcxzQWERTYUIPLKJHGFDSAZXCVBNM";var n="";for(var r=0;r<e;r++){n+=t.charAt(Math.ceil(Math.random()*1e8)%t.length)}return n};var n=e._cookie("csrfToken");if(!n){n=t(32);try{document.cookie="csrfToken="+n+";domain=qunar.com;path=/;"}catch(r){}}},_getFixNickName:function(e,n){var r=t._getUserName().displayName||"";e=typeof e=="number"?e:7;return r.length>e?r.substr(0,e)+(n||"..."):r}};var n={};n["isLogin"]=t._isLogin;n["render"]=t._render;n["addItem"]=t._addItem;n["getUserName"]=t._getUserName;n["run"]=t._run;n["getFixNickName"]=t._getFixNickName;if(typeof QNR==="undefined"){window["QNR"]={}}QNR["QUstatus"]=n;var r=function(){};r.prototype={getQueryString:function(e,t){try{var n=new RegExp("(^|&|\\?)"+t+"=([^&]*)(&|$)"),r;if(r=e.match(n)){return unescape(r[2])}return null}catch(i){return null}},setCookie:function(e,t,n,r,i){var s=n+"="+escape(r)+"; ";var o="path="+"/"+"; ";var u="domain="+e+";";var a=s+o+u;if(i){var f=new Date((new Date).getTime()+i*36e5);var l="expires="+f.toGMTString()+"; ";a=a+l}document.cookie=a},init:function(){var e=window.location.search;var t=this.getQueryString(e,"ex_track");if(t&&t.indexOf("bd_zhixin")===0){this.setCookie(".qunar.com","/","QN205","bdzx")}}};var i=new r;i.init()})()}(t.exports,t,e);e.____MODULES["b606551ab648394b9a7234773cbf6f82"]=t.exports})(this);(function(e){var t={id:"e5921b50a3d3d91e99b0b2807c5fc360",filename:"browser_upgrade.js",exports:{}};if(!e.____MODULES){e.____MODULES={}}var n=function(e,t,n){(function(){function r(e){return document.getElementById(e)}function s(e){var t=/(windows)/;return t.test(e)}function o(e){function l(e){var i=r.exec(e)||t.exec(e)||n.exec(e)||s.exec(e)||o.exec(e)||u.exec(e)||e.indexOf("compatible")<0&&a.exec(e)||[];return{browser:i[1]||"",version:i[2]||"0"}}var t=/(chrome)[ \/](\d+)/,n=/(safari)/,r=/(360se|360ee)/,i=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,o=/(msie) (\d+)/,u=/(firefox)[ \/](\d+)/,a=/(mozilla)(?:.*? rv:(\d+))?/,f=/netscape/;browserMatch=l(e);var c={};if(browserMatch.browser){c[browserMatch.browser]=true;c.version=browserMatch.version}return c}function u(){try{if(/maxthon/.test(i)){return true}else{return false}}catch(e){return false}}function a(){try{var e=/(maxthon)[ \/](\d+)/.exec(i);if(e){return e[2]}else{var t=window.external.max_version;var n=t.split(".")[0];if(n){return n}else{return 0}}}catch(r){return 0}}function f(e,t){if(/opera|the world|qqbrowser|tencenttraveler|theworld/.test(t)){return 2}else{var n=u();if(n){var r=a();return r<4?1:0}else if(t.indexOf("se 2.x")>-1){if(e.chrome){return e.version<18?1:0}else if(/metasr/.test(t)){return 0}else{return 1}}else if(e.msie){return e.version<=7?1:0}else if(e.chrome){return e.version<18?1:0}else if(e.firefox){return e.version<12?1:0}}return 0}function l(){if(d(e)==1){if(r(t)){r(t).style.display="none"}return}var n=o(i);var u=f(n,i);var a=s(i);if(u===1){v("您目前的浏览器版本过低，可能导致网站部分功能无法正常使用，建议尽快升级您的浏览器")}else if(u===2){if(a){v('为保证您能顺畅体验去哪儿网的服务，建议改用 <a href = "http://windows.microsoft.com/zh-cn/internet-explorer/download-ie" target="_blank" rel="nofollow">Internet Explorer</a>、<a href = "http://www.google.cn/intl/zh-CN/chrome/browser/" target="_blank" rel="nofollow">Google Chrome</a>、<a href = "http://firefox.com.cn/download/" target="_blank" rel="nofollow">Mozilla Firefox</a> 等浏览器。')}else{v('为保证您能顺畅体验去哪儿网的服务，建议改用 <a href = "http://www.google.cn/intl/zh-CN/chrome/browser/" target="_blank" rel="nofollow">Google Chrome</a>、<a href = "http://firefox.com.cn/download/" target="_blank" rel="nofollow">Mozilla Firefox</a> 等浏览器。')}}}function c(){var e=r(n);if(e)e.onclick=function(e){e=e||window.event;if(e.preventDefault){e.preventDefault()}else{e.returnValue=false}h()}}function h(){var n=r(t);if(n)n.style.display="none";p(e,1,2592e3,"/","qunar.com")}function p(e,t){var n=new Date;var r=arguments,i=r.length;var s=i>2?r[2]:null;var o=i>3?r[3]:null;var u=i>4?r[4]:null;var a=i>5?r[5]:false;if(s!=null)n.setTime(n.getTime()+s*1e3);document.cookie=e+"="+escape(t)+(s==null?"":"; expires="+n.toGMTString())+(o==null?"":"; path="+o)+(u==null?"":"; domain="+u)+(a==true?"; secure":"")}function d(e){var t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]*)(;|$)"));if(t!=null)return unescape(t[2]);return null}function v(e){var n=document.getElementsByTagName("body")[0];var r=n.firstChild;var i=document.createElement("div");i.id=t;i.className="qhf_sysnotice";i.innerHTML=['<div class="qhf_sysnotice_info"><a id="up_notice_close" href="#" title="不再提示" class="qhf_sysnotice_close"></a>',e,"</div>"].join("");n.insertBefore(i,r);setTimeout(c,0)}var e="QN38",t="up_notice_wrap",n="up_notice_close";var i=navigator.userAgent.toLowerCase();l()})()}(t.exports,t,e);e.____MODULES["e5921b50a3d3d91e99b0b2807c5fc360"]=t.exports})(this);(function(e){var t={id:"e8abaff59060e5d30de242b97d4c7153",filename:"nav.js",exports:{}};if(!e.____MODULES){e.____MODULES={}}var n=function(e,t,n){(function(){mini=document.getElementById("__header_mininav__");if(mini){return}var e=window["QNR"]["hfUtils"],t=["package","travel","piao","tuan","jr","ddr"],n,r=document.getElementById("__header_nav_tags__"),i=document.getElementById("__header_navmore__"),s=document.getElementById("__header_navmore_con__"),o=r.children,u="",a=null,f=Math.floor(Math.random()*o.length);a=e.getElementsByClassName(document,"q_header_main");if(a&&a.length>0){a=a[0];u=a.getAttribute("data-hfchannel")}n=function(t){var n=document.getElementById("__header_aside_"+t+"__"),r=n.children,i,s,o,a;for(var f=0;f<r.length;f++){if(r[f].tagName.toLowerCase()==="a"){e.bindEvent(r[f],"click",function(){e.GA.clk(t+"|"+this.innerHTML.replace(/.*<span>|<\/span>.*/gi,""),170)})}}if(!!n&&u&&u!==t){a=document.getElementById("__link_"+t+"__");target=a.parentNode;fnIn=function(e){if(!!i)clearTimeout(i);i=setTimeout(function(){a.className=a.className.replace(" q_header_hover ","");a.className=a.className+" q_header_hover ";n.style.display="block"},100);return false};fnOut=function(e){if(!!i)clearTimeout(i);i=setTimeout(function(){a.className=a.className.replace(" q_header_hover ","");n.style.display="none"},100);return false};e.bindEvent(target,"mouseover",fnIn);e.bindEvent(target,"mouseout",fnOut);e.bindEvent(n,"mouseover",fnIn);e.bindEvent(n,"mouseout",fnOut)}};for(var l=0;l<t.length;l++){n(t[l])}o[f]&&(o[f].style.display="block");if(!!i){e.bindEvent(i,"mouseover",function(){i.className=i.className.replace(" q_header_hover ","");i.className=i.className+" q_header_hover ";s.style.display="block"});e.bindEvent(i,"mouseout",function(){i.className=i.className.replace(" q_header_hover ","");s.style.display="none"})}})()}(t.exports,t,e);e.____MODULES["e8abaff59060e5d30de242b97d4c7153"]=t.exports})(this);(function(e){var t={id:"0c56e80b5a95ac65f85728e6aeff58ec",filename:"orderTips.js",exports:{}};if(!e.____MODULES){e.____MODULES={}}var n=function(e,t,n){(function(){function e(e){return document.getElementById(e)}function t(e,t){if(document.documentElement.contains){return e!==t&&(e.contains?e.contains(t):true)}else if(document.documentElement.compareDocumentPosition){return!!(e.compareDocumentPosition(t)&16)}else{return false}}function n(e){if(String.prototype.trim){return e.trim()}return e.replace(/^\s+/,"").replace(/\s+$/,"")}function r(e){var t={};var r=document.cookie.split(";");for(var i=0;i<r.length;i++){var s=r[i];var o=s.split("=");if(s.indexOf("=")!=-1)t[n(o[0])]=n(o[1])}if(!!t[e]){return decodeURIComponent(t[e])}else{return null}}var i=encodeURIComponent;var s="http://user.qunar.com/order/query.jsp?ret=";var o={eventBind:function(){var n=e("__orderInfo_l__");var r;e("__orderInfo_b__").onmouseover=function(){n.className="q_header_tnav_omenu q_header_tnav_omenu_hover"};e("__orderInfo_l__").onmouseout=function(e){e=e||window.event;r=e.relatedTarget||e.toElement;if(r!==null&&!t(this,r)){this.className="q_header_tnav_omenu"}}},updateUI:function(t){var n={_ele:e("__tnav_card_order__"),_href:"http://order.qunar.com/qunar_card/?t=1 ",_href1:"https://user.qunar.com/passport/login.jsp?ret=http://order.qunar.com/qunar_card/?t=1"};if(!!t){var r=e("q_header_tnav_omenu_link");r.href="http://order.qunar.com/"}if(t){n["_ele"].href=n["_href"]}else{n["_ele"].href=n["_href1"]}},run:function(){var e=this;e.eventBind();var t=r("_q")||null;e.updateUI(t)}};if(e("__orderInfo_l__")){o.run()}})()}(t.exports,t,e);e.____MODULES["0c56e80b5a95ac65f85728e6aeff58ec"]=t.exports})(this);(function(e){var t={id:"9d16e922f006bc42f68977c83f58069e",filename:"clickStatics.js",exports:{}};if(!e.____MODULES){e.____MODULES={}}var n=function(e,t,n){(function(){var e=window["QNR"]["hfUtils"]["GA"];var t=["home","flight","hotel","tuan","package","train","travel","gongyu","piao","ddr","car","bus","card","app","guide","jr","app_navmore","guide_navmore"];t=t.concat(["hotelzt","contact"]);t=t.concat(["orderFlight","orderHotel","orderApartment","orderTuan","orderTrain","orderPiao","orderVacation","orderDdr","orderCar","orderFlightorder"]);var n={hotelzt:"1265",contact:"170"};for(var r=0,i=t.length;r<i;r++){var s=document.getElementById("__link_"+t[r]+"__");if(!!s){s.onclick=function(){try{var t=this.id.replace(/link|\s|_|navmore/g,"");e.clk(t,n[t]||170)}catch(r){}}}}var o=document.getElementById("__link_mall__"),u,a;if(o){u=o.getAttribute("href");domain=window.location.host.replace(/\.(.*)$|^www/,"");o.href=u+"?from="+domain+"topheader"}})()}(t.exports,t,e);e.____MODULES["9d16e922f006bc42f68977c83f58069e"]=t.exports})(this);(function(e){var t={id:"79fe52a59ae6ab831843e07492f770c8",filename:"messageTip.js",exports:{}};if(!e.____MODULES){e.____MODULES={}}var n=function(e,t,n){(function(){function A(e){if(e===""||e===null||typeof e==="undefined"){return true}else{return false}}function O(){var e=n.getCookie("_q");if(e&&/^U\./.test(e)){g=e.replace(/^U\./,"").replace(/"/g,"");n.setCookie("QN44",g,null,"/","qunar.com")}}function M(){var e=document.getElementById("q_header_btn_message");e.onclick=function(){p.clk("点击消息按钮",1625);top.location.href="http://user.qunar.com/index.jsp?p_message#message"};n.bindEvent(y,"click",function(e){var t=n.hasClass;var r=e.relatedTarget||e.srcElement;var i=r.parentNode;var s;if(t(r,"q_header_qm_link")||t(r,"q_header_qm_link2")){s=i.innerText||i.textContent;p.clk(s,"1625")}else if(t(r,"qm_foote_right")){s=r.innerText||r.textContent;p.clk(s,"1625")}})}function _(){n.bindEvent(b,"mouseover",function(){if(!n.hasClass(this.parentNode,"qm-hide-dp")){n.addClass(y,"q_header_qm_hover");x.setAttribute("aria-hidden","false");T.setAttribute("aria-hidden","true")}t("onmouseover")});n.bindEvent(y,"mouseout",function(e){var r=e.relatedTarget||e.toElement;if(r!==null&&r!==y&&!n.contains(y,r)){n.removeClass(y,"q_header_qm_hover");x.setAttribute("aria-hidden","ture");if(n.hasClass(y,"q_header_qm_autoshow")){T.setAttribute("aria-hidden","false")}}t("onmouseout")});n.bindEvent(C,"click",function(e){var t=e.srcElement||e.target;if(t.className.indexOf("q_header_qm_close")>=0){var r=function(){n.removeClass(y,"q_header_qm_autoshow");T.setAttribute("aria-hidden","true");X()};I(r)}});n.bindEvent(N,"click",function(e){var t=e.srcElement||e.target;var r=t.getAttribute("autoshow");if((r===false||r==="false")&&t.className.indexOf("q_header_qm_link")>=0){var i,s,o,u,a,f;i=t.getAttribute("msgids");if(i){u="source=ucenter&messageIds="+i;a="https://user.qunar.com/webapi/message/mark_read"}else{s=t.getAttribute("product");o=n.getCookie("QN44");a="https://user.qunar.com/webApi/unpayclear.jsp";u="format=js&product="+s+"&username="+o}f=function(e){if(e.ret){P()}};n.jsonpCall(a,u,f)}})}function D(){y=document.getElementById("li_message");if(y)return;y=document.createElement("li");var e=n.getElementsByClassName(document.body,"q_header_tnav")[0];var t=n.getElementsByClassName(e,"q_header_tnav_omenu")[0];y.className="q_header_message qm-hide-dp ";y.id="li_message";y.innerHTML='<div class="q_header_qm_inner"><a id="q_header_btn_message" href="http://user.qunar.com/message/list" class="q_header_message_number" aria-haspop="true"><i></i><span class="qm_text">消息</span><b class="q_header_message_count "></b><b class="q_header_qm_arrow"></b></a></div><div class="q_header_qm_dp qm_dp_autoshow" aria-hidden="true"><div class="q_header_qm_body"></div></div><div class="q_header_qm_dp q_header_qm_dp_hover" aria-hidden="true"><div class="q_header_qm_body"><div class="q_header_qm_no_msg">暂无新消息</div></div><div class="q_header_qm_footer"><a class="qm_foote_right" target="_blank" href="http://user.qunar.com/message/list">查看更多</a></div>';b=n.getElementsByClassName(y,"q_header_qm_inner")[0];x=n.getElementsByClassName(y,"q_header_qm_dp_hover")[0];T=n.getElementsByClassName(y,"qm_dp_autoshow")[0];N=n.getElementsByClassName(x,"q_header_qm_body")[0];C=n.getElementsByClassName(T,"q_header_qm_body")[0];t.parentNode.insertBefore(y,t)}function P(){s=0;var e=n.getCookie("QN44");if(l===0||v==="half"||i()){B();if(l===0){j(true)}else if(v==="login"){j()}H();l+=1}else{if(A(e)&&v!=="half"){O()}else{s=1;w={total_num:0,list:[]};j(true);H();l+=1}}L=setTimeout(P,a*f*1e3)}function H(){var e="1111222244";f=e.charAt(l)||8}function B(){var e=d+"//user.qunar.com/webapi/message/unreadTipList";var t=function(e){if(e.ret){w=e.data;v=w.login_status||"no";s=s^1;if(s===11){F()}}else{v="no"}};var r="";n.jsonpCall(e,r,t)}function j(e){var t=d+"//user.qunar.com/webApi/unpaycount.jsp";var r=n.getCookie("QN44");var i="format=js&username="+r;var o="http://user.qunar.com/order/query.jsp?ret=";var a="http%3A%2F%2Forder.qunar.com%2F";var f={hotel:{url:a+"hotel%2F%3Ffrom%3Dmyorder",name:"酒店",sort:0,v:1},flight:{url:"http%3A%2F%2Fflight.order.qunar.com%2Fflight",name:"机票",sort:1,v:0},tuan:{url:a+"group",name:"团购",sort:2,v:3},vacation:{url:"http%3A%2F%2Fdujia.qunar.com%2Fmyorder.jsp%3Ffrom%3Dmyorder",name:"度假",sort:3,v:4},train:{url:a+"train?t=1",name:"火车票",sort:4,v:6},piao:{url:a+"ticket?t=1",name:"门票",sort:5,v:5},car:{url:a+"car?t=1",name:"车车",sort:6,v:7},apartment:{url:a+"apartment?t=1",name:"公寓",sort:7,v:2},ddr:{url:a+"local?t=1",name:"当地人",sort:8,v:9},bus:{url:a+"bus?t=1",name:"汽车",sort:9,v:10},flightorder:{url:"http%3A%2F%2Ftinfo.qunar.com%2Forder%2Fmytickets%3Fcatalog%3Dmysubscribe",name:"机票预约",sort:10,v:8}};var l=function(t){if(t.ret){var r=t.data;if(r&&typeof r==="object"&&r.total>0){var i,a,l=r.vacation,c=r.visible;if(!!e){E=[];for(var p in r){var d=r[p];if(d>0&&r.hasOwnProperty(p)&&f.hasOwnProperty(p)){var v=f[p];var m=+c[v.v];var g={count:d,autoShow:!!m,sort:v.sort<<16|+d.count,url:o+v.url,message:"个"+v.name+"订单待支付",urlName:m?"立即支付":"查看",product:p};E.push(g)}}}else{if(l>0){var d=Boolean(+c[4]);E=[{count:l,autoShow:d,sort:(4<<16)+l,url:o+f.vacation.url,message:"个度假订单待支付",urlName:d?"立即支付":"查看",product:"vacation"}]}}a=+r.lasttime;i=a+u- +(new Date);if(a>0){if(h!==a&&!n.getCookie("_q")){n.setCookie("QN44",n.getCookie("QN44"),i/1e3,"/","qunar.com")}}else{h=a}}else{E=null}}else{E=null}s=s^10;if(s===11){F()}};n.jsonpCall(t,i,l)}function F(){var e,r,i,s;if(E){w=n.extend({},{total_num:0,other:0,list:[]},w);for(var o=E.length-1;o>=0;o--){w.total_num+=E[o].count}if(!w.list){w.list=[]}w.list=w.list.concat(E)}if(w.hasOwnProperty("list")&&w.list.length>0){w.list.sort(function(e,t){return e.sort>t.sort?1:-1})}if(typeof JSON==="object"&&JSON.stringify&&typeof S!=="undefined"&&JSON.stringify(w)===JSON.stringify(S)){if(m===0&&n.hasClass(y,"q_header_qm_autoshow")){n.removeClass(y,"q_header_qm_autoshow");T.setAttribute("aria-hidden","true")}else if(m>0&&!n.hasClass(y,"q_header_qm_autoshow")){n.addClass(y,"q_header_qm_autoshow");T.setAttribute("aria-hidden","false");U();if(e)W(e)}return}S=w;m=J();r=document.getElementById("q_header_btn_message");i=r.getElementsByTagName("i")[0];s=n.getElementsByClassName(r,"q_header_message_count")[0];e=K();n.removeClass(i,"q_header_message_red");n.removeClass(s,"q_header_message_n");n.removeClass(r,"q_header_message_number");n.removeClass(y,"q_has_message");s.innerHTML="";if(S.total_num>0){var u=S.list;for(var a=0;a<u.length;a++){var f=u[a];if(f.url==="https://pay.qunar.com/member"){f.url=f.url+"/"}}n.addClass(i,"q_header_message_red");n.addClass(r,"q_header_message_number");n.addClass(y,"q_has_message");n.removeClass(y,"qm-hide-dp");if(S.total_num<10){s.innerHTML=S.total_num}else{s.innerHTML="9<small>+</small>"}if(m>0){n.addClass(y,"q_header_qm_autoshow");T.setAttribute("aria-hidden","false");U();W(e)}else{X();n.removeClass(y,"q_header_qm_autoshow");T.setAttribute("aria-hidden","true")}z();M();r=null;i=null;c=0}else{n.addClass(y,"qm-hide-dp");if(S.other>0){n.addClass(i,"q_header_message_red")}if(c===10){n.setCookie("QN44","",0,"/","qunar.com");h=0}if(n.hasClass(y,"q_header_qm_autoshow")){n.removeClass(s,"q_header_qm_autoshow");T.setAttribute("aria-hidden","ture");X();c=0}else{c+=1}t(c)}window.QNR.hfUtils.onMessageRequestComplete()}function I(e){q(e);R(e)}function q(e){var t=d+"//user.qunar.com/webapi/message/hideHeaderTipListCell";var r="";var i=function(t){if(t.ret){if(typeof e==="function"&&o===0){e();o=1}}};n.jsonpCall(t,r,i)}function R(e){var t=d+"//user.qunar.com/webApi/unpayclear.jsp";var r="format=js&username="+n.getCookie("QN44");var i=function(t){if(t.ret===t.errmsg===true&&o===0){if(typeof e==="function"){e();o=1}}};n.jsonpCall(t,r,i)}function U(){var e=S.list.length,t=0;C.innerHTML='<a class="q_header_qm_close" title="关闭"></a>';for(var n=0;n<e;n++){var r=S.list[n];if(t<3&&!!r.autoShow){var i=new $(r);t+=1;C.appendChild(i._dom)}}}function z(){N.innerHTML="";n.removeClass(y,"qm-hide-dp");if(S.total_num===0){N.innerHTML='<div class="q_header_qm_no_msg">暂无新消息</div>';return}if(S.list&&S.list.length>0){for(var e=0,t=S.list.length;e<t&&e<3;e++){var r=S.list[e],i;i=new V(r);N.appendChild(i._dom)}}else{n.addClass(y,"qm-hide-dp")}}function W(e){var t=0,n,i;if(!e){return}if(e<=0){return}if(k){X()}n=(""+e).length+6;i={"-1":"【"+e+"个订单待支付】",0:"【"+(new Array(n)).join("　")+"】"};(function s(){t=~t;document.title=i[t]+r;k=setTimeout(function(){s()},1e3)})()}function X(){clearTimeout(k);document.title=r}function V(e){var t=this;t._data=e;t._dom=document.createElement("div");n.addClass(this._dom,"q_header_qm_item");t._dom.innerHTML='<span class="q_header_qm_red">'+t._data.count+'</span ><span class="q_header_qm_word">'+t._data.message+'</span><a class="q_header_qm_link" target="_blank" autoshow="'+t._data.autoShow+'" product="'+(t._data.product||"")+'" '+'msgids="'+(t._data.msgIds?t._data.msgIds.join(","):"")+'" href="'+t._data.url+'">'+t._data.urlName+"</a>"}function $(e){var t=this;t._data=e;t._dom=document.createElement("div");n.addClass(this._dom,"q_header_qm_item");t._dom.innerHTML='<span class="q_header_qm_red">'+e.count+'</span><span class="q_header_qm_word">'+e.message+'</span><a class="q_header_qm_link2" target="_blank" href="'+e.url+'">'+e.urlName+"</a>"}function J(){var e=S&&S.list,t=0;if(e){for(var n=0,r=e.length;n<r&&n<3;n++){var i=e[n];if(i.autoShow)t+=+i.count}}return t}function K(){var e=S&&S.list,t=0;if(e){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.urlName==="立即支付"){t+=+r.count}}}return t}var e=false;var t=function(){if(e&&typeof console!="undefined"&&console.log){console.log(arguments[0])}};var n=window.QNR.hfUtils,r=document.title,i=function(){var e=n.getCookie("QN44");return!!e&&!/^G\.(.+)/.test(e)},s=0,o=0,u=864e5,a=15,f=1,l=0,c=0,h=0,p=window.QNR.hfUtils.GA,d=window.location.protocol,v="no",m=0,g,y,b,w,E,S,x,T,N,C,k,L;O();D();P();_();window.QNR.hfUtils.getMessages=B;window.QNR.hfUtils.getData=P;window.QNR.hfUtils.onMessageRequestComplete=function(){};window.QNR.hfUtils.dataStateCode=s})()}(t.exports,t,e);e.____MODULES["79fe52a59ae6ab831843e07492f770c8"]=t.exports})(this);(function(e){var t={id:"dab251d6cc8d4a6a651ce5d07eeeab93",filename:"ctrip.js",exports:{}};if(!e.____MODULES){e.____MODULES={}}var n=function(e,t,n){(function(){function i(e,t){window["_qheader_ctrip_callcallback"]=t;var n=document.createElement("script");n.src=e+"?callback=_qheader_ctrip_callcallback";var r=document.getElementsByTagName("head");if(r&&r[0]){r[0].appendChild(n)}}function s(){i(e,function(e){if(e&&e.u_vid){o(e.u_vid)}})}function o(e){var n=(new Date((new Date).getTime()+r*24*3600*1e3)).toGMTString();document.cookie=t+"="+e+";path=/;domain=qunar.com;expires="+n}function u(e){var t,n=new RegExp("(^| )"+e+"=([^;]*)(;|$)");if(t=document.cookie.match(n)){return unescape(t[2])}else{return null}}var e="//s.c-ctrip.com/universal-id.js";var t="QN269";var n="QN1";var r=30;if(u(t)===null||u(n)===null){s()}})()}(t.exports,t,e);e.____MODULES["dab251d6cc8d4a6a651ce5d07eeeab93"]=t.exports})(this);(function(e){var t={id:"62bbdfffcfd35e313a9faa376494dbc8",filename:"header_main.js",exports:{}};if(!e.____MODULES){e.____MODULES={}}var n=function(t,n,r){e.____MODULES["6622ac7ccae68449cb5ad9e50b3f9856"];e.____MODULES["b606551ab648394b9a7234773cbf6f82"];e.____MODULES["e5921b50a3d3d91e99b0b2807c5fc360"];e.____MODULES["e8abaff59060e5d30de242b97d4c7153"];e.____MODULES["0c56e80b5a95ac65f85728e6aeff58ec"];e.____MODULES["9d16e922f006bc42f68977c83f58069e"];e.____MODULES["79fe52a59ae6ab831843e07492f770c8"];e.____MODULES["dab251d6cc8d4a6a651ce5d07eeeab93"]}(t.exports,t,e);e.____MODULES["62bbdfffcfd35e313a9faa376494dbc8"]=t.exports})(this)