var build_date="Wed Feb  8 12:38:45 2012";build_date="Wed Feb  8 12:38:21 2012";var s2KeyCode={BACKSPACE:8,TAB:9,ENTER:13,ESC:27,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40};
(function(a,c){function d(m){return q.isWindow(m)?m:m.nodeType===9?m.defaultView||m.parentWindow:false}function b(m){if(!nb[m]){var o=q("<"+m+">").appendTo("body"),u=o.css("display");o.remove();if(u==="none"||u==="")u="block";nb[m]=u}return nb[m]}function f(m,o){var u={};q.each(qb.concat.apply([],qb.slice(0,o)),function(){u[this]=m});return u}function g(){try{return new a.XMLHttpRequest}catch(m){}}function h(){q(a).unload(function(){for(var m in eb)eb[m](0,1)})}function n(m,o,u,v){if(q.isArray(o)&&
o.length)q.each(o,function(B,F){u||Eb.test(m)?v(m,F):n(m+"["+(typeof F==="object"||q.isArray(F)?B:"")+"]",F,u,v)});else if(u||o==null||typeof o!=="object")v(m,o);else if(q.isArray(o)||q.isEmptyObject(o))v(m,"");else for(var y in o)n(m+"["+y+"]",o[y],u,v)}function p(m,o,u,v,y,B){y=y||o.dataTypes[0];B=B||{};B[y]=true;y=m[y];for(var F=0,V=y?y.length:0,T=m===ob,R;F<V&&(T||!R);F++){R=y[F](o,u,v);typeof R==="string"&&(!T||B[R]?R=c:(o.dataTypes.unshift(R),R=p(m,o,u,v,R,B)))}(T||!R)&&!B["*"]&&(R=p(m,o,u,
v,"*",B));return R}function t(m){return function(o,u){typeof o!=="string"&&(u=o,o="*");if(q.isFunction(u))for(var v=o.toLowerCase().split(rb),y=0,B=v.length,F,V;y<B;y++){F=v[y];(V=/^\+/.test(F))&&(F=F.substr(1)||"*");F=m[F]=m[F]||[];F[V?"unshift":"push"](u)}}}function w(m,o,u){var v=o==="width"?m.offsetWidth:m.offsetHeight;if(u==="border")return v;q.each(o==="width"?Fb:Gb,function(){u||(v-=parseFloat(q.css(m,"padding"+this))||0);u==="margin"?v+=parseFloat(q.css(m,"margin"+this))||0:v-=parseFloat(q.css(m,
"border"+this+"Width"))||0});return v}function x(m,o){o.src?q.ajax({url:o.src,async:false,dataType:"script"}):q.globalEval(o.text||o.textContent||o.innerHTML||"");o.parentNode&&o.parentNode.removeChild(o)}function E(m){return"getElementsByTagName"in m?m.getElementsByTagName("*"):"querySelectorAll"in m?m.querySelectorAll("*"):[]}function L(m,o){if(o.nodeType===1){var u=o.nodeName.toLowerCase();o.clearAttributes();o.mergeAttributes(m);if(u==="object")o.outerHTML=m.outerHTML;else if(u!=="input"||m.type!==
"checkbox"&&m.type!=="radio")if(u==="option")o.selected=m.defaultSelected;else{if(u==="input"||u==="textarea")o.defaultValue=m.defaultValue}else{m.checked&&(o.defaultChecked=o.checked=m.checked);o.value!==m.value&&(o.value=m.value)}o.removeAttribute(q.expando)}}function Q(m,o){if(o.nodeType===1&&q.hasData(m)){var u=q.expando,v=q.data(m),y=q.data(o,v);if(v=v[u]){var B=v.events;y=y[u]=q.extend({},v);if(B){delete y.handle;y.events={};for(var F in B){u=0;for(v=B[F].length;u<v;u++)q.event.add(o,F+(B[F][u].namespace?
".":"")+B[F][u].namespace,B[F][u],B[F][u].data)}}}}}function O(m,o,u){if(q.isFunction(o))return q.grep(m,function(y,B){return!!o.call(y,B,y)===u});if(o.nodeType)return q.grep(m,function(y){return y===o===u});if(typeof o==="string"){var v=q.grep(m,function(y){return y.nodeType===1});if($a.test(o))return q.filter(o,v,!u);o=q.filter(o,v)}return q.grep(m,function(y){return q.inArray(y,o)>=0===u})}function I(m,o){return(m&&m!=="*"?m+".":"")+o.replace(ta,"`").replace(Na,"&")}function ba(m){var o,u,v,y,
B,F,V,T,R,da,pa,Ca=[];y=[];B=q._data(this,"events");if(m.liveFired!==this&&B&&B.live&&!m.target.disabled&&(!m.button||m.type!=="click")){m.namespace&&(pa=RegExp("(^|\\.)"+m.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)"));m.liveFired=this;var xa=B.live.slice(0);for(V=0;V<xa.length;V++){B=xa[V];B.origType.replace(Ba,"")===m.type?y.push(B.selector):xa.splice(V--,1)}y=q(m.target).closest(y,m.currentTarget);T=0;for(R=y.length;T<R;T++){da=y[T];for(V=0;V<xa.length;V++){B=xa[V];if(da.selector===B.selector&&
(!pa||pa.test(B.namespace))&&!da.elem.disabled){F=da.elem;v=null;if(B.preType==="mouseenter"||B.preType==="mouseleave"){m.type=B.preType;v=q(m.relatedTarget).closest(B.selector)[0]}(!v||v!==F)&&Ca.push({elem:F,handleObj:B,level:da.level})}}}T=0;for(R=Ca.length;T<R;T++){y=Ca[T];if(u&&y.level>u)break;m.currentTarget=y.elem;m.data=y.handleObj.data;m.handleObj=y.handleObj;pa=y.handleObj.origHandler.apply(y.elem,arguments);if(pa===false||m.isPropagationStopped()){u=y.level;pa===false&&(o=false);if(m.isImmediatePropagationStopped())break}}return o}}
function K(m,o,u){var v=q.extend({},u[0]);v.type=m;v.originalEvent={};v.liveFired=c;q.event.handle.call(o,v);v.isDefaultPrevented()&&u[0].preventDefault()}function C(){return true}function ka(){return false}function ua(m){for(var o in m)if(o!=="toJSON")return false;return true}function fa(m,o,u){if(u===c&&m.nodeType===1){u=m.getAttribute("data-"+o);if(typeof u==="string"){try{u=u==="true"?true:u==="false"?false:u==="null"?null:q.isNaN(u)?ya.test(u)?q.parseJSON(u):u:parseFloat(u)}catch(v){}q.data(m,
o,u)}else u=c}return u}var N=a.document,q=function(){function m(){if(!o.isReady){try{N.documentElement.doScroll("left")}catch(G){setTimeout(m,1);return}o.ready()}}var o=function(G,W){return new o.fn.init(G,W,y)},u=a.jQuery,v=a.$,y,B=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,F=/\S/,V=/^\s+/,T=/\s+$/,R=/\d/,da=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,pa=/^[\],:{}\s]*$/,Ca=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,xa=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ea=/(?:^|:|,)(?:\s*\[)+/g,Ma=/(webkit)[ \/]([\w.]+)/,
Ja=/(opera)(?:.*version)?[ \/]([\w.]+)/,Oa=/(msie) ([\w.]+)/,Sa=/(mozilla)(?:.*? rv:([\w.]+))?/,A=navigator.userAgent,J=false,X,S="then done fail isResolved isRejected promise".split(" "),U,aa=Object.prototype.toString,oa=Object.prototype.hasOwnProperty,na=Array.prototype.push,za=Array.prototype.slice,La=String.prototype.trim,Ka=Array.prototype.indexOf,Pa={};o.fn=o.prototype={constructor:o,init:function(G,W,ca){var ga,ra;if(!G)return this;if(G.nodeType){this.context=this[0]=G;this.length=1;return this}if(G===
"body"&&!W&&N.body){this.context=N;this[0]=N.body;this.selector="body";this.length=1;return this}if(typeof G==="string"){ga=B.exec(G);if(!ga||!ga[1]&&W)return!W||W.jquery?(W||ca).find(G):this.constructor(W).find(G);if(ga[1]){ra=(W=W instanceof o?W[0]:W)?W.ownerDocument||W:N;(ca=da.exec(G))?o.isPlainObject(W)?(G=[N.createElement(ca[1])],o.fn.attr.call(G,W,true)):G=[ra.createElement(ca[1])]:(ca=o.buildFragment([ga[1]],[ra]),G=(ca.cacheable?o.clone(ca.fragment):ca.fragment).childNodes);return o.merge(this,
G)}if((W=N.getElementById(ga[2]))&&W.parentNode){if(W.id!==ga[2])return ca.find(G);this.length=1;this[0]=W}this.context=N;this.selector=G;return this}if(o.isFunction(G))return ca.ready(G);G.selector!==c&&(this.selector=G.selector,this.context=G.context);return o.makeArray(G,this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return za.call(this,0)},get:function(G){return G==null?this.toArray():G<0?this[this.length+G]:this[G]},pushStack:function(G,W,ca){var ga=
this.constructor();o.isArray(G)?na.apply(ga,G):o.merge(ga,G);ga.prevObject=this;ga.context=this.context;W==="find"?ga.selector=this.selector+(this.selector?" ":"")+ca:W&&(ga.selector=this.selector+"."+W+"("+ca+")");return ga},each:function(G,W){return o.each(this,G,W)},ready:function(G){o.bindReady();X.done(G);return this},eq:function(G){return G===-1?this.slice(G):this.slice(G,+G+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(za.apply(this,
arguments),"slice",za.call(arguments).join(","))},map:function(G){return this.pushStack(o.map(this,function(W,ca){return G.call(W,ca,W)}))},end:function(){return this.prevObject||this.constructor(null)},push:na,sort:[].sort,splice:[].splice};o.fn.init.prototype=o.fn;o.extend=o.fn.extend=function(){var G,W,ca,ga,ra,Aa,Da=arguments[0]||{},Ga=1,Qa=arguments.length,Va=false;typeof Da==="boolean"&&(Va=Da,Da=arguments[1]||{},Ga=2);typeof Da!=="object"&&!o.isFunction(Da)&&(Da={});for(Qa===Ga&&(Da=this,--Ga);Ga<
Qa;Ga++)if((G=arguments[Ga])!=null)for(W in G){ca=Da[W];ga=G[W];if(Da!==ga)Va&&ga&&(o.isPlainObject(ga)||(ra=o.isArray(ga)))?(ra?(ra=false,Aa=ca&&o.isArray(ca)?ca:[]):Aa=ca&&o.isPlainObject(ca)?ca:{},Da[W]=o.extend(Va,Aa,ga)):ga!==c&&(Da[W]=ga)}return Da};o.extend({noConflict:function(G){a.$=v;G&&(a.jQuery=u);return o},isReady:false,readyWait:1,ready:function(G){G===true&&o.readyWait--;if(!o.readyWait||G!==true&&!o.isReady){if(!N.body)return setTimeout(o.ready,1);o.isReady=true;if(!(G!==true&&--o.readyWait>
0)){X.resolveWith(N,[o]);o.fn.trigger&&o(N).trigger("ready").unbind("ready")}}},bindReady:function(){if(!J){J=true;if(N.readyState==="complete")return setTimeout(o.ready,1);if(N.addEventListener){N.addEventListener("DOMContentLoaded",U,false);a.addEventListener("load",o.ready,false)}else if(N.attachEvent){N.attachEvent("onreadystatechange",U);a.attachEvent("onload",o.ready);var G=false;try{G=a.frameElement==null}catch(W){}N.documentElement.doScroll&&G&&m()}}},isFunction:function(G){return o.type(G)===
"function"},isArray:Array.isArray||function(G){return o.type(G)==="array"},isWindow:function(G){return G&&typeof G==="object"&&"setInterval"in G},isNaN:function(G){return G==null||!R.test(G)||isNaN(G)},type:function(G){return G==null?String(G):Pa[aa.call(G)]||"object"},isPlainObject:function(G){if(!G||o.type(G)!=="object"||G.nodeType||o.isWindow(G))return false;if(G.constructor&&!oa.call(G,"constructor")&&!oa.call(G.constructor.prototype,"isPrototypeOf"))return false;for(var W in G);return W===c||
oa.call(G,W)},isEmptyObject:function(G){for(var W in G)return false;return true},error:function(G){throw G;},parseJSON:function(G){if(typeof G!=="string"||!G)return null;G=o.trim(G);if(pa.test(G.replace(Ca,"@").replace(xa,"]").replace(Ea,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(G):(new Function("return "+G))();o.error("Invalid JSON: "+G)},parseXML:function(G,W,ca){a.DOMParser?(ca=new DOMParser,W=ca.parseFromString(G,"text/xml")):(W=new ActiveXObject("Microsoft.XMLDOM"),W.async="false",W.loadXML(G));
ca=W.documentElement;(!ca||!ca.nodeName||ca.nodeName==="parsererror")&&o.error("Invalid XML: "+G);return W},noop:function(){},globalEval:function(G){if(G&&F.test(G)){var W=N.head||N.getElementsByTagName("head")[0]||N.documentElement,ca=N.createElement("script");o.support.scriptEval()?ca.appendChild(N.createTextNode(G)):ca.text=G;W.insertBefore(ca,W.firstChild);W.removeChild(ca)}},nodeName:function(G,W){return G.nodeName&&G.nodeName.toUpperCase()===W.toUpperCase()},each:function(G,W,ca){var ga,ra=
0,Aa=G.length,Da=Aa===c||o.isFunction(G);if(ca)if(Da)for(ga in G){if(W.apply(G[ga],ca)===false)break}else for(;ra<Aa;){if(W.apply(G[ra++],ca)===false)break}else if(Da)for(ga in G){if(W.call(G[ga],ga,G[ga])===false)break}else for(ca=G[0];ra<Aa&&W.call(ca,ra,ca)!==false;ca=G[++ra]);return G},trim:La?function(G){return G==null?"":La.call(G)}:function(G){return G==null?"":(G+"").replace(V,"").replace(T,"")},makeArray:function(G,W){var ca=W||[];if(G!=null){var ga=o.type(G);G.length==null||ga==="string"||
ga==="function"||ga==="regexp"||o.isWindow(G)?na.call(ca,G):o.merge(ca,G)}return ca},inArray:function(G,W){if(W.indexOf)return W.indexOf(G);for(var ca=0,ga=W.length;ca<ga;ca++)if(W[ca]===G)return ca;return-1},merge:function(G,W){var ca=G.length,ga=0;if(typeof W.length==="number")for(var ra=W.length;ga<ra;ga++)G[ca++]=W[ga];else for(;W[ga]!==c;)G[ca++]=W[ga++];G.length=ca;return G},grep:function(G,W,ca){var ga=[],ra;ca=!!ca;for(var Aa=0,Da=G.length;Aa<Da;Aa++){ra=!!W(G[Aa],Aa);ca!==ra&&ga.push(G[Aa])}return ga},
map:function(G,W,ca){for(var ga=[],ra,Aa=0,Da=G.length;Aa<Da;Aa++){ra=W(G[Aa],Aa,ca);ra!=null&&(ga[ga.length]=ra)}return ga.concat.apply([],ga)},guid:1,proxy:function(G,W,ca){arguments.length===2&&(typeof W==="string"?(ca=G,G=ca[W],W=c):W&&!o.isFunction(W)&&(ca=W,W=c));!W&&G&&(W=function(){return G.apply(ca||this,arguments)});G&&(W.guid=G.guid=G.guid||W.guid||o.guid++);return W},access:function(G,W,ca,ga,ra,Aa){var Da=G.length;if(typeof W==="object"){for(var Ga in W)o.access(G,Ga,W[Ga],ga,ra,ca);
return G}if(ca!==c){ga=!Aa&&ga&&o.isFunction(ca);for(Ga=0;Ga<Da;Ga++)ra(G[Ga],W,ga?ca.call(G[Ga],Ga,ra(G[Ga],W)):ca,Aa);return G}return Da?ra(G[0],W):c},now:function(){return(new Date).getTime()},_Deferred:function(){var G=[],W,ca,ga,ra={done:function(){if(!ga){var Aa=arguments,Da,Ga,Qa,Va,Wa;W&&(Wa=W,W=0);Da=0;for(Ga=Aa.length;Da<Ga;Da++){Qa=Aa[Da];Va=o.type(Qa);Va==="array"?ra.done.apply(ra,Qa):Va==="function"&&G.push(Qa)}Wa&&ra.resolveWith(Wa[0],Wa[1])}return this},resolveWith:function(Aa,Da){if(!ga&&
!W&&!ca){ca=1;try{for(;G[0];)G.shift().apply(Aa,Da)}catch(Ga){throw Ga;}finally{W=[Aa,Da];ca=0}}return this},resolve:function(){ra.resolveWith(o.isFunction(this.promise)?this.promise():this,arguments);return this},isResolved:function(){return ca||W},cancel:function(){ga=1;G=[];return this}};return ra},Deferred:function(G){var W=o._Deferred(),ca=o._Deferred(),ga;o.extend(W,{then:function(ra,Aa){W.done(ra).fail(Aa);return this},fail:ca.done,rejectWith:ca.resolveWith,reject:ca.resolve,isRejected:ca.isResolved,
promise:function(ra){if(ra==null){if(ga)return ga;ga=ra={}}for(var Aa=S.length;Aa--;)ra[S[Aa]]=W[S[Aa]];return ra}});W.done(ca.cancel).fail(W.cancel);delete W.cancel;G&&G.call(W,W);return W},when:function(G){var W=arguments.length,ca=W<=1&&G&&o.isFunction(G.promise)?G:o.Deferred(),ga=ca.promise();if(W>1){for(var ra=za.call(arguments,0),Aa=W,Da=function(Ga){return function(Qa){ra[Ga]=arguments.length>1?za.call(arguments,0):Qa;--Aa||ca.resolveWith(ga,ra)}};W--;)(G=ra[W])&&o.isFunction(G.promise)?G.promise().then(Da(W),
ca.reject):--Aa;Aa||ca.resolveWith(ga,ra)}else ca!==G&&ca.resolve(G);return ga},uaMatch:function(G){G=G.toLowerCase();G=Ma.exec(G)||Ja.exec(G)||Oa.exec(G)||G.indexOf("compatible")<0&&Sa.exec(G)||[];return{browser:G[1]||"",version:G[2]||"0"}},sub:function(){function G(ca,ga){return new G.fn.init(ca,ga)}o.extend(true,G,this);G.superclass=this;G.fn=G.prototype=this();G.fn.constructor=G;G.subclass=this.subclass;G.fn.init=function ca(ca,ga){ga&&ga instanceof o&&!(ga instanceof G)&&(ga=G(ga));return o.fn.init.call(this,
ca,ga,W)};G.fn.init.prototype=G.fn;var W=G(N);return G},browser:{}});X=o._Deferred();o.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(G,W){Pa["[object "+W+"]"]=W.toLowerCase()});A=o.uaMatch(A);A.browser&&(o.browser[A.browser]=true,o.browser.version=A.version);o.browser.webkit&&(o.browser.safari=true);Ka&&(o.inArray=function(G,W){return Ka.call(W,G)});F.test(" ")&&(V=/^[\s\xA0]+/,T=/[\s\xA0]+$/);y=o(N);N.addEventListener?U=function(){N.removeEventListener("DOMContentLoaded",
U,false);o.ready()}:N.attachEvent&&(U=function(){N.readyState==="complete"&&(N.detachEvent("onreadystatechange",U),o.ready())});return o}();(function(){q.support={};var m=N.createElement("div");m.style.display="none";m.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var o=m.getElementsByTagName("*"),u=m.getElementsByTagName("a")[0],v=N.createElement("select"),y=v.appendChild(N.createElement("option")),B=m.getElementsByTagName("input")[0];
if(o&&o.length&&u){q.support={leadingWhitespace:m.firstChild.nodeType===3,tbody:!m.getElementsByTagName("tbody").length,htmlSerialize:!!m.getElementsByTagName("link").length,style:/red/.test(u.getAttribute("style")),hrefNormalized:u.getAttribute("href")==="/a",opacity:/^0.55$/.test(u.style.opacity),cssFloat:!!u.style.cssFloat,checkOn:B.value==="on",optSelected:y.selected,deleteExpando:true,optDisabled:false,checkClone:false,noCloneEvent:true,noCloneChecked:true,boxModel:null,inlineBlockNeedsLayout:false,
shrinkWrapBlocks:false,reliableHiddenOffsets:true};B.checked=true;q.support.noCloneChecked=B.cloneNode(true).checked;v.disabled=true;q.support.optDisabled=!y.disabled;var F=null;q.support.scriptEval=function(){if(F===null){var T=N.documentElement,R=N.createElement("script"),da="script"+q.now();try{R.appendChild(N.createTextNode("window."+da+"=1;"))}catch(pa){}T.insertBefore(R,T.firstChild);a[da]?(F=true,delete a[da]):F=false;T.removeChild(R)}return F};try{delete m.test}catch(V){q.support.deleteExpando=
false}!m.addEventListener&&m.attachEvent&&m.fireEvent&&(m.attachEvent("onclick",function T(){q.support.noCloneEvent=false;m.detachEvent("onclick",T)}),m.cloneNode(true).fireEvent("onclick"));m=N.createElement("div");m.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";o=N.createDocumentFragment();o.appendChild(m.firstChild);q.support.checkClone=o.cloneNode(true).cloneNode(true).lastChild.checked;q(function(){var T=N.createElement("div"),R=N.getElementsByTagName("body")[0];if(R){T.style.width=
T.style.paddingLeft="1px";R.appendChild(T);q.boxModel=q.support.boxModel=T.offsetWidth===2;"zoom"in T.style&&(T.style.display="inline",T.style.zoom=1,q.support.inlineBlockNeedsLayout=T.offsetWidth===2,T.style.display="",T.innerHTML="<div style='width:4px;'></div>",q.support.shrinkWrapBlocks=T.offsetWidth!==2);T.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var da=T.getElementsByTagName("td");q.support.reliableHiddenOffsets=da[0].offsetHeight===0;da[0].style.display=
"";da[1].style.display="none";q.support.reliableHiddenOffsets=q.support.reliableHiddenOffsets&&da[0].offsetHeight===0;T.innerHTML="";R.removeChild(T).style.display="none"}});o=function(T){var R=N.createElement("div");T="on"+T;if(!R.attachEvent)return true;var da=T in R;da||(R.setAttribute(T,"return;"),da=typeof R[T]==="function");return da};q.support.submitBubbles=o("submit");q.support.changeBubbles=o("change");m=o=u=null}})();var ya=/^(?:\{.*\}|\[.*\])$/;q.extend({cache:{},uuid:0,expando:"jQuery"+
(q.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(m){m=m.nodeType?q.cache[m[q.expando]]:m[q.expando];return!!m&&!ua(m)},data:function(m,o,u,v){if(q.acceptData(m)){var y=q.expando,B=typeof o==="string",F=m.nodeType,V=F?q.cache:m,T=F?m[q.expando]:m[q.expando]&&q.expando;if(!((!T||v&&T&&!V[T][y])&&B&&u===c)){T||(F?m[q.expando]=T=++q.uuid:T=q.expando);V[T]||(V[T]={},F||(V[T].toJSON=q.noop));if(typeof o===
"object"||typeof o==="function")v?V[T][y]=q.extend(V[T][y],o):V[T]=q.extend(V[T],o);m=V[T];v&&(m[y]||(m[y]={}),m=m[y]);u!==c&&(m[o]=u);if(o==="events"&&!m[o])return m[y]&&m[y].events;return B?m[o]:m}}},removeData:function(m,o,u){if(q.acceptData(m)){var v=q.expando,y=m.nodeType,B=y?q.cache:m,F=y?m[q.expando]:q.expando;if(B[F]){if(o){var V=u?B[F][v]:B[F];if(V){delete V[o];if(!ua(V))return}}if(u){delete B[F][v];if(!ua(B[F]))return}o=B[F][v];q.support.deleteExpando||B!=a?delete B[F]:B[F]=null;o?(B[F]=
{},y||(B[F].toJSON=q.noop),B[F][v]=o):y&&(q.support.deleteExpando?delete m[q.expando]:m.removeAttribute?m.removeAttribute(q.expando):m[q.expando]=null)}}},_data:function(m,o,u){return q.data(m,o,u,true)},acceptData:function(m){if(m.nodeName){var o=q.noData[m.nodeName.toLowerCase()];if(o)return o!==true&&m.getAttribute("classid")===o}return true}});q.fn.extend({data:function(m,o){var u=null;if(typeof m==="undefined"){if(this.length){u=q.data(this[0]);if(this[0].nodeType===1)for(var v=this[0].attributes,
y,B=0,F=v.length;B<F;B++){y=v[B].name;y.indexOf("data-")===0&&(y=y.substr(5),fa(this[0],y,u[y]))}}return u}if(typeof m==="object")return this.each(function(){q.data(this,m)});var V=m.split(".");V[1]=V[1]?"."+V[1]:"";if(o===c){u=this.triggerHandler("getData"+V[1]+"!",[V[0]]);u===c&&this.length&&(u=q.data(this[0],m),u=fa(this[0],m,u));return u===c&&V[1]?this.data(V[0]):u}return this.each(function(){var T=q(this),R=[V[0],o];T.triggerHandler("setData"+V[1]+"!",R);q.data(this,m,o);T.triggerHandler("changeData"+
V[1]+"!",R)})},removeData:function(m){return this.each(function(){q.removeData(this,m)})}});q.extend({queue:function(m,o,u){if(m){o=(o||"fx")+"queue";var v=q._data(m,o);if(!u)return v||[];!v||q.isArray(u)?v=q._data(m,o,q.makeArray(u)):v.push(u);return v}},dequeue:function(m,o){o=o||"fx";var u=q.queue(m,o),v=u.shift();v==="inprogress"&&(v=u.shift());v&&(o==="fx"&&u.unshift("inprogress"),v.call(m,function(){q.dequeue(m,o)}));u.length||q.removeData(m,o+"queue",true)}});q.fn.extend({queue:function(m,
o){typeof m!=="string"&&(o=m,m="fx");if(o===c)return q.queue(this[0],m);return this.each(function(){var u=q.queue(this,m,o);m==="fx"&&u[0]!=="inprogress"&&q.dequeue(this,m)})},dequeue:function(m){return this.each(function(){q.dequeue(this,m)})},delay:function(m,o){m=q.fx?q.fx.speeds[m]||m:m;o=o||"fx";return this.queue(o,function(){var u=this;setTimeout(function(){q.dequeue(u,o)},m)})},clearQueue:function(m){return this.queue(m||"fx",[])}});var la=/[\n\t\r]/g,z=/\s+/,D=/\r/g,H=/^(?:href|src|style)$/,
M=/^(?:button|input)$/i,Z=/^(?:button|input|object|select|textarea)$/i,ha=/^a(?:rea)?$/i,qa=/^(?:radio|checkbox)$/i;q.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};q.fn.extend({attr:function(m,o){return q.access(this,m,o,true,q.attr)},removeAttr:function(m){return this.each(function(){q.attr(this,m,"");this.nodeType===1&&this.removeAttribute(m)})},
addClass:function(m){if(q.isFunction(m))return this.each(function(R){var da=q(this);da.addClass(m.call(this,R,da.attr("class")))});if(m&&typeof m==="string")for(var o=(m||"").split(z),u=0,v=this.length;u<v;u++){var y=this[u];if(y.nodeType===1)if(y.className){for(var B=" "+y.className+" ",F=y.className,V=0,T=o.length;V<T;V++)B.indexOf(" "+o[V]+" ")<0&&(F+=" "+o[V]);y.className=q.trim(F)}else y.className=m}return this},removeClass:function(m){if(q.isFunction(m))return this.each(function(T){var R=q(this);
R.removeClass(m.call(this,T,R.attr("class")))});if(m&&typeof m==="string"||m===c)for(var o=(m||"").split(z),u=0,v=this.length;u<v;u++){var y=this[u];if(y.nodeType===1&&y.className)if(m){for(var B=(" "+y.className+" ").replace(la," "),F=0,V=o.length;F<V;F++)B=B.replace(" "+o[F]+" "," ");y.className=q.trim(B)}else y.className=""}return this},toggleClass:function(m,o){var u=typeof m,v=typeof o==="boolean";if(q.isFunction(m))return this.each(function(y){var B=q(this);B.toggleClass(m.call(this,y,B.attr("class"),
o),o)});return this.each(function(){if(u==="string")for(var y,B=0,F=q(this),V=o,T=m.split(z);y=T[B++];){V=v?V:!F.hasClass(y);F[V?"addClass":"removeClass"](y)}else if(u==="undefined"||u==="boolean"){this.className&&q._data(this,"__className__",this.className);this.className=this.className||m===false?"":q._data(this,"__className__")||""}})},hasClass:function(m){m=" "+m+" ";for(var o=0,u=this.length;o<u;o++)if((" "+this[o].className+" ").replace(la," ").indexOf(m)>-1)return true;return false},val:function(m){if(!arguments.length){var o=
this[0];if(o){if(q.nodeName(o,"option")){var u=o.attributes.value;return!u||u.specified?o.value:o.text}if(q.nodeName(o,"select")){u=o.selectedIndex;var v=[],y=o.options;o=o.type==="select-one";if(u<0)return null;for(var B=o?u:0,F=o?u+1:y.length;B<F;B++){var V=y[B];if(V.selected&&(q.support.optDisabled?!V.disabled:V.getAttribute("disabled")===null)&&(!V.parentNode.disabled||!q.nodeName(V.parentNode,"optgroup"))){m=q(V).val();if(o)return m;v.push(m)}}if(o&&!v.length&&y.length)return q(y[u]).val();return v}if(qa.test(o.type)&&
!q.support.checkOn)return o.getAttribute("value")===null?"on":o.value;return(o.value||"").replace(D,"")}return c}var T=q.isFunction(m);return this.each(function(R){var da=q(this),pa=m;if(this.nodeType===1){T&&(pa=m.call(this,R,da.val()));pa==null?pa="":typeof pa==="number"?pa+="":q.isArray(pa)&&(pa=q.map(pa,function(xa){return xa==null?"":xa+""}));if(q.isArray(pa)&&qa.test(this.type))this.checked=q.inArray(da.val(),pa)>=0;else if(q.nodeName(this,"select")){var Ca=q.makeArray(pa);q("option",this).each(function(){this.selected=
q.inArray(q(this).val(),Ca)>=0});Ca.length||(this.selectedIndex=-1)}else this.value=pa}})}});q.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(m,o,u,v){if(!m||m.nodeType===3||m.nodeType===8||m.nodeType===2)return c;if(v&&o in q.attrFn)return q(m)[o](u);v=m.nodeType!==1||!q.isXMLDoc(m);var y=u!==c;o=v&&q.props[o]||o;if(m.nodeType===1){var B=H.test(o);if((o in m||m[o]!==c)&&v&&!B){y&&(o==="type"&&M.test(m.nodeName)&&m.parentNode&&q.error("type property can't be changed"),
u===null?m.nodeType===1&&m.removeAttribute(o):m[o]=u);if(q.nodeName(m,"form")&&m.getAttributeNode(o))return m.getAttributeNode(o).nodeValue;if(o==="tabIndex")return(o=m.getAttributeNode("tabIndex"))&&o.specified?o.value:Z.test(m.nodeName)||ha.test(m.nodeName)&&m.href?0:c;return m[o]}if(!q.support.style&&v&&o==="style"){y&&(m.style.cssText=""+u);return m.style.cssText}y&&m.setAttribute(o,""+u);if(!m.attributes[o]&&m.hasAttribute&&!m.hasAttribute(o))return c;m=!q.support.hrefNormalized&&v&&B?m.getAttribute(o,
2):m.getAttribute(o);return m===null?c:m}y&&(m[o]=u);return m[o]}});var Ba=/\.(.*)$/,Fa=/^(?:textarea|input|select)$/i,ta=/\./g,Na=/ /g,sa=/[^\w\s.|`]/g,ja=function(m){return m.replace(sa,"\\$&")};q.event={add:function(m,o,u,v){if(m.nodeType!==3&&m.nodeType!==8){try{q.isWindow(m)&&m!==a&&!m.frameElement&&(m=a)}catch(y){}if(u===false)u=ka;else if(!u)return;var B,F;u.handler&&(B=u,u=B.handler);u.guid||(u.guid=q.guid++);if(F=q._data(m)){var V=F.events,T=F.handle;V||(F.events=V={});T||(F.handle=T=function(){return typeof q!==
"undefined"&&!q.event.triggered?q.event.handle.apply(T.elem,arguments):c});T.elem=m;o=o.split(" ");for(var R,da=0,pa;R=o[da++];){F=B?q.extend({},B):{handler:u,data:v};R.indexOf(".")>-1?(pa=R.split("."),R=pa.shift(),F.namespace=pa.slice(0).sort().join(".")):(pa=[],F.namespace="");F.type=R;F.guid||(F.guid=u.guid);var Ca=V[R],xa=q.event.special[R]||{};if(!Ca){Ca=V[R]=[];if(!xa.setup||xa.setup.call(m,v,pa,T)===false)m.addEventListener?m.addEventListener(R,T,false):m.attachEvent&&m.attachEvent("on"+R,
T)}xa.add&&(xa.add.call(m,F),F.handler.guid||(F.handler.guid=u.guid));Ca.push(F);q.event.global[R]=true}m=null}}},global:{},remove:function(m,o,u,v){if(m.nodeType!==3&&m.nodeType!==8){u===false&&(u=ka);var y,B,F=0,V,T,R,da,pa,Ca,xa=q.hasData(m)&&q._data(m),Ea=xa&&xa.events;if(xa&&Ea){o&&o.type&&(u=o.handler,o=o.type);if(!o||typeof o==="string"&&o.charAt(0)==="."){o=o||"";for(y in Ea)q.event.remove(m,y+o)}else{for(o=o.split(" ");y=o[F++];){da=y;V=y.indexOf(".")<0;T=[];V||(T=y.split("."),y=T.shift(),
R=RegExp("(^|\\.)"+q.map(T.slice(0).sort(),ja).join("\\.(?:.*\\.)?")+"(\\.|$)"));if(pa=Ea[y])if(u){da=q.event.special[y]||{};for(B=v||0;B<pa.length;B++){Ca=pa[B];if(u.guid===Ca.guid){if(V||R.test(Ca.namespace)){v==null&&pa.splice(B--,1);da.remove&&da.remove.call(m,Ca)}if(v!=null)break}}if(pa.length===0||v!=null&&pa.length===1){(!da.teardown||da.teardown.call(m,T)===false)&&q.removeEvent(m,y,xa.handle);delete Ea[y]}}else for(B=0;B<pa.length;B++){Ca=pa[B];if(V||R.test(Ca.namespace)){q.event.remove(m,
da,Ca.handler,B);pa.splice(B--,1)}}}if(q.isEmptyObject(Ea)){(o=xa.handle)&&(o.elem=null);delete xa.events;delete xa.handle;q.isEmptyObject(xa)&&q.removeData(m,c,true)}}}}},trigger:function(m,o,u,v){var y=m.type||m;if(!v){m=typeof m==="object"?m[q.expando]?m:q.extend(q.Event(y),m):q.Event(y);y.indexOf("!")>=0&&(m.type=y=y.slice(0,-1),m.exclusive=true);u||(m.stopPropagation(),q.event.global[y]&&q.each(q.cache,function(){var pa=this[q.expando];pa&&pa.events&&pa.events[y]&&q.event.trigger(m,o,pa.handle.elem)}));
if(!u||u.nodeType===3||u.nodeType===8)return c;m.result=c;m.target=u;o=q.makeArray(o);o.unshift(m)}m.currentTarget=u;(v=q._data(u,"handle"))&&v.apply(u,o);v=u.parentNode||u.ownerDocument;try{u&&u.nodeName&&q.noData[u.nodeName.toLowerCase()]||u["on"+y]&&u["on"+y].apply(u,o)===false&&(m.result=false,m.preventDefault())}catch(B){}if(!m.isPropagationStopped()&&v)q.event.trigger(m,o,v,true);else if(!m.isDefaultPrevented()){var F;v=m.target;var V=y.replace(Ba,""),T=q.nodeName(v,"a")&&V==="click",R=q.event.special[V]||
{};if((!R._default||R._default.call(u,m)===false)&&!T&&!(v&&v.nodeName&&q.noData[v.nodeName.toLowerCase()])){try{v[V]&&(F=v["on"+V],F&&(v["on"+V]=null),q.event.triggered=true,v[V]())}catch(da){}F&&(v["on"+V]=F);q.event.triggered=false}}},handle:function(m){var o,u,v,y;y=[];var B=q.makeArray(arguments);m=B[0]=q.event.fix(m||a.event);m.currentTarget=this;(o=m.type.indexOf(".")<0&&!m.exclusive)||(u=m.type.split("."),m.type=u.shift(),y=u.slice(0).sort(),v=RegExp("(^|\\.)"+y.join("\\.(?:.*\\.)?")+"(\\.|$)"));
m.namespace=m.namespace||y.join(".");y=q._data(this,"events");u=(y||{})[m.type];if(y&&u){u=u.slice(0);y=0;for(var F=u.length;y<F;y++){var V=u[y];if(o||v.test(V.namespace)){m.handler=V.handler;m.data=V.data;m.handleObj=V;V=V.handler.apply(this,B);V!==c&&(m.result=V,V===false&&(m.preventDefault(),m.stopPropagation()));if(m.isImmediatePropagationStopped())break}}}return m.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(m){if(m[q.expando])return m;var o=m;m=q.Event(o);for(var u=this.props.length,v;u;){v=this.props[--u];m[v]=o[v]}m.target||(m.target=m.srcElement||N);m.target.nodeType===3&&(m.target=m.target.parentNode);!m.relatedTarget&&m.fromElement&&(m.relatedTarget=m.fromElement===m.target?m.toElement:m.fromElement);if(m.pageX==null&&m.clientX!=null){o=N.documentElement;u=N.body;m.pageX=m.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0);m.pageY=m.clientY+(o&&o.scrollTop||
u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.clientTop||0)}m.which==null&&(m.charCode!=null||m.keyCode!=null)&&(m.which=m.charCode!=null?m.charCode:m.keyCode);!m.metaKey&&m.ctrlKey&&(m.metaKey=m.ctrlKey);!m.which&&m.button!==c&&(m.which=m.button&1?1:m.button&2?3:m.button&4?2:0);return m},guid:1E8,proxy:q.proxy,special:{ready:{setup:q.bindReady,teardown:q.noop},live:{add:function(m){q.event.add(this,I(m.origType,m.selector),q.extend({},m,{handler:ba,guid:m.handler.guid}))},remove:function(m){q.event.remove(this,
I(m.origType,m.selector),m)}},beforeunload:{setup:function(m,o,u){q.isWindow(this)&&(this.onbeforeunload=u)},teardown:function(m,o){this.onbeforeunload===o&&(this.onbeforeunload=null)}}}};q.removeEvent=N.removeEventListener?function(m,o,u){m.removeEventListener&&m.removeEventListener(o,u,false)}:function(m,o,u){m.detachEvent&&m.detachEvent("on"+o,u)};q.Event=function(m){if(!this.preventDefault)return new q.Event(m);m&&m.type?(this.originalEvent=m,this.type=m.type,this.isDefaultPrevented=m.defaultPrevented||
m.returnValue===false||m.getPreventDefault&&m.getPreventDefault()?C:ka):this.type=m;this.timeStamp=q.now();this[q.expando]=true};q.Event.prototype={preventDefault:function(){this.isDefaultPrevented=C;var m=this.originalEvent;m&&(m.preventDefault?m.preventDefault():m.returnValue=false)},stopPropagation:function(){this.isPropagationStopped=C;var m=this.originalEvent;m&&(m.stopPropagation&&m.stopPropagation(),m.cancelBubble=true)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=
C;this.stopPropagation()},isDefaultPrevented:ka,isPropagationStopped:ka,isImmediatePropagationStopped:ka};var P=function(m){var o=m.relatedTarget;try{if(!(o!==N&&!o.parentNode)){for(;o&&o!==this;)o=o.parentNode;o!==this&&(m.type=m.data,q.event.handle.apply(this,arguments))}}catch(u){}},Y=function(m){m.type=m.data;q.event.handle.apply(this,arguments)};q.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(m,o){q.event.special[m]={setup:function(u){q.event.add(this,o,u&&u.selector?Y:P,m)},teardown:function(u){q.event.remove(this,
o,u&&u.selector?Y:P)}}});q.support.submitBubbles||(q.event.special.submit={setup:function(){if(this.nodeName&&this.nodeName.toLowerCase()!=="form"){q.event.add(this,"click.specialSubmit",function(m){var o=m.target,u=o.type;(u==="submit"||u==="image")&&q(o).closest("form").length&&K("submit",this,arguments)});q.event.add(this,"keypress.specialSubmit",function(m){var o=m.target,u=o.type;(u==="text"||u==="password")&&q(o).closest("form").length&&m.keyCode===13&&K("submit",this,arguments)})}else return false},
teardown:function(){q.event.remove(this,".specialSubmit")}});if(!q.support.changeBubbles){var ea,ia=function(m){var o=m.type,u=m.value;o==="radio"||o==="checkbox"?u=m.checked:o==="select-multiple"?u=m.selectedIndex>-1?q.map(m.options,function(v){return v.selected}).join("-"):"":m.nodeName.toLowerCase()==="select"&&(u=m.selectedIndex);return u},ma=function(m,o){var u=m.target,v,y;if(Fa.test(u.nodeName)&&!u.readOnly){v=q._data(u,"_change_data");y=ia(u);(m.type!=="focusout"||u.type!=="radio")&&q._data(u,
"_change_data",y);if(!(v===c||y===v))if(v!=null||y){m.type="change";m.liveFired=c;q.event.trigger(m,o,u)}}};q.event.special.change={filters:{focusout:ma,beforedeactivate:ma,click:function(m){var o=m.target,u=o.type;(u==="radio"||u==="checkbox"||o.nodeName.toLowerCase()==="select")&&ma.call(this,m)},keydown:function(m){var o=m.target,u=o.type;(m.keyCode===13&&o.nodeName.toLowerCase()!=="textarea"||m.keyCode===32&&(u==="checkbox"||u==="radio")||u==="select-multiple")&&ma.call(this,m)},beforeactivate:function(m){m=
m.target;q._data(m,"_change_data",ia(m))}},setup:function(){if(this.type==="file")return false;for(var m in ea)q.event.add(this,m+".specialChange",ea[m]);return Fa.test(this.nodeName)},teardown:function(){q.event.remove(this,".specialChange");return Fa.test(this.nodeName)}};ea=q.event.special.change.filters;ea.focus=ea.beforeactivate}N.addEventListener&&q.each({focus:"focusin",blur:"focusout"},function(m,o){function u(v){v=q.event.fix(v);v.type=o;return q.event.handle.call(this,v)}q.event.special[o]=
{setup:function(){this.addEventListener(m,u,true)},teardown:function(){this.removeEventListener(m,u,true)}}});q.each(["bind","one"],function(m,o){q.fn[o]=function(u,v,y){if(typeof u==="object"){for(var B in u)this[o](B,v,u[B],y);return this}if(q.isFunction(v)||v===false){y=v;v=c}var F=o==="one"?q.proxy(y,function(T){q(this).unbind(T,F);return y.apply(this,arguments)}):y;if(u==="unload"&&o!=="one")this.one(u,v,y);else{B=0;for(var V=this.length;B<V;B++)q.event.add(this[B],u,F,v)}return this}});q.fn.extend({unbind:function(m,
o){if(typeof m!=="object"||m.preventDefault)for(var u=0,v=this.length;u<v;u++)q.event.remove(this[u],m,o);else for(u in m)this.unbind(u,m[u]);return this},delegate:function(m,o,u,v){return this.live(o,u,v,m)},undelegate:function(m,o,u){return arguments.length===0?this.unbind("live"):this.die(o,null,u,m)},trigger:function(m,o){return this.each(function(){q.event.trigger(m,o,this)})},triggerHandler:function(m,o){if(this[0]){var u=q.Event(m);u.preventDefault();u.stopPropagation();q.event.trigger(u,o,
this[0]);return u.result}},toggle:function(m){for(var o=arguments,u=1;u<o.length;)q.proxy(m,o[u++]);return this.click(q.proxy(m,function(v){var y=(q._data(this,"lastToggle"+m.guid)||0)%u;q._data(this,"lastToggle"+m.guid,y+1);v.preventDefault();return o[y].apply(this,arguments)||false}))},hover:function(m,o){return this.mouseenter(m).mouseleave(o||m)}});var wa={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};q.each(["live","die"],function(m,o){q.fn[o]=function(u,v,y,B){var F,
V=0,T,R,da=B||this.selector;B=B?this:q(this.context);if(typeof u==="object"&&!u.preventDefault){for(F in u)B[o](F,v,u[F],da);return this}q.isFunction(v)&&(y=v,v=c);for(u=(u||"").split(" ");(F=u[V++])!=null;){T=Ba.exec(F);R="";T&&(R=T[0],F=F.replace(Ba,""));if(F==="hover")u.push("mouseenter"+R,"mouseleave"+R);else{T=F;F==="focus"||F==="blur"?(u.push(wa[F]+R),F+=R):F=(wa[F]||F)+R;if(o==="live"){R=0;for(var pa=B.length;R<pa;R++)q.event.add(B[R],"live."+I(F,da),{data:v,selector:da,handler:y,origType:F,
origHandler:y,preType:T})}else B.unbind("live."+I(F,da),y)}}return this}});q.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(m,o){q.fn[o]=function(u,v){v==null&&(v=u,u=null);return arguments.length>0?this.bind(o,u,v):this.trigger(o)};q.attrFn&&(q.attrFn[o]=true)});(function(){function m(A,J,X,S,U,aa){U=0;for(var oa=S.length;U<oa;U++){var na=
S[U];if(na){var za=false;for(na=na[A];na;){if(na.sizcache===X){za=S[na.sizset];break}if(na.nodeType===1){aa||(na.sizcache=X,na.sizset=U);if(typeof J!=="string"){if(na===J){za=true;break}}else if(R.filter(J,[na]).length>0){za=na;break}}na=na[A]}S[U]=za}}}function o(A,J,X,S,U,aa){U=0;for(var oa=S.length;U<oa;U++){var na=S[U];if(na){var za=false;for(na=na[A];na;){if(na.sizcache===X){za=S[na.sizset];break}na.nodeType===1&&!aa&&(na.sizcache=X,na.sizset=U);if(na.nodeName.toLowerCase()===J){za=na;break}na=
na[A]}S[U]=za}}}var u=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,v=0,y=Object.prototype.toString,B=false,F=true,V=/\\/g,T=/\W/;[0,0].sort(function(){F=false;return 0});var R=function(A,J,X,S){X=X||[];var U=J=J||N;if(J.nodeType!==1&&J.nodeType!==9)return[];if(!A||typeof A!=="string")return X;var aa,oa,na,za,La,Ka,Pa=true,G=R.isXML(J),W=[],ca=A;do{u.exec("");if(aa=u.exec(ca)){ca=aa[3];W.push(aa[1]);if(aa[2]){za=
aa[3];break}}}while(aa);if(W.length>1&&pa.exec(A))if(W.length===2&&da.relative[W[0]])oa=Sa(W[0]+W[1],J);else for(oa=da.relative[W[0]]?[J]:R(W.shift(),J);W.length;){A=W.shift();da.relative[A]&&(A+=W.shift());oa=Sa(A,oa)}else{!S&&W.length>1&&J.nodeType===9&&!G&&da.match.ID.test(W[0])&&!da.match.ID.test(W[W.length-1])&&(La=R.find(W.shift(),J,G),J=La.expr?R.filter(La.expr,La.set)[0]:La.set[0]);if(J){La=S?{expr:W.pop(),set:Ea(S)}:R.find(W.pop(),W.length===1&&(W[0]==="~"||W[0]==="+")&&J.parentNode?J.parentNode:
J,G);oa=La.expr?R.filter(La.expr,La.set):La.set;for(W.length>0?na=Ea(oa):Pa=false;W.length;){aa=Ka=W.pop();da.relative[Ka]?aa=W.pop():Ka="";aa==null&&(aa=J);da.relative[Ka](na,aa,G)}}else na=[]}na||(na=oa);na||R.error(Ka||A);if(y.call(na)==="[object Array]")if(Pa)if(J&&J.nodeType===1)for(A=0;na[A]!=null;A++)na[A]&&(na[A]===true||na[A].nodeType===1&&R.contains(J,na[A]))&&X.push(oa[A]);else for(A=0;na[A]!=null;A++)na[A]&&na[A].nodeType===1&&X.push(oa[A]);else X.push.apply(X,na);else Ea(na,X);za&&(R(za,
U,X,S),R.uniqueSort(X));return X};R.uniqueSort=function(A){if(Ja){B=F;A.sort(Ja);if(B)for(var J=1;J<A.length;J++)A[J]===A[J-1]&&A.splice(J--,1)}return A};R.matches=function(A,J){return R(A,null,null,J)};R.matchesSelector=function(A,J){return R(J,null,null,[A]).length>0};R.find=function(A,J,X){var S;if(!A)return[];for(var U=0,aa=da.order.length;U<aa;U++){var oa,na=da.order[U];if(oa=da.leftMatch[na].exec(A)){var za=oa[1];oa.splice(1,1);if(za.substr(za.length-1)!=="\\"){oa[1]=(oa[1]||"").replace(V,"");
S=da.find[na](oa,J,X);if(S!=null){A=A.replace(da.match[na],"");break}}}}S||(S=typeof J.getElementsByTagName!=="undefined"?J.getElementsByTagName("*"):[]);return{set:S,expr:A}};R.filter=function(A,J,X,S){for(var U,aa,oa=A,na=[],za=J,La=J&&J[0]&&R.isXML(J[0]);A&&J.length;){for(var Ka in da.filter)if((U=da.leftMatch[Ka].exec(A))!=null&&U[2]){var Pa,G,W=da.filter[Ka];G=U[1];aa=false;U.splice(1,1);if(G.substr(G.length-1)!=="\\"){za===na&&(na=[]);if(da.preFilter[Ka])if(U=da.preFilter[Ka](U,za,X,na,S,La)){if(U===
true)continue}else aa=Pa=true;if(U)for(var ca=0;(G=za[ca])!=null;ca++)if(G){Pa=W(G,U,ca,za);var ga=S^!!Pa;X&&Pa!=null?ga?aa=true:za[ca]=false:ga&&(na.push(G),aa=true)}if(Pa!==c){X||(za=na);A=A.replace(da.match[Ka],"");if(!aa)return[];break}}}if(A===oa)if(aa==null)R.error(A);else break;oa=A}return za};R.error=function(A){throw"Syntax error, unrecognized expression: "+A;};var da=R.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className",
"for":"htmlFor"},attrHandle:{href:function(A){return A.getAttribute("href")},type:function(A){return A.getAttribute("type")}},relative:{"+":function(A,J){var X=typeof J==="string",S=X&&!T.test(J);X=X&&!S;S&&(J=J.toLowerCase());S=0;for(var U=A.length,aa;S<U;S++)if(aa=A[S]){for(;(aa=aa.previousSibling)&&aa.nodeType!==1;);A[S]=X||aa&&aa.nodeName.toLowerCase()===J?aa||false:aa===J}X&&R.filter(J,A,true)},">":function(A,J){var X,S=typeof J==="string",U=0,aa=A.length;if(S&&!T.test(J))for(J=J.toLowerCase();U<
aa;U++){if(X=A[U]){X=X.parentNode;A[U]=X.nodeName.toLowerCase()===J?X:false}}else{for(;U<aa;U++)(X=A[U])&&(A[U]=S?X.parentNode:X.parentNode===J);S&&R.filter(J,A,true)}},"":function(A,J,X){var S,U=v++,aa=m;typeof J==="string"&&!T.test(J)&&(J=J.toLowerCase(),S=J,aa=o);aa("parentNode",J,U,A,S,X)},"~":function(A,J,X){var S,U=v++,aa=m;typeof J==="string"&&!T.test(J)&&(J=J.toLowerCase(),S=J,aa=o);aa("previousSibling",J,U,A,S,X)}},find:{ID:function(A,J,X){if(typeof J.getElementById!=="undefined"&&!X)return(A=
J.getElementById(A[1]))&&A.parentNode?[A]:[]},NAME:function(A,J){if(typeof J.getElementsByName!=="undefined"){for(var X=[],S=J.getElementsByName(A[1]),U=0,aa=S.length;U<aa;U++)S[U].getAttribute("name")===A[1]&&X.push(S[U]);return X.length===0?null:X}},TAG:function(A,J){if(typeof J.getElementsByTagName!=="undefined")return J.getElementsByTagName(A[1])}},preFilter:{CLASS:function(A,J,X,S,U,aa){A=" "+A[1].replace(V,"")+" ";if(aa)return A;aa=0;for(var oa;(oa=J[aa])!=null;aa++)oa&&(U^(oa.className&&(" "+
oa.className+" ").replace(/[\t\n\r]/g," ").indexOf(A)>=0)?X||S.push(oa):X&&(J[aa]=false));return false},ID:function(A){return A[1].replace(V,"")},TAG:function(A){return A[1].replace(V,"").toLowerCase()},CHILD:function(A){if(A[1]==="nth"){A[2]||R.error(A[0]);A[2]=A[2].replace(/^\+|\s*/g,"");var J=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(A[2]==="even"&&"2n"||A[2]==="odd"&&"2n+1"||!/\D/.test(A[2])&&"0n+"+A[2]||A[2]);A[2]=J[1]+(J[2]||1)-0;A[3]=J[3]-0}else A[2]&&R.error(A[0]);A[0]=v++;return A},ATTR:function(A,
J,X,S,U,aa){J=A[1]=A[1].replace(V,"");!aa&&da.attrMap[J]&&(A[1]=da.attrMap[J]);A[4]=(A[4]||A[5]||"").replace(V,"");A[2]==="~="&&(A[4]=" "+A[4]+" ");return A},PSEUDO:function(A,J,X,S,U){if(A[1]==="not")if((u.exec(A[3])||"").length>1||/^\w/.test(A[3]))A[3]=R(A[3],null,null,J);else{A=R.filter(A[3],J,X,true^U);X||S.push.apply(S,A);return false}else if(da.match.POS.test(A[0])||da.match.CHILD.test(A[0]))return true;return A},POS:function(A){A.unshift(true);return A}},filters:{enabled:function(A){return A.disabled===
false&&A.type!=="hidden"},disabled:function(A){return A.disabled===true},checked:function(A){return A.checked===true},selected:function(A){return A.selected===true},parent:function(A){return!!A.firstChild},empty:function(A){return!A.firstChild},has:function(A,J,X){return!!R(X[3],A).length},header:function(A){return/h\d/i.test(A.nodeName)},text:function(A){return"text"===A.getAttribute("type")},radio:function(A){return"radio"===A.type},checkbox:function(A){return"checkbox"===A.type},file:function(A){return"file"===
A.type},password:function(A){return"password"===A.type},submit:function(A){return"submit"===A.type},image:function(A){return"image"===A.type},reset:function(A){return"reset"===A.type},button:function(A){return"button"===A.type||A.nodeName.toLowerCase()==="button"},input:function(A){return/input|select|textarea|button/i.test(A.nodeName)}},setFilters:{first:function(A,J){return J===0},last:function(A,J,X,S){return J===S.length-1},even:function(A,J){return J%2===0},odd:function(A,J){return J%2===1},
lt:function(A,J,X){return J<X[3]-0},gt:function(A,J,X){return J>X[3]-0},nth:function(A,J,X){return X[3]-0===J},eq:function(A,J,X){return X[3]-0===J}},filter:{PSEUDO:function(A,J,X,S){var U=J[1],aa=da.filters[U];if(aa)return aa(A,X,J,S);if(U==="contains")return(A.textContent||A.innerText||R.getText([A])||"").indexOf(J[3])>=0;if(U==="not"){J=J[3];X=0;for(S=J.length;X<S;X++)if(J[X]===A)return false;return true}R.error(U)},CHILD:function(A,J){var X=J[1],S=A;switch(X){case "only":case "first":for(;S=S.previousSibling;)if(S.nodeType===
1)return false;if(X==="first")return true;S=A;case "last":for(;S=S.nextSibling;)if(S.nodeType===1)return false;return true;case "nth":X=J[2];var U=J[3];if(X===1&&U===0)return true;var aa=J[0],oa=A.parentNode;if(oa&&(oa.sizcache!==aa||!A.nodeIndex)){var na=0;for(S=oa.firstChild;S;S=S.nextSibling)S.nodeType===1&&(S.nodeIndex=++na);oa.sizcache=aa}S=A.nodeIndex-U;return X===0?S===0:S%X===0&&S/X>=0}},ID:function(A,J){return A.nodeType===1&&A.getAttribute("id")===J},TAG:function(A,J){return J==="*"&&A.nodeType===
1||A.nodeName.toLowerCase()===J},CLASS:function(A,J){return(" "+(A.className||A.getAttribute("class"))+" ").indexOf(J)>-1},ATTR:function(A,J){var X=J[1];X=da.attrHandle[X]?da.attrHandle[X](A):A[X]!=null?A[X]:A.getAttribute(X);var S=X+"",U=J[2],aa=J[4];return X==null?U==="!=":U==="="?S===aa:U==="*="?S.indexOf(aa)>=0:U==="~="?(" "+S+" ").indexOf(aa)>=0:aa?U==="!="?S!==aa:U==="^="?S.indexOf(aa)===0:U==="$="?S.substr(S.length-aa.length)===aa:U==="|="?S===aa||S.substr(0,aa.length+1)===aa+"-":false:S&&
X!==false},POS:function(A,J,X,S){var U=da.setFilters[J[2]];if(U)return U(A,X,J,S)}}},pa=da.match.POS,Ca=function(A,J){return"\\"+(J-0+1)},xa;for(xa in da.match){da.match[xa]=RegExp(da.match[xa].source+/(?![^\[]*\])(?![^\(]*\))/.source);da.leftMatch[xa]=RegExp(/(^(?:.|\r|\n)*?)/.source+da.match[xa].source.replace(/\\(\d+)/g,Ca))}var Ea=function(A,J){A=Array.prototype.slice.call(A,0);if(J){J.push.apply(J,A);return J}return A};try{Array.prototype.slice.call(N.documentElement.childNodes,0)}catch(Ma){Ea=
function(A,J){var X=0,S=J||[];if(y.call(A)==="[object Array]")Array.prototype.push.apply(S,A);else if(typeof A.length==="number")for(var U=A.length;X<U;X++)S.push(A[X]);else for(;A[X];X++)S.push(A[X]);return S}}var Ja,Oa;N.documentElement.compareDocumentPosition?Ja=function(A,J){if(A===J){B=true;return 0}if(!A.compareDocumentPosition||!J.compareDocumentPosition)return A.compareDocumentPosition?-1:1;return A.compareDocumentPosition(J)&4?-1:1}:(Ja=function(A,J){var X,S,U=[],aa=[];X=A.parentNode;S=J.parentNode;
var oa=X;if(A===J){B=true;return 0}if(X===S)return Oa(A,J);if(!X)return-1;if(!S)return 1;for(;oa;){U.unshift(oa);oa=oa.parentNode}for(oa=S;oa;){aa.unshift(oa);oa=oa.parentNode}X=U.length;S=aa.length;for(oa=0;oa<X&&oa<S;oa++)if(U[oa]!==aa[oa])return Oa(U[oa],aa[oa]);return oa===X?Oa(A,aa[oa],-1):Oa(U[oa],J,1)},Oa=function(A,J,X){if(A===J)return X;for(A=A.nextSibling;A;){if(A===J)return-1;A=A.nextSibling}return 1});R.getText=function(A){for(var J="",X,S=0;A[S];S++){X=A[S];X.nodeType===3||X.nodeType===
4?J+=X.nodeValue:X.nodeType!==8&&(J+=R.getText(X.childNodes))}return J};(function(){var A=N.createElement("div"),J="script"+(new Date).getTime(),X=N.documentElement;A.innerHTML="<a name='"+J+"'/>";X.insertBefore(A,X.firstChild);N.getElementById(J)&&(da.find.ID=function(S,U,aa){if(typeof U.getElementById!=="undefined"&&!aa)return(U=U.getElementById(S[1]))?U.id===S[1]||typeof U.getAttributeNode!=="undefined"&&U.getAttributeNode("id").nodeValue===S[1]?[U]:c:[]},da.filter.ID=function(S,U){var aa=typeof S.getAttributeNode!==
"undefined"&&S.getAttributeNode("id");return S.nodeType===1&&aa&&aa.nodeValue===U});X.removeChild(A);X=A=null})();(function(){var A=N.createElement("div");A.appendChild(N.createComment(""));A.getElementsByTagName("*").length>0&&(da.find.TAG=function(J,X){var S=X.getElementsByTagName(J[1]);if(J[1]==="*"){for(var U=[],aa=0;S[aa];aa++)S[aa].nodeType===1&&U.push(S[aa]);S=U}return S});A.innerHTML="<a href='#'></a>";A.firstChild&&typeof A.firstChild.getAttribute!=="undefined"&&A.firstChild.getAttribute("href")!==
"#"&&(da.attrHandle.href=function(J){return J.getAttribute("href",2)});A=null})();N.querySelectorAll&&function(){var A=R,J=N.createElement("div");J.innerHTML="<p class='TEST'></p>";if(!J.querySelectorAll||J.querySelectorAll(".TEST").length!==0){R=function(S,U,aa,oa){U=U||N;if(!oa&&!R.isXML(U)){var na=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(S);if(na&&(U.nodeType===1||U.nodeType===9)){if(na[1])return Ea(U.getElementsByTagName(S),aa);if(na[2]&&da.find.CLASS&&U.getElementsByClassName)return Ea(U.getElementsByClassName(na[2]),
aa)}if(U.nodeType===9){if(S==="body"&&U.body)return Ea([U.body],aa);if(na&&na[3]){var za=U.getElementById(na[3]);if(!za||!za.parentNode)return Ea([],aa);if(za.id===na[3])return Ea([za],aa)}try{return Ea(U.querySelectorAll(S),aa)}catch(La){}}else if(U.nodeType===1&&U.nodeName.toLowerCase()!=="object"){na=U;var Ka=(za=U.getAttribute("id"))||"__sizzle__",Pa=U.parentNode,G=/^\s*[+~]/.test(S);za?Ka=Ka.replace(/'/g,"\\$&"):U.setAttribute("id",Ka);G&&Pa&&(U=U.parentNode);try{if(!G||Pa)return Ea(U.querySelectorAll("[id='"+
Ka+"'] "+S),aa)}catch(W){}finally{za||na.removeAttribute("id")}}}return A(S,U,aa,oa)};for(var X in A)R[X]=A[X];J=null}}();(function(){var A=N.documentElement,J=A.matchesSelector||A.mozMatchesSelector||A.webkitMatchesSelector||A.msMatchesSelector,X=false;try{J.call(N.documentElement,"[test!='']:sizzle")}catch(S){X=true}J&&(R.matchesSelector=function(U,aa){aa=aa.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!R.isXML(U))try{if(X||!da.match.PSEUDO.test(aa)&&!/!=/.test(aa))return J.call(U,aa)}catch(oa){}return R(aa,
null,null,[U]).length>0})})();(function(){var A=N.createElement("div");A.innerHTML="<div class='test e'></div><div class='test'></div>";if(A.getElementsByClassName&&A.getElementsByClassName("e").length!==0){A.lastChild.className="e";if(A.getElementsByClassName("e").length!==1){da.order.splice(1,0,"CLASS");da.find.CLASS=function(J,X,S){if(typeof X.getElementsByClassName!=="undefined"&&!S)return X.getElementsByClassName(J[1])};A=null}}})();N.documentElement.contains?R.contains=function(A,J){return A!==
J&&(A.contains?A.contains(J):true)}:N.documentElement.compareDocumentPosition?R.contains=function(A,J){return!!(A.compareDocumentPosition(J)&16)}:R.contains=function(){return false};R.isXML=function(A){return(A=(A?A.ownerDocument||A:0).documentElement)?A.nodeName!=="HTML":false};var Sa=function(A,J){for(var X,S=[],U="",aa=J.nodeType?[J]:J;X=da.match.PSEUDO.exec(A);){U+=X[0];A=A.replace(da.match.PSEUDO,"")}A=da.relative[A]?A+"*":A;X=0;for(var oa=aa.length;X<oa;X++)R(A,aa[X],S);return R.filter(U,S)};
q.find=R;q.expr=R.selectors;q.expr[":"]=q.expr.filters;q.unique=R.uniqueSort;q.text=R.getText;q.isXMLDoc=R.isXML;q.contains=R.contains})();var va=/Until$/,Ha=/^(?:parents|prevUntil|prevAll)/,Ia=/,/,$a=/^.[^:#\[\.,]*$/,fb=Array.prototype.slice,Ua=q.expr.match.POS,Ta={children:true,contents:true,next:true,prev:true};q.fn.extend({find:function(m){for(var o=this.pushStack("","find",m),u=0,v=0,y=this.length;v<y;v++){u=o.length;q.find(m,this[v],o);if(v>0)for(var B=u;B<o.length;B++)for(var F=0;F<u;F++)if(o[F]===
o[B]){o.splice(B--,1);break}}return o},has:function(m){var o=q(m);return this.filter(function(){for(var u=0,v=o.length;u<v;u++)if(q.contains(this,o[u]))return true})},not:function(m){return this.pushStack(O(this,m,false),"not",m)},filter:function(m){return this.pushStack(O(this,m,true),"filter",m)},is:function(m){return!!m&&q.filter(m,this).length>0},closest:function(m,o){var u=[],v,y,B=this[0];if(q.isArray(m)){var F,V={},T=1;if(B&&m.length){v=0;for(y=m.length;v<y;v++){F=m[v];V[F]||(V[F]=q.expr.match.POS.test(F)?
q(F,o||this.context):F)}for(;B&&B.ownerDocument&&B!==o;){for(F in V){v=V[F];(v.jquery?v.index(B)>-1:q(B).is(v))&&u.push({selector:F,elem:B,level:T})}B=B.parentNode;T++}}return u}F=Ua.test(m)?q(m,o||this.context):null;v=0;for(y=this.length;v<y;v++)for(B=this[v];B;){if(F?F.index(B)>-1:q.find.matchesSelector(B,m)){u.push(B);break}B=B.parentNode;if(!B||!B.ownerDocument||B===o)break}u=u.length>1?q.unique(u):u;return this.pushStack(u,"closest",m)},index:function(m){if(!m||typeof m==="string")return q.inArray(this[0],
m?q(m):this.parent().children());return q.inArray(m.jquery?m[0]:m,this)},add:function(m,o){var u=typeof m==="string"?q(m,o):q.makeArray(m),v=q.merge(this.get(),u);return this.pushStack(!u[0]||!u[0].parentNode||u[0].parentNode.nodeType===11||!v[0]||!v[0].parentNode||v[0].parentNode.nodeType===11?v:q.unique(v))},andSelf:function(){return this.add(this.prevObject)}});q.each({parent:function(m){return(m=m.parentNode)&&m.nodeType!==11?m:null},parents:function(m){return q.dir(m,"parentNode")},parentsUntil:function(m,
o,u){return q.dir(m,"parentNode",u)},next:function(m){return q.nth(m,2,"nextSibling")},prev:function(m){return q.nth(m,2,"previousSibling")},nextAll:function(m){return q.dir(m,"nextSibling")},prevAll:function(m){return q.dir(m,"previousSibling")},nextUntil:function(m,o,u){return q.dir(m,"nextSibling",u)},prevUntil:function(m,o,u){return q.dir(m,"previousSibling",u)},siblings:function(m){return q.sibling(m.parentNode.firstChild,m)},children:function(m){return q.sibling(m.firstChild)},contents:function(m){return q.nodeName(m,
"iframe")?m.contentDocument||m.contentWindow.document:q.makeArray(m.childNodes)}},function(m,o){q.fn[m]=function(u,v){var y=q.map(this,o,u),B=fb.call(arguments);va.test(m)||(v=u);v&&typeof v==="string"&&(y=q.filter(v,y));y=this.length>1&&!Ta[m]?q.unique(y):y;(this.length>1||Ia.test(v))&&Ha.test(m)&&(y=y.reverse());return this.pushStack(y,m,B.join(","))}});q.extend({filter:function(m,o,u){u&&(m=":not("+m+")");return o.length===1?q.find.matchesSelector(o[0],m)?[o[0]]:[]:q.find.matches(m,o)},dir:function(m,
o,u){var v=[];for(m=m[o];m&&m.nodeType!==9&&(u===c||m.nodeType!==1||!q(m).is(u));){m.nodeType===1&&v.push(m);m=m[o]}return v},nth:function(m,o,u){o=o||1;for(var v=0;m;m=m[u])if(m.nodeType===1&&++v===o)break;return m},sibling:function(m,o){for(var u=[];m;m=m.nextSibling)m.nodeType===1&&m!==o&&u.push(m);return u}});var gb=/ jQuery\d+="(?:\d+|null)"/g,Xa=/^\s+/,sb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,tb=/<([\w:]+)/,Hb=/<tbody/i,Ib=/<|&#?\w+;/,ub=/<(?:script|object|embed|option|style)/i,
vb=/checked\s*(?:[^=]|=\s*.checked.)/i,Ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};Ra.optgroup=Ra.option;Ra.tbody=Ra.tfoot=Ra.colgroup=Ra.caption=Ra.thead;Ra.th=Ra.td;q.support.htmlSerialize||(Ra._default=[1,"div<div>",
"</div>"]);q.fn.extend({text:function(m){if(q.isFunction(m))return this.each(function(o){var u=q(this);u.text(m.call(this,o,u.text()))});if(typeof m!=="object"&&m!==c)return this.empty().append((this[0]&&this[0].ownerDocument||N).createTextNode(m));return q.text(this)},wrapAll:function(m){if(q.isFunction(m))return this.each(function(u){q(this).wrapAll(m.call(this,u))});if(this[0]){var o=q(m,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&o.insertBefore(this[0]);o.map(function(){for(var u=
this;u.firstChild&&u.firstChild.nodeType===1;)u=u.firstChild;return u}).append(this)}return this},wrapInner:function(m){if(q.isFunction(m))return this.each(function(o){q(this).wrapInner(m.call(this,o))});return this.each(function(){var o=q(this),u=o.contents();u.length?u.wrapAll(m):o.append(m)})},wrap:function(m){return this.each(function(){q(this).wrapAll(m)})},unwrap:function(){return this.parent().each(function(){q.nodeName(this,"body")||q(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,
true,function(m){this.nodeType===1&&this.appendChild(m)})},prepend:function(){return this.domManip(arguments,true,function(m){this.nodeType===1&&this.insertBefore(m,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(o){this.parentNode.insertBefore(o,this)});if(arguments.length){var m=q(arguments[0]);m.push.apply(m,this.toArray());return this.pushStack(m,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,
false,function(o){this.parentNode.insertBefore(o,this.nextSibling)});if(arguments.length){var m=this.pushStack(this,"after",arguments);m.push.apply(m,q(arguments[0]).toArray());return m}},remove:function(m,o){for(var u=0,v;(v=this[u])!=null;u++)if(!m||q.filter(m,[v]).length){!o&&v.nodeType===1&&(q.cleanData(v.getElementsByTagName("*")),q.cleanData([v]));v.parentNode&&v.parentNode.removeChild(v)}return this},empty:function(){for(var m=0,o;(o=this[m])!=null;m++)for(o.nodeType===1&&q.cleanData(o.getElementsByTagName("*"));o.firstChild;)o.removeChild(o.firstChild);
return this},clone:function(m,o){m=m==null?false:m;o=o==null?m:o;return this.map(function(){return q.clone(this,m,o)})},html:function(m){if(m===c)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(gb,""):null;if(typeof m!=="string"||ub.test(m)||!q.support.leadingWhitespace&&Xa.test(m)||Ra[(tb.exec(m)||["",""])[1].toLowerCase()])q.isFunction(m)?this.each(function(y){var B=q(this);B.html(m.call(this,y,B.html()))}):this.empty().append(m);else{m=m.replace(sb,"<$1></$2>");try{for(var o=0,u=
this.length;o<u;o++)this[o].nodeType===1&&(q.cleanData(this[o].getElementsByTagName("*")),this[o].innerHTML=m)}catch(v){this.empty().append(m)}}return this},replaceWith:function(m){if(this[0]&&this[0].parentNode){if(q.isFunction(m))return this.each(function(o){var u=q(this),v=u.html();u.replaceWith(m.call(this,o,v))});typeof m!=="string"&&(m=q(m).detach());return this.each(function(){var o=this.nextSibling,u=this.parentNode;q(this).remove();o?q(o).before(m):q(u).append(m)})}return this.pushStack(q(q.isFunction(m)?
m():m),"replaceWith",m)},detach:function(m){return this.remove(m,true)},domManip:function(m,o,u){var v,y,B,F=m[0],V=[];if(!q.support.checkClone&&arguments.length===3&&typeof F==="string"&&vb.test(F))return this.each(function(){q(this).domManip(m,o,u,true)});if(q.isFunction(F))return this.each(function(da){var pa=q(this);m[0]=F.call(this,da,o?pa.html():c);pa.domManip(m,o,u)});if(this[0]){B=F&&F.parentNode;q.support.parentNode&&B&&B.nodeType===11&&B.childNodes.length===this.length?v={fragment:B}:v=
q.buildFragment(m,this,V);B=v.fragment;B.childNodes.length===1?y=B=B.firstChild:y=B.firstChild;if(y){o=o&&q.nodeName(y,"tr");y=0;for(var T=this.length,R=T-1;y<T;y++)u.call(o?q.nodeName(this[y],"table")?this[y].getElementsByTagName("tbody")[0]||this[y].appendChild(this[y].ownerDocument.createElement("tbody")):this[y]:this[y],v.cacheable||T>1&&y<R?q.clone(B,true,true):B)}V.length&&q.each(V,x)}return this}});q.buildFragment=function(m,o,u){var v,y,B;o=o&&o[0]?o[0].ownerDocument||o[0]:N;m.length===1&&
typeof m[0]==="string"&&m[0].length<512&&o===N&&m[0].charAt(0)==="<"&&!ub.test(m[0])&&(q.support.checkClone||!vb.test(m[0]))&&(y=true,B=q.fragments[m[0]],B&&B!==1&&(v=B));v||(v=o.createDocumentFragment(),q.clean(m,o,v,u));y&&(q.fragments[m[0]]=B?v:1);return{fragment:v,cacheable:y}};q.fragments={};q.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(m,o){q.fn[m]=function(u){var v=[];u=q(u);var y=this.length===1&&this[0].parentNode;
if(y&&y.nodeType===11&&y.childNodes.length===1&&u.length===1){u[o](this[0]);return this}y=0;for(var B=u.length;y<B;y++){var F=(y>0?this.clone(true):this).get();q(u[y])[o](F);v=v.concat(F)}return this.pushStack(v,m,u.selector)}});q.extend({clone:function(m,o,u){var v=m.cloneNode(true),y,B,F;if((!q.support.noCloneEvent||!q.support.noCloneChecked)&&(m.nodeType===1||m.nodeType===11)&&!q.isXMLDoc(m)){L(m,v);y=E(m);B=E(v);for(F=0;y[F];++F)L(y[F],B[F])}if(o){Q(m,v);if(u){y=E(m);B=E(v);for(F=0;y[F];++F)Q(y[F],
B[F])}}return v},clean:function(m,o,u,v){o=o||N;typeof o.createElement==="undefined"&&(o=o.ownerDocument||o[0]&&o[0].ownerDocument||N);for(var y=[],B=0,F;(F=m[B])!=null;B++){typeof F==="number"&&(F+="");if(F){if(typeof F!=="string"||Ib.test(F)){if(typeof F==="string"){F=F.replace(sb,"<$1></$2>");var V=(tb.exec(F)||["",""])[1].toLowerCase(),T=Ra[V]||Ra._default,R=T[0],da=o.createElement("div");for(da.innerHTML=T[1]+F+T[2];R--;)da=da.lastChild;if(!q.support.tbody){R=Hb.test(F);V=V==="table"&&!R?da.firstChild&&
da.firstChild.childNodes:T[1]==="<table>"&&!R?da.childNodes:[];for(T=V.length-1;T>=0;--T)q.nodeName(V[T],"tbody")&&!V[T].childNodes.length&&V[T].parentNode.removeChild(V[T])}!q.support.leadingWhitespace&&Xa.test(F)&&da.insertBefore(o.createTextNode(Xa.exec(F)[0]),da.firstChild);F=da.childNodes}}else F=o.createTextNode(F);F.nodeType?y.push(F):y=q.merge(y,F)}}if(u)for(B=0;y[B];B++)!v||!q.nodeName(y[B],"script")||y[B].type&&y[B].type.toLowerCase()!=="text/javascript"?(y[B].nodeType===1&&y.splice.apply(y,
[B+1,0].concat(q.makeArray(y[B].getElementsByTagName("script")))),u.appendChild(y[B])):v.push(y[B].parentNode?y[B].parentNode.removeChild(y[B]):y[B]);return y},cleanData:function(m){for(var o,u,v=q.cache,y=q.expando,B=q.event.special,F=q.support.deleteExpando,V=0,T;(T=m[V])!=null;V++)if(!(T.nodeName&&q.noData[T.nodeName.toLowerCase()]))if(u=T[q.expando]){if((o=v[u]&&v[u][y])&&o.events){for(var R in o.events)B[R]?q.event.remove(T,R):q.removeEvent(T,R,o.handle);o.handle&&(o.handle.elem=null)}F?delete T[q.expando]:
T.removeAttribute&&T.removeAttribute(q.expando);delete v[u]}}});var wb=/alpha\([^)]*\)/i,Jb=/opacity=([^)]*)/,Kb=/-([a-z])/ig,Lb=/([A-Z])/g,xb=/^-?\d+(?:px)?$/i,Mb=/^-?\d/,Nb={position:"absolute",visibility:"hidden",display:"block"},Fb=["Left","Right"],Gb=["Top","Bottom"],jb,ab,kb,Ob=function(m,o){return o.toUpperCase()};q.fn.css=function(m,o){if(arguments.length===2&&o===c)return this;return q.access(this,m,o,true,function(u,v,y){return y!==c?q.style(u,v,y):q.css(u,v)})};q.extend({cssHooks:{opacity:{get:function(m,
o){if(o){var u=jb(m,"opacity","opacity");return u===""?"1":u}return m.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":q.support.cssFloat?"cssFloat":"styleFloat"},style:function(m,o,u,v){if(m&&m.nodeType!==3&&m.nodeType!==8&&m.style){var y,B=q.camelCase(o),F=m.style,V=q.cssHooks[B];o=q.cssProps[B]||B;if(u===c){if(V&&"get"in V&&(y=V.get(m,false,v))!==c)return y;return F[o]}if(!(typeof u==="number"&&isNaN(u)||u==null)){typeof u==="number"&&
!q.cssNumber[B]&&(u+="px");if(!V||!("set"in V)||(u=V.set(m,u))!==c)try{F[o]=u}catch(T){}}}},css:function(m,o,u){var v,y=q.camelCase(o),B=q.cssHooks[y];o=q.cssProps[y]||y;if(B&&"get"in B&&(v=B.get(m,true,u))!==c)return v;if(jb)return jb(m,o,y)},swap:function(m,o,u){var v={},y;for(y in o){v[y]=m.style[y];m.style[y]=o[y]}u.call(m);for(y in o)m.style[y]=v[y]},camelCase:function(m){return m.replace(Kb,Ob)}});q.curCSS=q.css;q.each(["height","width"],function(m,o){q.cssHooks[o]={get:function(u,v,y){var B;
if(v){u.offsetWidth!==0?B=w(u,o,y):q.swap(u,Nb,function(){B=w(u,o,y)});if(B<=0){B=jb(u,o,o);B==="0px"&&kb&&(B=kb(u,o,o));if(B!=null)return B===""||B==="auto"?"0px":B}if(B<0||B==null){B=u.style[o];return B===""||B==="auto"?"0px":B}return typeof B==="string"?B:B+"px"}},set:function(u,v){if(!xb.test(v))return v;v=parseFloat(v);if(v>=0)return v+"px"}}});q.support.opacity||(q.cssHooks.opacity={get:function(m,o){return Jb.test((o&&m.currentStyle?m.currentStyle.filter:m.style.filter)||"")?parseFloat(RegExp.$1)/
100+"":o?"1":""},set:function(m,o){var u=m.style;u.zoom=1;var v=q.isNaN(o)?"":"alpha(opacity="+o*100+")",y=u.filter||"";u.filter=wb.test(y)?y.replace(wb,v):u.filter+" "+v}});N.defaultView&&N.defaultView.getComputedStyle&&(ab=function(m,o,u){var v;u=u.replace(Lb,"-$1").toLowerCase();if(!(o=m.ownerDocument.defaultView))return c;if(o=o.getComputedStyle(m,null)){v=o.getPropertyValue(u);v===""&&!q.contains(m.ownerDocument.documentElement,m)&&(v=q.style(m,u))}return v});N.documentElement.currentStyle&&
(kb=function(m,o){var u,v=m.currentStyle&&m.currentStyle[o],y=m.runtimeStyle&&m.runtimeStyle[o],B=m.style;!xb.test(v)&&Mb.test(v)&&(u=B.left,y&&(m.runtimeStyle.left=m.currentStyle.left),B.left=o==="fontSize"?"1em":v||0,v=B.pixelLeft+"px",B.left=u,y&&(m.runtimeStyle.left=y));return v===""?"auto":v});jb=ab||kb;q.expr&&q.expr.filters&&(q.expr.filters.hidden=function(m){var o=m.offsetHeight;return m.offsetWidth===0&&o===0||!q.support.reliableHiddenOffsets&&(m.style.display||q.css(m,"display"))==="none"},
q.expr.filters.visible=function(m){return!q.expr.filters.hidden(m)});var Pb=/%20/g,Eb=/\[\]$/,yb=/\r?\n/g,Qb=/#.*$/,Rb=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Sb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Tb=/^(?:GET|HEAD)$/,Ub=/^\/\//,zb=/\?/,Vb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Wb=/^(?:select|textarea)/i,rb=/\s+/,Xb=/([?&])_=[^&]*/,Yb=/(^|\-)([a-z])/g,Zb=function(m,o,u){return o+u.toUpperCase()},Ab=/^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/,
Bb=q.fn.load,ob={},Cb={},bb,cb;try{bb=N.location.href}catch(fc){bb=N.createElement("a");bb.href="";bb=bb.href}cb=Ab.exec(bb.toLowerCase());q.fn.extend({load:function(m,o,u){if(typeof m!=="string"&&Bb)return Bb.apply(this,arguments);if(!this.length)return this;var v=m.indexOf(" ");if(v>=0){var y=m.slice(v,m.length);m=m.slice(0,v)}v="GET";o&&(q.isFunction(o)?(u=o,o=c):typeof o==="object"&&(o=q.param(o,q.ajaxSettings.traditional),v="POST"));var B=this;q.ajax({url:m,type:v,dataType:"html",data:o,complete:function(F,
V,T){T=F.responseText;F.isResolved()&&(F.done(function(R){T=R}),B.html(y?q("<div>").append(T.replace(Vb,"")).find(y):T));u&&B.each(u,[T,V,F])}});return this},serialize:function(){return q.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?q.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Wb.test(this.nodeName)||Sb.test(this.type))}).map(function(m,o){var u=q(this).val();return u==null?null:q.isArray(u)?
q.map(u,function(v){return{name:o.name,value:v.replace(yb,"\r\n")}}):{name:o.name,value:u.replace(yb,"\r\n")}}).get()}});q.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(m,o){q.fn[o]=function(u){return this.bind(o,u)}});q.each(["get","post"],function(m,o){q[o]=function(u,v,y,B){q.isFunction(v)&&(B=B||y,y=v,v=c);return q.ajax({type:o,url:u,data:v,success:y,dataType:B})}});q.extend({getScript:function(m,o){return q.get(m,c,o,"script")},getJSON:function(m,o,
u){return q.get(m,o,u,"json")},ajaxSetup:function(m,o){o?q.extend(true,m,q.ajaxSettings,o):(o=m,m=q.extend(true,q.ajaxSettings,o));for(var u in{context:1,url:1})u in o?m[u]=o[u]:u in q.ajaxSettings&&(m[u]=q.ajaxSettings[u]);return m},ajaxSettings:{url:bb,isLocal:/(?:^file|^widget|\-extension):$/.test(cb[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",
"*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":true,"text json":q.parseJSON,"text xml":q.parseXML}},ajaxPrefilter:t(ob),ajaxTransport:t(Cb),ajax:function(m,o){function u(S,U,aa,oa){if(Ja!==2){Ja=2;Ea&&clearTimeout(Ea);xa=c;pa=oa||"";A.readyState=S?4:0;var na,za,La;if(aa){oa=v;var Ka=A,Pa=oa.contents,G=oa.dataTypes,W=oa.responseFields,ca,ga,ra,Aa;for(ga in W)ga in aa&&(Ka[W[ga]]=aa[ga]);for(;G[0]===
"*";){G.shift();ca===c&&(ca=oa.mimeType||Ka.getResponseHeader("content-type"))}if(ca)for(ga in Pa)if(Pa[ga]&&Pa[ga].test(ca)){G.unshift(ga);break}if(G[0]in aa)ra=G[0];else{for(ga in aa){if(!G[0]||oa.converters[ga+" "+G[0]]){ra=ga;break}Aa||(Aa=ga)}ra=ra||Aa}if(ra){ra!==G[0]&&G.unshift(ra);aa=aa[ra]}else aa=void 0}else aa=c;aa=aa;if(S>=200&&S<300||S===304){if(v.ifModified){if(ca=A.getResponseHeader("Last-Modified"))q.lastModified[R]=ca;if(ca=A.getResponseHeader("Etag"))q.etag[R]=ca}if(S===304){U="notmodified";
na=true}else try{ca=v;aa=aa;ca.dataFilter&&(aa=ca.dataFilter(aa,ca.dataType));var Da=ca.dataTypes;ga={};var Ga,Qa,Va=Da.length,Wa,Ya=Da[0],hb,pb,Za,db,ib;for(Ga=1;Ga<Va;Ga++){if(Ga===1)for(Qa in ca.converters)typeof Qa==="string"&&(ga[Qa.toLowerCase()]=ca.converters[Qa]);hb=Ya;Ya=Da[Ga];if(Ya==="*")Ya=hb;else if(hb!=="*"&&hb!==Ya){pb=hb+" "+Ya;Za=ga[pb]||ga["* "+Ya];if(!Za){ib=c;for(db in ga){Wa=db.split(" ");if(Wa[0]===hb||Wa[0]==="*")if(ib=ga[Wa[1]+" "+Ya]){db=ga[db];db===true?Za=ib:ib===true&&
(Za=db);break}}}!Za&&!ib&&q.error("No conversion from "+pb.replace(" "," to "));Za!==true&&(aa=Za?Za(aa):ib(db(aa)))}}za=aa;U="success";na=true}catch($b){U="parsererror";La=$b}}else{La=U;if(!U||S){U="error";S<0&&(S=0)}}A.status=S;A.statusText=U;na?F.resolveWith(y,[za,U,A]):F.rejectWith(y,[A,U,La]);A.statusCode(T);T=c;Oa&&B.trigger("ajax"+(na?"Success":"Error"),[A,v,na?za:La]);V.resolveWith(y,[A,U]);Oa&&(B.trigger("ajaxComplete",[A,v]),--q.active||q.event.trigger("ajaxStop"))}}typeof m==="object"&&
(o=m,m=c);o=o||{};var v=q.ajaxSetup({},o),y=v.context||v,B=y!==v&&(y.nodeType||y instanceof q)?q(y):q.event,F=q.Deferred(),V=q._Deferred(),T=v.statusCode||{},R,da={},pa,Ca,xa,Ea,Ma,Ja=0,Oa,Sa,A={readyState:0,setRequestHeader:function(S,U){Ja||(da[S.toLowerCase().replace(Yb,Zb)]=U);return this},getAllResponseHeaders:function(){return Ja===2?pa:null},getResponseHeader:function(S){var U;if(Ja===2){if(!Ca)for(Ca={};U=Rb.exec(pa);)Ca[U[1].toLowerCase()]=U[2];U=Ca[S.toLowerCase()]}return U===c?null:U},
overrideMimeType:function(S){Ja||(v.mimeType=S);return this},abort:function(S){S=S||"abort";xa&&xa.abort(S);u(0,S);return this}};F.promise(A);A.success=A.done;A.error=A.fail;A.complete=V.done;A.statusCode=function(S){if(S){var U;if(Ja<2)for(U in S)T[U]=[T[U],S[U]];else{U=S[A.status];A.then(U,U)}}return this};v.url=((m||v.url)+"").replace(Qb,"").replace(Ub,cb[1]+"//");v.dataTypes=q.trim(v.dataType||"*").toLowerCase().split(rb);v.crossDomain||(Ma=Ab.exec(v.url.toLowerCase()),v.crossDomain=Ma&&(Ma[1]!=
cb[1]||Ma[2]!=cb[2]||(Ma[3]||(Ma[1]==="http:"?80:443))!=(cb[3]||(cb[1]==="http:"?80:443))));v.data&&v.processData&&typeof v.data!=="string"&&(v.data=q.param(v.data,v.traditional));p(ob,v,o,A);if(Ja===2)return false;Oa=v.global;v.type=v.type.toUpperCase();v.hasContent=!Tb.test(v.type);Oa&&q.active++===0&&q.event.trigger("ajaxStart");if(!v.hasContent){v.data&&(v.url+=(zb.test(v.url)?"&":"?")+v.data);R=v.url;if(v.cache===false){Ma=q.now();var J=v.url.replace(Xb,"$1_="+Ma);v.url=J+(J===v.url?(zb.test(v.url)?
"&":"?")+"_="+Ma:"")}}if(v.data&&v.hasContent&&v.contentType!==false||o.contentType)da["Content-Type"]=v.contentType;v.ifModified&&(R=R||v.url,q.lastModified[R]&&(da["If-Modified-Since"]=q.lastModified[R]),q.etag[R]&&(da["If-None-Match"]=q.etag[R]));da.Accept=v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+(v.dataTypes[0]!=="*"?", */*; q=0.01":""):v.accepts["*"];for(Sa in v.headers)A.setRequestHeader(Sa,v.headers[Sa]);if(v.beforeSend&&(v.beforeSend.call(y,A,v)===false||Ja===2)){A.abort();
return false}for(Sa in{success:1,error:1,complete:1})A[Sa](v[Sa]);if(xa=p(Cb,v,o,A)){A.readyState=1;Oa&&B.trigger("ajaxSend",[A,v]);v.async&&v.timeout>0&&(Ea=setTimeout(function(){A.abort("timeout")},v.timeout));try{Ja=1;xa.send(da,u)}catch(X){status<2?u(-1,X):q.error(X)}}else u(-1,"No Transport");return A},param:function(m,o){var u=[],v=function(B,F){F=q.isFunction(F)?F():F;u[u.length]=encodeURIComponent(B)+"="+encodeURIComponent(F)};o===c&&(o=q.ajaxSettings.traditional);if(q.isArray(m)||m.jquery&&
!q.isPlainObject(m))q.each(m,function(){v(this.name,this.value)});else for(var y in m)n(y,m[y],o,v);return u.join("&").replace(Pb,"+")}});q.extend({active:0,lastModified:{},etag:{}});var ac=q.now(),lb=/(\=)\?(&|$)|()\?\?()/i;q.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return q.expando+"_"+ac++}});q.ajaxPrefilter("json jsonp",function(m,o,u){var v=typeof m.data==="string";if(m.dataTypes[0]==="jsonp"||o.jsonpCallback||o.jsonp!=null||m.jsonp!==false&&(lb.test(m.url)||v&&lb.test(m.data))){var y,
B=m.jsonpCallback=q.isFunction(m.jsonpCallback)?m.jsonpCallback():m.jsonpCallback,F=a[B];o=m.url;var V=m.data,T="$1"+B+"$2",R=function(){a[B]=F;y&&q.isFunction(F)&&a[B](y[0])};m.jsonp!==false&&(o=o.replace(lb,T),m.url===o&&(v&&(V=V.replace(lb,T)),m.data===V&&(o+=(/\?/.test(o)?"&":"?")+m.jsonp+"="+B)));m.url=o;m.data=V;a[B]=function(da){y=[da]};u.then(R,R);m.converters["script json"]=function(){y||q.error(B+" was not called");return y[0]};m.dataTypes[0]="json";return"script"}});q.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
contents:{script:/javascript|ecmascript/},converters:{"text script":function(m){q.globalEval(m);return m}}});q.ajaxPrefilter("script",function(m){m.cache===c&&(m.cache=false);m.crossDomain&&(m.type="GET",m.global=false)});q.ajaxTransport("script",function(m){if(m.crossDomain){var o,u=N.head||N.getElementsByTagName("head")[0]||N.documentElement;return{send:function(v,y){o=N.createElement("script");o.async="async";m.scriptCharset&&(o.charset=m.scriptCharset);o.src=m.url;o.onload=o.onreadystatechange=
function(B,F){if(!o.readyState||/loaded|complete/.test(o.readyState)){o.onload=o.onreadystatechange=null;u&&o.parentNode&&u.removeChild(o);o=c;F||y(200,"success")}};u.insertBefore(o,u.firstChild)},abort:function(){o&&o.onload(0,1)}}}});var bc=q.now(),eb;q.ajaxSettings.xhr=a.ActiveXObject?function(){var m;if(!(m=!this.isLocal&&g()))a:{try{m=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(o){}m=void 0}return m}:g;ab=q.ajaxSettings.xhr();q.support.ajax=!!ab;q.support.cors=ab&&"withCredentials"in
ab;ab=c;q.support.ajax&&q.ajaxTransport(function(m){if(!m.crossDomain||q.support.cors){var o;return{send:function(u,v){var y=m.xhr(),B,F;m.username?y.open(m.type,m.url,m.async,m.username,m.password):y.open(m.type,m.url,m.async);if(m.xhrFields)for(F in m.xhrFields)y[F]=m.xhrFields[F];m.mimeType&&y.overrideMimeType&&y.overrideMimeType(m.mimeType);(!m.crossDomain||m.hasContent)&&!u["X-Requested-With"]&&(u["X-Requested-With"]="XMLHttpRequest");try{for(F in u)y.setRequestHeader(F,u[F])}catch(V){}y.send(m.hasContent&&
m.data||null);o=function(T,R){var da,pa,Ca,xa,Ea;try{if(o&&(R||y.readyState===4)){o=c;B&&(y.onreadystatechange=q.noop,delete eb[B]);if(R)y.readyState!==4&&y.abort();else{da=y.status;Ca=y.getAllResponseHeaders();xa={};(Ea=y.responseXML)&&Ea.documentElement&&(xa.xml=Ea);xa.text=y.responseText;try{pa=y.statusText}catch(Ma){pa=""}da||!m.isLocal||m.crossDomain?da===1223&&(da=204):da=xa.text?200:404}}}catch(Ja){R||v(-1,Ja)}xa&&v(da,pa,xa,Ca)};m.async&&y.readyState!==4?(eb||(eb={},h()),B=bc++,y.onreadystatechange=
eb[B]=o):o()},abort:function(){o&&o(0,1)}}}});var nb={},cc=/^(?:toggle|show|hide)$/,dc=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,mb,qb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];q.fn.extend({show:function(m,o,u){if(m||m===0)return this.animate(f("show",3),m,o,u);u=0;for(var v=this.length;u<v;u++){m=this[u];o=m.style.display;!q._data(m,"olddisplay")&&o==="none"&&(o=m.style.display="");o===""&&q.css(m,"display")===
"none"&&q._data(m,"olddisplay",b(m.nodeName))}for(u=0;u<v;u++){m=this[u];o=m.style.display;if(o===""||o==="none")m.style.display=q._data(m,"olddisplay")||""}return this},hide:function(m,o,u){if(m||m===0)return this.animate(f("hide",3),m,o,u);m=0;for(o=this.length;m<o;m++){u=q.css(this[m],"display");u!=="none"&&!q._data(this[m],"olddisplay")&&q._data(this[m],"olddisplay",u)}for(m=0;m<o;m++)this[m].style.display="none";return this},_toggle:q.fn.toggle,toggle:function(m,o,u){var v=typeof m==="boolean";
q.isFunction(m)&&q.isFunction(o)?this._toggle.apply(this,arguments):m==null||v?this.each(function(){var y=v?m:q(this).is(":hidden");q(this)[y?"show":"hide"]()}):this.animate(f("toggle",3),m,o,u);return this},fadeTo:function(m,o,u,v){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:o},m,u,v)},animate:function(m,o,u,v){var y=q.speed(o,u,v);if(q.isEmptyObject(m))return this.each(y.complete);return this[y.queue===false?"each":"queue"](function(){var B=q.extend({},y),F,V=this.nodeType===
1,T=V&&q(this).is(":hidden"),R=this;for(F in m){var da=q.camelCase(F);F!==da&&(m[da]=m[F],delete m[F],F=da);if(m[F]==="hide"&&T||m[F]==="show"&&!T)return B.complete.call(this);if(V&&(F==="height"||F==="width")){B.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(q.css(this,"display")==="inline"&&q.css(this,"float")==="none")if(q.support.inlineBlockNeedsLayout)b(this.nodeName)==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1);else this.style.display=
"inline-block"}q.isArray(m[F])&&((B.specialEasing=B.specialEasing||{})[F]=m[F][1],m[F]=m[F][0])}B.overflow!=null&&(this.style.overflow="hidden");B.curAnim=q.extend({},m);q.each(m,function(pa,Ca){var xa=new q.fx(R,B,pa);if(cc.test(Ca))xa[Ca==="toggle"?T?"show":"hide":Ca](m);else{var Ea=dc.exec(Ca),Ma=xa.cur();if(Ea){var Ja=parseFloat(Ea[2]),Oa=Ea[3]||(q.cssNumber[pa]?"":"px");Oa!=="px"&&(q.style(R,pa,(Ja||1)+Oa),Ma=(Ja||1)/xa.cur()*Ma,q.style(R,pa,Ma+Oa));Ea[1]&&(Ja=(Ea[1]==="-="?-1:1)*Ja+Ma);xa.custom(Ma,
Ja,Oa)}else xa.custom(Ma,Ca,"")}});return true})},stop:function(m,o){var u=q.timers;m&&this.queue([]);this.each(function(){for(var v=u.length-1;v>=0;v--)u[v].elem===this&&(o&&u[v](true),u.splice(v,1))});o||this.dequeue();return this}});q.each({slideDown:f("show",1),slideUp:f("hide",1),slideToggle:f("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(m,o){q.fn[m]=function(u,v,y){return this.animate(o,u,v,y)}});q.extend({speed:function(m,o,u){var v=m&&
typeof m==="object"?q.extend({},m):{complete:u||!u&&o||q.isFunction(m)&&m,duration:m,easing:u&&o||o&&!q.isFunction(o)&&o};v.duration=q.fx.off?0:typeof v.duration==="number"?v.duration:v.duration in q.fx.speeds?q.fx.speeds[v.duration]:q.fx.speeds._default;v.old=v.complete;v.complete=function(){v.queue!==false&&q(this).dequeue();q.isFunction(v.old)&&v.old.call(this)};return v},easing:{linear:function(m,o,u,v){return u+v*m},swing:function(m,o,u,v){return(-Math.cos(m*Math.PI)/2+0.5)*v+u}},timers:[],fx:function(m,
o,u){this.options=o;this.elem=m;this.prop=u;o.orig||(o.orig={})}});q.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(q.fx.step[this.prop]||q.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var m,o=q.css(this.elem,this.prop);return isNaN(m=parseFloat(o))?!o||o==="auto"?0:o:m},custom:function(m,o,u){function v(F){return y.step(F)}var y=this,B=q.fx;
this.startTime=q.now();this.start=m;this.end=o;this.unit=u||this.unit||(q.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;v.elem=this.elem;v()&&q.timers.push(v)&&!mb&&(mb=setInterval(B.tick,B.interval))},show:function(){this.options.orig[this.prop]=q.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());q(this.elem).show()},hide:function(){this.options.orig[this.prop]=q.style(this.elem,this.prop);this.options.hide=
true;this.custom(this.cur(),0)},step:function(m){var o=q.now(),u=true;if(m||o>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var v in this.options.curAnim)this.options.curAnim[v]!==true&&(u=false);if(u){if(this.options.overflow!=null&&!q.support.shrinkWrapBlocks){var y=this.elem,B=this.options;q.each(["","X","Y"],function(V,T){y.style["overflow"+T]=B.overflow[V]})}this.options.hide&&q(this.elem).hide();if(this.options.hide||
this.options.show)for(var F in this.options.curAnim)q.style(this.elem,F,this.options.orig[F]);this.options.complete.call(this.elem)}return false}m=o-this.startTime;this.state=m/this.options.duration;o=this.options.easing||(q.easing.swing?"swing":"linear");this.pos=q.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||o](this.state,m,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update();return true}};q.extend(q.fx,{tick:function(){for(var m=
q.timers,o=0;o<m.length;o++)m[o]()||m.splice(o--,1);m.length||q.fx.stop()},interval:13,stop:function(){clearInterval(mb);mb=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(m){q.style(m.elem,"opacity",m.now)},_default:function(m){m.elem.style&&m.elem.style[m.prop]!=null?m.elem.style[m.prop]=(m.prop==="width"||m.prop==="height"?Math.max(0,m.now):m.now)+m.unit:m.elem[m.prop]=m.now}}});q.expr&&q.expr.filters&&(q.expr.filters.animated=function(m){return q.grep(q.timers,function(o){return m===
o.elem}).length});var ec=/^t(?:able|d|h)$/i,Db=/^(?:body|html)$/i;"getBoundingClientRect"in N.documentElement?q.fn.offset=function(m){var o=this[0],u;if(m)return this.each(function(F){q.offset.setOffset(this,m,F)});if(!o||!o.ownerDocument)return null;if(o===o.ownerDocument.body)return q.offset.bodyOffset(o);try{u=o.getBoundingClientRect()}catch(v){}var y=o.ownerDocument,B=y.documentElement;if(!u||!q.contains(B,o))return u?{top:u.top,left:u.left}:{top:0,left:0};o=y.body;y=d(y);return{top:u.top+(y.pageYOffset||
q.support.boxModel&&B.scrollTop||o.scrollTop)-(B.clientTop||o.clientTop||0),left:u.left+(y.pageXOffset||q.support.boxModel&&B.scrollLeft||o.scrollLeft)-(B.clientLeft||o.clientLeft||0)}}:q.fn.offset=function(m){var o=this[0];if(m)return this.each(function(R){q.offset.setOffset(this,m,R)});if(!o||!o.ownerDocument)return null;if(o===o.ownerDocument.body)return q.offset.bodyOffset(o);q.offset.initialize();var u,v=o.offsetParent,y=o.ownerDocument,B=y.documentElement,F=y.body;u=(y=y.defaultView)?y.getComputedStyle(o,
null):o.currentStyle;for(var V=o.offsetTop,T=o.offsetLeft;(o=o.parentNode)&&o!==F&&o!==B;){if(q.offset.supportsFixedPosition&&u.position==="fixed")break;u=y?y.getComputedStyle(o,null):o.currentStyle;V-=o.scrollTop;T-=o.scrollLeft;o===v&&(V+=o.offsetTop,T+=o.offsetLeft,q.offset.doesNotAddBorder&&(!q.offset.doesAddBorderForTableAndCells||!ec.test(o.nodeName))&&(V+=parseFloat(u.borderTopWidth)||0,T+=parseFloat(u.borderLeftWidth)||0),v=o.offsetParent);q.offset.subtractsBorderForOverflowNotVisible&&u.overflow!==
"visible"&&(V+=parseFloat(u.borderTopWidth)||0,T+=parseFloat(u.borderLeftWidth)||0);u=u}if(u.position==="relative"||u.position==="static"){V+=F.offsetTop;T+=F.offsetLeft}q.offset.supportsFixedPosition&&u.position==="fixed"&&(V+=Math.max(B.scrollTop,F.scrollTop),T+=Math.max(B.scrollLeft,F.scrollLeft));return{top:V,left:T}};q.offset={initialize:function(){var m=N.body,o=N.createElement("div"),u,v,y,B=parseFloat(q.css(m,"marginTop"))||0;q.extend(o.style,{position:"absolute",top:0,left:0,margin:0,border:0,
width:"1px",height:"1px",visibility:"hidden"});o.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";m.insertBefore(o,m.firstChild);u=o.firstChild;v=u.firstChild;y=u.nextSibling.firstChild.firstChild;this.doesNotAddBorder=v.offsetTop!==5;this.doesAddBorderForTableAndCells=
y.offsetTop===5;v.style.position="fixed";v.style.top="20px";this.supportsFixedPosition=v.offsetTop===20||v.offsetTop===15;v.style.position=v.style.top="";u.style.overflow="hidden";u.style.position="relative";this.subtractsBorderForOverflowNotVisible=v.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=m.offsetTop!==B;m.removeChild(o);q.offset.initialize=q.noop},bodyOffset:function(m){var o=m.offsetTop,u=m.offsetLeft;q.offset.initialize();q.offset.doesNotIncludeMarginInBodyOffset&&(o+=parseFloat(q.css(m,
"marginTop"))||0,u+=parseFloat(q.css(m,"marginLeft"))||0);return{top:o,left:u}},setOffset:function(m,o,u){var v=q.css(m,"position");v==="static"&&(m.style.position="relative");var y=q(m),B=y.offset(),F=q.css(m,"top"),V=q.css(m,"left"),T=v==="absolute"&&q.inArray("auto",[F,V])>-1;v={};var R={};T&&(R=y.position());F=T?R.top:parseInt(F,10)||0;V=T?R.left:parseInt(V,10)||0;q.isFunction(o)&&(o=o.call(m,u,B));o.top!=null&&(v.top=o.top-B.top+F);o.left!=null&&(v.left=o.left-B.left+V);"using"in o?o.using.call(m,
v):y.css(v)}};q.fn.extend({position:function(){if(!this[0])return null;var m=this[0],o=this.offsetParent(),u=this.offset(),v=Db.test(o[0].nodeName)?{top:0,left:0}:o.offset();u.top-=parseFloat(q.css(m,"marginTop"))||0;u.left-=parseFloat(q.css(m,"marginLeft"))||0;v.top+=parseFloat(q.css(o[0],"borderTopWidth"))||0;v.left+=parseFloat(q.css(o[0],"borderLeftWidth"))||0;return{top:u.top-v.top,left:u.left-v.left}},offsetParent:function(){return this.map(function(){for(var m=this.offsetParent||N.body;m&&!Db.test(m.nodeName)&&
q.css(m,"position")==="static";)m=m.offsetParent;return m})}});q.each(["Left","Top"],function(m,o){var u="scroll"+o;q.fn[u]=function(v){var y=this[0],B;if(!y)return null;if(v!==c)return this.each(function(){(B=d(this))?B.scrollTo(m?q(B).scrollLeft():v,m?v:q(B).scrollTop()):this[u]=v});return(B=d(y))?"pageXOffset"in B?B[m?"pageYOffset":"pageXOffset"]:q.support.boxModel&&B.document.documentElement[u]||B.document.body[u]:y[u]}});q.each(["Height","Width"],function(m,o){var u=o.toLowerCase();q.fn["inner"+
o]=function(){return this[0]?parseFloat(q.css(this[0],u,"padding")):null};q.fn["outer"+o]=function(v){return this[0]?parseFloat(q.css(this[0],u,v?"margin":"border")):null};q.fn[u]=function(v){var y=this[0];if(!y)return v==null?null:this;if(q.isFunction(v))return this.each(function(F){var V=q(this);V[u](v.call(this,F,V[u]()))});if(q.isWindow(y)){var B=y.document.documentElement["client"+o];return y.document.compatMode==="CSS1Compat"&&B||y.document.body["client"+o]||B}if(y.nodeType===9)return Math.max(y.documentElement["client"+
o],y.body["scroll"+o],y.documentElement["scroll"+o],y.body["offset"+o],y.documentElement["offset"+o]);if(v===c){y=q.css(y,u);B=parseFloat(y);return q.isNaN(B)?y:B}return this.css(u,typeof v==="string"?v:v+"px")}});a.jQuery=a.$=q})(window);
(function(){var a=this,c=a._,d={},b=Array.prototype,f=Object.prototype,g=b.slice,h=b.unshift,n=f.toString,p=f.hasOwnProperty,t=b.forEach,w=b.map,x=b.reduce,E=b.reduceRight,L=b.filter,Q=b.every,O=b.some,I=b.indexOf,ba=b.lastIndexOf;f=Array.isArray;var K=Object.keys,C=function(z){return new q(z)};if(typeof module!=="undefined"&&module.exports){module.exports=C;C._=C}else a._=C;C.VERSION="1.1.4";var ka=C.each=C.forEach=function(z,D,H){if(z!=null)if(t&&z.forEach===t)z.forEach(D,H);else if(C.isNumber(z.length))for(var M=
0,Z=z.length;M<Z;M++){if(D.call(H,z[M],M,z)===d)break}else for(M in z)if(p.call(z,M))if(D.call(H,z[M],M,z)===d)break};C.map=function(z,D,H){var M=[];if(z==null)return M;if(w&&z.map===w)return z.map(D,H);ka(z,function(Z,ha,qa){M[M.length]=D.call(H,Z,ha,qa)});return M};C.reduce=C.foldl=C.inject=function(z,D,H,M){var Z=H!==void 0;if(z==null)z=[];if(x&&z.reduce===x){if(M)D=C.bind(D,M);return Z?z.reduce(D,H):z.reduce(D)}ka(z,function(ha,qa,Ba){if(!Z&&qa===0){H=ha;Z=true}else H=D.call(M,H,ha,qa,Ba)});if(!Z)throw new TypeError("Reduce of empty array with no initial value");
return H};C.reduceRight=C.foldr=function(z,D,H,M){if(z==null)z=[];if(E&&z.reduceRight===E){if(M)D=C.bind(D,M);return H!==void 0?z.reduceRight(D,H):z.reduceRight(D)}z=(C.isArray(z)?z.slice():C.toArray(z)).reverse();return C.reduce(z,D,H,M)};C.find=C.detect=function(z,D,H){var M;ua(z,function(Z,ha,qa){if(D.call(H,Z,ha,qa)){M=Z;return true}});return M};C.filter=C.select=function(z,D,H){var M=[];if(z==null)return M;if(L&&z.filter===L)return z.filter(D,H);ka(z,function(Z,ha,qa){if(D.call(H,Z,ha,qa))M[M.length]=
Z});return M};C.reject=function(z,D,H){var M=[];if(z==null)return M;ka(z,function(Z,ha,qa){D.call(H,Z,ha,qa)||(M[M.length]=Z)});return M};C.every=C.all=function(z,D,H){D=D||C.identity;var M=true;if(z==null)return M;if(Q&&z.every===Q)return z.every(D,H);ka(z,function(Z,ha,qa){if(!(M=M&&D.call(H,Z,ha,qa)))return d});return M};var ua=C.some=C.any=function(z,D,H){D=D||C.identity;var M=false;if(z==null)return M;if(O&&z.some===O)return z.some(D,H);ka(z,function(Z,ha,qa){if(M=D.call(H,Z,ha,qa))return d});
return M};C.include=C.contains=function(z,D){var H=false;if(z==null)return H;if(I&&z.indexOf===I)return z.indexOf(D)!=-1;ua(z,function(M){if(H=M===D)return true});return H};C.invoke=function(z,D){var H=g.call(arguments,2);return C.map(z,function(M){return(D?M[D]:M).apply(M,H)})};C.pluck=function(z,D){return C.map(z,function(H){return H[D]})};C.max=function(z,D,H){if(!D&&C.isArray(z))return Math.max.apply(Math,z);var M={computed:-Infinity};ka(z,function(Z,ha,qa){ha=D?D.call(H,Z,ha,qa):Z;ha>=M.computed&&
(M={value:Z,computed:ha})});return M.value};C.min=function(z,D,H){if(!D&&C.isArray(z))return Math.min.apply(Math,z);var M={computed:Infinity};ka(z,function(Z,ha,qa){ha=D?D.call(H,Z,ha,qa):Z;ha<M.computed&&(M={value:Z,computed:ha})});return M.value};C.sortBy=function(z,D,H){return C.pluck(C.map(z,function(M,Z,ha){return{value:M,criteria:D.call(H,M,Z,ha)}}).sort(function(M,Z){var ha=M.criteria,qa=Z.criteria;return ha<qa?-1:ha>qa?1:0}),"value")};C.sortedIndex=function(z,D,H){H=H||C.identity;for(var M=
0,Z=z.length;M<Z;){var ha=M+Z>>1;H(z[ha])<H(D)?M=ha+1:Z=ha}return M};C.toArray=function(z){if(!z)return[];if(z.toArray)return z.toArray();if(C.isArray(z))return z;if(C.isArguments(z))return g.call(z);return C.values(z)};C.size=function(z){return C.toArray(z).length};C.first=C.head=function(z,D,H){return D&&!H?g.call(z,0,D):z[0]};C.rest=C.tail=function(z,D,H){return g.call(z,C.isUndefined(D)||H?1:D)};C.last=function(z){return z[z.length-1]};C.compact=function(z){return C.filter(z,function(D){return!!D})};
C.flatten=function(z){return C.reduce(z,function(D,H){if(C.isArray(H))return D.concat(C.flatten(H));D[D.length]=H;return D},[])};C.without=function(z){var D=g.call(arguments,1);return C.filter(z,function(H){return!C.include(D,H)})};C.uniq=C.unique=function(z,D){return C.reduce(z,function(H,M,Z){if(0==Z||(D===true?C.last(H)!=M:!C.include(H,M)))H[H.length]=M;return H},[])};C.intersect=function(z){var D=g.call(arguments,1);return C.filter(C.uniq(z),function(H){return C.every(D,function(M){return C.indexOf(M,
H)>=0})})};C.zip=function(){for(var z=g.call(arguments),D=C.max(C.pluck(z,"length")),H=Array(D),M=0;M<D;M++)H[M]=C.pluck(z,""+M);return H};C.indexOf=function(z,D,H){if(z==null)return-1;if(H){H=C.sortedIndex(z,D);return z[H]===D?H:-1}if(I&&z.indexOf===I)return z.indexOf(D);H=0;for(var M=z.length;H<M;H++)if(z[H]===D)return H;return-1};C.lastIndexOf=function(z,D){if(z==null)return-1;if(ba&&z.lastIndexOf===ba)return z.lastIndexOf(D);for(var H=z.length;H--;)if(z[H]===D)return H;return-1};C.range=function(z,
D,H){var M=g.call(arguments),Z=M.length<=1;z=Z?0:M[0];D=Z?M[0]:M[1];H=M[2]||1;M=Math.max(Math.ceil((D-z)/H),0);Z=0;for(var ha=Array(M);Z<M;){ha[Z++]=z;z+=H}return ha};C.bind=function(z,D){var H=g.call(arguments,2);return function(){return z.apply(D||{},H.concat(g.call(arguments)))}};C.bindAll=function(z){var D=g.call(arguments,1);if(D.length==0)D=C.functions(z);ka(D,function(H){z[H]=C.bind(z[H],z)});return z};C.memoize=function(z,D){var H={};D=D||C.identity;return function(){var M=D.apply(this,arguments);
return M in H?H[M]:H[M]=z.apply(this,arguments)}};C.delay=function(z,D){var H=g.call(arguments,2);return setTimeout(function(){return z.apply(z,H)},D)};C.defer=function(z){return C.delay.apply(C,[z,1].concat(g.call(arguments,1)))};var fa=function(z,D,H){var M;return function(){var Z=this,ha=arguments,qa=function(){M=null;z.apply(Z,ha)};H&&clearTimeout(M);if(H||!M)M=setTimeout(qa,D)}};C.throttle=function(z,D){return fa(z,D,false)};C.debounce=function(z,D){return fa(z,D,true)};C.wrap=function(z,D){return function(){var H=
[z].concat(g.call(arguments));return D.apply(this,H)}};C.compose=function(){var z=g.call(arguments);return function(){for(var D=g.call(arguments),H=z.length-1;H>=0;H--)D=[z[H].apply(this,D)];return D[0]}};C.keys=K||function(z){if(C.isArray(z))return C.range(0,z.length);var D=[],H;for(H in z)if(p.call(z,H))D[D.length]=H;return D};C.values=function(z){return C.map(z,C.identity)};C.functions=C.methods=function(z){return C.filter(C.keys(z),function(D){return C.isFunction(z[D])}).sort()};C.extend=function(z){ka(g.call(arguments,
1),function(D){for(var H in D)z[H]=D[H]});return z};C.clone=function(z){return C.isArray(z)?z.slice():C.extend({},z)};C.tap=function(z,D){D(z);return z};C.isEqual=function(z,D){if(z===D)return true;var H=typeof z;if(H!=typeof D)return false;if(z==D)return true;if(!z&&D||z&&!D)return false;if(z._chain)z=z._wrapped;if(D._chain)D=D._wrapped;if(z.isEqual)return z.isEqual(D);if(C.isDate(z)&&C.isDate(D))return z.getTime()===D.getTime();if(C.isNaN(z)&&C.isNaN(D))return false;if(C.isRegExp(z)&&C.isRegExp(D))return z.source===
D.source&&z.global===D.global&&z.ignoreCase===D.ignoreCase&&z.multiline===D.multiline;if(H!=="object")return false;if(z.length&&z.length!==D.length)return false;H=C.keys(z);var M=C.keys(D);if(H.length!=M.length)return false;for(var Z in z)if(!(Z in D)||!C.isEqual(z[Z],D[Z]))return false;return true};C.isEmpty=function(z){if(C.isArray(z)||C.isString(z))return z.length===0;for(var D in z)if(p.call(z,D))return false;return true};C.isElement=function(z){return!!(z&&z.nodeType==1)};C.isArray=f||function(z){return n.call(z)===
"[object Array]"};C.isArguments=function(z){return!!(z&&p.call(z,"callee"))};C.isFunction=function(z){return!!(z&&z.constructor&&z.call&&z.apply)};C.isString=function(z){return!!(z===""||z&&z.charCodeAt&&z.substr)};C.isNumber=function(z){return!!(z===0||z&&z.toExponential&&z.toFixed)};C.isNaN=function(z){return z!==z};C.isBoolean=function(z){return z===true||z===false};C.isDate=function(z){return!!(z&&z.getTimezoneOffset&&z.setUTCFullYear)};C.isRegExp=function(z){return!!(z&&z.test&&z.exec&&(z.ignoreCase||
z.ignoreCase===false))};C.isNull=function(z){return z===null};C.isUndefined=function(z){return z===void 0};C.noConflict=function(){a._=c;return this};C.identity=function(z){return z};C.times=function(z,D,H){for(var M=0;M<z;M++)D.call(H,M)};C.mixin=function(z){ka(C.functions(z),function(D){la(D,C[D]=z[D])})};var N=0;C.uniqueId=function(z){var D=N++;return z?z+D:D};C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g};C.template=function(z,D){var H=C.templateSettings;H="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+
z.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(H.interpolate,function(M,Z){return"',"+Z.replace(/\\'/g,"'")+",'"}).replace(H.evaluate||null,function(M,Z){return"');"+Z.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";H=new Function("obj",H);return D?H(D):H};var q=function(z){this._wrapped=z};C.prototype=q.prototype;var ya=function(z,D){return D?C(z).chain():z},la=function(z,D){q.prototype[z]=
function(){var H=g.call(arguments);h.call(H,this._wrapped);return ya(D.apply(C,H),this._chain)}};C.mixin(C);ka(["pop","push","reverse","shift","sort","splice","unshift"],function(z){var D=b[z];q.prototype[z]=function(){D.apply(this._wrapped,arguments);return ya(this._wrapped,this._chain)}});ka(["concat","join","slice"],function(z){var D=b[z];q.prototype[z]=function(){return ya(D.apply(this._wrapped,arguments),this._chain)}});q.prototype.chain=function(){this._chain=true;return this};q.prototype.value=
function(){return this._wrapped}})();var joosetop=this;Joose=function(){this.currentModule=this.cc=null;this.top=joosetop;this.globalObjects=[];this.anonymouseClassCounter=0};Joose.A={};Joose.A.each=function(a,c){for(var d=0;d<a.length;d++)c(a[d],d)};Joose.A.exists=function(a,c){for(var d=0;d<a.length;d++)if(a[d]==c)return true;return false};Joose.A.concat=function(a,c){a.push.apply(a,c);return a};Joose.A.grep=function(a,c){var d=[];Joose.A.each(a,function(b){c(b)&&d.push(b)});return d};
Joose.A.remove=function(a,c){var d=[];Joose.A.each(a,function(b){b!==c&&d.push(b)});return d};Joose.S={};Joose.S.uppercaseFirst=function(a){var c=a.substr(0,1);a=a.substr(1,a.length-1);c=c.toUpperCase();return c+a};Joose.S.isString=function(a){if(typeof a=="string")return true;return false};Joose.O={};Joose.O.each=function(a,c){for(var d in a)c(a[d],d)};Joose.O.eachSafe=function(a,c){for(var d in a)a.hasOwnProperty(d)&&c(a[d],d)};Joose.O.extend=function(a,c){for(var d in c)a[d]=c[d]};
Joose.prototype={addToString:function(a,c){a.toString=c},isInstance:function(a){if(!a.meta)throw"isInstance only works with Joose objects and classes.";if(a.constructor===a.meta.c)return true;return false},init:function(){this.builder=new Joose.Builder;this.builder.globalize()},components:function(){return["Joose.Builder","Joose.Class","Joose.Method","Joose.ClassMethod","Joose.Attribute","Joose.Role","Joose.SimpleRequest","Joose.Gears","Joose.Storage","Joose.Storage.Unpacker","Joose.Decorator","Joose.Module",
"Joose.Prototype","Joose.TypeConstraint","Joose.TypeCoercion","Joose.Types"]},loadComponents:function(a){var c="";Joose.A.each(this.components(),function(d){d=""+a+"/"+d.split(".").join("/")+".js";c+='<script type="text/javascript" src="'+d+'"><\/script>'});document.write(c)}};Joose.copyObject=function(a,c){var d="";Joose.O.each(a,function(b,f){d+=", "+f;c[f]=b});return c};Joose.emptyFunction=function(){};var joose=new Joose;
Joose.bootstrap=function(){var a=new Joose.MetaClassBootstrap;a.builder=Joose.MetaClassBootstrap;Joose.MetaClass=a.createClass("Joose.MetaClass");Joose.MetaClass.meta.addNonJooseSuperClass("Joose.MetaClassBootstrap",a);Joose.MetaClass.meta.addMethod("initialize",function(){this._name="Joose.MetaClass"});a=new Joose.MetaClass;a.builder=Joose.MetaClass;Joose.Class=a.createClass("Joose.Class");Joose.Class.meta.addSuperClass(Joose.MetaClass);Joose.MetaClass.meta.addMethod("initialize",function(){this._name=
"Joose.Class"})};Joose.bootstrap2=function(){Joose.Builder.Globals.joosify("Joose.Method",Joose.Method);Joose.Builder.Globals.joosify("Joose.Attribute",Joose.Attribute)};Joose.bootstrap3=function(){};
Joose.MetaClassBootstrap=function(){this._name="Joose.MetaClassBootstrap";this.methodNames=[];this.attributeNames=["_name","isAbstract","isDetached","methodNames","attributeNames","methods","parentClasses","roles","c"];this.attributes={};this.methods={};this.classMethods={};this.parentClasses=[];this.roles=[];this.myRoles=[];this.isDetached=this.isAbstract=false};
Joose.MetaClassBootstrap.prototype={toString:function(){if(this.meta)return"a "+this.meta.className();return"NoMeta"},className:function(){return this._name},getName:function(){return this.className()},newMetaClass:function(){var a=this.builder,c=new a;c.builder=a;c._name=this._name;c.methodNames=[];c.attributeNames=[];c.methods={};c.classMethods={};c.parentClasses=[];c.roles=[];c.myRoles=[];c.attributes={};(a=this.meta)||(a=this);c.meta=a;return c},createClass:function(a,c,d){var b=this.newMetaClass();
if(c)c=c;else{c=this.defaultClassFunctionBody();d&&d.addElement(c)}c.prototype.meta=b;c.meta=b;if(a==null)b._name="__anonymous__";else{var f=a;if(d)f=d.getName()+"."+a;b._name=f}b.c=c;d||joose.globalObjects.push(c);b.addInitializer();b.addToString();b.addDetacher();return c},buildComplete:function(){},initializeFromProps:function(a){this._initializeFromProps(a)},_initializeFromProps:function(a){var c=this;if(a){joose.top.CHAOTIC_TRAVERSION_ORDER&&Joose.A.each(["isa","does","has","method","methods"],
function(b){if(b in a){c._initializeFromProp(b,a[b],a);delete a[b]}});Joose.O.eachSafe(a,function(b,f){c._initializeFromProp(f,b,a)});for(var d=0;d<this.roles.length;d++)this.roles[d].meta.applyMethodModifiers(this.c);c.buildComplete();c.validateClass()}},_initializeFromProp:function(a,c,d){var b="handleProp"+a;if(this.meta.can(b))this[b](c,d);else throw Error("Called invalid builder "+a+" while creating class "+this.className());},instantiate:function(){var a=function(){};a.prototype=this.c.prototype;
a.prototype.constructor=this.c;a=new a;this.c.apply(a,arguments);return a},defaultClassFunctionBody:function(){var a=function(){this.initialize.apply(this,arguments)};joose.addToString(a,function(){return this.meta.className()});return a},addToString:function(){this.addMethod("toString",function(){if(this.stringify)return this.stringify();return"a "+this.meta.className()})},addInitializer:function(){this.c.prototype.initialize||this.addMethod("initialize",this.initializer())},initializer:function(){return function(a){if(this.meta.isAbstract)throw""+
this.meta.className()+" is an abstract class and may not instantiated.";var c=this.meta.getAttributes(),d;for(d in c)c.hasOwnProperty(d)&&c[d].doInitialization(this,a)}},dieIfString:function(a){if(Joose.S.isString(a))throw new TypeError("Parameter must not be a string.");},addRole:function(a){this.dieIfString(a);var c=this.getClassObject();if(a.meta.apply(c)){this.roles.push(a);this.myRoles.push(a)}},getClassObject:function(){return this.c},classNameToClassObject:function(a){var c=joose.top,d=a.split(".");
c=c;for(var b=0;b<d.length;b++){c=c[d[b]];if(!c)throw"Unable to find class "+a;}return c},addNonJooseSuperClass:function(a,c){var d=new Joose.MetaClassBootstrap;d.builder=Joose.MetaClassBootstrap;var b=d.createClass(a);Joose.O.each(c,function(f,g){typeof f=="function"?b.meta.addMethod(g,f):b.meta.addAttribute(g,{init:f})});this.addSuperClass(b)},addSuperClass:function(a){this.dieIfString(a);for(var c=this,d=a.meta.getMethodNames(),b=0;b<d.length;b++){var f=d[b],g=a.meta.getMethodObject(f);if(g){g=
g.copy();g.setIsFromSuperClass(true);c.addMethodObject(g)}if(g=a.meta.getClassMethodObject(f)){g=g.copy();g.setIsFromSuperClass(true);c.addMethodObject(g)}}Joose.O.eachSafe(a.meta.attributes,function(h,n){c.addAttribute(n,h.getProps())});d=a.meta.roles;for(b=0;b<d.length;b++)c.roles.push(d[b]);this.parentClasses.unshift(a)},_fixMetaclassIncompatability:function(a){a=a.meta;var c=a.meta.className();if(!(c=="Joose.Class"||c=="Joose.MetaClass"||c=="Joose.MetaClassBootstrap"))if(!this.meta.meta.isa(a)){a=
a.meta.instantiate(this);for(var d in a)this[d]=a[d]}},isa:function(a){this.dieIfString(a);var c=a.meta.className();if(this.className()==c)return true;for(var d=0;d<this.parentClasses.length;d++){var b=this.parentClasses[d].meta;if(b.className()==c)return true;if(b.isa(a))return true}return false},wrapMethod:function(a,c,d,b){var f=this.getMethodObject(a);if(f)this.addMethodObject(f[c](d));else if(b)b();else throw Error("Unable to apply "+c+" method modifier because method "+a+" does not exist");
},dispatch:function(a){return this.getMethodObject(a).asFunction()},hasMethod:function(a){return this.methods[a]!=null||this.classMethods[a]!=null},addMethod:function(a,c,d){this.addMethodObject(new Joose.Method(a,c,d))},addClassMethod:function(a,c,d){this.addMethodObject(new Joose.ClassMethod(a,c,d))},addMethodObject:function(a){var c=a.getName();!this.methods[c]&&!this.classMethods[c]&&this.methodNames.push(c);if(a.isClassMethod())this.classMethods[c]=a;else this.methods[c]=a;a.addToClass(this.c)},
attributeMetaclass:function(){return Joose.Attribute},addAttribute:function(a,c){var d=this.attributeMetaclass();if(c&&c.metaclass)d=c.metaclass;(new d(a,c)).apply(this.c)},getAttributes:function(){return this.attributes},getAttribute:function(a){return this.attributes[a]},setAttribute:function(a,c){return this.attributes[a]=c},getMethodObject:function(a){return this.methods[a]},getClassMethodObject:function(a){return this.classMethods[a]},getAttributeNames:function(){return this.attributeNames},
getInstanceMethods:function(){var a=[];Joose.O.eachSafe(this.methods,function(c){a.push(c)});return a},getClassMethods:function(){var a=[];Joose.O.eachSafe(this.classMethods,function(c){a.push(c)});return a},getSuperClasses:function(){return this.parentClasses},getSuperClass:function(){return this.parentClasses[0]},getRoles:function(){return this.roles},getMethodNames:function(){return this.methodNames},makeAnonSubclass:function(){var a=this.createClass(this.className()+"__anon__"+joose.anonymouseClassCounter++);
a.meta.addSuperClass(this.getClassObject());return a},addDetacher:function(){this.addMethod("detach",function(){var a=this.meta;if(!a.isDetached){a=a.makeAnonSubclass();a.meta.isDetached=true;this.meta=a.meta;this.constructor=a;var c;if(this.__proto__){c={};Joose.copyObject(this,c)}else c=this;a.prototype=c;this.__proto__=a.prototype}})},validateClass:function(){var a=this.getClassObject();Joose.A.each(this.roles,function(c){c.meta.isImplementedBy(a,true)})},can:function(a){if(!this.methods[a])return false;
return true},classCan:function(a){if(!this.classMethods[a])return false;return true},does:function(a){for(var c=0;c<this.roles.length;c++)if(a===this.roles[c])return true;for(c=0;c<this.roles.length;c++)if(this.roles[c].meta.does(a))return true;return false},implementsMyMethods:function(a){var c=true;Joose.A.each(this.getMethodNames(),function(d){a.meta.can(d)||(c=false)});return c},handleProprequires:function(a){var c=this;if(!this.meta.isa(Joose.Role))throw"Keyword 'requires' only available classes with a meta class of type Joose.Role";
a instanceof Array?Joose.A.each(a,function(d){c.addRequirement(d)}):c.addRequirement(a)},handlePropisAbstract:function(a){this.isAbstract=a},handlePropisa:function(a){this.addSuperClass(a)},handlePropdoes:function(a){var c=this;a instanceof Array?Joose.A.each(a,function(d){c.addRole(d)}):c.addRole(a)},handleProphas:function(a,c){var d=this;typeof a=="string"?d.addAttribute(a,c):Joose.O.eachSafe(a,function(b,f){d.addAttribute(f,b)})},handlePropmethod:function(a,c,d){this.addMethod(a,c,d)},handlePropmethods:function(a){var c=
this;Joose.O.eachSafe(a,function(d,b){c.addMethod(b,d)})},handlePropclassMethods:function(a){var c=this;Joose.O.eachSafe(a,function(d,b){c.addMethodObject(new Joose.ClassMethod(b,d))})},handlePropworkers:function(a){var c=this;Joose.O.eachSafe(a,function(d,b){c.addWorker(b,d)})},handlePropbefore:function(a){var c=this;Joose.O.eachSafe(a,function(d,b){c.wrapMethod(b,"before",d)})},handlePropafter:function(a){var c=this;Joose.O.eachSafe(a,function(d,b){c.wrapMethod(b,"after",d)})},handleProparound:function(a){var c=
this;Joose.O.eachSafe(a,function(d,b){c.wrapMethod(b,"around",d)})},handlePropoverride:function(a){var c=this;Joose.O.eachSafe(a,function(d,b){c.wrapMethod(b,"override",d)})},handlePropaugment:function(a){var c=this;Joose.O.eachSafe(a,function(d,b){c.wrapMethod(b,"augment",d,function(){c.addMethod(b,d)})})},handlePropdecorates:function(a){var c=this;Joose.O.eachSafe(a,function(d,b){c.decorate(d,b)})}};Joose.Attribute=function(a,c){this.initialize(a,c)};
Joose.Attribute.prototype={_name:null,_props:null,getName:function(){return this._name},getProps:function(){return this._props},initialize:function(a,c){this._name=a;this.setProps(c)},setProps:function(a){this._props=a?a:{}},getIsa:function(){var a=this.getProps();if(a.isa){if(!a.isa.meta)return a.isa();return a.isa}},addSetter:function(a){a=a.meta;var c=this.getName(),d=this.getProps(),b=this.getIsa(),f;if(b){if(!b.meta)throw Error("Isa declarations in attribute declarations must be Joose classes, roles or type constraints");
var g=false,h=false;if(Joose.Role&&b.meta.meta.isa(Joose.Role))g=true;else if(Joose.TypeConstraint&&b.meta.isa(Joose.TypeConstraint))h=true;f=function(n,p){var t=n;try{if(!(d.nullable===true&&t==undefined))if(h){var w=null;if(d.coerce)w=b.coerce(t);if(w==null&&d.nullable!==true)b.validate(t);else t=w}else{if(!t||!t.meta)throw new ReferenceError("The attribute "+c+" only accepts values that have a meta object.");if(!(g?t.meta.does(b):t.meta.isa(b)))throw new ReferenceError("The attribute "+c+" only accepts values that are objects of type "+
b.meta.className()+".");}}catch(x){if(p)p.call(this,x,b);else throw x;}this[c]=t;return this}}else f=function(n){this[c]=n;return this};a.addMethod(this.setterName(),f)},addGetter:function(a){a=a.meta;var c=this.getName(),d=this.getProps(),b=function(){return this[c]},f=d.init;if(d.lazy)b=function(){var g=this[c];if(typeof g=="function"&&g===f)this[c]=g.apply(this);return this[c]};a.addMethod(this.getterName(),b)},initializerName:function(){return this.toPublicName()},getterName:function(){if(this.__getterNameCache)return this.__getterNameCache;
return this.__getterNameCache="get"+Joose.S.uppercaseFirst(this.toPublicName())},setterName:function(){if(this.__setterNameCache)return this.__setterNameCache;return this.__setterNameCache="set"+Joose.S.uppercaseFirst(this.toPublicName())},isPrivate:function(){return this.getName().charAt(0)=="_"},toPublicName:function(){if(this.__publicNameCache)return this.__publicNameCache;var a=this.getName();if(this.isPrivate())return this.__publicNameCache=a.substr(1);return this.__publicNameCache=a},handleIs:function(a){this.getName();
var c=this.getProps().is;if(c=="rw"||c=="ro")this.addGetter(a);c=="rw"&&this.addSetter(a)},handleInit:function(a){var c=this.getProps(),d=this.getName();a.prototype[d]=null;if(typeof c.init!="undefined")a.prototype[d]=c.init},handleProps:function(a){this.handleIs(a);this.handleInit(a)},apply:function(a){var c=a.meta,d=this.getName();this.handleProps(a);c.attributeNames.push(d);c.setAttribute(d,this);c.attributes[d]=this}};Joose.Method=function(a,c,d){this.initialize(a,c,d)};
Joose.Method.prototype={_name:null,_body:null,_props:null,_isFromSuperClass:false,getName:function(){return this._name},getBody:function(){return this._body},getProps:function(){return this._props},isFromSuperClass:function(){return this._isFromSuperClass},setIsFromSuperClass:function(a){this._isFromSuperClass=a},copy:function(){return new Joose.Method(this.getName(),this.getBody(),this.getProps())},initialize:function(a,c,d){this._name=a;this._body=c;this._props=d;c.name=a;c.meta=this},isClassMethod:function(){return false},
apply:function(a,c){return this._body.apply(a,c)},addToClass:function(a){a.prototype[this.getName()]=this.asFunction()},asFunction:function(){return this._body}};Joose.bootstrap();Joose.Builder=function(){this.globalize=function(){Joose.O.each(Joose.Builder.Globals,function(a,c){var d="Joose"+c;if(typeof joose.top[c]=="undefined")joose.top[c]=a;joose.top[d]=a})}};
Joose.Builder.Globals={Module:function(a,c){return Joose.Module.setup(a,c)},Role:function(a,c){if(!c.meta)c.meta=Joose.Role;return JooseClass(a,c)},Prototype:function(a,c){if(!c.meta)c.meta=Joose.Prototype;return JooseClass(a,c)},Class:function(a,c){var d=null;if(a){var b=a;if(joose.currentModule)b=joose.currentModule.getName()+"."+a;var f=joose.top;b=b.split(".");for(var g=0;g<b.length;g++)f=f[b[g]];d=f}if(d==null){if(c&&c.meta){f=c.meta;delete c.meta}else f=c&&c.isa&&c.isa!=Joose.Class?c.isa.meta.builder:
Joose.Class;d=new f;d.builder=f;d=d.createClass(a,null,joose.currentModule);d.meta.builder=f;b=d.meta.className();if(a&&b){f=joose.top;b=(new String(b)).split(".");for(g=0;g<b.length-1;g++){if(f[b[g]]==null)f[b[g]]={};f=f[b[g]]}f[b[b.length-1]]=d}}d.meta.initializeFromProps(c);return d},Type:function(a,c){var d=Joose.TypeConstraint.newFromTypeBuilder(a,c),b=joose.currentModule;if(!b){JooseModule("TYPE");b=TYPE.meta}b.addElement(d);return b.getContainer()[a]=d},joosify:function(a,c){var d=c,b=new Joose.Class;
b.builder=Joose.Class;d.toString=function(){return this.meta.className()};d=b.createClass(a,d);b=d.meta;for(var f in c.prototype)if(f!="meta"){var g=c.prototype[f];if(typeof g=="function")b.addMethod(f,g);else{var h={};if(typeof g!="undefined")h.init=g;b.addAttribute(f,h)}}return d},rw:"rw",ro:"ro"};joose.init();Joose.bootstrap2();
(function(a){a("Joose.Method",{methods:{copy:function(){return this.meta.instantiate(this.getName(),this.getBody(),this.getProps())},_makeWrapped:function(c){return this.meta.instantiate(this.getName(),c)},around:function(c){var d=this.getBody();return this._makeWrapped(function(){var b=this;return c.apply(this,Joose.A.concat([function(){return d.apply(b,arguments)}],arguments))})},before:function(c){var d=this.getBody();return this._makeWrapped(function(){c.apply(this,arguments);return d.apply(this,
arguments)})},after:function(c){var d=this.getBody();return this._makeWrapped(function(){var b=d.apply(this,arguments);c.apply(this,arguments);return b})},override:function(c){var d=this.getBody();return this._makeWrapped(function(){var b=this,f=this.SUPER;this.SUPER=function(){return d.apply(b,arguments)};var g=c.apply(this,arguments);this.SUPER=f;return g})},augment:function(c){var d=this.getBody();d.source=d.toString();return this._makeWrapped(function(){var b=this;c.source=c.toString();if(!this.__INNER_STACK__)this.__INNER_STACK__=
[];this.__INNER_STACK__.push(c);var f=this.INNER;this.INNER=function(){return b.__INNER_STACK__.pop().apply(b,arguments)};var g=d.apply(this,arguments);this.INNER=f;return g})}}})})(JooseClass);(function(a){a("Joose.ClassMethod",{isa:Joose.Method,methods:{isClassMethod:function(){return true},addToClass:function(c){c[this.getName()]=this.asFunction()},copy:function(){return new Joose.ClassMethod(this.getName(),this.getBody(),this.getProps())}}})})(JooseClass);
(function(a){a("Joose.Attribute",{after:{handleProps:function(c){this.handleHandles(c);this.handlePredicate(c)}},methods:{isPersistent:function(){if(this.getProps().persistent==false)return false;return true},doInitialization:function(c,d){var b=this.initializerName(),f=this.getName(),g,h=false;if(typeof d!="undefined"&&typeof d[b]!="undefined"){g=d[b];h=true}else{var n=this.getProps(),p=n.init;if(typeof p=="function"&&!n.lazy){g=p.call(c);h=true}else if(n.required)throw"Required initialization parameter missing: "+
b+"(While initializing "+c+")";}if(h){b=this.setterName();if(c.meta.can(b))c[b](g);else c[f]=g}},handleHandles:function(c){c=c.meta;var d=this.getName(),b=this.getProps(),f=b.handles,g=b.isa;if(f)if(f=="*"){if(!g)throw"I need an isa property in order to handle a class";c.decorate(g,d,b.handleWith)}else throw"Unsupported value for handles: "+f;},handlePredicate:function(c){c=c.meta;this.getName();var d=this.getProps().predicate,b=this.getterName();d&&c.addMethod(d,function(){return this[b]()?true:
false})}}})})(JooseClass);
(function(a){a("Joose.Role",{isa:Joose.Class,has:["requiresMethodNames","methodModifiers","metaRoles"],methods:{wrapMethod:function(){this.methodModifiers.push(arguments)},requiresMethod:function(c){var d=false;Joose.A.each(this.requiresMethodNames,function(b){if(c==b)d=true});return d},addInitializer:Joose.emptyFunction,defaultClassFunctionBody:function(){var c=function(){throw Error("Roles may not be instantiated.");};joose.addToString(c,function(){return this.meta.className()});return c},addSuperClass:function(){throw Error("Roles may not inherit from a super class.");
},initialize:function(){this._name="Joose.Role";this.requiresMethodNames=[];this.methodModifiers=[]},addRequirement:function(c){this.requiresMethodNames.push(c)},unapply:function(c){if(!joose.isInstance(c))throw Error("You way only remove roles from instances.");if(!c.meta.isDetached)throw Error("You may only remove roles that were applied at runtime");for(var d=this.getClassObject(),b=c.meta.myRoles,f=false,g=[],h=0;h<b.length;h++)if(b[h]===d)f=true;else g.push(b[h]);if(!f)throw Error("The role "+
this.className()+" was not applied to the object at runtime");b=c.meta.getSuperClass().meta.makeAnonSubclass();f=new b;for(h=0;h<g.length;h++){d=g[h];b.meta.addRole(d)}b.prototype=f;c.meta=b.meta;c.constructor=b;c.__proto__=f},addMethodToClass:function(c,d){var b=c.getName();b=c.isClassMethod()?d.meta.getClassMethodObject(b):d.meta.getMethodObject(b);if(!b||b.isFromSuperClass())d.meta.addMethodObject(c)},apply:function(c){if(c.meta.does(this.getClassObject()))return false;if(joose.isInstance(c)){c.detach();
c.meta.addRole(this.getClassObject());this.applyMethodModifiers(c);this.isImplementedBy(c,true)}else{var d=this,b=this.getMethodNames();Joose.A.each(b,function(f){var g=d.getMethodObject(f);g&&d.addMethodToClass(g,c);(g=d.getClassMethodObject(f))&&d.addMethodToClass(g,c)});this.metaRoles&&Joose.A.each(this.metaRoles,function(f){f.meta.apply(c.meta)})}return true},applyMethodModifiers:function(c){Joose.A.each(this.methodModifiers,function(d){c.meta.wrapMethod.apply(c.meta,d)})},hasRequiredMethods:function(c,
d){var b=this,f=true;Joose.A.each(this.requiresMethodNames,function(g){if(!c.meta.can(g)){if(d)throw"Class "+c.meta.className()+" does not fully implement the role "+b.className()+". The method is "+g+" missing.";f=false}});return f},isImplementedBy:function(c,d){var b=this.hasRequiredMethods(c,d);if(b)b=this.implementsMyMethods(c);return b},handlePropmetaRoles:function(c){this.metaRoles=c}}});Joose.Role.anonymousClassCounter=0})(JooseClass);
(function(a){a("Joose.SimpleRequest",{has:{_req:{}},methods:{initialize:function(){this._req=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},getText:function(c){this._req.open("GET",c,false);try{this._req.send(null);if(this._req.status==200||this._req.status==0)return this._req.responseText}catch(d){throw"File not found: "+c;}throw"File not found: "+c;}}})})(JooseClass);
(function(a){a("Joose.Gears",{isa:Joose.Class,has:{wp:{},calls:{init:{}},callIndex:{init:0}},methods:{initialize:function(){JooseGearsInitializeGears();if(this.canGears()){this.wp=google.gears.factory.create("beta.workerpool");var c=this;this.wp.onmessage=function(d,b,f){c.handleGearsMessage(f)}}},handleGearsMessage:function(c){var d=c.body;c=d.to;var b=d.ret;d=this.calls[d.index];d.meta.can(c)&&d[c].call(d,b)},canGears:function(){return window.google&&window.google.gears&&window.google.gears.factory},
addWorker:function(c,d,b){var f="on"+Joose.S.uppercaseFirst(c),g=this.meta.getClassObject().ajaxRequest;if(this.canGears()){var h=this.can("jsonURL")?this.c.jsonURL():"json2.js";h=(new Joose.SimpleRequest).getText(h);var n="var timer = google.gears.factory.create('beta.timer');\nfunction aClass () {}; aClass.prototype."+c+" = "+d.toString()+"\n\naClass.prototype.clientHasGears = function () { return true }\naClass.prototype.ajaxRequest = "+g.toString()+"\n\nvar wp = google.gears.workerPool;\nwp.onmessage = function (a,b,message) {\nvar paras = message.body;\nvar o = new aClass();\no.sendReturn = function (ret, cbName) { wp.sendMessage({ ret: ret, to: cbName, index: paras.index }, message.sender) } \nvar ret = o."+
c+".apply(o, paras.args); if(!ret) ret = null; \no.sendReturn(ret, paras.cbName);\n}\n\n";n+=h;var p=this.wp,t=p.createWorker(n),w=this;h=function(){for(var x=[],E=0;E<arguments.length;E++)x.push(arguments[E]);p.sendMessage({args:x,cbName:f,index:w.callIndex},t);w.calls[w.callIndex]=this;w.callIndex++}}else h=function(){var x=this,E={sendReturn:function(Q,O){x.meta.can(O)&&x[O].call(x,Q)},clientHasGears:function(){return false},ajaxRequest:g},L=d.apply(E,arguments);E.sendReturn(L,f)};this.addMethod(c,
h,b)}},classMethods:{setupGearsCompat:function(){window.timer={setTimeout:function(c,d){return window.setTimeout(c,d)},setInterval:function(c,d){return window.setInterval(c,d)},clearTimeout:function(c){return window.clearTimeout(c)},clearInterval:function(c){return window.clearInterval(c)}}},clientHasGears:function(){return window.google&&window.google.gears&&window.google.gears.factory},ajaxRequest:function(c,d,b,f,g){var h;h=this.clientHasGears()?google.gears.factory.create("beta.httprequest"):
window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest;var n="";if(b)for(var p in b)n+=encodeURIComponent(p)+"="+encodeURIComponent(b[p])+"&";var t=d;if(b&&c=="GET")t+="?"+n;h.open(c,t,true);h.onreadystatechange=function(){if(h.readyState==4)if(h.status>=200&&h.status<400)f(h.responseText);else if(g)return g(h);else throw Error("Error fetching url "+t+". Response code: "+h.status+" Response text: "+h.responseText);};if(b&&c=="POST")h.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
else n="";h.send(n)}}})})(JooseClass);
function JooseGearsInitializeGears(){if(!(window.google&&google.gears)){var a=null;if(typeof GearsFactory!="undefined")a=new GearsFactory;else try{a=new ActiveXObject("Gears.Factory");a.getBuildInfo().indexOf("ie_mobile")!=-1&&a.privateSetGlobalObject(this)}catch(c){if(navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}if(a){window.google||(google=
{});if(!google.gears)google.gears={factory:a}}}}
(function(a,c){c("Joose.Storage",{methods:{toJSON:function(){var d=this.pack(Joose.Storage.TEMP_SEEN);d.toJSON=function(){return this};return d},identity:function(){return this.__ID__?this.__ID__:this.__ID__=Joose.Storage.OBJECT_COUNTER++},pack:function(d){return this.meta.c.storageEngine().pack(this,d)}},classMethods:{storageEngine:function(){return Joose.Storage.Engine},unpack:function(d){return this.storageEngine().unpack(this,d)}}});c("Joose.Storage.jsonpickle",{does:Joose.Storage,classMethods:{storageEngine:function(){return Joose.Storage.Engine.jsonpickle}}});
Joose.Storage.OBJECT_COUNTER=1;a("Joose.Storage.Engine",{classMethods:{pack:function(d,b){if(b){var f=d.identity();if(b[f])return{__ID__:f}}d.meta.can("prepareStorage")&&d.prepareStorage();if(b)b[d.identity()]=true;var g={__CLASS__:this.packedClassName(d),__ID__:d.identity()};f=d.meta.getAttributes();Joose.O.eachSafe(f,function(h,n){if(h.isPersistent())g[n]=d[n]});return g},unpack:function(d,b){var f=d.meta.instantiate(),g=false;Joose.O.eachSafe(b,function(h,n){if(n=="__CLASS__"){var p=Joose.Storage.Unpacker.packedClassNameToJSClassName(h);
if(p!=f.meta.className())throw Error("Storage data is of wrong type "+p+". I am "+f.meta.className()+".");g=true}else f[n]=h});if(!g)throw Error("Serialized data needs to include a __CLASS__ attribute.: "+b);delete f.__ID__;f.meta.can("finishUnpack")&&f.finishUnpack();return f},packedClassName:function(d){if(d.meta.can("packedClassName"))return d.packedClassName();return d.meta.className().split(".").join("::")}}});a("Joose.Storage.Engine.jsonpickle",{classMethods:{pack:function(d,b){if(b){var f=
d.identity();if(b[f])return{objectid__:f}}d.meta.can("prepareStorage")&&d.prepareStorage();if(b)b[d.identity()]=true;var g={classname__:this.packedClassName(d),classmodule__:this.packedModuleName(d),objectid__:d.identity()};f=d.meta.getAttributes();Joose.O.eachSafe(f,function(h,n){if(h.isPersistent())g[n]=d[n]});return g},unpack:function(d,b){var f=d.meta.instantiate(),g=false;Joose.O.eachSafe(b,function(h,n){if(n=="classname__"){var p=h,t=b.classmodule__;if(t)p=""+t+"."+h;if(p!=f.meta.className())throw Error("Storage data is of wrong type "+
p+". I am "+f.meta.className()+".");g=true}else if(n!="classmodule__")f[n]=h});if(!g)throw Error("Serialized data needs to include a __CLASS__ attribute.: "+b);f.meta.can("finishUnpack")&&f.finishUnpack();return f},packedClassName:function(d){return d.meta.className().split(".").pop()},packedModuleName:function(d){d=d.meta.className().split(".");d.pop();return d.join(".")}}});Joose.Storage.storageEngine=Joose.Storage.Engine;Joose.Storage.jsonpickle.storageEngine=Joose.Storage.Engine.jsonpickle})(JooseClass,
JooseRole);
(function(a){a("Joose.Storage.Unpacker",{classMethods:{unpack:function(c){var d=c.__CLASS__;if(!d)throw"Serialized data needs to include a __CLASS__ attribute.";d=this.meta.classNameToClassObject(this.packedClassNameToJSClassName(d)).unpack(c);var b;if(Joose.Storage.CACHE&&(b=c.__ID__))Joose.Storage.CACHE[b]=d;return d},packedClassNameToJSClassName:function(c){c=c.split("-");c=c[0].split("::");return c.join(".")},jsonParseFilter:function(c,d){if(d!=null&&typeof d=="object"){if(d.__CLASS__)return Joose.Storage.Unpacker.unpack(d);if(d.__ID__)return Joose.Storage.CACHE[d.__ID__]}return d},
patchJSON:function(){var c=JSON.parse,d=this.jsonParseFilter;JSON.parse=function(f,g){Joose.Storage.CACHE={};return c(f,function(h,n){var p=n;if(g)p=g(h,n);return d(h,p)})};var b=JSON.stringify;JSON.stringify=function(){Joose.Storage.TEMP_SEEN={};return b.apply(JSON,arguments)}}}});a("Joose.Storage.Unpacker.jsonpickle",{isa:Joose.Storage.Unpacker,classMethods:{unpack:function(c){var d=c.classname__;if(!d)throw"Serialized data needs to include a classname__ attribute.";d=this.meta.classNameToClassObject(this.packedClassNameToJSClassName(d,
c.classmodule__)).unpack(c);var b;if(Joose.Storage.CACHE&&(b=c.objectid__))Joose.Storage.CACHE[b]=d;return d},packedClassNameToJSClassName:function(c,d){var b="";if(d)b+=d+".";b+=c;return b},jsonParseFilter:function(c,d){if(d!=null&&typeof d=="object"){if(d.classname__)return Joose.Storage.Unpacker.jsonpickle.unpack(d);if(d.objectid__)return Joose.Storage.CACHE[d.objectid__]}return d}}})})(JooseClass);
(function(a){a("Joose.Decorator",{meta:Joose.Role,methods:{decorate:function(c,d,b){var f=this;c=c.meta.getInstanceMethods();Joose.A.each(c,function(g){var h=g.getName();if(!f.can(h)){g=function(){var n=this[d];return n[h].apply(n,arguments)};if(b)g=b(h);f.addMethod(h,g)}})}}});Joose.Decorator.meta.apply(Joose.Class)})(JooseClass);
(function(a){a("Joose.Module",{has:{_name:{is:"rw"},_elements:{is:"rw"},_container:{is:"rw"}},classMethods:{setup:function(c,d){for(var b=c.split("."),f=joose.top,g=[],h,n=0;n<b.length;n++){var p=b[n];if(p=="meta")throw"Module names may not include a part called 'meta'.";h=f[p];g.push(p);c=g.join(".");if(typeof h=="undefined"){f[p]={};h=new Joose.Module(c);h.setContainer(f[p]);f[p].meta=h;Joose.Module._allModules.push(f[p])}else{h=h.meta;if(!(h&&h.meta&&h.meta.isa(Joose.Module)))throw"Trying to setup module "+
c+" failed. There is already something else: "+h;}f=f[p]}b=joose.currentModule;joose.currentModule=h;d&&d(f);joose.currentModule=b;return f},getAllModules:function(){return this._allModules}},methods:{alias:function(c){var d=this;if(arguments.length==0)return this;Joose.A.each(this.getElements(),function(b){var f=d.globalName(b.meta.className());if(c[f]!==b){if(typeof c[f]!="undefined")throw"There is already something else in the spot "+f;c[f]=b}})},globalName:function(c){var d=this.getName();if(c.indexOf(d)!=
0)throw"All things inside me should have a name that starts with "+d+". Name is "+c;c=c.substr(d.length+1);if(c.indexOf(".")!=-1)throw"The things inside me should have no more dots in there name. Name is "+c;return c},removeGlobalSymbols:function(){Joose.A.each(this.getElements(),function(c){c=this.globalName(c.getName());delete joose.top[c]})},initialize:function(c){this.setElements([]);this.setName(c)},isEmpty:function(){return this.getElements().length==0},addElement:function(c){if(!(c||c.meta))throw"You may only add things that are Joose objects";
this._elements.push(c)},getNames:function(){var c=[];Joose.A.each(this.getElements(),function(d){c.push(d.meta.getName())});return c}}})})(JooseClass);__global__={};__global__.meta=new Joose.Module;__global__.meta.setName("__global__");__global__.meta.setContainer(__global__);Joose.Module._allModules=[__global__];JooseModule("__global__.nomodule",function(){});__global__.nomodule.meta._elements=joose.globalObjects;
(function(a){a("Joose.Prototype",{isa:Joose.Class,override:{initializer:function(){var c=this.SUPER();return function(){c.apply(this,arguments);var d=this.meta;this.meta=new Joose.PrototypeLazyMetaObjectProxy;this.meta.metaObject=d;this.meta.object=this}}}});a("Joose.PrototypeLazyMetaObjectProxy",{has:{metaObject:{is:"rw",isa:Joose.Class,handles:"*",handleWith:function(c){return function(){var d=this.object;d.meta=this.metaObject;d.detach();d.meta[c].apply(d.meta,arguments)}}},object:{is:"rw"}}});
Joose.bootstrap3()})(JooseClass);
(function(a){a("Joose.TypeConstraint",{has:{_constraints:{is:"ro",init:function(){return[]}},_coercions:{is:"ro",init:function(){return[]}},_messages:{is:"ro",init:function(){return[]}},_callback:{is:"ro",init:function(){return function(c){throw new ReferenceError(c);}}},_name:{is:"ro"},_uses:{is:"ro"},props:{is:"rw"}},classMethods:{newFromTypeBuilder:function(c,d){var b=new Joose.TypeConstraint({name:c});if(d.uses&&typeof d.uses.meta!="undefined"&&d.uses.meta.isa(Joose.TypeConstraint))b._uses=d.uses;
d.where&&b.addConstraint(d.where,d.message);b.setProps(d);if(d.coerce)for(var f=0;f<d.coerce.length;f++){var g=d.coerce[f];b.addCoercion(new Joose.TypeCoercion({from:g.from,via:g.via}))}return b}},methods:{stringify:function(){return this._name},makeSubType:function(c){var d=new Joose.TypeConstraint({name:c});Joose.A.each(this._constraints,function(b){d.addConstraint(b)});return d},addCoercion:function(c){this._coercions.push(c)},addConstraint:function(c,d){this._constraints.push(c);this._messages.push(d)},
getConstraintList:function(){var c=this._constraints;if(this._uses)return this._uses.getConstraintList().concat(c);return c},getMessageList:function(){var c=this._messages;if(this._uses)return this._uses.getMessageList().concat(c);return c},validateBool:function(c){if(this._validate(c)==-1)return true;return false},validate:function(c){var d=this._validate(c);if(d==-1)return true;var b=this.getMessageList();this._callback(b[d]?b[d].call(this,c):"The passed value ["+c+"] is not a "+this)},_validate:function(c){var d=
this.getConstraintList(),b,f;b=0;for(f=d.length;b<f;b++){var g=d[b],h=false;h=g instanceof RegExp?g.test(c):g.call(this,c);if(!h)return b}return-1},coerce:function(c,d){if(this.validateBool(c))return c;for(var b=this._coercions,f=0,g=b.length;f<g;f++){var h=b[f].coerce(c,d);if(h!==null)return h}return null}}})})(JooseClass);
(function(a,c){c("CoercionFrom",{where:function(d){if(d.meta&&d.meta.isa(Joose.TypeConstraint))return true;return false}});a("Joose.TypeCoercion",{has:{_from:{isa:TYPE.CoercionFrom,is:"rw"},_via:{is:"rw"}},methods:{coerce:function(d,b){if(this._from.validateBool(d))return this._via(d,b);return null}}})})(JooseClass,JooseType);
(function(a){a("Any",{where:function(){return true}});a("Null",{uses:TYPE.Any,where:function(c){if(c===null)return true;return false}});a("NotNull",{uses:TYPE.Any,where:function(c){if(c===null)return false;return true}});a("Enum",{uses:TYPE.NotNull,message:function(c){return"The passed value ["+c+"] is not "+(this.getProps().strictMatch?"*strictly* ":"")+"one of ["+this.getProps().values.join(",")+"]"},where:function(c){var d=this;if(!d.getProps()||d.getProps().values===undefined||!(d.getProps().values instanceof
Array))throw"Enum Type needs Array of values in 'values' property of Type declaration";if(Joose.A.grep(d.getProps().values,function(b){if(d.getProps().strictMatch===true)return b===c;return b==c}).length!=0)return true;return false}});a("Obj",{uses:TYPE.NotNull,where:function(c){if(c instanceof Object)return true;return false}});a("Str",{uses:TYPE.NotNull,where:function(c){if(typeof c=="string"||c instanceof String)return true;return false},coerce:[{from:TYPE.Any,via:function(c){return c==null?"":
""+c}}]});a("Num",{uses:TYPE.NotNull,where:function(c){if(typeof c=="number"||c instanceof Number)return true;return false},coerce:[{from:TYPE.Str,via:function(c){if(!(c==null||c==""))return parseFloat(c)}}]});a("Bool",{uses:TYPE.NotNull,where:function(c){if(c===true||c===false)return true;return false},coerce:[{from:TYPE.Any,via:function(c){if(!(c==null||c==="")){if(c==1||c=="1"||c=="true")return true;if(c==0||c=="0"||c=="false")return false;return null}}}]});a("Int",{uses:TYPE.Num,where:function(c){if(String(c).match(/^\d*\.\d$/))return false;
return true},coerce:[{from:TYPE.Str,via:function(c){if(!(c==null||c==""))if(c.match(/^-{0,1}\d+$/))return parseInt(c)}}]});a("Float",{uses:TYPE.Num,where:function(){return true}});a("Func",{uses:TYPE.Obj,where:function(c){if(typeof c=="function")return true;return false}});a("Array",{uses:TYPE.Obj,where:function(c){if(c instanceof Array)return true;return false}});a("Date",{uses:TYPE.Obj,where:function(c){if(c instanceof Date)return true;return false},coerce:[{from:TYPE.Str,via:function(c){if(!(c==
undefined||c=="")){if(c=c.match(/\s*(\d+)-(\d+)-(\d+)/))return new Date(c[1],c[2]-1,[c[3]]);return null}}}]});a("Joose",{uses:TYPE.Obj,where:function(c){if(c.meta&&c.meta.meta.isa(Joose.Class))return true;return false}})})(JooseType);this.JSON||(JSON={});
(function(){function a(t){return t<10?"0"+t:t}function c(t){f.lastIndex=0;return f.test(t)?'"'+t.replace(f,function(w){var x=n[w];return typeof x==="string"?x:"\\u"+("0000"+w.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function d(t,w){var x,E,L,Q,O=g,I,ba=w[t];if(ba&&typeof ba==="object"&&typeof ba.toJSON==="function")ba=ba.toJSON(t);if(typeof p==="function")ba=p.call(w,t,ba);switch(typeof ba){case "string":return c(ba);case "number":return isFinite(ba)?String(ba):"null";case "boolean":case "null":return String(ba);
case "object":if(!ba)return"null";g+=h;I=[];if(Object.prototype.toString.apply(ba)==="[object Array]"){Q=ba.length;for(x=0;x<Q;x+=1)I[x]=d(x,ba)||"null";L=I.length===0?"[]":g?"[\n"+g+I.join(",\n"+g)+"\n"+O+"]":"["+I.join(",")+"]";g=O;return L}if(p&&typeof p==="object"){Q=p.length;for(x=0;x<Q;x+=1){E=p[x];if(typeof E==="string")if(L=d(E,ba))I.push(c(E)+(g?": ":":")+L)}}else for(E in ba)if(Object.hasOwnProperty.call(ba,E))if(L=d(E,ba))I.push(c(E)+(g?": ":":")+L);L=I.length===0?"{}":g?"{\n"+g+I.join(",\n"+
g)+"\n"+O+"}":"{"+I.join(",")+"}";g=O;return L}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var b=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
f=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,h,n={"":"\\b","\t":"\\t","\n":"\\n","":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},p;if(typeof JSON.stringify!=="function")JSON.stringify=function(t,w,x){var E;h=g="";if(typeof x==="number")for(E=0;E<x;E+=1)h+=" ";else if(typeof x==="string")h=x;if((p=w)&&typeof w!=="function"&&(typeof w!=="object"||typeof w.length!=="number"))throw Error("JSON.stringify");return d("",{"":t})};
if(typeof JSON.parse!=="function")JSON.parse=function(t,w){function x(L,Q){var O,I,ba=L[Q];if(ba&&typeof ba==="object")for(O in ba)if(Object.hasOwnProperty.call(ba,O)){I=x(ba,O);if(I!==undefined)ba[O]=I;else delete ba[O]}return w.call(L,Q,ba)}var E;b.lastIndex=0;if(b.test(t))t=t.replace(b,function(L){return"\\u"+("0000"+L.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(t.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){E=eval("("+t+")");return typeof w==="function"?x({"":E},""):E}throw new SyntaxError("JSON.parse");}})();
Module("JooseX.DOMBinding",function(a){Role("JQueryMetaRole",{requires:["getAttribute"],methods:{handlePropbind:function(c){var d=this,b=[];Joose.O.each(c,function(f,g){var h=d.getAttribute(g);if(!h)throw Error("Cant find attribute "+g+" for binding");b.push(g);var n={selector:null,accessor:"val",args:[],notifyOn:[]};Joose.O.extend(n,f);var p=n.selector,t=n.accessor,w=n.args,x=n.notifyOn;n=h.getterName();h=h.setterName();d.wrapMethod(n,"before",function(){var E=this.$;if(p)E=this.$.find(p);E=E[t].apply(E,
w);this[g]=E});d.wrapMethod(h,"after",function(){var E=this[g],L=this.$;if(p)L=this.$.find(p);for(var Q=[],O=0;O<w.length;O++)Q.push(w[O]);Q.push(E);L[t].apply(L,Q)});d.wrapMethod("draw","after",function(){for(var E=this,L=0;L<x.length;L++){var Q=x[L],O=this.$;if(p)O=O.find(p);O.bind(Q,function(I){E.notify(Q,this,I)})}})});d.addMethod("redraw",function(){for(var f=0;f<b.length;f++){var g=b[f];this[this.meta.getAttribute(g).setterName()](this[g])}})}}});Role("JQuery",{metaRoles:[a.JQueryMetaRole],
methods:{draw:function(){this.$=this.create();this.destination().append(this.$)},destination:function(){return jQuery(document.body)},notify:function(){}},after:{initialize:function(){this.draw()}}})});
Module("JooseX",function(){var a={},c=true;Role("Singleton",{before:{initialize:function(){if(c){var d=this.meta.className();throw Error("The class "+d+" is a singleton. Please use the class method getInstance().");}}},methods:{singletonInitialize:function(){}},classMethods:{getInstance:function(){var d=this.meta.className(),b=a[d];if(b)return b;c=false;b=this.meta.instantiate();c=true;b.singletonInitialize();return a[d]=b}}})});
Module("JooseX.Culture",function(a){var c=jQuery("meta[name='culture']").attr("content")||"de-DE";a.setCurrentCulture=function(b){c=b};a.makeFloatFormatter=function(b,f){return function(g,h){var n=(h?a.sprintf(h,g):""+g).split("."),p=n[0];n=n.length>1?b+n[1]:"";for(var t=/(\d+)(\d{3})/;t.test(p);)p=p.replace(t,"$1"+f+"$2");return p+n}};var d={};Class("Factory",{classMethods:{register:function(b){d[b.identifier()]=b},get:function(b){b=b||c;var f=d[b];if(!f)throw Error("Unknown culture "+b);return f}}});
Class("EnUs",{does:[JooseX.Singleton],methods:{identifier:function(){return"en-US"},dateFormat:function(){return"dd/MM/yyyy"},subIdentifier:function(){return this.identifier().split("-")[1]},majorIdentifier:function(){return this.identifier().split("-")[0]},parseNumber:function(b){b=b+"";b=b.replace(/,/g,"");return parseFloat(b,10)},formatNumber:a.makeFloatFormatter(".",","),parseDate:function(b){return Date.parseExact(b,this.dateFormat())},formatDate:function(b){return b.toString(this.dateFormat())}}});
a.Factory.register(a.EnUs.getInstance());Class("EnGb",{isa:JooseX.Culture.EnUs,methods:{identifier:function(){return"en-GB"},dateFormat:function(){return"dd/MM/yyyy"}}});a.Factory.register(a.EnGb.getInstance());Class("DeDe",{isa:JooseX.Culture.EnUs,methods:{identifier:function(){return"de-DE"},dateFormat:function(){return"dd.MM.yyyy"},parseNumber:function(b){b=""+b;b=b.replace(/\./g,"");b=b.replace(/\,/,".");return parseFloat(b,10)},formatNumber:a.makeFloatFormatter(",",".")}});a.Factory.register(a.DeDe.getInstance());
Class("ItIt",{isa:JooseX.Culture.DeDe,methods:{identifier:function(){return"it-IT"},dateFormat:function(){return"dd/MM/yyyy"}}});a.Factory.register(a.ItIt.getInstance());Class("EsEs",{isa:JooseX.Culture.DeDe,methods:{identifier:function(){return"es-ES"},dateFormat:function(){return"dd.MM.yyyy"}}});a.Factory.register(a.EsEs.getInstance());sprintfWrapper={init:function(){if(typeof arguments=="undefined")return null;if(arguments.length<1)return null;if(typeof arguments[0]!="string")return null;if(typeof RegExp==
"undefined")return null;var b=arguments[0],f=RegExp(/(%([%]|(\-)?(\+|\x20)?(0)?(\d+)?(\.(\d)?)?([bcdfosxX])))/g),g=[],h=[],n=0,p=0,t=0;p=0;for(var w="",x=null;x=f.exec(b);){if(x[9])n+=1;p=p;t=f.lastIndex-x[0].length;h[h.length]=b.substring(p,t);p=f.lastIndex;g[g.length]={match:x[0],left:x[3]?true:false,sign:x[4]||"",pad:x[5]||" ",min:x[6]||0,precision:x[8],code:x[9]||"%",negative:parseInt(arguments[n])<0?true:false,argument:String(arguments[n])}}h[h.length]=b.substring(p);if(g.length==0)return b;
if(arguments.length-1<n)return null;b=null;for(b=0;b<g.length;b++){if(g[b].code=="%")substitution="%";else if(g[b].code=="b"){g[b].argument=String(Math.abs(parseInt(g[b].argument)).toString(2));substitution=sprintfWrapper.convert(g[b],true)}else if(g[b].code=="c"){g[b].argument=String(String.fromCharCode(parseInt(Math.abs(parseInt(g[b].argument)))));substitution=sprintfWrapper.convert(g[b],true)}else if(g[b].code=="d"){g[b].argument=String(Math.abs(parseInt(g[b].argument)));substitution=sprintfWrapper.convert(g[b])}else if(g[b].code==
"f"){g[b].argument=String(Math.abs(parseFloat(g[b].argument)).toFixed(g[b].precision?g[b].precision:6));substitution=sprintfWrapper.convert(g[b])}else if(g[b].code=="o"){g[b].argument=String(Math.abs(parseInt(g[b].argument)).toString(8));substitution=sprintfWrapper.convert(g[b])}else if(g[b].code=="s"){g[b].argument=g[b].argument.substring(0,g[b].precision?g[b].precision:g[b].argument.length);substitution=sprintfWrapper.convert(g[b],true)}else if(g[b].code=="x"){g[b].argument=String(Math.abs(parseInt(g[b].argument)).toString(16));
substitution=sprintfWrapper.convert(g[b])}else if(g[b].code=="X"){g[b].argument=String(Math.abs(parseInt(g[b].argument)).toString(16));substitution=sprintfWrapper.convert(g[b]).toUpperCase()}else substitution=g[b].match;w+=h[b];w+=substitution}w+=h[b];return w},convert:function(b,f){b.sign=f?"":b.negative?"-":b.sign;var g=b.min-b.argument.length+1-b.sign.length;g=Array(g<0?0:g).join(b.pad);return b.left?b.pad=="0"||f?b.sign+b.argument+g.replace(/0/g," "):b.sign+b.argument+g:b.pad=="0"||f?b.sign+g+
b.argument:g+b.sign+b.argument}};a.sprintf=sprintfWrapper.init});
Module("JooseX",function(a){Class("Dumper",{does:[JooseX.Singleton],has:{logger:{is:"rw",init:function(){return window.console||{log:function(){}}}}},methods:{dump:function(c){var d=c.meta.getAttributes(),b=this.logger;b.log("Dumping "+c);Joose.O.each(d,function(f){var g=f.getName();f=f.getterName();var h;h=f&&c[f]?c[f]():c[h];b.log("  "+g+" = "+h)})}}});Role("DumpAfterInit",{after:{initialize:function(){a.Dumper.getInstance().dump(this)}}});Role("Dumpable",{methods:{dump:function(){a.Dumper.getInstance().dump(this)}}})});
(function(a){a.fn.extend({autocomplete:function(c,d){var b=typeof c=="string";d=a.extend({},a.Autocompleter.defaults,{url:b?c:null,data:b?null:c,delay:b?a.Autocompleter.defaults.delay:10,max:d&&!d.scroll?10:150},d);d.highlight=d.highlight||function(f){return f};d.formatMatch=d.formatMatch||d.formatItem;return this.each(function(){new a.Autocompleter(this,d)})},result:function(c){return this.bind("result",c)},search:function(c){return this.trigger("search",[c])},flushCache:function(){return this.trigger("flushCache")},
setOptions:function(c){return this.trigger("setOptions",[c])},unautocomplete:function(){return this.trigger("unautocomplete")}});a.Autocompleter=function(c,d){function b(){var fa=C.selected();if(!fa)return false;var N=fa.result;Q=N;if(d.multiple){var q=g(E.val());if(q.length>1)N=q.slice(0,q.length-1).join(d.multipleSeparator)+d.multipleSeparator+N;N+=d.multipleSeparator}E.val(ua(N));n();E.trigger("result",[fa.data,fa.value]);return true}function f(fa,N){if(ba==w.DEL)C.hide();else{s2.Logger.debug("Open");
var q=E.val();if(q.match(/\.\.\.$/))q=E.data("completeValue");if(!(!N&&q==Q)){s2.Logger.debug("Open2");Q=q;q=h(q);if(q.length>=d.minChars){E.addClass(d.loadingClass);d.matchCase||(q=q.toLowerCase());t(q,p,n);s2.Logger.debug("Open3")}else{E.removeClass(d.loadingClass);C.hide();s2.Logger.debug("Open4")}}}}function g(fa){if(!fa)return[""];fa=fa.split(d.multipleSeparator);var N=[];a.each(fa,function(q,ya){if(a.trim(ya))N[q]=a.trim(ya)});return N}function h(fa){if(!d.multiple)return fa;fa=g(fa);return fa[fa.length-
1]}function n(){s2.tuifly.controller.AirportInfoHideEvent.trigger();var fa=C.visible();C.hide();clearTimeout(L);E.removeClass(d.loadingClass);d.mustMatch&&E.search(function(N){if(!N)if(d.multiple){N=g(E.val()).slice(0,-1);E.val(ua(N.join(d.multipleSeparator)+(N.length?d.multipleSeparator:"")))}else E.val("")});fa&&a.Autocompleter.Selection(c,c.value.length,c.value.length)}function p(fa,N){if(N&&N.length&&I){E.removeClass(d.loadingClass);C.display(N,fa);var q=N[0].value;if(d.autoFill&&h(E.val()).toLowerCase()==
fa.toLowerCase()&&ba!=w.BACKSPACE){E.val(ua(E.val()+q.substring(h(Q).length)));a.Autocompleter.Selection(c,Q.length,Q.length+q.length)}C.show();C.scrollTo(E.val())}else n()}function t(fa,N,q){d.matchCase||(fa=fa.toLowerCase());var ya=O.load(fa);s2.Logger.debug("Open4.5");if(ya&&ya.length){s2.Logger.debug("Open5 "+ya.length);N(fa,ya)}else if(typeof d.url=="string"&&d.url.length>0){var la={timestamp:+new Date};a.each(d.extraParams,function(z,D){la[z]=typeof D=="function"?D():D});a.ajax({mode:"abort",
port:"autocomplete"+c.name,dataType:d.dataType,url:d.url,data:a.extend({q:h(fa),limit:d.max},la),success:function(z){var D;if(!(D=d.parse&&d.parse(z))){D=[];z=z.split("\n");for(var H=0;H<z.length;H++){var M=a.trim(z[H]);if(M){M=M.split("|");D[D.length]={data:M,value:M[0],result:d.formatResult&&d.formatResult(M,M[0])||M[0]}}}D=D}D=D;O.add(fa,D);N(fa,D)}})}else{C.emptyList();q(fa)}}var w={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},x,E=a(c).attr("autocomplete",
"off").addClass(d.inputClass),L,Q="",O=a.Autocompleter.Cache(d),I=0,ba,K={mouseDownOnSelect:false},C=a.Autocompleter.Select(d,c,b,K);C.init();var ka;a.browser.opera&&a(c.form).bind("submit.autocomplete",function(){if(ka)return ka=false});E.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(fa){ba=fa.keyCode;switch(fa.keyCode){case w.UP:fa.preventDefault();C.visible()?C.prev():f(0,true);break;case w.DOWN:fa.preventDefault();C.visible()?C.next():f(0,true);break;case w.PAGEUP:fa.preventDefault();
C.visible()?C.pageUp():f(0,true);break;case w.PAGEDOWN:fa.preventDefault();C.visible()?C.pageDown():f(0,true);break;case d.multiple&&a.trim(d.multipleSeparator)==","&&w.COMMA:case w.TAB:if(b()){fa.preventDefault();return ka=true}break;case w.RETURN:if(b()){fa.preventDefault();ka=true;return false}break;case w.ESC:C.hide();break;default:clearTimeout(L);L=setTimeout(f,d.delay)}}).focus(function(){s2.Logger.debug("focus");I++}).blur(function(){I=0;if(!K.mouseDownOnSelect){n();s2.Logger.debug("blur/hide")}}).click(function(){d.showAllOnFullMatch=
true;if(I++>0&&!C.visible()){f(0,true);x=(new Date).getTime()}d.showAllOnFullMatch=false}).bind("search",function(){function fa(q,ya){var la;if(ya&&ya.length)for(var z=0;z<ya.length;z++)if(ya[z].result.toLowerCase()==q.toLowerCase()){la=ya[z];break}typeof N=="function"?N(la):E.trigger("result",la&&[la.data,la.value])}var N=arguments.length>1?arguments[1]:null;a.each(g(E.val()),function(q,ya){t(ya,fa,fa)})}).bind("flushCache",function(){O.flush()}).bind("setOptions",function(fa,N){a.extend(d,N);"data"in
N&&O.populate()}).bind("unautocomplete",function(){C.unbind();E.unbind();a(c.form).unbind(".autocomplete")}).bind("s2:closeIfOpen",function(){I>0&&(new Date).getTime()-x>300&&n()});var ua=function(fa){jQuery("<span>"+fa+"</span>").text()}};a.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(c){return c[0]},
formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(c,d){return c.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+d.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};a.Autocompleter.Cache=function(c){function d(n,p){c.matchCase||(n=n.toLowerCase());var t=n.indexOf(p);if(t==-1)return false;return t==0||c.matchContains}function b(n,p){h>c.cacheLength&&f();g[n]||h++;g[n]=p}function f(){g=
{};h=0}var g={},h=0;return{flush:f,add:b,populate:function(){s2.Logger.debug("Pipulate cache");if(!c.data)return false;var n={},p=0;if(!c.url)c.cacheLength=1;n[""]=[];for(var t=0,w=c.data.length;t<w;t++){var x=c.data[t];x=typeof x=="string"?[x]:x;var E=c.formatMatch(x,t+1,c.data.length);if(E!==false){var L=E.charAt(0).toLowerCase();n[L]||(n[L]=[]);x={value:E,data:x,result:c.formatResult&&c.formatResult(x)||E};n[L].push(x);p++<c.max&&n[""].push(x)}}a.each(n,function(Q,O){c.cacheLength++;b(Q,O)});s2.Logger.debug("Pipulate cache2")},
load:function(n){if(!c.cacheLength||!h)return null;if(!c.url&&c.matchContains){var p=[],t=[],w;for(w in g)if(w.length>0){var x=g[w];a.each(x,function(E,L){d(L.value,n)&&p.push(L);t.push(L)})}if(c.handleResult)if(x=c.handleResult(c,p,t,n))return x;return p}else if(g[n])return g[n];else if(c.matchSubset)for(w=n.length-1;w>=c.minChars;w--)if(x=g[n.substr(0,w)]){p=[];a.each(x,function(E,L){if(d(L.value,n))p[p.length]=L});return p}return null}}};a.Autocompleter.Select=function(c,d,b,f){function g(){if(L){Q=
a("<div/>").hide().addClass(c.resultsClass).css("position","absolute").appendTo(document.body);O=a("<ul/>").appendTo(Q).mouseover(function(I){if(h(I).nodeName&&h(I).nodeName.toUpperCase()=="LI"){w=a("li",O).removeClass(p.ACTIVE).index(h(I));a(h(I)).addClass(p.ACTIVE)}}).click(function(I){window.triggerClickCompactSearchAllowed=true;a(h(I)).addClass(p.ACTIVE);b();try{d.focus()}catch(ba){}return false}).mousedown(function(){f.mouseDownOnSelect=true}).mouseup(function(){f.mouseDownOnSelect=false});c.width>
0&&Q.css("width",c.width);L=false}}function h(I){for(I=I.target;I&&I.tagName!="LI";)I=I.parentNode;if(!I)return[];return I}function n(I){t.slice(w,w+1).removeClass(p.ACTIVE);w+=I;if(w<0)w=t.size()-1;else if(w>=t.size())w=0;I=t.slice(w,w+1).addClass(p.ACTIVE);if(c.scroll){var ba=0;t.slice(0,w).each(function(){ba+=this.offsetHeight});if(ba+I[0].offsetHeight-O.scrollTop()>O[0].clientHeight)O.scrollTop(ba+I[0].offsetHeight-O.innerHeight());else ba<O.scrollTop()&&O.scrollTop(ba)}s2.tuifly.controller.AirportInfoShowEvent.trigger(I)}
var p={ACTIVE:"ac_over"},t,w=-1,x,E="",L=true,Q,O;return{display:function(I,ba){g();x=I;E=ba;O.empty();for(var K=c.max&&c.max<x.length?c.max:x.length,C=0;C<K;C++)if(x[C]){var ka=c.formatItem(x[C].data,C+1,K,x[C].value,E);if(ka!==false){var ua=C%2==0?"ac_even":"ac_odd",fa=a("<li class='ac_element "+ua+"'/>");ka=c.highlight(ka,E);if(fa=a(x[C].data[0]).html().match(/([^\(\)]+) \(([a-z]{3})\)/i)){var N=fa[1];if(N.length>21)N=N.substr(0,18)+"...";ka=ka.replace(/>.+<\/span/,"><div class='qAirportname' style='float:left;'>"+
N+"</div><div class='qAirportCode' style='float:right; text-align:left; width:25px;'>"+fa[2]+"</div></span")}fa=a("<li class='ac_element "+ua+"'/>");fa.get(0).innerHTML=ka;fa.appendTo(O);fa=fa[0];a.data(fa,"ac_data",x[C])}}t=O.find("li");if(c.selectFirst){t.slice(0,1).addClass(p.ACTIVE);w=0}a.fn.bgiframe&&O.bgiframe();s2.tuifly.controller.AutoCompleteShowEvent.trigger()},init:function(){g()},next:function(){n(1)},prev:function(){n(-1)},pageUp:function(){w!=0&&w-8<0?n(-w):n(-8)},pageDown:function(){w!=
t.size()-1&&w+8>t.size()?n(t.size()-1-w):n(8)},hide:function(){Q&&Q.hide();t&&t.removeClass(p.ACTIVE);w=-1;jQuery.browser.msie&&a("#flugsuche select").removeClass("hidden")},visible:function(){return Q&&Q.is(":visible")},current:function(){return this.visible()&&(t.filter("."+p.ACTIVE)[0]||c.selectFirst&&t[0])},show:function(){jQuery.browser.msie&&a("#flugsuche select").addClass("hidden");var I=a(d).offset();Q.css({width:typeof c.width=="string"||c.width>0?c.width:a(d).width(),top:I.top+d.offsetHeight,
left:I.left}).show();if(c.scroll){O.scrollTop(0);O.css({maxHeight:c.scrollHeight,overflow:"auto"});if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var ba=0;t.each(function(){ba+=this.offsetHeight});I=ba>c.scrollHeight;O.css("height","270px");I||t.width(O.width()-parseInt(t.css("padding-left"))-parseInt(t.css("padding-right")))}}},selected:function(){var I=t&&t.filter("."+p.ACTIVE).removeClass(p.ACTIVE);return I&&I.length&&a.data(I[0],"ac_data")},emptyList:function(){O&&O.empty()},
unbind:function(){Q&&Q.remove()},scrollTo:function(I){var ba=O.get(0);I=I.replace(/\([^(]*$/,"").replace(/\.\.\.$/,"");I=O.find("li:contains('"+I+"')");if(I.length>0){I.get(0);I=I.position().top;s2.Logger.debug("Scroll pos "+I+";"+ba.scrollTop);ba.scrollTop=I;s2.Logger.debug("Scroll pos "+I+";"+ba.scrollTop)}else s2.Logger.debug("not found")}}};a.Autocompleter.Selection=function(c,d,b){if(c.createTextRange){var f=c.createTextRange();f.collapse(true);f.moveStart("character",d);f.moveEnd("character",
b);try{f.select()}catch(g){}}else if(c.setSelectionRange)try{c.setSelectionRange(d,b)}catch(h){}else if(c.selectionStart){c.selectionStart=d;c.selectionEnd=b}try{c.focus()}catch(n){}}})(jQuery);(function(){var a;jQuery.fn.typingEnded=function(c,d){d=jQuery.extend({delay:600},d);var b=d.delay;this.keydown(function(){var f=this,g=arguments;a&&clearTimeout(a);a=setTimeout(function(){c.apply(f,g)},b)});return this}})();
(function(){var a={},c=function(d){var b=a;if(this instanceof jQuery){if(this.QUERY_CACHE==null)this.QUERY_CACHE={};b=this.QUERY_CACHE}if(d in b)return b[d];var f;f=this instanceof jQuery?this.find(d):jQuery(d);return b[d]=f};jQuery.cachedFind=c;jQuery.fn.cachedFind=c;jQuery(window).bind("unload",function(){for(var d in a)delete a[d]})})();
(function(a){a.extend_deep=function(){var c=arguments[0]||{},d=1,b=arguments.length,f=false,g;if(c.constructor==Boolean){f=c;c=arguments[1]||{};d=2}if(typeof c!="object"&&typeof c!="function")c={};if(b==1){c=this;d=0}for(;d<b;d++)if((g=arguments[d])!=null)for(var h in g)if(c!==g[h])if(f&&g[h]&&typeof g[h]=="object"&&c[h]&&!g[h].nodeType)c[h]=a.extend_deep(true,c[h],g[h]);else if(g[h]!=undefined)c[h]=g[h];return c};a.metaobjects=function(c){function d(f){eval("value = "+f+";");return f}function b(f,
g){for(var h=f.split("."),n={},p=n,t=0,w=h.length-1;t<=w;t++)if(h[t])p=p[h[t]]=t==w?g:{};return n}c=a.extend({context:document,clean:true,selector:"object.metaobject"},c);return a(c.selector,c.context).each(function(){var f={target:this.parentNode,cache:false};a("> param[name=metaparam]",this).each(function(){a.extend(f,d(this.value))});a("> param",this).not("[name=metaparam]").each(function(){var g=this.name,h=d(this.value);if(f.cache){var n=g.split("."),p=n.shift(),t=(n=n.join("."))?b(n,h):h;a(f.target).each(function(){var w=
a.data(this,p);w?a.extend_deep(true,w,t):a.data(this,p,t)})}else a(f.target).each(function(){a.extend_deep(true,this,b(g,h))})});c.clean&&a(this).remove()})}})(jQuery);jQuery.fn.extend({selectbox:function(a){return this.each(function(){new jQuery.SelectBox(this,a)})}});jQuery.expr[":"].startsWith=function(a,c,d){c=d[3];if(!c)return false;return RegExp("^\\s*"+c,"i").test($(a).text())};
jQuery.SelectBox=function(a,c){function d(){O=0;K.hide();q=false;if(I){I=false;ba.trigger("customSelect_changedAndClosed")}}function b(){x=h(C.attr("id"));x=$(x);K.append(x);t=$("li",K);w=t.eq(0)}function f(la){if(t)if(!(O>0)){K.not(":visible").length>0&&K.show();Q+=la;if(Q<0)Q=0;else if(Q>=t.size())Q=t.size()-1;t.filter("."+n.hoverClass).removeClass(n.hoverClass);t.filter("."+n.currentClass).removeClass(n.currentClass);x.scrollTop($(t[Q]).addClass(n.hoverClass).addClass(n.currentClass).position().top-
w.position().top);g()}}function g(){var la=$("li."+n.currentClass,K).get(0),z=(""+la.id).split("_");ba.val(z[z.length-1]);C.val($(la).text());I=true;ba.change();return true}function h(la){var z=document.createElement("ul");if(ba.closest(".queryCustomSelects").length>0){var D=ba.closest(".queryCustomSelects").attr("optionWidth"),H=ba.closest(".queryCustomSelects").attr("optionHeight");if(D&&H){$(z).css("height",H+"px");$(z).css("width",D+"px");$(z).css("overflow","auto")}}ba.children("option").each(function(){var M=
document.createElement("li");M.setAttribute("id",la+"_"+$(this).val());M.innerHTML=$(this).html();if($(this).is(":selected")){C.val($(this).text());$(M).addClass(n.currentClass)}z.appendChild(M);$(z).mouseout(function(){O=-1}).mouseover(function(){O=1});$(M).mouseover(function(Z){O=1;n.debug&&console.log("over on : "+this.id);t.filter("."+n.hoverClass).removeClass(n.hoverClass);Q=t.index($(Z.target,K).addClass(n.hoverClass))}).mouseout(function(){n.debug&&console.log("out on : "+this.id)}).click(function(){n.debug&&
console.log("click on :"+this.id);$("li."+n.currentClass,K).removeClass(n.currentClass);$(this).addClass(n.currentClass);Q=t.index($(this));g();d()})});return z}var n=c||{};n.inputClass=n.inputClass||"selectbox";n.containerClass=n.containerClass||"selectbox-wrapper";n.hoverClass=n.hoverClass||"current";n.currentClass=n.selectedClass||"selected";n.debug=n.debug||false;var p=a.id,t,w,x,E="",L,Q=-1,O=0,I=false,ba=$(a),K=function(la){var z=document.createElement("div");K=$(z);K.attr("id",p+"_container");
K.addClass(la.containerClass);K.css("position","absolute");K.hide();return K}(n),C=function(la){var z=document.createElement("input");z=$(z);z.attr("id",p+"_input");z.attr("type","text");z.addClass(la.inputClass);z.attr("autocomplete","off");z.attr("readonly","readonly");z.attr("tabIndex",ba.attr("tabindex"));return z}(n);if(c.maxlength){var ka=C.val;C.val=function(la){if(arguments.length>0){la=""+la;return ka.call(this,la.substring(0,parseInt(c.maxlength)))}return ka.call(this)}}if(c.abbreviate){ka=
C.val;C.val=function(la){if(arguments.length>0){la=s2.tuifly.util.toolbox.shortenTextInElement(C,la,"...");return ka.call(this,la)}return ka.call(this)}}ba.hide().before(C).before(K);var ua=K.show,fa=false;K.show=function(){fa||b();fa=true;ua.apply($(this));t.filter("."+n.hoverClass).removeClass(n.hoverClass);var la=t.filter(function(){return $(this).text().match(RegExp("^\\s*"+C.val().replace(/\.\.\.$/,"").replace(/([()^$.*+?\\[\]\/])/g,"\\$1"),"i"))}).eq(0).addClass(n.hoverClass);Q=t.index(la);
la.length!=0&&x.scrollTop(la.position().top-w.position().top)};var N=0,q=false;C.click(function(){if(q&&(new Date).getTime()-N>200){K.hide();q=false}else{K.show();q=true}}).focus(function(){if(K.not(":visible")){var la=C.position(),z=la.top+C.outerHeight();K.css("top",z+"px");K.css("left",la.left+"px");K.show();q=true;N=(new Date).getTime()}}).keydown(function(la){switch(la.keyCode){case 38:la.preventDefault();f(-1);break;case 40:la.preventDefault();f(1);break;case 13:la.preventDefault();$("li."+
n.hoverClass,K).trigger("click");break;case 27:la.preventDefault();d()}}).keypress(function(la){if(!(O>0)){var z;if(la.which==null)z=la.keyCode;else if(la.which>0)z=la.which;la=String.fromCharCode(z);if(z&&31<z&&z!=127&&la.match(/[^\\\.\*\+\?\[\]\(\)\^\$\/]/)){K.not(":visible").length>0&&K.show();E+=la;z=K.find("li:startsWith("+E+")");if(E.match(/(.)\1/i)&&z.length==0||E.length==1&&z.filter("."+n.hoverClass).length==1&&z.length>1){E=la;z=z.length>0?z:K.find("li:startsWith("+E+")");la=z.index(z.filter("."+
n.hoverClass))+1;la=la<z.length?la:0;z=z.eq(la)}else z=z.eq(0);if(z.length>0){t.filter("."+n.hoverClass).removeClass(n.hoverClass);z.addClass(n.hoverClass);Q=t.index(z);x.scrollTop(z.position().top-w.position().top);t.filter("."+n.currentClass).removeClass(n.currentClass);z.addClass(n.currentClass);g()}L&&window.clearTimeout(L);L=window.setTimeout(function(){E=""},1E3)}}}).blur(function(){if(O>0)n.debug&&console.log("container visible and has focus");else d()});var ya=function(){C.val(ba.find(":selected").text())};
ba.data("update",ya);ba.data("updateList",function(){if(x)x.remove();else fa=true;b()});$(window).load(ya);s2.tuifly.events.AvailibilityCookieDataSet.observe(ya)};
jQuery.fn.ajaxSubmit=function(a){if(typeof a=="function")a={success:a};a=jQuery.extend({url:this.attr("action")||"",method:this.attr("method")||"GET"},a||{});a.success=a.success||a.after;a.beforeSubmit=a.beforeSubmit||a.before;a.type=a.type||a.method;var c=this.formToArray(a.semantic);if(a.beforeSubmit&&a.beforeSubmit(c,this,a)===false)return this;c=jQuery.param(c);if(a.type.toUpperCase()=="GET"){a.url+=(a.url.indexOf("?")>=0?"&":"?")+c;a.data=null}else a.data=c;var d=this,b=[];a.resetForm&&b.push(function(){d.resetForm()});
a.clearForm&&b.push(function(){d.clearForm()});if(!a.dataType&&a.target){var f=a.success||function(){};b.push(function(g,h){jQuery(a.target).attr("innerHTML",g).evalScripts().each(f,[g,h])})}else a.success&&b.push(a.success);a.success=function(g,h){for(var n=0,p=b.length;n<p;n++)b[n](g,h)};jQuery.ajax(a);return this};
jQuery.fn.ajaxForm=function(a){return this.each(function(){jQuery("input:submit,input:image,button:submit",this).click(function(c){var d=this.form;d.clk=this;if(this.type=="image")if(c.offsetX!=undefined){d.clk_x=c.offsetX;d.clk_y=c.offsetY}else if(typeof jQuery.fn.offset=="function"){var b=jQuery(this).offset();d.clk_x=c.pageX-b.left;d.clk_y=c.pageY-b.top}else{d.clk_x=c.pageX-this.offsetLeft;d.clk_y=c.pageY-this.offsetTop}setTimeout(function(){d.clk=d.clk_x=d.clk_y=null},10)})}).submit(function(){jQuery(this).ajaxSubmit(a);
return false})};
jQuery.fn.formToArray=function(a){var c=[];if(this.length==0)return c;var d=this[0],b=a?d.getElementsByTagName("*"):d.elements;if(!b)return c;for(var f=0,g=b.length;f<g;f++){var h=b[f],n=h.name;if(n)if(a&&d.clk&&h.type=="image")!h.disabled&&d.clk==h&&c.push({name:n+".x",value:d.clk_x},{name:n+".y",value:d.clk_y});else{h=jQuery.fieldValue(h,true);if(h!==null)if(h.constructor==Array)for(var p=0,t=h.length;p<t;p++)c.push({name:n,value:h[p]});else c.push({name:n,value:h})}}if(!a&&d.clk){a=d.getElementsByTagName("input");
f=0;for(g=a.length;f<g;f++){b=a[f];(n=b.name)&&!b.disabled&&b.type=="image"&&d.clk==b&&c.push({name:n+".x",value:d.clk_x},{name:n+".y",value:d.clk_y})}}return c};jQuery.fn.formSerialize=function(a){return jQuery.param(this.formToArray(a))};
jQuery.fn.fieldSerialize=function(a){var c=[];this.each(function(){var d=this.name;if(d){var b=jQuery.fieldValue(this,a);if(b&&b.constructor==Array)for(var f=0,g=b.length;f<g;f++)c.push({name:d,value:b[f]});else b!==null&&typeof b!="undefined"&&c.push({name:this.name,value:b})}});return jQuery.param(c)};
jQuery.fn.fieldValue=function(a){for(var c,d,b=0,f=this.length;b<f;b++){var g=this[b],h=jQuery.fieldValue(g,a);if(!(h===null||typeof h=="undefined"||h.constructor==Array&&!h.length)){if(g.type!="checkbox")return h;d=d||g.name;if(d!=g.name)break;c=c||[];c.push(h)}}return c};
jQuery.fieldValue=function(a,c){var d=a.name,b=a.type,f=a.tagName.toLowerCase();if(typeof c=="undefined")c=true;if(c&&(!d||a.disabled||b=="reset"||(b=="checkbox"||b=="radio")&&!a.checked||(b=="submit"||b=="image")&&a.form&&a.form.clk!=a||f=="select"&&a.selectedIndex==-1))return null;if(f=="select"){var g=a.selectedIndex;if(g<0)return null;d=[];f=a.options;var h=(b=b=="select-one")?g+1:f.length;for(g=b?g:0;g<h;g++){var n=f[g];if(n.selected){n=jQuery.browser.msie&&!n.attributes.value.specified?n.text:
n.value;if(b)return n;d.push(n)}}return d}return a.value};jQuery.fn.clearForm=function(){return this.each(function(){jQuery("input,select,textarea",this).clearFields()})};jQuery.fn.clearFields=jQuery.fn.clearInputs=function(){return this.each(function(){var a=this.type,c=this.tagName.toLowerCase();if(a=="text"||a=="password"||c=="textarea")this.value="";else if(a=="checkbox"||a=="radio")this.checked=false;else if(c=="select")this.selectedIndex=-1})};
jQuery.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)this.reset()})};
(function(a){var c=new function(){var d=this;d.tags={async:[],sync:[]};d.createTag=function(b){if(b.code)return'<script type="text/javascript">'+b.code+"<\/script>";if(b.url){b.url=b.url.replace(/\[zeitstempel\]/ig,Math.random());return'<script type="text/javascript" src="'+b.url+'"><\/script>'}};d.writeSyncTags=function(){d.getMementooTag();d.getPartnerMementooTag();d.tags.sync.length&&$(document).ready(function(){$.cachedFind("body").append(d.tags.sync.join(""))})};d.appendAsyncTags=function(){d.getGoogleRemarketingTag();
d.tags.async.length&&document.write(d.tags.async.join(""))};d.getMementooTag=function(){!location.href.match(/select\.aspx/i)&&!location.href.match(/seats\.aspx/i)&&!location.href.match(/extras\.aspx/i)&&!location.href.match(/contactpayment\.aspx/i)&&!location.href.match(/wait\.aspx/i)&&!location.href.match(/itinerary\.aspx/i)&&d.addSyncTag({url:"https://trk.newtention.net/trk?rt=1&ti=1976&cs=8727&cpi=&pi=&rpi=&ts=[zeitstempel]"})};d.getGoogleRemarketingTag=function(){if(!location.href.match(/itinerary\.aspx/i)){d.addAsyncTag({code:'var google_conversion_id = 1018465411;var google_conversion_language = "en";var google_conversion_format = "3";var google_conversion_color = "666666";var google_conversion_label = "bFl3CO3IigIQg5nS5QM";var google_conversion_value = 0;'});
d.addAsyncTag({url:"https://www.googleadservices.com/pagead/conversion.js"})}};d.getPartnerMementooTag=function(){$.cachedFind("body.de-DE").length!=0&&$.cachedFind("body#home").length!=0&&d.addAsyncTag({url:"https://trk.newtention.net/trk?rt=1&ti=2442&cs=8593&ts=[zeitstempel]"})};d.addAsyncTag=function(b){d.tags.async.push(d.createTag(b))};d.addSyncTag=function(b){d.tags.sync.push(d.createTag(b))};d.addFlashAdOfferWithImage=function(){if($.cachedFind("body.de-DE").length!=0){var b=d.createTag({url:"https://ads.newtention.net/ads?rt=2&et=1&bi=64346&se=m&cs=2590&ts=[zeitstempel]"});
document.write(b)}};d.addFlashAdOfferList=function(){if($.cachedFind("body.de-DE").length!=0){var b=d.createTag({url:"https://ads.newtention.net/ads?rt=2&et=1&bi=64345&se=m&cs=101&ts=[zeitstempel]"});document.write(b)}};d.run=function(){d.writeSyncTags();d.appendAsyncTags()}};a.addFlashAdOfferWithImage=function(){c.addFlashAdOfferWithImage()};a.addFlashAdOfferList=function(){c.addFlashAdOfferList()};a.writeNewtentionTag=function(){c.run()}})(this);
window.Modernizr=function(a,c,d){function b(){n.input=function(D){for(var H=0,M=D.length;H<M;H++)ka[D[H]]=!!(D[H]in E);return ka}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));n.inputtypes=function(D){for(var H=0,M,Z,ha,qa=D.length;H<qa;H++){E.setAttribute("type",Z=D[H]);(M=E.type!=="text")&&(E.value=L,E.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(Z)&&E.style.WebkitAppearance!==d?(p.appendChild(E),ha=c.defaultView,M=ha.getComputedStyle&&
ha.getComputedStyle(E,null).WebkitAppearance!=="textfield"&&E.offsetHeight!==0,p.removeChild(E)):/^(search|tel)$/.test(Z)||(/^(url|email)$/.test(Z)?M=E.checkValidity&&E.checkValidity()===false:/^color$/.test(Z)?(p.appendChild(E),M=E.value!=L,p.removeChild(E)):M=E.value!=L));C[D[H]]=!!M}return C}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function f(D,H){var M=D.charAt(0).toUpperCase()+D.substr(1);M=(D+" "+I.join(M+" ")+M).split(" ");return!!g(M,
H)}function g(D,H){for(var M in D)if(x[D[M]]!==d&&(!H||H(D[M],w)))return true}function h(D,H){return typeof D===H}var n={},p=c.documentElement,t=c.head||c.getElementsByTagName("head")[0],w=c.createElement("modernizr"),x=w.style,E=c.createElement("input"),L=":)",Q=Object.prototype.toString,O=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),I="Webkit Moz O ms Khtml".split(" "),ba={svg:"http://www.w3.org/2000/svg"},K={},C={},ka={},ua=[],fa,N=function(D){var H=c.createElement("style"),M=c.createElement("div");
H.textContent=D+"{#modernizr{height:3px}}";t.appendChild(H);M.id="modernizr";p.appendChild(M);D=M.offsetHeight===3;H.parentNode.removeChild(H);M.parentNode.removeChild(M);return!!D},q=function(){var D={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(H,M){M=M||c.createElement(D[H]||"div");var Z=(H="on"+H)in M;Z||(M.setAttribute||(M=c.createElement("div")),M.setAttribute&&M.removeAttribute&&(M.setAttribute(H,""),Z=h(M[H],"function"),h(M[H],
d)||(M[H]=d),M.removeAttribute(H)));return Z}}(),ya={}.hasOwnProperty,la;h(ya,d)||h(ya.call,d)?la=function(D,H){return H in D&&h(D.constructor.prototype[H],d)}:la=function(D,H){return ya.call(D,H)};K.flexbox=function(){var D=c.createElement("div"),H=c.createElement("div");(function(Z,ha,qa,Ba){ha+=":";Z.style.cssText=(ha+O.join(qa+";"+ha)).slice(0,-ha.length)+(Ba||"")})(D,"display","box","width:42px;padding:0;");H.style.cssText=O.join("box-flex:1;")+"width:10px;";D.appendChild(H);p.appendChild(D);
var M=H.offsetWidth===42;D.removeChild(H);p.removeChild(D);return M};K.canvas=function(){var D=c.createElement("canvas");return D.getContext&&D.getContext("2d")};K.canvastext=function(){return n.canvas&&h(c.createElement("canvas").getContext("2d").fillText,"function")};K.webgl=function(){return!!a.WebGLRenderingContext};K.touch=function(){return"ontouchstart"in a||N("@media ("+O.join("touch-enabled),(")+"modernizr)")};K.geolocation=function(){return!!navigator.geolocation};K.postmessage=function(){return!!a.postMessage};
K.websqldatabase=function(){return!!a.openDatabase};K.indexedDB=function(){for(var D=-1,H=I.length;++D<H;){var M=I[D].toLowerCase();if(a[M+"_indexedDB"]||a[M+"IndexedDB"])return true}return false};K.hashchange=function(){return q("hashchange",a)&&(c.documentMode===d||c.documentMode>7)};K.history=function(){return!!(a.history&&history.pushState)};K.draganddrop=function(){return q("dragstart")&&q("drop")};K.websockets=function(){return"WebSocket"in a};K.rgba=function(){x.cssText="background-color:rgba(150,255,150,.5)";
return(""+x.backgroundColor).indexOf("rgba")!==-1};K.hsla=function(){x.cssText="background-color:hsla(120,40%,100%,.5)";return(""+x.backgroundColor).indexOf("rgba")!==-1||(""+x.backgroundColor).indexOf("hsla")!==-1};K.multiplebgs=function(){x.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(x.background)};K.backgroundsize=function(){return f("backgroundSize")};K.borderimage=function(){return f("borderImage")};K.borderradius=function(){return f("borderRadius","",function(D){return(""+
D).indexOf("orderRadius")!==-1})};K.boxshadow=function(){return f("boxShadow")};K.textshadow=function(){return c.createElement("div").style.textShadow===""};K.opacity=function(){var D=O.join("opacity:.55;")+"";x.cssText=D;return/^0.55$/.test(x.opacity)};K.cssanimations=function(){return f("animationName")};K.csscolumns=function(){return f("columnCount")};K.cssgradients=function(){var D=("background-image:"+O.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+O.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,
-17);x.cssText=D;return(""+x.backgroundImage).indexOf("gradient")!==-1};K.cssreflections=function(){return f("boxReflect")};K.csstransforms=function(){return!!g(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};K.csstransforms3d=function(){var D=!!g(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);D&&"webkitPerspective"in p.style&&(D=N("@media ("+O.join("transform-3d),(")+"modernizr)"));return D};K.csstransitions=function(){return f("transitionProperty")};
K.video=function(){var D=c.createElement("video"),H=!!D.canPlayType;if(H){H=new Boolean(H);H.ogg=D.canPlayType('video/ogg; codecs="theora"');H.h264=D.canPlayType('video/mp4; codecs="avc1.42E01E"')||D.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');H.webm=D.canPlayType('video/webm; codecs="vp8, vorbis"')}return H};K.audio=function(){var D=c.createElement("audio"),H=!!D.canPlayType;H&&(H=new Boolean(H),H.ogg=D.canPlayType('audio/ogg; codecs="vorbis"'),H.mp3=D.canPlayType("audio/mpeg;"),H.wav=
D.canPlayType('audio/wav; codecs="1"'),H.m4a=D.canPlayType("audio/x-m4a;")||D.canPlayType("audio/aac;"));return H};K.localstorage=function(){try{return!!localStorage.getItem}catch(D){return false}};K.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(D){return false}};K.webWorkers=function(){return!!a.Worker};K.applicationcache=function(){return!!a.applicationCache};K.svg=function(){return!!c.createElementNS&&!!c.createElementNS(ba.svg,"svg").createSVGRect};K.inlinesvg=function(){var D=
c.createElement("div");D.innerHTML="<svg/>";return(D.firstChild&&D.firstChild.namespaceURI)==ba.svg};K.smil=function(){return!!c.createElementNS&&/SVG/.test(Q.call(c.createElementNS(ba.svg,"animate")))};K.svgclippaths=function(){return!!c.createElementNS&&/SVG/.test(Q.call(c.createElementNS(ba.svg,"clipPath")))};for(var z in K)la(K,z)&&(fa=z.toLowerCase(),n[fa]=K[z](),ua.push((n[fa]?"":"no-")+fa));n.input||b();n.crosswindowmessaging=n.postmessage;n.historymanagement=n.history;n.addTest=function(D,
H){D=D.toLowerCase();if(!n[D]){H=!!H();p.className+=" "+(H?"":"no-")+D;n[D]=H;return n}};x.cssText="";w=E=null;a.attachEvent&&function(){var D=c.createElement("div");D.innerHTML="<elem></elem>";return D.childNodes.length!==1}()&&function(D,H){function M(ia,ma){for(var wa=-1,va=ia.length,Ha,Ia=[];++wa<va;){Ha=ia[wa];(ma=Ha.media||ma)!="screen"&&Ia.push(M(Ha.imports,ma),Ha.cssText)}return Ia.join("")}function Z(ia){for(var ma=-1;++ma<qa;)ia.createElement(ha[ma])}var ha="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"),
qa=ha.length,Ba=RegExp("(^|\\s)(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)","gi"),Fa=RegExp("<(/*)(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)","gi"),ta=RegExp("(^|[^\\n]*?\\s)(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)([^\\n]*)({[\\n\\w\\W]*?})",
"gi"),Na=H.createDocumentFragment(),sa=H.documentElement,ja=sa.firstChild,P=H.createElement("body"),Y=H.createElement("style"),ea;Z(H);Z(Na);ja.insertBefore(Y,ja.firstChild);Y.media="print";D.attachEvent("onbeforeprint",function(){var ia=-1,ma=M(H.styleSheets,"all"),wa=[],va;for(ea=ea||H.body;(va=ta.exec(ma))!=null;)wa.push((va[1]+va[2]+va[3]).replace(Ba,"$1.iepp_$2")+va[4]);for(Y.styleSheet.cssText=wa.join("\n");++ia<qa;){ma=H.getElementsByTagName(ha[ia]);wa=ma.length;for(va=-1;++va<wa;)ma[va].className.indexOf("iepp_")<
0&&(ma[va].className+=" iepp_"+ha[ia])}Na.appendChild(ea);sa.appendChild(P);P.className=ea.className;P.innerHTML=ea.innerHTML.replace(Fa,"<$1font")});D.attachEvent("onafterprint",function(){P.innerHTML="";sa.removeChild(P);sa.appendChild(ea);Y.styleSheet.cssText=""})}(a,c);n._enableHTML5=true;n._version="1.7";p.className=p.className.replace(/\bno-js\b/,"")+" js "+ua.join(" ");return n}(this,this.document);
(function(a,c,d){function b(){for(var Z=1,ha=-1;Q.length-++ha;)if(Q[ha].s&&!(Z=Q[ha].r))break;Z&&h()}function f(Z){var ha=c.createElement("script"),qa;ha.src=Z.s;ha.onreadystatechange=ha.onload=function(){!qa&&(!ha.readyState||ha.readyState=="loaded"||ha.readyState=="complete")&&(qa=1,b(),ha.onload=ha.onreadystatechange=null)};x(function(){qa||(qa=1,b())},M.errorTimeout);Z.e?ha.onload():E.parentNode.insertBefore(ha,E)}function g(Z){var ha=c.createElement("link"),qa;ha.href=Z.s;ha.rel="stylesheet";
ha.type="text/css";!Z.e&&(ka||I)?function Ba(Fa){x(function(){if(!qa)try{Fa.sheet.cssRules.length?(qa=1,b()):Ba(Fa)}catch(ta){ta.code==1E3||ta.message=="security"||ta.message=="denied"?(qa=1,x(function(){b()},0)):Ba(Fa)}},0)}(ha):(ha.onload=function(){qa||(qa=1,x(function(){b()},0))},Z.e&&ha.onload());x(function(){qa||(qa=1,b())},M.errorTimeout);!Z.e&&E.parentNode.insertBefore(ha,E)}function h(){var Z=Q.shift();O=1;Z?Z.t?x(function(){Z.t=="c"?g(Z):f(Z)},0):(Z(),b()):O=0}function n(Z,ha,qa,Ba,Fa,ta){function Na(){!ja&&
(!sa.readyState||sa.readyState=="loaded"||sa.readyState=="complete")&&(P.r=ja=1,!O&&b(),sa.onload=sa.onreadystatechange=null,x(function(){K.removeChild(sa)},0))}var sa=c.createElement(Z),ja=0,P={t:qa,s:ha,e:ta};sa.src=sa.data=ha;!ba&&(sa.style.display="none");sa.width=sa.height="0";Z!="object"&&(sa.type=qa);sa.onload=sa.onreadystatechange=Na;Z=="img"?sa.onerror=Na:Z=="script"&&(sa.onerror=function(){P.e=P.r=1;h()});Q.splice(Ba,0,P);K.insertBefore(sa,ba?null:E);x(function(){ja||(K.removeChild(sa),
P.r=P.e=ja=1,b())},M.errorTimeout)}function p(Z,ha,qa){var Ba=ha=="c"?N:fa;O=0;ha=ha||"j";ya(Z)?n(Ba,Z,ha,this.i++,w,qa):(Q.splice(this.i++,0,Z),Q.length==1&&h());return this}function t(){var Z=M;Z.loader={load:p,i:0};return Z}var w=c.documentElement,x=a.setTimeout,E=c.getElementsByTagName("script")[0],L={}.toString,Q=[],O=0,I="MozAppearance"in w.style,ba=I&&!!c.createRange().compareNode,K=ba?w:E.parentNode,C=a.opera&&L.call(a.opera)=="[object Opera]",ka="webkitAppearance"in w.style,ua=ka&&"async"in
c.createElement("script"),fa=I?"object":C||ua?"img":"script",N=ka?"img":fa,q=Array.isArray||function(Z){return L.call(Z)=="[object Array]"},ya=function(Z){return typeof Z=="string"},la=function(Z){return L.call(Z)=="[object Function]"},z=[],D={},H,M;M=function(Z){function ha(sa){sa=sa.split("!");var ja=z.length,P=sa.pop(),Y=sa.length;P={url:P,origUrl:P,prefixes:sa};var ea,ia;for(ia=0;ia<Y;ia++)(ea=D[sa[ia]])&&(P=ea(P));for(ia=0;ia<ja;ia++)P=z[ia](P);return P}function qa(sa,ja,P,Y,ea){var ia=ha(sa),
ma=ia.autoCallback;if(!ia.bypass){ja&&(ja=la(ja)?ja:ja[sa]||ja[Y]||ja[sa.split("/").pop().split("?")[0]]);if(ia.instead)return ia.instead(sa,ja,P,Y,ea);P.load(ia.url,ia.forceCSS||!ia.forceJS&&/css$/.test(ia.url)?"c":d,ia.noexec);(la(ja)||la(ma))&&P.load(function(){t();ja&&ja(ia.origUrl,ea,Y);ma&&ma(ia.origUrl,ea,Y)})}}function Ba(sa,ja){function P(wa){if(ya(wa))qa(wa,ia,ja,0,Y);else if(typeof wa=="object")for(ma in wa)wa.hasOwnProperty(ma)&&qa(wa[ma],ia,ja,ma,Y)}var Y=!!sa.test,ea=sa.load||sa.both,
ia=sa.callback,ma;P(Y?sa.yep:sa.nope);P(ea);sa.complete&&ja.load(sa.complete)}var Fa,ta,Na=this.yepnope.loader;if(ya(Z))qa(Z,0,Na,0);else if(q(Z))for(Fa=0;Fa<Z.length;Fa++){ta=Z[Fa];ya(ta)?qa(ta,0,Na,0):q(ta)?M(ta):typeof ta=="object"&&Ba(ta,Na)}else typeof Z=="object"&&Ba(Z,Na)};M.addPrefix=function(Z,ha){D[Z]=ha};M.addFilter=function(Z){z.push(Z)};M.errorTimeout=1E4;c.readyState==null&&c.addEventListener&&(c.readyState="loading",c.addEventListener("DOMContentLoaded",H=function(){c.removeEventListener("DOMContentLoaded",
H,0);c.readyState="complete"},0));a.yepnope=t()})(this,this.document);Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
var swfobject=function(){function a(){if(!Ba){try{var P=N.getElementsByTagName("body")[0].appendChild(N.createElement("span"));P.parentNode.removeChild(P)}catch(Y){return}Ba=true;P=la.length;for(var ea=0;ea<P;ea++)la[ea]()}}function c(P){if(Ba)P();else la[la.length]=P}function d(P){if(typeof fa.addEventListener!=K)fa.addEventListener("load",P,false);else if(typeof N.addEventListener!=K)N.addEventListener("load",P,false);else if(typeof fa.attachEvent!=K)L(fa,"onload",P);else if(typeof fa.onload=="function"){var Y=
fa.onload;fa.onload=function(){Y();P()}}else fa.onload=P}function b(){var P=N.getElementsByTagName("body")[0],Y=N.createElement(C);Y.setAttribute("type",ka);var ea=P.appendChild(Y);if(ea){var ia=0;(function(){if(typeof ea.GetVariable!=K){var ma=ea.GetVariable("$version");if(ma){ma=ma.split(" ")[1].split(",");ja.pv=[parseInt(ma[0],10),parseInt(ma[1],10),parseInt(ma[2],10)]}}else if(ia<10){ia++;setTimeout(arguments.callee,10);return}P.removeChild(Y);ea=null;f()})()}else f()}function f(){var P=z.length;
if(P>0)for(var Y=0;Y<P;Y++){var ea=z[Y].id,ia=z[Y].callbackFn,ma={success:false,id:ea};if(ja.pv[0]>0){var wa=E(ea);if(wa)if(Q(z[Y].swfVersion)&&!(ja.wk&&ja.wk<312)){I(ea,true);if(ia){ma.success=true;ma.ref=g(ea);ia(ma)}}else if(z[Y].expressInstall&&h()){ma={};ma.data=z[Y].expressInstall;ma.width=wa.getAttribute("width")||"0";ma.height=wa.getAttribute("height")||"0";if(wa.getAttribute("class"))ma.styleclass=wa.getAttribute("class");if(wa.getAttribute("align"))ma.align=wa.getAttribute("align");var va=
{};wa=wa.getElementsByTagName("param");for(var Ha=wa.length,Ia=0;Ia<Ha;Ia++)if(wa[Ia].getAttribute("name").toLowerCase()!="movie")va[wa[Ia].getAttribute("name")]=wa[Ia].getAttribute("value");n(ma,va,ea,ia)}else{p(wa);ia&&ia(ma)}}else{I(ea,true);if(ia){if((ea=g(ea))&&typeof ea.SetVariable!=K){ma.success=true;ma.ref=ea}ia(ma)}}}}function g(P){var Y=null;if((P=E(P))&&P.nodeName=="OBJECT")if(typeof P.SetVariable!=K)Y=P;else if(P=P.getElementsByTagName(C)[0])Y=P;return Y}function h(){return!Fa&&Q("6.0.65")&&
(ja.win||ja.mac)&&!(ja.wk&&ja.wk<312)}function n(P,Y,ea,ia){Fa=true;ha=ia||null;qa={success:false,id:ea};var ma=E(ea);if(ma){if(ma.nodeName=="OBJECT"){M=t(ma);Z=null}else{M=ma;Z=ea}P.id=ua;if(typeof P.width==K||!/%$/.test(P.width)&&parseInt(P.width,10)<310)P.width="310";if(typeof P.height==K||!/%$/.test(P.height)&&parseInt(P.height,10)<137)P.height="137";N.title=N.title.slice(0,47)+" - Flash Player Installation";ia=ja.ie&&ja.win?"ActiveX":"PlugIn";ia="MMredirectURL="+fa.location.toString().replace(/&/g,
"%26")+"&MMplayerType="+ia+"&MMdoctitle="+N.title;if(typeof Y.flashvars!=K)Y.flashvars+="&"+ia;else Y.flashvars=ia;if(ja.ie&&ja.win&&ma.readyState!=4){ia=N.createElement("div");ea+="SWFObjectNew";ia.setAttribute("id",ea);ma.parentNode.insertBefore(ia,ma);ma.style.display="none";(function(){ma.readyState==4?ma.parentNode.removeChild(ma):setTimeout(arguments.callee,10)})()}w(P,Y,ea)}}function p(P){if(ja.ie&&ja.win&&P.readyState!=4){var Y=N.createElement("div");P.parentNode.insertBefore(Y,P);Y.parentNode.replaceChild(t(P),
Y);P.style.display="none";(function(){P.readyState==4?P.parentNode.removeChild(P):setTimeout(arguments.callee,10)})()}else P.parentNode.replaceChild(t(P),P)}function t(P){var Y=N.createElement("div");if(ja.win&&ja.ie)Y.innerHTML=P.innerHTML;else if(P=P.getElementsByTagName(C)[0])if(P=P.childNodes)for(var ea=P.length,ia=0;ia<ea;ia++)!(P[ia].nodeType==1&&P[ia].nodeName=="PARAM")&&P[ia].nodeType!=8&&Y.appendChild(P[ia].cloneNode(true));return Y}function w(P,Y,ea){var ia,ma=E(ea);if(ja.wk&&ja.wk<312)return ia;
if(ma){if(typeof P.id==K)P.id=ea;if(ja.ie&&ja.win){var wa="",va;for(va in P)if(P[va]!=Object.prototype[va])if(va.toLowerCase()=="data")Y.movie=P[va];else if(va.toLowerCase()=="styleclass")wa+=' class="'+P[va]+'"';else if(va.toLowerCase()!="classid")wa+=" "+va+'="'+P[va]+'"';va="";for(var Ha in Y)if(Y[Ha]!=Object.prototype[Ha])va+='<param name="'+Ha+'" value="'+Y[Ha]+'" />';ma.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+wa+">"+va+"</object>";D[D.length]=P.id;ia=E(P.id)}else{Ha=
N.createElement(C);Ha.setAttribute("type",ka);for(var Ia in P)if(P[Ia]!=Object.prototype[Ia])if(Ia.toLowerCase()=="styleclass")Ha.setAttribute("class",P[Ia]);else Ia.toLowerCase()!="classid"&&Ha.setAttribute(Ia,P[Ia]);for(wa in Y)if(Y[wa]!=Object.prototype[wa]&&wa.toLowerCase()!="movie"){P=Ha;va=wa;Ia=Y[wa];ea=N.createElement("param");ea.setAttribute("name",va);ea.setAttribute("value",Ia);P.appendChild(ea)}ma.parentNode.replaceChild(Ha,ma);ia=Ha}}return ia}function x(P){var Y=E(P);if(Y&&Y.nodeName==
"OBJECT")if(ja.ie&&ja.win){Y.style.display="none";(function(){if(Y.readyState==4){var ea=E(P);if(ea){for(var ia in ea)if(typeof ea[ia]=="function")ea[ia]=null;ea.parentNode.removeChild(ea)}}else setTimeout(arguments.callee,10)})()}else Y.parentNode.removeChild(Y)}function E(P){var Y=null;try{Y=N.getElementById(P)}catch(ea){}return Y}function L(P,Y,ea){P.attachEvent(Y,ea);H[H.length]=[P,Y,ea]}function Q(P){var Y=ja.pv;P=P.split(".");P[0]=parseInt(P[0],10);P[1]=parseInt(P[1],10)||0;P[2]=parseInt(P[2],
10)||0;return Y[0]>P[0]||Y[0]==P[0]&&Y[1]>P[1]||Y[0]==P[0]&&Y[1]==P[1]&&Y[2]>=P[2]?true:false}function O(P,Y,ea,ia){if(!(ja.ie&&ja.mac)){var ma=N.getElementsByTagName("head")[0];if(ma){ea=ea&&typeof ea=="string"?ea:"screen";if(ia)Na=ta=null;if(!ta||Na!=ea){ia=N.createElement("style");ia.setAttribute("type","text/css");ia.setAttribute("media",ea);ta=ma.appendChild(ia);if(ja.ie&&ja.win&&typeof N.styleSheets!=K&&N.styleSheets.length>0)ta=N.styleSheets[N.styleSheets.length-1];Na=ea}if(ja.ie&&ja.win)ta&&
typeof ta.addRule==C&&ta.addRule(P,Y);else ta&&typeof N.createTextNode!=K&&ta.appendChild(N.createTextNode(P+" {"+Y+"}"))}}}function I(P,Y){if(sa){var ea=Y?"visible":"hidden";if(Ba&&E(P))E(P).style.visibility=ea;else O("#"+P,"visibility:"+ea)}}function ba(P){return/[\\\"<>\.;]/.exec(P)!=null&&typeof encodeURIComponent!=K?encodeURIComponent(P):P}var K="undefined",C="object",ka="application/x-shockwave-flash",ua="SWFObjectExprInst",fa=window,N=document,q=navigator,ya=false,la=[function(){ya?b():f()}],
z=[],D=[],H=[],M,Z,ha,qa,Ba=false,Fa=false,ta,Na,sa=true,ja=function(){var P=typeof N.getElementById!=K&&typeof N.getElementsByTagName!=K&&typeof N.createElement!=K,Y=q.userAgent.toLowerCase(),ea=q.platform.toLowerCase(),ia=ea?/win/.test(ea):/win/.test(Y);ea=ea?/mac/.test(ea):/mac/.test(Y);Y=/webkit/.test(Y)?parseFloat(Y.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;var ma=!+"\v1",wa=[0,0,0],va=null;if(typeof q.plugins!=K&&typeof q.plugins["Shockwave Flash"]==C){if((va=q.plugins["Shockwave Flash"].description)&&
!(typeof q.mimeTypes!=K&&q.mimeTypes[ka]&&!q.mimeTypes[ka].enabledPlugin)){ya=true;ma=false;va=va.replace(/^.*\s+(\S+\s+\S+$)/,"$1");wa[0]=parseInt(va.replace(/^(.*)\..*$/,"$1"),10);wa[1]=parseInt(va.replace(/^.*\.(.*)\s.*$/,"$1"),10);wa[2]=/[a-zA-Z]/.test(va)?parseInt(va.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else if(typeof fa.ActiveXObject!=K)try{var Ha=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(Ha)if(va=Ha.GetVariable("$version")){ma=true;va=va.split(" ")[1].split(",");wa=[parseInt(va[0],
10),parseInt(va[1],10),parseInt(va[2],10)]}}catch(Ia){}return{w3:P,pv:wa,wk:Y,ie:ma,win:ia,mac:ea}}();(function(){if(ja.w3){if(typeof N.readyState!=K&&N.readyState=="complete"||typeof N.readyState==K&&(N.getElementsByTagName("body")[0]||N.body))a();if(!Ba){typeof N.addEventListener!=K&&N.addEventListener("DOMContentLoaded",a,false);if(ja.ie&&ja.win){N.attachEvent("onreadystatechange",function(){if(N.readyState=="complete"){N.detachEvent("onreadystatechange",arguments.callee);a()}});fa==top&&function(){if(!Ba){try{N.documentElement.doScroll("left")}catch(P){setTimeout(arguments.callee,
0);return}a()}}()}ja.wk&&function(){Ba||(/loaded|complete/.test(N.readyState)?a():setTimeout(arguments.callee,0))}();d(a)}}})();(function(){ja.ie&&ja.win&&window.attachEvent("onunload",function(){for(var P=H.length,Y=0;Y<P;Y++)H[Y][0].detachEvent(H[Y][1],H[Y][2]);P=D.length;for(Y=0;Y<P;Y++)x(D[Y]);for(var ea in ja)ja[ea]=null;ja=null;for(var ia in swfobject)swfobject[ia]=null;swfobject=null})})();return{registerObject:function(P,Y,ea,ia){if(ja.w3&&P&&Y){var ma={};ma.id=P;ma.swfVersion=Y;ma.expressInstall=
ea;ma.callbackFn=ia;z[z.length]=ma;I(P,false)}else ia&&ia({success:false,id:P})},getObjectById:function(P){if(ja.w3)return g(P)},embedSWF:function(P,Y,ea,ia,ma,wa,va,Ha,Ia,$a){var fb={success:false,id:Y};if(ja.w3&&!(ja.wk&&ja.wk<312)&&P&&Y&&ea&&ia&&ma){I(Y,false);c(function(){ea+="";ia+="";var Ua={};if(Ia&&typeof Ia===C)for(var Ta in Ia)Ua[Ta]=Ia[Ta];Ua.data=P;Ua.width=ea;Ua.height=ia;Ta={};if(Ha&&typeof Ha===C)for(var gb in Ha)Ta[gb]=Ha[gb];if(va&&typeof va===C)for(var Xa in va)if(typeof Ta.flashvars!=
K)Ta.flashvars+="&"+Xa+"="+va[Xa];else Ta.flashvars=Xa+"="+va[Xa];if(Q(ma)){gb=w(Ua,Ta,Y);Ua.id==Y&&I(Y,true);fb.success=true;fb.ref=gb}else if(wa&&h()){Ua.data=wa;n(Ua,Ta,Y,$a);return}else I(Y,true);$a&&$a(fb)})}else $a&&$a(fb)},switchOffAutoHideShow:function(){sa=false},ua:ja,getFlashPlayerVersion:function(){return{major:ja.pv[0],minor:ja.pv[1],release:ja.pv[2]}},hasFlashPlayerVersion:Q,createSWF:function(P,Y,ea){if(ja.w3)return w(P,Y,ea)},showExpressInstall:function(P,Y,ea,ia){ja.w3&&h()&&n(P,
Y,ea,ia)},removeSWF:function(P){ja.w3&&x(P)},createCSS:function(P,Y,ea,ia){ja.w3&&O(P,Y,ea,ia)},addDomLoadEvent:c,addLoadEvent:d,getQueryParamValue:function(P){var Y=N.location.search||N.location.hash;if(Y){if(/\?/.test(Y))Y=Y.split("?")[1];if(P==null)return ba(Y);Y=Y.split("&");for(var ea=0;ea<Y.length;ea++)if(Y[ea].substring(0,Y[ea].indexOf("="))==P)return ba(Y[ea].substring(Y[ea].indexOf("=")+1))}return""},expressInstallCallback:function(){if(Fa){var P=E(ua);if(P&&M){P.parentNode.replaceChild(M,
P);if(Z){I(Z,true);if(ja.ie&&ja.win)M.style.display="block"}ha&&ha(qa)}Fa=false}}}}();
(function(a){function c(b,f,g){b=a[b][f].getter||[];b=typeof b=="string"?b.split(/,?\s+/):b;return a.inArray(g,b)!=-1}a.ui={plugin:{add:function(b,f,g){b=a.ui[b].prototype;for(var h in g){b.plugins[h]=b.plugins[h]||[];b.plugins[h].push([f,g[h]])}},call:function(b,f,g){if(f=b.plugins[f])for(var h=0;h<f.length;h++)b.options[f[h][0]]&&f[h][1].apply(b.element,g)}},cssCache:{},css:function(b){if(a.ui.cssCache[b])return a.ui.cssCache[b];var f=a('<div class="ui-gen">').addClass(b).css({position:"absolute",
top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");a.ui.cssCache[b]=!!(!/auto|default/.test(f.css("cursor"))||/^[1-9]/.test(f.css("height"))||/^[1-9]/.test(f.css("width"))||!/none/.test(f.css("backgroundImage"))||!/transparent|rgba\(0, 0, 0, 0\)/.test(f.css("backgroundColor")));try{a("body").get(0).removeChild(f.get(0))}catch(g){}return a.ui.cssCache[b]},disableSelection:function(b){a(b).attr("unselectable","on").css("MozUserSelect","none")},enableSelection:function(b){a(b).attr("unselectable",
"off").css("MozUserSelect","")},hasScroll:function(b,f){var g=/top/.test(f||"top")?"scrollTop":"scrollLeft",h=false;if(b[g]>0)return true;b[g]=1;h=b[g]>0?true:false;b[g]=0;return h},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};var d=
a.fn.remove;a.fn.remove=function(){a("*",this).add(this).triggerHandler("remove");return d.apply(this,arguments)};a.widget=function(b,f){var g=b.split(".")[0];b=b.split(".")[1];a.fn[b]=function(h){var n=typeof h=="string",p=Array.prototype.slice.call(arguments,1);if(n&&c(g,b,h)){var t=a.data(this[0],b);return t?t[h].apply(t,p):undefined}return this.each(function(){var w=a.data(this,b);if(n&&w&&a.isFunction(w[h]))w[h].apply(w,p);else n||a.data(this,b,new a[g][b](this,h))})};a[g][b]=function(h,n){var p=
this;this.widgetName=b;this.widgetBaseClass=g+"-"+b;this.options=a.extend({},a.widget.defaults,a[g][b].defaults,n);this.element=a(h).bind("setData."+b,function(t,w,x){return p.setData(w,x)}).bind("getData."+b,function(t,w){return p.getData(w)}).bind("remove",function(){return p.destroy()});this.init()};a[g][b].prototype=a.extend({},a.widget.prototype,f)};a.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(b){return this.options[b]},setData:function(b,
f){this.options[b]=f;if(b=="disabled")this.element[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")},enable:function(){this.setData("disabled",false)},disable:function(){this.setData("disabled",true)}};a.widget.defaults={disabled:false};a.ui.mouse={mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(f){return b.mouseDown(f)});if(a.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=
false},mouseDestroy:function(){this.element.unbind("."+this.widgetName);a.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable)},mouseDown:function(b){this._mouseStarted&&this.mouseUp(b);this._mouseDownEvent=b;var f=this,g=b.which==1,h=typeof this.options.cancel=="string"?a(b.target).parents().add(b.target).filter(this.options.cancel).length:false;if(!g||h||!this.mouseCapture(b))return true;this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){f._mouseDelayMet=
true},this.options.delay);if(this.mouseDistanceMet(b)&&this.mouseDelayMet(b)){this._mouseStarted=this.mouseStart(b)!==false;if(!this._mouseStarted){b.preventDefault();return true}}this._mouseMoveDelegate=function(n){return f.mouseMove(n)};this._mouseUpDelegate=function(n){return f.mouseUp(n)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false},mouseMove:function(b){if(a.browser.msie&&!b.button)return this.mouseUp(b);
if(this._mouseStarted){this.mouseDrag(b);return false}if(this.mouseDistanceMet(b)&&this.mouseDelayMet(b))(this._mouseStarted=this.mouseStart(this._mouseDownEvent,b)!==false)?this.mouseDrag(b):this.mouseUp(b);return!this._mouseStarted},mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(b)}return false},mouseDistanceMet:function(b){return Math.max(Math.abs(this._mouseDownEvent.pageX-
b.pageX),Math.abs(this._mouseDownEvent.pageY-b.pageY))>=this.options.distance},mouseDelayMet:function(){return this._mouseDelayMet},mouseStart:function(){},mouseDrag:function(){},mouseStop:function(){},mouseCapture:function(){return true}};a.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);
(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{init:function(){var c=this.options;c.helper=="original"&&!/(relative|absolute|fixed)/.test(this.element.css("position"))&&this.element.css("position","relative");this.element.addClass("ui-draggable");c.disabled&&this.element.addClass("ui-draggable-disabled");this.mouseInit()},mouseStart:function(c){var d=this.options;if(this.helper||d.disabled||a(c.target).is(".ui-resizable-handle"))return false;var b=!this.options.handle||!a(this.options.handle,
this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==c.target)b=true});if(!b)return false;if(a.ui.ddmanager)a.ui.ddmanager.current=this;this.helper=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):d.helper=="clone"?this.element.clone():this.element;this.helper.parents("body").length||this.helper.appendTo(d.appendTo=="parent"?this.element[0].parentNode:d.appendTo);this.helper[0]!=this.element[0]&&!/(fixed|absolute)/.test(this.helper.css("position"))&&
this.helper.css("position","absolute");this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:c.pageX-this.offset.left,top:c.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var f=this.offsetParent.offset();if(this.offsetParent[0]==
document.body&&a.browser.mozilla)f={top:0,left:0};this.offset.parent={top:f.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:f.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};f=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:f.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:f.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};this.originalPosition=this.generatePosition(c);
this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(d.cursorAt){if(d.cursorAt.left!=undefined)this.offset.click.left=d.cursorAt.left+this.margins.left;if(d.cursorAt.right!=undefined)this.offset.click.left=this.helperProportions.width-d.cursorAt.right+this.margins.left;if(d.cursorAt.top!=undefined)this.offset.click.top=d.cursorAt.top+this.margins.top;if(d.cursorAt.bottom!=undefined)this.offset.click.top=this.helperProportions.height-d.cursorAt.bottom+this.margins.top}if(d.containment){if(d.containment==
"parent")d.containment=this.helper[0].parentNode;if(d.containment=="document"||d.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(d.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(a(d.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-
this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];if(!/^(document|window|parent)$/.test(d.containment)){f=a(d.containment)[0];var g=a(d.containment).offset();this.containment=[g.left+(parseInt(a(f).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,g.top+(parseInt(a(f).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,g.left+Math.max(f.scrollWidth,
f.offsetWidth)-(parseInt(a(f).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),g.top+Math.max(f.scrollHeight,f.offsetHeight)-(parseInt(a(f).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}}this.propagate("start",c);this.helperProportions={width:this.helper.outerWidth(),
height:this.helper.outerHeight()};a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,c);this.helper.addClass("ui-draggable-dragging");this.mouseDrag(c);return true},convertPositionTo:function(c,d){if(!d)d=this.position;var b=c=="absolute"?1:-1;return{top:d.top+this.offset.relative.top*b+this.offset.parent.top*b-(this.cssPosition=="fixed"||this.cssPosition=="absolute"&&this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)*b+(this.cssPosition=="fixed"?a(document).scrollTop():
0)*b+this.margins.top*b,left:d.left+this.offset.relative.left*b+this.offset.parent.left*b-(this.cssPosition=="fixed"||this.cssPosition=="absolute"&&this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)*b+(this.cssPosition=="fixed"?a(document).scrollLeft():0)*b+this.margins.left*b}},generatePosition:function(c){var d=this.options;c={top:c.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||this.cssPosition=="absolute"&&this.offsetParent[0]==
document.body?0:this.offsetParent[0].scrollTop)-(this.cssPosition=="fixed"?a(document).scrollTop():0),left:c.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||this.cssPosition=="absolute"&&this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)-(this.cssPosition=="fixed"?a(document).scrollLeft():0)};if(!this.originalPosition)return c;if(this.containment){if(c.left<this.containment[0])c.left=this.containment[0];if(c.top<this.containment[1])c.top=
this.containment[1];if(c.left>this.containment[2])c.left=this.containment[2];if(c.top>this.containment[3])c.top=this.containment[3]}if(d.grid){var b=this.originalPosition.top+Math.round((c.top-this.originalPosition.top)/d.grid[1])*d.grid[1];c.top=this.containment?!(b<this.containment[1]||b>this.containment[3])?b:!(b<this.containment[1])?b-d.grid[1]:b+d.grid[1]:b;b=this.originalPosition.left+Math.round((c.left-this.originalPosition.left)/d.grid[0])*d.grid[0];c.left=this.containment?!(b<this.containment[0]||
b>this.containment[2])?b:!(b<this.containment[0])?b-d.grid[0]:b+d.grid[0]:b}return c},mouseDrag:function(c){this.position=this.generatePosition(c);this.positionAbs=this.convertPositionTo("absolute");this.position=this.propagate("drag",c)||this.position;if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,c);return false},
mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour)d=a.ui.ddmanager.drop(this,c);if(this.options.revert=="invalid"&&!d||this.options.revert=="valid"&&d||this.options.revert===true){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){b.propagate("stop",c);b.clear()})}else{this.propagate("stop",c);this.clear()}return false},clear:function(){this.helper.removeClass("ui-draggable-dragging");this.options.helper!="original"&&
!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},plugins:{},uiHash:function(){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}},propagate:function(c,d){a.ui.plugin.call(this,c,[d,this.uiHash()]);if(c=="drag")this.positionAbs=this.convertPositionTo("absolute");return this.element.triggerHandler(c=="drag"?c:"drag"+c,[d,this.uiHash()],this.options[c])},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable");
this.mouseDestroy()}}}));a.extend(a.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original"}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body");if(b.css("cursor"))d.options._cursor=b.css("cursor");b.css("cursor",d.options.cursor)},stop:function(c,d){d.options._cursor&&a("body").css("cursor",d.options._cursor)}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper);if(b.css("zIndex"))d.options._zIndex=
b.css("zIndex");b.css("zIndex",d.options.zIndex)},stop:function(c,d){d.options._zIndex&&a(d.helper).css("zIndex",d.options._zIndex)}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper);if(b.css("opacity"))d.options._opacity=b.css("opacity");b.css("opacity",d.options.opacity)},stop:function(c,d){d.options._opacity&&a(d.helper).css("opacity",d.options._opacity)}});a.ui.plugin.add("draggable","iframeFix",{start:function(c,d){a(d.options.iframeFix===true?"iframe":d.options.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+
"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(a(this).offset()).appendTo("body")})},stop:function(){a("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=d.options,f=a(this).data("draggable");b.scrollSensitivity=b.scrollSensitivity||20;b.scrollSpeed=b.scrollSpeed||20;f.overflowY=function(g){do{if(/auto|scroll/.test(g.css("overflow"))||/auto|scroll/.test(g.css("overflow-y")))return g;
g=g.parent()}while(g[0].parentNode);return a(document)}(this);f.overflowX=function(g){do{if(/auto|scroll/.test(g.css("overflow"))||/auto|scroll/.test(g.css("overflow-x")))return g;g=g.parent()}while(g[0].parentNode);return a(document)}(this);if(f.overflowY[0]!=document&&f.overflowY[0].tagName!="HTML")f.overflowYOffset=f.overflowY.offset();if(f.overflowX[0]!=document&&f.overflowX[0].tagName!="HTML")f.overflowXOffset=f.overflowX.offset()},drag:function(c,d){var b=d.options,f=a(this).data("draggable");
if(f.overflowY[0]!=document&&f.overflowY[0].tagName!="HTML"){if(f.overflowYOffset.top+f.overflowY[0].offsetHeight-c.pageY<b.scrollSensitivity)f.overflowY[0].scrollTop+=b.scrollSpeed;if(c.pageY-f.overflowYOffset.top<b.scrollSensitivity)f.overflowY[0].scrollTop-=b.scrollSpeed}else{c.pageY-a(document).scrollTop()<b.scrollSensitivity&&a(document).scrollTop(a(document).scrollTop()-b.scrollSpeed);a(window).height()-(c.pageY-a(document).scrollTop())<b.scrollSensitivity&&a(document).scrollTop(a(document).scrollTop()+
b.scrollSpeed)}if(f.overflowX[0]!=document&&f.overflowX[0].tagName!="HTML"){if(f.overflowXOffset.left+f.overflowX[0].offsetWidth-c.pageX<b.scrollSensitivity)f.overflowX[0].scrollLeft+=b.scrollSpeed;if(c.pageX-f.overflowXOffset.left<b.scrollSensitivity)f.overflowX[0].scrollLeft-=b.scrollSpeed}else{c.pageX-a(document).scrollLeft()<b.scrollSensitivity&&a(document).scrollLeft(a(document).scrollLeft()-b.scrollSpeed);a(window).width()-(c.pageX-a(document).scrollLeft())<b.scrollSensitivity&&a(document).scrollLeft(a(document).scrollLeft()+
b.scrollSpeed)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable");b.snapElements=[];a(d.options.snap===true?".ui-draggable":d.options.snap).each(function(){var f=a(this),g=f.offset();this!=b.element[0]&&b.snapElements.push({item:this,width:f.outerWidth(),height:f.outerHeight(),top:g.top,left:g.left})})},drag:function(c,d){for(var b=a(this).data("draggable"),f=d.options.snapTolerance||20,g=d.absolutePosition.left,h=g+b.helperProportions.width,n=d.absolutePosition.top,
p=n+b.helperProportions.height,t=b.snapElements.length-1;t>=0;t--){var w=b.snapElements[t].left,x=w+b.snapElements[t].width,E=b.snapElements[t].top,L=E+b.snapElements[t].height;if(w-f<g&&g<x+f&&E-f<n&&n<L+f||w-f<g&&g<x+f&&E-f<p&&p<L+f||w-f<h&&h<x+f&&E-f<n&&n<L+f||w-f<h&&h<x+f&&E-f<p&&p<L+f){if(d.options.snapMode!="inner"){var Q=Math.abs(E-p)<=20,O=Math.abs(L-n)<=20,I=Math.abs(w-h)<=20,ba=Math.abs(x-g)<=20;if(Q)d.position.top=b.convertPositionTo("relative",{top:E-b.helperProportions.height,left:0}).top;
if(O)d.position.top=b.convertPositionTo("relative",{top:L,left:0}).top;if(I)d.position.left=b.convertPositionTo("relative",{top:0,left:w-b.helperProportions.width}).left;if(ba)d.position.left=b.convertPositionTo("relative",{top:0,left:x}).left}if(d.options.snapMode!="outer"){Q=Math.abs(E-n)<=20;O=Math.abs(L-p)<=20;I=Math.abs(w-g)<=20;ba=Math.abs(x-h)<=20;if(Q)d.position.top=b.convertPositionTo("relative",{top:E,left:0}).top;if(O)d.position.top=b.convertPositionTo("relative",{top:L-b.helperProportions.height,
left:0}).top;if(I)d.position.left=b.convertPositionTo("relative",{top:0,left:w}).left;if(ba)d.position.left=b.convertPositionTo("relative",{top:0,left:x-b.helperProportions.width}).left}}}}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,d){var b=a(this).data("draggable");b.sortables=[];a(d.options.connectToSortable).each(function(){if(a.data(this,"sortable")){var f=a.data(this,"sortable");b.sortables.push({instance:f,shouldRevert:f.options.revert});f.refreshItems();f.propagate("activate",
c,b)}})},stop:function(c){var d=a(this).data("draggable");a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance.mouseStop(c);this.instance.element.triggerHandler("sortreceive",[c,a.extend(this.instance.ui(),{sender:d.element})],this.instance.options.receive);this.instance.options.helper=this.instance.options._helper}else this.instance.propagate("deactivate",
c,d)})},drag:function(c,d){var b=a(this).data("draggable"),f=this,g=function(h){var n=h.left,p=n+h.width,t=h.top;h=t+h.height;return n<this.positionAbs.left+this.offset.click.left&&this.positionAbs.left+this.offset.click.left<p&&t<this.positionAbs.top+this.offset.click.top&&this.positionAbs.top+this.offset.click.top<h};a.each(b.sortables,function(){if(g.call(b,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(f).clone().appendTo(this.instance.element).data("sortable-item",
true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return d.helper[0]};c.target=this.instance.currentItem[0];this.instance.mouseCapture(c,true);this.instance.mouseStart(c,true,true);this.instance.offset.click.top=b.offset.click.top;this.instance.offset.click.left=b.offset.click.left;this.instance.offset.parent.left-=b.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=b.offset.parent.top-this.instance.offset.parent.top;
b.propagate("toSortable",c)}this.instance.currentItem&&this.instance.mouseDrag(c)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance.mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();b.propagate("fromSortable",c)}})}});a.ui.plugin.add("draggable","stack",{start:function(c,d){var b=a.makeArray(a(d.options.stack.group)).sort(function(f,
g){return(parseInt(a(f).css("zIndex"),10)||d.options.stack.min)-(parseInt(a(g).css("zIndex"),10)||d.options.stack.min)});a(b).each(function(f){this.style.zIndex=d.options.stack.min+f});this[0].style.zIndex=d.options.stack.min+b.length}})})(jQuery);
(function(a){a.widget("ui.resizable",a.extend({},a.ui.mouse,{init:function(){var c=this,d=this.options,b=this.element.css("position");this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(b)?"relative":b});a.extend(d,{_aspectRatio:!!d.aspectRatio,helper:d.helper||d.ghost||d.animate?d.helper||"proxy":null,knobHandles:d.knobHandles===true?"ui-resizable-knob-handle":d.knobHandles});d.defaultTheme={"ui-resizable":{display:"block"},"ui-resizable-handle":{position:"absolute",
background:"#F2F2F2",fontSize:"0.1px"},"ui-resizable-n":{cursor:"n-resize",height:"4px",left:"0px",right:"0px",borderTop:"1px solid #DEDEDE"},"ui-resizable-s":{cursor:"s-resize",height:"4px",left:"0px",right:"0px",borderBottom:"1px solid #DEDEDE"},"ui-resizable-e":{cursor:"e-resize",width:"4px",top:"0px",bottom:"0px",borderRight:"1px solid #DEDEDE"},"ui-resizable-w":{cursor:"w-resize",width:"4px",top:"0px",bottom:"0px",borderLeft:"1px solid #DEDEDE"},"ui-resizable-se":{cursor:"se-resize",width:"4px",
height:"4px",borderRight:"1px solid #DEDEDE",borderBottom:"1px solid #DEDEDE"},"ui-resizable-sw":{cursor:"sw-resize",width:"4px",height:"4px",borderBottom:"1px solid #DEDEDE",borderLeft:"1px solid #DEDEDE"},"ui-resizable-ne":{cursor:"ne-resize",width:"4px",height:"4px",borderRight:"1px solid #DEDEDE",borderTop:"1px solid #DEDEDE"},"ui-resizable-nw":{cursor:"nw-resize",width:"4px",height:"4px",borderLeft:"1px solid #DEDEDE",borderTop:"1px solid #DEDEDE"}};d.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",
border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"0px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"0px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"0px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"0px",top:"45%"},"ui-resizable-se":{cursor:"se-resize",right:"0px",bottom:"0px"},"ui-resizable-sw":{cursor:"sw-resize",left:"0px",bottom:"0px"},"ui-resizable-nw":{cursor:"nw-resize",left:"0px",top:"0px"},"ui-resizable-ne":{cursor:"ne-resize",
right:"0px",top:"0px"}};d._nodeName=this.element[0].nodeName;if(d._nodeName.match(/canvas|textarea|input|select|button|img/i)){b=this.element;/relative/.test(b.css("position"))&&a.browser.opera&&b.css({position:"relative",top:"auto",left:"auto"});b.wrap(a('<div class="ui-wrapper"\tstyle="overflow: hidden;"></div>').css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}));b=this.element;this.element=this.element.parent();this.element.data("resizable",
this);this.element.css({marginLeft:b.css("marginLeft"),marginTop:b.css("marginTop"),marginRight:b.css("marginRight"),marginBottom:b.css("marginBottom")});b.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});a.browser.safari&&d.preventDefault&&b.css("resize","none");d.proportionallyResize=b.css({position:"static",zoom:1,display:"block"});this.element.css({margin:b.css("margin")});this._proportionallyResize()}if(!d.handles)d.handles=!a(".ui-resizable-handle",this.element).length?"e,s,se":
{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"};if(d.handles.constructor==String){d.zIndex=d.zIndex||1E3;if(d.handles=="all")d.handles="n,e,s,w,se,sw,ne,nw";b=d.handles.split(",");d.handles={};for(var f={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",
sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"},g=0;g<b.length;g++){var h=a.trim(b[g]),n=d.defaultTheme,p="ui-resizable-"+h,t=!a.ui.css(p)&&!d.knobHandles,w=a.ui.css("ui-resizable-knob-handle");n=a.extend(n[p],n["ui-resizable-handle"]);w=a.extend(d.knobTheme[p],!w?d.knobTheme["ui-resizable-handle"]:{});var x=/sw|se|ne|nw/.test(h)?{zIndex:++d.zIndex}:{};p=a(['<div class="ui-resizable-handle ',p,'" style="',t?f[h]:"",f.handle,'"></div>'].join("")).css(x);d.handles[h]=
".ui-resizable-"+h;this.element.append(p.css(t?n:{}).css(d.knobHandles?w:{}).addClass(d.knobHandles?"ui-resizable-knob-handle":"").addClass(d.knobHandles))}if(d.knobHandles)this.element.addClass("ui-resizable-knob").css(!a.ui.css("ui-resizable-knob")?{}:{})}this._renderAxis=function(E){E=E||this.element;for(var L in d.handles){if(d.handles[L].constructor==String)d.handles[L]=a(d.handles[L],this.element).show();d.transparent&&d.handles[L].css({opacity:0});if(this.element.is(".ui-wrapper")&&d._nodeName.match(/textarea|input|select|button/i)){var Q=
a(d.handles[L],this.element),O=0;O=/sw|ne|nw|se|n|s/.test(L)?Q.outerHeight():Q.outerWidth();Q=["padding",/ne|nw|n/.test(L)?"Top":/se|sw|s/.test(L)?"Bottom":/^e$/.test(L)?"Right":"Left"].join("");d.transparent||E.css(Q,O);this._proportionallyResize()}a(d.handles[L])}};this._renderAxis(this.element);d._handles=a(".ui-resizable-handle",c.element);d.disableSelection&&d._handles.each(function(E,L){a.ui.disableSelection(L)});d._handles.mouseover(function(){if(!d.resizing){if(this.className)var E=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
c.axis=d.axis=E&&E[1]?E[1]:"se"}});if(d.autoHide){d._handles.hide();a(c.element).addClass("ui-resizable-autohide").hover(function(){a(this).removeClass("ui-resizable-autohide");d._handles.show()},function(){if(!d.resizing){a(this).addClass("ui-resizable-autohide");d._handles.hide()}})}this.mouseInit()},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,
originalPosition:this.originalPosition}},propagate:function(c,d){a.ui.plugin.call(this,c,[d,this.ui()]);c!="resize"&&this.element.triggerHandler(["resize",c].join(""),[d,this.ui()],this.options[c])},destroy:function(){var c=this.element,d=c.children(".ui-resizable").get(0);this.mouseDestroy();var b=function(f){a(f).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};b(c);if(c.is(".ui-wrapper")&&d){c.parent().append(a(d).css({position:c.css("position"),
width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")})).end().remove();b(d)}},mouseStart:function(c){if(this.options.disabled)return false;var d=false,b;for(b in this.options.handles)if(a(this.options.handles[b])[0]==c.target)d=true;if(!d)return false;d=this.options;var f=this.element.position();b=this.element;var g=function(p){return parseInt(p,10)||0},h=a.browser.msie&&a.browser.version<7;d.resizing=true;d.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};
if(b.is(".ui-draggable")||/absolute/.test(b.css("position"))){var n=a.browser.msie&&!d.containment&&/absolute/.test(b.css("position"))&&!/relative/.test(b.parent().css("position"));b.css({position:"absolute",top:f.top+(n?d.documentScroll.top:0),left:f.left+(n?d.documentScroll.left:0)})}a.browser.opera&&/relative/.test(b.css("position"))&&b.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();f=g(this.helper.css("left"));g=g(this.helper.css("top"));if(d.containment){f+=a(d.containment).scrollLeft()||
0;g+=a(d.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:f,top:g};this.size=d.helper||h?{width:b.outerWidth(),height:b.outerHeight()}:{width:b.width(),height:b.height()};this.originalSize=d.helper||h?{width:b.outerWidth(),height:b.outerHeight()}:{width:b.width(),height:b.height()};this.originalPosition={left:f,top:g};this.sizeDiff={width:b.outerWidth()-b.width(),height:b.outerHeight()-b.height()};this.originalMousePosition={left:c.pageX,top:c.pageY};d.aspectRatio=
typeof d.aspectRatio=="number"?d.aspectRatio:this.originalSize.height/this.originalSize.width||1;d.preserveCursor&&a("body").css("cursor",this.axis+"-resize");this.propagate("start",c);return true},mouseDrag:function(c){var d=this.helper,b=this.options,f=this.originalMousePosition,g=this._change[this.axis];if(!g)return false;f=g.apply(this,[c,c.pageX-f.left||0,c.pageY-f.top||0]);if(b._aspectRatio||c.shiftKey)f=this._updateRatio(f,c);f=this._respectSize(f,c);this.propagate("resize",c);d.css({top:this.position.top+
"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!b.helper&&b.proportionallyResize&&this._proportionallyResize();this._updateCache(f);this.element.triggerHandler("resize",[c,this.ui()],this.options.resize);return false},mouseStop:function(c){this.options.resizing=false;var d=this.options;if(d.helper){var b=d.proportionallyResize,f=b&&/textarea/i.test(b.get(0).nodeName);b=f&&a.ui.hasScroll(b.get(0),"left")?0:this.sizeDiff.height;f={width:this.size.width-(f?
0:this.sizeDiff.width),height:this.size.height-b};b=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null;var g=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;d.animate||this.element.css(a.extend(f,{top:g,left:b}));d.helper&&!d.animate&&this._proportionallyResize()}d.preserveCursor&&a("body").css("cursor","auto");this.propagate("stop",c);d.helper&&this.helper.remove();return false},_updateCache:function(c){this.offset=
this.helper.offset();if(c.left)this.position.left=c.left;if(c.top)this.position.top=c.top;if(c.height)this.size.height=c.height;if(c.width)this.size.width=c.width},_updateRatio:function(c){var d=this.options,b=this.position,f=this.size,g=this.axis;if(c.height)c.width=f.height/d.aspectRatio;else if(c.width)c.height=f.width*d.aspectRatio;if(g=="sw"){c.left=b.left+(f.width-c.width);c.top=null}if(g=="nw"){c.top=b.top+(f.height-c.height);c.left=b.left+(f.width-c.width)}return c},_respectSize:function(c){var d=
this.options,b=this.axis,f=c.width&&d.maxWidth&&d.maxWidth<c.width,g=c.height&&d.maxHeight&&d.maxHeight<c.height,h=c.width&&d.minWidth&&d.minWidth>c.width,n=c.height&&d.minHeight&&d.minHeight>c.height;if(h)c.width=d.minWidth;if(n)c.height=d.minHeight;if(f)c.width=d.maxWidth;if(g)c.height=d.maxHeight;var p=this.originalPosition.left+this.originalSize.width,t=this.position.top+this.size.height,w=/sw|nw|w/.test(b);b=/nw|ne|n/.test(b);if(h&&w)c.left=p-d.minWidth;if(f&&w)c.left=p-d.maxWidth;if(n&&b)c.top=
t-d.minHeight;if(g&&b)c.top=t-d.maxHeight;if((d=!c.width&&!c.height)&&!c.left&&c.top)c.top=null;else if(d&&!c.top&&c.left)c.left=null;return c},_proportionallyResize:function(){var c=this.options;if(c.proportionallyResize){var d=c.proportionallyResize,b=this.helper||this.element;if(!c.borderDif){var f=[d.css("borderTopWidth"),d.css("borderRightWidth"),d.css("borderBottomWidth"),d.css("borderLeftWidth")],g=[d.css("paddingTop"),d.css("paddingRight"),d.css("paddingBottom"),d.css("paddingLeft")];c.borderDif=
a.map(f,function(h,n){var p=parseInt(h,10)||0,t=parseInt(g[n],10)||0;return p+t})}d.css({height:b.height()-c.borderDif[0]-c.borderDif[2]+"px",width:b.width()-c.borderDif[1]-c.borderDif[3]+"px"})}},_renderProxy:function(){var c=this.element,d=this.options;this.elementOffset=c.offset();if(d.helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var b=a.browser.msie&&a.browser.version<7,f=b?1:0;b=b?2:-1;this.helper.addClass(d.helper).css({width:c.outerWidth()+b,height:c.outerHeight()+
b,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++d.zIndex});this.helper.appendTo("body");d.disableSelection&&a.ui.disableSelection(this.helper.get(0))}else this.helper=c},_change:{e:function(c,d){return{width:this.originalSize.width+d}},w:function(c,d){return{left:this.originalPosition.left+d,width:this.originalSize.width-d}},n:function(c,d,b){return{top:this.originalPosition.top+b,height:this.originalSize.height-b}},s:function(c,d,b){return{height:this.originalSize.height+
b}},se:function(c,d,b){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[c,d,b]))},sw:function(c,d,b){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[c,d,b]))},ne:function(c,d,b){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[c,d,b]))},nw:function(c,d,b){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[c,d,b]))}}}));a.extend(a.ui.resizable,{defaults:{cancel:":input",distance:1,
delay:0,preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autoHide:false,knobHandles:false}});a.ui.plugin.add("resizable","containment",{start:function(c,d){var b=d.options,f=a(this).data("resizable"),g=f.element;b=b.containment;if(g=b instanceof a?b.get(0):/parent/.test(b)?g.parent().get(0):b){f.containerElement=a(g);if(/document/.test(b)||b==document){f.containerOffset={left:0,top:0};f.containerPosition={left:0,top:0};f.parentData=
{element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{f.containerOffset=a(g).offset();f.containerPosition=a(g).position();f.containerSize={height:a(g).innerHeight(),width:a(g).innerWidth()};b=f.containerOffset;var h=f.containerSize.height,n=f.containerSize.width;n=a.ui.hasScroll(g,"left")?g.scrollWidth:n;h=a.ui.hasScroll(g)?g.scrollHeight:h;f.parentData={element:g,left:b.left,top:b.top,width:n,height:h}}}},resize:function(c,
d){var b=d.options,f=a(this).data("resizable"),g=f.containerOffset,h=f.position,n=b._aspectRatio||c.shiftKey,p={top:0,left:0},t=f.containerElement;if(t[0]!=document&&/static/.test(t.css("position")))p=f.containerPosition;if(h.left<(b.helper?g.left:p.left)){f.size.width+=b.helper?f.position.left-g.left:f.position.left-p.left;if(n)f.size.height=f.size.width*b.aspectRatio;f.position.left=b.helper?g.left:p.left}if(h.top<(b.helper?g.top:0)){f.size.height+=b.helper?f.position.top-g.top:f.position.top;if(n)f.size.width=
f.size.height/b.aspectRatio;f.position.top=b.helper?g.top:0}h=(b.helper?f.offset.left-g.left:f.position.left-p.left)+f.sizeDiff.width;g=(b.helper?f.offset.top-g.top:f.position.top)+f.sizeDiff.height;if(h+f.size.width>=f.parentData.width){f.size.width=f.parentData.width-h;if(n)f.size.height=f.size.width*b.aspectRatio}if(g+f.size.height>=f.parentData.height){f.size.height=f.parentData.height-g;if(n)f.size.width=f.size.height/b.aspectRatio}},stop:function(c,d){var b=d.options,f=a(this).data("resizable"),
g=f.containerOffset,h=f.containerPosition,n=f.containerElement,p=a(f.helper);f=p.offset();var t=p.innerWidth();p=p.innerHeight();b.helper&&!b.animate&&/relative/.test(n.css("position"))&&a(this).css({left:f.left-g.left,top:f.top-g.top,width:t,height:p});b.helper&&!b.animate&&/static/.test(n.css("position"))&&a(this).css({left:h.left+(f.left-g.left),top:h.top+(f.top-g.top),width:t,height:p})}});a.ui.plugin.add("resizable","grid",{resize:function(c,d){var b=d.options,f=a(this).data("resizable"),g=f.size,
h=f.originalSize,n=f.originalPosition,p=f.axis;b.grid=typeof b.grid=="number"?[b.grid,b.grid]:b.grid;var t=Math.round((g.width-h.width)/(b.grid[0]||1))*(b.grid[0]||1);b=Math.round((g.height-h.height)/(b.grid[1]||1))*(b.grid[1]||1);if(/^(se|s|e)$/.test(p)){f.size.width=h.width+t;f.size.height=h.height+b}else if(/^(ne)$/.test(p)){f.size.width=h.width+t;f.size.height=h.height+b;f.position.top=n.top-b}else{if(/^(sw)$/.test(p)){f.size.width=h.width+t;f.size.height=h.height+b}else{f.size.width=h.width+
t;f.size.height=h.height+b;f.position.top=n.top-b}f.position.left=n.left-t}}});a.ui.plugin.add("resizable","animate",{stop:function(c,d){var b=d.options,f=a(this).data("resizable"),g=b.proportionallyResize,h=g&&/textarea/i.test(g.get(0).nodeName),n=h&&a.ui.hasScroll(g.get(0),"left")?0:f.sizeDiff.height;h={width:f.size.width-(h?0:f.sizeDiff.width),height:f.size.height-n};n=parseInt(f.element.css("left"),10)+(f.position.left-f.originalPosition.left)||null;var p=parseInt(f.element.css("top"),10)+(f.position.top-
f.originalPosition.top)||null;f.element.animate(a.extend(h,p&&n?{top:p,left:n}:{}),{duration:b.animateDuration||"slow",easing:b.animateEasing||"swing",step:function(){var t={width:parseInt(f.element.css("width"),10),height:parseInt(f.element.css("height"),10),top:parseInt(f.element.css("top"),10),left:parseInt(f.element.css("left"),10)};g&&g.css({width:t.width,height:t.height});f._updateCache(t);f.propagate("animate",c)}})}});a.ui.plugin.add("resizable","ghost",{start:function(c,d){var b=d.options,
f=a(this).data("resizable"),g=b.proportionallyResize,h=f.size;f.ghost=g?g.clone():f.element.clone();f.ghost.css({opacity:0.25,display:"block",position:"relative",height:h.height,width:h.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof b.ghost=="string"?b.ghost:"");f.ghost.appendTo(f.helper)},resize:function(){var c=a(this).data("resizable");c.ghost&&c.ghost.css({position:"relative",height:c.size.height,width:c.size.width})},stop:function(){var c=a(this).data("resizable");
c.ghost&&c.helper&&c.helper.get(0).removeChild(c.ghost.get(0))}});a.ui.plugin.add("resizable","alsoResize",{start:function(c,d){var b=d.options;a(this).data("resizable");var f=function(g){a(g).each(function(){a(this).data("resizable-alsoresize",{width:parseInt(a(this).width(),10),height:parseInt(a(this).height(),10),left:parseInt(a(this).css("left"),10),top:parseInt(a(this).css("top"),10)})})};if(typeof b.alsoResize=="object")if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];f(b.alsoResize)}else a.each(b.alsoResize,
function(g){f(g)});else f(b.alsoResize)},resize:function(c,d){var b=d.options,f=a(this).data("resizable"),g=f.originalSize,h=f.originalPosition,n={height:f.size.height-g.height||0,width:f.size.width-g.width||0,top:f.position.top-h.top||0,left:f.position.left-h.left||0},p=function(t,w){a(t).each(function(){var x=a(this).data("resizable-alsoresize"),E={};a.each((w&&w.length?w:["width","height","top","left"])||["width","height","top","left"],function(L,Q){var O=(x[Q]||0)+(n[Q]||0);if(O&&O>=0)E[Q]=O||
null});a(this).css(E)})};typeof b.alsoResize=="object"?a.each(b.alsoResize,function(t,w){p(t,w)}):p(b.alsoResize)},stop:function(){a(this).removeData("resizable-alsoresize-start")}})})(jQuery);
(function(a){var c={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"};a.widget("ui.dialog",{init:function(){var d=this,b=this.options,f=this.options.positionLayer||"absolute",g=typeof b.resizable=="string"?b.resizable:"n,e,s,w,se,sw,ne,nw",h=this.element.addClass("ui-dialog-content").wrap("<div/>").wrap("<div/>"),
n=this.uiDialogContainer=h.parent().addClass("ui-dialog-container").css({position:"relative",width:"100%",height:"100%"}),p=b.title||h.attr("title")||"";p=(this.uiDialogTitlebar=a('<div class="ui-dialog-titlebar"/>')).append('<span class="ui-dialog-title">'+p+"</span>").append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>').prependTo(n);f=(this.uiDialog=n.parent()).appendTo(document.body).hide().addClass("ui-dialog").addClass(b.dialogClass).addClass(h.attr("className")).removeClass("ui-dialog-content").css({position:f,
width:b.width,height:b.height,overflow:"hidden",zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(t){if(b.closeOnEscape){t.keyCode&&t.keyCode==27&&d.close();t.keyCode&&t.keyCode==27&&s2.tuifly.widget.dialog.divLayerClose()}}).mousedown(function(){d.moveToTop()});(this.uiDialogButtonPane=a("<div/>")).css({bottom:0}).addClass("ui-dialog-buttonpane").appendTo(f);this.uiDialogTitlebarClose=a(".ui-dialog-titlebar-close",p).hover(function(){a(this).addClass("ui-dialog-titlebar-close-hover")},
function(){a(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(t){t.stopPropagation()}).click(function(){d.close();s2.tuifly.widget.dialog.divLayerClose();return false});this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function(){a.ui.disableSelection(this)});if(a.fn.draggable){f.draggable({cancel:".ui-dialog-content",helper:b.dragHelper,handle:".ui-dialog-titlebar",start:function(){d.moveToTop();b.dragStart&&b.dragStart.apply(d.element[0],arguments)},drag:function(){b.drag&&
b.drag.apply(d.element[0],arguments)},stop:function(){b.dragStop&&b.dragStop.apply(d.element[0],arguments);a.ui.dialog.overlay.resize()}});b.draggable||f.draggable("disable")}if(a.fn.resizable){f.resizable({cancel:".ui-dialog-content",helper:b.resizeHelper,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth,minHeight:b.minHeight,start:function(){b.resizeStart&&b.resizeStart.apply(d.element[0],arguments)},resize:function(){b.autoResize&&d.size.apply(d);b.resize&&b.resize.apply(d.element[0],
arguments)},handles:g,stop:function(){b.autoResize&&d.size.apply(d);b.resizeStop&&b.resizeStop.apply(d.element[0],arguments);a.ui.dialog.overlay.resize()}});b.resizable||f.resizable("disable")}this.createButtons(b.buttons);this.isOpen=false;b.bgiframe&&a.fn.bgiframe&&f.bgiframe();b.autoOpen&&this.open()},setData:function(d,b){c[d]&&this.uiDialog.data(c[d],b);switch(d){case "buttons":this.createButtons(b);break;case "draggable":this.uiDialog.draggable(b?"enable":"disable");break;case "height":this.uiDialog.height(b);
break;case "position":this.position(b);break;case "resizable":typeof b=="string"&&this.uiDialog.data("handles.resizable",b);this.uiDialog.resizable(b?"enable":"disable");break;case "title":a(".ui-dialog-title",this.uiDialogTitlebar).text(b);break;case "width":this.uiDialog.width(b)}a.widget.prototype.setData.apply(this,arguments)},position:function(d){var b=a(window),f=a(document),g=0,h=f.scrollLeft(),n=g;if(!this.options.positionLayer||this.options.positionLayer==="absolute")g=f.scrollTop();if(a.inArray(d,
["center","top","right","bottom","left"])>=0)d=[d=="right"||d=="left"?d:"center",d=="top"||d=="bottom"?d:"middle"];if(d.constructor!=Array)d=["center","middle"];if(d[0].constructor==Number)h+=d[0];else switch(d[0]){case "left":h+=0;break;case "right":h+=b.width()-this.uiDialog.width();break;default:case "center":h+=(b.width()-this.uiDialog.width())/2}if(d[1].constructor==Number)g+=d[1];else switch(d[1]){case "top":g+=0;break;case "bottom":g+=b.height()-this.uiDialog.height();break;default:case "middle":g+=
(b.height()-this.uiDialog.height())/2}g=Math.max(g,n);this.uiDialog.css({top:g,left:h})},size:function(){var d=this.uiDialogContainer,b=this.uiDialogTitlebar,f=this.element,g=parseInt(f.css("margin-top"),10)+parseInt(f.css("margin-bottom"),10),h=parseInt(f.css("margin-left"),10)+parseInt(f.css("margin-right"),10);f.height(d.height()-b.outerHeight()-g);f.width(d.width()-h)},open:function(){if(!this.isOpen){this.overlay=this.options.modal?new a.ui.dialog.overlay(this):null;this.uiDialog.next().length>
0&&this.uiDialog.appendTo("body");this.position(this.options.position);this.uiDialog.show(this.options.show);this.options.autoResize&&this.size();this.moveToTop(true);var d={options:this.options};this.uiDialogTitlebarClose.focus();this.element.triggerHandler("dialogopen",[null,d],this.options.open);this.isOpen=true}},moveToTop:function(d){if(this.options.modal&&!d||!this.options.stack&&!this.options.modal)return this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus);
d=this.options.zIndex;this.overlay&&this.overlay.$el.css("z-index",++d);this.uiDialog.css("z-index",++d);this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus)},close:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide(this.options.hide);this.element.triggerHandler("dialogclose",[null,{options:this.options}],this.options.close);a.ui.dialog.overlay.resize();this.isOpen=false},destroy:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide();
this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content").hide().appendTo("body");this.uiDialog.remove()},createButtons:function(d){var b=this,f=false,g=this.uiDialogButtonPane;g.empty().hide();a.each(d,function(){return!(f=true)});if(f){g.show();a.each(d,function(h,n){a("<button/>").text(h).click(function(){n.apply(b.element[0],arguments)}).appendTo(g)})}}});a.extend(a.ui.dialog,{defaults:{autoOpen:true,autoResize:true,bgiframe:false,buttons:{},closeOnEscape:true,draggable:true,
height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:"center",resizable:true,stack:true,width:300,zIndex:1E3},overlay:function(d){this.$el=a.ui.dialog.overlay.create(d)}});a.extend(a.ui.dialog.overlay,{instances:[],events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(d){if(this.instances.length===0&&d.options.closeOnEscape){a(document).bind("keydown.dialog-overlay",function(f){f.keyCode&&f.keyCode==
27&&d.close();if(f.keyCode&&f.keyCode==27)try{s2.tuifly.widget.dialog.divLayerClose()}catch(g){}});a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize)}var b=a("<div/>").appendTo(document.body).addClass("ui-dialog-overlay").css(a.extend({borderWidth:0,margin:0,padding:0,position:"fixed",top:0,left:0,width:"100%",height:"100%"},d.options.overlay));if(a.browser.msie&&a.browser.version.substr(0,1)=="6")b=a("<div/>").appendTo(document.body).addClass("ui-dialog-overlay").css(a.extend({borderWidth:0,
margin:0,padding:0,position:"absolute",top:0,left:0,width:this.width(),height:this.height()},d.options.overlay));d.options.bgiframe&&a.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(d){this.instances.splice(a.inArray(this.instances,d),1);this.instances.length===0&&a([document,window]).unbind(".dialog-overlay");d.remove()},height:function(){if(a.browser.msie&&a.browser.version<7){var d=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return d<
Math.max(document.documentElement.offsetHeight,document.body.offsetHeight)?a(window).height()+"px":d+"px"}else return a(document).height()+"px"},width:function(){if(a.browser.msie&&a.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);return d<Math.max(document.documentElement.offsetWidth,document.body.offsetWidth)?a(window).width()+"px":d+"px"}else return a(document).width()+"px"},resize:function(){var d=a([]);a.each(a.ui.dialog.overlay.instances,function(){d=
d.add(this)});d.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}});a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
(function(a){function c(){this.debug=false;this._curInst=null;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._promptClass="ui-datepicker-prompt";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._selectedRangeClass="ui-datepicker-selected-range";this.regional=
[];this.regional[""]={clearText:"Clear",clearStatus:"Erase the current date",closeText:"Close",closeStatus:"Close without change",prevText:"&#x3c;Prev",prevStatus:"Show the previous month",nextText:"Next&#x3e;",nextStatus:"Show the next month",currentText:"Today",currentStatus:"Show the current month",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct",
"Nov","Dec"],monthStatus:"Show a different month",yearStatus:"Show a different year",weekHeader:"Wk",weekStatus:"Week of the year",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayStatus:"Set DD as first week day",dateStatus:"Select DD, M d",dateFormat:"mm/dd/yy",firstDay:0,initStatus:"Select a date",isRTL:false};this._defaults={showOn:"focus",showAnim:"show",
showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:true,changeYear:true,yearRange:"-10:+10",changeFirstDay:true,highlightWeek:false,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,
onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,stepMonths:1,rangeSelect:false,customRangeSelect:false,rangeSeparator:" - ",altField:"",altFormat:""};a.extend(this._defaults,this.regional[""]);this.dpDiv=a('<div id="'+this._mainDivId+'" style="display: none;"></div>')}function d(b,f){a.extend(b,f);for(var g in f)if(f[g]==null||f[g]==undefined)b[g]=f[g];return b}a.extend(c.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},setDefaults:function(b){d(this._defaults,
b||{});return this},_attachDatepicker:function(b,f){var g=null;for(attrName in this._defaults){var h=b.getAttribute("date:"+attrName);if(h){g=g||{};try{g[attrName]=eval(h)}catch(n){g[attrName]=h}}}h=b.nodeName.toLowerCase();var p=h=="div"||h=="span";if(!b.id)b.id="dp"+(new Date).getTime();var t=this._newInst(a(b),p);t.settings=a.extend({},f||{},g||{});if(h=="input")this._connectDatepicker(b,t);else p&&this._inlineDatepicker(b,t)},_newInst:function(b,f){return{id:b[0].id,input:b,selectedDay:0,selectedMonth:0,
selectedYear:0,drawMonth:0,drawYear:0,inline:f,dpDiv:!f?this.dpDiv:a('<div class="ui-datepicker-inline"></div>')}},_connectDatepicker:function(b,f){var g=a(b);if(!g.hasClass(this.markerClassName)){var h=this._get(f,"appendText"),n=this._get(f,"isRTL");if(h)g[n?"before":"after"]('<span class="'+this._appendClass+'">'+h+"</span>");h=this._get(f,"showOn");if(h=="focus"||h=="both")g.focus(this._showDatepicker);if(h=="button"||h=="both"){h=this._get(f,"buttonText");var p=this._get(f,"buttonImage");h=a(this._get(f,
"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:p,alt:h,title:h}):a('<button type="button"></button>').addClass(this._triggerClass).html(p==""?h:a("<img/>").attr({src:p,alt:h,title:h})));g[n?"before":"after"](h);h.click(function(){a.datepicker._datepickerShowing&&a.datepicker._lastInput==b?a.datepicker._hideDatepicker():a.datepicker._showDatepicker(b);return false})}g.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",
function(t,w,x){f.settings[w]=x}).bind("getData.datepicker",function(t,w){return this._get(f,w)});a.data(b,"datepicker",f)}},_inlineDatepicker:function(b,f){var g=a(b);if(!g.hasClass(this.markerClassName)){g.addClass(this.markerClassName).append(f.dpDiv).bind("setData.datepicker",function(h,n,p){f.settings[n]=p}).bind("getData.datepicker",function(h,n){return this._get(f,n)});a.data(b,"datepicker",f);this._setDate(f,this._getDefaultDate(f));this._updateDatepicker(f)}},_dialogDatepicker:function(b,
f,g,h,n){b=this._dialogInst;if(!b){b="dp"+(new Date).getTime();this._dialogInput=a('<input type="text" id="'+b+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);a("body").append(this._dialogInput);b=this._dialogInst=this._newInst(this._dialogInput,false);b.settings={};a.data(this._dialogInput[0],"datepicker",b)}d(b.settings,h||{});this._dialogInput.val(f);this._pos=n?n.length?n:[n.pageX,n.pageY]:null;if(!this._pos)this._pos=[(window.innerWidth||document.documentElement.clientWidth||
document.body.clientWidth)/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");b.settings.onSelect=g;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);a.blockUI&&a.blockUI(this.dpDiv);a.data(this._dialogInput[0],
"datepicker",b);return this},_destroyDatepicker:function(b){var f=b.nodeName.toLowerCase(),g=a(b);a.removeData(b,"datepicker");if(f=="input")g.siblings("."+this._appendClass).remove().end().siblings("."+this._triggerClass).remove().end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress);else if(f=="div"||f=="span")g.removeClass(this.markerClassName).empty()},_enableDatepicker:function(b){b.disabled=false;a(b).siblings("button."+
this._triggerClass).each(function(){this.disabled=false}).end().siblings("img."+this._triggerClass).css({opacity:"1.0",cursor:""});this._disabledInputs=a.map(this._disabledInputs,function(f){return f==b?null:f})},_disableDatepicker:function(b){b.disabled=true;a(b).siblings("button."+this._triggerClass).each(function(){this.disabled=true}).end().siblings("img."+this._triggerClass).css({opacity:"0.5",cursor:"default"});this._disabledInputs=a.map(this._disabledInputs,function(f){return f==b?null:f});
this._disabledInputs[this._disabledInputs.length]=b},_isDisabledDatepicker:function(b){if(!b)return false;for(var f=0;f<this._disabledInputs.length;f++)if(this._disabledInputs[f]==b)return true;return false},_changeDatepicker:function(b,f,g){var h=f||{};if(typeof f=="string"){h={};h[f]=g}if(inst=a.data(b,"datepicker")){d(inst.settings,h);this._updateDatepicker(inst)}},_setDateDatepicker:function(b,f,g){if(b=a.data(b,"datepicker")){this._setDate(b,f,g);this._updateDatepicker(b)}},_getDateDatepicker:function(b){(b=
a.data(b,"datepicker"))&&this._setDateFromField(b);return b?this._getDate(b):null},_doKeyDown:function(b){var f=a.data(b.target,"datepicker"),g=true;if(a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker(null,"");break;case 13:a.datepicker._selectDay(b.target,f.selectedMonth,f.selectedYear,a("td.ui-datepicker-days-cell-over",f.dpDiv)[0]);return false;case 27:a.datepicker._hideDatepicker(null,a.datepicker._get(f,"duration"));break;case 33:a.datepicker._adjustDate(b.target,
b.ctrlKey?-1:-a.datepicker._get(f,"stepMonths"),b.ctrlKey?"Y":"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+1:+a.datepicker._get(f,"stepMonths"),b.ctrlKey?"Y":"M");break;case 35:b.ctrlKey&&a.datepicker._clearDate(b.target);break;case 36:b.ctrlKey&&a.datepicker._gotoToday(b.target);break;case 37:b.ctrlKey&&a.datepicker._adjustDate(b.target,-1,"D");break;case 38:b.ctrlKey&&a.datepicker._adjustDate(b.target,-7,"D");break;case 39:b.ctrlKey&&a.datepicker._adjustDate(b.target,+1,"D");
break;case 40:b.ctrlKey&&a.datepicker._adjustDate(b.target,+7,"D");break;default:g=false}else if(b.keyCode==36&&b.ctrlKey)a.datepicker._showDatepicker(this);else g=false;if(g){b.preventDefault();b.stopPropagation()}},_doKeyPress:function(b){var f=a.data(b.target,"datepicker");f=a.datepicker._possibleChars(a.datepicker._get(f,"dateFormat"));var g=String.fromCharCode(b.charCode==undefined?b.keyCode:b.charCode);return b.ctrlKey||g<" "||!f||f.indexOf(g)>-1},_showDatepicker:function(b){b=b.target||b;if(b.nodeName.toLowerCase()!=
"input")b=a("input",b.parentNode)[0];if(!(a.datepicker._isDisabledDatepicker(b)||a.datepicker._lastInput==b)){var f=a.data(b,"datepicker"),g=a.datepicker._get(f,"beforeShow");d(f.settings,g?g.apply(b,[b,f]):{});a.datepicker._hideDatepicker(null,"");a.datepicker._lastInput=b;a.datepicker._setDateFromField(f);if(a.datepicker._inDialog)b.value="";if(!a.datepicker._pos){a.datepicker._pos=a.datepicker._findPos(b);a.datepicker._pos[1]+=b.offsetHeight}var h=false;a(b).parents().each(function(){h|=a(this).css("position")==
"fixed";return!h});if(h&&a.browser.opera){a.datepicker._pos[0]-=document.documentElement.scrollLeft;a.datepicker._pos[1]-=document.documentElement.scrollTop}b={};b=a.datepicker._get(f,"customRangeSelect")?{left:a("#marketDate_1").offset().left-6,top:a.datepicker._pos[1]-1}:{left:a.datepicker._pos[0],top:a.datepicker._pos[1]};a.datepicker._pos=null;f.rangeStart=null;f.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});a.datepicker._updateDatepicker(f);f.dpDiv.width(a.datepicker._getNumberOfMonths(f)[1]*
a(".ui-datepicker",f.dpDiv[0])[0].offsetWidth);b=a.datepicker._checkOffset(f,b,h);f.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":h?"fixed":"absolute",display:"none",left:b.left+"px",top:b.top-25+"px"});if(!f.inline){b=a.datepicker._get(f,"showAnim")||"show";g=a.datepicker._get(f,"duration");var n=function(){a.datepicker._datepickerShowing=true};a.effects&&a.effects[b]?f.dpDiv.show(b,a.datepicker._get(f,"showOptions"),g,n):f.dpDiv[b](g,n);g==""&&n();f.input[0].type!="hidden"&&f.input[0].focus();
a.datepicker._curInst=f}if(a.datepicker._get(f,"customRangeSelect")){a.datepicker.selectedDateRangeStart=a('.ui-datepicker td[data-date="'+a("#marketDate_1 input.datepickerForSelect").val()+'"]').data("date");a.datepicker.selectedDateRangeEnd=a('.ui-datepicker td[data-date="'+a("#marketDate_2 input.datepickerForSelect").val()+'"]').data("date");a(".ui-datepicker td").removeClass(a.datepicker._currentClass);if(s2.tuifly.helper.search.getSearchParam("direction")=="RoundTrip"){a(".qTo").show();a(".qArrivalDate").show()}else{a(".qTo").hide();
a(".qArrivalDate").hide()}a.datepicker._updateRangeSelection()}}},_updateDurationAndRange:function(b,f){if(s2.tuifly.helper.search.getSearchParam("direction")=="OneWay")f=b;if(!b&&!f){b=a.datepicker.selectedDateRangeStart;f=a.datepicker.selectedDateRangeEnd;s2.tuifly.helper.search.getSearchParam("direction")=="OneWay"?a(".qPeriod").hide():a(".qPeriod").show()}!b||!f?a(".qReisedauer").text(0):a(".qReisedauer").text(parseInt((Date.parseExact(f,"dd.MM.yyyy")-Date.parseExact(b,"dd.MM.yyyy"))/864E5+1,
10));var g=a("#dateButton");if(b&&f){g.removeClass("qNotClickable");g.removeClass("showButton");g.addClass("bookingButton");g.addClass("qClickable")}else{g.removeClass("qClickable");g.removeClass("bookingButton");g.addClass("showButton");g.addClass("qNotClickable")}a(".qDepartureDate").text(b);a(".qArrivalDate").text(f)},_updateDatepicker:function(b){b.dpDiv.width();b.dpDiv.height();b.dpDiv.empty().append(this._generateDatepicker(b));var f=this._getNumberOfMonths(b);b.dpDiv[(f[0]!=1||f[1]!=1?"add":
"remove")+"Class"]("ui-datepicker-multi");b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");b.input&&b.input[0].type!="hidden"&&a(b.input[0]).focus();if(a.datepicker._get(b,"customRangeSelect")){if(s2.tuifly.helper.search.getSearchParam("direction")=="RoundTrip"){a(".qTo").show();a(".qArrivalDate").show()}else{a(".qTo").hide();a(".qArrivalDate").hide()}a.datepicker._updateRangeSelection()}},_checkOffset:function(b,f,g){var h=b.input?this._findPos(b.input[0]):null,n=window.innerWidth||
document.documentElement.clientWidth,p=document.documentElement.scrollLeft||document.body.scrollLeft,t=document.documentElement.scrollTop||document.body.scrollTop;if(this._get(b,"isRTL")||f.left+b.dpDiv.width()-p>n)f.left=Math.max(g?0:p,h[0]+(b.input?b.input.width():0)-(g?p:0)-b.dpDiv.width()-(g&&a.browser.opera?document.documentElement.scrollLeft:0));else f.left-=g?p:0;b.dpDiv.height();f.top-=g?t:0;return f},_findPos:function(b){for(;b&&(b.type=="hidden"||b.nodeType!=1);)b=b.nextSibling;b=a(b).offset();
return[b.left,b.top]},_hideDatepicker:function(b,f){var g=this._curInst;if(g){this._get(g,"rangeSelect")&&this._stayOpen&&this._selectDate("#"+g.id,this._formatDate(g,g.currentDay,g.currentMonth,g.currentYear));this._stayOpen=false;if(this._datepickerShowing){f=f!=null?f:this._get(g,"duration");var h=this._get(g,"showAnim"),n=function(){a.datepicker._tidyDialog(g)};f!=""&&a.effects&&a.effects[h]?g.dpDiv.hide(h,a.datepicker._get(g,"showOptions"),f,n):g.dpDiv[f==""?"hide":h=="slideDown"?"slideUp":h==
"fadeIn"?"fadeOut":"hide"](f,n);f==""&&this._tidyDialog(g);if(h=this._get(g,"onClose"))h.apply(g.input?g.input[0]:null,[this._getDate(g),g]);this._datepickerShowing=false;this._lastInput=null;g.settings.prompt=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(a.blockUI){a.unblockUI();a("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null}},_customChooseDate:function(b){if(!a(b).hasClass("qNotClickable")){var f=0;_.each(a.datepicker.inputs.slice(0,
2),function(g){var h=a.data(g,"datepicker");h=a.datepicker._get(h,"onSelect");var n="";n=f++===0?a.datepicker.selectedDateRangeStart:a.datepicker.selectedDateRangeEnd;a(g).val(n);h.apply(g,[n])});a.datepicker._hideDatepicker()}},_tidyDialog:function(b){b.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker");a("."+this._promptClass,b.dpDiv).remove()},_checkExternalClick:function(b){if(a.datepicker._curInst){b=a(b.target);b.parents("#"+a.datepicker._mainDivId).length==0&&!b.hasClass(a.datepicker.markerClassName)&&
!b.hasClass(a.datepicker._triggerClass)&&a.datepicker._datepickerShowing&&!(a.datepicker._inDialog&&a.blockUI)&&a.datepicker._hideDatepicker(null,"")}},_adjustDate:function(b,f,g){b=a(b);b=a.data(b[0],"datepicker");this._adjustInstDate(b,f,g);this._updateDatepicker(b)},_gotoToday:function(b){b=a(b);var f=a.data(b[0],"datepicker");if(this._get(f,"gotoCurrent")&&f.currentDay){f.selectedDay=f.currentDay;f.drawMonth=f.selectedMonth=f.currentMonth;f.drawYear=f.selectedYear=f.currentYear}else{var g=new Date;
f.selectedDay=g.getDate();f.drawMonth=f.selectedMonth=g.getMonth();f.drawYear=f.selectedYear=g.getFullYear()}this._adjustDate(b);this._notifyChange(f)},_selectMonthYear:function(b,f,g){b=a(b);var h=a.data(b[0],"datepicker");h._selectingMonthYear=false;h[g=="M"?"drawMonth":"drawYear"]=f.options[f.selectedIndex].value-0;this._adjustDate(b);this._notifyChange(h)},_clickMonthYear:function(b){b=a(b);b=a.data(b[0],"datepicker");b.input&&b._selectingMonthYear&&!a.browser.msie&&b.input[0].focus();b._selectingMonthYear=
!b._selectingMonthYear},_changeFirstDay:function(b,f){var g=a(b);g=a.data(g[0],"datepicker");g.settings.firstDay=f;this._updateDatepicker(g)},_selectDay:function(b,f,g,h){if(!a(h).hasClass(this._unselectableClass)){var n=a(b);n=a.data(n[0],"datepicker");var p=this._get(n,"rangeSelect"),t=this._get(n,"customRangeSelect");if(t){this._stayOpen=true;if(a.datepicker.selectedDateRangeEnd||!a.datepicker.selectedDateRangeStart&&!a.datepicker.selectedDateRangeEnd){a(".ui-datepicker td").removeClass(this._selectedRangeClass);
a(h).addClass(this._selectedRangeClass);a.datepicker.selectedDateRangeStart=a(h).data("date");a.datepicker.selectedDateRangeEnd=s2.tuifly.helper.search.getSearchParam("direction")=="OneWay"?a.datepicker.selectedDateRangeStart:"";a.datepicker._updateDurationAndRange(a(h).data("date"),"")}else{a.datepicker.selectedDateRangeEnd=a(h).data("date");a.datepicker._updateRangeSelection()}}else{n.selectedDay=n.currentDay=a("a",h).html();n.selectedMonth=n.currentMonth=f;n.selectedYear=n.currentYear=g;if(this._stayOpen)n.endDay=
n.endMonth=n.endYear=null;else if(p){n.endDay=n.currentDay;n.endMonth=n.currentMonth;n.endYear=n.currentYear}this._selectDate(b,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear));if(!t)if(this._stayOpen){n.rangeStart=this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay));this._updateDatepicker(n)}else if(p){n.selectedDay=n.currentDay=n.rangeStart.getDate();n.selectedMonth=n.currentMonth=n.rangeStart.getMonth();n.selectedYear=n.currentYear=n.rangeStart.getFullYear();
n.rangeStart=null;n.inline&&this._updateDatepicker(n)}}}},_updateRangeSelection:function(){if(a.datepicker.selectedDateRangeStart||a.datepicker.selectedDateRangeEnd){var b=Date.parseExact(a.datepicker.selectedDateRangeStart,"dd.MM.yyyy"),f=Date.parseExact(a.datepicker.selectedDateRangeEnd,"dd.MM.yyyy");if(b&&f&&b>f){f=a.datepicker.selectedDateRangeStart;a.datepicker.selectedDateRangeStart=a.datepicker.selectedDateRangeEnd;a.datepicker.selectedDateRangeEnd=f;Date.parseExact(a.datepicker.selectedDateRangeStart,
"dd.MM.yyyy");f=Date.parseExact(a.datepicker.selectedDateRangeEnd,"dd.MM.yyyy")}b=Date.parseExact(a.datepicker.selectedDateRangeStart,"dd.MM.yyyy");if(s2.tuifly.helper.search.getSearchParam("direction")=="OneWay")f=Date.parseExact(a.datepicker.selectedDateRangeStart,"dd.MM.yyyy");var g=a(".ui-datepicker td");g.removeClass(a.datepicker._selectedRangeClass);for(g.removeClass(a.datepicker._currentClass);f-b>=0;){JooseX.Culture.Factory.get().majorIdentifier()=="de"||JooseX.Culture.Factory.get().majorIdentifier()==
"es"?a('.ui-datepicker td[data-date="'+b.toString("dd.MM.yyyy")+'"]').not(".ui-datepicker-unselectable").addClass(a.datepicker._selectedRangeClass):a('.ui-datepicker td[data-date="'+b.toString("dd/MM/yyyy")+'"]').not(".ui-datepicker-unselectable").addClass(a.datepicker._selectedRangeClass);b=b.add(1).days()}a.datepicker._updateDurationAndRange()}},_clearDate:function(b){b=a(b);var f=a.data(b[0],"datepicker");if(!this._get(f,"mandatory")){this._stayOpen=false;f.endDay=f.endMonth=f.endYear=f.rangeStart=
null;this._selectDate(b,"")}},_selectDate:function(b,f){var g=a(b);g=a.data(g[0],"datepicker");f=f!=null?f:this._formatDate(g);if(this._get(g,"rangeSelect")&&f)f=(g.rangeStart?this._formatDate(g,g.rangeStart):f)+this._get(g,"rangeSeparator")+f;g.input&&g.input.val(f);this._updateAlternate(g);var h=this._get(g,"onSelect");if(h)h.apply(g.input?g.input[0]:null,[f,g]);else g.input&&g.input.trigger("change");if(g.inline)this._updateDatepicker(g);else if(!this._stayOpen){this._hideDatepicker(null,this._get(g,
"duration"));this._lastInput=g.input[0];typeof g.input[0]!="object"&&g.input[0].focus();this._lastInput=null}},_updateAlternate:function(b){var f=this._get(b,"altField");if(f){var g=this._get(b,"altFormat"),h=this._getDate(b);dateStr=h&&(a.browser.safari&&typeof h=="object"&&h.length||h.constructor&&h.constructor.toString().match(/\Array\(\)/))?!h[0]&&!h[1]?"":this.formatDate(g,h[0],this._getFormatConfig(b))+this._get(b,"rangeSeparator")+this.formatDate(g,h[1]||h[0],this._getFormatConfig(b)):this.formatDate(g,
h,this._getFormatConfig(b));a(f).each(function(){a(this).val(dateStr)})}},noWeekends:function(b){b=b.getDay();return[b>0&&b<6,""]},iso8601Week:function(b){b=new Date(b.getFullYear(),b.getMonth(),b.getDate());var f=new Date(b.getFullYear(),0,4),g=f.getDay()||7;f.setDate(f.getDate()+1-g);if(g<4&&b<f){b.setDate(b.getDate()-3);return a.datepicker.iso8601Week(b)}else if(b>new Date(b.getFullYear(),11,28)){g=(new Date(b.getFullYear()+1,0,4)).getDay()||7;if(g>4&&(b.getDay()||7)<g-3){b.setDate(b.getDate()+
3);return a.datepicker.iso8601Week(b)}}return Math.floor((b-f)/864E5/7)+1},dateStatus:function(b,f){return a.datepicker.formatDate(a.datepicker._get(f,"dateStatus"),b,a.datepicker._getFormatConfig(f))},parseDate:function(b,f,g){if(b==null||f==null)throw"Invalid arguments";f=typeof f=="object"?f.toString():f+"";if(f=="")return null;var h=(g?g.shortYearCutoff:null)||this._defaults.shortYearCutoff,n=(g?g.dayNamesShort:null)||this._defaults.dayNamesShort,p=(g?g.dayNames:null)||this._defaults.dayNames,
t=(g?g.monthNamesShort:null)||this._defaults.monthNamesShort;g=(g?g.monthNames:null)||this._defaults.monthNames;for(var w=-1,x=-1,E=-1,L=false,Q=function(ua){(ua=C+1<b.length&&b.charAt(C+1)==ua)&&C++;return ua},O=function(ua){Q(ua);for(var fa=ua=ua=="@"?14:ua=="y"?4:2,N=0;fa>0&&K<f.length&&f.charAt(K)>="0"&&f.charAt(K)<="9";){N=N*10+(f.charAt(K++)-0);fa--}if(fa==ua)throw"Missing number at position "+K;return N},I=function(ua,fa,N){ua=Q(ua)?N:fa;for(N=fa=0;N<ua.length;N++)fa=Math.max(fa,ua[N].length);
N="";for(var q=K;fa>0&&K<f.length;){N+=f.charAt(K++);for(var ya=0;ya<ua.length;ya++)if(N==ua[ya])return ya+1;fa--}throw"Unknown name at position "+q;},ba=function(){if(f.charAt(K)!=b.charAt(C))throw"Unexpected literal at position "+K;K++},K=0,C=0;C<b.length;C++)if(L)if(b.charAt(C)=="'"&&!Q("'"))L=false;else ba();else switch(b.charAt(C)){case "d":E=O("d");break;case "D":I("D",n,p);break;case "m":x=O("m");break;case "M":x=I("M",t,g);break;case "y":w=O("y");break;case "@":var ka=new Date(O("@"));w=ka.getFullYear();
x=ka.getMonth()+1;E=ka.getDate();break;case "'":if(Q("'"))ba();else L=true;break;default:ba()}if(w<100)w+=(new Date).getFullYear()-(new Date).getFullYear()%100+(w<=h?0:-100);ka=this._daylightSavingAdjust(new Date(w,x-1,E));if(ka.getFullYear()!=w||ka.getMonth()+1!=x||ka.getDate()!=E)throw"Invalid date";return ka},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",
W3C:"yy-mm-dd",formatDate:function(b,f,g){if(!f)return"";var h=(g?g.dayNamesShort:null)||this._defaults.dayNamesShort,n=(g?g.dayNames:null)||this._defaults.dayNames,p=(g?g.monthNamesShort:null)||this._defaults.monthNamesShort;g=(g?g.monthNames:null)||this._defaults.monthNames;var t=function(O){(O=Q+1<b.length&&b.charAt(Q+1)==O)&&Q++;return O},w=function(O,I){return(t(O)&&I<10?"0":"")+I},x=function(O,I,ba,K){return t(O)?K[I]:ba[I]},E="",L=false;if(f)for(var Q=0;Q<b.length;Q++)if(L)if(b.charAt(Q)==
"'"&&!t("'"))L=false;else E+=b.charAt(Q);else switch(b.charAt(Q)){case "d":E+=w("d",f.getDate());break;case "D":E+=x("D",f.getDay(),h,n);break;case "m":E+=w("m",f.getMonth()+1);break;case "M":E+=x("M",f.getMonth(),p,g);break;case "y":E+=t("y")?f.getFullYear():(f.getYear()%100<10?"0":"")+f.getYear()%100;break;case "@":E+=f.getTime();break;case "'":if(t("'"))E+="'";else L=true;break;default:E+=b.charAt(Q)}return E},_possibleChars:function(b){for(var f="",g=false,h=0;h<b.length;h++)if(g)if(b.charAt(h)==
"'"&&!lookAhead("'"))g=false;else f+=b.charAt(h);else switch(b.charAt(h)){case "d":case "m":case "y":case "@":f+="0123456789";break;case "D":case "M":return null;case "'":if(lookAhead("'"))f+="'";else g=true;break;default:f+=b.charAt(h)}return f},_get:function(b,f){return b.settings[f]!==undefined?b.settings[f]:this._defaults[f]},_setDateFromField:function(b){var f=this._get(b,"dateFormat"),g=b.input?b.input.val().split(this._get(b,"rangeSeparator")):null;b.endDay=b.endMonth=b.endYear=null;var h=
defaultDate=this._getDefaultDate(b);if(g.length>0){var n=this._getFormatConfig(b);if(g.length>1){h=this.parseDate(f,g[1],n)||defaultDate;b.endDay=h.getDate();b.endMonth=h.getMonth();b.endYear=h.getFullYear()}try{h=this.parseDate(f,g[0],n)||defaultDate}catch(p){this.log(p);h=defaultDate}}b.selectedDay=h.getDate();b.drawMonth=b.selectedMonth=h.getMonth();b.drawYear=b.selectedYear=h.getFullYear();b.currentDay=g[0]?h.getDate():0;b.currentMonth=g[0]?h.getMonth():0;b.currentYear=g[0]?h.getFullYear():0;
this._adjustInstDate(b)},_getDefaultDate:function(b){var f=this._determineDate(this._get(b,"defaultDate"),new Date),g=this._getMinMaxDate(b,"min",true);b=this._getMinMaxDate(b,"max");f=g&&f<g?g:f;return f=b&&f>b?b:f},_determineDate:function(b,f){var g=function(n){var p=new Date;p.setDate(p.getDate()+n);return p},h=function(n,p){var t=new Date,w=t.getFullYear(),x=t.getMonth();t=t.getDate();for(var E=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,L=E.exec(n);L;){switch(L[2]||"d"){case "d":case "D":t+=L[1]-0;
break;case "w":case "W":t+=L[1]*7;break;case "m":case "M":x+=L[1]-0;t=Math.min(t,p(w,x));break;case "y":case "Y":w+=L[1]-0;t=Math.min(t,p(w,x))}L=E.exec(n)}return new Date(w,x,t)};if(b=(b=b==null?f:typeof b=="string"?h(b,this._getDaysInMonth):typeof b=="number"?isNaN(b)?f:g(b):b)&&b.toString()=="Invalid Date"?f:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(b){if(!b)return null;b.setHours(b.getHours()>12?b.getHours()+
2:0);return b},_setDate:function(b,f,g){var h=!f;f=this._determineDate(f,new Date);b.selectedDay=b.currentDay=f.getDate();b.drawMonth=b.selectedMonth=b.currentMonth=f.getMonth();b.drawYear=b.selectedYear=b.currentYear=f.getFullYear();if(this._get(b,"rangeSelect"))if(g){g=this._determineDate(g,null);b.endDay=g.getDate();b.endMonth=g.getMonth();b.endYear=g.getFullYear()}else{b.endDay=b.currentDay;b.endMonth=b.currentMonth;b.endYear=b.currentYear}this._adjustInstDate(b);if(b.input)b.input.val(h?"":this._formatDate(b)+
(!this._get(b,"rangeSelect")?"":this._get(b,"rangeSeparator")+this._formatDate(b,b.endDay,b.endMonth,b.endYear)))},_getDate:function(b){var f=!b.currentYear||b.input&&b.input.val()==""?null:this._daylightSavingAdjust(new Date(b.currentYear,b.currentMonth,b.currentDay));return this._get(b,"rangeSelect")?[b.rangeStart||f,!b.endYear?b.rangeStart||f:this._daylightSavingAdjust(new Date(b.endYear,b.endMonth,b.endDay))]:f},_generateDatepicker:function(b){var f=new Date;f=this._daylightSavingAdjust(new Date(f.getFullYear(),
f.getMonth(),f.getDate()));var g=this._get(b,"showStatus"),h=this._get(b,"isRTL"),n=this._get(b,"mandatory")?"":'<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate(\'#'+b.id+"');\""+(g?this._addStatus(b,this._get(b,"clearStatus")||"&#xa0;"):"")+">"+this._get(b,"clearText")+"</a></div>",p="",t="";if(this._get(b,"customRangeSelect"))t='<span class="qDepartureDate date"></span> <span class="qTo to" style="display:none;"></span> <span class="qArrivalDate date" style="display:none;"></span><div class="calIcon">&#xa0;</div>';
else if(b.id==="datePickerFlight")p=this._get(b,"flightHeadlineText");else if(b.id==="datePickerReturn")p=this._get(b,"returnHeadlineText");n='<div class="ui-datepicker-control">'+t+'<strong class="ui-datepicker-headline">'+p+"</strong>"+(h?"":n)+'<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"'+(g?this._addStatus(b,this._get(b,"closeStatus")||"&#xa0;"):"")+">"+this._get(b,"closeText")+"</a></div>"+(h?n:"")+"</div>";var w=this._get(b,"prompt");p=this._get(b,"closeAtTop");
var x=this._get(b,"hideIfNoPrevNext"),E=this._get(b,"navigationAsDateFormat");t=this._getNumberOfMonths(b);var L=this._get(b,"stepMonths"),Q=t[0]!=1||t[1]!=1,O=this._daylightSavingAdjust(!b.currentDay?new Date(9999,9,9):new Date(b.currentYear,b.currentMonth,b.currentDay)),I=this._getMinMaxDate(b,"min",false),ba=this._getMinMaxDate(b,"max"),K=b.drawMonth,C=b.drawYear;if(ba){var ka=this._daylightSavingAdjust(new Date(ba.getFullYear(),ba.getMonth()-t[1]+1,ba.getDate()));for(ka=I&&ka<I?I:ka;this._daylightSavingAdjust(new Date(C,
K,1))>ka;){K--;if(K<0){K=11;C--}}}ka=this._get(b,"prevText");ka=!E?ka:this.formatDate(ka,this._daylightSavingAdjust(new Date(C,K-L,1)),this._getFormatConfig(b));ka='<div class="ui-datepicker-prev">'+(this._canAdjustMonth(b,-1,C,K)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+b.id+"', -"+L+", 'M');\""+(g?this._addStatus(b,this._get(b,"prevStatus")||"&#xa0;"):"")+">"+ka+"</a>":x?"":"<label>"+ka+"</label>")+"</div>";var ua=this._get(b,"nextText");ua=!E?ua:this.formatDate(ua,this._daylightSavingAdjust(new Date(C,
K+L,1)),this._getFormatConfig(b));x='<div class="ui-datepicker-next">'+(this._canAdjustMonth(b,+1,C,K)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+b.id+"', +"+L+", 'M');\""+(g?this._addStatus(b,this._get(b,"nextStatus")||"&#xa0;"):"")+">"+ua+"</a>":x?"":"<label>"+ua+"</label>")+"</div>";L=this._get(b,"currentText");L=!E?L:this.formatDate(L,f,this._getFormatConfig(b));h=(w?'<div class="'+this._promptClass+'">'+w+"</div>":"")+(p&&!b.inline?n:"")+'<div class="ui-datepicker-links">'+(h?x:ka)+(this._isInRange(b,
this._get(b,"gotoCurrent")&&b.currentDay?O:f)?'<div class="ui-datepicker-current"><a onclick="jQuery.datepicker._gotoToday(\'#'+b.id+"');\""+(g?this._addStatus(b,this._get(b,"currentStatus")||"&#xa0;"):"")+">"+L+"</a></div>":"")+(h?ka:x)+"</div>";w=this._get(b,"firstDay");E=this._get(b,"changeFirstDay");x=this._get(b,"dayNames");L=this._get(b,"dayNamesShort");ka=this._get(b,"dayNamesMin");ua=this._get(b,"monthNames");for(var fa=this._get(b,"beforeShowDay"),N=this._get(b,"highlightWeek"),q=this._get(b,
"showOtherMonths"),ya=this._get(b,"showWeeks"),la=this._get(b,"calculateWeek")||this.iso8601Week,z=g?this._get(b,"dayStatus")||"&#xa0;":"",D=this._get(b,"statusForDate")||this.dateStatus,H=b.endDay?this._daylightSavingAdjust(new Date(b.endYear,b.endMonth,b.endDay)):O,M=0,Z=0;Z<t[0];Z++)for(var ha=0;ha<t[1];ha++){var qa=this._daylightSavingAdjust(new Date(C,K,b.selectedDay));h+='<div class="ui-datepicker-one-month'+(ha==0?" ui-datepicker-new-row":"")+'">'+this._generateMonthYearHeader(b,K,C,I,ba,qa,
Z>0||ha>0,g,ua)+'<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead><tr class="ui-datepicker-title-row">'+(ya?"<td>"+this._get(b,"weekHeader")+"</td>":"");for(var Ba=0;Ba<7;Ba++){var Fa=(Ba+w)%7,ta=z.indexOf("DD")>-1?z.replace(/DD/,x[Fa]):z.replace(/D/,L[Fa]);h+="<td"+((Ba+w+6)%7>=5?' class="ui-datepicker-week-end-cell"':"")+">"+(!E?"<span":"<a onclick=\"jQuery.datepicker._changeFirstDay('#"+b.id+"', "+Fa+');"')+(g?this._addStatus(b,ta):"")+' title="'+x[Fa]+'">'+ka[Fa]+(E?"</a>":
"</span>")+"</td>"}h+="</tr></thead><tbody>";Fa=this._getDaysInMonth(C,K);if(C==b.selectedYear&&K==b.selectedMonth)b.selectedDay=Math.min(b.selectedDay,Fa);Ba=(this._getFirstDayOfMonth(C,K)-w+7)%7;Fa=Q?6:Math.ceil((Ba+Fa)/7);ta=this._daylightSavingAdjust(new Date(C,K,1-Ba));for(var Na=0;Na<Fa;Na++){h+='<tr class="ui-datepicker-days-row">'+(ya?'<td class="ui-datepicker-week-col">'+la(ta)+"</td>":"");for(Ba=0;Ba<7;Ba++){M++;var sa=fa?fa.apply(b.input?b.input[0]:null,[ta]):[true,""],ja=ta.getMonth()!=
K,P=ja||!sa[0]||I&&ta<I||ba&&ta>ba,Y=ta.getMonth(),ea=ta.getFullYear(),ia=ta.getMonth()!=K;h+='<td data-date="'+this._formatDate(b,ta.getDate(),ta.getMonth(),ta.getFullYear())+'" data-position="'+M+'" class="ui-datepicker-days-cell'+((Ba+w+6)%7>=5?" ui-datepicker-week-end-cell":"")+(ia?" ui-datepicker-otherMonth":"")+(ta.getTime()==qa.getTime()&&K==b.selectedMonth?" ui-datepicker-days-cell-over":"")+(P?" "+this._unselectableClass:"")+(ja&&!q?"":" "+sa[1]+(ta.getTime()>=O.getTime()&&ta.getTime()<=
H.getTime()?" "+this._currentClass:"")+(ta.getTime()==f.getTime()?" ui-datepicker-today":""))+'"'+((!ja||q)&&sa[2]?' title="'+sa[2]+'"':"")+(P?N?" onmouseover=\"jQuery(this).parent().addClass('ui-datepicker-week-over');\" onmouseout=\"jQuery(this).parent().removeClass('ui-datepicker-week-over');\"":"":" onmouseover=\"jQuery(this).addClass('ui-datepicker-days-cell-over')"+(N?".parent().addClass('ui-datepicker-week-over')":"")+";"+(!g||ja&&!q?"":"jQuery('#ui-datepicker-status-"+b.id+"').html('"+(D.apply(b.input?
b.input[0]:null,[ta,b])||"&#xa0;")+"');")+"\" onmouseout=\"jQuery(this).removeClass('ui-datepicker-days-cell-over')"+(N?".parent().removeClass('ui-datepicker-week-over')":"")+";"+(!g||ja&&!q?"":"jQuery('#ui-datepicker-status-"+b.id+"').html('&#xa0;');")+'" onclick="jQuery.datepicker._selectDay(\'#'+b.id+"',"+Y+","+ea+', this);"')+">"+(ja?q?ta.getDate():"&#xa0;":P?ta.getDate():"<a>"+ta.getDate()+"</a>")+"</td>";ta.setDate(ta.getDate()+1);ta=this._daylightSavingAdjust(ta)}h+="</tr>"}K++;if(K>11){K=
0;C++}h+="</tbody></table></div>"}h+=(g?'<div style="clear: both;"></div><div id="ui-datepicker-status-'+b.id+'" class="ui-datepicker-status">'+(this._get(b,"initStatus")||"&#xa0;")+"</div>":"")+(!p&&!b.inline?n:"")+(a.datepicker._get(b,"customRangeSelect")?'<div class="buttonbar clear"><p class="period qPeriod">'+s2.tuifly.util.culture.get("cs-period")+':&nbsp;<span class="qReisedauer"></span>&nbsp;'+s2.tuifly.util.culture.get("cs-days")+'</p><a onclick="jQuery.datepicker._customChooseDate(this);" id="dateButton" class="showButton qNotClickable"><span>'+
s2.tuifly.util.culture.get("cs-apply")+"</span></a></div>":"")+'<div style="clear: both;"></div>';return h},_generateMonthYearHeader:function(b,f,g,h,n,p,t,w,x){h=b.rangeStart&&h&&p<h?p:h;p='<div class="ui-datepicker-header">';if(t||!this._get(b,"changeMonth"))p+=x[f]+"&#xa0;";else{var E=h&&h.getFullYear()==g,L=n&&n.getFullYear()==g;p+='<select class="ui-datepicker-new-month" onchange="jQuery.datepicker._selectMonthYear(\'#'+b.id+"', this, 'M');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+b.id+
"');\""+(w?this._addStatus(b,this._get(b,"monthStatus")||"&#xa0;"):"")+">";for(var Q=0;Q<12;Q++)if((!E||Q>=h.getMonth())&&(!L||Q<=n.getMonth()))p+='<option value="'+Q+'"'+(Q==f?' selected="selected"':"")+">"+x[Q]+"</option>";p+="</select>"}if(t||!this._get(b,"changeYear"))p+=g;else{f=this._get(b,"yearRange").split(":");x=t=0;if(f.length!=2){t=g-10;x=g+10}else if(f[0].charAt(0)=="+"||f[0].charAt(0)=="-"){t=x=(new Date).getFullYear();t+=parseInt(f[0],10);x+=parseInt(f[1],10)}else{t=parseInt(f[0],10);
x=parseInt(f[1],10)}t=h?Math.max(t,h.getFullYear()):t;x=n?Math.min(x,n.getFullYear()):x;for(p+='<select class="ui-datepicker-new-year" onchange="jQuery.datepicker._selectMonthYear(\'#'+b.id+"', this, 'Y');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+b.id+"');\""+(w?this._addStatus(b,this._get(b,"yearStatus")||"&#xa0;"):"")+">";t<=x;t++)p+='<option value="'+t+'"'+(t==g?' selected="selected"':"")+">"+t+"</option>";p+="</select>"}p+="</div>";return p},_addStatus:function(b,f){return" onmouseover=\"jQuery('#ui-datepicker-status-"+
b.id+"').html('"+f+"');\" onmouseout=\"jQuery('#ui-datepicker-status-"+b.id+"').html('&#xa0;');\""},_adjustInstDate:function(b,f,g){var h=b.drawYear+(g=="Y"?f:0),n=b.drawMonth+(g=="M"?f:0);f=Math.min(b.selectedDay,this._getDaysInMonth(h,n))+(g=="D"?f:0);h=this._daylightSavingAdjust(new Date(h,n,f));n=this._getMinMaxDate(b,"min",true);f=this._getMinMaxDate(b,"max");h=n&&h<n?n:h;h=f&&h>f?f:h;b.selectedDay=h.getDate();b.drawMonth=b.selectedMonth=h.getMonth();b.drawYear=b.selectedYear=h.getFullYear();
if(g=="M"||g=="Y")this._notifyChange(b)},_notifyChange:function(b){var f=this._get(b,"onChangeMonthYear");if(f)f.apply(b.input?b.input[0]:null,[new Date(b.selectedYear,b.selectedMonth,1),b])},_getNumberOfMonths:function(b){b=this._get(b,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(b,f,g){f=this._determineDate(this._get(b,f+"Date"),null);return!g||!b.rangeStart?f:!f||b.rangeStart>f?b.rangeStart:f},_getDaysInMonth:function(b,f){return 32-(new Date(b,f,32)).getDate()},
_getFirstDayOfMonth:function(b,f){return(new Date(b,f,1)).getDay()},_canAdjustMonth:function(b,f,g,h){var n=this._getNumberOfMonths(b);g=this._daylightSavingAdjust(new Date(g,h+(f<0?f:n[1]),1));f<0&&g.setDate(this._getDaysInMonth(g.getFullYear(),g.getMonth()));return this._isInRange(b,g)},_isInRange:function(b,f){var g=!b.rangeStart?null:this._daylightSavingAdjust(new Date(b.selectedYear,b.selectedMonth,b.selectedDay));g=(g=g&&b.rangeStart<g?b.rangeStart:g)||this._getMinMaxDate(b,"min");var h=this._getMinMaxDate(b,
"max");return(!g||f>=g)&&(!h||f<=h)},_getFormatConfig:function(b){var f=this._get(b,"shortYearCutoff");f=typeof f!="string"?f:(new Date).getFullYear()%100+parseInt(f,10);return{shortYearCutoff:f,dayNamesShort:this._get(b,"dayNamesShort"),dayNames:this._get(b,"dayNames"),monthNamesShort:this._get(b,"monthNamesShort"),monthNames:this._get(b,"monthNames")}},_formatDate:function(b,f,g,h){if(!f){b.currentDay=b.selectedDay;b.currentMonth=b.selectedMonth;b.currentYear=b.selectedYear}f=f?typeof f=="object"?
f:this._daylightSavingAdjust(new Date(h,g,f)):this._daylightSavingAdjust(new Date(b.currentYear,b.currentMonth,b.currentDay));return this.formatDate(this._get(b,"dateFormat"),f,this._getFormatConfig(b))}});a.fn.datepicker=function(b){var f=Array.prototype.slice.call(arguments,1);if(typeof b=="string"&&(b=="isDisabled"||b=="getDate"))return a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(f));return this.each(function(){typeof b=="string"?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,
[this].concat(f)):a.datepicker._attachDatepicker(this,b);a.datepicker.inputs.push(this)})};a.datepicker=new c;a.datepicker.inputs=[];a(document).ready(function(){a(document.body).append(a.datepicker.dpDiv)})})(jQuery);
jQuery(function(a){a.datepicker.regional.de={clearText:"löschen",clearStatus:"aktuelles Datum löschen",flightHeadlineText:"Hinflugdatum",returnHeadlineText:"Rückflugdatum",closeText:"schließen",closeStatus:"ohne Änderungen schließen",prevText:"&#x3c;zurück",prevStatus:"letzten Monat zeigen",nextText:"Vor&#x3e;",nextStatus:"nächsten Monat zeigen",currentText:"heute",currentStatus:"",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],
monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],monthStatus:"anderen Monat anzeigen",yearStatus:"anderes Jahr anzeigen",weekHeader:"Wo",weekStatus:"Woche des Monats",dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],dayStatus:"Setze DD als ersten Wochentag",dateStatus:"Wähle D, M d",dateFormat:"dd.mm.yy",firstDay:1,initStatus:"Wähle ein Datum",
isRTL:false}});
jQuery(function(a){a.datepicker.regional.it={flightHeadlineText:"Data di partenza",returnHeadlineText:"Data di ritorno",closeText:"Chiudi",prevText:"&#x3c;Prec",nextText:"Succ&#x3e;",currentText:"Oggi",monthNames:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthNamesShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],dayNames:["Domenica","Luned&#236","Marted&#236","Mercoled&#236","Gioved&#236",
"Venerd&#236","Sabato"],dayNamesShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayNamesMin:["Do","Lu","Ma","Me","Gio","Ve","Sa"],dateFormat:"dd/mm/yy",firstDay:1,isRTL:false}});jQuery(function(a){a.datepicker.regional.gb={dateFormat:"dd/mm/yy",flightHeadlineText:"Date of outbound flight",returnHeadlineText:"Date of return flight"}});
jQuery(function(a){a.datepicker.regional.es={flightHeadlineText:"Fecha del vuelo de ida",returnHeadlineText:"Fecha del vuelo de vuelta",dateFormat:"dd.mm.yy",firstDay:1,closeText:"Chiudi",prevText:"&#x3c;Prec",nextText:"Succ&#x3e;",currentText:"Oggi",monthNames:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthNamesShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],dayNames:["Domingo","Lunes","Martes",
"Mi&#233rcoles","Jueves","Viernes","S&#225bado"],dayNamesShort:["Dom","Lun","Mar","Mi&#233","Jue","Vie","S&#225b"],dayNamesMin:["Do","Lu","Ma","Mi","Ju","Vi","S&#225"]}});var overrideBagInputValidation=false;function setViewFlash(a){s2.tuifly.helper.farefinderVerlaufSelector.trace("setView: "+a)}function filterString(){return true}function addEvent(a,c,d){if(a.addEventListener){a.addEventListener(c,d,true);return true}else return a.attachEvent?a.attachEvent("on"+c,d):false}
function erase(a,c){if(a.value==c)a.value=""}function set(a,c){if(a.value=="")a.value=c}jQuery.extend(jQuery.expr[":"],{submitable:"!a.disabled&&(a.selected||a.checked||(a.nodeName.toUpperCase()=='TEXTAREA')||(a.nodeName.toUpperCase()=='INPUT'&&(a.type=='text'||a.type=='hidden'||a.type=='password')))",nothidden:"a.type&&a.type!='hidden'"});$(function(){document.SkySales=document.forms.SkySales});var errorsHeader="Please correct the following.\n\n";
function Validate(a,c,d,b){this.form=a;this.namespace=c;this.errors="";this.setfocus=null;this.errorsHeader=d;this.namedErrors=[];if(b)this.regexElementIdFilter=b;this.requiredAttribute="required";this.requiredEmptyAttribute="requiredempty";this.validationTypeAttribute="validationtype";this.regexAttribute="regex";this.minLengthAttribute="minlength";this.numericMinLengthAttribute="numericminlength";this.maxLengthAttribute="maxlength";this.numericMaxLengthAttribute="numericmaxlength";this.minValueAttribute=
"minvalue";this.maxValueAttribute="maxvalue";this.equalsAttribute="equals";this.validateIfCheckedOnlyAttribute="validateIfCheckedOnly";this.validateIfNotCheckedOnlyAttribute="validateIfNotCheckedOnly";this.defaultErrorAttribute="error";this.requiredErrorAttribute="requirederror";this.validationTypeErrorAttribute="validationtypeerror";this.regexErrorAttribute="regexerror";this.minLengthErrorAttribute="minlengtherror";this.maxLengthErrorAttribute="maxlengtherror";this.minValueErrorAttribute="minvalueerror";
this.maxValueErrorAttribute="maxvalueerror";this.equalsErrorAttribute="equalserror";this.defaultError="{label} is invalid.";this.defaultRequiredError="{label} is required.";this.defaultRegexError=this.defaultValidationTypeError="{label} is invalid.";this.defaultMinLengthError="{label} is too short in length.";this.defaultMaxLengthError="{label} is too long in length.";this.defaultMinValueError="{label} must be greater than {minValue}.";this.defaultMaxValueError="{label} must be less than {maxValue}.";
this.defaultEqualsError="{label} is not equal to {equals}";this.defaultNotEqualsError="{label} cannot equal {equals}";this.defaultValidationErrorClass="validationError";this.defaultValidationErrorLabelClass="validationErrorLabel";this.requiredErrorOccured=false;this.run=run;this.runBySelector=runBySelector;this.validateSingleElement=validateSingleElement;this.outputErrors=outputErrors;this.checkFocus=checkFocus;this.setError=setError;this.cleanAttributeForErrorDisplay=cleanAttributeForErrorDisplay;
this.validateRequired=validateRequired;this.validateType=validateType;this.validateRegex=validateRegex;this.validateMinLength=validateMinLength;this.validateMaxLength=validateMaxLength;this.validateMinValue=validateMinValue;this.validateMaxValue=validateMaxValue;this.validateEquals=validateEquals;this.isExemptFromValidation=isExemptFromValidation;this.setValidateTypeError=setValidateTypeError;this.validateAmount=validateAmount;this.validateDate=validateDate;this.validateMod10=validateMod10;this.validateNumeric=
validateNumeric;this.stringPattern="^.+$";this.upperCaseStringPattern="^[A-Z]([A-Z)|s)*$";this.numericPattern="^\\d+$";this.numericStripper=/\D/g;this.alphaNumericPattern="^\\w+$";this.amountPattern="^(\\d+((\\.|,)\\d+)*)$";this.dateYearPattern="^\\d{4}$";this.dateDayPattern=this.dateMonthPattern="^\\d{2}$";this.emailPattern=/^(?:[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/}
function run(){for(var a=$("#SkySales").find(":input").get(),c=0;c<a.length;c++){var d=a[c];this.isExemptFromValidation(d)||this.validateSingleElement(d)}return this.outputErrors()}function runBySelector(a){a=$(a).find(":input").get();for(var c=0;c<a.length;c++)this.validateSingleElement(a[c]);return false}function isExemptFromValidation(a){if(a.id.indexOf(this.namespace)!=0)return true;if(this.regexElementIdFilter&&!a.id.match(this.regexElementIdFilter))return true;return false}
function outputErrors(){if(this.errors){alert(this.errorsHeader+this.errors);this.setfocus&&this.setfocus.focus();return false}return true}
function validateSingleElement(a){$(a).removeClass(this.defaultValidationErrorClass);$("label[for="+a.id+"]").eq(0).removeClass(this.defaultValidationErrorLabelClass);var c=this.errors.length;this.validateRequired(a);if(c+1==this.errors.length)this.requiredErrorOccured=this.errors[this.errors.length-1].isRequiredError=true;c=getValue(a);if(this.errors.length<1&&c&&0<c.length){this.validateType(a);this.validateMinAge(a);this.validateRegex(a);this.validateMinLength(a);this.validateMaxLength(a);this.validateMinValue(a);
this.validateMaxValue(a);this.validateEquals(a)}}function validateMinAge(a){var c=$(a).attr(this.minAgeAttribute);if(c==null)c=a.getAttribute(this.minAgeAttribute);var d=a.id;if(d.indexOf("Year">0)&&c>0){var b=parseInt(getValue(a)),f=d.replace(/Year$/,"Month");d=d.replace(/Year$/,"Day");f=parseInt($("#"+f).val())-1;d=parseInt($("#"+d).val());if(d>0&&f>0&&b>0){b=new Date(b,f,d);c=Date.today().addYears(-1*c);b>c&&this.setError(a,this.minAgeErrorAttribute,this.defaultMinAgeError,true)}}}
function checkFocus(a){if(!this.setfocus)this.setfocus=a}
function validateRequired(a){var c=this.requiredEmptyAttribute,d=a.getAttribute(this.requiredAttribute);c=a.getAttribute(c);var b=this.validateIfNotCheckedOnlyAttribute,f=a.getAttribute(this.validateIfCheckedOnlyAttribute);b=a.getAttribute(b);if(f!=null){var g=document.getElementById(f);g||(g=document.getElementById(this.namespace+f));if(g!=null)if($(g).attr("type")=="checkbox"&&!g.checked||$(g).attr("type")!="checkbox"&&$(g).val()!="checked")d=null}if(b!=null){g=document.getElementById(this.namespace+
b);if(g!=null)if(g.checked!=undefined)if(g.type=="checkbox"&&g.checked!=false||g.type!="checkbox"&&g.value=="checked")d=null}if(d!=null){d=d.toString();d=d.toLowerCase();if(c!=null)c=c.toLowerCase();if(d=="true"){d=getValue(a);if(d!=null)if(d.length<1||d.toLowerCase()==c)this.setError(a,this.requiredErrorAttribute,this.defaultRequiredError)}}}
function getValue(a){if(a)if(a.type=="radio"){if(a.getAttribute("name").length>0){a=document.getElementsByName(a.getAttribute("name"));for(var c=0;c<a.length;c++)if(a[c].checked==true)return a[c].value}return""}else if(a.type=="checkbox"){if(a.checked==true)return a.value}else return a.value;return""}
function validateType(a){var c=$(a).attr(this.validationTypeAttribute);if(c==null)c=a.getAttribute(this.validationTypeAttribute);var d=getValue(a);if(c){c=c.toLowerCase();if(c=="address"&&!d.match(this.stringPattern))this.setValidateTypeError(a);else if(c=="alphanumeric"&&!d.match(this.alphaNumericPattern))this.setValidateTypeError(a);else if(c=="amount"&&!this.validateAmount(d))this.setValidateTypeError(a);else if(c=="country"&&!d.match(this.stringPattern))this.setValidateTypeError(a);else if(c==
"email"&&!d.match(this.emailPattern))this.setValidateTypeError(a);else if(c=="mod10"&&!this.validateMod10(d))this.setValidateTypeError(a);else if(c=="name"&&!d.match(this.stringPattern))this.setValidateTypeError(a);else if(c=="numeric"&&!this.validateNumeric(d))this.setValidateTypeError(a);else if(c.indexOf("date")==0&&!this.validateDate(a,c,d))this.setValidateTypeError(a);else if(c=="state"&&!d.match(this.stringPattern))this.setValidateTypeError(a);else if(c=="string"&&!d.match(this.stringPattern))this.setValidateTypeError(a);
else if(c=="uppercasestring"&&!d.match(this.upperCaseStringPattern))this.setValidateTypeError(a);else c=="zip"&&!d.match(this.stringPattern)&&this.setValidateTypeError(a)}}function validateRegex(a){var c=$(a).attr(this.regexAttribute);if(c==null)c=a.getAttribute(this.regexAttribute);var d=getValue(a);c&&!d.match(c)&&this.setError(a,this.regexErrorAttribute,this.defaultRegexError)}
function validateMinLength(a){var c=$(a).attr(this.minLengthAttribute),d=$(a).attr(this.numericMinLengthAttribute);if(c==null)c=a.getAttribute(this.minLengthAttribute);d=null;var b=getValue(a);if(0<c&&b.length<c)this.setError(a,this.minLengthErrorAttribute,this.defaultMinLengthError);else 0<d&&0<b.length&&b.replace(this.numericStripper,"").length<d&&this.setError(a,this.minLengthErrorAttribute,this.defaultMinLengthError)}
function validateMaxLength(a){var c=$(a).attr(this.maxLengthAttribute);$(a).attr(this.numericMaxLengthAttribute);if(c==null)c=a.getAttribute(this.maxLengthAttribute);numericLength=null;var d=getValue(a);if(0<c&&c<d.length)this.setError(a,this.maxLengthErrorAttribute,this.defaultMaxLengthError);else 0<numericLength&&0<d.length&&numericLength<d.replace(this.numericStripper,"").length&&this.setError(a,this.maxLengthErrorAttribute,this.defaultMaxLengthError)}
function validateMinValue(a){var c=$(a).attr(this.minValueAttribute);if(c==null)c=a.getAttribute(this.minValueAttribute);if(c!=null&&0<c.length){var d=getValue(a);if(5<c.length&&c.substring(0,5)=="&gt;=")d<parseFloat(c.substring(5,c.length))&&this.setError(a,this.minValueErrorAttribute,this.defaultMinValueError);else if(4<c.length&&c.substring(0,4)=="&gt;")d<=parseFloat(c.substring(4,c.length))&&this.setError(a,this.minValueErrorAttribute,this.defaultMinValueError);else d<parseFloat(c)&&this.setError(a,
this.minValueErrorAttribute,this.defaultMinValueError)}}
function validateMaxValue(a){var c=$(a).attr(this.maxValueAttribute);if(c==null)c=a.getAttribute(this.maxValueAttribute);if(c!=null&&0<c.length){var d=getValue(a);if(5<c.length&&c.substring(0,5)=="&lt;=")d>parseFloat(c.substring(5,c.length))&&this.setError(a,this.maxValueErrorAttribute,this.defaultMaxValueError);else if(4<c.length&&c.substring(0,4)=="&lt;")d>=parseFloat(c.substring(4,c.length))&&this.setError(a,this.maxValueErrorAttribute,this.defaultMaxValueError);else parseFloat(d)>c&&this.setError(a,
this.maxValueErrorAttribute,this.defaultMaxValueError)}}
function validateEquals(a){var c=$(a).attr(this.equalsAttribute);if(c==null)c=a.getAttribute(this.equalsAttribute);if(c!=null&&0<c.length){var d=getValue(a);if(2<c.length&&c.substring(0,2)=="!=")d==c.substring(2,c.length)&&this.setError(a,this.equalsErrorAttribute,this.defaultEqualsError);else if(2<c.length&&c.substring(0,2)=="==")d!=c.substring(2,c.length)&&this.setError(a,this.equalsErrorAttribute,this.defaultEqualsError);else if(c.charAt(0)=="=")d!=c.substring(1,c.length)&&this.setError(a,this.equalsErrorAttribute,
this.defaultEqualsError);else d!=c&&this.setError(a,this.equalsErrorAttribute,this.defaultEqualsError)}}function setValidateTypeError(a){this.setError(a,this.validationTypeErrorAttribute,this.defaultValidationTypeError)}
function setError(a,c,d){if(a.type=="radio"){var b=a.getAttribute("name");if(b.length>0){if(this.namedErrors[b]!=null)return;this.namedErrors[b]=b}}b=$(a).attr(c);if(b==null)b=a.getAttribute(c);b||(b=$(a).attr(this.defaultErrorAttribute)?$(a).attr(this.defaultErrorAttribute):d?d:this.defaultError);if(c=b.match(/{\s*(\w+)\s*}/g))for(d=0;d<c.length;d++){var f=c[d].replace(/{\s*(\w+)\s*}/,"$1");b=b.replace(/{\s*\w+\s*}/,this.cleanAttributeForErrorDisplay(a,f))}$(a).addClass(this.defaultValidationErrorClass);
$("label[for="+a.id+"]").eq(0).addClass(this.defaultValidationErrorLabelClass);this.errors+=b+"\n";this.checkFocus(a)}function cleanAttributeForErrorDisplay(a,c){c=c.toLowerCase();var d="";if(c=="label")d=$("label[for="+a.id+"]").eq(0).text();if(c=="description")d=$("select[id="+a.id+"]").eq(0).attr("description");if(d==null||d=="")d=a.id;if(d==null)return c;if(c.match(/^(minvalue|maxvalue)$/i))return d.replace(/[^\d.,]/g,"");return d}
function validateAmount(a){if(!a.match(this.amountPattern)||a==0)return false;return true}function validateDate(a,c,d){a="";if(c)a=c.toLowerCase();c=new Date;if(a=="dateyear"&&(d<c.getYear()||!d.match(this.dateYearPattern)))return false;else if(a=="datemonth"&&!d.match(this.dateMonthPattern))return false;else if(a=="dateday"&&!d.match(this.DateDayPattern))return false;return true}
function validateMod10(a){a=a.replace(/ /g,"");if(!/\D/.test(a)){for(var c,d=0;a.length<16;)a="0"+a;for(digitCounter=a.length-1;0<=digitCounter;digitCounter-=2){d+=parseInt(a.charAt(digitCounter));c=String(a.charAt(digitCounter-1)*2);for(var b=0;b<c.length;b++)d+=parseInt(c.charAt(b))}return d%10==0}return false}function validateNumeric(a){a=a.replace(/\s/g,"");if(!a.match(this.numericPattern))return false;return true}
function validateBySelector(a){if(a!=null){var c=new Validate(null,"",errorsHeader,null);c.runBySelector(a);return c.outputErrors()}return true}function validate(a,c,d){if(document.getElementById&&document.createTextNode){if(a.getAttribute)a=a.getAttribute("id").replace(/_\w+$/,"");d=new Validate(document.SkySales,a+"_",errorsHeader,d);if(c){var b=c;c.getAttribute||(b=document.getElementById(a+"_"+c));d.validateSingleElement(b);return d.outputErrors()}return d.run()}return true}
var submitterClicked=false;function preventDoubleClick(){if(!submitterClicked)return submitterClicked=true;return false}var events=[];function register(a,c){if(events[a]===undefined)events[a]=[];events[a][events[a].length]=c}function raise(a,c){if(events[a]!=void 0)for(var d=0;d<events[a].length;d++)if(window[events[a][d]](c)==false)return false;return true}function WindowLoadEventArgs(){}
function WindowInitialize(){s2.Logger.debug("WindowInitialize");var a=window.onload;s2.Logger.debug("Fire WindowInitialize ready");raise("WindowLoad",new WindowLoadEventArgs);if(a){a();window.onload=function(){s2.Logger.debug("onload")}}}
function displayPopUpConverter(){if(!window.converterWindow||converterWindow.closed)converterWindow=window.open("CurrencyConverter.aspx","converter","width=360,height=300,toolbar=0,status=0,location=0,menubar=0,scrollbars=1,resizable=1");else{converterWindow.open("CurrencyConverter.aspx","converter","width=360,height=300,toolbar=0,status=0,location=0,menubar=0,scrollbars=1,resizable=1");converterWindow.focus()}}
function hideShow(a,c){if(document.getElementById&&document.getElementById(a))if(document.getElementById(c).checked==true)document.getElementById(a).style.display="inline";else document.getElementById(a).style.display="none"}var jsLoadedCommon=true;
function changeDest_S2(a,c,d){if(c){var b=0,f="";if(typeof s2=="undefined"&&parseInt(a.selectedIndex,10)>0){f=c.options[0].text;var g=parseInt(a.selectedIndex,10);a=a.options[g].value;c.length=1;c.options[0]=new Option(f);if(c.requiredempty)c.options[0].value=c.requiredempty;for(g=0;g<SortedStations.length;g++){for(j=0;j<Stations[a].mkts.length;j++){var h=Stations[a].mkts[j];if(Stations[h])if(SortedStations[g]==h&&Stations[h].validDest==true){if(h==d)b=c.length;c.length+=1;f=showStationCodes?Stations[h].name+
" ("+h+")":Stations[h].name;c.options[c.length-1]=new Option(f);c.options[c.length-1].value=h;break}}if(c.length-1==Stations[a].mkts.length)break}c.selectedIndex=b}else fillList(c,d)}else s2.Logger.debug("There's no DropDownDest!")}var lastListContent;
function fillList(a,c){if(a){if(!location.pathname.match(/^\/Select\.aspx/,"i")&&!location.pathname.match(/Change\.aspx/,"i")&&$(a).attr("id").match(/DropDownListMarketDestination/,"i"))c="";if(a.options.length>1)$(a).val(c);else{var d=a.options[0]?a.options[0].text:"";if(c==""&&a.selectedIndex>-1)c=a.options[a.selectedIndex].value;a.length=1;d=['<option value="'+(a.requiredempty?a.requiredempty:"")+'">'+d+"</option>"];for(var b="",f=0;f<SortedStations.length;f++){var g=SortedStations[f];if(b=Stations[g])if(b.validDest){var h=
false;if(c==g)h=true;b=b.name+" ("+g+")";d.push('<option value="'+g+'"'+(h?" selected=selected":"")+">"+b+"</option>")}}a.innerHTML="";$(a).html(d.join(""))}}else s2.Logger.debug("There's no DropDownDest!")}
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){var c="",d,b,f,g,h,n,p=0;for(a=Base64._utf8_encode(a);p<a.length;){d=a.charCodeAt(p++);b=a.charCodeAt(p++);f=a.charCodeAt(p++);g=d>>2;d=(d&3)<<4|b>>4;h=(b&15)<<2|f>>6;n=f&63;if(isNaN(b))h=n=64;else if(isNaN(f))n=64;c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(h)+this._keyStr.charAt(n)}return c},decode:function(a){var c="",d,b,f,g,h,n=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");n<a.length;){d=this._keyStr.indexOf(a.charAt(n++));b=this._keyStr.indexOf(a.charAt(n++));g=this._keyStr.indexOf(a.charAt(n++));h=this._keyStr.indexOf(a.charAt(n++));d=d<<2|b>>4;b=(b&15)<<4|g>>2;f=(g&3)<<6|h;c+=String.fromCharCode(d);if(g!=64)c+=String.fromCharCode(b);if(h!=64)c+=String.fromCharCode(f)}return c=Base64._utf8_decode(c)},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var c="",d=0;d<a.length;d++){var b=a.charCodeAt(d);if(b<128)c+=String.fromCharCode(b);else{if(b>127&&b<2048)c+=
String.fromCharCode(b>>6|192);else{c+=String.fromCharCode(b>>12|224);c+=String.fromCharCode(b>>6&63|128)}c+=String.fromCharCode(b&63|128)}}return c},_utf8_decode:function(a){for(var c="",d=0,b=c1=c2=0;d<a.length;){b=a.charCodeAt(d);if(b<128){c+=String.fromCharCode(b);d++}else if(b>191&&b<224){c2=a.charCodeAt(d+1);c+=String.fromCharCode((b&31)<<6|c2&63);d+=2}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);c+=String.fromCharCode((b&15)<<12|(c2&63)<<6|c3&63);d+=3}}return c}};
function Cookie(){var a=new Date(2030,12,31);Cookie.prototype.work=function(){this.set("test","true");retVal=this.get("test")!=null;this.del("test");return retVal};Cookie.prototype.set=function(c,d){document.cookie=c+"="+d+"; path=/"};Cookie.prototype.setPersistent=function(c,d,b){b||(b=a);document.cookie=c+"="+d+"; expires="+b.toGMTString()+"; path=/"};Cookie.prototype.get=function(c){var d=document.cookie.indexOf(c+"=");if(-1!=d){var b=document.cookie.slice(d).indexOf(";");return mValue=document.cookie.slice(d+
c.length+1,-1!=b?b+d:document.cookie.length)}return null};Cookie.prototype.del=function(c){document.cookie=c+"=; expires="+(new Date((new Date).getTime()+-1E4)).toGMTString()+"; path=/"}}cookie=new Cookie;var previousPromoCode="";function promoCodes_ValidatePromoCodeForSubmit(){if(document.getElementById(applicationJavaScriptHtmlId+"_TextBoxPromoCode")!=null&&promoCodes_ValidatePromoCode()==false)document.getElementById(applicationJavaScriptHtmlId+"_TextBoxPromoCode").value="";return true}
function promoCodes_ValidatePromoCodeForFlightChange(){promoCodes_ValidatePromoCode();return true}
function promoCodes_ValidatePromoCode(){var a=document.getElementById(applicationJavaScriptHtmlId+"_TextBoxPromoCode");if(a!=null)var c=a.value;if(c!=undefined){previousPromoCode=c;if(c.length>=6){promoCode=c.toLowerCase();a=GetSelectedValue(applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1")+"-"+GetSelectedValue(applicationJavaScriptHtmlId+"_DropDownListMarketDestination1");c=GetSelectedValue(applicationJavaScriptHtmlId+"_DropDownListMarketDestination1")+"-"+GetSelectedValue(applicationJavaScriptHtmlId+
"_DropDownListMarketOrigin1");var d=GetSelectedValue(applicationJavaScriptHtmlId+"_DropDownListMarketMonth1")+"-"+GetSelectedValue(applicationJavaScriptHtmlId+"_DropDownListMarketDay1")+" 00:00:00";if(PromoCodes[promoCode]==undefined){txtInvalidPromoDisplay=txtInvalidPromo;togglePromoCodeIcon("invalid");return false}else{txtValidPromoDisplay=txtValidPromo;if(d>=PromoCodes[promoCode].travelDateRangeBegin&&(d<=PromoCodes[promoCode].travelDateRangeEnd||PromoCodes[promoCode].travelDateRangeEnd=="")){if(PromoCodes[promoCode].routes.length>
0){d=" ";for(var b in PromoCodes[promoCode].routes){var f=PromoCodes[promoCode].routes[b];if(f==a||f==c){togglePromoCodeIcon("valid");return true}d!=" "?d+=", "+f:d+=f}txtValidPromoButRouteDisplay=txtValidPromoButRoute;togglePromoCodeIcon("validButRoute");return true}togglePromoCodeIcon("valid");return true}txtValidPromoButDateDisplay=txtValidPromoButDate;togglePromoCodeIcon("validButDate");return true}}else togglePromoCodeIcon("")}return true}
function togglePromoCodeIcon(a){if(a=="valid"){document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeValid").style.display="inline";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeValidButDate").style.display="none";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeValidButRoute").style.display="none";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeInvalid").style.display="none"}else if(a=="validButDate"){document.getElementById(applicationJavaScriptHtmlId+
"_PromoCodeValid").style.display="none";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeValidButDate").style.display="inline";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeValidButRoute").style.display="none";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeInvalid").style.display="none"}else if(a=="validButRoute"){document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeValid").style.display="none";document.getElementById(applicationJavaScriptHtmlId+
"_PromoCodeValidButDate").style.display="none";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeValidButRoute").style.display="inline";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeInvalid").style.display="none"}else if(a=="invalid"){document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeValid").style.display="none";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeValidButDate").style.display="none";document.getElementById(applicationJavaScriptHtmlId+
"_PromoCodeValidButRoute").style.display="none";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeInvalid").style.display="inline"}else{document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeValid").style.display="none";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeValidButDate").style.display="none";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeValidButRoute").style.display="none";document.getElementById(applicationJavaScriptHtmlId+"_PromoCodeInvalid").style.display=
"none"}}function getElement(a){return document.all?document.all[a]:document.getElementById(a)}function toggleVisibility(a){if(a=getElement(a))a.style.display=a.style.display=="none"?"block":"none"}function setVisibility(a,c){var d=getElement(a);if(d)d.style.display=c?"block":"none"}
function showSSRsExtra(){if(document.getElementById("outerDivSSRs").style.display=="none"){document.getElementById("outerDivSSRs").style.display="block";document.getElementById("showSSRs").checked=true}else{document.getElementById("outerDivSSRs").style.display="none";document.getElementById("showSSRs").checked=false}}
function showDetail(a,c){if(document.getElementById(a).style.display=="none"){document.getElementById(a).style.display="block";document.getElementById(c).src="/skyres/images/icon_minus.gif"}else{document.getElementById(a).style.display="none";document.getElementById(c).src="/skyres/images/icon_plus.gif"}}
function switchLanguage(a){var c=location.pathname.split("/")[1],d=a.split("/"),b=d[1];if(c=="de"&&b=="de")document.cookie=d[2].indexOf("_at.")!=-1?"userLang=at;":"userLang=de;";else if(c=="en"&&b=="en")document.cookie=d[2].indexOf("_ire.")!=-1?"userLang=ire;":"userLang=en;";document.location.href=a}
function registerNewsletter(a,c,d,b,f,g,h,n){var p=new Image,t="/cgi-bin/newsletter.pl?";t=t+"email="+encodeURI(a);t=t+"&sex="+encodeURI(c);t=t+"&firstname="+encodeURI(d);t=t+"&lastname="+encodeURI(b);t=t+"&country="+encodeURI(f);t=t+"&airport="+encodeURI(g);t=t+"&language="+encodeURI(h);t=t+"&source="+encodeURI(n);p.src=t}function gotoInterrent(){window.open("http://www.interrent.de/innsbruck/hlx/Homepage.do","blank")}
function showFlugziel(a){if(flugziele[a])top.location.href=flugziele[a];else alert(message.noDestPage)}function showWeinziel(a){if(weinziele[a])top.location.href=weinziele[a];else alert(message.noDestWinePage)}
function popup(a,c,d){var b=0,f=0,g=screen.availWidth,h=screen.availHeight,n=d.split(",");for(i=0;i<n.length;i++){if(n[i].indexOf("width")!=-1){tmpArray2=n[i].split("=");b=tmpArray2[1]}if(n[i].indexOf("height")!=-1){tmpArray2=n[i].split("=");f=tmpArray2[1]}}b=eval(g/2-b/2);f=eval(h/2-f/2);d+=",top="+f+",left="+b;a=window.open(a,c,d+",dependent=yes");a!=null&&a.focus&&a.focus()}function switchFormToDynamic(){}
function buildLink(a,c){var d=a,b=document.location.href.match(/^(http[s]?):\/\/([^\/]*)(\/.*)$/i);if(b!=null){var f=b[1],g=b[2];b=b[3];var h=b.lastIndexOf("/");h=b.substring(0,h+1);g.match(/^([^:]*):[0-9]*$/);b=d.match(/^(http[s]?):\/\/([^\/]*)(\/.*)$/i);if(b!=null){f=b[1];d=b[3]}if(d.charAt(0)!="/")d=h+d;g=f=="https"?c?document.dynamic_server_ssl:document.static_server_ssl:c?document.dynamic_server:document.static_server;d=g+d}return d}
function openAuto(a,c){top.location.href=a=="PMI"?url_auto+"?TUIMietwagen&Land=Spanien&Ort=Mallorca":a=="TURBO"?url_auto+"?MCS="+c:url_auto+"?locale=DE&MCS=https://microsite.europcar.com/hapaglloydexpress&IATA=0677316&PROMO=41113594&FTPROG=false&CNTRY=DE&STATIONCO="+autoCodes[a]+"&ACRISS=C"}
function openHotel(a){if(a=="BRI")a="Apulien & Molise";else if(a=="TXL")a="Berlin";else if(a=="BIO")a="Baskenland / País Vasco";else if(a=="CVT")a="England / West Midlands";else if(a=="DUB")a="Osten / Leinster / Dublin & Umgebung";else if(a=="EDI")a="Schottland";else if(a=="HAM")a="Hamburg";else if(a=="HAJ")a="Hannover & Umgebung";else if(a=="KLU")a="Kärnten & Osttirol";else if(a=="CGN")a="Köln";else if(a=="BGY")a="Northern Italy / Milan & environs";else if(a=="PMI")a="Balearen / Mallorca";else if(a==
"MAN")a="England / Nordwesten";else if(a=="MRS")a="Provence-Alpes-Côte d'Azur";else if(a=="MUC")a="Bayern / München & Umgebung";else if(a=="NAP")a="Kampanien / Neapel & Umgebung";else if(a=="NCL")a="England / Nordosten / Northumberland";else if(a=="OLB")a="Sardinien (Norden)";else if(a=="PMO")a="Sizilien / Palermo & Umgebung";else if(a=="PSA")a="Toskana";else if(a=="CIA")a="Latium / Rom & Umgebung";else if(a=="RJK")a="Kvarner Bucht / Rijeka";else if(a=="SZG")a="Salzburg Stadt";else if(a=="STR")a=
"Stuttgart & Umgebung";else if(a=="ARN")a="Stockholm & Umgebung";else if(a=="SNN")a="Süden / Munster";else if(a=="VLC")a="Valencia & Umgebung";else if(a=="VCE")a="Venetien & Friaul-Julisch Venetien";a=escape(a);top.location.href=url_hotel+"?Hotelportal&Reiseziel="+a}
function openHotelEn(a){if(a=="BRI")a="Apulia";else if(a=="TXL")a="Berlin";else if(a=="BIO")a="Baskenland / País Vasco";else if(a=="CVT")a="England / West Midlands";else if(a=="DUB")a="East / Leinster";else if(a=="EDI")a="Edinburgh";else if(a=="HAM")a="Hamburg";else if(a=="HAJ")a="Hanover";else if(a=="KLU")a="Carinthia & Eastern Tyrol";else if(a=="CGN")a="Cologne";else if(a=="BGY")a="Northern Italy / Milan & environs";else if(a=="PMI")a="Balearic Islands / Majorca";else if(a=="MAN")a="England / North West";
else if(a=="MRS")a="Provence-Alpes-Côte d'Azur ";else if(a=="MUC")a="Munich & environment";else if(a=="NAP")a="Naples & environs";else if(a=="NCL")a="England / North East / Northumberland";else if(a=="OLB")a="Sardinia (Northern parts)";else if(a=="PMO")a="Sicily / Palermo & environs";else if(a=="PSA")a="Tuscany";else if(a=="CIA")a="Lazio / Rome";else if(a=="RJK")a="Kvarn Bay / Rijeka";else if(a=="SZG")a="Salzburg City";else if(a=="STR")a="Stuttgart";else if(a=="ARN")a="Stockholm";else if(a=="SNN")a=
"South / Munster";else if(a=="VLC")a="Valencia";else if(a=="VCE")a="Venice & environs";a=escape(a);top.location.href=url_hotel+"?Hotelportal&Locale=en_GB&Reiseziel="+a}function openFlugHotel(a){top.location.href=url_flugHotel+"?cid=HLX.LOC.0001&_cmd=start.locomat.query&_destination="+a}
function openFerienwohnung(a){if(interhome[a]){if(interhome[a].indexOf("countrycode")!=-1)top.location.href=url_ferienwohnungen+"?so=59&userlang=01&partnerid=590794&css_style=partner_css_590794_.css&ihnav=N"+interhome[a];if(interhome[a].indexOf("dummya=50519")!=-1)top.location.href=url_ferienwohnungen+"?"+interhome[a]}else top.location.href=url_ferienwohnungen}
function submitForm_ferienwohnung(){formular=document.fewo;code=formular.destination[formular.destination.selectedIndex].value;if(interhome[code]){if(interhome[code].indexOf("countrycode")!=-1)this.location.href="http://www.interhome.de/buchung/main_miniprice.asp?userlang=01&so=59&partnerid=590794&css_style=partner_css_590794_.css&ihnav=N"+interhome[code];if(interhome[code].indexOf("dummya=50519")!=-1)this.location.href="http://www.ferienhaus-allianz.de/cgi-bin/1_1_fh_angebotsselekt_grob?"+interhome[code]}}
function isValidDate(a){var c=a.substring(6,8),d=a.substring(4,6);a=a.substring(0,4);var b;b=new Date(a,d-1,c);return c==b.getDate()&&d==b.getMonth()+1&&a==b.getFullYear()}function openTiefstpreisseite(a){top.location.href=a?url_tiefstpreisseite+"&destination="+a:url_tiefstpreisseite}
function addon(){var a=document.itinerary_info.contact_name.value.split("|"),c=unescape(a[1]);a=unescape(a[0]);var d=document.itinerary_info.contact_address1.value,b=document.itinerary_info.contact_address1.value,f=d.lastIndexOf(" ");if(f!=-1){var g=d.length;d=unescape(d.substring(0,f));++f;b=unescape(b.substring(f,g))}else{d=d;b=""}popup("/de/7392.html?vorname="+c+"&nachname="+a+"&str="+d+"&nr="+b+"&plz="+document.itinerary_info.contact_zip.value+"&ort="+document.itinerary_info.contact_city.value+
"&phone="+document.itinerary_info.contact_phone.value+"&email="+document.itinerary_info.email.value,"popup","width=743,height=560,scrollbars=yes")}var plzArray=[30159,30161,30163,30165,30167,30169,30171,30173,30175,30177,30179,30419,30449,30451,30453,30455,30457,30459,30519,30539,30559,30625,30627,30629,30655,30657,30659,30823,30826,30827,30851,30853,30855,30880,30890,30900,30916,30926,30938,30952,30966,30974,30982,30989,31275,31303,31311,31319,31515,31535,31832,31848,31157];
function checkPlzArray(a){var c;for(c=0;c<plzArray.length;c++)if(plzArray[c]==a)return true;return false}function addTimeToDate(a,c){var d="",b=new Date(Date.parse(a)+c);d+=b.getFullYear();tempDate="0"+eval(b.getMonth()+1);d+=tempDate.substr(tempDate.length-2,2);tempDate="0"+b.getDate();d+=tempDate.substr(tempDate.length-2,2);tempDate="0"+b.getHours();d+=tempDate.substr(tempDate.length-2,2);tempDate="0"+b.getMinutes();d+=tempDate.substr(tempDate.length-2,2);return d}
function timeToStandardTime(a){var c=a.substring(0,4),d=a.substring(4,6),b=a.substring(6,8),f=a.substring(8,10);a=a.substring(10,12);return b+" "+monthName[d]+" "+c+" "+f+":"+a}
function mediaSubmit(){var a="";if(document.myForm.first_name.value==""||document.myForm.last_name.value==""||document.myForm.email.value==""){a=message.errorAddress;if(document.myForm.first_name.value=="")a+=message.errorSurname;if(document.myForm.last_name.value=="")a+=message.errorLastname;if(document.myForm.email.value=="")a+=message.errorMail;alert(a)}else if(document.myForm.email.value.indexOf("@")==-1||document.myForm.email.value.indexOf(".")==-1){a+=message.errorMail2;alert(a)}else document.myForm.submit()}
function checkCookieStatus(){if(document.cookie)return true;else{alert(message.noCookiesEnabled);return false}}
function captureDates(){oDay=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDay1").options[document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDay1").selectedIndex].value;oMonth=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketMonth1").options[document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketMonth1").selectedIndex].value.substring(5,7);oYear=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketMonth1").options[document.getElementById(applicationJavaScriptHtmlId+
"_DropDownListMarketMonth1").selectedIndex].value.substring(0,4);rDay=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDay2").options[document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDay2").selectedIndex].value;rMonth=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketMonth2").options[document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketMonth2").selectedIndex].value.substring(5,7);rYear=document.getElementById(applicationJavaScriptHtmlId+
"_DropDownListMarketMonth2").options[document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketMonth2").selectedIndex].value.substring(0,4)}
function changeReturnDate(a){if(a==applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"||a==applicationJavaScriptHtmlId+"_DropDownListMarketDay1"){captureDates();if(rDay!=0)if(rMonth<oMonth&&rYear==oYear||rYear<oYear){document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketMonth2").options.selectedIndex=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketMonth1").options.selectedIndex;document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDay2").options.selectedIndex=
document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDay1").options.selectedIndex}else if(rDay<oDay&&rMonth==oMonth&&rYear==oYear)document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDay2").options.selectedIndex=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDay1").options.selectedIndex}}
function limitMonth(a){var c=11,d=new Date,b=d.getMonth();d=d.getYear();if(d<999)d+=1900;if(d<2009)c+=12*(2009-d);limit=c-b;if(a)if(limit<a.options.length){numDeleteItems=a.options.length-limit;for(i=0;i<numDeleteItems;i++)a.remove(a.options.length-1)}}
function calendarFillPulldowns(a,c){var d=a.getDate()-1,b=a.getMonth()+1;if(b<10)b="0"+b;b=a.getFullYear()+"-"+b;var f=false;document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDay"+c).selectedIndex=d;for(d=0;d<document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+c).length;d++)if(document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+c)[d].value==b){document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+
c).selectedIndex=d;f=true}f==false&&alert(message.noFlightFound)}var submitterClickedS2S=false;function preventDoubleClickS2S(){var a=document.SkySales.CONTROLGROUPPAYMENT$PAYMENTINPUT$DropDownListPaymentMethodCode;if(a){if(a.value!="ExternalAccount:AA"){if(!submitterClickedS2S)return submitterClickedS2S=true;return false}}else return true}function write_control(a){document.write(a)}
function showRabattLayer(){self.location.href.indexOf("/de/")>=0&&(referrerId.indexOf("Select.aspx")>=0||referrerId.indexOf("Contact.aspx")>=0||referrerId.indexOf("Payment.aspx"))}
function validateHAJCIAFCO(){var a=document.SkySales,c=GetValue(a[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"]),d=GetValue(a[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"]);if(c!="HAJ"&&c!="CIA"&&c!="FCO"&&d!="HAJ"&&d!="CIA"&&d!="FCO")return true;for(var b=[],f=1;f<=numDatesToValidate;f++)if(MarketAction[f]!="Cancel")if(validateElement("DropDownListMarketDay"+f)){var g=a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+f].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+
f].selectedIndex].value,h=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].selectedIndex].value.substring(5,7),n=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].selectedIndex].value.substring(0,4);b[f]=""+n+h+g}if(numDatesToValidate==1)if(b[1]>"20071027"&&(c=="CIA"||d=="CIA")){alert(message.HanRomNoCIA);return false}else{if(b[1]<"20071030"&&
(c=="FCO"||d=="FCO")){alert(message.HanRomNoFCO);return false}}else if(numDatesToValidate==2)if(b[1]>"20071027"&&b[2]>"20071027"&&(c=="CIA"||d=="CIA")){alert(message.HanRomNoCIA);return false}else if(b[1]<"20071030"&&b[2]<"20071030"&&(c=="FCO"||d=="FCO")){alert(message.HanRomNoFCO);return false}else if(b[1]<"20071030"&&b[2]>"20071027"&&(c=="CIA"||d=="CIA")){alert(message.HanRomNoCIA2);return false}else if(b[1]<"20071030"&&b[2]>"20071027"&&(c=="FCO"||d=="FCO")){alert(message.HanRomNoFCO2);return false}return true}
function validateCTAReroutedPMO(){var a=document.SkySales,c=GetValue(a[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"]),d=GetValue(a[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"]);if(c!="CTA"&&d!="CTA")return true;for(var b=[],f=1;f<=numDatesToValidate;f++)if(MarketAction[f]!="Cancel")if(validateElement("DropDownListMarketDay"+f)){var g=a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+f].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+f].selectedIndex].value,
h=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].selectedIndex].value.substring(5,7),n=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].selectedIndex].value.substring(0,4);b[f]=""+n+h+g}if(numDatesToValidate==1)if(b[1]=="20080514"&&(c=="CGN"||c=="HAJ"||d=="CGN"||d=="HAJ"))return handleCTAReroutedPMOChoice(c,d);else{if(b[1]=="20080515"&&(c==
"HAM"||c=="MUC"||d=="HAM"||d=="MUC"))return handleCTAReroutedPMOChoice(c,d)}else if(numDatesToValidate==2)if((b[1]=="20080514"||b[2]=="20080514")&&(c=="CGN"||c=="HAJ"||d=="CGN"||d=="HAJ"))return handleCTAReroutedPMOChoice(c,d);else if((b[1]=="20080515"||b[2]=="20080515")&&(c=="HAM"||c=="MUC"||d=="HAM"||d=="MUC"))return handleCTAReroutedPMOChoice(c,d);return true}
function handleCTAReroutedPMOChoice(a,c){var d=document.SkySales;if(confirm(message.CTAReroutedPMO)){if(a=="CTA"){var b=d[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"];d=d[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"];for(var f=0;f<b.length;f++)if(b[f].value=="PMO"){b.selectedIndex=f;for(b=0;b<d.length;b++)if(d[b].value==c){d.selectedIndex=b;break}break}}else if(c=="CTA"){d=d[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"];for(f=0;f<d.length;f++)if(d[f].value==
"PMO"){d.selectedIndex=f;break}}return true}return false}
function validateForAllYouCanFly(){var a=message.lateAllYouCanFly,c=document.SkySales,d=c[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"].value.substring(0,4)+c[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"].value.substring(5,7)+c[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"].value,b=(new Date).getTime();b+=432E6;b=new Date(b);var f=String(b.getDate());if(f.length==1)f="0"+f;var g=String(b.getMonth()+1);if(g.length==1)g="0"+g;b=String(b.getFullYear());b=b+g+f;if(d>b){alert(a);
b=(new Date).getTime();b+=1728E5;b=new Date(b);f=String(b.getDate());if(f.length==1)f="0"+f;g=String(b.getMonth()+1);if(g.length==1)g="0"+g;b=String(b.getFullYear());c[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"].value=f;c[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"].value=b+"-"+g;return false}if(GetMarketStructure()!="OneWay")if(c[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].value.substring(0,4)+c[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].value.substring(5,
7)+c[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].value>b){alert(a);b=(new Date).getTime();b+=432E6;b=new Date(b);f=String(b.getDate());if(f.length==1)f="0"+f;g=String(b.getMonth()+1);if(g.length==1)g="0"+g;b=String(b.getFullYear());c[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].value=f;c[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].value=b+"-"+g;return false}return true}
function checkAvailability(){if(!validateHAJCIAFCO())return false;if(!validateCTAReroutedPMO())return false;var a=message.fleugplaneinschraenkung_priorPrefix,c=message.fleugplaneinschraenkung_priorInfixTo,d=message.fleugplaneinschraenkung_priorInfixDate,b=message.fleugplaneinschraenkung_priorSuffix,f=message.fleugplaneinschraenkung_laterPrefix,g=message.fleugplaneinschraenkung_laterInfixTo,h=message.fleugplaneinschraenkung_laterInfixDate,n=message.fleugplaneinschraenkung_laterSuffix,p=document.SkySales,
t=p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"].selectedIndex].value.substring(0,4)+p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"].selectedIndex].value.substring(5,7)+p[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"].selectedIndex].value,w=GetMarketStructure()!="OneWay",
x=p[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"].selectedIndex].value,E=p[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"].selectedIndex].value,L=p[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"].selectedIndex].text,Q=p[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"].options[p[applicationJavaScriptHtmlId+
"_DropDownListMarketDestination1"].selectedIndex].text,O=true,I=checkAvailabilityDate(x,E,t);if(I!=""){O=I.slice(6,8)+"."+I.slice(4,6)+"."+I.slice(0,4);t<I?s2.tuifly.widget.dialog.alertNotice(a+L+c+Q+d+O+b):s2.tuifly.widget.dialog.alertNotice(f+L+g+Q+h+O+n);O=false;t=I.slice(6,8);var ba=I.slice(0,4)+"-"+I.slice(4,6),K;for(K=0;K<p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"].options.length;K++)if(p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"].options[K].value==ba){p[applicationJavaScriptHtmlId+
"_DropDownListMarketMonth1"].selectedIndex=K;$(p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"]).change()}for(K=0;K<p[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"].options.length;K++)if(p[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"].options[K].value==t){p[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"].selectedIndex=K;$(p[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"]).change()}if(w){K=p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].options[p[applicationJavaScriptHtmlId+
"_DropDownListMarketMonth2"].selectedIndex].value.substring(0,4)+p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].selectedIndex].value.substring(5,7)+p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].selectedIndex].value;if(K<I){for(K=0;K<p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].options.length;K++)if(p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].options[K].value==
ba){p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].selectedIndex=K;$(p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"]).change()}for(K=0;K<p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].options.length;K++)if(p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].options[K].value==t){p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].selectedIndex=K;$(p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"]).change()}}}}else{I=getAvailabilitySearchRange(x,E,t);
for(element in p.elements)if(element.type=="hidden"&&element.name.indexof("_DropDownListMarketDateRange1")>-1){element.value=I;break}}if(w){K=p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].selectedIndex].value.substring(0,4)+p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].selectedIndex].value.substring(5,7)+p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].options[p[applicationJavaScriptHtmlId+
"_DropDownListMarketDay2"].selectedIndex].value;I=checkAvailabilityDate(E,x,K);if(I!=""){O=I.slice(6,8)+"."+I.slice(4,6)+"."+I.slice(0,4);K<I?s2.tuifly.widget.dialog.alertNotice(a+Q+c+L+d+O+b):s2.tuifly.widget.dialog.alertNotice(f+Q+g+L+h+O+n);O=false;t=I.slice(6,8);ba=I.slice(0,4)+"-"+I.slice(4,6);for(K=0;K<p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].options.length;K++)if(p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].options[K].value==ba)p[applicationJavaScriptHtmlId+
"_DropDownListMarketMonth2"].selectedIndex=K;for(K=0;K<p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].options.length;K++)if(p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].options[K].value==t)p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].selectedIndex=K}else{I=getAvailabilitySearchRange(E,x,K);for(element in p.elements)if(element.type=="hidden"&&element.name.indexof("_DropDownListMarketDateRange2")>-1){element.value=I;break}}}return O}
function checkAvailabilityGroups(){var a=message.fleugplaneinschraenkung_priorPrefix,c=message.fleugplaneinschraenkung_priorInfixTo,d=message.fleugplaneinschraenkung_priorInfixDate,b=message.fleugplaneinschraenkung_priorSuffix,f=message.fleugplaneinschraenkung_laterPrefix,g=message.fleugplaneinschraenkung_laterInfixTo,h=message.fleugplaneinschraenkung_laterInfixDate,n=message.fleugplaneinschraenkung_laterSuffix,p=document["groupbooking.presentation.requestForm"],t=p.year_o.options[p.year_o.selectedIndex].value.substring(0,
4)+p.year_o.options[p.year_o.selectedIndex].value.substring(4,6)+p.day_o.options[p.day_o.selectedIndex].value,w="";w=document.getElementById("travel_type2").checked?"OneWay":"RoundTrip";w=w!="OneWay";var x=p.sector1_o.options[p.sector1_o.selectedIndex].value,E=p.sector1_d.options[p.sector1_d.selectedIndex].value,L=p.sector1_o.options[p.sector1_o.selectedIndex].text,Q=p.sector1_d.options[p.sector1_d.selectedIndex].text,O=true,I=checkAvailabilityDate(x,E,t);if(I!=""){O=I.slice(6,8)+"."+I.slice(4,6)+
"."+I.slice(0,4);t<I?s2.tuifly.widget.dialog.alertNotice(a+L+c+Q+d+O+b):s2.tuifly.widget.dialog.alertNotice(f+L+g+Q+h+O+n);O=false;var ba=I.slice(6,8),K=I.slice(0,4)+I.slice(4,6),C;for(C=0;C<p.year_o.options.length;C++)if(p.year_o.options[C].value==K)p.year_o.selectedIndex=C;for(C=0;C<p.day_o.options.length;C++)if(p.day_o.options[C].value==ba)p.day_o.selectedIndex=C;if(w){C=p.year_d.options[p.year_d.selectedIndex].value.substring(0,4)+p.year_d.options[p.year_d.selectedIndex].value.substring(4,6)+
p.day_d.options[p.day_d.selectedIndex].value;if(C<I){for(C=0;C<p.year_d.options.length;C++)if(p.year_d.options[C].value==K)p.year_d.selectedIndex=C;for(C=0;C<p.day_d.options.length;C++)if(p.day_d.options[C].value==ba)p.day_d.selectedIndex=C}}}if(w){C=p.year_d.options[p.year_d.selectedIndex].value.substring(0,4)+p.year_d.options[p.year_d.selectedIndex].value.substring(4,6)+p.day_d.options[p.day_d.selectedIndex].value;C<t&&alert(localizedTextEarlierDatePre);I=checkAvailabilityDate(E,x,C);if(I!=""){O=
I.slice(6,8)+"."+I.slice(4,6)+"."+I.slice(0,4);C<I?s2.tuifly.widget.dialog.alertNotice(a+Q+c+L+d+O+b):s2.tuifly.widget.dialog.alertNotice(f+Q+g+L+h+O+n);O=false;ba=I.slice(6,8);K=I.slice(0,4)+I.slice(4,6);for(C=0;C<p.year_d.options.length;C++)if(p.year_d.options[C].value==K)p.year_d.selectedIndex=C;for(C=0;C<p.day_d.options.length;C++)if(p.day_d.options[C].value==ba)p.day_d.selectedIndex=C}}return O}
function getAvailabilitySearchRange(a,c,d){var b=2,f=2;if(!available)return""+b+"|"+f;if(!available[a+" "+c])return""+b+"|"+f;var g=available[a+" "+c].slice(0,8);a=available[a+" "+c].slice(9,17);var h=new Date,n=h.getFullYear();c=h.getMonth()+1;var p=h.getDate();n=h.getFullYear().toString();if(c<10)n+="0";n+=c.toString();if(p<10)n+="0";n+=p.toString();if(g<n)g=n;h=new Date;h.setFullYear(d.slice(0,4));h.setMonth(d.slice(4,6)-1);h.setDate(d.slice(6,8));h.setTime(h.getTime()-864E5*b);n=""+h.getFullYear();
c="0"+(h.getMonth()+1);if(c.length>2)c=c.slice(c.length-2,c.length);p="0"+h.getDate();if(p.length>2)p=p.slice(p.length-2,p.length);for(c=n+c+p;c<g&&b>0;){b--;h.setTime(h.getTime()+864E5);n=""+h.getFullYear();c="0"+(h.getMonth()+1);if(c.length>2)c=c.slice(c.length-2,c.length);p="0"+h.getDate();if(p.length>2)p=p.slice(p.length-2,p.length);c=n+c+p}h=new Date;h.setFullYear(d.slice(0,4));h.setMonth(d.slice(4,6)-1);h.setDate(d.slice(6,8));h.setTime(h.getTime()+864E5*f);n=""+h.getFullYear();c="0"+(h.getMonth()+
1);if(c.length>2)c=c.slice(c.length-2,c.length);p="0"+h.getDate();if(p.length>2)p=p.slice(p.length-2,p.length);for(c=n+c+p;c>a&&f>0;){f--;h.setTime(h.getTime()-864E5);n=""+h.getFullYear();c="0"+(h.getMonth()+1);if(c.length>2)c=c.slice(c.length-2,c.length);p="0"+h.getDate();if(p.length>2)p=p.slice(p.length-2,p.length);c=n+c+p}return""+b+"|"+f}
function checkAvailabilityDate(a,c,d){if(!available)return"";if(!available[a+" "+c])return"";var b=available[a+" "+c].slice(0,8);a=available[a+" "+c].slice(9,17);var f=new Date;f.getFullYear();c=f.getMonth()+1;var g=f.getDate();f=f.getFullYear().toString();if(c<10)f+="0";f+=c.toString();if(g<10)f+="0";f+=g.toString();if(b<f)b=f;if(d<b)return b;if(d>a)return a;return""}
function openZusatzdatenMaske(){if(document.AirPlus&&document.AirPlus.action!=""){eingabeseite=window.open("","zusatzdaten","height=480, width=540, resizable=no, menubar=no, location=no, status=yes, toolbar=no, top=150, left=200");document.AirPlus.submit();eingabeseite.focus()}}
function filterString(a,c){if(c.match(/&/g)||c.match(/</g)||c.match(/>/g)||c.match(/\|/g)||c.match(/%/g)){c=c.replace(/&/g,"");c=c.replace(/</g,"");c=c.replace(/>/g,"");c=c.replace(/\|/g,"");c=c.replace(/%/g,"");document.getElementById(a).value=c;alert(message.notAllowedChar)}return true}function erase(a,c){if(a.value==c)a.value=""}function set(a,c){if(a.value=="")a.value=c}function strtrim(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}String.prototype.trim=strtrim;
function formatName(a){var c;c=paxNames[a].first+" ";if(paxNames[a].middle.trim().length>0)c+=paxNames[a].middle.trim()+" ";c+=paxNames[a].last;return c}
function displayPopUpConverter(){if(!window.converterWindow||converterWindow.closed)converterWindow=window.open("CurrencyConverter.aspx","converter","width=350,height=300,toolbar=0,status=0,location=0,menubar=0,scrollbars=0,resizable=0");else{converterWindow.open("CurrencyConverter.aspx","converter","width=350,height=300,toolbar=0,status=0,location=0,menubar=0,scrollbars=0,resizable=0");converterWindow.focus()}}
function displayPopUpFareRule(a,c,d){a="/FareRules.aspx?fareRuleKeys="+c+"&amp;class="+a+"&amp;paxTypes="+d;if(!window.fareRuleWindow||fareRuleWindow.closed)fareRuleWindow=window.popup(a,"fareRules","width=451,height=400,scrollbars=yes,status=no");else{fareRuleWindow.popup(a,"fareRule","width=451,height=400,scrollbars=yes,status=no");fareRuleWindow.focus()}}function isInArray(a,c){var d;for(d=0;d<a.length;d++)if(a[d]==c)return true;return false}
function print_r(a,c){var d="";c||(c=0);for(var b="",f=0;f<c+1;f++)b+="    ";if(typeof a=="object")for(var g in a){f=a[g];if(typeof f=="object"){d+=b+"'"+g+"' ...\n";d+=dump(f,c+1)}else d+=b+"'"+g+"' => \""+f+'"\n'}else d="===>"+a+"<===("+typeof a+")";alert(d)}function getFullServiceStatus(){if(typeof isFullService!="undefined")return isFullService;return false}
function getBluemilesNumberFromCookie(){var a=document.cookie,c=a.indexOf("bluemiles=");if(c<0)return null;c=c+9+1;var d=a.indexOf(";",c);if(d<c)d=a.length;if(d==c)return null;return a.substring(c,d)}
function fillBluemilesNumber(){var a=String(window.location),c=document.forms[0].length;if(window.location.search.indexOf("bm_nr=")!=-1){a=a.split("bm_nr=");for(var d=0;d<=c;d++){ElementArray=document.forms[0].elements[d].id.split("_");if(ElementArray[1]=="TextBoxUserID")document.forms[0].elements[d].value=decodeURIComponent(a[1])}}}
function removeOmittedRoutes(a){for(var c=0;c<a.length;c++)if(currentStation=Stations[a[c]]){var d=omittedRoutes[currentStation.code];if(d&&d.length>0)for(var b=0;b<currentStation.mkts.length;b++){currentStationMarket=currentStation.mkts[b];for(var f=0;f<d.length;f++)if(currentStationMarket==d[f]){currentStation.mkts.splice(b,1);b--;if(currentStation.mkts.length==0){a.splice(c,1);c--}break}}}for(c=0;c<a.length;c++)if(currentStation=Stations[a[c]])for(b=0;b<currentStation.mkts.length;b++){d=Stations[currentStation.mkts[b]];
if(d==null||!d.validDest){currentStation.mkts.splice(b,1);if(currentStation.mkts.length==0){a.splice(c,1);c--}break}}return a}
function getRouteIntersection(a){for(var c=false,d=0;d<a.length;d++)if((currentStation=Stations[a[d]])&&allyoucanflyRoutes[currentStation.code]&&allyoucanflyRoutes[currentStation.code].length>0)for(var b=0;b<currentStation.mkts.length;b++){currentStationMarket=currentStation.mkts[b];c=false;for(var f=0;f<allyoucanflyRoutes[currentStation.code].length;f++)if(currentStationMarket==allyoucanflyRoutes[currentStation.code][f]){c=true;break}if(!c){currentStation.mkts.splice(b,1);b--;if(currentStation.mkts.length==
0){a.splice(d,1);d--}}}else{a.splice(d,1);d--}for(d=0;d<a.length;d++)if(currentStation=Stations[a[d]])for(b=0;b<currentStation.mkts.length;b++){c=Stations[currentStation.mkts[b]];if(c==null||!c.validDest){currentStation.mkts.splice(b,1);if(currentStation.mkts.length==0){a.splice(d,1);d--}break}}return a}var RouteMaxDate=null;
function removeOutdatedRoutes(a){if(available)for(var c=(new Date).getTime(),d=0;d<a.length;++d){var b=Stations[a[d]];if(b)for(var f=0;f<b.mkts.length;++f){var g=available[b.code+" "+b.mkts[f]];if(g){var h=new Date;h.setDate(g.substring(15,17));h.setMonth(g.substring(13,15)-1);h.setFullYear(g.substring(9,13));if(RouteMaxDate==null)RouteMaxDate=h;if(RouteMaxDate.getTime()<h.getTime())RouteMaxDate=h;if(h.getTime()<c){b.mkts.splice(f,1);f--;if(b.mkts.length==0){a.splice(d,1);d--}}}}}return a}
function restrictRoutes(a,c){for(i=0;i<a.length;i++){var d=Stations[a[i]];for(k=0;k<d.mkts.length;k++){var b=d.mkts[k],f=false,g=[];if(c[d.code]!=null)g=g.concat(c[d.code]);if(c[b]!=null)g=g.concat(c[b]);if(g.length>0)for(l=0;l<g.length;++l)if(g[l]==d.code||g[l]==b){f=true;break}if(!f){d.mkts.splice(k,1);k--;if(d.mkts.length==0){a.splice(i,1);i--}}}}return a}var ElementsState=[],ExistingMarkets=[];function HideShowMarket(a,c){$("#marketCityPair_"+a).css("display",c);HideShowMarketDate(a,c)}
function HideShowMarketDate(a,c){$("#marketDate_"+a).css("display",c)}function marketChangeCheckChanged(a,c){DisableEnableMarket(c,!a.checked);$(".calIcon.enable").live("click",function(){var d=$(this).attr("data-market");$("#datePickerFlight_Market"+d).trigger("focus")})}function InitializeChange(){DisableEnableMarket(1,true);DisableEnableMarket(2,true)}
function DisableEnableMarket(a,c){$("#AVAILABILITYSEARCHINPUT_Market"+a+"Block").find("input").attr("disabled",c).end().find("select").attr("disabled",c).end();calenderIcon=$.cachedFind(".market"+a+".calIcon");if(c==true){calenderIcon.addClass("disable");calenderIcon.removeClass("enable")}else{calenderIcon.removeClass("disable");calenderIcon.addClass("enable")}var d=$("#datePickerFlight_Market"+a);d.attr("disabled",c);c?d.addClass("disabled"):d.removeClass("disabled")}
function EnableMarkets(){$("#AVAILABILITYSEARCHINPUT_Market1Block").find("input").attr("disabled",false).removeClass("disabled").end().find("select").attr("disabled",false).end();$("#AVAILABILITYSEARCHINPUT_Market2Block").find("input").attr("disabled",false).removeClass("disabled").end().find("select").attr("disabled",false).end()}
function SynchronizeHiddenFields(){var a=$("#"+applicationJavaScriptHtmlId+"_DropDownListNewPassengerType_ADT").val();$("#"+applicationJavaScriptHtmlId+"_DropDownListPassengerType_ADT").val(a)}function AvailabilitySearchValues_Validate(){SynchronizeHiddenFields();if(AreDateCheckBoxesInValidState()&&CheckCities()&&CheckDates()&&CheckPassengers()&&CheckPaxCount())return true;return false}
function AreDateCheckBoxesInValidState(){var a=GetDateCheckBox("CheckBoxChangeMarket",1),c=GetDateCheckBox("CheckBoxChangeMarket",2);if(!(a&&c))return true;if(a.checked||c.checked)return true;s2.tuifly.widget.dialog.alert(noDateSpecified);return false}function GetDateCheckBox(a,c){return document.SkySales[applicationJavaScriptHtmlId+"_"+a+"_"+c]}function ValidatePassengerCountValue(a){(a=parseInt(a,10))||(a=0);return a}
function GetAdultCount(){return ValidatePassengerCountValue($("#"+applicationJavaScriptHtmlId+"_DropDownListNewPassengerType_ADT").val())}function GetChildCount(){return ValidatePassengerCountValue($("#"+applicationJavaScriptHtmlId+"_DropDownListPassengerType_CHD").val())}function GetChildDiscountCount(){return ValidatePassengerCountValue($("#"+applicationJavaScriptHtmlId+"_DropDownListPassengerType_CHDD").val())}
function GetInfantCount(){return ValidatePassengerCountValue($("#"+applicationJavaScriptHtmlId+"_DropDownListPassengerType_INFANT").val())}function GetOriginValue(){return GetValue(document.SkySales[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"])}function GetDestinationValue(){return GetValue(document.SkySales[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"])}function GetMonthYearDepart(){return GetMonthYear(1)}function GetMonthYearReturning(){return GetMonthYear(2)}
function GetMonthDepart(){return GetMonthYearAsList(GetMonthYearDepart())[1]}function GetMonthReturning(){return GetMonthYearAsList(GetMonthYearReturning())[1]}function GetYearDepart(){return GetMonthYearAsList(GetMonthYearDepart())[0]}function GetYearReturning(){return GetMonthYearAsList(GetMonthYearReturning())[0]}function GetMonthYearAsList(a){return a.split("-")}function GetDayDepart(){return GetDay(1)}function GetDayReturning(){return GetDay(2)}
function GetMonthYear(a){return GetValue(document.SkySales[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+a])}function GetDay(a){return GetValue(document.SkySales[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+a])}
function CheckPassengers(){var a=localizedTextTooManyInfants,c=GetAdultCount(),d=GetInfantCount(),b=GetChildDiscountCount(),f=GetChildCount();if(d>c){s2.tuifly.widget.dialog.alertNotice(a);return false}a=d>0||b>0||f>0;if(!(c>0)&&a){s2.tuifly.widget.dialog.alert(message.UAM);return false}return true}
function UpdateCalendarDate(a){var c=document.SkySales,d=applicationJavaScriptHtmlId+"_DropDownListMarketDay"+a.passedInfo,b=applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+a.passedInfo,f=a.dateSelected.getMonth()+1;if(f<10)f="0"+f;var g=a.dateSelected.getDate();if(g<10)g="0"+g;c[b].value=a.dateSelected.getFullYear()+"-"+f;c[d].value=g}function findIndexByValue(a,c){for(var d=0;d<a.length;){if(a[d].value==c)return d;d++}return-1}
function addOption(a,c,d){var b=a.length;a[b]=new Option(c);a[b].value=d;return a.selectedIndex=b}function setDatesState(a,c){ElementsState["DropDownListMarketDay"+c]=a;ElementsState["DropDownListMarketMonth"+c]=a;ElementsState["DropDownListMarketDateRange"+c]=a;ElementsState["HyperLinkMarketCalendar"+c]=a}
function setPaxsState(a){ElementsState.DropDownListPassengerType_ADT=a;ElementsState.DropDownListPassengerType_CHD=a;ElementsState.DropDownListPassengerType_CHDD=a;ElementsState.DropDownListPassengerType_INF=a;ElementsState.PassengersBlock=a}function setMarketState(a,c){ElementsState["Market"+c+"Block"]=a}function validateElement(a){if(document.SkySales[applicationJavaScriptHtmlId+"_"+a]&&ElementsState[a]!="cancel")return true;return false}
function GetMarketStructure(){var a=$("#travelOptions input:checked").val();if(a=="OneWay")numDatesToValidate=numMarketsToValidate=1;else if(a=="RoundTrip"){numMarketsToValidate=1;numDatesToValidate=2}else if(a=="OpenJaw")numDatesToValidate=numMarketsToValidate=2;else numDatesToValidate=numMarketsToValidate=applicationNumberOfMarketsToOffer;return a}
function CheckDates(){for(var a=document.SkySales,c=applicationFormatedDate,d=applicationFormatedDay,b=applicationFormatedDateTime,f=1;f<=numDatesToValidate;f++)if(MarketAction[f]!="Cancel")if(validateElement("DropDownListMarketDay"+f)){var g=a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+f].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+f].selectedIndex].value,h=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+
f].selectedIndex].value.substring(5,7),n=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].selectedIndex].value.substring(0,4),p=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].selectedIndex].text,t=""+n+h+g;if(!CheckDaysOfMonth(g,h,n)){s2.tuifly.widget.dialog.alert(localizedTextInvalidDatePre+g+localizedTextInvalidDateMid+p+localizedTextInvalidDatePost);
return false}if(MarketLiftStatus[f]==null)MarketLiftStatus[f]="Default";if(t<c&&MarketLiftStatus[f]==applicationLiftStatus){if(f==1){c=localizedTextPastDatePre;if(MarketAction[f]=="New"||MarketAction[f]=="Change"){c+=localizedTextPastDatePost;s2.tuifly.widget.dialog.alert(c);a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+f].options.selectedIndex=d-1;a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].options.selectedIndex=findIndexByValue(a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+
f],b);$(a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+f]).change()}else s2.tuifly.widget.dialog.alert(c)}else{c=localizedTextEarlierDatePre;if(MarketAction[f]=="New"||MarketAction[f]=="Change"){c+=localizedTextEarlierDatePost;s2.tuifly.widget.dialog.alert(c);a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+f].options.selectedIndex=parseInt(a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+(f-1)].options.selectedIndex,10)+0;a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+
f].options.selectedIndex=parseInt(a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+(f-1)].options.selectedIndex,10)+0;$(a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+f]).change()}else s2.tuifly.widget.dialog.alert(c)}return false}c=t}for(f=1;f<=numDatesToValidate;f++)if(!(MarketAction[f]=="Cancel"||MarketAction[f]=="Retain"))if(validateElement("DropDownListMarketDay"+f)){a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+
f].selectedIndex].value.substring(5,7);a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+f].selectedIndex].value.substring(0,4);break}return true}var tempEventArgs,retryCount=0;function ExistingMarket(a,c,d,b,f){this.orig=a;this.dest=c;this.day=d;this.monthYear=b;this.monthYearValue=f}
function all(a){for(var c=applicationNumberOfMarketsToOffer,d=1;d<=c;d++)if(GetCheckedValue(applicationHtmlId+"RadioGroupMarket"+d)!=a)return false;return true}function exists(a){for(var c=applicationNumberOfMarketsToOffer,d=1;d<=c;d++)if(GetCheckedValue(applicationHtmlId+"RadioGroupMarket"+d)==a)return true;return false}
function CheckPaxCount(){var a=applicationPassengerArrayValues.split(","),c=document.SkySales,d=false;if(document.getElementById&&document.createTextNode){for(var b=0,f=0;f<a.length;f++)if(c[a[f]]!=void 0){d=true;b+=parseInt(c[a[f]].value)}s2.tuifly.util.Skin.get().toString();if(d&&b==0){s2.tuifly.widget.dialog.alert(localizedTextLessThanOnePassenger);return false}}return true}
function CheckCities(){for(var a=GetMarketStructure(),c=document.SkySales,d=[],b=-1,f=1;f<=numMarketsToValidate;f++)if(MarketAction[f]!="Cancel")if(applicationUseDropDownForStations){if(validateElement("DropDownListMarketOrigin"+f)){b+=1;if(c[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin"+f].selectedIndex==0)if(a=="TripPlanner"&&f>1){numMarketsToValidate=f-1;numDatesToValidate=f-1;break}else{s2.tuifly.widget.dialog.alert(localizedMissingOrigin);return false}}else if(a=="TripPlanner"&&f>1){numMarketsToValidate=
f-1;numDatesToValidate=f-1;break}if(validateElement("DropDownListMarketDestination"+f)){b+=1;if(c[applicationJavaScriptHtmlId+"_DropDownListMarketDestination"+f].selectedIndex==0){s2.tuifly.widget.dialog.alert(localizedMissingDest);return false}if(GetOriginValue()==GetDestinationValue()){s2.tuifly.widget.dialog.alert(localizedSameOriginDestination);return false}}}else{if(validateElement("TextBoxMarketOrigin"+f)){b+=1;d[b]=c[applicationJavaScriptHtmlId+"_TextBoxMarketOrigin"+f];if(IsEmpty(d[b],localizedTextTextBoxMarketOrigin))if(a==
"TripPlanner"&&f>1){numMarketsToValidate=f-1;numDatesToValidate=f-1;break}else{s2.tuifly.widget.dialog.alert(localizedMissingOrigin);return false}}else if(a=="TripPlanner"&&f>1){numMarketsToValidate=f-1;numDatesToValidate=f-1;break}if(validateElement("TextBoxMarketDestination"+f)){b+=1;d[b]=c[applicationJavaScriptHtmlId+"_TextBoxMarketDestination"+f];if(IsEmpty(d[b],localizedTextTextBoxMarketDestination)){s2.tuifly.widget.dialog.alert(localizedMissingDest);return false}if(d[b].value.toUpperCase()==
d[b-1].value.toUpperCase()){s2.tuifly.widget.dialog.alert(localizedSameOriginDestination);return false}}}if(!applicationOpenJawEnabled){a=true;if(d.length>2)for(b=1;b<d.length-1;b+=2)if(d[b].value.toUpperCase()!=d[b+1].value.toUpperCase()){a=false;break}if(!a){s2.tuifly.widget.dialog.alert(localizedInvalidCityPairs);return false}}return true}
function setStationsState(a,c){if(applicationUseDropDownForStations){ElementsState["DropDownListMarketOrigin"+c]=a;ElementsState["DropDownListMarketDestination"+c]=a}else{ElementsState["TextBoxMarketOrigin"+c]=a;ElementsState["TextBoxMarketDestination"+c]=a}}
function OriginMac(a){var c=a.id.substring(a.id.length-1);if(c>0){var d=document.getElementById(applicationJavaScriptHtmlId+"_CheckBoxUseMacOrigin"+c);c=document.getElementById(applicationJavaScriptHtmlId+"_LabelUseMacOrigin"+c);if(d&&c){setMac(a,d,c);a=a.id;a=a.replace(/Origin/,"Destination");a=document.getElementById(a);DestinationMac(a)}}}
function DestinationMac(a){var c=a.id.substring(a.id.length-1);if(c>0){var d=document.getElementById(applicationJavaScriptHtmlId+"_CheckBoxUseMacDestination"+c);c=document.getElementById(applicationJavaScriptHtmlId+"_LabelUseMacDestination"+c);d&&c&&setMac(a,d,c)}}
function setMac(a,c,d){if(Stations&&a&&c&&d&&a.value&&Stations[a.value.toUpperCase()]!=null&&Stations[a.value.toUpperCase()].macCode.length>0){if(c)c.style.display=Stations[a.value.toUpperCase()]!=null&&a.value.toUpperCase()==Stations[a.value.toUpperCase()].macCode.toUpperCase()?"none":"block";if(d){d.innerHTML=macSearchAllText+Stations[a.value.toUpperCase()].macCode+macCodeSeparator;d.style.display="block"}if(Stations[a.value.toUpperCase()]!=null)for(var b in MacsArray[Stations[a.value.toUpperCase()].macCode]){if(b>
0)d.innerHTML+=macCitySeparator;d.innerHTML+=MacsArray[Stations[a.value.toUpperCase()].macCode][b]}}else{if(c){c.checked=false;c.style.display="none"}if(d){d.innerHtml="";d.style.display="none"}}}
function initMacs(){for(var a=1;a<=applicationNumberOfMarketsToOffer;a++){var c=document.getElementById(applicationJavaScriptHtmlId+"_TextBoxMarketOrigin"+a),d=document.getElementById(applicationJavaScriptHtmlId+"_TextBoxMarketDestination"+a),b=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketOrigin"+a),f=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDestination"+a);c&&OriginMac(c);d&&DestinationMac(d);b&&OriginMac(b);f&&DestinationMac(f)}}
function highlightMoveDays(a,c){var d=a.id.charAt(a.id.length-1);try{var b=window["moveDepartureDays"+d]}catch(f){return}if(b!=null){d=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDay"+d);for(var g=0;g<d.options.length;g++)d.options[g].className="";if(b[a.value]!=null){b=b[a.value].split(",");for(g=0;g<b.length;g++)d.options[b[g]-1].className=c}}}
function highlightMoveOriginCities(a,c){try{var d=window["moveDepartureCities"+a]}catch(b){return}if(d!=null)for(var f=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketOrigin"+a),g=0;g<d.length;g++)for(var h=0;h<f.options.length;h++)if(d[g]==f.options[h].value){f.options[h].className=c;break}}
function highlightMoveDestinationCities(a,c){try{var d=window["moveArrivalCities"+a]}catch(b){return}if(d!=null)for(var f=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDestination"+a),g=0;g<d.length;g++)for(var h=0;h<f.options.length;h++)if(d[g]==f.options[h].value){f.options[h].className=c;break}}AvailabilitySearchInput={};function pad(a,c){for(var d=""+a;d.length<c;)d="0"+d;return d}
function ReturnDateDisplay(){document.getElementById("searchLanding")?AvailabilitySearchInput.ToggleMarketOptions("slow"):AvailabilitySearchInput.ToggleMarketOptions();$.datepicker._hideDatepicker()}
AvailabilitySearchInput.ToggleMarketOptions=function(a){GetMarketStructure();var c=$("#travelOptions"),d=$(":checked",$(c));if(d.val()=="RoundTrip"){$("#marketCityPair_2").hide();$("#marketDate_2").show(a)}else if(d.val()=="OpenJaw"){$("#marketCityPair_2").show();$("#marketDate_2").show(a)}else{$("input[value=OneWay]",c).select();$("#marketCityPair_2").hide();$("#marketDate_2").hide(a)}};
$(document).ready(function(){!document.getElementById("#availabilitySearchInput")||window.applicationNumberOfMarketsToOffer!=null||initMacs()});$(document).ready(function(){if(document.getElementById("#availabilitySearchInput")){$("#aosAvailabilitySearchDivBody").hide();$("#aosAvailbilitySearchDivHeader").hide()}});var mode="initial";
AvailabilitySearchInput.ToggleAvailabilitySearchForm=function(){$("#searchDivHeader").toggle();$("#searchDivHeaderBody").toggle();$("#SearchDivHeaderFooter").toggle();$("#ssrSearchDivHeader").toggle();$("#ssrSearchDivBody").toggle();$("#ssrSearchDivFooter").toggle();$("#aosAvailabilitySearchDivBody").toggle();$("#aosAvailbilitySearchDivFooter").toggle();$("#aosAvailbilitySearchDivHeader").toggle()};
$(document).ready(function(){if(document.getElementById("#availabilitySearchInput")){AvailabilitySearchInput.ToggleMarketOptions();$("#travelOptions > input").click(function(){AvailabilitySearchInput.ToggleMarketOptions()})}});var jsLoaded=true;function showFlightSearch(){}function validateRouteRestrictions(){return s2.tuifly.helper.search.validateRouteRestrictions()}var AFRICA_NOTE_DISPLAYED=false;function validateAfricanAirports(){return true}var allyoucanflyRoutes=[];
allyoucanflyRoutes.AGP=["CGN","STR"];allyoucanflyRoutes.ARN=["HAJ","STR"];allyoucanflyRoutes.BGY=["HAJ"];allyoucanflyRoutes.BIO=["CGN"];allyoucanflyRoutes.BOJ=["CGN"];allyoucanflyRoutes.BRI=["BSL","CGN","MUC","STR"];allyoucanflyRoutes.BSL=["BRI"];allyoucanflyRoutes.CAG=["CGN","MUC","STR"];allyoucanflyRoutes.CGN=["AGP","BIO","BOJ","BRI","CAG","CTA","FMM","GRZ","GWT","HAM","INN","KLU","LNZ","MAN","NAP","OLB","PMO","PSA","RJK","RMI","SZG","TXL","VCE","VLC"];
allyoucanflyRoutes.CTA=["CGN","DUS","FRA","HAJ","HAM","MUC","STR"];allyoucanflyRoutes.DBV=["HAJ","MUC","STR"];allyoucanflyRoutes.DUS=["CTA","NAP"];allyoucanflyRoutes.FCO=["FMM","HAJ"];allyoucanflyRoutes.FMM=["CGN","FCO","HAM","NAP","TXL","VCE"];allyoucanflyRoutes.FMO=["VCE"];allyoucanflyRoutes.FRA=["CTA","NAP","OLB"];allyoucanflyRoutes.GRZ=["CGN"];allyoucanflyRoutes.GWT=["CGN","STR"];
allyoucanflyRoutes.HAJ=["ARN","BGY","CTA","DBV","FCO","KLU","MAN","NAP","NCL","OLB","ORY","PMO","PSA","RJK","RMI","STR","SZG","VCE","VLC"];allyoucanflyRoutes.HAM=["CGN","CTA","FMM","KLU","NAP","OLB","SZG","VCE"];allyoucanflyRoutes.INN=["CGN"];allyoucanflyRoutes.KLU=["CGN","HAJ","HAM","TXL"];allyoucanflyRoutes.LNZ=["CGN"];allyoucanflyRoutes.MAN=["CGN","HAJ","STR"];allyoucanflyRoutes.MUC=["BRI","CAG","CTA","DBV","NAP","OLB","PMO","RJK","RMI"];
allyoucanflyRoutes.NAP=["CGN","DUS","FMM","FRA","HAJ","HAM","MUC","STR"];allyoucanflyRoutes.NCL=["HAJ"];allyoucanflyRoutes.OLB=["CGN","FRA","HAJ","HAM","MUC","STR"];allyoucanflyRoutes.ORY=["HAJ"];allyoucanflyRoutes.PMO=["CGN","HAJ","MUC","STR","TXL"];allyoucanflyRoutes.PSA=["CGN","HAJ","STR"];allyoucanflyRoutes.RJK=["CGN","HAJ","MUC","STR"];allyoucanflyRoutes.RMI=["CGN","HAJ","MUC","STR"];
allyoucanflyRoutes.STR=["AGP","ARN","BRI","CAG","CTA","DBV","GWT","HAJ","MAN","NAP","OLB","PMO","PSA","RJK","RMI","TXL","VCE","VLC"];allyoucanflyRoutes.SZG=["CGN","HAJ","HAM","TXL"];allyoucanflyRoutes.TXL=["CGN","FMM","KLU","PMO","STR","SZG","VCE"];allyoucanflyRoutes.VCE=["CGN","FMM","FMO","HAJ","HAM","STR","TXL"];allyoucanflyRoutes.VLC=["CGN","HAJ","STR"];
(function(){var a=function(){};window.s2=new a;window.s2.initializeCallbacks={};window.s2.namespace=function(c,d){for(var b=c.split("."),f=window,g=0;g<b.length;g++){var h=b[g];if(f[h]==null)f[h]=new a;f=f[h]}d.call(f,f);if(typeof f.initialize==="function")window.s2.initializeCallbacks[c]=function(){f.initialize()}};window.s2.evalNamespace=function(c){c=c.split(".");for(var d=window,b=0;b<c.length;b++){var f=c[b];if(d[f]==null)d[f]=new a;d=d[f]}return d}})();
s2.namespace("s2.tuifly",function(){Class("s2.tuifly.LazyMetaClass",{isa:Joose.Class,override:{initializeFromProps:function(a){var c=this,d=this.SUPER,b=false,f=function(){if(!b){b=true;joose.top.CHAOTIC_TRAVERSION_ORDER=true;a.isa&&a.isa.finishBuild&&a.isa.finishBuild();d.call(c,a)}};this.addClassMethod("finishBuild",f);this.addClassMethod("create",function(){f();return this.create.apply(this,arguments)});this.c.getInstance=function(){f();return this.getInstance.apply(this,arguments)}}}})});
s2.namespace("s2.tuifly",function(){var a=false,c,d="",b=2,f=function(){c.show();c.html(d)},g=false;$(document).ready(function(){g=true});var h="";this.Logger={init:function(){if((new String(location.hash)).indexOf("debug")>-1)b=4},log:function(n,p){if(window.console&&!document.all){var t="";if(arguments.callee&&arguments.callee.caller&&arguments.callee.caller.name)t=arguments.callee.caller.name+": ";p?console.error(t+n):console.log(t+n)}else if(g){if(h){n=h+"\n"+n;h=null}if(a){n=n.replace(/\n/g,
"<br />\n");d=n+"<br />\n"+d;t&&clearTimeout(t);t=setTimeout(f,1E3)}else{a=true;$(document.body).append("<div id='s2Log' style='position: absolute; top: 10px; left: 10px; width: 500px; height: 400px; padding: 5px; overflow: auto; text-align: left; background-color: white; z-index: 9999; display: block'></div>");c=$("#s2Log");c.dblclick(function(){c.hide()});this.log(n)}}else h+=n},debug:function(n){b<4||this.log(n)},error:function(n){this.log(n,true)}};this.Logger.init();s2.Logger=this.Logger});
s2.namespace("s2.tuifly.monkeyPatch",function(){var a=[];this.patch=function(c,d){a.push([c,d])};$(document).ready(function(){jQuery.each(a,function(){window[this[0]]=this[1]});window.changeDest=changeDest_S2});this.wrap=function(c,d,b){b=b;if(b==null)b=window;var f=b[c];b[c]=function(){var g=f.apply(this,arguments);d.apply(this,arguments);return g}};this.around=function(c,d,b){b=b;if(b==null)b=window;var f=b[c];b[c]=function(){var g=[f].concat(Array.prototype.slice.call(arguments,0));return d.apply(this,
g)}};this.getDotNetNamespacedThing=function(c){var d=RegExp(c+"$"),b;Joose.O.each(window,function(f,g){if(g.match(d)){b=f;return false}});if(b==null)throw Error("Cant find object with suffix "+c);return b}});
s2.namespace("s2.tuifly",function(){var a=0;this.Event=function(c){this.eventName="s2:"+c;this.lazyTimeout=[]};this.Event.prototype={trigger:function(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];$(document).trigger(this.eventName,[c])},observe:function(c){var d=this;$(document).bind(this.eventName,function(b,f){c.apply(d,f)})},observeOnce:function(c){var d=this;this.observe(function(b,f){f?c.apply(d,f):c.call(d);$(document).unbind(d.eventName,c)})},observeLazy:function(c,d){var b=this,
f=a,g=d||200;this.observe(function(){b.lazyTimeout[f]&&clearTimeout(b.lazyTimeout[f]);var h=arguments;b.lazyTimeout[f]=setTimeout(function(){c.apply(b,h)},g)});a++},toString:function(){return this.eventName}}});
s2.namespace("s2.tuifly.events",function(){this.AjaxStartEvent=new s2.tuifly.Event("AjaxStartEvent");this.AjaxEndEvent=new s2.tuifly.Event("AjaxEndEvent");this.DocResize=new s2.tuifly.Event("DocResize");this.AvailibilityCookieDataSet=new s2.tuifly.Event("AvailibilityCookieDataSet");this.SubmitLinkButton=new s2.tuifly.Event("SubmitLinkButton")});
s2.namespace("s2.tuifly.util",function(){var a=this;Class("s2.tuifly.util.CurrencyValue",{has:{value:{isa:TYPE.Num,is:"rw",required:true},symbol:{isa:TYPE.Str,is:"rw",required:true},format:{is:"rw",init:"%.2f"},symbolAfterValue:{is:"rw",init:true}},override:{getSymbol:function(){var c=this.SUPER();c=c.replace(/\s+/g,"");c=c.replace(/[\r\n]/g,"");return c=c.replace(/\&nbsp;/g,"")}},methods:{getCode:function(){var c=this.getSymbol();return c=="€"?"EUR":c=="£"?"GBP":c=="SFr"?"SFr":c=="$"?"USD":c=="Kc"?
"CZK":c=="kr"?"SEK":""},stringify:function(){var c=""+JooseX.Culture.Factory.get().formatNumber(this.getValue(),this.format);return this.getSymbolAfterValue()?""+c+" "+this.getSymbol():""+this.getSymbol()+" "+c},greaterZero:function(){return this.getValue()>0},add:function(c){var d=this.checkPara(c);d=this.meta.instantiate({value:c.getValue()+this.getValue(),symbol:d});d.setSymbolAfterValue(this.getSymbolAfterValue()&&c.getSymbolAfterValue());return d},substract:function(c){var d=this.checkPara(c);
d=this.meta.instantiate({value:this.getValue()-c.getValue(),symbol:d});d.setSymbolAfterValue(this.getSymbolAfterValue()&&c.getSymbolAfterValue());return d},mul:function(c){c=this.meta.instantiate({value:c*this.getValue(),symbol:this.getSymbol()});c.setSymbolAfterValue(this.getSymbolAfterValue());return c},checkPara:function(c){if(!c||!c instanceof a.CurrencyValue)throw Error("invalid currency object "+c);if(c.getSymbol()!=this.getSymbol()){if(c.getValue()==0)return this.getSymbol();if(this.getValue()==
0)return c.getSymbol();s2.tuifly.Logger.debug("Trying to add different currencies: '"+c.getSymbol()+"' vs. '"+this.getSymbol()+"'")}return this.getSymbol()}},classMethods:{getDefaultCurrencySymbol:function(){return this.defaultCurrencySymbol},setDefaultCurrencySymbol:function(c){this.defaultCurrencySymbol=c},zero:function(c){return this.meta.instantiate({value:0,symbol:c||this.getDefaultCurrencySymbol()})}}});Type("S2Currency",{uses:TYPE.Obj,where:function(c){return c instanceof a.CurrencyValue},
coerce:[{from:TYPE.Str,via:function(c,d){var b=d&&d.culture?JooseX.Culture.Factory.get(d.culture):JooseX.Culture.Factory.get(),f;c=c.replace(/\&nbsp\;/g," ");if(f=c.match(/(\D*)\s*(-*\d+[.,]*\d*[.,]*\d*)\s*(\D*)/)){c=b.parseNumber(f[2]);b=f[1];var g=f[3];b=(f=typeof g=="string"&&g.length>0?true:false)?g:b;b=b.replace(/\s/g,"");b=new a.CurrencyValue({value:c,symbol:b});b.setSymbolAfterValue(f);return b}return null}}]})});
s2.namespace("s2.tuifly.util",function(){var a,c;this.Query=function(d){this.queryString=d?d:window.location.search;this.query=this.parse();c=this};this.Query.instance=function(){c||new this.Query;return c};this.Query.prototype={asHash:function(){return this.query},normalize:function(d){if(d==null)d="";d=""+d;return d.toLowerCase()},param:function(d,b){if(b!=null&&d!=""&&d!=null)this.query[this.normalize(d)]=b;return this.query[this.normalize(d)]},parse:function(){if(a)return a;var d=this.queryString;
d=d.substr(1);if(d==null)d="";parts=d.split("&");d={};for(var b=0;b<parts.length;b++){var f=parts[b].split("=");if(f[0]!="")d[this.normalize(unescape(f[0]))]=unescape(f[1])}return a=d},toString:function(){var d=[],b;for(b in this.query){var f=b;if(f!=null&&f!=""){f=this.normalize(f);d.push(encodeURIComponent(f)+"="+encodeURIComponent(this.query[b]))}}return d.join("&")}}});
s2.namespace("s2.tuifly.util",function(){this.Text=function(a){if(typeof a=="undefined")a="";this.sourceObject=a};this.Text.prototype={get:function(a,c){var d=this._get(a);c&&Joose.O.each(c,function(b,f){d=d.replace(RegExp("{"+f+"}"),b)});return d},_get:function(a){var c=this.sourceObject;if(c&&c.find)return c.find("> param[name='"+a+"']").val();return c[a]}};this.removeHtmlTags=function(a){var c=document.createElement("DIV");c.innerHTML=a;return c.textContent||c.innerText}});
s2.namespace("s2.tuifly.util",function(){this.Skin=function(){this.id=this.fetch()};var a;this.Skin.get=function(){if(a)return a;return a=new this};this.Skin.prototype={fetch:function(){var c=jQuery("body").attr("class").match(/Skin(\w+)/);if(c)return c[1];return""},toString:function(){return this.id},identifier:function(){return this.id},isConsumer:function(){return this.toString().match(/^hlxconsumer$/i)?true:false},isMember:function(){return this.toString().match(/^hlxmember$/i)?true:false},isAgent:function(){return this.toString().match(/^hlxagencymaster$/i)?
true:false},isPep:function(){return this.toString().match(/^hlxpepagent$/i)?true:false},isInterline:function(){return this.toString().match(/^hlxinterline$/i)?true:false},isCorporate:function(){return this.toString().match(/^hlxcorporatemaster$/i)?true:false}}});
s2.namespace("s2.tuifly.util",function(){this.Environment=function(){this.env=this.getEnv()};var a;this.Environment.get=function(){if(a)return a;return a=new this};this.Environment.prototype={getEnv:function(){return this.isProd()?"produktion":this.isStage()?"prod":"devel"},isProd:function(){return location.host.match(/tuifly\.com$/)||location.host.match(/hlx\.com$/)||location.host.match(/hlx\.de$/)?true:false},isStage:function(){if(location.host.match(/stage.tuifly.sinnerschrader.de/)||location.host.match(/236$/))return true;
return false},isDev:function(){if(location.host.match(/devel.tuifly.sinnerschrader.de/)||location.host.match(/10080$/))return true;return false},secureUrl:function(c){JooseX.Culture.Factory.get().identifier();var d=this.isProd()||this.isStage()?"https://":"http://",b=location.hostname;if(location.port!="80"&&location.port!="443"&&location.port!="")b+=":"+location.port;return d+b+c},OmnitureAccount:function(){var c=JooseX.Culture.Factory.get().majorIdentifier(),d=this.env,b;if(c&&d)b="tuifly-"+d+"-"+
c;return b}}});s2.namespace("s2.tuifly.util.booking",function(){this.isChangeProcess=function(){var a=$("#s2data div[node^='BookingInfoXML'] div[node='booking']").attr("ischangeprocess");if(typeof a=="undefined")return false;return a.match(/true/i)?true:false};this.journeyFromClass=function(a){a=a.attr("class");var c=a.match(/journey(\d+)/);if(c)return parseInt(c[1],10);throw"Cant find journey in "+a;}});
s2.namespace("s2.tuifly.util",function(){this.TextMetrics=function(a,c){this.text=""+c;this.jQueryObject=$(a).eq(0);var d={"font-family":this.jQueryObject.css("font-family"),"font-size":this.jQueryObject.css("font-size"),"font-weight":this.jQueryObject.css("font-weight"),"font-style":this.jQueryObject.css("font-style"),"text-transform":this.jQueryObject.css("text-transform"),"text-decoration":this.jQueryObject.css("text-decoration"),"letter-spacing":this.jQueryObject.css("letter-spacing"),"word-spacing":this.jQueryObject.css("word-spacing"),
direction:this.jQueryObject.css("direction"),position:"absolute",visibility:"hidden",height:"auto",width:"auto","z-index":"-1"};this.textNode=jQuery("<pre>"+c+"</pre>").css(d);this.doc=$("body")};this.TextMetrics.prototype={width:function(){this.doc.append(this.textNode);var a=this.textNode.width();this.textNode.remove();return a},elementWidth:function(){var a=this.jQueryObject.width();if(a==0){a=this.jQueryObject.css("width");a=a.match(/^\d+px$/)?parseInt(a.substring(a,a.length-2)):0}return a},getIndexAtX:function(a){a=
parseInt(a);if(this.text.length==0||isNaN(a))return-1;if(a<=0)return 0;this.doc.append(this.textNode);var c=this.textNode.width();if(c<=a){this.textNode.remove();return this.text.length}c=Math.round(this.text.length*a/c);for(var d=this.textNode.text(this.text.substr(0,c)).width(),b=this.textNode.text(this.text.substr(0,c+1)).width(),f=10;(!(d<=a)||!(a<b))&&f>0;){if(b<a)c++;else c--;d=this.textNode.text(this.text.substr(0,c)).width();b=this.textNode.text(this.text.substr(0,c+1)).width();f--}this.textNode.remove();
return c}}});
s2.namespace("s2.tuifly.util",function(){var a,c={};window.streckenliste={};this.routes=function(d){this.load(d)};this.routes.get=function(d){if(a){d(a);return a}return a=new this(d)};this.routes.airberlinFormerTuifly=function(){return c};this.routes.isInAirberlinFormerTuifly=function(d){return c[d]!=null};this.routes.prototype={load:function(d){var b=this;$.get("/pregenerated/strecken.csv",function(f){f=f.split("\r\n");var g={},h;for(h in f){var n=f[h].split(";");if(n.length>2){var p=n[0].toLowerCase(),
t=n[1].toLowerCase();n=n[2].toLowerCase();p=s2.tuifly.util.generateRouteKey(p,t,n);g[p]=true}}b.obj=g;d(b)})},check:function(d,b,f){d=d.toLowerCase();b=b.toLowerCase();return this.obj[s2.tuifly.util.generateRouteKey(d,b,f)]?true:false},isX3:function(d,b){return this.check(d,b,"x3")||this.check(d,b,"hf")}};this.generateRouteKey=function(d,b,f){d=d.toLowerCase();b=b.toLowerCase();f=f.toLowerCase();return d+"-"+b+"-"+f}});
s2.namespace("s2.tuifly.util.culture",function(){var a=this,c=false;a.store={};a._initialize=function(){$(".qCultureData").children().each(function(){var d=$(this),b=d.attr("name");d=d.attr("value");b&&d&&a.add(b,d)})};a.add=function(d,b){if(a.store[d]){var f="Culture mit der ID <"+d+"> ist bereits vorhanden:\n\n"+a.get(d);location.href.match(/tuifly\.com/)?s2.Logger.error(f):origAlert(f)}else a.store[d]=b};a.get=function(d){if(!c){c=true;a._initialize()}return a.store[d]};a.log=function(){console.log(a.store)}});
s2.namespace("s2.tuifly.util.toolbox",function(){var a=this;a.dynamicPostForm=function(){this.parameters={};this.initByUrl=function(c,d){var b=this;b.setTarget(d);var f=[];f=c.match(/^(http|https)/i)?c.match(/^(http|https):\/\/[-:\.a-z0-9]+(\/.+)\?(.*)/i):c.match(/(.+)\?(.*)/i);if(f[1]&&f[2]){b.action=f[1];f=f[2].split("&");jQuery.each(f,function(g,h){var n=h.split("="),p=n[0];h=n[1];b.parameters[p]=h})}};this.init=function(c,d,b){this.action=c;this.setTarget(b);if(typeof d=="object")this.parameters=
d};this.setTarget=function(c){c||(c="");this.target=c};this.submit=function(){var c=$("<form/>"),d=$(c);d.attr("method","POST");d.attr("target",this.target);jQuery.each(this.parameters,function(b,f){var g=$($("<input/>"));g.attr("type","hidden");g.attr("name",b);g.attr("value",f);d.append(g)});d.attr("action",this.action);$("body").append(c);d.trigger("submit")}};this.openURLAsPostRequest=function(c){var d=new a.dynamicPostForm;d.initByUrl(c);d.submit()};this.shortenTextInElement=function(c,d,b){b||
(b="...");d=""+d;var f=new s2.tuifly.util.TextMetrics(c,d),g=f.elementWidth();if(0<g&&g<f.width())d=d.substr(0,f.getIndexAtX(g-(new s2.tuifly.util.TextMetrics(c,b)).width()))+b;return d};this.createMementooPITag=function(){}});
s2.namespace("s2.tuifly.util.tracking",function(){var a=this,c={ORDINARY:"o",DOWNLOAD:"d",EXIT:"e"};a.fire=function(d){if(typeof s=="undefined"||typeof s=="string")s=a.getObject();d.events=d.events||[];d.values=d.values||{};d.delay=typeof d.delay=="undefined"?false:d.delay;d.type=d.type||c.ORDINARY;d.name=d.name||"";d.element=d.element||document;var b=[],f=[];if(d.events.length>0){b.push("events");f=d.events}for(var g in d.values){s[g]=d.values[g];b.push(g)}s.linkTrackVars=b.join(",");s.events=s.linkTrackEvents=
f.join(",");s.tl(d.delay?d.element:true,d.type,d.name);s.linkTrackVars="None";s.linkTrackEvents="None"};a.getObject=function(){if(typeof s=="undefined"||typeof s=="string"){s_account="tuifly-"+s2.tuifly.util.Environment.get().getEnv()+"-de";s=s_gi(s_account)}return s}});
s2.namespace("s2.tuifly.validation",function(){function a(d,b){var f=events[d];if(f!=void 0)for(var g=0;g<f.length;g++){var h=f[g];if(h&&window[h]){if(window[h](b)==false)return false}else s2.Logger.debug("Cant find event "+d+" func "+h)}return true}var c=this;this.monkeyPatch=function(){s2.tuifly.monkeyPatch.patch("Validate",c.Validate);s2.tuifly.monkeyPatch.patch("validate",c.validate);s2.tuifly.monkeyPatch.patch("setError",c.setError);s2.tuifly.monkeyPatch.patch("outputErrors",c.outputErrors);
s2.tuifly.monkeyPatch.patch("raise",a)};this.Validate=function(d,b,f,g){this.form=d;this.namespace=b;this.errors=[];this.setfocus=null;this.errorsHeader=f;this.namedErrors=[];if(g)this.regexElementIdFilter=g;this.requiredAttribute="required";this.requiredEmptyAttribute="requiredempty";this.validationTypeAttribute="validationtype";this.regexAttribute="regex";this.minAgeAttribute="minage";this.minLengthAttribute="minlength";this.numericMinLengthAttribute="numericminlength";this.maxLengthAttribute="maxlength";
this.numericMaxLengthAttribute="numericmaxlength";this.minValueAttribute="minvalue";this.maxValueAttribute="maxvalue";this.equalsAttribute="equals";this.validateIfCheckedOnlyAttribute="validateIfCheckedOnly";this.validateIfNotCheckedOnlyAttribute="validateIfNotCheckedOnly";this.defaultErrorAttribute="error";this.requiredErrorAttribute="requirederror";this.validationTypeErrorAttribute="validationtypeerror";this.regexErrorAttribute="regexerror";this.minAgeErrorAttribute="minageerror";this.minLengthErrorAttribute=
"minlengtherror";this.maxLengthErrorAttribute="maxlengtherror";this.minValueErrorAttribute="minvalueerror";this.maxValueErrorAttribute="maxvalueerror";this.equalsErrorAttribute="equalserror";this.defaultError="{label} is invalid.";this.defaultRequiredError="{label} is required.";this.defaultRegexError=this.defaultValidationTypeError="{label} is invalid.";this.defaultMinAgeError="{label}: There is a minimum age.";this.defaultMinLengthError="{label} is too short in length.";this.defaultMaxLengthError=
"{label} is too long in length.";this.defaultMinValueError="{label} must be greater than {minValue}.";this.defaultMaxValueError="{label} must be less than {maxValue}.";this.defaultEqualsError="{label} is not equal to {equals}";this.defaultNotEqualsError="{label} cannot equal {equals}";this.defaultValidationErrorClass="validationError";this.defaultValidationErrorLabelClass="validationErrorLabel";this.requiredErrorOccured=false;this.run=run;this.runBySelector=runBySelector;this.validateSingleElement=
validateSingleElement;this.outputErrors=outputErrors;this.checkFocus=checkFocus;this.setError=setError;this.cleanAttributeForErrorDisplay=cleanAttributeForErrorDisplay;this.validateRequired=validateRequired;this.validateType=validateType;this.validateRegex=validateRegex;this.validateMinAge=validateMinAge;this.validateMinLength=validateMinLength;this.validateMaxLength=validateMaxLength;this.validateMinValue=validateMinValue;this.validateMaxValue=validateMaxValue;this.validateEquals=validateEquals;
this.isExemptFromValidation=isExemptFromValidation;this.setValidateTypeError=setValidateTypeError;this.validateAmount=validateAmount;this.validateDate=validateDate;this.validateMod10=validateMod10;this.validateNumeric=validateNumeric;this.stringPattern="^.+$";this.upperCaseStringPattern="^[A-Z]([A-Z)|s)*$";this.numericPattern="^\\d+$";this.numericStripper=/\D/g;this.alphaNumericPattern="^\\w+$";this.amountPattern="^(\\d+((\\.|,)\\d+)*)$";this.dateYearPattern="^\\d{4}$";this.dateDayPattern=this.dateMonthPattern=
"^\\d{2}$";this.emailPattern=/^(?:[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/};this.setError=
function(d,b,f,g){if(d.type=="radio"){var h=d.getAttribute("name");if(h.length>0){if(this.namedErrors[h]!=null)return;this.namedErrors[h]=h}}h=d.errorAttribute;if(h==null)h=d.getAttribute(b);h||(h=d[this.defaultErrorAttribute]?d[this.defaultErrorAttribute]:f?f:this.defaultError);h=h.replace(/^{\s*\w+\s*}\:\s+/,"");if(b=h.match(/{\s*(\w+)\s*}/g))for(f=0;f<b.length;f++){var n=b[f].replace(/{\s*(\w+)\s*}/,"$1");h=h.replace(/{\s*\w+\s*}/,this.cleanAttributeForErrorDisplay(d,n))}h=new s2.tuifly.validation.Error(d,
h);h.displayAsAlert=g==true;this.errors.push(h);this.checkFocus(d)};this.outputErrors=function(){if(this.errors.length>0){s2.tuifly.widget.collapsiblePanel.openIfError();if(this.setfocus){var d=$(this.setfocus);try{d.get(0).showStub&&d.get(0).showStub();d.focus()}catch(b){s2.Logger.debug(b)}d=d.offset().top-100;if(d<0)d=0;window.scrollTo(0,d);this.requiredErrorOccured&&alert(requiredErrorMessage);d=0;for(var f=this.errors.length;d<f;d++){var g=this.errors[d];if(!g.isRequiredError)if(g.displayAsAlert)alert(g.message);
else if(document.getElementById("paymentInputContent"))alert(requiredErrorMessage);else{g.errorLabel.addClass("formRowErrorMessage");g.errorLabel.removeClass("hidden")}}}return false}return true};this.validate=function(d,b,f){if(document.getElementById&&document.createTextNode){s2.tuifly.validation.Error.clearAll();if(d.getAttribute)d=d.getAttribute("id").replace(/_\w+$/,"");f=new c.Validate(document.SkySales,d+"_","Please correct the following.\n\n",f);if(b){var g=b;b.getAttribute||(g=document.getElementById(d+
"_"+b));f.validateSingleElement(g);return f.outputErrors()}return f.run()}return true};this.checkBeforeSkySalesValidation=function(){return $("#seatMapCOGInputBox").length>0?s2.tuifly.helper.SeatMap.Validate():true};this.scrollToElement=function(d){s2.tuifly.helper.scrollToElement.start(d)};this.monkeyPatch()});
s2.namespace("s2.tuifly.validation",function(){var a=[];this.Error=function(c,d,b){this.element=$(c);this.formRow=$(c).parent();this.message=d;this.label=$("label[for="+c.id+"]");this.displayErrorAsAlert=this.isRequiredError=false;this.hideErrorMessage=b;c=this.element.closest("#paymentMethodSelection");if(c.length>0){this.element=c;this.formRow=c.parent()}!this.hideErrorMessage&&this.element.attr("requiredError")&&this.formRow.prepend("<span class='hidden showOnError'>"+this.message+"</span>");this.errorLabel=
this.formRow.find("span:first-child");a.push(this);this.draw()};this.Error.clearAll=function(){jQuery.each(a,function(){this.clear()});a=[]};this.Error.prototype={draw:function(){this.element.closest(".toggleBox").removeClass("closed");this.element.closest(".editBlock").removeClass("hidden").next(".displayBlock").addClass("hidden");this.element.closest(".toggleBox").find(".contactinput").length>0&&s2.tuifly.helper.contactEditToggle.fade();this.element.addClass("error");this.label.addClass("error");
var c=this.element.parent();if(this.element.is("select")&&jQuery.browser.msie&&(jQuery.browser.msie6||jQuery.browser.version.substr(0,1)=="7"))this.element.before('<div class="errorOutline" style="width: '+this.element.outerWidth()+"px; height: "+this.element.outerHeight()+'px; "/>');if(c.hasClass("formRow")&&!c.hasClass("formRowError"))this.displayErrorAsAlert||c.addClass("formRowError")},clear:function(){this.element.removeClass("error");this.label.removeClass("error");this.errorLabel.remove();
if(this.element.is("select")&&this.element.prev().hasClass("errorOutline")&&jQuery.browser.msie&&(jQuery.browser.msie6||jQuery.browser.version.substr(0,1)=="7"))this.element.prev().remove();var c=this.element.parent();c.hasClass("formRowError")&&c.find(".error").length==0&&c.removeClass("formRowError")}}});
s2.namespace("s2.tuifly.validation.inputValidation",function(){var a=this,c={};a.initialize=function(){c["1"]="31";c["2"]="28";c["3"]="31";c["4"]="30";c["5"]="31";c["6"]="30";c["7"]="31";c["8"]="31";c["9"]="30";c["10"]="31";c["11"]="30";c["12"]="31";$("body").hasClass("qCustomValidation")||$(".qValidateName").change(function(){var d=a.nameValidation(this);d.success||alert(d.error)})};a.nameValidation=function(d){var b=$(d);d=b.val();b=b.attr("id");if(d.match(/&/g)||d.match(/</g)||d.match(/>/g)||d.match(/\|/g)||
d.match(/%/g)||d.match(/#/g)||d.match(/[0-9]/g)){d=d.replace(/&/g,"");d=d.replace(/</g,"");d=d.replace(/>/g,"");d=d.replace(/\|/g,"");d=d.replace(/%/g,"");d=d.replace(/#/g,"");d=d.replace(/[0-9]/g,"");document.getElementById(b).value=d;return{success:false,error:message.notAllowedCharName}}else return{success:true}};a.validateDOB=function(){var d=$("select[id$='DropDownListDOBDay']").val(),b=$("select[id$='DropDownListDOBMonth']").val(),f=$("select[id$='DropDownListDOBYear']").val();if(b=="2")if(parseInt(f)%
4==0&&(parseInt(f)%100!=0||parseInt(f)%400==0))return parseInt(d)>0&&parseInt(d)<=parseInt(c[b])+1;if(b!="")return parseInt(d)>0&&parseInt(d)<=parseInt(c[b]);return true};a.validateDOBPassenger=function(d,b,f){if(b=="2")if(parseInt(f)%4==0&&(parseInt(f)%100!=0||parseInt(f)%400==0))return parseInt(d)>0&&parseInt(d)<=parseInt(c[b])+1;if(b!="")return parseInt(d)>0&&parseInt(d)<=parseInt(c[b]);return true}});
s2.namespace("s2.tuifly.widget.focusManager",function(a){var c;this.FocusChangeEvent=new s2.tuifly.Event("FocusChangeEvent");this.initialize=function(){parseInt(jQuery.browser.version,10);var d=function(f){if(f&&f.target){f=f.target==document?null:f.target;a.FocusChangeEvent.trigger(c,f);c=f}};if(document.addEventListener)document.addEventListener("focus",d,true);else if(jQuery.browser.msie){var b;setInterval(function(){if(document.activeElement&&document.activeElement!==b){b=document.activeElement;
d({target:b})}},300)}};this.getFocused=function(){if(!c)return document;return c}});
s2.namespace("s2.tuifly.widget.navigation",function(){this.initialize=function(){this.bluemilesNavi();var a=false;$("#navigation").mouseover(function(){if(!a){a=true;window.tuiLogin.loggedIn()?$("#navigation li.loggedOut").remove():$("#navigation li.loggedIn").remove();var c=$("#navigation > li.mainLevel");c.find("ul.subLevel>li:last").addClass("last");var d=c.find("ul.subLevel ul.subsubLevel");jQuery.each(d,function(){$(this).find("li:last").addClass("last")});$("#navigation > li.mainLevel:last a:first").append($("<span></span>"));
c.hover(function(){$(this).addClass("hover");jQuery.browser.msie6&&$('div.flightInfoHeader select, div#PassengerCounter1 select, select#AirportListDestination, select#MonthToQuery, select[id$="_DropDownListTitle"], select[id$=_"DropDownListCountry"]').css("visibility","hidden")},function(){$(this).removeClass("hover");jQuery.browser.msie6&&$('div.flightInfoHeader select, div#PassengerCounter1 select, select#AirportListDestination, select#MonthToQuery, select[id$="_DropDownListTitle"], select[id$="_DropDownListCountry"]').css("visibility",
"")});$(this).mouseover()}})};this.bluemilesNavi=function(){if(s2.tuifly.util.Cookie.instance().get("hasBluemiles")=="0"){jQuery(".contentNavigation li a:contains('topbonus')").parent().remove();jQuery(".subLevel li a:contains('topbonus')").parent().remove();var a=jQuery.cachedFind("meta[name='culture']").attr("content");if(a=="de-DE"){jQuery("#collectingBlueMiles_2082").remove();jQuery("#collectingBlueMiles_3533").remove()}else if(a=="en-GB"){jQuery("#collectingBlueMiles_2079").remove();jQuery("#collectingBlueMiles_2078").remove();
jQuery("#collectingBlueMiles_2081").remove()}else if(a=="it-IT"){jQuery("#collectingBlueMiles_2079").remove();jQuery("#collectingBlueMiles_2078").remove()}else if(a=="es-ES"){jQuery("#collectingBlueMiles_2079").remove();jQuery("#collectingBlueMiles_2078").remove()}}}});
s2.namespace("s2.tuifly.widget.metaNavigation",function(){this.initialize=function(){if(jQuery.browser.msie&&jQuery.browser.version.substr(0,1)=="6"){var a=false;$("#metaArea").mouseover(function(){if(!a){a=true;$("#metaArea > li.metaLanguage").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")})}})}}});
s2.namespace("s2.tuifly.widget.datepickerForSelect",function(){var a=function(h){var n=$(this);h=Date.parse(h);if(f(h)){h=h.add(7);if(f(h)){h=JooseX.Culture.Factory.get().formatDate(h);n.val(h);n.change();s2.Logger.debug("Picked date "+h)}}},c=function(){if(jQuery.browser.msie6)if(document.getElementById("lrDatepicker")){$("select","#tuiHotelsBox").css("visibility","hidden");$("select",".roomSearch").css("visibility","hidden")}},d=function(){if(jQuery.browser.msie6)if(document.getElementById("lrDatepicker")){$("select",
"#tuiHotelsBox").css("visibility","visible");$("select",".roomSearch").css("visibility","visible")}};this.updateSelectBasic=a;this.hideInputforIE=c;this.showInputforIE=d;var b={numberOfMonths:[1,3],stepMonths:3,prevText:"&#160;",nextText:"&#160;",closeText:"&#160;",currentText:"",changeMonth:false,changeYear:false,changeFirstDay:false,showOtherMonths:false,showOn:"focus",minDate:"+0",showAnim:"show",duration:"",showButtonPanel:true,onSelect:a,beforeShow:c,onClose:d},f=function(h){return h!=null&&
h!=NaN};this.dateOK=f;this.initialize=function(){var h=JooseX.Culture.Factory.get();$.datepicker.setDefaults($.datepicker.regional[h.subIdentifier().toLowerCase()]);var n;if(document.getElementById("flugsuche")||document.getElementById("availabilitySearchInput")||document.getElementById("hotelSearch")||document.getElementById("carSearch")||document.getElementById("holidaySearch")||document.getElementById("lrDatepicker")){n=$("input.datepickerForSelect");n.each(function(){var w=$(this);jQuery.browser.msie&&
jQuery.browser.version.substr(0,1)=="7"&&w.data("flightMonthIE",w.parent().find("select").eq(1).val());window.setTimeout(function(){g(w)},10)});var p=$(n.get(0)),t=$(n.get(1));p.length>0&&t.length>0&&p.change(function(){var w=Date.parse(p.val());if(f(w)){var x=Date.parse(t.val());if(t.val()==""||!f(x)||w.getTime()>x.getTime()){t.val(h.formatDate(w));t.change()}}})}n||(n=$("input.simpleDatePicker"));if(document.getElementById("home")||document.getElementById("homeHLXAgencyMaster")||document.getElementById("select")||
document.getElementById("selectnew")||document.getElementById("homeHLXConsumer"))b.customRangeSelect=true;n.datepicker(b);this.datePickers=n};this.getFlight=function(){return $.cachedFind("#datePickerFlight")};this.getReturnFlight=function(){return $.cachedFind("#datePickerReturn")};var g=function(h){var n=JooseX.Culture.Factory.get(),p=h.parent().find("select"),t=$(p.get(1)),w=$(p.get(0));t.val()==null&&h.data("flightMonthIE")&&t.val(h.data("flightMonthIE"));var x=function(){var I=Date.parseExact(t.val()+
"-"+w.val(),"yyyy-MM-dd"),ba=false;if(f(I)){var K=Date.today();if(I.compareTo(K)<0){I=K;ba=true}h.val(n.formatDate(I));h.change()}else ba=true;if(document.getElementById("searchChange")&&ba){if(I=t.attr("id"))I=I.substr(I.length-1,I.length);$("#availabilitySearchInput .departure-flight-already-done").show();$("#searchChange #availabilitySearchInput .datemarket"+I).hide();if(MarketAction)MarketAction[I]="Cancel"}},E=function(I){var ba=JooseX.Culture.Factory.get().parseDate(I);I=$(this);if(f(ba)){var K=
ba.toString("yyyy-MM");ba=ba.toString("dd");t.val(K);w.val(ba);I.change();s2.Logger.debug("Picked date "+t.val()+"-"+w.val())}};x();E(h.val());w.change(function(){s2.Logger.debug("Day select changed");x()});t.change(function(){s2.Logger.debug("Month select changed");x()});p=function(){E(this.value)};h.change(p);h.typingEnded(p);h.datepicker(jQuery.extend(b,{onSelect:E}));var L=new s2.tuifly.util.Query;p=L.param("startDate");L=L.param("returnDate");var Q=$("input.datepickerForSelect").get(0),O=$("input.datepickerForSelect").get(1);
Q&&p&&$(Q).val(p);O&&L&&$(O).val(L);s2.tuifly.events.AvailibilityCookieDataSet.observe(x);s2.Logger.debug("Applied datepicker")}});
s2.namespace("s2.tuifly.widget.collapsibleNavigation",function(){$("h2.toggleNavigationHeadline").live("click",function(a){var c=$(this).parent();if(c.hasClass("closed")){c.parent().find(".accordion").each(function(){var b=$(this);s2.Logger.debug("Check accordion "+this.id+b.hasClass("closed"));b.addClass("closed");jQuery.browser.msie6&&b.hasClass("tab")&&b.addClass("tabClosed")});s2.Logger.debug("Closing acc");c.removeClass("closed");jQuery.browser.msie6&&c.hasClass("tab")&&c.removeClass("tabClosed")}var d=
$(".accordion.toggleContainer");if(d.filter(".tab").length>0){d.get(0)===c.get(0)&&!c.hasClass("tab")&&c.addClass("tab");if(d.filter(".tab").length==d.filter(".tab.closed").length){d.eq(0).removeClass("tab");jQuery.browser.msie6&&d.eq(0).removeClass("tabClosed")}}a.preventDefault();return false});this.initialize=function(){if(!(!document.getElementById("flugsuche")||document.getElementById("select")))for(var a=$(".accordion.tab"),c=a.find("fieldset").append($('<div class="tabGroup"></div>')),d=0,
b=a.length;d<b;d++){for(var f=0,g=a.length;f<g;f++)if(d!=f){var h=a.eq(f).find("h2"),n=$('<a href="#">'+h.text()+"</a>");n.click(function(p){return function(t){p.trigger("click");t.preventDefault()}}(h));c.eq(d).find(".tabGroup").append(n)}c.eq(d).find(".tabGroup a:last").addClass("last")}};this.openIfClosed=function(a){a.parent().hasClass("closed")&&a.click()}});
s2.namespace("s2.tuifly.widget.inlineLabeledInput",function(){this.initialize=function(){s2.Logger.debug("Init inline labels");$("input.inlineLabel").each(function(){var a=$(this),c=a.attr("inlineLabel");if(c==null)c="";var d=a.attr("class").replace(/query\w+/,"").replace(/q\w+/,""),b=a.attr("tabindex")?"tabindex='"+a.attr("tabindex")+"'":"",f=a.after("<input type=text "+b+" class='"+d+" hidden' value='"+c+"'/>").next();setTimeout(function(){if(a.val()==""){a.hide();f.show()}},0);var g=0;f.focus(function(){f.hide();
a.show();a.focus();a.click();g++});a.get(0).showStub=function(){f.focus()};a.change(function(){if(this.value!=""&&g==0){a.show();f.hide()}});a.get(0).showInput=function(){a.show();f.hide()};a.blur(function(){window.setTimeout(function(){if(!a.val()){f.show();a.hide()}g--},100)})})}});
s2.namespace("s2.tuifly.widget.overlay",function(){var a=this;this.initialize=function(){};var c,d,b;this.init=function(f){var g;f.each(function(){if(!this.initDone){var h=$(this);this.initDone=true;this.showOverlay=function(n,p){c||(c=$("div.overlay"));c.hide();if(jQuery.browser.msie&&(jQuery.browser.version.substr(0,1)=="7"||jQuery.browser.msie6)){d||(d=c.closest(".ssrWrapper"));d.length>0&&d.css("position","static")}if(jQuery.browser.msie6){b||(b=$(".formRow label"));b.length>0&&b.css("position",
"static")}var t=$(this);this.onShow&&this.onShow();if(jQuery.browser.msie&&(jQuery.browser.version.substr(0,1)=="7"||jQuery.browser.msie6)){var w=t.closest(".ssrWrapper");w.length>0&&w.css("position","relative")}if(!t.hasClass("overInit")){t.addClass("overInit");t.find("div.close,a.close").click(function(){t.hide();if(jQuery.browser.msie6){$("select:visible").removeClass("invisible");b.length>0&&b.css("position","relative")}})}window.setTimeout(function(){a.adjustOrientation(n,t,null,p)},0);if(jQuery.browser.msie&&
(jQuery.browser.version.substr(0,1)=="7"||jQuery.browser.version.substr(0,1)=="8"))window.setTimeout(function(){t.find(".selectNumber div").css("position","absolute")},0);g=t.get(0)};h.click(function(n){n.stopPropagation()})}});$(document).click(function(h){if(g)if(h.target!==g){$(g).hide();g=null;if(jQuery.browser.msie6){$("select:visible").removeClass("invisible");b.length>0&&b.css("position","relative")}}})};this.adjustOrientation=function(f,g,h,n){g.css("visibility","visible");g.removeClass("hidden");
g.show();if(!g.hasClass("adjusted")){g.show();var p=$(window).width();if(g.offset().left+g.outerWidth()>p||n){g.addClass("leftOverlay");if(h){n=h;g.width(n)}else n=jQuery.browser.msie&&jQuery.browser.version.substr(0,1)=="7"?g.attr("clientWidth"):g.outerWidth();h=g.offset().left;s2.Logger.debug("curLeft "+h);f=$(f.target);p=f.offset().left-20;if(jQuery.browser.msie6)p-=20;if(f.is("a.enterNumber"))p=f.offset().left;if(f.is("a.enterNumber > span.value"))p=f.parent().offset().left;s2.Logger.debug("targetLeft "+
p);f=parseInt(p-n,10);s2.Logger.debug("newLeft "+f);f=h-f;s2.Logger.debug("delta "+f);h=parseInt(g.css("left"),10);if(h+""=="NaN"||h==null)h=0;s2.Logger.debug("cur "+h);f=h-f;s2.Logger.debug("left "+f);f=Math.round(f);g.css("left",f+"px")}g.addClass("adjusted")}g.show()}});
s2.namespace("s2.tuifly.widget.cityAutocomplete",function(){var a=this,c={matchContains:true,minChars:0,scrollHeight:271,delay:0,scroll:true,handleResult:function(d,b,f){if(d.showAllOnFullMatch&&b.length==1)return f},width:"191px",max:500};a.getSelect=function(d){return d.parent().find("select")};a.initialize=function(){for(var d=["ControlGroupSearchView_AvailabilitySearchInputAffiliateView_WindowLoad","ControlGroupCompactSearchSSIView_AvailabilitySearchInputAffiliateCompactSearchSSIView_WindowLoad",
"ControlGroupAvailabilitySearchSelectView_AvailabilitySearchInputAffiliateSelectView_WindowLoad","ControlGroupAvailabilitySearchSelectNewView_AvailabilitySearchInputAffiliateSelectNewView_WindowLoad","ControlGroupGroupbookingView_AvailabilitySearchInputGroupbookingView_WindowLoad","ControlGroupAvailabilitySearchGroupSelectView_AvailabilitySearchInputAffiliateGroupSelectView_WindowLoad","ControlGroupAvailabilitySearchBookGroupView_AvailabilitySearchInputAffiliateBookGroupView_WindowLoad","ControlGroupSearchView_AvailabilitySearchInputAffiliateSearchView_WindowLoad",
"ControlGroupGroupbookingView_AvailabilitySearchInputGroupbookingView_WindowLoad","ControlGroupHomeView_AvailabilitySearchInputAffiliateHomeView_WindowLoad"],b=0;b<d.length;b++){var f=d[b];if(window[f]){this.origInput=$("#availabilitySearchInputOriginInput");this.destInput=$("#availabilitySearchInputDestinationInput");this.inputs=$([this.origInput,this.destInput]);s2.tuifly.monkeyPatch.wrap(f,function(){a.initialBind();a.rebind();a.inputs.each(function(){var g=$(this),h=a.getSelect(g).get(0);if(h.selectedIndex>
0){h=$(h.options[h.selectedIndex]);var n=h.text(),p=h.val();g.parent().find(".qAirportName").html(n.replace(/\([a-z]+\)/i,""));g.parent().find(".qAirportCode").html(p);g.parent().find(".qDisplayField").removeClass("hidden");g.val(n);if(p&&p.length==3)if(g.hasClass("destination"))s2.tuifly.controller.FlightSearch.getInstance().setDestCode(p);else{s2.tuifly.controller.FlightSearch.getInstance().setOrigCode(p);s2.tuifly.model.flightSearch.InitializedEvent.observeOnce(function(){s2.tuifly.model.flightSearch.OrigChangeEvent.trigger(p)})}}})})}}};
a.initialBind=function(){var d=s2.tuifly.model.flightSearch.StationManager.getInstance();this.inputs.each(function(){var b=$(this);b.autocomplete([],c);var f=false,g=function(n){var p=a.getSelect(b),t="",w=false;t=$("<pre>"+n+"</pre>");if(t.find(".zugZumFlug").size()>0)w=true;n=t.text();if(t=t.find("span[value]").attr("value"))n=t;inputVal=n;if(b.attr("abbreviate")){t=new s2.tuifly.util.TextMetrics(b,inputVal);var x=b.width();if(0<x&&x<t.width())inputVal=inputVal.substr(0,t.getIndexAtX(x-(new s2.tuifly.util.TextMetrics(b,
"...")).width()))+"...";b.data("completeValue",n)}else b.removeData("completeValue");b.val(inputVal);$(b).get(0).showInput();if(x=d.findStation(n)){t=x.getIataCode();if(!f&&s2.tuifly.helper.restrictions.isRestrictedOrigin(t))s2.tuifly.model.flightSearch.OrigChangeEvent.trigger(t,w);else{p.val(t);b.parent().find(".qAirportName").html(x.longName);b.parent().find(".qAirportCode").html(t);b.parent().find(".qDisplayField").removeClass("hidden");if(p.val()!=t){p.append('<option value="'+t+'">'+x.toString()+
"</option>");p.val(t)}t==n.toUpperCase()&&b.val(x.toString());f?s2.tuifly.model.flightSearch.DestChangeEvent.trigger(t,w):s2.tuifly.model.flightSearch.OrigChangeEvent.trigger(t,w);s2.Logger.debug("Picked "+p.val())}}else f&&s2.tuifly.model.flightSearch.DestChangeEvent.trigger("",w)};b.result(function(n,p,t){g(t)});b.blur(function(){g(this.value)});b.change(function(){g(this.value)});if(!b.hasClass("origin"))if(b.hasClass("destination"))f=true;else throw"missing queryCity class";var h;b.click(function(n){var p=
$(this);if(h==null)h=b.offset();var t=p.width()-15+h.left;if(n.pageX>t){s2.Logger.debug("Click in range");p.trigger("s2:closeIfOpen")}else s2.Logger.debug("Click out of range");n.target.value=""})});s2.tuifly.controller.FlightSearch.getInstance().navitairReady()};a.getValues=function(d){var b=[],f=0;d.parent().find("option").each(function(){f++!=0&&b.push($(this).text())});return b};a.rebind=function(){s2.Logger.debug("Rebind orig/dest")}});
s2.namespace("s2.tuifly.widget.submittableForm",function(){var a=this;this.clickButton=function(c){try{c.trigger("click")}catch(d){s2.Logger.debug(d)}};this.evalHref=function(c){try{var d=c.attr("href");d.indexOf("javascript:")==0&&eval(d.replace("javascript:",""))}catch(b){s2.Logger.debug(b)}};this.initialize=function(){$("#SkySales").each(function(){var c=$(this);c.append("<input type=submit style='display:none' /><input type=image width=0 height=0 value='' src='/skyres/images/trans.gif' />");c.submit(function(d){d.preventDefault();
if(d=s2.tuifly.widget.focusManager.getFocused())for(var b=$(d);b.length>0;){var f=false;Joose.A.each(["a.bookingButton","a.returnButton","a.showButton"],function(g){var h=b.find(g);if(h.length==1&&b.find(".queryPseudoForm "+g).length==0){a.clickButton(h);f=true;return false}});if(f)break;b=b.parent()}return false})})}});
s2.namespace("s2.tuifly.widget.formRowHighlighter",function(){var a=this,c;this.initialize=function(){s2.tuifly.widget.focusManager.FocusChangeEvent.observe(function(d,b){b=$(b);if(b.is(":input")||b.is("a.enterNumber")){c&&a.toggleParent($(c),"focused");a.toggleParent(b,"focused");c=b}})};this.toggleParent=function(d,b){var f=d;for(b||(b="focused");f.length>0;){if(f.hasClass("formRow")||f.is("tr.queryformRow"))f.toggleClass(b);f=f.parent()}}});
s2.namespace("s2.tuifly.widget.requiredFormFields",function(){this.initialize=function(){$.cachedFind("label.requiredField").append("<span class='inline'> *</span>")}});
s2.namespace("s2.tuifly.widget.loadingButton",function(){this.cancelSpinAllButtons=function(){var a=this;$("body:not(.hlxselect) a.bookingButton:not(.noClickEvent)").each(function(){a.unSpinButton($(this))})};this.unSpinButton=function(a){if(a.hasClass("loading")){a.removeClass("loading");a.find(".loadingImage").remove()}};this.initialize=function(){var a=this,c=function(d){if(!d.hasClass("loading")){d.children("span").prepend("<span class='loadingImage'></span>");d.addClass("loading")}};s2.tuifly.events.AjaxEndEvent.observe(function(){a.cancelSpinAllButtons()});
$("body:not(.hlxselect) a.bookingButton:not(.noClickEvent)").each(function(){var d=$(this),b=this.onclick;this.onclick=function(){};d.click(function(f){var g=$(this);g.hasClass(".qNoSpinning")||c(g);f.preventDefault();var h;if(!s2.tuifly.validation.checkBeforeSkySalesValidation())return false;if(typeof b=="function")h=b.call(this,f);if(h!==false){typeof s2.tuifly.widget.ssrLuggageCheckSelector!="undefined"&&s2.tuifly.widget.ssrLuggageCheckSelector.activateDisabledInputs();typeof s2.tuifly.helper.zugZumFlug!=
"undefined"&&s2.tuifly.helper.zugZumFlug.activateDisabledInputs();var n=g.attr("href");if(n&&n.indexOf("javascript:")==0)window.setTimeout(function(){eval(n.replace("javascript:",""))},10);else if(n&&n.length>0)if(g.attr("target")=="_top")window.top.location.href=n;else if(g.attr("target")=="_parent")window.parent.location.href=n;else if(g.attr("target")=="_blank")window.open(n);else location.href=n}else a.unSpinButton(d);return h})})}});
s2.namespace("s2.tuifly.widget.tooltip",function(){var a=this,c=0;this.initialize=function(){};var d={};$(".queryTooltip").live("mouseover",function(){var b=$(this),f=b.attr("id");if(!f||!d[f]){a.init(b);b.mouseover()}});this.init=function(b){var f=this;b.each(function(){var g,h=$(this),n=h.attr("id");if(n==null||n=="")h.attr("id","anonTooltip"+ ++c);d[n]=true;var p,t,w,x=$(this),E=x.attr("id"),L=$("select:visible");if($("#ShowOnRegisterIRC").get(0))L=$("select");h.mouseover(function(Q){try{$.browser.msie&&
$.browser.version.substr(0,1)=="6"&&!h.hasClass("deactivated")&&L.addClass("invisible");if(g){g.remove();g=null}var O=$(this).find(".queryTooltipContent");if(!O.closest(".queryTooltip").hasClass("deactivated")){g=O.clone();f.createTooltip(g,Q)}}catch(I){s2.Logger.debug("Error: "+I);return}try{p=p!=null?p:x.offset();t=t!=null?t:x.outerWidth();w=w!=null?w:x.outerHeight();$(window).bind("resize",function(){w=t=p=null});t>0&&w>0||s2.Logger.debug("we have no width and height, so we do not listen to the mousemove event ["+
E+"]")}catch(ba){s2.Logger.debug("MouseoverError: "+ba)}});h.mouseout(function(){$.browser.msie&&$.browser.version.substr(0,1)=="6"&&!h.hasClass("deactivated")&&L.removeClass("invisible");if(g){g.remove();g=null}})})};a.createTooltip=function(b,f){if(b.hasClass("initTooltip"))b.show();else{b.addClass("initTooltip");b.hide();b=this.calculatePosition(b,f);b.css("position","absolute");b.css("z-Index",999999999);$("body").append(b);var g=false;if(b.hasClass("leftOrientation"))g=true;b.length&&window.setTimeout(function(){s2.tuifly.widget.overlay.adjustOrientation(f,
b,350,g);b.show()},0)}};a.createSeatTooltip=function(b,f,g,h){if(!b.hasClass("calculated")){b=a.calculateRelativePosition(b,f);if(!b)return;b.css("z-Index",100)}if(b.hasClass("initTooltip")&&!b.hasClass("leftOrientation"))b.show();else{b.addClass("initTooltip");b.attr("id","layer"+g);b.css("visibility","hidden");b.css("position","absolute");h.append(b);h=false;if(b.hasClass("leftOrientation"))h=true;b=$("#layer"+g);if(h){b.removeClass("adjusted");s2.tuifly.helper.SeatMap.LeftOrientation(f,b)}else{b.css("visibility",
"visible");b.removeClass("hidden");b.show()}}};this.calculatePosition=function(b,f){if(b.hasClass("calculated"))return b;b.addClass("calculated");var g=b.attr("posX")||0,h=b.attr("posY")||0;h=$(f.target);var n=h.offset();g=Math.round(n.left+h.width()+parseInt(g));h=Math.round(n.top);b.css("left",g+"px");b.css("top",h+"px");return b};this.calculateRelativePosition=function(b,f){if(b.hasClass("calculated"))return b;b.addClass("calculated");var g=$("#unitMapView").width(),h=$("#unitMapView").scrollLeft();
g=g+h;h=b.attr("posX")||0;var n=b.attr("posY")||0;n=$(f.target);var p=n.position();h=Math.round(p.left+n.width()+parseInt(h,10));n=Math.round(p.top);if(n<0)return null;h>g-75?b.addClass("leftOrientation"):b.removeClass("leftOrientation leftOverlay");b.css("left",h+"px");b.css("top",n+"px");return b}});
s2.namespace("s2.tuifly.widget.dialog",function(){var a=this,c={closeOnEscape:true,modal:true,bgiframe:true,draggable:false,resizable:false,zIndex:9999,height:"auto",width:"450px",innerWidthIE:"375px",autoOpen:false,autoResize:false,overlay:{backgroundColor:"black",opacity:0.3}};this.initialize=function(){window.origAlert=window.alert;window.alert=function(g,h){s2.tuifly.widget.dialog.alert(g,h)}};this.copyOptions=function(){var g={},h;for(h in c)g[h]=c[h];return g};this.getTitle=function(g){if(g&&
g.title)return g.title;return{de:"Achtung",en:"Attention",it:"Considerazione",es:"Considerar"}[JooseX.Culture.Factory.get().majorIdentifier()]};this.getTitleNotice=function(g){if(g&&g.title)return g.title;return{de:"Hinweis",en:"Hint",it:"Indicazione",es:"Nota"}[JooseX.Culture.Factory.get().majorIdentifier()]};var d=function(g,h){var n=g,p="";if(h){n=g+""+h;p=h}var t=$("#"+n);if(t.length>0){t.empty();f=t}else f=$("body").append('<div id="'+n+'" class="'+p+'"></div>').find("#"+n);var w=f.dialog;f.dialog=
function(){if(arguments.length&&arguments[0]=="close")b=false;w.apply(this,arguments)};return f},b=false;this.confirm=function(g,h){if(h)h.confirm=1;s2.tuifly.widget.dialog.alert(g,h)};this.confirmNotice=function(g,h){if(h)h.confirm=1;s2.tuifly.widget.dialog.alertNotice(g,h)};this.alertNotice=function(g,h){h||(h={});h.view="note";h.title=this.getTitleNotice(h);s2.tuifly.widget.dialog.alert(g,h)};this.replaceLinebreak=function(g){return g=g.replace(/\n/,"<br />")};this.alert=function(g,h){h||(h={});
h.positionLayer="fixed";if($.browser.msie&&$.browser.version.substr(0,1)=="6")h.positionLayer="absolute";if(this.displayInline)$(".error").html(g);else if(!(b&&!h.forceDisplay)){if(!h.forceIframeAlert&&window!=parent)try{return parent.s2?parent.s2.tuifly.widget.dialog.alert(g,h):parent.alert(g)}catch(n){return origAlert(g)}if(typeof g=="undefined")g="undefined";else if(typeof g!="string")g=g.toString();h.noLinebreakReplace||(g=this.replaceLinebreak(g));var p=this.copyOptions();h||(h={});jQuery.extend(p,
h);h=p;b=true;var t=d("s2AlertBox");t.html(g);var w=function(I){window.setTimeout(function(){t.dialog("close");typeof I=="function"&&I()},10)},x,E=h.okCallback;x=typeof E=="function"?function(){w(E)}:w;var L,Q=h.cancelCallback;L=typeof Q=="function"?function(){w(Q)}:w;if(p.confirm){var O={};O[p.okButtonText]=x;O[p.cancelButtonText]=L;h={};h.buttons=O;h.dialogClass=p.dialogClass;h.dialogClass||(h.dialogClass="confirmBox");jQuery.extend(p,h)}else p.noButtons||jQuery.extend(p,{buttons:{OK:x},dialogClass:p.dialogClass?
p.dialogClass:""});if(!p.title){x=this.getTitle(p);p.title=x}t.dialog(p);$.browser.msie&&$.browser.version.substr(0,1)=="6"&&$(t).css("width",p.innerWidthIE);$(t).css("height","");p.confirm&&$("#s2AlertBox").parent().parent().find("button").each(function(I){I==0&&$(this).addClass("buttonOK");I==1&&$(this).addClass("buttonCancel");$(this).wrapInner(document.createElement("span"))});t.dialog("open");if(p.view=="note"){p.confirm||$(".ui-dialog-buttonpane").addClass("hint");$(".ui-dialog-container").addClass("hint")}p.fixTop&&
$(".ui-dialog").css("top",p.fixTop+"px");p.callback&&typeof p.callback=="function"&&p.callback()}};var f;this.ajaxLayer=function(g,h,n,p,t){if(!b){this.prepare(h,n);g+=g.match(/\?/)?"&":"?";n.disableCache||(g+="noCache="+Math.random().toString());h=$.get;if(t&&t.toUpperCase()=="POST")h=$.post;this.showAjaxLoadingOverlay();h(g,p,function(w){s2.Logger.debug("Data arrived");f.find(".waitMessage").addClass("hidden");s2.tuifly.widget.dialog.closeAjaxLoadingOverlay();f.html(w);f.dialog("open");a.setFocus();
var x=n.callback;x&&typeof x=="function"&&x(w)})}};this.divLayer=function(g,h,n){if(!b){this.prepare(h,n);if(n.clone){h=g.clone(true);if(n&&n.removeSource){g.remove();f.empty();f.append(h)}}else f.html(g.html());f.dialog("open");a.setFocus();(g=n.callback)&&typeof g=="function"&&g()}};this.setFocus=function(){try{if(f.find(".bookingButton").length)f.find(".bookingButton")[0].focus();else f.find("input").length&&f.find("input")[0].focus()}catch(g){}};this.divLayerMove=function(g){var h=f.children().clone(true);
f.remove();$("#"+g).append(h);theForm=$("#SkySales").get(0)};this.prepare=function(g,h){var n=this.copyOptions();g=g?g:"s2AlertBox";n=jQuery.extend(n,{width:"700px"});if(h)n=jQuery.extend(n,h);f=d(g,"ajaxLayer");f.dialog(jQuery.extend(n,{draggable:false}));h.message&&$(f).html('<div class="waitMessage">'+h.message+"</div>");b=true};this.myTUIflyLayer=function(g){this.ajaxLayer(g,"myTUIfly",{width:"560px",height:"580px",dialogClass:"myTUIflyLayer",callback:s2.tuifly.helper.mytuiflyLoginBox.prepare})};
this.bordshopLayer=function(g){this.ajaxLayer(g,"myTUIfly",{width:"625px",height:"410px",dialogClass:"myTUIflyLayer"})};this.darkSiteLayer=function(g){this.ajaxLayer(g,"darkSite-",{width:"805px",height:"482px",dialogClass:"darkSiteLayer"})};this.tuiHotelDetailLayer=function(g,h){this.ajaxLayer(g,"tuiHotelDetail-",{width:"905px",height:"503px",dialogClass:"tuiHotelDetailLayer",message:h})};this.tuiHotelVariationsLayer=function(g,h){this.ajaxLayer(g,"TUIHotelVariationBox-",{width:"481px",height:"416px",
dialogClass:"tuiHotelVariationsAjaxLayer",message:h})};this.notepadLayer=function(){this.divLayer($("#notepadLayer"),"notepad-",{width:"420px",height:"auto",dialogClass:"notepadLayer"})};this.priceAlarmConfirmLayer=function(){this.divLayer($("#priceAlarmConfirmLayer"),"priceAlarmConfirm-",{width:"372px",height:"460px",dialogClass:"priceAlarmConfirmLayer"})};this.exitLayer=function(g,h){this.ajaxLayer(g,"tuiHotelDetail-",{width:"400px",height:"auto",dialogClass:"tuiHotelDetailLayer",callback:h})};
this.carsGuaranteeLayer=function(){this.divLayer($("#carsGuaranteeLayer"),"carsGuarantee-",{width:"530px",height:"auto",dialogClass:"carsGuaranteeLayer"})};this.priceAlarmStoreLayer=function(){this.divLayer($("#priceAlarmStoreLayer"),"priceAlarmStore-",{width:"372px",height:"460px",dialogClass:"priceAlarmStoreLayer"})};this.surveyItineraryLayer=function(){this.divLayer($("#surveyItineraryLayer"),"surveyItinerary-",{width:"372px",height:"372px",dialogClass:"surveyItineraryLayer"})};this.notepadPreviewLayer=
function(g,h,n){this.ajaxLayer(g,"notepadPreview-",{width:"710px",height:"auto",dialogClass:"notepadPreviewLayer",callback:function(){$("#notepadPreview-ajaxLayer").prepend('<div id="opacityDiv"></div>');$(".notepadPreviewLayer .ui-dialog-titlebar").prepend(n)}},h,"POST")};this.christmasLayer=function(g){this.ajaxLayer(g,"christmas-",{width:"790px",height:"700px",dialogClass:"christmasLayer"})};this.airlineLayer=function(g,h){this.ajaxLayer(g,"airlines-",{width:"850px",height:"720px",dialogClass:"airlinesLayer",
callback:h,disableCache:true})};this.selectViewLayer=function(g){this.divLayer(g,"selectView-",{width:"790px",height:"auto",dialogClass:"selectViewLayer",overlay:{backgroundColor:"black",opacity:0.7}});g.find(".layerContent").html("")};this.updateBrowser=function(){this.divLayer($("#updateBrowser"),"updateBrowser-",{width:"420px",height:"auto",dialogClass:"updateBrowserLayer"})};this.emailMissingLayer=function(g){this.ajaxLayer(g,"standard-",{width:"420px",height:"auto",dialogClass:"standardLayer"})};
this.lateroomsDetailLayer=function(g){b=false;this.ajaxLayer(g,"lateroomsDetails-",{position:["auto",50],width:"792px",height:"auto",dialogClass:"lateroomsDetailsLayer"})};this.loginRegisterLayer=function(){this.divLayer($("#loginRegisterLayer div:first"),"loginRegister-",{width:"792px",height:"auto",dialogClass:"loginRegisterLayer",removeSource:true,clone:true});theForm=$("#SkySales").get(0)};this.infoTUICreditCardLayer=function(g){b=false;this.ajaxLayer(g,"tuiflyCreditCard-",{position:["auto",50],
width:"792px",height:"auto",dialogClass:"tuiflyCreditCardLayer"})};this.standardLayer=function(g,h){h||(h={});if(typeof g=="string")content=$.get(g,function(n){n="<div>"+n+"</div>";var p=$("h1",n).html();h.title=p;n=$(".contentDialog",n).html();h.noLinebreakReplace=true;alert(n,h);if(h.noDefaultButton){$(".ui-dialog button").addClass("hidden");$(".ui-dialog button").after("<br /><br />")}});else if(typeof g=="object"){alert($(".content",g).html(),h);if(h.noDefaultButton){$(".ui-dialog button").addClass("hidden");
$(".ui-dialog button").after("<br /><br />")}}h.view=="note"&&$(".ui-dialog-container, .ui-dialog-buttonpane").addClass("hint")};this.standardImageLayer=function(g){$(".ajaxLayer.zoomImageLayer").remove();b=false;var h=$("<span/>"),n=$("<img/>");$(n).attr("id","zoomImageLayer");$(n).attr("clss","hidden");$(h).html($(n));this.divLayer($(h),"zoomImage",{width:"",height:"",dialogClass:"zoomImageLayer",callback:function(){$(".ajaxLayer.zoomImageLayer").css("top","-9999px");$("#zoomImageLayer").attr("src",
g);$("#zoomImageajaxLayer").show();setTimeout(function(){var p=$(window).scrollTop()+25,t=$("body").get(0).clientWidth/2-$(".zoomImageLayer").innerWidth()/2;$(".zoomImageLayer").css("top",p+"px");$(".zoomImageLayer").css("left",t+"px");$("#zoomImageLayer").removeClass("hidden")},300)},title:"Detailansicht"})};this.ajaxLayerClose=function(){f&&f.dialog("close")};this.divLayerClose=function(g){this.ajaxLayerClose();g&&this.divLayerMove(g)};this.showAjaxLoadingOverlay=function(){var g=$("<div/>");$(g).addClass("dialogOverlay");
$("body").append("<div class='loadingAjax'></div>");$("body").append(g);g=$(window).scrollTop()+$(window).height()/2-$(".loadingAjax").innerHeight()/2;var h=$("body").get(0).clientWidth/2-$(".loadingAjax").innerWidth()/2;$(".loadingAjax").css("top",g+"px");$(".loadingAjax").css("left",h+"px")};this.closeAjaxLoadingOverlay=function(){$(".loadingAjax").remove();$(".dialogOverlay").remove()}});
s2.namespace("s2.tuifly.widget.customSelect",function(){var a={hoverClass:"over"};this.initialize=function(){};this.convert=function(c){c||(c="");$(""+c+" div.queryCustomSelects").each(function(){var d=$(this);if(!d.hasClass("init")){d.addClass("init");var b=jQuery.extend({},a),f=d.attr("maxlength");if(f)b.maxlength=f;if(d.attr("abbreviate"))b.abbreviate=true;d.find("select").selectbox(b)}})}});
s2.namespace("s2.tuifly.widget.date",function(){this.createYearPulldown=function(a,c){if($(a).length>0){var d=new Date,b=d.getFullYear();d=d.getMonth()+1;var f=this.buildPartnerBannerValue,g=this.buildPartnerBannerString;if(c=="partnerBanner"){f=this.buildPartnerBannerValue;g=this.buildPartnerBannerString}else if(c=="csLanding"){f=this.buildCSLandingValue;g=this.buildCSLandingString}$(a).empty();for(var h=0;h<13;h++){var n=f.apply(this,[d,b]),p=g.apply(this,[d,b]),t=$("<option>");t.attr("value",n);
t.html(p);$(a).append(t);if(d==12){d=1;b+=1}else d++}}};this.createPartnerBannerYearPulldown=function(a){this.createYearPulldown("#"+a,"partnerBanner")};this.createCompactSearchLandingYearPulldown=function(a){this.createYearPulldown(a,"csLanding")};this.buildPartnerBannerValue=function(a,c){a=this.formatMonth(a);return c.toString()+a};this.buildPartnerBannerString=function(a,c){var d=a-1;return this.getMonthList()[d]+" "+c.toString()};this.buildCSLandingValue=function(a,c){a=this.formatMonth(a);return c.toString()+
"-"+a};this.buildCSLandingString=function(a,c){var d=a-1;return this.getMonthList()[d]+" "+c.toString()};this.formatMonth=function(a){if(a<10)a="0"+a.toString();return a};this.getMonthList=function(){var a=JooseX.Culture.Factory.get().majorIdentifier();if(a=="en")a="";return $.datepicker.regional[a].monthNames}});
s2.namespace("s2.tuifly.widget.skysalesError",function(){this.initialize=function(){if(document.getElementById("skysalesErrorMessageBox")){var a=$("#skysalesErrorMessageBox h1").html();s2.tuifly.widget.dialog.standardLayer($("#skysalesErrorMessageBox"),{title:a})}else if(document.getElementById("skysalesNoticeMessageBox")){a=$("#skysalesNoticeMessageBox h1").html();s2.tuifly.widget.dialog.standardLayer($("#skysalesNoticeMessageBox"),{title:a,view:"note"})}else document.getElementById("airberlinRepriceMessageBox")&&
s2.tuifly.widget.dialog.standardLayer($("#airberlinRepriceMessageBox"),{title:$("#airberlinRepriceMessageBox h1").html(),confirm:true,okButtonText:s2.tuifly.util.culture.get("OkButton"),cancelButtonText:s2.tuifly.util.culture.get("CancelButton"),okCallback:function(){$("#selectSubmit a").click()}})}});
s2.namespace("s2.tuifly.widget.IEUpdateBanner",function(){var a=this,c={firefox:{image:"/images/elements/ie_update_ff.png",url:{de:"http://www.mozilla-europe.org/de",en:"http://www.mozilla-europe.org/en",es:"http://www.mozilla-europe.org/es",it:"http://www.mozilla-europe.org/it"}},ie:{image:"/images/elements/ie_update_ie.png",url:{de:"http://www.microsoft.com/germany/windows/internet-explorer",en:"http://www.microsoft.com/windows/internet-explorer",es:"http://www.microsoft.com/spain/windows/internet-explorer",
it:"http://www.microsoft.com/italy/windows/internet-explorer"}},chrome:{image:"/images/elements/ie_update_chrome.png",url:{de:"http://www.google.com/chrome?hl=de",en:"http://www.google.com/chrome?hl=en",es:"http://www.google.com/chrome?hl=es",it:"http://www.google.com/chrome?hl=it"}},chromeframe:{image:"/images/elements/ie_update_chromeframe.png",url:{de:"http://www.google.com/chromeframe?hl=de",en:"http://www.google.com/chromeframe?hl=en",es:"http://www.google.com/chromeframe?hl=es",it:"http://www.google.com/chromeframe?hl=it"}}},
d={begin:'<div id="updateIE"><div class="floatRight"><a href="#" class="qClose"><img src="/skyres/images/buttons/tuiHotelLayerClose.gif" /></a></div>',note:{de:"<STRONG>Hinweis:</STRONG> Sie verwenden eine veraltete Version Ihres Webbrowsers. Die Darstellung und Funktionalit&auml;t dieser Seite wird dadurch evtl. eingeschr&auml;nkt. <STRONG>Besser, schneller und sicherer im Web mit einem modernen Browser.</STRONG>",en:"<STRONG>Note:</STRONG> You are using an outdated version of your Web browser. This may limit the display options and functionality of this page and site. <STRONG>For a better, faster Web experience, please update to a more advanced browser.</STRONG>",
es:"<STRONG>Nota:</STRONG> est&aacute; utilizando una versi&oacute;n antigua de su navegador. Es posible que, debido a ello, quede limitada la presentaci&oacute;n y funcionalidad de esta p&aacute;gina. <STRONG>Con un navegador moderno podr&aacute; moverse mejor y m&aacute;s r&aacute;pido en Internet.</STRONG>",it:"<STRONG>Nota:</STRONG> state usando la versione vecchia del vostro Browser. Visualizzazione e funzionalit&agrave; di questa pagina potrebbero perci&ograve; essere limitate. <STRONG>Navigate meglio e pi&ugrave; rapidamente con un Browser aggiornato.</STRONG>"},
end:"</div>"},b=JooseX.Culture.Factory.get().majorIdentifier();this.initialize=function(){if(window==top)if(location.pathname.match(/(de|en|it|es)\/index\.html$/)||location.pathname.match(/(de|en|it|es)$/)||location.pathname.match(/(de|en|it|es)\/$/)){var f=this.getUpdates();if(f&&f.length){f='<div class="updateBrowser">'+f.join("")+"</div>";f=d.begin+f+"<p>"+d.note[b]+"</p>"+d.end;$.cachedFind("body").prepend(f);$.cachedFind(".flashRow").css("top","532px");$("#updateIE a.qClose").live("click",function(){a.close()})}}};
this.close=function(){$.cachedFind("#updateIE").hide();$.cachedFind(".flashRow").css("top","470px")};this.getUpdates=function(){var f=[];if(s2.tuifly.controller.Browser.isFirefox()&&s2.tuifly.controller.Browser.isOlderThanFirefox(3.6)||s2.tuifly.controller.Browser.isIE6()||s2.tuifly.controller.Browser.isIE7()){f.push(this.getFirefoxUpdate());f.push(this.getChromeUpdate());if(s2.tuifly.controller.Browser.isOlderThanXP()||s2.tuifly.controller.Browser.isXP())f.push(this.getChromeFrameUpdate());else s2.tuifly.controller.Browser.isNewerThanXP()&&
f.push(this.getIEUpdate())}return f};this.getUpdate=function(f){if(!f.url[b])return"";return'<a href="'+f.url[b]+'" target="_blank"><img src="'+f.image+'" /></a>'};this.getFirefoxUpdate=function(){return this.getUpdate(c.firefox)};this.getIEUpdate=function(){return this.getUpdate(c.ie)};this.getChromeUpdate=function(){return this.getUpdate(c.chrome)};this.getChromeFrameUpdate=function(){return this.getUpdate(c.chromeframe)}});
s2.namespace("s2.tuifly.widget.newsletter",function(){this.initialize=function(){};this.showRegisterLayer=function(){var a=new s2.tuifly.util.Cookie,c=new s2.tuifly.util.Query,d=new Date;if(c.param("uid")){c=new Date(d.getTime()+31536E6);a.set("TUIflyNLLayer","true",c)}else if(!a.get("TUIflyNLLayer")){s2.tuifly.widget.dialog.standardLayer("/layer/nl.html",{dialogClass:"standardLayer",noDefaultButton:true,view:"note",margin:"0px",height:"384px",width:"525px",callback:function(){(new Date).getDay()==
"5"&&$("#main_layer").css("background","url(/layer/nl_bg_friday.jpg)");$("#newsletter_submit").click(function(){var b=$("#newsletter_input").val();document.location.href="/de/mein-TUIfly/newsletter.php?src=Newsletter_Layer_KW24&mail="+b})}});c=new Date(d.getTime()+2592E6);a.set("TUIflyNLLayer","true",c);if(typeof s!="undefined"){s.linkTrackVars="pageName,eVar34";s.pageName="NL_Layer";s.eVar34="NL_Layer";s.tl(null,"o","NL_Layer")}}}});
s2.namespace("s2.tuifly.widget.passwortVergessenLayer",function(){this.initialize=function(){if(document.getElementById("findPasswordIFrame")){s2.tuifly.widget.dialog.displayInline=true;$(".bookingButton").click(function(){if(!$("[id$='_TextBoxAgentUserName']").val()){alert(s2.tuifly.util.culture.get("missingUsername"));$("[id$='_TextBoxAgentUserName']").css("border","1px red solid")}})}};this.open=function(){var a=JooseX.Culture.Factory.get().identifier(),c=$("<div/>"),d=$("<div/>");c.addClass("content");
var b=$("<iframe/>");b.attr("src","/FindPasswordIFrame.aspx?culture="+a);b.attr("width","422");b.attr("height","158");b.attr("frameborder",0);b.attr("scrolling","no");c.html("<div id='iframeLoading' style='text-align:center;'><img src='/skyres/images/loadingDetails.gif' /></div>");c.append(b);d.append(c);a=$("#globalLoginFindPasswordAction").text()||"&nbsp;";s2.tuifly.widget.dialog.standardLayer(d,{height:"250px",view:"note",title:a,noDefaultButton:true,closeCallback:function(){},callback:function(){$(".ui-dialog-buttonpane").hide()}})};
this.close=function(){parent.s2.tuifly.widget.dialog.divLayerClose()}});
s2.namespace("s2.tuifly.widget.tps",function(){var a=this,c=true;a.initialize=function(){document.getElementById("home")&&a.showOffers()};a.showOffers=function(){$.cachedFind(".qTPSTeaser").each(function(){var d=$(this),b=".qOffer";if(d.data("sortorder")&&d.data("sortorder").match(/newroute/i))b+="[data-newroute='False']";var f=d.find(b).length,g=d.data("offersMax")||7;if(f<=g)d.find(".qOffer").show();else{var h=[];for(d.find(b).hide();h.length<g;){b=Math.floor(Math.random()*(f+1));if(b>0)if($.inArray(b,
h)<0){var n=d.find(".qOffer"+b);c?n.show():n.fadeIn(1E3);h.push(b)}}}});c=false}});
s2.namespace("s2.tuifly.widget.lastSearches",function(){var a=this,c=null;a.initialize=function(){if(document.getElementById("home")){$.cachedFind("#lastFlights .qClose").live("click",function(){var b=$(this).parents("[data-key]").data("key");a.removeEntry(b)});$.cachedFind("#lastFlights .qOffer").live("click",function(){var b=$(this).parents("[data-key]").data("key");a.deeplink(b)});var d=[];a.initStorage()!==null&&a.storage().all(function(b){if(b.length){var f=$.cachedFind("#lastFlights").find(".qTemplate").clone();
_.each(_.sortBy(b,function(g){var h=this.lastId==0||this.lastId>g.id;if(!this.lastId)this.lastId=g.id;return h},{lastId:0}),function(g){if(typeof Stations!="undefined"&&Stations[g.departureAirport]&&Stations[g.arrivalAirport]){var h=g.key.replace("lastSearches::","");f.find(".flight").removeClass("hidden");f.find(".flight").attr("data-key",h);f.find(".qOrigin").text(Stations[g.departureAirport].name);f.find(".qDestination").text(Stations[g.arrivalAirport].name);h=Date.parseExact(g.departureDate,"yyyy-MM-dd");
g=Date.parseExact(g.arrivalDate,"yyyy-MM-dd");h=h?h.toString("dd.MM.yyyy"):"";g=g?g.toString("dd.MM.yyyy"):"";f.find(".qDate").text(h+(g?" - "+g:""));f.find("div:first").addClass("qLastSearchEntry");d.push(f.html())}});$.cachedFind("#lastFlights .allFlights").append(d.join(""))}})}};a.initStorage=function(){if(c===null)try{return c=new Lawnchair({adaptor:window.Storage?"dom":"userdata",table:"lastSearches"})}catch(d){return null}return c};a.storage=function(){return c};a.store=function(d,b){d.direction=
d.direction||"RoundTrip";d.adultCount=d.adultCount||1;d.childCount=d.childCount||0;d.infantCount=d.infantCount||0;if(d.direction=="RoundTrip"&&d.departureDate&&!d.arrivalDate){var f=Date.parseExact(d.departureDate,"yyyy-MM-dd");d.arrivalDate=f.add(7).days().toString("yyyy-MM-dd")}if(d.direction=="OneWay")d.arrivalDate="";if(a.initStorage()===null)typeof b=="function"&&b();else a.storage().all(function(g){var h=g.length,n=null,p=null,t=null;_.each(g,function(w){if(n===null||n>w.id){n=w.id;t=w}if(p===
null||p<w.id)p=w.id});h>=3&&a.storage().remove(t);d.id=p+1;a.storage().save(d);typeof b=="function"&&b()})};a.clearStorage=function(){a.storage().nuke()};a.removeEntry=function(d){a.storage().remove(d);$.cachedFind("#lastFlights").find("div[data-key="+d+"]").fadeOut().removeClass("qLastSearchEntry");if($.cachedFind("#lastFlights .qLastSearchEntry").length==0){$.cachedFind("#lastFlights").hide();$.cachedFind("#NoLastFlights").show()}};a.deeplink=function(d){a.storage().get(d,function(b){if(b)s2.tuifly.helper.search.deeplink({direction:b.direction,
departureAirport:b.departureAirport,arrivalAirport:b.arrivalAirport,departureDateMonthYear:b.departureDate?b.departureDate.substr(0,7):"",departureDateDay:b.departureDate?b.departureDate.substr(8,2):"",arrivalDateMonthYear:b.arrivalDate?b.arrivalDate.substr(0,7):"",arrivalDateDay:b.arrivalDate?b.arrivalDate.substr(8,2):"",adultCount:b.adultCount,childCount:b.childCount,infantCount:b.infantCount})});return false}});
s2.namespace("s2.tuifly.widget.diashow",function(){var a=this,c=0,d,b;a.partnerWidth=0;var f;a.initialize=function(){$("div.qDiashowStart").length&&a.initDiashow({element:"div.qDiashowElement",clickHandler:window.s2.evalNamespace($("div.qDiashowElement").data("clickHandler")).diashowClickHandler})};a.initDiashow=function(h){a.diashowElement=h.element;a.partnerWidth=h.width||$(a.diashowElement).data("elementWidth");h.clickHandler=h.clickHandler||function(){};b=a.diashow;c=$(a.diashowElement).find("ul li").length;
f=setTimeout(function(){a.runLeft(1)},2E3);b().hover(a.stop,a.continueRun);$(".verticalScrollTeaser .leftScroll").hover(function(){a.resume();a.runRight(4)},a.continueRun);$(".verticalScrollTeaser .rightScroll").hover(function(){a.resume();a.runLeft(4)},a.continueRun);$(a.diashowElement+" li").live("click",function(n){h.clickHandler.apply(a,[this,n])})};a.continueRun=function(){if(!a.paused){a.isStopped=false;d=="right"?a.runRight(1):a.runLeft(1)}};a.pause=function(){a.paused=true;$(a.diashowElement).find("ul").addClass("paused")};
a.resume=function(){a.isStopped=false;a.paused=false;$(a.diashowElement).find("ul").removeClass("paused")};a.stop=function(){b().stop(true);a.isStopped=true};a.calcSpeed=function(h,n){n=n||1;var p=a.calcWidth();return 50/n*(h/p)*1E3};a.calcDistanceRight=function(){var h=b().css("left");h=parseInt(h,10);if(h<0)h*=-1;return a.calcWidth()-h};a.calcDistanceLeft=function(){var h=b().css("left");h=parseInt(h,10);if(h<0)h*=-1;return h};a.runLeft=function(h){if(!a.isStopped)if(!a.paused){clearTimeout(f);
var n=a.calcWidth();h=a.calcSpeed(a.calcDistanceRight(),h);a.stop();a.isStopped=false;b().animate({left:"-"+n+"px",queue:true},h,"linear",function(){setTimeout(function(){b().animate({left:"0px",queue:true},0,"linear",function(){setTimeout(function(){a.runLeft(1)},500)})},1E3)});d="left"}};a.runRight=function(h){if(!a.isStopped)if(!a.paused){clearTimeout(f);h=a.calcSpeed(a.calcDistanceLeft(),h);a.stop();a.isStopped=false;b().animate({left:"0px",queue:true},h,"linear");d="right"}};a.calcWidth=function(){return(c-
2)*a.partnerWidth};a.scrollToCarrier=function(h){h=$(".liste ul li").filter('[data-code="'+h.toUpperCase()+'"]').index();h>=0&&a.diashow().css("left",-1*h*a.partnerWidth+"px")};var g;a.diashow=function(){g||(g=$(a.diashowElement).find("ul"));return g}});
s2.namespace("s2.tuifly.widget.mainStage",function(){var a=this,c=0,d=null,b=null,f=0,g=null,h=true;a.initialize=function(){h=Modernizr.csstransitions;if(document.getElementById("home")||document.getElementById("homeHLXAgencyMaster")){var n=$("#homeHLXAgencyMaster").length,p=JooseX.Culture.Factory.get().identifier();n=n===1?"/promo/html/stageAgency":"/promo/html/stage";n+="_"+p.substring(0,2)+".html?rand="+Math.random();$.ajax(n,{type:"get",dataType:"text",success:function(t){$("#ajaxStage").append(t);
d=$("#ajaxStage .stageTeaser");b=$("#ajaxStage li");if(f=d.length-1){a.scroll(c,true);$("body").trigger("mainStageComplete")}else{b.parent().hide();a.scroll(c,false)}},error:function(){$("#ajaxStage").hide()}});$("#ajaxStage li").live("mouseover",function(){var t=$(this).index();t!=c&&a.scroll(t,false);clearTimeout(g)});$("#ajaxStage li").live("mouseout",function(){g=setTimeout(function(){a.scroll(null,true)},$(d[c]).data("period")*1E3)})}};a.scroll=function(n,p){h?d.eq(c).removeClass("active"):d.eq(c).animate({opacity:0},
1E3,function(){$(this).removeClass("active")});b.eq(c).removeClass("active");c=n!=null?n:c<f?c+1:0;h?d.eq(c).addClass("active"):d.eq(c).animate({opacity:1},1E3,function(){$(this).addClass("active")});b.eq(c).addClass("active");if(p)g=setTimeout(function(){a.scroll(null,true)},$(d[c]).data("period")*1E3)}});
s2.namespace("s2.tuifly.flash.airportMap",function(){var a=this;a.flashLoaded=false;var c=null,d=null;a.initialize=function(){var f=$("#flashContent");if(f.length){s2.Logger.debug("Have a flash map "+f.id);if(swfobject.hasFlashPlayerVersion("9.0.28")){d=$("#shimStage");if(d.length){d.css("height",$(document).height()+"px");f=~~(($(window).width()-972)/2)+15;if(f<0)f=0;c=$("#flashContent");c.css("left",f+"px");$("#flashIcon").click(function(){a.show()})}}else $("#flashIcon").hide()}};var b;a.sortedStations=
function(){if(b)return b;var f=s2.tuifly.model.flightSearch.StationManager.getInstance(),g=[];Joose.O.each(f.stationByIataCode,function(h){g.push(h)});b=f.sortStations(g);new s2.tuifly.model.flightSearch.Station({iataCode:"ZRH",longName:"Zürich",validDest:true,dests:["CGN"],country:"AT"});return b};a.getStations=function(){s2.Logger.debug("Flash: getStations");var f=a.sortedStations(),g={};Joose.A.each(f,function(h){g[h.getIataCode()]=h.asNavitairStation()});f=[];for(i in g)f.push(g[i]);return f};
a.getAirportCountryMapping=function(){s2.Logger.debug("Flash: getAirportCountryMapping");var f=[],g=a.sortedStations();Joose.A.each(g,function(h){f.push({airportCode:h.getIataCode(),countryCode:h.getCountry()})});return f};a.getCurrentStations=function(){s2.Logger.debug("Flash: getCurrentStations");s2.tuifly.controller.FlightSearch.getInstance();return[]};a.fireOriginChanged=function(){s2.Logger.debug("notify flash origin");$("input[name='scorigin']").val("CS-Home");return true};a.fireDestChanged=
function(){s2.Logger.debug("notify flash dest");$("input[name='scorigin']").val("CS-Home");return true};a.clearStations=function(){s2.tuifly.controller.FlightSearch.getInstance().clear()};a.eventOriginChanged=function(f,g){s2.Logger.debug("Flash fires origin changed "+f);if(f!=null&&f!=""){var h=$("#availabilitySearchInputOriginInput"),n=s2.tuifly.controller.FlightSearch.getInstance();if(n.getOrigCode()!=f){n.closeAutocomplete();h.val(f);h.change()}g&&$("input[name='scorigin']").val("FLASH_MAP")}return true};
a.eventDestChanged=function(f,g,h){s2.Logger.debug("Flash fires dest changed "+f);if(f!=null&&f!=""){var n=$("#availabilitySearchInputDestinationInput"),p=s2.tuifly.controller.FlightSearch.getInstance();if(p.getDestCode()!=f){p.closeAutocomplete();n.val(f);n.change();s2.tuifly.model.flightSearch.DestChangeEvent.trigger(f,g)}h&&$("input[name='scorigin']").val("FLASH_MAP")}return true};a.eventPOIChanged=function(f){f=f.toUpperCase();$("div.selectDestination h1").hide();$("div.shortInfoFlugziele").hide();
if($("#detail"+f).length){$("#detail"+f).show();$("#detail"+f+" h1").show()}else{$("#detailDefault").show();$("#detailDefault h1").show()}};a.flashMovie=function(f){if(window[f])return window[f];if(document[f])return document[f];s2.Logger.debug("Cant find flash movie");return null};a.show=function(){d.show();d.click(function(){a.closeFlashMap()});c.show();a.flashMovie("flashMap");var f="standard",g=(new s2.tuifly.util.Query).param("splash");if(g&&g.length>0)f=g;a.embed(f,955,$(window).height()-200,
{version:"113832"})};a.showZZFTeaser=function(){var f=a.flashMovie("flashMap");f!=null&&f.showLayerZZF&&f.showLayerZZF(true)};a.hideZZFTeaser=function(){var f=a.flashMovie("flashMap");f!=null&&f.showLayerZZF&&f.showLayerZZF(false)};a.closeFlashMap=function(){c.hide();c.html('<div id="flashMap"></div>');d.hide();d.unbind("click")};a.embedAlternativeDestinations=function(f,g){var h="";if(jQuery.browser.msie6)h="?rand="+Math.random();var n={};n.configFile="/de/map_config.xml";n.destination=f;n.alternatives=
g;var p={};p.allowscriptaccess="always";p.allownetworking="all";p.wmode="transparent";var t={};t.id="altDest";t.name="altDest";if(swfobject.hasFlashPlayerVersion("9.0.28")){$(".flashContainer").removeClass("hidden");swfobject.embedSWF("/skyres/flash/map/alt_dest_map.swf"+h,"altDestMap","191","105","9.0.28","/skyres/flash/expressInstall.swf",n,p,t)}else $("#altDestImage").removeClass("hidden")};a.embed=function(f,g,h,n){s2.tuifly.model.flightSearch.InitializedEvent.observeOnce(function(){var p={};
n||(n={});var t=(new s2.tuifly.util.Query).param("country");if(t&&t.length>0)p.countryZoom=t;var w=JooseX.Culture.Factory.get().majorIdentifier(),x=s2.tuifly.util.Skin.get().identifier();t=n.version?"?v="+n.version:"";if(jQuery.browser.msie6)t="?r="+(Math.random()+"").substr(2,7);x="/promo/xml/map_"+x+"_"+w+"_data.xml"+t;s2.Logger.debug("LanguageFile for Flash: "+x);p.configFile="/de/map_config.xml"+t;p.airportLinksFile="/"+w+"/flashmap_config.xml"+t;p.languageFile=x;p.mode=f;p.trackingAccount=s2.tuifly.util.Environment.get().OmnitureAccount();
p.agentId=(new s2.tuifly.util.Cookie).get("user");p.deepLingking=(new s2.tuifly.util.Query).param("deepLinking");p.countryZoom=(new s2.tuifly.util.Query).param("countryZoom");p.continentZoom=(new s2.tuifly.util.Query).param("continentZoom");s2.Logger.debug("trackingAccount for Flash: "+p.trackingAccount);w={};w.allowscriptaccess="always";w.allownetworking="all";w.wmode="transparent";x=736;if(f=="basic")x=711;g=g||x;h=h||401;if(h<350)h=350;x={};x.id="flashMap";x.name="flashMap";swfobject.hasFlashPlayerVersion("9.0.28")?
swfobject.embedSWF("/skyres/flash/map/map.swf"+t,"flashMap",g,h,"9.0.28","/skyres/flash/expressInstall.swf",p,w,x):$("#flashMap .noFlash").show()});$(document).ready(function(){s2.tuifly.model.flightSearch.Station.initializeFromAjax()})};a.showZZFInfo=function(){};a.showMap=function(){var f="mapVisible",g=JooseX.Culture.Factory.get().majorIdentifier();f=f+"-"+g;$("body").addClass(f);s2.tuifly.widget.collapsibleNavigation.openIfClosed($("#flugsuche h2.toggleNavigationHeadline"))};a.hideMap=function(){var f=
"mapVisible",g=JooseX.Culture.Factory.get().majorIdentifier();f=f+"-"+g;$("body").removeClass(f)};a.setDestination=function(){return(new s2.tuifly.util.Query).param("destination")};a.setDeparture=function(){var f=(new s2.tuifly.util.Query).param("departure");return f?f:departureFromCookie};window.setDeepLinkingDestination=function(){return(new s2.tuifly.util.Query).param("destination")};window.setDeepLinkingDeparture=function(){return(new s2.tuifly.util.Query).param("departure")};jQuery.each(["getStations",
"eventOriginChanged","eventDestChanged","getCurrentStations","eventPOIChanged","clearStations","showMap","hideMap","closeFlashMap","showZZFInfo"],function(){window["s2Flash_"+this]=a[this]});window.setDeparture=a.setDeparture;window.setDestination=a.setDestination;window.getStations=a.getStations;window.getAirportCountryMapping=a.getAirportCountryMapping});
s2.namespace("s2.tuifly.helper.search",function(){var a=this,c={direction:{},departureAirport:{},arrivalAirport:{},departureDate:{},arrivalDate:{},adultCount:{},childCount:{},infantCount:{}},d=false;this.initialize=function(){this.setClickHandlerGroupSelection();setTimeout(function(){var b=(new s2.tuifly.util.Query).param("adults");if(b){var f=$("#flugsuche select.selectAdult");f.val(b);f.trigger("change")}},0);$("#flugsuche").live("mousedown",function(){if(!d){d=true;a.saveInitSearchParams()}});
if(document.getElementById("quickGroupSearch")){this.focusQuickGroupSearch();this.switchQuickGroupOnewayReturn()}a.initCalIcon();a.saveSearchFields()};a.initCalIcon=function(){$("#flugsuche .calIcon").live("click",function(){$.cachedFind("#datePickerFlight").trigger("focus")})};a.setClickHandlerGroupSelection=function(){$("#flugsuche li[id$='_ADT_input_+10']").live("click",function(){$.cachedFind("#flugsuche li[id$='_ADT_input_10']").trigger("click")});$("#flugsuche li[id$='_CHD_input_+10']").live("click",
function(){$.cachedFind("#flugsuche li[id$='_CHD_input_10']").trigger("click")})};a.saveInitSearchParams=function(){var b=a.getSearchParams();c.direction.oldValue=b.direction;c.departureAirport.oldValue=b.departureAirport;c.arrivalAirport.oldValue=b.arrivalAirport;c.departureDate.oldValue=b.departureDate;c.arrivalDate.oldValue=b.arrivalDate;c.adultCount.oldValue=b.adultCount;c.childCount.oldValue=b.childCount;c.infantCount.oldValue=b.infantCount};a.getInitialSearchParams=function(){var b={};b.direction=
c.direction.oldValue;b.departureAirport=c.departureAirport.oldValue;b.arrivalAirport=c.arrivalAirport.oldValue;b.departureDate=c.departureDate.oldValue;b.arrivalDate=c.arrivalDate.oldValue;b.adultCount=c.adultCount.oldValue;b.childCount=c.childCount.oldValue;b.infantCount=c.infantCount.oldValue;return b};a.saveSubmitSearchParams=function(){var b=a.getSearchParams();c.direction.newValue=b.direction;c.departureAirport.newValue=b.departureAirport;c.arrivalAirport.newValue=b.arrivalAirport;c.departureDate.newValue=
b.departureDate;c.arrivalDate.newValue=b.arrivalDate;c.adultCount.newValue=b.adultCount;c.childCount.newValue=b.childCount;c.infantCount.newValue=b.infantCount;s2.tuifly.widget.lastSearches.store({direction:b.direction,departureAirport:b.departureAirport,arrivalAirport:b.arrivalAirport,departureDate:b.departureDate,arrivalDate:b.arrivalDate,adultCount:b.adultCount,childCount:b.childCount,infantCount:b.infantCount})};a.setCSChangesTracking=function(){a.saveSubmitSearchParams();if(typeof s=="undefined"||
typeof s=="string")return true;if(c.departureAirport.oldValue.length==0||c.arrivalAirport.oldValue.length==0)return true;var b=[];c.direction.oldValue!=c.direction.newValue&&b.push("Streckenoption");c.departureAirport.oldValue.length==3&&c.departureAirport.oldValue!=c.departureAirport.newValue&&b.push("HUB_Start");c.arrivalAirport.oldValue.length==3&&c.arrivalAirport.oldValue!=c.arrivalAirport.newValue&&b.push("HUB_Ziel");if(c.departureDate.oldValue!=c.departureDate.newValue||c.arrivalDate.oldValue!=
c.arrivalDate.newValue)b.push("Datum");if(c.adultCount.oldValue!=c.adultCount.newValue||c.childCount.oldValue!=c.childCount.newValue||c.infantCount.oldValue!=c.infantCount.newValue)b.push("PAX");if(b.length>0){s.linkTrackVars="events,eVar8";s.eVar8=s.pageName;if(location.href.match(/select\.aspx/i)){s.linkTrackVars+=",prop37";s.prop37=b.join(",")}else{s.linkTrackVars+=",prop38";s.prop38=b.join(",")}s.linkTrackEvents="event71";s.events="event71";s.tl(document.getElementById("flugsuche"),"o","CS-Select")}return true};
a.saveSearchFields=function(){a.fields={};a.fields.$directions=$.cachedFind("#travelOptions input");a.fields.$direction=$("#travelOptions input:checked");a.fields.$departureAirport=$.cachedFind("[id$=_DropDownListMarketOrigin1]");a.fields.$arrivalAirport=$.cachedFind("[id$=_DropDownListMarketDestination1]");a.fields.$departureDay=$.cachedFind("[id$=_DropDownListMarketDay1]");a.fields.$departureMonthYear=$.cachedFind("[id$=_DropDownListMarketMonth1]");a.fields.$arrivalDay=$.cachedFind("[id$=_DropDownListMarketDay2]");
a.fields.$arrivalMonthYear=$.cachedFind("[id$=_DropDownListMarketMonth2]");a.fields.$adultCount=$.cachedFind("[id$=_DropDownListNewPassengerType_ADT]");a.fields.$childCount=$.cachedFind("[id$=_DropDownListPassengerType_CHD]");a.fields.$infantCount=$.cachedFind("[id$=_DropDownListPassengerType_INFANT]")};a.getSearchParams=function(){return{direction:a.fields.$directions.closest(":checked").val(),departureAirport:a.fields.$departureAirport.val(),arrivalAirport:a.fields.$arrivalAirport.val(),departureDate:a.fields.$departureMonthYear.val()+
"-"+a.fields.$departureDay.val(),departureDay:a.fields.$departureDay.val(),departureMonthYear:a.fields.$departureMonthYear.val(),arrivalDate:a.fields.$arrivalMonthYear.val()+"-"+a.fields.$arrivalDay.val(),arrivalDay:a.fields.$arrivalDay.val(),arrivalMonthYear:a.fields.$arrivalMonthYear.val(),adultCount:parseInt(a.fields.$adultCount.val(),10),childCount:parseInt(a.fields.$childCount.val(),10),infantCount:parseInt(a.fields.$infantCount.val(),10)}};a.getSearchParam=function(b){return a.getSearchParams()[b]};
this.changeOrigin=function(b){s2.tuifly.util.tracking.fire({events:[],values:{prop25:"Alt-Start",eVar25:"Alt-Start"},name:"alternativ-Start"});a.saveInitSearchParams();var f=$("[id$=_DropDownListMarketOrigin1]");f.val(b);f.change();setTimeout("s2.tuifly.helper.search.submitSearch()",100)};this.changeDestination=function(b){s2.tuifly.util.tracking.fire({events:[],values:{prop25:"Alt-Ziel",eVar25:"Alt-Ziel"},name:"alternativ-Ziel"});a.saveInitSearchParams();var f=$("[id$=_DropDownListMarketDestination1]");
f.val(b);f.change();setTimeout("s2.tuifly.helper.search.submitSearch()",100)};this.submitSearch=function(){s2.tuifly.widget.submittableForm.clickButton($("#flugsucheButton a"))};this.adjustDate=function(b,f){var g=b==1?s2.tuifly.widget.datepickerForSelect.getFlight():s2.tuifly.widget.datepickerForSelect.getReturnFlight(),h=Date.parse(g.val());if(s2.tuifly.widget.datepickerForSelect.dateOK(h)){var n=JooseX.Culture.Factory.get();h.addDays(f);var p=Date.today();if(h.getTime()>=p.getTime()){g.val(n.formatDate(h));
g.change();AFRICA_NOTE_DISPLAYED=true;a.saveInitSearchParams();this.submitSearch()}}};this.checkAirberlinRedirection=function(){var b=document.SkySales,f=$(".flightSelection :radio:checked"),g=f.eq(0).val().match(/\d\d\/\d\d\/\d\d\d\d/g)[0];f=f.length==2?f.eq(1).val().match(/\d\d\/\d\d\/\d\d\d\d/g)[0]:null;var h=b[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"].value,n=b[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"].value;return!airberlinAvailable[h+n]||!redirectToAirberlin("http://www.airberlin.com/site/abvakanz_c.php",
affiliateConfirmMessages.AB,new Date(g.substring(6),g.substring(0,2)-1,g.substring(3,5)),f!=null?new Date(f.substring(6),f.substring(0,2)-1,f.substring(3,5)):null,h,n,parseInt(b[applicationJavaScriptHtmlId+"_DropDownListPassengerType_ADT"].value)+parseInt(b[applicationJavaScriptHtmlId+"_DropDownListPassengerType_CHD"].value)+parseInt(b[applicationJavaScriptHtmlId+"_DropDownListPassengerType_CHDD"].value)+parseInt(b[applicationJavaScriptHtmlId+"_DropDownListPassengerType_INFANT"].value))};this.clickDisplayField=
function(b){$(b).parent().find("input.textAutoComplete").trigger("focus");$(b).addClass("hidden")};this.validateGroupSearch=function(){if(!this.validateGroupRoute())return false;var b=$("#"+applicationJavaScriptHtmlId+"_DropdownlistOptServiceCharge");if(b.length==0)return true;if(b.val()=="0")return true;if(this.getSearchParams().adultCount+this.getSearchParams().childCount<10)return true;s2.tuifly.widget.dialog.alertNotice(s2.tuifly.util.culture.get("groupNoServiceCharge"),{okCallback:function(){var f=
$("#"+applicationJavaScriptHtmlId+"_DropdownlistOptServiceCharge option:first").attr("selected",true).text();$("#"+applicationJavaScriptHtmlId+"_DropdownlistOptServiceCharge_input").val(f)}});return false};this.groupRoutes={};this.validateGroupRoute=function(){var b=parseInt($("#"+applicationJavaScriptHtmlId+"_DropDownListPassengerType_ADT").val(),10),f=parseInt($("#"+applicationJavaScriptHtmlId+"_DropDownListPassengerType_CHD").val(),10);if(b+f<=9)return true;b=$("#"+applicationJavaScriptHtmlId+
"_DropDownListMarketOrigin1").val();f=$("#"+applicationJavaScriptHtmlId+"_DropDownListMarketDestination1").val();var g=$("#"+applicationJavaScriptHtmlId+"_DropDownListMarketMonth1").val()+"-"+$("#"+applicationJavaScriptHtmlId+"_DropDownListMarketDay1").val(),h=g;if($("#"+applicationJavaScriptHtmlId+"_RoundTrip").is(":checked"))h=$("#"+applicationJavaScriptHtmlId+"_DropDownListMarketMonth2").val()+"-"+$("#"+applicationJavaScriptHtmlId+"_DropDownListMarketDay2").val();return this.validateGroupRouteInternal(b,
f,g,h)};this.focusQuickGroupSearch=function(){Modernizr.input.placeholder||$("#quickGroupSearch input").placeholder()};this.validateQuickGroupRoute=function(){Modernizr.input.placeholder||$("#quickGroupSearch input.placeholder").val("");var b=parseInt($("input[id$='_TextBoxPaxCount_ADT']").val(),10);if(isNaN(b))b=0;var f=parseInt($("input[id$='_TextBoxPaxCount_CHD']").val(),10);if(isNaN(f))f=0;if(b+f<=9){alert(s2.tuifly.util.culture.get("groupTooSmall"));$("#quickGroupSearch input").placeholder();
return false}b=$("input[id$='_TextBoxOrigin']").val().toUpperCase();f=$("input[id$='_TextBoxDestination']").val().toUpperCase();var g=this.createValidDateValue($("input[id$='_TextBoxDeparture']").val());g=Date.parse(g);if(g==null){s2.tuifly.widget.dialog.confirmNotice(s2.tuifly.util.culture.get("invalidOutboundDate"));return false}var h=new Date(g.getTime());if($("input[id$='_RoundTrip']").is(":checked")){var n=$("input[id$='_TextBoxReturn']").val();if(n.match(/^\d{1,3}$/))h.setDate(h.getDate()+parseInt(n,
10));else{n=this.createValidDateValue($("input[id$='_TextBoxReturn']").val());h=Date.parse(n);if(h==null){s2.tuifly.widget.dialog.confirmNotice(s2.tuifly.util.culture.get("invalidInboundDate"));return false}}}return this.validateGroupRouteInternal(b,f,g.toString("yyyy-MM-dd"),h.toString("yyyy-MM-dd"))};this.createValidDateValue=function(b){if(b.match(/^\d{2}\d{2}(\d{2}|\d{4})?$/i)){var f=b.substr(0,2),g=b.substr(2,2);b=b.substr(4);b=f+"."+g+(!b?"":"."+b)}return b};this.validateGroupRouteInternal=
function(b,f,g,h){var n,p=this.groupRoutes[b];if(p==undefined)p=this.groupRoutes[f];if(p!=undefined)for(var t=p.length,w=0;w<t;++w){var x=p[w];if(x.destination==f||x.destination==b){n=x;if(x.from<=g&&x.till>=h)return true;break}}p=this.groupRoutes["*"];if(p!=undefined){x=p[0];if(x.from<=g&&x.till>=h)return true}var E;if(n==undefined)E=s2.tuifly.util.culture.get("noGroupRoute");else if(n.from>g){E=s2.tuifly.util.culture.get("noGroupRouteFrom");b=Date.parseExact(n.from,"yyyy-MM-dd");E=E.replace(/\{0\}/,
b.toString(Date.CultureInfo.formatPatterns.shortDate))}else if(n.till<h){E=s2.tuifly.util.culture.get("noGroupRouteTill");b=Date.parseExact(n.till,"yyyy-MM-dd");E=E.replace(/\{0\}/,b.toString(Date.CultureInfo.formatPatterns.shortDate))}s2.tuifly.widget.dialog.confirmNotice(E);return false};a.switchQuickGroupOnewayReturn=function(){var b=$("input[id$='_RoundTrip']").is(":checked");$("div.qReturnOnly,span.qReturnOnly").toggleClass("hidden",!b)};a.clearQuickForm=function(){$("#quickGroupSearch input:text").val("");
Modernizr.input.placeholder||$("#quickGroupSearch input").placeholder()};a.deeplink=function(b){b="/search.aspx?ControlGroupSearchView$AvailabilitySearchInputSearchView$RadioButtonMarketStructure="+b.direction+"&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListMarketOrigin1="+b.departureAirport+"&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListMarketDestination1="+b.arrivalAirport+"&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListMarketOrigin2="+
b.arrivalAirport+"&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListMarketDestination2="+b.departureAirport+"&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListMarketMonth1="+b.departureDateMonthYear+"&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListMarketDay1="+b.departureDateDay+"&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListMarketMonth2="+b.arrivalDateMonthYear+"&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListMarketDay2="+
b.arrivalDateDay+"&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListPassengerType_ADT="+b.adultCount+"&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListPassengerType_CHD="+b.childCount+"&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListPassengerType_CHDD=0&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListPassengerType_INFANT="+b.infantCount+"&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListMarketDateRange1=2|2&ControlGroupSearchView$AvailabilitySearchInputSearchView$DropDownListMarketDateRange2=2|2&__EVENTTARGET=ControlGroupSearchView$AvailabilitySearchInputSearchView$LinkButtonNewSearch&expanded=1&culture="+
JooseX.Culture.Factory.get().identifier();location.href=b};a.validateRouteRestrictions=function(){var b=a.getSearchParam("departureAirport"),f=a.getSearchParam("arrivalAirport");s2.tuifly.model.flightSearch.StationManager.getInstance().findStation(b);var g=a.getSearchParam("direction")==="OneWay";b=s2.tuifly.helper.restrictions.validateSearch(b,f,g);if(b!=null){var h=s2.tuifly.util.culture.get(b.error);h!=null&&jQuery.each(b,function(n,p){h=h.replace(RegExp("{"+n+"}"),p)});s2.tuifly.widget.dialog.alertNotice(h);
return false}}});
s2.namespace("s2.tuifly.helper.hotelSearch",function(){var a=this;a.loaded=false;this.initialize=function(){$("#hotelSearch").mouseover(function(){if(!a.loaded){a.load();a.loaded=true}})};this.load=function(){$("#keyword").focus(function(){$(this).val("")});var b=JooseX.Culture.Factory.get();(new Date).setDate((new Date).getDate()+7);var f=$("#datePickerHotelCheckIn");this.initDatepicker(f);var g=$("#datePickerHotelCheckOut");this.initDatepicker(g);f.val(b.formatDate(Date.today()));g.val(b.formatDate(Date.today().add(7).days()));
f.bind("change",function(){b.parseDate(g.val())<b.parseDate(f.val())&&g.val(f.val())});var h=window.location.protocol+"//"+window.location.host+"/skyres/data/hotels.json",n=$("#hotelSearch .queryCustomSelects");jQuery.getJSON(h,function(t){function w(q,ya){for(var la=q;la<K;la++)if(ya.text.toUpperCase()<ba[la].text.toUpperCase())return la;return la>0?la:0}var x="hotelSearchDest",E=t[x],L=jQuery("<select id='"+x+"Select' name='ziel'/>"),Q;for(Q in E)L.append(jQuery("<option value='"+E[Q]+"'>"+Q+"</option>"));
L.children(":first").attr("selected","selected");$("#"+x).append(L);x="hotelSearchRegion";t=t[x];var O=jQuery("<select id='"+x+"Select' name='region'/>");E=jQuery("<option value='-1'>"+t["-1"]+"</option>");var I={},ba=[],K=0;delete t["-1"];for(var C in t){Q=t[C];var ka="",ua;for(ua in Q)ka=ka+"<option value='"+Q[ua]+"'>"+ua+"</option>";ka=jQuery(ka);I[C]=E.add(ka);var fa=-1;Q=0;for(var N=ka.length;Q<N;Q++,K++){fa=w(fa+1,ka.get(Q));ba.splice(fa,0,ka.get(Q))}}I["-1"]=E.add(jQuery(ba));O.children(":first").attr("selected",
"selected");O.append(I["-1"]);$("#"+x).append(O);O.bind("change",function(){var q=O.val().match(/[^|]+$/);if(q!="-1"){L.children("[value="+q+"]").attr("selected","selected");L.data("update")()}});L.bind("change",function(){var q=O.val();O.empty();O.append(I[L.val()]);q!="-1"&&O.children("[value="+q+"]").length>0?O.children("[value="+q+"]").attr("selected","selected"):O.children(":first").attr("selected","selected");O.parent().removeClass("init");O.parent().find("input, div").remove();s2.tuifly.widget.customSelect.convert("#hotelSearch");
O.data("update")()});s2.tuifly.widget.customSelect.convert("#hotelSearch");x=n.find("select");for(Q=x.length-1;Q>=0;Q--)x.eq(Q).data("update")()});$(".childsel");var p=$("#hotelSearchChildrenDetails");$("#hotelSearchChildren").bind("change",function(){var t=$("#hotelSearchChildren").val(),w=$(".childsel").prevAll("input");w.hide();w.filter(":lt("+t+")").show();w.next().find("li:first").click();t>0?p.show():p.hide()})};this.initDatepicker=function(b){b.datepicker({numberOfMonths:[1,3],stepMonths:3,
prevText:"&#160;",nextText:"&#160;",closeText:"&#160;",currentText:"",changeMonth:false,changeYear:false,changeFirstDay:false,showOtherMonths:true,showOn:"focus",minDate:"+0",showAnim:"show",duration:"",showButtonPanel:true})};var c,d;$(document).ready(function(){c=$("#keyword").val();if(typeof message!="undefined")d=message.errorHotelSearch});this.submit=function(){message=$("#errorMessage");var b=$("#hotelSearch .bookingButton"),f=$("#datePickerHotelCheckIn");if(!f.val()){if(b.hasClass("loading")){b.removeClass("loading");
b.find(".loadingImage").remove()}alert(window.hotelCheckInDateError);return false}var g=JooseX.Culture.Factory.get();f.after('<input type="hidden" name="termin" value="'+g.parseDate(f.val()).getTime()/1E3+'" />');$("#hotelSearchRegionSelect").val()!="-1"&&$("#hotelSearchDestSelect").val()=="-1"&&$("#hotelSearchRegionSelect").change();f=$("#keyword").val();var h=$("#hotelSearchGuests").val(),n=$("#nights").val();g=JooseX.Culture.Factory.get();var p=JooseX.Culture.Factory.get().majorIdentifier(),t=
$("#datePickerHotelCheckIn").val();t=g.parseDate(t).getTime();g=(new Date(t)).toString("yyyyMMdd");g="http://hotels.tuifly.com/"+p+"/p8538/pvhpsearch/Hotels.aspx?k="+f+"&d="+g+"&n="+n+"&rt="+h;if(b.hasClass("loading")){b.removeClass("loading");b.find(".loadingImage").remove()}f==""||f==c?alert(d):$("#hotelSearch a").attr("href",g)}});
s2.namespace("s2.tuifly.helper.holidaySearch",function(){var a,c=this;c.loaded=false;this.initialize=function(){$("#holidaySearch").mouseover(function(){if(!c.loaded){c.load();c.loaded=true}})};this.load=function(){var d=JooseX.Culture.Factory.get();(new Date).setDate((new Date).getDate()+7);var b=$("#datePickerHolidayCheckIn");this.initDatepicker(b);var f=$("#datePickerHolidayCheckOut");this.initDatepicker(f);b.val(d.formatDate(Date.today()));f.val(d.formatDate(Date.today().add(7).days()));b.bind("change",
function(){d.parseDate(f.val())<d.parseDate(b.val())&&f.val(b.val())});$.getScript("https://images.traveltainment.de/booking/cache/790006/654/cachefiles_654_js.php?getCacheFiles=1",function(){for(var h=0;h<window.cacheFiles_654.length;++h){var n=window.cacheFiles_654[h];if(n.search(/regionen.*/)!=-1){$.getScript("https://images.traveltainment.de/booking/cache/790006/654/"+n,function(){var p=[];if(typeof window.TTREGS_654!="undefined")p=window.TTREGS_654;var t=jQuery("<select id='holidaySearchDestSelect' name='ziel'/>");
t.append(jQuery("<option value='-1'>"+window.allDestinationsOption+"</option>"));for(var w=0;w<p.length;++w){var x=p[w].split("|");x[1]>=1E4&&t.append(jQuery("<option value='"+x[1]+"'>"+x[0]+"</option>"))}t.children(":first").attr("selected","selected");$("#holidaySearchDest").append(t);var E=jQuery("<select id='holidaySearchRegionSelect' name='region'/>");E.append(jQuery("<option value='-1'>"+window.allRegionsOption+"</option>"));for(w=0;w<p.length;++w){x=p[w].split("|");x[1]<1E4&&E.append(jQuery("<option value='"+
x[1]+"|"+x[2]+"'>"+x[0]+"</option>"))}E.children(":first").attr("selected","selected");$("#holidaySearchRegion").append(E);E.bind("change",function(){var L=E.val().match(/[^|]+$/);if(L!="-1"){t.children("[value="+L+"]").attr("selected","selected");t.data("update")()}});t.bind("change",function(){var L=E.val(),Q=t.val();E.empty();E.append(jQuery("<option value='-1'>"+window.allRegionsOption+"</option>"));for(var O=0;O<p.length;++O){var I=p[O].split("|");if(I[1]<1E4&&(I[2]==Q||Q==-1))E.append(jQuery("<option value='"+
I[1]+"|"+I[2]+"'>"+I[0]+"</option>"))}L!="-1"&&E.children("[value="+L+"]").length>0?E.children("[value="+L+"]").attr("selected","selected"):E.children(":first").attr("selected","selected");E.parent().removeClass("init");E.parent().find("input, div").remove();s2.tuifly.widget.customSelect.convert("#holidaySearch");E.data("update")()});s2.tuifly.widget.customSelect.convert("#holidaySearch");w=$("#holidaySearch .queryCustomSelects").find("select");for(x=w.length-1;x>=0;x--)w.eq(x).data("update")()});
break}}});var g=$("#holidaySearchChildrenDetails");$("#holidaySearchChildren").bind("change",function(){var h=$("#holidaySearchChildren").val();a=h;var n=$(".childsel",g).prevAll("input");n.hide();n.filter(":lt("+h+")").show();n.next().find("li:first").click();h>0?g.show():g.hide()})};this.initDatepicker=function(d){d.datepicker({numberOfMonths:[1,3],stepMonths:3,prevText:"&#160;",nextText:"&#160;",closeText:"&#160;",currentText:"",changeMonth:false,changeYear:false,changeFirstDay:false,showOtherMonths:true,
showOn:"focus",minDate:"+0",showAnim:"show",duration:"",showButtonPanel:true})};this.submit=function(){message=$("#errorMessage");var d=$("#holidaySearch .bookingButton"),b=$("#datePickerHolidayCheckIn"),f=$("#datePickerHolidayCheckOut");if(b.val()){if(!f.val()){if(d.hasClass("loading")){d.removeClass("loading");d.find(".loadingImage").remove()}alert(window.holidayCheckOutDateError);return false}}else{if(d.hasClass("loading")){d.removeClass("loading");d.find(".loadingImage").remove()}alert(window.holidayCheckInDateError);
return false}var g=JooseX.Culture.Factory.get();$("#holidaySearch input[name='termin']").remove();b.after('<input type="hidden" name="termin" value="'+g.parseDate(b.val()).getTime()/1E3+'" />');$("#holidaySearch input[name='ruecktermin']").remove();f.after('<input type="hidden" name="ruecktermin" value="'+g.parseDate(f.val()).getTime()/1E3+'" />');b=$("#holidaySearchAdults").val();f=$("#holidaySearchChildren").val();for(g=1;g<=f;++g){var h=$("#holidaySearchChild"+g).val();b+=";"+h}$("#holidaySearch input[name='personen']").remove();
$("#holidaySearchAdults").after('<input type="hidden" name="personen" value="'+b+'" />');$("#holidaySearchRegionSelect").val()!="-1"&&$("#holidaySearchDestSelect").val()=="-1"&&$("#holidaySearchRegionSelect").change();$("#holidaySearch input[name='flugdauer']").remove();$("#holidaySearchDest").after('<input type="hidden" name="flugdauer" value="'+$("#holidaySearchDestSelect").val()+'" />');$("#holidaySearch input[name='dauer']").remove();$("#holidaySearchDuration").after('<input type="hidden" name="dauer" value="'+
$("#holidaySearchDuration").val().replace(/X/,"_")+'" />');b="http://ww2.tui.com/index.php?coopid=TPP_TUI_TUIfly_CompactSearch2TT&"+$("#holidaySearch input, #holidaySearch select").serialize();if(d.hasClass("loading")){d.removeClass("loading");d.find(".loadingImage").remove()}if(a>0){d=true;f=$("#holidaySearchChildrenDetails select").filter(":lt("+a+")");for(i=0;i<f.length;i++)if(f[i].options[f[i].selectedIndex].value==-1){d=false;break}d=d}else d=true;if(d){$("#holidaySearch a").attr("target","_blank");
$("#holidaySearch a").attr("href","http://"+window.location.host+"/specials/partnerframe/index.php?scte=CSPauschalreisen_HP_220_P_K5009V1&lang=DEU&sub=tui&suburl="+Base64.encode(b))}else{alert(window.selectAgesForChildrenError);return false}}});
s2.namespace("s2.tuifly.helper.carSearch",function(){var a=this;a.loaded=false;this.initialize=function(){$("#carSearch").mouseover(function(){if(!a.loaded){a.load();a.loaded=true}});a.initCalIcon()};this.initCalIcon=function(){$("#tuiCarsBox .calIcon").live("click",function(){$(this).parent().find(".simpleDatePicker").trigger("focus")})};this.load=function(){var c=JooseX.Culture.Factory.get(),d=$("#datePickerCarLeasing");this.initDatepicker(d);var b=$("#carSearchLeasingTime"),f=$("#datePickerCarReturn");
this.initDatepicker(f);var g=$("#carSearchReturnTime");d.val(c.formatDate(Date.today().add(14).days()));f.val(c.formatDate(Date.today().add(21).days()));d.bind("change",function(){c.parseDate(f.val())<c.parseDate(d.val())&&f.val(c.formatDate(c.parseDate(d.val()).add(1).days()));if(c.parseDate(f.val()+" "+g.val())<c.parseDate(d.val()+" "+b.val())){g.val(b.val());g.data("update")()}});b.bind("change",function(){if(c.parseDate(f.val()+" "+g.val())<c.parseDate(d.val()+" "+b.val())){g.val(b.val());g.data("update")()}});
var h=$("#carSearch .queryCustomSelects"),n="carSearchCountry",p=jQuery("<select id='"+n+"Select' name='lb_Land'/>");p.data("dataUrl","https://ww5.tui.com/cars/ibe/services/suche_lb_country_tf_"+c.majorIdentifier()+".php");p.data("notSelectedOption",window.carSearchCountryNotSelected);$("#"+n).append(p);n="carSearchRegion";var t=jQuery("<select id='"+n+"Select' name='lb_region'/>");t.data("dataUrl","https://ww5.tui.com/cars/ibe/services/suche_lb_region_tf_"+c.majorIdentifier()+".php");t.data("notSelectedOption",
window.carSearchRegionNotSelected);t.data("parameter",{landid:p});p.data("successor",t);$("#"+n).append(t);n="carSearchCity";var w=jQuery("<select id='"+n+"Select' name='lb_city'/>");w.data("dataUrl","https://ww5.tui.com/cars/ibe/services/suche_lb_city_tf_"+c.majorIdentifier()+".php");w.data("notSelectedOption",window.carSearchCityNotSelected);w.data("parameter",{landid:p,regionid:t});t.data("successor",w);$("#"+n).append(w);n="carSearchStation";t=jQuery("<select id='"+n+"Select' name='lb_station'/>");
t.data("dataUrl","https://ww5.tui.com/cars/ibe/services/suche_lb_station_tf_"+c.majorIdentifier()+".php");t.data("notSelectedOption",window.carSearchStationNotSelected);t.data("parameter",{cityid:w});w.data("successor",t);$("#"+n).append(t);$("#carSearchCountry select, #carSearchLocation select").bind("customSelect_changedAndClosed",function(){var x=$(this).data("successor");if(x!=undefined){var E=x.data("parameter"),L="",Q;for(Q in E)L+=Q+"="+E[Q].val()+"&";L+="callback=?";x.empty();x.append(x.data("notSelectedOption"));
if(!E.cityid||E.cityid.val().length>0)jQuery.get(x.data("dataUrl")+"?"+L,null,function(O){for(var I=0,ba=O.length;I<ba;I++)x.append(jQuery("<option value='"+O[I][0]+"'>"+O[I][1]+"</option>"));x.data("updateList")();x.data("update")();x.trigger("customSelect_changedAndClosed")},"jsonp");else{x.data("updateList")();x.data("update")();x.trigger("customSelect_changedAndClosed")}}else s2.tuifly.widget.customSelect.convert("#carSearch")});jQuery.getJSON(p.data("dataUrl")+"?callback=?",function(x){b.val("10:00");
g.val("10:00");p.append(window.carSearchCountryNotSelected);for(var E=0,L=x.length;E<L;E++)p.append(jQuery("<option value='"+x[E][0]+"'>"+x[E][1]+"</option>"));p.bind("change",function(){$("#carSearchLocation").show()});s2.tuifly.widget.customSelect.convert("#carSearch");x=h.find("select");for(E=x.length-1;E>=0;E--)x.eq(E).data("update")()})};this.initDatepicker=function(c){c.datepicker({numberOfMonths:[1,3],stepMonths:3,prevText:"&#160;",nextText:"&#160;",closeText:"&#160;",currentText:"",changeMonth:false,
changeYear:false,changeFirstDay:false,showOtherMonths:true,showOn:"focus",minDate:"+14",showAnim:"show",duration:"",showButtonPanel:true})};this.submit=function(){$("#errorMessage");var c=$("#carSearch .bookingButton");if(c.hasClass("loading")){c.removeClass("loading");c.find(".loadingImage").remove()}if($("#carSearchCountrySelect").val()==""||$("#carSearchCitySelect").val()==""||$("#carSearchStationSelect").val()==""){alert(window.carSearchLocationError);return false}c=JooseX.Culture.Factory.get();
var d=c.majorIdentifier();d="https://ww5.tui.com/cars/ibe/cars_list.php?agk=tuifly&oh=1&lg_c="+d+"&lg_s="+d+"&"+$("#carSearch input, #carSearch select").serialize();c.identifier();$("#carSearch a").attr("target","_blank");$("#carSearch a").attr("href",d);return true}});
s2.namespace("s2.tuifly.helper.webCheckIn",function(){this.submit=function(){var a=document.getElementById("checkinBid").value,c=document.getElementById("checkinLastname").value,d=JooseX.Culture.Factory.get().majorIdentifier();s2.tuifly.events.AjaxStartEvent.trigger("webCheckin");var b=s2.tuifly.util.Environment.get().secureUrl("/php/webcheckin.php");jQuery.ajax({type:"GET",url:b,data:{name:c,bid:a,form1:"true",language:d},success:function(f){if(f[2]!="")top.location.href=f[2];else alert(f[1]);s2.tuifly.events.AjaxEndEvent.trigger("webCheckin")},
dataType:"jsonp"})}});s2.namespace("s2.tuifly.helper.keepAlive",function(){this.initialize=function(){this.loop()};var a=function(){jQuery.get("/KeepAlive.aspx?rand="+Math.random(),function(c,d){s2.Logger.debug("Send keep alive: "+d)})};this.loop=function(){setInterval(a,108E4);(""+location.href).indexOf(".aspx")==-1&&setTimeout(a,6E4)}});
s2.namespace("s2.tuifly.helper.simpleSubmit",function(){var a=function(c){c.preventDefault();form=$(this);var d=$("#successMessage").text();if(d==null||d=="")d="Vielen Dank";form.ajaxSubmit({success:function(){s2.tuifly.widget.dialog.alert(d)}})};this.bind=function(c){$(document).ready(function(){$(c).submit(a)})}});s2.namespace("s2.tuifly.helper.hideASPErrorMessage",function(){this.initialize=function(){document.getElementById("error")&&$("body#error>h2:first a[href*=ErrorMessage.aspx]").parents("h2").hide()}});
s2.namespace("s2.tuifly.helper.forceNewRendering",function(){this.initialize=function(){this.RightAlignedIconsIE6()};this.render=function(a){this.renderIE6(a)};this.renderIE6=function(a){$(a).attr("zoom",1)};this.RightAlignedIconsIE6=function(){}});
s2.namespace("s2.tuifly.helper.partner",function(){this.initialize=function(){var a=s2.tuifly.util.Query.instance(),c=a.param("partner");a=a.param("passwordIncorrect");if(s2.tuifly.Login.prototype.loggedIn())a=false;!a&&c&&s2.tuifly.widget.dialog.myTUIflyLayer("/de/_includes/partner/"+c+".html")};this.login=function(){var a=$("#PartnerReturnURL").val().match(/partner=(\d+)/);if(a&&a[1]){var c=location.href;c=c.replace(/#.*/,"");c+=c.match(/\?/)?"&":"?";c+="partner="+a[1];$("#PartnerReturnURL").val(c)}s2.tuifly.util.tracking.fire({events:["event3"],
delay:true,element:document.getElementById("bonusPartnerDetail"),name:"login"});window.tuiLogin.submitGlobalLoginRemoteNewValues("user","password","PartnerReturnURL")};this.callPartnerLink=function(a){if(s2.tuifly.Login.prototype.loggedIn()){var c=$(a).attr("href");if(c.match(/subid=$/i)||c.match(/Side=$/i)||c.match(/zpar0=$/i)||c.match(/epi=$/i)||c.match(/p2=$/i)||c.match(/extcustomer=$/i)){var d=(new s2.tuifly.util.Cookie).get("customerNumber");c+=d;$(a).attr("href",c)}}}});
s2.namespace("s2.tuifly.helper.notepad",function(){var a=this;a.doNotShowExitLayer=false;a.PreisalarmTeaserClicked=false;var c;a.initialize=function(){c=new s2.tuifly.util.Cookie;a.synchronizeCounter();a.changeMeinTUIflyNavigationBehaviour();$("#qPreisAlarmTeaser").live("click",function(){a.PreisalarmTeaserClicked=true});$("#AddAlarmAddAlarmView_TextBoxLoginPassword").live("keyup",function(d){d&&d.keyCode==s2KeyCode.ENTER&&a.login()});if(location.href.match(/\/select\.aspx/i)||location.href.match(/\/selectnew\.aspx/i))$("body[skin=HLXConsumer]").length==
0&&$("body[skin=HLXMember]").length==0||(new s2.tuifly.util.Cookie).get("HideExitLayer")||$("#header").live("click",function(d){if(d&&d.target){var b=$(d.target);(d=b.attr("href"))||(d=b.parents("a:first").attr("href"));if(!d)return true;if(a.doNotShowExitLayer||d=="#")return true;b=b.attr("id");if(b=="globalLoginFindPasswordAction"||b=="globalLogoutAction")return true;if(d.match(/\/flug\.html/)||d.match(/\/flug\/index\.html/)||d.match(/\/mein\-TUIfly\/register\.html/))return true;if($(".qNoFlightFound").length||
$(".qNotepadLink.invisible").length)return true;a.showExitLayer("AddAlarmExit.aspx");a.setEvalHref(d);return false}else return true})};a.evalHref=false;a.setEvalHref=function(d){a.evalHref=d};a.getEvalHref=function(){return a.evalHref};a.closeNotepad=function(){s2.tuifly.widget.dialog.divLayerClose()};a.closeExitLayer=function(){s2.tuifly.widget.dialog.divLayerClose();var d=a.getEvalHref();if(d!=false)window.location.href=d};a.showExitLayer=function(d){var b=new Date((new Date).getTime()+2592E6);
(new s2.tuifly.util.Cookie).set("HideExitLayer","true",b);d=a.buildQueryUrl(d);s2.tuifly.widget.dialog.exitLayer(d,function(){s2.tuifly.util.tracking.fire({events:["event1"],values:{prop25:"Exit_Layer_Open"},name:"Exit_Layer"})})};a.showAlarmConfirmLayer=function(d){if($("table.flightSelection input:checked").length!=0){d=a.buildQueryUrl(d);s2.tuifly.widget.dialog.priceAlarmConfirmLayer();jQuery.get(d,function(b){$("#priceAlarmConfirm-ajaxLayer").html(b);s2.tuifly.widget.dialog.setFocus()});a.PreisalarmTeaserClicked=
false}};a.checkPreisAlarmTeaserVisibility=function(){$(".qActivatePriceAlarm").length&&$("#qPreisAlarmTeaser").removeClass("hidden")};a.buildQueryUrl=function(d){d=d?d:"AddAlarm.aspx";var b=a.getFlightParams(),f="";jQuery.each(b,function(g,h){f+=f==""?"?":"&";f+=g+"="+h});d+=f;return d};a.getCheckedEmailInfoForPreisalarm=function(){var d={},b=$("input[id$='_TextBoxEmailId']:visible");if(b.length){b=b.val();if(!b||b.match(/^[a-z0-9_\.\-]+\@[a-z0-9\-]+\.[a-z]{2,4}$/i)==null){$(".formMail .error").removeClass("hidden");
$(".formMail .error").removeClass("invisible");return{success:false}}else{d.email=b;d.emailIsEncrypted=false;d.customerNumber=""}}else{d.email=cookie.get("customerEMailEncrypted");d.emailIsEncrypted=true;d.customerNumber=cookie.get("customerNumber");$("#priceAlarmStore-member").removeClass("hidden");$("#priceAlarmStore-consumer").addClass("hidden")}d.success=true;return d};a.storeWithAlarm=function(){var d=a.getFlightParams();d.alarm=1;d.culture=JooseX.Culture.Factory.get().identifier();new s2.tuifly.util.Cookie;
var b=a.getCheckedEmailInfoForPreisalarm();if(!b.success)return false;d.email=b.email;d.emailIsEncrypted=b.emailIsEncrypted;d.customerNumber=b.customerNumber;s2.tuifly.widget.dialog.divLayerClose();s2.tuifly.widget.dialog.priceAlarmStoreLayer();$(document).ajaxError(function(f,g,h){if(h.url.match(/notepad\/StoreWithAlarm/)){a.prepareForResult($("#priceAlarmStore-ajaxLayer"));a.displayError($("#priceAlarmStore-ajaxLayer"))}});a.doNotShowExitLayer=true;$.post("/notepad/StoreWithAlarm",d,function(f){a.prepareForResult($("#priceAlarmStore-ajaxLayer"));
var g=false;if(f&&f.success)g=f.success;if(g){a.addFacebookShareButton(d);s2.tuifly.helper.notepad.writeCounter(f)}else a.displayError($("#priceAlarmStore-ajaxLayer"))},"json");return true};a.addFacebookShareButton=function(d){var b=$("<a/>"),f="http://www.facebook.com/sharer.php?s=100&p[title]=Ich%20nutze%20jetzt%20den%20Preisalarm%20von%20TUIfly.com&p[summary]=Dein%20Flug%20wird%20reduziert%20und%20du%20hast%20es%20verpasst%3F%20Das%20kann%20mir%20jetzt%20nicht%20mehr%20passieren.%20Sollte%20der%20Flug%20von%20[originName]%20nach%20[destinationName]%20g%C3%BCnstiger%20werden%2C%20erhalte%20ich%20eine%20Email%20von%20TUIfly.com.%20Sehr%20praktisch!&p[url]=http%3A%2F%2Fwww.tuifly.com%2Fphp%2Fgotoselect.php%3Forigin%3D[origin]%26destination%3D[destination]%26date1%3D[abflugdatum]%26date2%3D[rueckflugdatum]%26AD%3DFAN%26ATT%3DShare_Preisalarm&p[images][0]=http%3A%2F%2Fwww.tuifly.com%2Fimages%2Ffacebook%2Ffb_preisalarm.jpg";
f=f.replace(/\[originName\]/g,Stations[d.OAIATA].name);f=f.replace(/\[destinationName\]/g,Stations[d.DAIATA].name);f=f.replace(/\[origin\]/g,d.OAIATA);f=f.replace(/\[destination\]/g,d.DAIATA);d=$("#row"+selectedIds[1]).attr("departure");d=d.replace(/\s.*/,"");f=f.replace(/\[abflugdatum\]/g,d);d="";if(selectedIds[2]){d=$("#row"+selectedIds[2]).attr("departure");d=d.replace(/\s.*/,"")}f=f.replace(/\[rueckflugdatum\]/g,d);b.attr("href",f);b.click(function(){popup(f,"popup","width=600,height=400,scrollbars=yes");
return false});b.html('<img src="https://www.tuifly.com/images/facebook/fb_button_weiterempfehlen.gif" border="0"/>');$(".qPriceAlarmSuccessLayer").html(b)};a.storeWithOutAlarm=function(){var d=a.getFlightParams();d.alarm=0;d.rand=Math.random();s2.tuifly.widget.dialog.notepadLayer();$(document).ajaxError(function(b,f,g){if(g.url.match(/notepad\/store/)){a.prepareForResult($("#notepad-ajaxLayer"));a.displayError($("#notepad-ajaxLayer"))}});a.doNotShowExitLayer=true;$.getJSON("/notepad/store",d,function(b){a.prepareForResult($("#notepad-ajaxLayer"));
var f=0;if(b&&b.success&&b.count>0)f=1;f?s2.tuifly.helper.notepad.writeCounter(b):a.displayError($("#notepad-ajaxLayer"))});return true};a.callbackPreisalarmEmailInput=function(){var d={email:$("#s2AlertBox input[name='priceAlarmEmailInput']").val(),mailEncrypted:false};d.email?a.callbackAddAlarmToNotepad(d):setTimeout(function(){a.openPriceAlarmEmailInputLayer(function(){$("#s2AlertBox .qValidationError").removeClass("invisible")})},0)};a.storePreisalarm=function(){if(a.PreisalarmTeaserClicked)a.storePreisalarmTeaser();
else if(a.storeWithAlarm()){s2.tuifly.util.tracking.getObject();s2.tuifly.util.tracking.fire({events:["event1","event67"],values:{eVar8:s.pageName,eVar40:"Preisalarm"},name:"Preisalarm"})}};a.storeMerkzettel=function(){a.storeWithOutAlarm();s2.tuifly.util.tracking.fire({events:["event1","event8"],values:{eVar8:s.pageName,eVar24:"Merkzettel"},name:"Merkzettel"})};a.storePreisalarmExit=function(){a.storeWithAlarm()&&s2.tuifly.util.tracking.fire({events:["event1","event67"],values:{eVar8:"Exit_Layer",
prop25:"Exit_Layer_Preisalarm"},name:"Preisalarm"})};a.storeMerkzettelExit=function(){a.storeWithOutAlarm();s2.tuifly.util.tracking.fire({events:["event8"],values:{eVar8:"Exit_Layer",eVar24:"Merkzettel",prop25:"Exit_Layer_Merkzettel"},name:"Merkzettel"})};a.storePreisalarmTeaser=function(){a.storeWithAlarm();s2.tuifly.util.tracking.fire({events:["event1","event67"],values:{eVar8:"Preisalarm-Teaser",eVar40:"Preisalarm"},name:"Preisalarm"})};a.trackBookingClick=function(d){s2.tuifly.util.tracking.fire({values:{eVar24:"Merkzettel"},
delay:true,element:d,name:"Merkzettel_Zum_Angebot"})};a.continueBooking=function(){s2.tuifly.widget.dialog.divLayerClose();var d=$("#ControlGroupSelectView_LinkButtonSubmit"),b=d.offset().top-400;window.scrollTo(0,b);d.trigger("click")};a.prepareForResult=function(d){d=$(d);d.find(".contentBox").removeClass("hidden");d.find(".wait").addClass("hidden")};a.displayError=function(d){d=$(d);d.find(".error").removeClass("hidden");d.find(".notice").removeClass("hidden");d.find(".success").addClass("hidden")};
a.getFlightParams=function(){return{OPriceAdult:$("table.flightSelection input:checked:first").parent().find("a .qPriceAdult").html(),IPriceAdult:$("table.flightSelection input:checked:eq(1)").parent().find("a .qPriceAdult").html(),OPrice:$("#taxAndFeeTotalPrice .journey1 .journeyTotal").attr("grossprice"),IPrice:$("#taxAndFeeTotalPrice .journey2 .journeyTotal").attr("grossprice"),Currency:TYPE.S2Currency.coerce($(".qTaxAndFeeInclusiveTotalPrice span:first").html()).getCode(),ADT:s2.tuifly.util.passenger.countOf("ADT"),
CHD:s2.tuifly.util.passenger.countOf("CHD"),CHDD:s2.tuifly.util.passenger.countOf("CHDD"),INF:s2.tuifly.util.passenger.countOf("INFANT"),ODM:$("table.flightSelection input:checked:first").parents("tr").attr("departure"),OAM:$("table.flightSelection input:checked:first").parents("tr").attr("arrival"),IDM:$("table.flightSelection input:checked:eq(1)").parents("tr").attr("departure"),IAM:$("table.flightSelection input:checked:eq(1)").parents("tr").attr("arrival"),OAIATA:$("#TeaserDepartureStation").text(),
DAIATA:$("#TeaserDestination").text(),OKey:$("table.flightSelection input:checked:first").val(),IKey:$("table.flightSelection input:checked:eq(1)").val(),noCache:Math.random()}};a.writeCounterFromCookie=function(){var d=a.getCountFromCookie();d!=null&&a.writeCounter({count:d})};a.writeCounterFromRequest=function(){$.getJSON("/notepad/count",{noCache:Math.random()},function(d){var b=0;if(d&&d.success&&d.count>0)b=1;if(b){s2.tuifly.helper.notepad.writeCounter(d);c.set("notepadCount",d.count)}})};a.getCountFromCookie=
function(){var d=c.get("notepadCount");if(d!=null&&d!="")return d;d=c.get("notepadHashes");if(d!=null&&d!=""){d=d.replace(/,$/,"");return d=d.split(",").length}return 0};a.writeCounter=function(d){if($("#notepadCounter").length>0)if(d.count<1)$("#notepadCounter").get(0).innerHTML="";else $("#notepadCounter").get(0).innerHTML="("+d.count+")";if(document.getElementById("notepad-ajaxLayer")){$("#notepad-ajaxLayer").find(".error").addClass("hidden");$("#notepad-ajaxLayer").find(".success").removeClass("hidden")}};
a.synchronizeCounter=function(){if(!($(".SkinHLXConsumer").length==0&&$(".SkinHLXMember").length==0))if(c.get("loginEvent")==1){a.writeCounterFromRequest();c.set("loginEvent",0)}else a.writeCounterFromCookie()};a.encodeNotepadComment=function(){var d=encodeURI(s2.tuifly.util.removeHtmlTags($("#notepadCommentUnencoded").val()));$("#notepadComment").val(d)};a.areEmailsValid=function(){var d=$('form[name="sendNotepad"]').find('input[name="notepadEmailList"]').val().replace(";",","),b=true;Joose.A.each(d.split(","),
function(f){if(f!=""&&$.trim(f).match(/^[a-zA-Z0-9_\.\-]+\@[a-zA-Z0-9\-]+\.[a-zA-Z0-9]{2,4}$/)==null)b=false});return d.length>0&&b};a.submitMailForm=function(){var d=$('form[name="sendNotepad"]'),b="";if(a.areEmailsValid()){a.encodeNotepadComment();d.submit()}else{b+=d.find("div.errorMsgEmail").html();s2.tuifly.widget.loadingButton.cancelSpinAllButtons();alert(b)}};a.deactivateNotepad=function(d,b){jQuery.getJSON("/notepad/DeactivatePriceAlarm",{hash:d,rand:Math.random()},function(f){if(f.success){s2.tuifly.widget.dialog.alertNotice(b);
f=$(".qNotepad-"+d);f.find(".qActiveText").hide();f.find(".qNotActiveText").show();f.find(".priceAlarmIcon").removeClass("priceAlarmActive");f.find(".priceAlarmIcon").addClass("priceAlarmNotActive");f.find(".qActivateLink").show();f.find(".qDeactivateLink").hide();f.find(".priceAlarmIconLink").removeClass("priceAlarmNotActive");f.find(".priceAlarmIconLink").addClass("priceAlarmActive")}else alert(s2.tuifly.util.culture.get("defaultErrorMessage"))})};a.activateNotepad=function(d,b){jQuery.getJSON("/notepad/ActivatePriceAlarm",
{hash:d,rand:Math.random()},function(f){if(f.success){s2.tuifly.widget.dialog.alertNotice(b);a.activateAlarmSuccess(d)}else alert(s2.tuifly.util.culture.get("defaultErrorMessage"))})};a.addAlarmToNotepad=function(d,b){a.callbackAddAlarmToNotepad=function(g){var h=new s2.tuifly.util.Cookie;h={Culture:JooseX.Culture.Factory.get().identifier(),Hash:d,Email:g.email,CustomerNumber:h.get("customerNumber"),EmailIsEncrypted:g.mailEncrypted,rand:Math.random()};jQuery.getJSON("/notepad/CreateAlarmFromNotepad",
h,function(n){if(n.success){s2.tuifly.util.tracking.getObject();s2.tuifly.util.tracking.fire({events:["event1","event67"],values:{eVar8:s.pageName,eVar40:"Preisalarm"},name:"Merkzettel_zu_Preisalarm"});s2.tuifly.widget.dialog.alertNotice(b);a.activateAlarmSuccess(d);if(!g.mailEncrypted)a.savedPriceAlarmEmail=g.email}else alert(s2.tuifly.util.culture.get("defaultErrorMessage"))})};var f=cookie.get("customerEMailEncrypted");if(a.savedPriceAlarmEmail)a.callbackAddAlarmToNotepad({mailEncrypted:false,
email:a.savedPriceAlarmEmail});else f?a.callbackAddAlarmToNotepad({mailEncrypted:true,email:f}):a.openPriceAlarmEmailInputLayer()};a.openPriceAlarmEmailInputLayer=function(d){d||(d=function(){});s2.tuifly.widget.dialog.standardLayer($("#priceAlarmEmailInputLayer"),{okCallback:a.callbackPreisalarmEmailInput,okButtonText:s2.tuifly.util.culture.get("EmailInputLayerOKButtonText"),cancelButtonText:s2.tuifly.util.culture.get("EmailInputLayerCancelButtonText"),view:"note",confirm:1,title:s2.tuifly.util.culture.get("EmailInputLayerHeadline"),
callback:function(){$(".qValidationError").addClass("invisible");d();$("#s2AlertBox input[name='priceAlarmEmailInput']").focus()}})};a.activateAlarmSuccess=function(d){d=$(".qNotepad-"+d);d.find(".qActiveText").show();d.find(".qNotActiveText").hide();d.find(".priceAlarmIcon").removeClass("priceAlarmNotActive");d.find(".priceAlarmIcon").addClass("priceAlarmActive");d.find(".qActivateLink").hide();d.find(".qDeactivateLink").show();d.find(".priceAlarmIconLink").removeClass("priceAlarmActive");d.find(".priceAlarmIconLink").addClass("priceAlarmNotActive")};
a.login=function(){var d=$("#AddAlarmAddAlarmView_TextBoxLoginId").val(),b=$("#AddAlarmAddAlarmView_TextBoxLoginPassword").val();d={AddAlarmAddAlarmView$TextBoxLoginId:d,AddAlarmAddAlarmView$TextBoxLoginPassword:b};$("#priceAlarmLayer .qLoginForm").hide();$("#priceAlarmLayer .qButtons").hide();$("#priceAlarmLayer .wait").show();jQuery.post("/AddAlarm.aspx",d,function(f){f=$(f).html();$("#priceAlarmLayer").html(f)})};a.changeMeinTUIflyNavigationBehaviour=function(){var d=function(){var b=$(this),f=
b.attr("href");if(f!=null)if(f.match(/mein-TUIfly\/merkzettel\.html$/i)){f=$(".navNotepad a").attr("href");b.attr("href",f)}};$(".contentNavigation li a").mousedown(d);$(".subLevel li a").mousedown(d);$("#quicklinks li a").mousedown(d)}});
s2.namespace("s2.tuifly.helper.popup",function(){this.open=function(a,c,d,b){c||(c=630);d||(d=430);var f=screen.availHeight,g=eval(screen.availWidth/2-c/2);f=eval(f/2-d/2);c="width="+c+",height="+d+",top="+f+",left="+g;if(b)b=b;else{b="popup"+Math.random(1);b=b.replace(/\./,"")}a=window.open(a,b,c+",scrollbars=yes,status=no,dependent=yes");a!=null&&a.focus&&a.focus()}});
s2.namespace("s2.tuifly.helper.errorMessage",function(){this.setTrackingParams=function(){var a=location.pathname;a=a.replace(/^\//,"");var c=location.search;c=c.replace(/^\?\w*=\//,"");window.PAGENAME=a+"_"+c};this.setTimestamp=function(){var a=new Date;a=a.getHours()+":"+a.getMinutes()+":"+a.getSeconds()+" "+a.getDate()+"."+a.getMonth()+"."+a.getFullYear();$(".toggleContent p").after("<p>"+a+"</p>")}});
s2.namespace("s2.tuifly.helper.tracking",function(){this.initialize=function(){};this.pageName="";this.click=function(){try{var b=s_gi("rsid");b.linkTrackVars="prop1,prop2,events";b.linkTrackEvents="event1";b.prop1="";b.events="event8";b.eVar24="Merkzettel";b.tl(this,"o","Link Name")}catch(f){s2.Logger.debug("Error "+f)}};this.OmniturePageName=function(b){if(typeof b=="string")this.pageName=b;return this.pageName};try{var a=new s2.tuifly.util.Query,c=a.param("zanpid");if(c!=null&&c!="")(new Image).src=
"/ZanoxTrackingImage.aspx?"+a.toString()}catch(d){throw d;}});
s2.namespace("s2.tuifly.helper.teaserTracking",function(){var a=this;a.open=function(c,d,b,f){if(f==undefined)f=true;if(d||b){var g={events:["event7"],values:{},delay:true,element:c,name:"Teaserklick"};if(b)g.values.prop8=b;if(d)g.values.eVar1=d;s2.tuifly.util.tracking.fire(g);f&&a.updateForExternalTracking(c,d)}};a.updateForExternalTracking=function(c,d){var b=$(c).attr("href");if(!b.match("javascript:"))if(!b.match(/^\//)&&!b.match(/www\.tuifly\.com/)){b+=b.match(/&/)?"&":"?";$(c).attr("href",b+
"scte="+d)}}});s2.namespace("s2.tuifly.helper.frameBuster",function(){var a=this;this.bustIfNotInIFrame=function(c){window==top&&$(function(){var d=JooseX.Culture.Factory.get().identifier();if(d=c[d])location.href=d})};this.bust=function(){if(window!=top){$("body").addClass("hidden");var c="?";if(location.href.indexOf("?")>-1)c="&";top.location.href=location.href+c+"returnURL="+top.location.pathname+top.location.search+"&test"}};$(function(){$("body").hasClass("bust")&&a.bust()})});
s2.namespace("s2.tuifly.helper.flashTicker",function(){this.initialize=function(){var a=this;if(document.getElementById("flashTickerControl")){var c=a.tickerName();$("#flashTickerControl").mouseover(function(){a.flashMovie(c).tickerStop()});$("#flashTickerControl").mouseout(function(){a.flashMovie(c).tickerResume()})}};this.embed=function(a,c,d,b,f){var g={};g.bgColor=a;g.geschwindigkeit="1";g.news=c;a={};a.allowscriptaccess="always";a.allownetworking="all";a.wmode="transparent";c={};c.id=this.tickerName();
swfobject.embedSWF(d,this.tickerName(),b,"30","9.0.28",f,g,a,c)};this.flashMovie=function(a){return navigator.appName.indexOf("Microsoft")!=-1?window[a]:document[a]};this.tickerName=function(){return"ticker"}});
s2.namespace("s2.tuifly.helper.htmlErrorToAlert",function(){var a=[30006];this.initialize=function(){this.convert(a)};this.convert=function(c){if(document.getElementById("error")){var d=$("#error"),b=d.find("#errorSectionMainContent div.formRow"),f=d.find("#errorSectionContentDetails01 div.formRow"),g=d.find("#errorSectionContentDetails02 div.formRow"),h=0;f.each(function(n){var p=$(this).find("strong").eq(0).text();p=p.substring(1,p.indexOf(":"));for(var t=b.eq(n).text(),w=c.length-1;w>=0;w--)if(p==
c[w]){b.eq(n).hide();f.eq(n).hide();g.eq(n).hide();h+=1;h==f.length&&d.parent().remove();alert(t)}return true})}}});s2.namespace("s2.tuifly.helper.noFormReset",function(){this.initialize=function(){$.browser.msie&&$(document).keydown(function(){if(window.event.keyCode==27&&window.lastKey==27)return false;window.lastKey=window.event.keyCode})}});
s2.namespace("s2.tuifly.helper.restrictions",function(){var a=this,c=[];a.initialize=function(){for(var b=$(".qFlightRestrictions > div"),f=0;f<b.length;++f){var g=$(b[f]);g=jQuery.parseJSON(g.attr("value"));c.push(g)}window.getAfricanRouteException=function(){return a.getRestrictedOrigins()}};a.removeRestrictedOrigins=function(){if(!(SortedStations==null||SortedStations.length<=0))for(i=0;i<SortedStations.length;i++){var b=Stations[SortedStations[i]];b&&b.mkts&&a.isRestrictedOrigin(b.code)&&b.mkts.splice(0,
b.mkts.length)}};a.isRestrictedOrigin=function(b){for(var f=0;f<c.length;++f){var g=c[f];if(g.excludeOrigin!=null&&g.excludeOrigin.length!=0)for(var h in g.excludeOrigin)if(b.search(RegExp(g.excludeOrigin[h].origin))!=-1)return true}return false};a.getRestrictedOrigins=function(){for(var b=[],f=0;f<c.length;++f){var g=c[f];if(g.excludeOrigin!=null&&g.excludeOrigin.length!=0)for(var h in g.excludeOrigin)b=b.concat(g.excludeOrigin[h].originList.split(","))}return b};a.validateSearch=function(b,f,g){return a.validateRoute({origin:b,
destination:f,direction:g?"oneway":"return"})};var d=function(b,f){for(var g in f)if(g!=="meta"){if(b[g]==null)return false;if(g==="direction"){if(f[g]!=b[g])return false}else if(g==="origin"||g==="destination")if(b[g].search(RegExp(f[g]))==-1)return false}return true};a.validateRoute=function(b){for(var f=0;f<c.length;++f){var g=c[f];if(g.excludeRoute!=null&&g.excludeRoute.length!=0)for(var h in g.excludeRoute){var n=g.excludeRoute[h];if(d(b,n))return n.meta}}return null}});
s2.namespace("s2.tuifly.helper.airlines",function(){var a=this;a.initialize=function(){a.initOfferClickHandler();a.initInfoHandler();a.changeNavigationLinks();var c=window.location.href.match("[\\?&]showCarrierLayer=([^&#]*)");if($.cachedFind("#airlinePage").length){c=$("div.qDiashowElement li:first").data("code");a.loadDetails(c);s2.tuifly.widget.diashow.initDiashow({element:"div.qDiashowElement",clickHandler:a.diashowClickHandler})}else c&&a.openAirlines(c[1].toUpperCase())};a.openAirlines=function(c){s2.tuifly.widget.dialog.airlineLayer("/farefinder/CarrierOverviewLayer",
function(){a.track({values:{prop25:"Carrier-Layer",eVar8:"Carrier-Layer",eVar48:"Carrier-Layer"},name:"CarrierLayer öffnen"});$(".qDiashowElement li[data-code='"+c+"']").length?a.loadDetails(c,true):a.loadDetails($("div.qDiashowElement li:first").data("code"));s2.tuifly.widget.diashow.initDiashow({element:"div.qDiashowElement",clickHandler:a.diashowClickHandler})})};a.initOfferClickHandler=function(){$(".qCarrierDestinations li").live("click",function(){var c=$(this).data("carrier"),d=$(this).data("destination");
a.track({values:{eVar2:"Carrier-Layer",eVar38:"Carrier-Layer",eVar39:"Carrier-Layer",prop25:"Carrier-Layer ["+c+"] ["+d+"]"},name:"Carrier-Layer ["+c+"] ["+d+"]"});location.href=$(this).data("deeplink");return false});$("#airlineContent .qAllOffer").live("click",function(){var c=$(this).parents("[data-carriercode]").data("carriercode");a.track({values:{eVar2:"Carrier-Layer",eVar38:"Carrier-Layer",eVar39:"Carrier-Layer",prop25:"alle ["+c+"] Angebote"},name:"alle ["+c+"] Angebote"});location.href="/farefinder/bestoffers?carrier="+
c})};a.closeLayer=function(){a.track({values:{prop25:"Carrier-Layer close"},name:"Carrier-Layer close"});s2.tuifly.widget.dialog.divLayerClose()};a.diashowClickHandler=function(c,d){d.preventDefault();var b=$(c).data("code");a.track({values:{prop25:"Carrier-Layer ["+b+"]"},name:"Carrier-Layer ["+b+"]"});this.pause();a.loadDetails(b);return false};a.highlightCarrier=function(c){if(!jQuery.browser.msie6){$(".qDiashowElement li a").removeClass("active");$(".qDiashowElement li[data-code='"+c+"'] a").addClass("active")}};
a.loadDetails=function(c,d){a.showLoading();a.highlightCarrier(c);s2.tuifly.widget.diashow.pause();$.get("/farefinder/CarrierDetails?carrier="+c+"&rand=",function(b){a.hideLoading();$("#AirlineOffers .qContent").html(b);b=c.toLowerCase();var f=c.toUpperCase();$("#AirlineOffers ."+b+", #AirlineOffers ."+f).show();d?s2.tuifly.widget.diashow.scrollToCarrier(c):s2.tuifly.widget.diashow.resume()})};a.showLoading=function(){$("#AirlineOffers .qLoading").removeClass("hidden");$("#AirlineOffers .qContent").empty()};
a.hideLoading=function(){$("#AirlineOffers .qLoading").addClass("hidden")};a.initInfoHandler=function(){$(".qMoreInfo").live("click",function(){a.track({values:{prop25:"Carrier-Layer mehr Infos"},name:"Carrier-Layer mehr Infos"});$(".qMoreInfoText").slideDown(function(){$(".qMoreInfo").addClass("invisible")});return false});$(".qLessInfo").live("click",function(){$(".qMoreInfoText").slideUp(function(){$(".qMoreInfo").removeClass("invisible")});return false})};a.track=function(c){$.cachedFind("#airlinePage").length||
s2.tuifly.util.tracking.fire(c)};a.changeNavigationLinks=function(){var c=function(){var d=$(this),b=d.attr("href");b!=null&&b.match(/fluggesellschaften\.html$/i)&&d.attr("href","/farefinder/CarrierOverviewPage")};$(".contentNavigation li a").mousedown(c);$(".subLevel li a").mousedown(c);$("#quicklinks li a").mousedown(c)}});
s2.namespace("s2.tuifly.helper.mottoFlieger",function(){var a=this;a.routes={};a.airplanes={};a.codeToImageName={DAHFB:"sharanair",DATUD:"haribair",DAHFM:"goldbair",DAHFZ:"gluecksbringair",DATUE:"ice",DATUC:"regio"};a.polylines=[];a.markerData={};a.FLIGHTROWHEIGHT=31;a.STEPINPX=75;a.HEADLINEPICWIDTH=209;a.maxScrollWidth=function(){var c=($(".qAircrafts").length-4)*a.HEADLINEPICWIDTH;return c<0?0:c};a.initialize=function(){if(document.getElementById("mottoFlieger")){a.initRowClickHandler();a.loadPhotos()}};
a.initRowClickHandler=function(){var c=function(d){if(d.target){d=$(d.target).closest("tr").attr("route");a.activateRoutes([d])}};$(".qAircrafts").click(c);$(".qAircrafts").mouseover(c);$(".qAircrafts").mouseout(function(){a.resetSelection()})};a.loadMap=function(){var c=document.getElementById("map"),d={zoom:4,center:new google.maps.LatLng(49.951222,10.283203),navigationControl:true,mapTypeId:google.maps.MapTypeId.ROADMAP,minZoom:2};a.map=new google.maps.Map(c,d);a.markerManager=new MarkerManager(a.map,
{},function(){var b="",f=$("#mottoVisual");f.append("<img />");for(var g in a.airplanes){var h="javascript:s2.tuifly.helper.mottoFlieger.activateAircraft('"+g+"')";if(b)f.find(".dots").append('<a class="dot dotNotActive qDots qDot'+g+'" href="'+h+'"></a>');else{b=g;a.activateAircraft(b);f.append('<div class="dots"></div>');f.find(".dots").append('<a class="dot dotActive qDots qDot'+g+'" href="'+h+'"></a>')}}a.activateFirstRoute(b)})};a.activateFirstRoute=function(c){c=$($(".q"+c+" tr.data:first")).attr("route");
a.activateRoutes([c]);$(".qFlightList").scrollTop(0)};a.loadMarkers=function(c){if(a.markerManager){a.markerData={};var d=[];a.markerManager.clearMarkers();_(a.polylines).each(function(g){g.setMap(null)});if(a.data[c]){var b=[];jQuery.each(a.data[c].Flights,function(){var g=this.Id,h=new google.maps.LatLng(this.Origin.Airport.Lat,this.Origin.Airport.Lng),n=new google.maps.LatLng(this.Destination.Airport.Lat,this.Destination.Airport.Lng);$.cachedFind("#routeDetailLayer");var p=this.Origin.Airport.IATAcode;
if(a.markerData[p])a.markerData[p].flights.push(this);else{a.markerData[p]={};a.markerData[p].flights=[this]}a.markerData[p].point=h;p=this.Destination.Airport.IATAcode;if(a.markerData[p])a.markerData[p].flights.push(this);else{a.markerData[p]={};a.markerData[p].flights=[this]}a.markerData[p].point=n;b.push(h);b.push(n);h=new google.maps.Polyline({path:[h,n],strokeColor:"#FFF700",geodesic:true,strokeWeight:2,strokeOpacity:1});a.routes[g]={currentRoute:h};h.setMap(null);a.polylines.push(h)});jQuery.each(a.markerData,
function(){var g=a.createMarker(this.point,this.flights);d.push(g)});a.markerManager.addMarkers(d,0);a.markerManager.refresh();if(b.length>1){c=new google.maps.LatLngBounds;for(var f=0;f<b.length;f++)c.extend(b[f]);a.map.fitBounds(c)}}}};a.resetSelection=function(){jQuery.each(a.routes,function(){this.currentRoute.setMap(null)});$(".qRoute").removeClass("selected")};a.activateRoutes=function(c){if(c){jQuery.each(a.routes,function(){this.currentRoute.setMap(null)});$(".qRoute").removeClass("selected");
jQuery.each(c,function(){if(a.routes[this]){a.routes[this].currentRoute.setMap(a.map);$(".qRoute"+this).addClass("selected")}})}};a.activateAircraft=function(c){a.resetSelection();a.currentSelectedAircraft=c;$(".qAircrafts").hide();$(".q"+c).show();$(".qNaviStatus").removeClass("active");$(".q"+c).closest(".qNaviStatus").addClass("active");$(".qDots").removeClass("dotActive");$(".qDot"+c).addClass("dotActive");a.loadMarkers(c);$(".qAircraftname").text(a.airplanes[c]);var d="/skyres/images/sondermodelle/"+
a.codeToImageName[c]+".jpg";$("#mottoVisual img").attr("src",d);a.activateFirstRoute(c)};a.createMarker=function(c,d){var b=new google.maps.MarkerImage("/skyres/images/sondermodelle/marker.png",new google.maps.Size(12,12),null,new google.maps.Point(6,6));b=new google.maps.Marker({position:c,map:a.map,icon:b,clickable:true});google.maps.event.addListener(b,"mouseover",function(){var f=[];jQuery.each(d,function(){f.push(this.Id)});a.activateRoutes(f);var g=$("table .q"+a.currentSelectedAircraft+" tr"),
h=$(".q"+a.currentSelectedAircraft);setTimeout(function(){var n=0;g.removeClass("selected");jQuery.each(f,function(){n||(n=this.toString());h.find(".qRoute"+this).addClass("selected")});var p=[];h.find(".qRoute").each(function(){var x=$(this);p.push(x.attr("route"))});var t=jQuery.inArray(n,p);if(t<0)t=0;t=a.FLIGHTROWHEIGHT*t-a.FLIGHTROWHEIGHT;var w=$(".qFlightList").scrollTop();if(w<t)for(w=w;w<t;){if(w+a.STEPINPX>=t)w=t;else w+=a.STEPINPX;$(".qFlightList").scrollTop(w)}else for(w=w;w>t;){if(w-a.STEPINPX<=
t)w=t;else w-=a.STEPINPX;$(".qFlightList").scrollTop(w)}},0)});google.maps.event.addListener(b,"mouseout",function(){a.resetSelection()});return b};a.setData=function(c,d){a.data=c;a.airplanes=d};a.loadPhotos=function(){var c=$("#mottoFliegerAlbum").html();$("#mottoFliegerAlbum").remove();$("#photoGallery").html(c);$.getJSON("https://graph.facebook.com/325032542793/photos?callback=?",function(d){if(!(typeof d=="undefined"||!d.data)){var b=[];jQuery.each(d.data,function(){b.push(this)});if(b.length!=
0){var f=0;d=function(){var g=b[f++];if(f>=b.length)f=0;var h=$(".qPhotoAlbum img"),n=$(".qImageDescription");h.closest("div").fadeOut("slow",function(){h.attr("src",g.picture);h.attr("title",g.name);h.addClass("border");h.removeClass("loading");h.parent().attr("href",g.link);n.text(g.name);$(this).fadeIn("slow")})};d();setInterval(d,5E3)}}})};a.scrollLeft=function(){var c=$("#naviRow");parseInt(c.css("margin-left"),10)<-1*a.maxScrollWidth()||c.animate({"margin-left":"-=209"},200)};a.scrollRight=
function(){var c=$("#naviRow");parseInt(c.css("margin-left"),10)>=0||c.animate({"margin-left":"+=209"},200)}});
s2.namespace("s2.tuifly.helper.fixedFooter",function(){var a=this;a.initialize=function(){navigator.userAgent.match(/iPad/i)!=null?$("#fixedFooter").addClass("stop"):a.initPositionFooter()};a.initPositionFooter=function(){a.checkFooterPosition();$(window).scroll(function(){a.checkFooterPosition()});$(window).resize(function(){a.checkFooterPosition()})};a.checkFooterPosition=function(){var c=$.cachedFind("#fixedFooter");if($.cachedFind("#footer").length){var d=$.cachedFind("#footer"),b=d.offset().top,
f=$(document).scrollTop()+$(window).height();b<f?c.addClass("stop"):c.removeClass("stop");b=window.location.href.match(/aspx/);f=$.cachedFind("#contentArea");f=f.offset().top+f.height()+30;var g=$(window).height()-c.height();b!=null&&d.is(":visible")&&c.addClass("stop");if(b!=null&&!d.is(":visible"))f>g?c.addClass("stop"):c.removeClass("stop")}}});
s2.namespace("s2.tuifly.helper.home",function(){var a=this;a.initialize=function(){a.checkNewtentionFlashAds()};a.checkNewtentionFlashAds=function(){var c=$.cachedFind("#flashTeaserLeft"),d=$.cachedFind("#flashTeaserRight");if(c.find("[id^=n7banner_]:visible").length==0&&d.find("[id^=n7banner_]:visible").length==0){$.cachedFind("#flashOffers").hide();$.cachedFind("#noFlashOffers").show();$("#noLastFlights h2").css("color","#0A3C87")}}});
s2.namespace("s2.tuifly.helper.onsite",function(){this.initialize=function(){};this.load=function(){$(document).ready(function(){function a(){$.ajax({url:"/feed/kat/topsellerfeed.json",dataType:"json",cache:false,success:function(g){topsellerDestinations=[];$.each(g,function(E,L){topsellerDestinations.push({origin:L.origin,destination:L.destination,preis:L.preis,datum:L.datum,waehrung:L.waehrung})});topsellerDestinations.sort(function(E,L){return parseFloat(E.preis)-parseFloat(L.preis)});destinationOutput=
[];g=0;if($("#targetingImageDestination").html()==""){var h=topsellerDestinations.length;h-=1;var n=Math.floor(Math.random()*h),p=topsellerDestinations[n].datum.substring(0,10),t=p.split("."),w=t[2]+"-"+t[1]+"-"+t[0],x=topsellerDestinations[n].preis.replace(".",",");h=topsellerDestinations[n].waehrung;if(h=="EUR")h="&euro;";if(h=="GBP")h="&pound;";x=x+"&nbsp;"+h;$("#targetingImagePrice").html(x);$.ajax({url:"/images/visuals/"+topsellerDestinations[n].destination.toLowerCase()+".JPG",type:"HEAD",cache:false,
statusCode:{200:function(){$("#targetingImageSrc").attr("src","/images/visuals/"+topsellerDestinations[n].destination.toLowerCase()+".JPG")},404:function(){$("#targetingImageSrc").attr("src","/images/visuals/default.jpg")}}});$("#targetingImageDestination").html(Stations[topsellerDestinations[n].destination].name);$(".targetingImageURL").attr("href","/php/gotoselect.php?origin="+topsellerDestinations[n].origin+"&destination="+topsellerDestinations[n].destination+"&date1="+w+"&scte=Targeting_HP_TargetingImage_I_permanent_"+
topsellerDestinations[n].origin+"_"+topsellerDestinations[n].destination+"_"+t[2]+"-"+t[1]);$("#targetingImageOrigin").html("Ab "+Stations[topsellerDestinations[n].origin].name+"<br/>am "+p+" nach");$("#conTargetingImage").css("visibility","visible")}p="";for(t=0;t<topsellerDestinations.length;t++)if(topsellerDestinations[t])if(customStationNames[topsellerDestinations[t].destination]!=undefined||topsellerDestinations[t].destination!=undefined)if(g<8&&!destinationOutput[topsellerDestinations[t].destination]){destinationOutput[topsellerDestinations[t].destination]=
topsellerDestinations[t].destination;g++;h=topsellerDestinations[t].waehrung;if(h=="EUR")h="&euro;";if(h=="GBP")h="&pound;";w=topsellerDestinations[t].preis.replace(".",",");x="/farefinder/bestoffers?airportListOrigin="+topsellerDestinations[t].origin+"&airportListDestination="+topsellerDestinations[t].destination+"&scte=Targeting_HP_TargetingListe_I_permanent_"+topsellerDestinations[t].origin+"_"+topsellerDestinations[t].destination+"_undefined";p+='<div class="offerRow qOffer" ><div><div class="ort"><a href="'+
x+'"><span>'+Stations[topsellerDestinations[t].destination].name+'</span></a></div><div class="prozent"><span class="highlightIcon">&nbsp;</span></div><div class="preis" onclick="location.href=\''+x+"'\">ab "+w+"&nbsp;"+h+'</div></div><br class="clear"></div>'}p+="</div>";$("#targetingTPS").html(p)}});$("#conTargetingText").css("visibility","visible");$("#targetingHeadline").html("Die besten Flug-Angebote");$("#targetingHeadline").attr("href","/farefinder/bestoffers?origin=DE&scte=Targeting_HP_TargetingListe_I_permanent_DE_undefined_undefined");
$("#targetingLink").html("Alle Angebote");$("#targetingLink").attr("href","/farefinder/bestoffers?origin=DE&scte=Targeting_HP_TargetingListe_I_permanent_DE_undefined_undefined")}function c(g){cookieValueArray=g.split("|");cookieValueArray[4].split("-");var h=cookieValueArray[0]=="R"?cookieValueArray[6]+"-"+cookieValueArray[5]:"";$.ajax({url:"/feed/kat/"+cookieValueArray[1]+".json",dataType:"json",cache:false,error:function(){a()},success:function(n){cookieDestinations=[];var p=0;$.each(n,function(Q,
O){cookieDestinations[p]={origin:O.origin,destination:O.destination,preis:O.preis,datum:O.datum,waehrung:O.waehrung};p++});cookieDestinations.sort(function(Q,O){return parseFloat(Q.preis)-parseFloat(O.preis)});destinationOutput=[];n=0;var t="";htmlOffer="";for(var w=0;w<cookieDestinations.length;w++){if(cookieDestinations[w])if(cookieDestinations[w].destination==cookieValueArray[2]&&t=="")if($("#targetingImageDestination").html()==""){t=cookieDestinations[w].preis.replace(".",",");var x=cookieDestinations[w].waehrung;
if(x=="EUR")x="&euro;";if(x=="GBP")x="&pound;";t=t+"&nbsp;"+x;$("#targetingImagePrice").html(t);bild=cookieDestinations[w].destination.toLowerCase();$.ajax({url:"/images/visuals/"+bild+".JPG",type:"HEAD",cache:false,statusCode:{200:function(){$("#targetingImageSrc").removeAttr("src").attr("src","/images/visuals/"+bild+".JPG")},404:function(){$("#targetingImageSrc").removeAttr("src").attr("src","/images/visuals/default.jpg")}}});$("#targetingImageDestination").html(Stations[cookieDestinations[w].destination].name);
var E=cookieDestinations[w].datum.substring(0,10);datumURL=E.split(".");datumURL=datumURL[2]+"-"+datumURL[1]+"-"+datumURL[0];$("#targetingImageOrigin").html("Ab "+Stations[cookieDestinations[w].origin].name+"<br/>am "+E+" nach");$(".targetingImageURL").attr("href","/php/gotoselect.php?origin="+cookieDestinations[w].origin+"&destination="+cookieDestinations[w].destination+"&date1="+datumURL+"&date2="+h+"&scte=Targeting_HP_TargetingImage_I_permanent_"+cookieDestinations[w].origin+"_"+cookieDestinations[w].destination+
"_"+datumURL[2]+"-"+datumURL[1])}if(customStationNames[cookieDestinations[w].destination]!=undefined||cookieDestinations[w].destination!=undefined)if(n<8)if(!destinationOutput[cookieDestinations[w].destination]){destinationOutput[cookieDestinations[w].destination]=cookieDestinations[w].destination;var L=cookieDestinations[w].preis.replace(".",",");x=cookieDestinations[w].waehrung;if(x=="EUR")x="&euro;";if(x=="GBP")x="&pound;";E=cookieDestinations[w].datum.substring(0,10);datumURL=E.split(".");datumURL=
datumURL[2]+"-"+datumURL[1]+"-"+datumURL[0];E="/php/gotoselect.php?origin="+cookieDestinations[w].origin+"&destination="+cookieDestinations[w].destination+"&date1="+datumURL+"&scte=Targeting_HP_TargetingListe_I_permanent_"+cookieDestinations[w].origin+"_"+cookieDestinations[w].destination+"_"+datumURL[2]+"-"+datumURL[1];htmlOffer+='<div class="offerRow qOffer" ><div><div class="ort"><a href="'+E+'"<span>'+Stations[cookieDestinations[w].destination].name+'</span></a></div><div class="prozent"><span class="highlightIcon">&nbsp;</span></div><div class="preis" onclick="location.href=\''+
E+"';\" >ab "+L+"&nbsp;"+x+'</div></div><br class="clear"></div>';n++}}htmlOffer+="</div>";if(n>7){$("#targetingTPS").html(htmlOffer);$("#conTargetingText").css("visibility","visible");$("#targetingImageDestination").html()==""?b():$("#conTargetingImage").css("visibility","visible")}else a()}});$("#targetingHeadline").html("Fl&uuml;ge von "+Stations[cookieValueArray[1]].name);$("#targetingHeadline").attr("href","/farefinder/bestoffers?origin="+cookieValueArray[1]+"&scte=Targeting_HP_TargetingListe_I_permanent_"+
cookieValueArray[2]+"_"+cookieValueArray[1]+"_undefined");$("#targetingLink").html("Alle Angebote");$("#targetingLink").attr("href","/farefinder/bestoffers?origin="+cookieValueArray[1]+"&scte=Targeting_HP_TargetingListe_I_permanent_"+cookieValueArray[2]+"_"+cookieValueArray[1]+"_undefined")}function d(g){cookieValueArray=g.split("|");var h=cookieValueArray[4].split("-");h=h[1]+"-"+h[0];var n=cookieValueArray[0]=="R"?cookieValueArray[6]+"-"+cookieValueArray[5]:"";$.ajax({url:"/feed/kat/"+cookieValueArray[1]+
"_"+ControlGroupCompactSearchSSIView_AvailabilitySearchInputAffiliateCompactSearchSSIView_airportCountryMap[cookieValueArray[2]]+"_"+h+".json",dataType:"json",cache:false,error:function(){c(g)},success:function(p){cookieDestinations=[];$.each(p,function(O,I){cookieDestinations[O]={origin:I.origin,destination:I.destination,preis:I.preis,datum:I.datum,waehrung:I.waehrung}});cookieDestinations.sort(function(O,I){return parseFloat(O.preis)-parseFloat(I.preis)});destinationOutput=[];p=0;for(var t="",w=
"",x=0;x<cookieDestinations.length;x++){if(cookieDestinations[x])if(cookieDestinations[x].destination==cookieValueArray[2])if($("#targetingImageDestination").html()==""){w=cookieDestinations[x].preis.replace(".",",");var E=cookieDestinations[x].waehrung;if(E=="EUR")E="&euro;";if(E=="GBP")E="&pound;";w=w+"&nbsp;"+E;$("#targetingImagePrice").html(w);bild=cookieValueArray[2].toLowerCase();$.ajax({url:"/images/visuals/"+bild+".JPG",type:"HEAD",cache:false,statusCode:{200:function(){$("#targetingImageSrc").removeAttr("src").attr("src",
"/images/visuals/"+bild+".JPG")},404:function(){$("#targetingImageSrc").removeAttr("src").attr("src","/images/visuals/default.jpg")}}});$("#targetingImageDestination").html(Stations[cookieDestinations[x].destination].name);var L=cookieDestinations[x].datum.substring(0,10);datumURL=L.split(".");datumURL=datumURL[2]+"-"+datumURL[1]+"-"+datumURL[0];$("#targetingImageOrigin").html("Ab "+Stations[cookieDestinations[x].origin].name+"<br/>am "+L+" nach");$(".targetingImageURL").attr("href","/php/gotoselect.php?origin="+
cookieDestinations[x].origin+"&destination="+cookieDestinations[x].destination+"&date1="+datumURL+"&date2="+n+"&scte=Targeting_HP_TargetingImage_I_permanent_"+cookieDestinations[x].origin+"_"+cookieDestinations[x].destination+"_"+datumURL[2]+"-"+datumURL[1])}if(cookieDestinations[x])if(customStationNames[cookieDestinations[x].destination]!=undefined||cookieDestinations[x].destination!=undefined)if(p<8&&!destinationOutput[cookieDestinations[x].destination]){destinationOutput[cookieDestinations[x].destination]=
cookieDestinations[x].destination;p+=1;var Q=cookieDestinations[x].preis.replace(".",",");E=cookieDestinations[x].waehrung;if(E=="EUR")E="&euro;";if(E=="GBP")E="&pound;";w=w+"&nbsp;"+E;L=cookieDestinations[x].datum.substring(0,10);datumURL=L.split(".");datumURL=datumURL[2]+"-"+datumURL[1]+"-"+datumURL[0];L="/php/gotoselect.php?origin="+cookieDestinations[x].origin+"&destination="+cookieDestinations[x].destination+"&date1="+datumURL+"&scte=Targeting_HP_TargetingListe_I_permanent_"+cookieDestinations[x].origin+
"_"+cookieDestinations[x].destination+"_"+datumURL[2]+"-"+datumURL[1];t+='<div class="offerRow qOffer" ><div><div class="ort"><a href="'+L+'"<span>'+Stations[cookieDestinations[x].destination].name+'</span></a></div><div class="prozent"><span class="highlightIcon">&nbsp;</span></div><div class="preis" onclick="location.href=\''+L+"';\" >ab "+Q+"&nbsp;"+E+'</div></div><br class="clear"></div>'}}t+="</div>";if(p>7||$("#targetingImageDestination").html()!=""){w=$("#targetingTPS");x=$("#conTargetingImage");
if(p>7){w.html(t);$("#conTargetingText").css("visibility","visible")}$("#targetingImageDestination").html()!=""&&x.css("visibility","visible");p<=7&&c(g);$("#targetingImageDestination").html()==""&&b()}else c(g)}});$("#targetingHeadline").html("Fl&uuml;ge von "+Stations[cookieValueArray[1]].name);$("#targetingHeadline").attr("href","/farefinder/bestoffers?origin="+cookieValueArray[1]+"&scte=Targeting_HP_TargetingListe_I_permanent_"+cookieValueArray[2]+"_"+cookieValueArray[1]+"_undefined");$("#targetingLink").html("Alle Angebote");
$("#targetingLink").attr("href","/farefinder/bestoffers?origin="+cookieValueArray[1]+"&scte=Targeting_HP_TargetingListe_I_permanent_"+cookieValueArray[2]+"_"+cookieValueArray[1]+"_undefined")}function b(){$.ajax({url:"/feed/kat/topsellerfeed.json",dataType:"json",cache:false,success:function(g){topsellerDestinations=[];$.each(g,function(w,x){topsellerDestinations.push({origin:x.origin,destination:x.destination,preis:x.preis,datum:x.datum,waehrung:x.waehrung})});topsellerDestinations.sort(function(w,
x){return parseFloat(w.preis)-parseFloat(x.preis)});destinationOutput=[];g=topsellerDestinations.length;g-=1;g=Math.floor(Math.random()*g);var h=topsellerDestinations[g].datum.substring(0,10),n=h.split(".");h=n[2]+"-"+n[1]+"-"+n[0];var p=topsellerDestinations[g].preis.replace(".",","),t=topsellerDestinations[g].waehrung;if(t=="EUR")t="&euro;";if(t=="GBP")t="&pound;";topsellerDestinations[g].preis.replace(".",",");p=p+"&nbsp;"+t;$("#targetingImagePrice").html(p);bild=topsellerDestinations[g].destination.toLowerCase();
$.ajax({url:"/images/visuals/"+bild+".JPG",type:"HEAD",cache:false,statusCode:{200:function(){$("#targetingImageSrc").attr("src","/images/visuals/"+bild+".JPG")},404:function(){$("#targetingImageSrc").attr("src","/images/visuals/default.jpg")}}});$("#targetingImageDestination").html(Stations[topsellerDestinations[g].destination].name);$(".targetingImageURL").attr("href","/php/gotoselect.php?origin="+topsellerDestinations[g].origin+"&destination="+topsellerDestinations[g].destination+"&date1="+h+"&scte=Targeting_HP_TargetingImage_I_permanent_"+
topsellerDestinations[g].origin+"_"+topsellerDestinations[g].destination+"_"+n[2]+"-"+n[1]);h=topsellerDestinations[g].datum.substring(0,10);n=h.split(".");$("#targetingImageOrigin").html("Ab "+Stations[topsellerDestinations[g].origin].name+"<br/>am "+h+" nach")}});$("#conTargetingImage").css("visibility","visible")}var f=cookie.get("AvailabilitySearchData");f&&f!=""?d(Base64.decode(f)):a()})}});
s2.namespace("s2.tuifly.helper.tuicarsOffers",function(){this.initialize=function(){$("body").bind("mainStageComplete",function(){var a=$("#tuicarsOfferStage"),c=a.attr("class"),d={getCookieData:function(b){var f=cookie.get("AvailabilitySearchData");f&&f!=""&&!b?this.getMapping({cookieData:f}):this.showFallback()},getMapping:function(b){$.ajax({url:"/php/tuicars/stationCountryCityMapping.json",dataType:"json",success:function(f){var g=Base64.decode(b.cookieData).split("|")[2];f[g]?d.getData({cookieData:b.cookieData,
stationId:f[g].stationId,cityId:f[g].cityId,countryId:f[g].countryId}):d.showFallback()},error:function(){d.showFallback()}})},getData:function(b){$.ajax({url:"/php/tuicars/tuicarsOffersIndex.php",type:"POST",data:{cookieData:b.cookieData,stationId:b.stationId,cityId:b.cityId,countryId:b.countryId},dataType:"json",success:function(f){d.sortData(f)},error:function(){d.showFallback()}})},showFallback:function(){a.css("visibility","visible")},sortData:function(b){tuicarsArray=[];$.each(b,function(f,
g){tuicarsArray.push({destinationName:Stations[g.iata].name,iata:g.iata,producer:g.producer,typ:g.typ,datum_von:g.datum_von,datum_bis:g.datum_bis,anmietdauer:g.anmietdauer,oldprice:g.oldprice,gesamt:g.gesamt,waehrung:g.waehrung,url:g.url,tage:g.tage,tagespreis:Math.ceil(g.tagespreis.replace(",",".")),image:g.image})});tuicarsArray.sort(function(f,g){return parseFloat(f.preis)-parseFloat(g.preis)});this.putData({tuicarsArray:tuicarsArray,style:c})},putData:function(b){var f=$("#tuicarsTemplate").html().replace("<!--",
"").replace("--\>","");f=_.template(f);var g=$(".qTUIcarOffer");g.html(f(b));g.css("visibility","visible")}};d.getCookieData()})}});
s2.namespace("s2.tuifly.model",function(){Role("s2.tuifly.model.BoundModel",{metaRoles:[JooseX.DOMBinding.JQueryMetaRole],methods:{draw:function(){},notify:function(){}}});Class("s2.tuifly.model.Model",{isAbstract:true,meta:s2.tuifly.LazyMetaClass,has:{$:{is:"rw"},context$:{is:"rw"}},classMethods:{select:function(){throw"subclass responsibility";},selectContext:function(){return jQuery(document)},create:function(a,c){var d=this,b=this.selectContext(a),f=[];s2.Logger.debug("Creating class "+d.meta.className()+
" -> "+b.length);b.each(function(){var g=$(this);d.select(g).each(function(){var h=d.meta.instantiate(jQuery.extend({$:jQuery(this),context$:g},c));f.push(h)})});return f}}})});
s2.namespace("s2.tuifly.model.flightSearch",function(){var a=this,c=false;Class("s2.tuifly.model.flightSearch.StationManager",{does:JooseX.Singleton,has:{stationByIataCode:{init:function(){return{}}},destToOrig:{init:function(){return{}}},iataToCountryCode:{},regionToIataCodes:{},countryCodeToCountry:{init:function(){return{}}}},methods:{findStation:function(f){f=f.toUpperCase();var g;if(g=this.getStation(f))return g;Joose.O.each(this.stationByIataCode,function(h){if(h.toString().toUpperCase()==f)g=
h});return g},addStation:function(f){this.stationByIataCode[f.getIataCode()]=f},getStation:function(f){return this.stationByIataCode[f]},getStations:function(f){var g=this,h=[];Joose.A.each(f,function(n){var p=g.getStation(n);p?h.push(p):s2.Logger.debug("Missing station "+n)});return h},manualSortedIataCodes:function(){var f=[];Joose.O.each(this.stationByIataCode,function(g,h){f.push(h)});return f},addDestToOrigMapping:function(f,g){var h=this.destToOrig;if(h[f]==null)h[f]={};h[f][g]=true},initDestToOrigMapping:function(){if(!c){c=
true;Joose.A.each(this.allStations(),function(f){Joose.A.each(f.getDests(),function(g){d.addDestToOrigMapping(g,f.iataCode)})})}},getOrigs:function(f){this.initDestToOrigMapping();f=this.destToOrig[f]||{};var g=[],h;for(h in f)g.push(h);return this.getStations(g)},validOrigs:function(){var f=this.getSortedStations(),g=[];jQuery.each(f,function(h){h=f[h];s2.tuifly.helper.restrictions.isRestrictedOrigin(h)||g.push(h)});return this.getStations(g)},allStations:function(){return this.getStations(this.getSortedStations())},
getSortedStations:function(){if(typeof SortedStations=="undefined"){var f=[];Joose.O.each(this.stationByIataCode,function(g){f.push(g)});return d.sortStations(f)}else return SortedStations},validDests:function(){var f=[];Joose.A.each(this.allStations(),function(g){g.isValidDest()&&f.push(g)});return f},sortStations:function(f,g){var h=function(t,w){if(!g){if(t.isInGermany()&&!w.isInGermany())return-1;if(!t.isInGermany()&&w.isInGermany())return 1}return t.getLongName()>w.getLongName()?1:-1};if(typeof SortedStations==
"undefined"){f.sort(h);return f}var n={};Joose.A.each(f,function(t){n[t.getIataCode()]=true});var p=[];Joose.A.each(this.allStations(),function(t){n[t.getIataCode()]!=null&&p.push(t)});if(g)return p.sort(h);return p},getAirportsInRegion:function(f){var g=[];Joose.O.each(this.regionToIataCodes,function(h,n){if(n.indexOf(f)>-1)g=g.concat(h)});return g}}});var d=s2.tuifly.model.flightSearch.StationManager.getInstance(),b=false;Class("s2.tuifly.model.flightSearch.Country",{has:{iataCode:{is:"rw"},longName:{is:"rw"}},
methods:{initialize:function(f){if(f)for(var g in f)this[g]=f[g]}}});Class("s2.tuifly.model.flightSearch.Station",{has:{iataCode:{is:"rw"},longName:{is:"rw"},validOrig:{is:"rw"},validDest:{is:"rw"},country:{is:"rw"},dests:{is:"rw"},text:{}},methods:{initialize:function(f){if(f)for(var g in f)this[g]=f[g]},origStations:function(){return d.getOrigs(this.iataCode)},destStations:function(){return d.getStations(this.getDests())},isInGermany:function(){var f=this.getCountry();return f==="DE"||f==="CH"||
this.iataCode==="MLH"||this.iataCode==="RTM"||this.iataCode==="AMS"||this.iataCode==="EIN"},isValidDest:function(){return this.validOrig},isValidOrig:function(){return this.validDest},stringify:function(){var f=this.longName;f||(f="");if(this.iataCode.match("-"))return f;return this.longName+" ("+this.iataCode+")"},asNavitairStation:function(){return{code:this.iataCode,name:this.longName,validOrig:this.validOrig,validDest:this.validDest,mkts:this.dests}}},classMethods:{newFromNavitairStation:function(f,
g){var h=s2.tuifly.model.flightSearch.StationManager.getInstance(),n=f.name,p=[];p=[].concat(f.mkts||[]);n=new s2.tuifly.model.flightSearch.Station({iataCode:f.code,longName:n,validOrig:f.validOrig,validDest:f.validDest,dests:p,country:g});h.addStation(n)},newFromParams:function(f){var g=s2.tuifly.model.flightSearch.StationManager.getInstance();f=new this({iataCode:f.iataCode,longName:f.name});g.addStation(f)},initialize:function(){var f=this;s2.tuifly.util.routes.get(function(g){f.routes=g;f.text=
new s2.tuifly.util.Text(window.LocalText);g=window.NavitairGlobal_airportCountryMap;for(var h=Stations,n=SortedStations,p=0;p<n.length;++p){var t=h[n[p]];if(typeof t=="object"&&t.name!==true){var w=g[t.code];w?s2.tuifly.model.flightSearch.Station.newFromNavitairStation(t,w):s2.Logger.debug("missing country "+t.code)}}d.iataToCountryCode=g;b=true;a.InitializedEvent.trigger()})},initializeFromAjax:function(f){f="/pregenerated/"+JooseX.Culture.Factory.get().majorIdentifier()+"/farefinder/"+s2.tuifly.util.Skin.get().identifier()+
"/orig-dest-pairs.json";var g=this;if(b)window.setTimeout(function(){a.InitializedEvent.trigger()});else{if(typeof Stations!="undefined")return this.initialize();jQuery.getJSON(f,function(h){var n=s2.tuifly.model.flightSearch.StationManager.getInstance();Joose.O.each(h.iataCodes,function(p,t){var w=h.dests[t]||[];w=g.meta.instantiate({iataCode:t,longName:p,validDest:w.length>0?true:false,dests:w,country:h.countries[t]});Joose.A.each(w.getDests(),function(x){n.addDestToOrigMapping(x,t)});n.iataToCountryCode=
h.countries;n.addStation(w);n.regionToIataCodes=h.regions});Joose.O.each(h.countryName,function(p,t){n.countryCodeToCountry[t]=new s2.tuifly.model.flightSearch.Country({longName:p,iataCode:t})});b=true;a.InitializedEvent.trigger()})}}}});this.DestChangeEvent=new s2.tuifly.Event("DestinationChangeEvent");this.OrigChangeEvent=new s2.tuifly.Event("OriginChangeEvent");this.InitializedEvent=new s2.tuifly.Event("Stations")});
s2.namespace("s2.tuifly.controller",function(){window.S2Controllers={};Class("s2.tuifly.controller.PageControllerMetaClass",{isa:s2.tuifly.LazyMetaClass,override:{initializeFromProps:function(a){var c=a.invokeDestinationSelector||"body",d=a.invokeClassName;delete a.invokeDestinationSelector;delete a.invokeClassName;this.addClassMethod("register",function(){var b=this;$(document).ready(function(){if(d)if(!$(c).hasClass(d))return;b.finishBuild();var f=b.getInstance();f.ready();var g=f.meta.className();
window.S2Controllers[g]=f})});this.SUPER(a)}}});Class("s2.tuifly.controller.PageController",{meta:this.PageControllerMetaClass,does:[JooseX.Singleton],isAbstract:true,invokeClassName:null})});
s2.namespace("s2.tuifly.controller",function(){jQuery.browser.msie6=jQuery.browser.msie&&jQuery.browser.version.substr(0,1)=="6";var a=function(){if(a.instance)return a.instance;var c=navigator.userAgent;this.isIE6onXP=function(){return this.isIE6()&&this.isXP()};this.isIE7onXP=function(){return this.isIE7()&&this.isXP()};this.isFirefox=function(){return c.match(/Firefox/i)};this.isOlderThanFirefox=function(d){var b=c.match(/Firefox\/([0-9\.]+)\./i);return b&&parseFloat(b[1])<d};this.isIE=function(){return c.match(/MSIE\s/i)};
this.isIE6=function(){return c.match(/MSIE\s6/i)};this.isIE7=function(){return c.match(/MSIE\s7/i)};this.isIE8=function(){return c.match(/MSIE\s8/i)};this.isIE9=function(){return c.match(/MSIE\s9/i)};this.isXP=function(){return c.match(/Windows\sNT\s5/i)};this.isVista=function(){return c.match(/Windows\sNT\s6\.0/i)};this.isWin7=function(){return c.match(/Windows\sNT\s6\.1/i)};this.isOlderThanXP=function(){var d=c.match(/Windows\sNT\s(\d)\./i);return d&&parseInt(d[1],10)<5};this.isNewerThanXP=function(){var d=
c.match(/Windows\sNT\s(\d)\./i);return d&&parseInt(d[1],10)>5};a.instance=this};this.Browser=new a});
s2.namespace("s2.tuifly.controller",function(){var a=s2.tuifly.model.flightSearch.StationManager.getInstance();this.AirportInfoShowEvent=new s2.tuifly.Event("AirportInfoShowEvent");this.AirportInfoHideEvent=new s2.tuifly.Event("AirportInfoHideEvent");this.AutoCompleteShowEvent=new s2.tuifly.Event("AutoCompleteShowEvent");var c=false,d=false;window.s2.initializeCallbacks["s2.tuifly.controller.FlightSearch"]=function(){s2.tuifly.controller.FlightSearch.register()};Class("s2.tuifly.controller.FlightSearch",
{isa:s2.tuifly.controller.PageController,invokeClassName:"controllerFlightSearch",has:{origInput:{is:"rw"},destInput:{is:"rw"},currentSelectTarget:{is:"rw"},destCode:{is:"rw"},origCode:{is:"rw"},text:{}},methods:{repairSession:function(){if($("#flugsuche select[id*='DropDownListPassengerType_INFANT']").length==0){s2.Logger.debug("Session broke. Repairing session. (Or was the select renamed?)");var b=function(){};location.pathname.match(/\.aspx/)||(b=function(){var f=new JooseX.Culture.Factory.get;
location.href="/Search.aspx?culture="+f.identifier()});jQuery.get("/DeleteCookies.aspx",b)}},navitairReady:function(){if(document.getElementById("flugsuche")){var b=this;b.repairSession();this.text=new s2.tuifly.util.Text(window.LocalText);s2.tuifly.model.flightSearch.InitializedEvent.observeOnce(function(){b.setOptions(b.getOrigInput(),b.sortStations(a.validOrigs()),"orig");b.setOptions(b.getDestInput(),b.sortDests(a.validDests(),true),"dest")});b.setOrigInput(s2.tuifly.widget.cityAutocomplete.origInput);
b.setDestInput(s2.tuifly.widget.cityAutocomplete.destInput);s2.tuifly.model.flightSearch.DestChangeEvent.observe(function(g,h){b.setDestCode(g);b.destChanged(g,h)});s2.tuifly.model.flightSearch.OrigChangeEvent.observe(function(g,h){b.setOrigCode(g);b.origChanged(g,h)});s2.tuifly.model.flightSearch.Station.initialize();var f=JooseX.Culture.Factory.get();if(f.identifier()=="de-DE"||f.identifier()=="en-GB")$("body > div.ac_results").delegate("li.ac_element","mouseover",function(g){g.preventDefault();
g.stopPropagation();g=$(g.target);c=false;s2.tuifly.controller.AirportInfoShowEvent.trigger(g)});s2.tuifly.controller.AirportInfoHideEvent.observeLazy(function(){$("#destinationInfo").hide();$(".dontClickLayer").hide();c=true});s2.tuifly.controller.AutoCompleteShowEvent.observe(function(){c=false});typeof RouteMaxDate!="undefined"&&s2.tuifly.widget.datepickerForSelect.datePickers.each(function(){$(this).data("datepicker").settings.maxDate=RouteMaxDate});s2.tuifly.controller.AirportInfoShowEvent.observeLazy(function(g){$("#destinationInfo").hide();
var h=false,n=g.parent();if(g.find("span.dest").length>0)h=true;if(!h&&!n.is("ul")&&n.find("span.dest").length>0){g=n;h=true}s2.Logger.debug("event");var p=g.find(".qAirportCode").text(),t,w;if(n=p.match(/(\w+)$/)){t=n[1];s2.Logger.debug("over "+t);w=$("<span>"+g.html()+"</span>").find(".zugZumFlug").length>0?b.text.get("zzfText"):"";n="/"+JooseX.Culture.Factory.get().majorIdentifier()+"/destinations/"+t.toLowerCase()+".html";var x=function(E,L){if(!c)if(JooseX.Culture.Factory.get().identifier()!=
"it-IT"){s2.Logger.debug("Status "+L);if(L!="error"){var Q=$("<div class='dontClickLayer'/></div>"),O=$("#destinationInfo");if(O.length==0){Q.appendTo($(document.body));O=$("<div style='z-index: 9999; display:none' id=destinationInfo />").appendTo($(document.body))}if(w){var I;if(h){Q=b.getOrigInput().val();I=p}else{Q=p;I=b.getDestInput().val()}E=b.text.get("zzfDirection",{orig:Q,dest:I});b.setCurrentSelectTarget(g)}else if(h)if((Q=b.getOrigCode())&&t){Q=a.getStation(Q);I=a.getStation(t);if(Q&&I&&
!Q.isInGermany()&&I.isInGermany())E+="<br/><br/><p>"+b.text.get("zzfToGermany")+"</p>"}O.html(E+w);I=$("#marketCityPair_1 input:visible");Q=I.offset().left;I=I.outerWidth();Q+=I;s2.Logger.debug("Left: "+Q);I=(I=g.closest("ul").offset())?Math.round(I.top)-1:0;if(I>0){O.css("top",I+"px");O.css("left",Q+"px");s2.Logger.debug("Pos "+I+"-"+Q);$(".dontClickLayer").show();O.show()}}}};$.ajax({url:n,dataType:"html",error:x,success:x})}})}},ready:function(){},clear:function(){this.getDestInput().val("");this.getOrigInput().val("")},
closeAutocomplete:function(){this.getDestInput().trigger("s2:closeIfOpen");this.getOrigInput().trigger("s2:closeIfOpen")},showDirectConnections:function(){var b=this.getCurrentSelectTarget();if(b){b.click();this.setCurrentSelectTarget(null)}},setOrigsForDest:function(b){var f=this,g=this.getOrigInput();this.setOptions(g,b.origStations(),"orig");s2.tuifly.model.flightSearch.OrigChangeEvent.observeOnce(function(){f.setOptions(g,a.validOrigs(),"orig")})},updateDatepickerRange:function(){s2.tuifly.widget.datepickerForSelect.datePickers.each(function(){var b=
$(this),f=s2.tuifly.helper.search.getSearchParam("departureAirport"),g=s2.tuifly.helper.search.getSearchParam("arrivalAirport");if(available)if(g=available[f+" "+g]){g=g.split(" ");if(g.length===2){f=g[0];g=g[1];b.data("datepicker").settings.minDate=Date.parseExact(f,"yyyyMMdd");b.data("datepicker").settings.maxDate=Date.parseExact(g,"yyyyMMdd")}}})},destChanged:function(b,f){s2.Logger.debug("destChanged");var g=this.getOrigInput();if(b){var h=a.getStation(b);d=false;if(g.val()==="")this.setOrigsForDest(h);
else if(f){d=true;this.setOrigsForDest(h);g.val("");g.parent().find(".qAirportName").html("");g.parent().find(".qAirportCode").html("");this.clickInput(g)}try{s2.tuifly.flash.airportMap.fireDestChanged(b)}catch(n){s2.Logger.debug("Flash Error: "+n)}this.updateDatepickerRange()}else this.setOptions(g,a.validOrigs(),"orig")},origChanged:function(b){s2.Logger.debug("origChanged");var f=a.getStation(b);if(typeof f!="undefined"){var g=this.sortDests(f.destStations(),s2.tuifly.util.routes.isInAirberlinFormerTuifly(f.getIataCode())),
h=this.getDestInput(),n=false;if(!Joose.A.exists(g,h.val())){n=true;h.val("");h.parent().find(".qAirportName").html("");h.parent().find(".qAirportCode").html("");$("#destDisplayField").addClass("hidden")}if(f.isInGermany()){g=[].concat(g);g.push("--------------------------------");f=a.validDests();Joose.A.each(f,function(p){!p.isInGermany()&&!Joose.A.exists(g,p)&&g.push('<span class="zugZumFlug">'+p.toString()+"</span>")})}n&&window.triggerClickCompactSearchAllowed&&this.clickInput(h);this.setOptions(h,
g,"dest");s2.tuifly.flash.airportMap.fireOriginChanged(b);b=$("input[name='scorigin']");if(b.length>0&&b.val().substr(0,7)=="CS-Home")if(d){s2.Logger.debug("Setting ZZF Alt-Start Tracking");b.val("CS-Home-Alt-Start")}else b.val("CS-Home");d=false;this.updateDatepickerRange()}},clickInput:function(b){window.setTimeout(function(){if(!$("#flugsuche").hasClass("closed")){b.get(0).showInput&&b.get(0).showInput();try{b.focus()}catch(f){}b.click()}},50)},setOptions:function(b,f,g){var h=true,n=0,p=0;f=jQuery.map(f,
function(t){if(t.meta&&h&&!t.isInGermany()&&t.getCountry()!=null){h=false;p=n}t=""+t;t=t.match(/class=\"/)?t.replace(/class=\"/,'class="'+g+" "):'<span class="'+g+'">'+t+"</span>";++n;return t});p>0&&f.splice(p,0,"<span>--------------------------------</span>");b.flushCache();b.setOptions({data:f})},sortDests:function(b,f){return s2.tuifly.model.flightSearch.StationManager.getInstance().sortStations(b,true,f)},sortStations:function(b){return s2.tuifly.model.flightSearch.StationManager.getInstance().sortStations(b,
false)}}})});
s2.namespace("s2.tuifly.util",function(){var a;this.Cookie=function(){this.doc=document;a=this};this.Cookie.instance=function(){a||new this.Cookie;return a};this.Cookie.prototype={get:function(c){var d=this.doc.cookie;d=d.replace("+","%20");c=c+"=";var b=d.indexOf("; "+c);if(b==-1){b=d.indexOf(c);if(b!=0)return""}else b+=2;var f=d.indexOf(";",b);if(f==-1)f=d.length;d=unescape(d.substring(b+c.length,f));if(d==";")return"";return d},getSearchData:function(){var c=this.get("AvailabilitySearchData"),d=
{};if(c){c=Base64.decode(c);c=c.split("|");d.oneway=c[0];d.origin=c[1];d.dest=c[2];d.departureDateDay=c[3];d.departureDateYearMonth=c[4];d.arrivalDateDay=c[5];d.arrivalDateYearMonth=c[6];d.countAdult=c[7];d.countChild=c[8];d.countInfant=c[9]}return d},set:function(c,d,b,f){this.doc.cookie=c+"="+escape(d)+(b?"; expires="+b.toGMTString():"")+"; path=/"+(f?"; secure":"");b=this.get(c);b!=d&&XSSdebug("Failed Setting cookie "+c+" "+d+"->"+b)}}});
s2.namespace("s2.tuifly.initialize",function(){var a=function(){return(new Date).getTime()},c=a(),d=function(b){s2.Logger.debug("Time "+b+" "+(a()-c));c=a()};this.diff=d;jQuery.browser.msie6=jQuery.browser.msie&&jQuery.browser.version.substr(0,1)=="6";if(typeof console=="undefined")console={log:function(){}};$(document).ready(function(){s2.Logger.debug("Starting init");var b=a();c=a();var f=jQuery("meta[name='culture']").attr("content");f?JooseX.Culture.setCurrentCulture(f):s2.Logger.debug("missing culture tag");
var g=jQuery("meta[name='defaultCurrency']").attr("content");f?s2.tuifly.util.CurrencyValue.setDefaultCurrencySymbol(g):s2.Logger.debug("missing default currency symbol");if((new s2.tuifly.util.Cookie).get("hasBluemiles")=="0"){jQuery(".contentNavigation li a:contains('topbonus')").parent().remove();jQuery(".subLevel li a:contains('topbonus')").parent().remove();if(f=="de-DE"){jQuery("#collectingBlueMiles_2082").remove();jQuery("#collectingBlueMiles_3533").remove()}else if(f=="en-GB"){jQuery("#collectingBlueMiles_2079").remove();
jQuery("#collectingBlueMiles_2078").remove();jQuery("#collectingBlueMiles_2081").remove()}else if(f=="it-IT"){jQuery("#collectingBlueMiles_2079").remove();jQuery("#collectingBlueMiles_2078").remove()}else if(f=="es-ES"){jQuery("#collectingBlueMiles_2079").remove();jQuery("#collectingBlueMiles_2078").remove()}}s2.tuifly.widget.IEUpdateBanner.initialize();d("IEUpdateBanner");s2.tuifly.widget.dialog.initialize();d("Dialog");s2.tuifly.widget.focusManager.initialize();d("focusManager");s2.tuifly.widget.navigation.initialize();
d("navigation");s2.tuifly.widget.metaNavigation.initialize();d("metaNavigation");s2.tuifly.widget.datepickerForSelect.initialize();d("datepicker");s2.tuifly.widget.overlay.initialize();d("overlay");s2.tuifly.widget.submittableForm.initialize();d("submitForm");s2.tuifly.widget.loadingButton.initialize();d("loadingButton");s2.tuifly.widget.tooltip.initialize();d("tooltip");s2.tuifly.widget.customSelect.initialize();d("customSelect");s2.tuifly.helper.flashTicker.initialize();d("flashTicker");s2.tuifly.widget.skysalesError.initialize();
d("skysalesError");s2.tuifly.widget.newsletter.initialize();d("newsletter");s2.tuifly.widget.passwortVergessenLayer.initialize();d("passwortVergessenLayer");s2.tuifly.widget.tps.initialize();d("tps");s2.tuifly.widget.mainStage.initialize();d("mainStage");s2.tuifly.widget.cityAutocomplete.initialize();d("cityAuto");s2.tuifly.flash.airportMap.initialize();d("flash");s2.tuifly.widget.inlineLabeledInput.initialize();s2.tuifly.controller.FlightSearch.register();d("FlightSearch");s2.tuifly.helper.search.initialize();
d("helper:search");s2.tuifly.helper.hideASPErrorMessage.initialize();d("hideASPErrorMessage");s2.tuifly.helper.forceNewRendering.initialize();d("forceNewRendering");s2.tuifly.helper.notepad.initialize();d("notepad");s2.tuifly.helper.htmlErrorToAlert.initialize();d("helper:htmlErrorToAlert");s2.tuifly.helper.hotelSearch.initialize();d("helper:hotelSearch");s2.tuifly.helper.holidaySearch.initialize();d("helper:holidaySearch");s2.tuifly.helper.carSearch.initialize();d("helper:carSearch");s2.tuifly.helper.tracking.initialize();
d("helper:tracking");s2.tuifly.helper.noFormReset.initialize();d("helper:noFormReset");s2.tuifly.helper.restrictions.initialize();d("restrictions");s2.tuifly.widget.lastSearches.initialize();d("lastSearches");s2.tuifly.helper.airlines.initialize();d("airlines");s2.tuifly.helper.mottoFlieger.initialize();d("mottoFlieger");s2.tuifly.helper.fixedFooter.initialize();d("fixedFooter");s2.tuifly.helper.home.initialize();d("home");s2.tuifly.helper.onsite.initialize();d("onsite");s2.tuifly.helper.abTesting.initialize();
d("abTesting");s2.tuifly.helper.tuicarsOffers.initialize();d("tuicarsOffers");s2.tuifly.validation.inputValidation.initialize();d("inputValidation");window.loadingImageCache=new Image;window.loadingImageCache.src="/images/buttons/loading_red.gif";s2.tuifly.helper.keepAlive.loop();b=a()-b;$(window).load(function(){s2.tuifly.initialize.diff("OnLoad")});s2.Logger.debug("Total init time: "+b)})});
s2.namespace("s2.tuifly",function(){this.Login=function(){};this.Login.prototype={getBluemilesId:function(){return(new s2.tuifly.util.Cookie).get("bluemiles")},getCustomerNumber:function(){return(new s2.tuifly.util.Cookie).get("customerNumber")},getLoginCookie:function(){return(new s2.tuifly.util.Cookie).get("loginStatus")},getNameCookie:function(){return(new s2.tuifly.util.Cookie).get("userName")},getFriendchipsCookie:function(){return(new s2.tuifly.util.Cookie).get("customerFriendchips")},loggedIn:function(){var a=
this.getLoginCookie();if(a&&a.length>0)return true;return false},draw:function(){var a=this.loggedIn();document.write("<style type='text/css'>.loggedIn { display: "+(a?"block":"none")+" } \n.loggedOut { display: "+(a?"none":"block")+" }</style>")},showLoginbox:function(){$("#loginBox").attr("style","display:block;");$("#loginName").focus()},hideLoginbox:function(){$("#loginBox").attr("style","display:none;")},showSalutation:function(){$("#headerSalutation").text(this.utf8_decode(unescape(this.getNameCookie().replace("+",
" "))));var a="",c=JooseX.Culture.Factory.get().majorIdentifier();a=this.getFriendchipsCookie()==0?"/FriendChips/funktionsweise.html":"/FriendChips/friendchips_kontostand.html";$("#friendChipsCounter").html(this.getFriendchipsCookie());$("#friendChipsRef").attr("href","/"+c+a)},submitGlobalLoginRemoteNewValues:function(a,c,d){a=$("#"+a).val();c=$("#"+c).val();$("#loginName").val(a);$("#loginPassword").val(c);d&&$("#returnURL").val($("#"+d).val());$("#topbonusWait").removeClass("hidden");$("#topbonuslogin").removeClass("loggedOut");
$("#topbonuslogin").addClass("hidden");$("#globalLoginForm").submit()},utf8_decode:function(a){for(var c="",d=0,b=c1=c2=0;d<a.length;){b=a.charCodeAt(d);if(b<128){c+=String.fromCharCode(b);d++}else if(b>191&&b<224){c2=a.charCodeAt(d+1);c+=String.fromCharCode((b&31)<<6|c2&63);d+=2}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);c+=String.fromCharCode((b&15)<<12|(c2&63)<<6|c3&63);d+=3}}return c},toggleLoginFriendChips:function(){$(".loginFriendChipsContent").toggleClass("hidden")}};$(document).ready(function(){var a=
new s2.tuifly.util.Query(location.hash),c=JooseX.Culture.Factory.get().identifier(),d=JooseX.Culture.Factory.get().majorIdentifier(),b=s2.tuifly.util.Environment.get().isProd()||s2.tuifly.util.Environment.get().isStage()?"https://":"http://",f=location.hostname;if(location.port!="80"&&location.port!="443"&&location.port!="")f+=":"+location.port;var g=b+f+location.pathname+location.search,h=b+f+"/GlobalLogin.aspx",n=b+f+"/GlobalLogin.aspx?globalLogout=true&culture="+c;d=b+f+"/"+d+"/mein-TUIfly/index.html";
$("#globalLoginForm").append('<input type="hidden" name="culture" value="'+c+'">');$("#returnURL").val(g);location.pathname=="/Register.aspx"&&$("#returnURL").val(d);c=$("#globalLoginForm");c.attr("action",h);$("#globalLogoutAction").attr("href",n);$("#globalLoginFindPasswordAction").attr("href","javascript:s2.tuifly.widget.passwortVergessenLayer.open()");c.submit(function(p){var t=$("#loginName"),w=$("#loginPassword");if(t.val()==""){p.preventDefault();t.focus()}else if(w.val()==""){p.preventDefault();
w.focus()}});!tuiLogin.loggedIn()&&a.param("open")=="login"?window.tuiLogin.showLoginbox():window.tuiLogin.showSalutation();a.param("passwordIncorrect")=="1"&&a.param("loginEvent")!="1"&&window.setTimeout(function(){if(window.passwordIncorrectErrorMessage){alert(window.passwordIncorrectErrorMessage.replace(/&lt;/g,"<").replace(/&gt;/g,">"));$(".areaFriendChips").length==0&&window.tuiLogin.showLoginbox()}},0)});window.tuiLogin=new this.Login;window.tuiLogin.draw()});
s2.namespace("s2.tuifly.widget.submitButtons",function(){s2.tuifly.events.SubmitLinkButton.observe(function(a){a=a?a.filter(":first"):$("[id$='_LinkButtonSubmit']:first");var c=a.attr("onclick"),d=true;if(c)d=c.call(a,e);if(d!==false)if(a=a.attr("href"))document.location.href=a})});var Lawnchair=function(a){this.init(a)};
Lawnchair.prototype={init:function(a){var c={webkit:window.WebkitSQLiteAdaptor,gears:window.GearsSQLiteAdaptor,dom:window.DOMStorageAdaptor,cookie:window.CookieAdaptor,air:window.AIRSQLiteAdaptor,userdata:window.UserDataAdaptor,"air-async":window.AIRSQLiteAsyncAdaptor,blackberry:window.BlackBerryPersistentStorageAdaptor,couch:window.CouchAdaptor};this.adaptor=a.adaptor?new c[a.adaptor](a):new DOMStorageAdaptor(a);if(!JSON||!JSON.stringify)throw"Native JSON functions unavailable - please include http://www.json.org/json2.js or run on a decent browser :P";
},save:function(a,c){this.adaptor.save(a,c)},get:function(a,c){this.adaptor.get(a,c)},exists:function(a){this.adaptor.exists(a)},all:function(a){this.adaptor.all(a)},remove:function(a,c){this.adaptor.remove(a,c)},nuke:function(a){this.adaptor.nuke(a);return this},paged:function(a,c){this.adaptor.paged(a,c)},find:function(a,c){var d=typeof a=="string"?function(){return eval(a)}:a,b=this.adaptor.terseToVerboseCallback(c);this.each(function(f,g){d(f)&&b(f,g)})},each:function(a){var c=this.adaptor.terseToVerboseCallback(a);
this.all(function(d){for(var b=d.length,f=0;f<b;f++)c(d[f],f)})}};
var LawnchairAdaptorHelpers={merge:function(a,c){return c==undefined||c==null?a:c},terseToVerboseCallback:function(a){return typeof a=="string"?function(){eval(a)}:a},now:function(){return(new Date).getTime()},uuid:function(a,c){var d="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),b=[];c=c||d.length;if(a)for(var f=0;f<a;f++)b[f]=d[0|Math.random()*c];else{var g;b[8]=b[13]=b[18]=b[23]="-";b[14]="4";for(f=0;f<36;f++)if(!b[f]){g=0|Math.random()*16;b[f]=d[f==19?g&3|8:g]}}return b.join("")},
serialize:function(a){var c="";return c=JSON.stringify(a)},deserialize:function(a){return eval("("+a+")")}},UserDataAdaptor=function(a){for(var c in LawnchairAdaptorHelpers)this[c]=LawnchairAdaptorHelpers[c];this.init(a)};
UserDataAdaptor.prototype={init:function(){var a=document.createElement("span");a.style.behavior="url('#default#userData')";a.style.position="absolute";a.style.left=1E4;document.body.appendChild(a);this.storage=a;this.storage.load("lawnchair")},get:function(a,c){var d=this.deserialize(this.storage.getAttribute(a));if(d)d.key=a;c&&c(d)},save:function(a,c){var d=a.key||"lc"+this.uuid();delete a.key;this.storage.setAttribute(d,this.serialize(a));this.storage.save("lawnchair");if(c){a.key=d;c(a)}},all:function(a){a=
this.terseToVerboseCallback(a);for(var c=this.storage.XMLDocument.firstChild.attributes,d=[],b,f,g=0,h=c.length;g<h;g++){b=c[g];if(f=this.deserialize(b.nodeValue)){f.key=b.nodeName;d.push(f)}}a&&a(d)},remove:function(a,c){this.storage.removeAttribute(typeof a=="string"?a:a.key);this.storage.save("lawnchair");c&&c()},nuke:function(a){var c=this;this.all(function(d){for(var b=0,f=d.length;b<f;b++)d[b].key&&c.remove(d[b].key);a&&a()})}};
var DOMStorageAdaptor=function(a){for(var c in LawnchairAdaptorHelpers)this[c]=LawnchairAdaptorHelpers[c];this.init(a)};
DOMStorageAdaptor.prototype={init:function(a){var c=this;this.storage=this.merge(window.localStorage,a.storage);this.table=this.merge("field",a.table);if(!window.Storage)this.storage=function(){var d=window.top.name?c.deserialize(window.top.name):{};return{setItem:function(b,f){d[b]=f+"";window.top.name=c.serialize(d)},removeItem:function(b){delete d[b];window.top.name=c.serialize(d)},getItem:function(b){return d[b]||null},clear:function(){d={};window.top.name=""}}}()},save:function(a,c){var d=this.table+
"::"+(a.key||this.uuid());delete a.key;this.storage.setItem(d,this.serialize(a));if(c){a.key=d.split("::")[1];c(a)}},get:function(a,c){var d=this.deserialize(this.storage.getItem(this.table+"::"+a)),b=this.terseToVerboseCallback(c);if(d){d.key=a;c&&b(d)}else c&&b(null)},all:function(a){a=this.terseToVerboseCallback(a);for(var c=[],d=0,b=this.storage.length;d<b;++d){var f=this.storage.key(d),g=f.split("::")[0],h=f.split("::").slice(1).join("::");if(g==this.table){f=this.deserialize(this.storage.getItem(f));
f.key=h;c.push(f)}}a&&a(c)},remove:function(a,c){this.storage.removeItem(this.table+"::"+(typeof a==="string"?a:a.key));c&&c()},nuke:function(a){var c=this;this.all(function(d){for(var b=0,f=d.length;b<f;b++)c.remove(d[b]);a&&a()})}};
s2.namespace("s2.tuifly.helper.abTesting",function(){var a=function(){if(typeof a.instance==="object")return a.instance;var c=this;this.abTests=[{name:"Onsite vs TPS",code:"onsitetps",domain:null,page:["/de/index.shtml","/de/index.html","/de/"],culture:["de-DE"],skin:null,start:"2011-08-01 00:00:00",end:"2011-10-01 00:00:00",notActiveCall:function(){s2.tuifly.helper.onsite&&s2.tuifly.helper.onsite.load();$.cachedFind(".de-DE #personalArea").removeClass("hidden");$.cachedFind(".de-DE #schnaeppchen").removeClass("hidden")},
cases:{a:{func:function(){s2.tuifly.helper.onsite.load();$.cachedFind(".de-DE #personalArea").removeClass("hidden");$.cachedFind(".de-DE #schnaeppchen").removeClass("hidden")},distribution:0.5,tracking:function(){s2.tuifly.util.tracking.fire({values:{eVar48:"Targeting-Teaser"},name:"Targeting-Teaser"})}},b:{func:function(){$.cachedFind("#TPSTeaser").removeClass("hidden")},distribution:0.5,tracking:function(){s2.tuifly.util.tracking.fire({values:{eVar48:"TPS-Listen"},name:"TPS-Listen"})}}}}];this.init=
function(){this.evalTests()};this.activeTests=function(){var d=[],b=Date.now();_(this.abTests).each(function(f){if(f.domain)if(!_(f.domain).include(location.host.toLowerCase()))return false;if(f.page)if(!_(f.page).include(location.pathname.toLowerCase()))return false;if(f.culture)if(!_(f.culture).include(JooseX.Culture.Factory.get().identifier()))return false;if(f.skin)if(!_(f.skin).include($.cachedFind("body").attr("skin")))return false;if(f.start){var g=Date.parseExact(f.start,"yyyy-MM-dd HH:mm:ss");
if(b.compareTo(g)<0)return false}if(f.end){g=Date.parseExact(f.end,"yyyy-MM-dd HH:mm:ss");if(b.compareTo(g)===1)return false}d.push(f)});return d};this.evalTests=function(){var d=this.activeTests(),b=[];_(this.abTests).each(function(f){var g=false;_(d).each(function(h){if(f.name===h.name)g=true});g||b.push(f)});_(b).each(function(f){f.notActiveCall&&f.notActiveCall()});_(d).each(function(f){f.name=f.name.replace(/\s/g,"_");var g=c.getCurrentABTestValue(f);if(f.cases&&f.cases[g]){g=f.cases[g];g.func.call(c,
f);g.tracking()}})};this.getCurrentABTestValue=function(d){var b=s2.tuifly.util.Query.instance(),f=b.param("ab_"+d.code)||this.loadTestValueFromCookie(d);b.param("save")=="1"&&this.saveToCookie(d,f);return f};this.loadTestValueFromCookie=function(d){var b=this.getABTestCookieValue(d);if(b===null)b=this.setABTestCookieValue(d);return b};this.getABTestCookieValue=function(d){return s2.tuifly.util.Cookie.instance().get("ab_"+d.code)||null};this.setABTestCookieValue=function(d){var b=0,f=null;_(d.cases).each(function(n){f+=
n.distribution;n.limits={};n.limits.start=b;b+=n.distribution;n.limits.end=b});if(f!==1)return null;var g=parseFloat(Math.random().toFixed(2)),h=null;_(d.cases).each(function(n,p){if(g>=n.limits.start&&g<n.limits.end)h=p});this.saveToCookie(d,h);return h};this.saveToCookie=function(d,b){s2.tuifly.util.Cookie.instance().set("ab_"+d.code,b,Date.now().add(30).days())};a.instance=this};this.initialize=function(){(new a).init()}});var langCode="en",message=[];message.notAllowedChar='An illegal character was removed: "&", "<", ">", "|", "%". If necessary please enter an alternative character.';
message.notAllowedCharName='An illegal character was removed: "&", "<", ">", "|", "%", "0-9". If necessary please enter an alternative character.';message.noDestPage="Zu diesem Flugziel gibt es keine Übersichtsseite.";message.noDestWinePage="Zu diesem Flugziel gibt es keine Weinseite.";message.errorAddress="Es fehlen Angaben zu Ihrer Adresse.\nBitte geben Sie die folgenden Daten an:\n\n";message.errorSurname="Your Firstname\n";message.errorLastname="Your Lastname\n";message.errorMail="Ihre E-Mail Adresse\n";
message.errorMail2="Bitte geben Sie eine korrekte E-Mail Adresse ein.";message.noCookiesEnabled="Cookies scheinen in Ihrem Browser deaktiviert zu sein. Bitte\naktivieren Sie Cookies, um eine Flugbuchung vornehmen zu können.";message.paymentMethodNotAllowedForElvia="Die Buchung einer ELVIA Reiseversicherung ist nur möglich mit den Kreditkarten Visa,  Mastercard und American Express";message.SeatAssignmentExitSeatConfirmation="Due to the regulating agency's security restrictions, the following persons may not sit in the emergency exit rows:<br /><br /> - Infants and children (up to and including those 11 years of age)<br /> - Persons who bring pets/animals with them in the cabin<br /> - Expectant mothers<br /> - Persons who are physically or mentally handicapped<br /> - Persons who have limited mobility due to body size, illness or age<br/><br/>In addition, an extension belt may not be used in the emergency exit rows.<br/><br/>With this reservation in the emergency exit row you assure us that these criteria do not apply to you or to the persons you are booking for this flight. Should these criteria nevertheless apply, the airline is entitled to assign another seat to the person(s) affected without refunding the respective processing fee. In questionable cases, the decision of the cabin crew is final.";
message.SeatAssignmentFrontRowConfirmation="You have chosen a seat in the 1st row. Please note that passengers travelling with a pet or other bulky carry-on baggage are not permitted to sit in that area, as these items cannot be properly stowed there.<br /><br />On booking the flight, you confirm that the above criteria do not apply to you or other persons in your booking.<br /><br />If that should be the case, we are entitled to assign the passenger(s) concerned to a different seat without refunding the reservation charges.";
message.SeatAssignmentChange1="You reserved ";message.SeatAssignmentChange2=" seat(s) in your original booking.\tPlease reserve at least ";message.SeatAssignmentChange3=" seat(s) again.";message.UAM="You wish to book a flight for an unaccompanied minor under the age of 12. Please note the following:\n\nAdolescents aged 12 and over must be booked as adults and require the written consent of their parents or legal guardians.\n\nInternet booking is not possible for unaccompanied minors under the age of 12.\n\nPlease contact our Service Centre on 0904 561 0000 (0.41 GBP/minute). The Service Centre is available daily open from 7.30 a.m. to 10.30 p.m., saturdays, sundays and holydays from 08.30 a.m. to 09.00 p.m.";
message.fleugplaneinschraenkung_priorPrefix="Flights from ";message.fleugplaneinschraenkung_priorInfixTo=" to ";message.fleugplaneinschraenkung_priorInfixDate=" depart on ";message.fleugplaneinschraenkung_priorSuffix=".\n Click OK to return to the date entry.";message.fleugplaneinschraenkung_laterPrefix="Flights from ";message.fleugplaneinschraenkung_laterInfixTo=" to ";message.fleugplaneinschraenkung_laterInfixDate=" can only be booked until ";message.fleugplaneinschraenkung_laterSuffix="\nClick OK to return to the date entry.";
message.HanRomNoCIA="Flights from Hanover to Rome-Ciampino/from Rome-Ciampino to Hanover can only be booked until 27.10.2007. As from 30.10.2007, flights will arrive at and depart from Rome-Fiumicino. Please change your selection.";message.HanRomNoFCO="Flights from Hanover to Rome-Fiumicino/from Rome-Fiumicino to Hanover cannot be booked until 30.10.2007. Until 27.10.2007, flights will arrive at and depart from Rome-Ciampino. Please change your selection.";message.HanRomNoCIA2="Flights from Hanover to Rome-Ciampino/from Rome-Ciampino to Hanover can only be booked until 27.10.2007. As from 30.10.2007, flights will arrive at and depart from Rome-Fiumicino. Please book your outbound and return flights separately.";
message.HanRomNoFCO2="Flights from Hanover to Rome-Fiumicino/from Rome-Fiumicino to Hanover cannot be booked until 30.10.2007. Until 27.10.2007, flights will arrive at and depart from Rome-Ciampino. Please book your outbound and return flights separately.";message.CTAReroutedPMO="Dear customer,\n\nwe regret that the flight you have chosen is unavailable, as\n\nCatania Airport will be closed between 12 (6 p.m.) and 15 (4 p.m.) May 2008.\n\nAs an alternative on the same date, we can offer flights to and from Palermo.";
message.errorHotelSearch="Please enter a hotel, a city or region.";var weinziele=[],flugziele=[];flugziele.BRI="/"+langCode+"/destinations/bari.html";flugziele.TXL="/"+langCode+"/destinations/berlin.html";flugziele.BIO="/"+langCode+"/destinations/bilbao_biarritzkueste.html";flugziele.CGN="/"+langCode+"/destinations/bonn.html";flugziele.CGN="/"+langCode+"/destinations/cologne.html";flugziele.DUB="/"+langCode+"/destinations/dublin.html";flugziele.EDI="/"+langCode+"/destinations/edinburgh.html";
flugziele.HAM="/"+langCode+"/destinations/hamburg.html";flugziele.HAJ="/"+langCode+"/destinations/hannover.html";flugziele.KLU="/"+langCode+"/destinations/klagenfurt_kaernten.html";flugziele.LEJ="/"+langCode+"/destinations/leipzig.html";flugziele.PMI="/"+langCode+"/destinations/palma_de_mallorca.html";flugziele.MAN="/"+langCode+"/destinations/manchester.html";flugziele.MRS="/"+langCode+"/destinations/marseille_provence.html";flugziele.MXP="/"+langCode+"/destinations/mailand_bergamo.html";
flugziele.MUC="/"+langCode+"/destinations/muenchen.html";flugziele.NAP="/"+langCode+"/destinations/neapel.html";flugziele.NCL="/"+langCode+"/destinations/newcastle.html";flugziele.OLB="/"+langCode+"/destinations/olbia_sardinien.html";flugziele.PMO="/"+langCode+"/destinations/palermo_sizilien.html";flugziele.ORY="/"+langCode+"/destinations/paris.html";flugziele.PSA="/"+langCode+"/destinations/pisa_florenz.html";flugziele.RJK="/"+langCode+"/destinations/rijeka.html";flugziele.CIA="/"+langCode+"/destinations/rom.html";
flugziele.SZG="/"+langCode+"/destinations/salzburg.html";flugziele.SNN="/"+langCode+"/destinations/shannon.html";flugziele.ARN="/"+langCode+"/destinations/stockholm.html";flugziele.STR="/"+langCode+"/destinations/stuttgart.html";flugziele.VLC="/"+langCode+"/destinations/valencia.html";flugziele.VCE="/"+langCode+"/destinations/venedig.html";var autoCodes=[];autoCodes.BRI="BRIT01";autoCodes.TXL="TXLT01";autoCodes.BIO="BIOT01";autoCodes.SZG="SZGT01";autoCodes.CVT="CVTT01";autoCodes.DUB="DUBT01";
autoCodes.HHN="HHNT03";autoCodes.GVA="GVAT01";autoCodes.KLU="KLUT01";autoCodes.KTW="KTWT01";autoCodes.CGN="CGNT01";autoCodes.HAM="HAMT01";autoCodes.HAJ="HAJT01";autoCodes.BGY="BGYT01";autoCodes.MAN="MANT01";autoCodes.MRS="MRST01";autoCodes.NAP="NAPT01";autoCodes.NCL="NCLT01";autoCodes.OLB="OLBT02";autoCodes.PMO="PMOT01";autoCodes.PMI="PMIT01";autoCodes.PSA="PSAT01";autoCodes.CIA="CIAT01";autoCodes.SVQ="SVQT01";autoCodes.STR="STRT01";autoCodes.GWT="GWTC01";autoCodes.VLC="VLCT01";autoCodes.VCE="VCET01";
autoCodes.WAW="WAWT01";var hotelCodes=[],interhome=[];interhome.BRI="&countrycode=I&regioncode=77";interhome.TXL="dummyk=1&dummys=D&dummya=50519&dummyc=D&OK";interhome.BIO="&countrycode=E&xregioncode=08";interhome.CVT="dummyk=333&dummys=D&dummya=50519&dummyc=GB&OK";interhome.DUB="dummyk=1&dummys=D&dummya=50519&dummyc=EI&region_kz=IRL&OK";interhome.HHN="dummyk=333&dummys=D&dummya=50519&dummyc=D&OK";interhome.GVA="&countrycode=C&xregioncode=01";interhome.HAM="dummyk=1&dummys=D&dummya=50519&dummyc=D&OK";
interhome.HAJ="dummyk=1&dummys=D&dummya=50519&dummyc=D&OK";interhome.KTW="&countrycode=L&placecode=3038";interhome.KLU="&countrycode=A&regioncode=70";interhome.CGN="dummyk=1&dummys=D&dummya=50519&dummyc=D&OK";interhome.BGY="dummyk=333&dummys=D&dummya=50519&dummyc=I&OK";interhome.MAN="dummyk=1&dummys=D&dummya=50519&dummyc=GB&region_kz=ENG&OK";interhome.MRS="&countrycode=F&regioncodegrouper=75-77";interhome.NAP="&countrycode=I&regioncode=70";interhome.NCL="dummyk=1&dummys=D&dummya=50519&dummyc=GB&OK";
interhome.OLB="&countrycode=I&regioncode=90";interhome.PMO="&countrycode=I&regioncode=80";interhome.PMI="&countrycode=E&regioncode=90";interhome.PSA="&countrycode=I&regioncode=42";interhome.FCO="dummyk=333&dummys=D&dummya=50519&dummyc=I&OK";interhome.SZG="&countrycode=A&regioncode=30";interhome.SVQ="&countrycode=E&xregioncode=48";interhome.STR="dummyk=1&dummys=D&dummya=50519&dummyc=D&region_kz=DSW&OK";interhome.VLC="&countrycode=E&regioncode=40";interhome.VCE="&countrycode=I&regioncode=25";
interhome.WAW="dummyk=333&dummys=D&dummya=50519&dummyc=PL&OK";interhome.CIA="&countrycode=I&regioncode=60&nrefgrouper=i5602-i5895";interhome.MUC="&countrycode=D&regioncode=23";interhome.RJK="&countrycode=H&regioncode=30";interhome.ARN="dummyk=1&dummys=D&dummya=50519&dummyc=S&region_kz=STK&OK";interhome.EDI="dummyk=1&dummys=D&dummya=50519&dummyc=GB&region_kz=SCO&OK";interhome.SNN="dummyk=1&dummys=D&dummya=50519&dummyc=EI&region_kz=IRL&OK";interhome.SBL="&countrycode=A&regioncode=30&nrefgrouper=a5020-a5771";
var airportCode=[];airportCode.DUB="ECMN,EDMN,CCMN,IDMR,FVMR";airportCode.SZG="EDMR,EWMR,CDMR,IVMR,FVMR";airportCode.KLU="EDMR,EWMR,CDMR,IVMR,FVMR";airportCode.RJK="EBMN,EDMN,CDMR,IVMR,SVMR";airportCode.MUC="EBMN,CLMR,IDMR,FDMR,FVMR";airportCode.TXL="EBMN,CLMR,IDMR,FDMR,FVMR";airportCode.CGN="EBMN,CLMR,IDMR,FDMR,FVMR";airportCode.HAM="EBMN,CLMR,IDMR,FDMR,FVMR";airportCode.HAJ="EBMN,CLMR,IDMR,FDMR,FVMR";airportCode.LEJ="EBMN,CLMR,IDMR,FDMR,FVMR";airportCode.STR="EBMN,CLMR,IDMR,FDMR,FVMR";
airportCode.DUS="EBMN,CLMR,IDMR,FDMR,FVMR";airportCode.BIO="ECMR,CCMR,CDMR,IVMR,FVMR";airportCode.PMI="EBMR,ECMR,CCMR,CDMR,FVMR";airportCode.VLC="ECMR,CCMR,CDMR,IVMR,FVMR";airportCode.MRS="EBMR,EDMR,CDMR,IVMR,SWMR";airportCode.ORY="EBMR,EDMR,CDMR,IVMR,SWMR";airportCode.CVT="ECMN,CCMN,CXMN,IDMR,FVMN";airportCode.EDI="EBMN,CCMN,CXMN,IDMR,FVMN";airportCode.MAN="EBMN,CCMN,CXMN,IDMR,FVMN";airportCode.NCL="EDMN,CCMN,CXMN,IDMR,FVMN";airportCode.SNN="ECMN,EDMN,CCMN,IDMR,FVMR";airportCode.BRI="EBMR,EDMR,CDMR,CWMR,IVMR";
airportCode.CAG="EBMR,EDMR,CDMR,CWMR,IVMR";airportCode.CTA="EBMR,EDMR,CDMR,CWMR,IVMR";airportCode.CIA="EBMN,EDMR,CDMR,CWMR,IVMR";airportCode.MXP="EBMR,EDMR,CDMR,CWMR,IVMR";airportCode.BGY="EBMR,EDMR,CDMR,CWMR,IVMR";airportCode.NAP="EBMR,EDMR,CDMR,CWMR,IVMR";airportCode.OLB="EBMR,EDMR,CDMR,CWMR,IVMR";airportCode.PMO="EBMR,EDMR,CDMR,CWMR,IVMR";airportCode.PSA="EBMR,EDMR,CDMR,CWMR,IVMR";airportCode.VCE="EBMR,EDMR,CDMR,CWMR,IVMR";airportCode.ARN="ECMN,CCMN,CDMR,IDMN,SVMN";airportCode.OPO="EBMN,EDMN,CDMR,IDMR,CWMR";
airportCode.DBV="EBMN,EDMN,CDMR,IVMR,IDMR";var monthName=[];monthName["01"]="Jan";monthName["02"]="Feb";monthName["03"]="Mar";monthName["04"]="Apr";monthName["05"]="May";monthName["06"]="Jun";monthName["07"]="Jul";monthName["08"]="Aug";monthName["09"]="Sep";monthName["10"]="Oct";monthName["11"]="Nov";monthName["12"]="Dec";url_auto="/en/skylights/auto.html";url_hotel="/en/skylights/hotel.html";url_flugHotel="";url_ferienwohnungen="/en/skylights/100.html";url_reiseversicherungen="";
url_tiefstpreisseite="/en/offers/tiefstpreise.jsp?currency=EU";
Date.CultureInfo={name:"en-GB",englishName:"English (United Kingdom)",nativeName:"English (United Kingdom)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan",
"Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uary)?/i,
feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,
tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",
PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};Date.getMonthNumberFromName=function(a){var c=Date.CultureInfo.monthNames,d=Date.CultureInfo.abbreviatedMonthNames;a=a.toLowerCase();for(var b=0;b<c.length;b++)if(c[b].toLowerCase()==a||d[b].toLowerCase()==a)return b;return-1};
Date.getDayNumberFromName=function(a){var c=Date.CultureInfo.dayNames,d=Date.CultureInfo.abbreviatedDayNames;a=a.toLowerCase();for(var b=0;b<c.length;b++)if(c[b].toLowerCase()==a||d[b].toLowerCase()==a)return b;return-1};Date.isLeapYear=function(a){return a%4===0&&a%100!==0||a%400===0};Date.getDaysInMonth=function(a,c){return[31,Date.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][c]};Date.getTimezoneOffset=function(a,c){return c?Date.CultureInfo.abbreviatedTimeZoneDST[a.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[a.toUpperCase()]};
Date.getTimezoneAbbreviation=function(a,c){var d=c?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,b;for(b in d)if(d[b]===a)return b;return null};Date.prototype.clone=function(){return new Date(this.getTime())};Date.prototype.compareTo=function(a){if(isNaN(this))throw Error(this);if(a instanceof Date&&!isNaN(a))return this>a?1:this<a?-1:0;else throw new TypeError(a);};Date.prototype.equals=function(a){return this.compareTo(a)===0};
Date.prototype.between=function(a,c){var d=this.getTime();return d>=a.getTime()&&d<=c.getTime()};Date.prototype.addMilliseconds=function(a){this.setMilliseconds(this.getMilliseconds()+a);return this};Date.prototype.addSeconds=function(a){return this.addMilliseconds(a*1E3)};Date.prototype.addMinutes=function(a){return this.addMilliseconds(a*6E4)};Date.prototype.addHours=function(a){return this.addMilliseconds(a*36E5)};Date.prototype.addDays=function(a){return this.addMilliseconds(a*864E5)};
Date.prototype.addWeeks=function(a){return this.addMilliseconds(a*6048E5)};Date.prototype.addMonths=function(a){var c=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+a);this.setDate(Math.min(c,this.getDaysInMonth()));return this};Date.prototype.addYears=function(a){return this.addMonths(a*12)};
Date.prototype.add=function(a){if(typeof a=="number"){this._orient=a;return this}if(a.millisecond||a.milliseconds)this.addMilliseconds(a.millisecond||a.milliseconds);if(a.second||a.seconds)this.addSeconds(a.second||a.seconds);if(a.minute||a.minutes)this.addMinutes(a.minute||a.minutes);if(a.hour||a.hours)this.addHours(a.hour||a.hours);if(a.month||a.months)this.addMonths(a.month||a.months);if(a.year||a.years)this.addYears(a.year||a.years);if(a.day||a.days)this.addDays(a.day||a.days);return this};
Date._validate=function(a,c,d,b){if(typeof a!="number")throw new TypeError(a+" is not a Number.");else if(a<c||a>d)throw new RangeError(a+" is not a valid value for "+b+".");return true};Date.validateMillisecond=function(a){return Date._validate(a,0,999,"milliseconds")};Date.validateSecond=function(a){return Date._validate(a,0,59,"seconds")};Date.validateMinute=function(a){return Date._validate(a,0,59,"minutes")};Date.validateHour=function(a){return Date._validate(a,0,23,"hours")};
Date.validateDay=function(a,c,d){return Date._validate(a,1,Date.getDaysInMonth(c,d),"days")};Date.validateMonth=function(a){return Date._validate(a,0,11,"months")};Date.validateYear=function(a){return Date._validate(a,1,9999,"seconds")};
Date.prototype.set=function(a){if(!a.millisecond&&a.millisecond!==0)a.millisecond=-1;if(!a.second&&a.second!==0)a.second=-1;if(!a.minute&&a.minute!==0)a.minute=-1;if(!a.hour&&a.hour!==0)a.hour=-1;if(!a.day&&a.day!==0)a.day=-1;if(!a.month&&a.month!==0)a.month=-1;if(!a.year&&a.year!==0)a.year=-1;a.millisecond!=-1&&Date.validateMillisecond(a.millisecond)&&this.addMilliseconds(a.millisecond-this.getMilliseconds());a.second!=-1&&Date.validateSecond(a.second)&&this.addSeconds(a.second-this.getSeconds());
a.minute!=-1&&Date.validateMinute(a.minute)&&this.addMinutes(a.minute-this.getMinutes());a.hour!=-1&&Date.validateHour(a.hour)&&this.addHours(a.hour-this.getHours());a.month!==-1&&Date.validateMonth(a.month)&&this.addMonths(a.month-this.getMonth());a.year!=-1&&Date.validateYear(a.year)&&this.addYears(a.year-this.getFullYear());a.day!=-1&&Date.validateDay(a.day,this.getFullYear(),this.getMonth())&&this.addDays(a.day-this.getDate());a.timezone&&this.setTimezone(a.timezone);a.timezoneOffset&&this.setTimezoneOffset(a.timezoneOffset);
return this};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};Date.prototype.isLeapYear=function(){var a=this.getFullYear();return a%4===0&&a%100!==0||a%400===0};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun())};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1})};
Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()})};Date.prototype.moveToDayOfWeek=function(a,c){var d=(a-this.getDay()+7*(c||+1))%7;return this.addDays(d===0?d+=7*(c||+1):d)};Date.prototype.moveToMonth=function(a,c){var d=(a-this.getMonth()+12*(c||+1))%12;return this.addMonths(d===0?d+=12*(c||+1):d)};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/864E5)};
Date.prototype.getWeekOfYear=function(a){var c=this.getFullYear(),d=this.getMonth(),b=this.getDate();a=a||Date.CultureInfo.firstDayOfWeek;var f=8-(new Date(c,0,1)).getDay();if(f==8)f=1;d=(Date.UTC(c,d,b,0,0,0)-Date.UTC(c,0,1,0,0,0))/864E5+1;d=Math.floor((d-f+7)/7);if(d===a){c--;c=8-(new Date(c,0,1)).getDay();d=c==2||c==8?53:52}return d};Date.prototype.isDST=function(){console.log("isDST");return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D"};
Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST())};Date.prototype.setTimezoneOffset=function(a){var c=this.getTimezoneOffset();this.addMinutes(Number(a)*-6/10-c);return this};Date.prototype.setTimezone=function(a){return this.setTimezoneOffset(Date.getTimezoneOffset(a))};Date.prototype.getUTCOffset=function(){var a=this.getTimezoneOffset()*-10/6;if(a<0){a=(a-1E4).toString();return a[0]+a.substr(2)}else{a=(a+1E4).toString();return"+"+a.substr(1)}};
Date.prototype.getDayName=function(a){return a?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()]};Date.prototype.getMonthName=function(a){return a?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()]};Date.prototype._toString=Date.prototype.toString;
Date.prototype.toString=function(a){var c=this,d=function(b){return b.toString().length==1?"0"+b:b};return a?a.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(b){switch(b){case "hh":return d(c.getHours()<13?c.getHours():c.getHours()-12);case "h":return c.getHours()<13?c.getHours():c.getHours()-12;case "HH":return d(c.getHours());case "H":return c.getHours();case "mm":return d(c.getMinutes());case "m":return c.getMinutes();case "ss":return d(c.getSeconds());case "s":return c.getSeconds();
case "yyyy":return c.getFullYear();case "yy":return c.getFullYear().toString().substring(2,4);case "dddd":return c.getDayName();case "ddd":return c.getDayName(true);case "dd":return d(c.getDate());case "d":return c.getDate().toString();case "MMMM":return c.getMonthName();case "MMM":return c.getMonthName(true);case "MM":return d(c.getMonth()+1);case "M":return c.getMonth()+1;case "t":return c.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return c.getHours()<
12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "zzz":case "zz":case "z":return""}}):this._toString()};Date.now=function(){return new Date};Date.today=function(){return Date.now().clearTime()};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this};
Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var a={};a[this._dateElement]=this;return Date.now().add(a)};Number.prototype.ago=function(){var a={};a[this._dateElement]=this*-1;return Date.now().add(a)};
(function(){for(var a=Date.prototype,c=Number.prototype,d="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),b="january february march april may june july august september october november december".split(/\s/),f="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),g=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n}return this.moveToDayOfWeek(n,this._orient)}},h=0;h<d.length;h++)a[d[h]]=a[d[h].substring(0,3)]=g(h);d=function(n){return function(){if(this._is){this._is=
false;return this.getMonth()===n}return this.moveToMonth(n,this._orient)}};for(g=0;g<b.length;g++)a[b[g]]=a[b[g].substring(0,3)]=d(g);d=function(n){return function(){if(n.substring(n.length-1)!="s")n+="s";return this["add"+n](this._orient)}};g=function(n){return function(){this._dateElement=n;return this}};for(h=0;h<f.length;h++){b=f[h].toLowerCase();a[b]=a[b+"s"]=d(f[h]);c[b]=c[b+"s"]=g(b)}})();Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ")};
Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern)};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern)};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern)};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern)};
Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};
(function(){Date.Parsing={Exception:function(g){this.message="Parse error at '"+g.substring(0,10)+" ...'"}};for(var a=Date.Parsing,c=a.Operators={rtoken:function(g){return function(h){var n=h.match(g);if(n)return[n[0],h.substring(n[0].length)];else throw new a.Exception(h);}},token:function(){return function(g){return c.rtoken(RegExp("^s*"+g+"s*"))(g)}},stoken:function(g){return c.rtoken(RegExp("^"+g))},until:function(g){return function(h){for(var n=[],p=null;h.length;){try{p=g.call(this,h)}catch(t){n.push(p[0]);
h=p[1];continue}break}return[n,h]}},many:function(g){return function(h){for(var n=[],p=null;h.length;){try{p=g.call(this,h)}catch(t){break}n.push(p[0]);h=p[1]}return[n,h]}},optional:function(g){return function(h){var n=null;try{n=g.call(this,h)}catch(p){return[null,h]}return[n[0],n[1]]}},not:function(g){return function(h){try{g.call(this,h)}catch(n){return[null,h]}throw new a.Exception(h);}},ignore:function(g){return g?function(h){var n=null;n=g.call(this,h);return[null,n[1]]}:null},product:function(){for(var g=
arguments[0],h=Array.prototype.slice.call(arguments,1),n=[],p=0;p<g.length;p++)n.push(c.each(g[p],h));return n},cache:function(g){var h={},n=null;return function(p){try{n=h[p]=h[p]||g.call(this,p)}catch(t){n=h[p]=t}if(n instanceof a.Exception)throw n;else return n}},any:function(){var g=arguments;return function(h){for(var n=null,p=0;p<g.length;p++)if(g[p]!=null){try{n=g[p].call(this,h)}catch(t){n=null}if(n)return n}throw new a.Exception(h);}},each:function(){var g=arguments;return function(h){for(var n=
[],p=null,t=0;t<g.length;t++)if(g[t]!=null){try{p=g[t].call(this,h)}catch(w){throw new a.Exception(h);}n.push(p[0]);h=p[1]}return[n,h]}},all:function(){var g=g;return g.each(g.optional(arguments))},sequence:function(g,h,n){h=h||c.rtoken(/^\s*/);n=n||null;if(g.length==1)return g[0];return function(p){for(var t=null,w=null,x=[],E=0;E<g.length;E++){try{t=g[E].call(this,p)}catch(L){break}x.push(t[0]);try{w=h.call(this,t[1])}catch(Q){w=null;break}p=w[1]}if(!t)throw new a.Exception(p);if(w)throw new a.Exception(w[1]);
if(n)try{t=n.call(this,t[1])}catch(O){throw new a.Exception(t[1]);}return[x,t?t[1]:p]}},between:function(g,h,n){n=n||g;var p=c.each(c.ignore(g),h,c.ignore(n));return function(t){t=p.call(this,t);return[[t[0][0],r[0][2]],t[1]]}},list:function(g,h,n){h=h||c.rtoken(/^\s*/);n=n||null;return g instanceof Array?c.each(c.product(g.slice(0,-1),c.ignore(h)),g.slice(-1),c.ignore(n)):c.each(c.many(c.each(g,c.ignore(h))),px,c.ignore(n))},set:function(g,h,n){h=h||c.rtoken(/^\s*/);n=n||null;return function(p){var t=
null;for(var w=t=null,x=null,E=[[],p],L=false,Q=0;Q<g.length;Q++){t=w=null;L=g.length==1;try{t=g[Q].call(this,p)}catch(O){continue}x=[[t[0]],t[1]];if(t[1].length>0&&!L)try{w=h.call(this,t[1])}catch(I){L=true}else L=true;if(!L&&w[1].length===0)L=true;if(!L){t=[];for(L=0;L<g.length;L++)Q!=L&&t.push(g[L]);t=c.set(t,h).call(this,w[1]);if(t[0].length>0){x[0]=x[0].concat(t[0]);x[1]=t[1]}}if(x[1].length<E[1].length)E=x;if(E[1].length===0)break}if(E[0].length===0)return E;if(n){try{w=n.call(this,E[1])}catch(ba){throw new a.Exception(E[1]);
}E[1]=w[1]}return E}},forward:function(g,h){return function(n){return g[h].call(this,n)}},replace:function(g,h){return function(n){n=g.call(this,n);return[h,n[1]]}},process:function(g,h){return function(n){n=g.call(this,n);return[h.call(this,n[0]),n[1]]}},min:function(g,h){return function(n){var p=h.call(this,n);if(p[0].length<g)throw new a.Exception(n);return p}}},d=function(g){return function(){var h=null,n=[];if(arguments.length>1)h=Array.prototype.slice.call(arguments);else if(arguments[0]instanceof
Array)h=arguments[0];if(h)for(var p=h.shift();0<p.length;){h.unshift(p[0]);n.push(g.apply(null,h));h.shift();return n}else return g.apply(null,arguments)}},b="optional not ignore cache".split(/\s/),f=0;f<b.length;f++)c[b[f]]=d(c[b[f]]);d=function(g){return function(){return arguments[0]instanceof Array?g.apply(null,arguments[0]):g.apply(null,arguments)}};b="each any all".split(/\s/);for(f=0;f<b.length;f++)c[b[f]]=d(c[b[f]])})();
(function(){var a=function(n){for(var p=[],t=0;t<n.length;t++)if(n[t]instanceof Array)p=p.concat(a(n[t]));else n[t]&&p.push(n[t]);return p};Date.Grammar={};Date.Translator={hour:function(n){return function(){this.hour=Number(n)}},minute:function(n){return function(){this.minute=Number(n)}},second:function(n){return function(){this.second=Number(n)}},meridian:function(n){return function(){this.meridian=n.slice(0,1).toLowerCase()}},timezone:function(n){return function(){var p=n.replace(/[^\d\+\-]/g,
"");if(p.length)this.timezoneOffset=Number(p);else this.timezone=n.toLowerCase()}},day:function(n){var p=n[0];return function(){this.day=Number(p.match(/\d+/)[0])}},month:function(n){return function(){this.month=n.length==3?Date.getMonthNumberFromName(n):Number(n)-1}},year:function(n){return function(){var p=Number(n);this.year=n.length>2?p:p+(p+2E3<Date.CultureInfo.twoDigitYearMax?2E3:1900)}},rday:function(n){return function(){switch(n){case "yesterday":this.days=-1;break;case "tomorrow":this.days=
1;break;case "today":this.days=0;break;case "now":this.days=0;this.now=true}}},finishExact:function(n){n=n instanceof Array?n:[n];var p=new Date;this.year=p.getFullYear();this.month=p.getMonth();this.day=1;for(p=this.second=this.minute=this.hour=0;p<n.length;p++)n[p]&&n[p].call(this);this.hour=this.meridian=="p"&&this.hour<13?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");n=new Date(this.year,this.month,
this.day,this.hour,this.minute,this.second);if(this.timezone)n.set({timezone:this.timezone});else this.timezoneOffset&&n.set({timezoneOffset:this.timezoneOffset});return n},finish:function(n){n=n instanceof Array?a(n):[n];if(n.length===0)return null;for(var p=0;p<n.length;p++)typeof n[p]=="function"&&n[p].call(this);if(this.now)return new Date;n=Date.today();if(this.days!=null||this.orient||this.operator){var t,w;w=this.orient=="past"||this.operator=="subtract"?-1:1;if(this.weekday){this.unit="day";
p=Date.getDayNumberFromName(this.weekday)-n.getDay();t=7;this.days=p?(p+w*t)%t:w*t}if(this.month){this.unit="month";p=this.month-n.getMonth();t=12;this.months=p?(p+w*t)%t:w*t;this.month=null}if(!this.unit)this.unit="day";if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value)this.value=1;if(this.unit=="week"){this.unit="day";this.value*=7}this[this.unit+"s"]=this.value*w}return n.add(this)}else{if(this.meridian&&this.hour)this.hour=this.hour<13&&this.meridian=="p"?this.hour+12:this.hour;
if(this.weekday&&!this.day)this.day=n.addDays(Date.getDayNumberFromName(this.weekday)-n.getDay()).getDate();if(this.month&&!this.day)this.day=1;return n.set(this)}}};var c=Date.Parsing.Operators,d=Date.Grammar,b=Date.Translator,f;d.datePartDelimiter=c.rtoken(/^([\s\-\.\,\/\x27]+)/);d.timePartDelimiter=c.stoken(":");d.whiteSpace=c.rtoken(/^\s*/);d.generalDelimiter=c.rtoken(/^(([\s\,]|at|on)+)/);var g={};d.ctoken=function(n){var p=g[n];if(!p){p=Date.CultureInfo.regexPatterns;for(var t=n.split(/\s+/),
w=[],x=0;x<t.length;x++)w.push(c.replace(c.rtoken(p[t[x]]),t[x]));p=g[n]=c.any.apply(null,w)}return p};d.ctoken2=function(n){return c.rtoken(Date.CultureInfo.regexPatterns[n])};d.h=c.cache(c.process(c.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),b.hour));d.hh=c.cache(c.process(c.rtoken(/^(0[0-9]|1[0-2])/),b.hour));d.H=c.cache(c.process(c.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),b.hour));d.HH=c.cache(c.process(c.rtoken(/^([0-1][0-9]|2[0-3])/),b.hour));d.m=c.cache(c.process(c.rtoken(/^([0-5][0-9]|[0-9])/),b.minute));
d.mm=c.cache(c.process(c.rtoken(/^[0-5][0-9]/),b.minute));d.s=c.cache(c.process(c.rtoken(/^([0-5][0-9]|[0-9])/),b.second));d.ss=c.cache(c.process(c.rtoken(/^[0-5][0-9]/),b.second));d.hms=c.cache(c.sequence([d.H,d.mm,d.ss],d.timePartDelimiter));d.t=c.cache(c.process(d.ctoken2("shortMeridian"),b.meridian));d.tt=c.cache(c.process(d.ctoken2("longMeridian"),b.meridian));d.z=c.cache(c.process(c.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),b.timezone));d.zz=c.cache(c.process(c.rtoken(/^(\+|\-)\s*\d\d\d\d/),b.timezone));
d.zzz=c.cache(c.process(d.ctoken2("timezone"),b.timezone));d.timeSuffix=c.each(c.ignore(d.whiteSpace),c.set([d.tt,d.zzz]));d.time=c.each(c.optional(c.ignore(c.stoken("T"))),d.hms,d.timeSuffix);d.d=c.cache(c.process(c.each(c.rtoken(/^([0-2]\d|3[0-1]|\d)/),c.optional(d.ctoken2("ordinalSuffix"))),b.day));d.dd=c.cache(c.process(c.each(c.rtoken(/^([0-2]\d|3[0-1])/),c.optional(d.ctoken2("ordinalSuffix"))),b.day));d.ddd=d.dddd=c.cache(c.process(d.ctoken("sun mon tue wed thu fri sat"),function(n){return function(){this.weekday=
n}}));d.M=c.cache(c.process(c.rtoken(/^(1[0-2]|0\d|\d)/),b.month));d.MM=c.cache(c.process(c.rtoken(/^(1[0-2]|0\d)/),b.month));d.MMM=d.MMMM=c.cache(c.process(d.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),b.month));d.y=c.cache(c.process(c.rtoken(/^(\d\d?)/),b.year));d.yy=c.cache(c.process(c.rtoken(/^(\d\d)/),b.year));d.yyy=c.cache(c.process(c.rtoken(/^(\d\d?\d?\d?)/),b.year));d.yyyy=c.cache(c.process(c.rtoken(/^(\d\d\d\d)/),b.year));f=function(){return c.each(c.any.apply(null,arguments),
c.not(d.ctoken2("timeContext")))};d.day=f(d.d,d.dd);d.month=f(d.M,d.MMM);d.year=f(d.yyyy,d.yy);d.orientation=c.process(d.ctoken("past future"),function(n){return function(){this.orient=n}});d.operator=c.process(d.ctoken("add subtract"),function(n){return function(){this.operator=n}});d.rday=c.process(d.ctoken("yesterday tomorrow today now"),b.rday);d.unit=c.process(d.ctoken("minute hour day week month year"),function(n){return function(){this.unit=n}});d.value=c.process(c.rtoken(/^\d\d?(st|nd|rd|th)?/),
function(n){return function(){this.value=n.replace(/\D/g,"")}});d.expression=c.set([d.rday,d.operator,d.value,d.unit,d.orientation,d.ddd,d.MMM]);f=function(){return c.set(arguments,d.datePartDelimiter)};d.mdy=f(d.ddd,d.month,d.day,d.year);d.ymd=f(d.ddd,d.year,d.month,d.day);d.dmy=f(d.ddd,d.day,d.month,d.year);d.date=function(n){return(d[Date.CultureInfo.dateElementOrder]||d.mdy).call(this,n)};d.format=c.process(c.many(c.any(c.process(c.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),
function(n){if(d[n])return d[n];else throw Date.Parsing.Exception(n);}),c.process(c.rtoken(/^[^dMyhHmstz]+/),function(n){return c.ignore(c.stoken(n))}))),function(n){return c.process(c.each.apply(null,n),b.finishExact)});var h={};d.formats=function(n){if(n instanceof Array){for(var p=[],t=0;t<n.length;t++)p.push(h[n[t]]=h[n[t]]||d.format(n[t])[0]);return c.any.apply(null,p)}else return h[n]=h[n]||d.format(n)[0]};d._formats=d.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz",
"d"]);d._start=c.process(c.set([d.date,d.time,d.expression],d.generalDelimiter,d.whiteSpace),b.finish);d.start=function(n){try{var p=d._formats.call({},n);if(p[1].length===0)return p}catch(t){}return d._start.call({},n)}})();Date._parse=Date.parse;Date.parse=function(a){var c=null;if(!a)return null;try{c=Date.Grammar.start.call({},a)}catch(d){return null}return c[1].length===0?c[0]:null};
Date.getParseFunction=function(a){var c=Date.Grammar.formats(a);return function(d){var b=null;try{b=c.call({},d)}catch(f){return null}return b[1].length===0?b[0]:null}};Date.parseExact=function(a,c){return Date.getParseFunction(c)(a)};
function OmniTrack(){function a(c,d,b){var f="",g=window;f=g.s_c_il;var h=navigator,n=h.userAgent;h=h.appVersion;var p=h.indexOf("MSIE "),t=n.indexOf("Netscape6/"),w,x;if(c){c=c.toLowerCase();if(f)for(w=0;w<f.length;w++){x=f[w];if(x._c=="s_c")if(x.oun==c)return x;else if(x.fs&&x.sa&&x.fs(x.oun,c)){x.sa(c);return x}}}g.s_r=new Function("x","o","n","var i=x.indexOf(o);if(i>=0&&x.split)x=(x.split(o)).join(n);else while(i>=0){x=x.substring(0,i)+n+x.substring(i+o.length);i=x.indexOf(o)}return x");g.s_d=
new Function("x","var t='`^@$#',l='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',d,n=0,b,k,w,i=x.lastIndexOf('~~');if(i>0){d=x.substring(0,i);x=x.substring(i+2);while(d){w=d;i=d.indexOf('~');if(i>0){w=d.substring(0,i);d=d.substring(i+1)}else d='';b=(n-n%62)/62;k=n-b*62;k=t.substring(b,b+1)+l.substring(k,k+1);x=s_r(x,k,w);n++}for(i=0;i<5;i++){w=t.substring(i,i+1);x=s_r(x,w+' ',w)}}return x");g.s_fe=new Function("c","return s_r(s_r(s_r(c,'\\\\','\\\\\\\\'),'\"','\\\\\"'),\"\\n\",\"\\\\n\")");
g.s_fa=new Function("f","var s=f.indexOf('(')+1,e=f.indexOf(')'),a='',c;while(s>=0&&s<e){c=f.substring(s,s+1);if(c==',')a+='\",\"';else if((\"\\n\\r\\t \").indexOf(c)<0)a+=c;s++}return a?'\"'+a+'\"':a");g.s_ft=new Function("c","c+='';var s,e,o,a,d,q,f,h,x;s=c.indexOf('=function(');while(s>=0){s++;d=1;q='';x=0;f=c.substring(s);a=s_fa(f);e=o=c.indexOf('{',s);e++;while(d>0){h=c.substring(e,e+1);if(q){if(h==q&&!x)q='';if(h=='\\\\')x=x?0:1;else x=0}else{if(h=='\"'||h==\"'\")q=h;if(h=='{')d++;if(h=='}')d--}if(d>0)e++}c=c.substring(0,s)+'new Function('+(a?a+',':'')+'\"'+s_fe(c.substring(o+1,e))+'\")'+c.substring(e+1);s=c.indexOf('=function(')}return c;");
f=unescape("s._c%3D%27s_c%27%3Bs.wd%3Dwindow%3Bif%28%21s.wd.s_c_in%29%7Bs.wd.s_c_il%3Dnew%20Array%3Bs.wd.s_c_in%3D0%3B%7Ds._il%3Ds.wd.s_c_il%3Bs._in%3Ds.wd.s_c_in%3Bs._il%5Bs._in%5D%3Ds%3Bs.wd.s_c_in++%3Bs.m%3Dfunction%28m%29%7Breturn%20%28%27%27+m%29.indexOf%28%27%7B%27%29%3C0%7D%3Bs.fl%3Dfunction%28x%2Cl%29%7Breturn%20x%3F%28%27%27+x%29.substring%280%2Cl%29%3Ax%7D%3Bs.co%3Dfunction%28o%29%7Bif%28%21o%29return%20o%3Bvar%20n%3Dnew%20Object%2Cx%3Bfor%28x%20in%20o%29if%28x.indexOf%28%27select%27%29%3C0%26%26x.indexOf%28%27filter%27%29%3C0%29n%5Bx%5D%3Do%5Bx%5D%3Breturn%20n%7D%3Bs.num%3Dfunction%28x%29%7Bx%3D%27%27+x%3Bfor%28var%20p%3D0%3Bp%3Cx.length%3Bp++%29if%28%28%270123456789%27%29.indexOf%28x.substring%28p%2Cp+1%29%29%3C0%29return%200%3Breturn%201%7D%3Bs.rep%3Ds_r%3Bs.spf%3Dfunction%28t%2Ca%29%7Ba%5Ba.length%5D%3Dt%3Breturn%200%7D%3Bs.sp%3Dfunction%28x%2Cd%29%7Bvar%20s%3Dthis%2Ca%3Dnew%20Array%3Bif%28x.split%29a%3Dx.split%28d%29%3Belse%20s.pt%28x%2Cd%2C%27spf%27%2Ca%29%3Breturn%20a%7D%3Bs.ape%3Dfunction%28x%29%7Bvar%20s%3Dthis%2Ch%3D%270123456789ABCDEF%27%2Ci%2Cc%3Ds.charSet%2Cn%2Cl%2Ce%2Cy%3D%27%27%3Bc%3Dc%3Fc.toUpperCase%28%29%3A%27%27%3Bif%28x%29%7Bx%3D%27%27+x%3Bif%28c%3D%3D%27AUTO%27%26%26%28%27%27%29.charCodeAt%29%7Bfor%28i%3D0%3Bi%3Cx.length%3Bi++%29%7Bc%3Dx.substring%28i%2Ci+1%29%3Bn%3Dx.charCodeAt%28i%29%3Bif%28n%3E127%29%7Bl%3D0%3Be%3D%27%27%3Bwhile%28n%7C%7Cl%3C4%29%7Be%3Dh.substring%28n%2516%2Cn%2516+1%29+e%3Bn%3D%28n-n%2516%29/16%3Bl++%7Dy+%3D%27%25u%27+e%7Delse%20if%28c%3D%3D%27+%27%29y+%3D%27%252B%27%3Belse%20y+%3Descape%28c%29%7Dx%3Dy%7Delse%7Bx%3Dx%3Fs.rep%28escape%28%27%27+x%29%2C%27+%27%2C%27%252B%27%29%3Ax%3Bif%28x%26%26c%26%26s.em%3D%3D1%26%26x.indexOf%28%27%25u%27%29%3C0%26%26x.indexOf%28%27%25U%27%29%3C0%29%7Bi%3Dx.indexOf%28%27%25%27%29%3Bwhile%28i%3E%3D0%29%7Bi++%3Bif%28h.substring%288%29.indexOf%28x.substring%28i%2Ci+1%29.toUpperCase%28%29%29%3E%3D0%29return%20x.substring%280%2Ci%29+%27u00%27+x.substring%28i%29%3Bi%3Dx.indexOf%28%27%25%27%2Ci%29%7D%7D%7D%7Dreturn%20x%7D%3Bs.epa%3Dfunction%28x%29%7Bvar%20s%3Dthis%3Breturn%20x%3Funescape%28s.rep%28%27%27+x%2C%27+%27%2C%27%20%27%29%29%3Ax%7D%3Bs.pt%3Dfunction%28x%2Cd%2Cf%2Ca%29%7Bvar%20s%3Dthis%2Ct%3Dx%2Cz%3D0%2Cy%2Cr%3Bwhile%28t%29%7By%3Dt.indexOf%28d%29%3By%3Dy%3C0%3Ft.length%3Ay%3Bt%3Dt.substring%280%2Cy%29%3Br%3Ds.m%28f%29%3Fs%5Bf%5D%28t%2Ca%29%3Af%28t%2Ca%29%3Bif%28r%29return%20r%3Bz+%3Dy+d.length%3Bt%3Dx.substring%28z%2Cx.length%29%3Bt%3Dz%3Cx.length%3Ft%3A%27%27%7Dreturn%20%27%27%7D%3Bs.isf%3Dfunction%28t%2Ca%29%7Bvar%20c%3Da.indexOf%28%27%3A%27%29%3Bif%28c%3E%3D0%29a%3Da.substring%280%2Cc%29%3Bif%28t.substring%280%2C2%29%3D%3D%27s_%27%29t%3Dt.substring%282%29%3Breturn%20%28t%21%3D%27%27%26%26t%3D%3Da%29%7D%3Bs.fsf%3Dfunction%28t%2Ca%29%7Bvar%20s%3Dthis%3Bif%28s.pt%28a%2C%27%2C%27%2C%27isf%27%2Ct%29%29s.fsg+%3D%28s.fsg%21%3D%27%27%3F%27%2C%27%3A%27%27%29+t%3Breturn%200%7D%3Bs.fs%3Dfunction%28x%2Cf%29%7Bvar%20s%3Dthis%3Bs.fsg%3D%27%27%3Bs.pt%28x%2C%27%2C%27%2C%27fsf%27%2Cf%29%3Breturn%20s.fsg%7D%3Bs.si%3Dfunction%28wd%29%7Bvar%20s%3Dthis%2Cc%3D%27%27+s_gi%2Ca%3Dc.indexOf%28%22%7B%22%29%2Cb%3Dc.lastIndexOf%28%22%7D%22%29%2Cm%3Bc%3Ds_fe%28a%3E0%26%26b%3E0%3Fc.substring%28a+1%2Cb%29%3A0%29%3Bif%28wd%26%26wd.document%26%26c%29%7Bwd.setTimeout%28%27function%20s_sv%28o%2Cn%2Ck%29%7Bvar%20v%3Do%5Bk%5D%2Ci%3Bif%28v%29%7Bif%28typeof%28v%29%3D%3D%22string%22%7C%7Ctypeof%28v%29%3D%3D%22number%22%29n%5Bk%5D%3Dv%3Belse%20if%20%28typeof%28v%29%3D%3D%22array%22%29%7Bn%5Bk%5D%3Dnew%20Array%3Bfor%28i%3D0%3Bi%3Cv.length%3Bi++%29s_sv%28v%2Cn%5Bk%5D%2Ci%29%7Delse%20if%20%28typeof%28v%29%3D%3D%22object%22%29%7Bn%5Bk%5D%3Dnew%20Object%3Bfor%28i%20in%20v%29s_sv%28v%2Cn%5Bk%5D%2Ci%29%7D%7D%7Dfunction%20s_si%28t%29%7Bvar%20wd%3Dwindow%2Cs%2Ci%2Cj%2Cc%2Ca%2Cb%3Bwd.s_gi%3Dnew%20Function%28%22un%22%2C%22pg%22%2C%22ss%22%2C%22%27+c+%27%22%29%3Bwd.s%3Ds_gi%28%22%27+s.oun+%27%22%29%3Bs%3Dwd.s%3Bs.sa%28%22%27+s.un+%27%22%29%3Bs.tfs%3Dwd%3Bs.pt%28s.vl_g%2C%22%2C%22%2C%22vo1%22%2Ct%29%3Bs.lnk%3Ds.eo%3Ds.linkName%3Ds.linkType%3Ds.wd.s_objectID%3Ds.ppu%3Ds.pe%3Ds.pev1%3Ds.pev2%3Ds.pev3%3D%5C%27%5C%27%3Bif%28t.m_l%26%26t.m_nl%29for%28i%3D0%3Bi%3Ct.m_nl.length%3Bi++%29%7Bn%3Dt.m_nl%5Bi%5D%3Bif%28n%29%7Bm%3Dt%5Bn%5D%3Bc%3Dt%5B%22m_%22+n%5D%3Bif%28m%26%26c%29%7Bc%3D%22%22+c%3Bif%28c.indexOf%28%22function%22%29%3E%3D0%29%7Ba%3Dc.indexOf%28%22%7B%22%29%3Bb%3Dc.lastIndexOf%28%22%7D%22%29%3Bc%3Da%3E0%26%26b%3E0%3Fc.substring%28a+1%2Cb%29%3A0%3Bs%5B%22m_%22+n+%22_c%22%5D%3Dc%3Bif%28m._e%29s.loadModule%28n%29%3Bif%28s%5Bn%5D%29for%28j%3D0%3Bj%3Cm._l.length%3Bj++%29s_sv%28m%2Cs%5Bn%5D%2Cm._l%5Bj%5D%29%7D%7D%7D%7D%7Dvar%20e%2Co%2Ct%3Btry%7Bo%3Dwindow.opener%3Bif%28o%26%26o.s_gi%29%7Bt%3Do.s_gi%28%22%27+s.un+%27%22%29%3Bif%28t%29s_si%28t%29%7D%7Dcatch%28e%29%7B%7D%27%2C1%29%7D%7D%3Bs.c_d%3D%27%27%3Bs.c_gdf%3Dfunction%28t%2Ca%29%7Bvar%20s%3Dthis%3Bif%28%21s.num%28t%29%29return%201%3Breturn%200%7D%3Bs.c_gd%3Dfunction%28%29%7Bvar%20s%3Dthis%2Cd%3Ds.wd.location.hostname%2Cn%3Ds.fpCookieDomainPeriods%2Cp%3Bif%28%21n%29n%3Ds.cookieDomainPeriods%3Bif%28d%26%26%21s.c_d%29%7Bn%3Dn%3FparseInt%28n%29%3A2%3Bn%3Dn%3E2%3Fn%3A2%3Bp%3Dd.lastIndexOf%28%27.%27%29%3Bif%28p%3E%3D0%29%7Bwhile%28p%3E%3D0%26%26n%3E1%29%7Bp%3Dd.lastIndexOf%28%27.%27%2Cp-1%29%3Bn--%7Ds.c_d%3Dp%3E0%26%26s.pt%28d%2C%27.%27%2C%27c_gdf%27%2C0%29%3Fd.substring%28p%29%3Ad%7D%7Dreturn%20s.c_d%7D%3Bs.c_r%3Dfunction%28k%29%7Bvar%20s%3Dthis%3Bk%3Ds.ape%28k%29%3Bvar%20c%3D%27%20%27+s.d.cookie%2Ci%3Dc.indexOf%28%27%20%27+k+%27%3D%27%29%2Ce%3Di%3C0%3Fi%3Ac.indexOf%28%27%3B%27%2Ci%29%2Cv%3Di%3C0%3F%27%27%3As.epa%28c.substring%28i+2+k.length%2Ce%3C0%3Fc.length%3Ae%29%29%3Breturn%20v%21%3D%27%5B%5BB%5D%5D%27%3Fv%3A%27%27%7D%3Bs.c_w%3Dfunction%28k%2Cv%2Ce%29%7Bvar%20s%3Dthis%2Cd%3Ds.c_gd%28%29%2Cl%3Ds.cookieLifetime%2Ct%3Bv%3D%27%27+v%3Bl%3Dl%3F%28%27%27+l%29.toUpperCase%28%29%3A%27%27%3Bif%28e%26%26l%21%3D%27SESSION%27%26%26l%21%3D%27NONE%27%29%7Bt%3D%28v%21%3D%27%27%3FparseInt%28l%3Fl%3A0%29%3A-60%29%3Bif%28t%29%7Be%3Dnew%20Date%3Be.setTime%28e.getTime%28%29+%28t*1000%29%29%7D%7Dif%28k%26%26l%21%3D%27NONE%27%29%7Bs.d.cookie%3Dk+%27%3D%27+s.ape%28v%21%3D%27%27%3Fv%3A%27%5B%5BB%5D%5D%27%29+%27%3B%20path%3D/%3B%27+%28e%26%26l%21%3D%27SESSION%27%3F%27%20expires%3D%27+e.toGMTString%28%29+%27%3B%27%3A%27%27%29+%28d%3F%27%20domain%3D%27+d+%27%3B%27%3A%27%27%29%3Breturn%20s.c_r%28k%29%3D%3Dv%7Dreturn%200%7D%3Bs.eh%3Dfunction%28o%2Ce%2Cr%2Cf%29%7Bvar%20s%3Dthis%2Cb%3D%27s_%27+e+%27_%27+s._in%2Cn%3D-1%2Cl%2Ci%2Cx%3Bif%28%21s.ehl%29s.ehl%3Dnew%20Array%3Bl%3Ds.ehl%3Bfor%28i%3D0%3Bi%3Cl.length%26%26n%3C0%3Bi++%29%7Bif%28l%5Bi%5D.o%3D%3Do%26%26l%5Bi%5D.e%3D%3De%29n%3Di%7Dif%28n%3C0%29%7Bn%3Di%3Bl%5Bn%5D%3Dnew%20Object%7Dx%3Dl%5Bn%5D%3Bx.o%3Do%3Bx.e%3De%3Bf%3Dr%3Fx.b%3Af%3Bif%28r%7C%7Cf%29%7Bx.b%3Dr%3F0%3Ao%5Be%5D%3Bx.o%5Be%5D%3Df%7Dif%28x.b%29%7Bx.o%5Bb%5D%3Dx.b%3Breturn%20b%7Dreturn%200%7D%3Bs.cet%3Dfunction%28f%2Ca%2Ct%2Co%2Cb%29%7Bvar%20s%3Dthis%2Cr%2Ctcf%3Bif%28s.apv%3E%3D5%26%26%28%21s.isopera%7C%7Cs.apv%3E%3D7%29%29%7Btcf%3Dnew%20Function%28%27s%27%2C%27f%27%2C%27a%27%2C%27t%27%2C%27var%20e%2Cr%3Btry%7Br%3Ds.m%28f%29%3Fs%5Bf%5D%28a%29%3Af%28a%29%7Dcatch%28e%29%7Br%3Ds.m%28t%29%3Fs%5Bt%5D%28e%29%3At%28e%29%7Dreturn%20r%27%29%3Br%3Dtcf%28s%2Cf%2Ca%2Ct%29%7Delse%7Bif%28s.ismac%26%26s.u.indexOf%28%27MSIE%204%27%29%3E%3D0%29r%3Ds.m%28b%29%3Fs%5Bb%5D%28a%29%3Ab%28a%29%3Belse%7Bs.eh%28s.wd%2C%27onerror%27%2C0%2Co%29%3Br%3Ds.m%28f%29%3Fs%5Bf%5D%28a%29%3Af%28a%29%3Bs.eh%28s.wd%2C%27onerror%27%2C1%29%7D%7Dreturn%20r%7D%3Bs.gtfset%3Dfunction%28e%29%7Bvar%20s%3Dthis%3Breturn%20s.tfs%7D%3Bs.gtfsoe%3Dnew%20Function%28%27e%27%2C%27var%20s%3Ds_c_il%5B%27+s._in+%27%5D%2Cc%3Bs.eh%28window%2C%22onerror%22%2C1%29%3Bs.etfs%3D1%3Bc%3Ds.t%28%29%3Bif%28c%29s.d.write%28c%29%3Bs.etfs%3D0%3Breturn%20true%27%29%3Bs.gtfsfb%3Dfunction%28a%29%7Breturn%20window%7D%3Bs.gtfsf%3Dfunction%28w%29%7Bvar%20s%3Dthis%2Cp%3Dw.parent%2Cl%3Dw.location%3Bs.tfs%3Dw%3Bif%28p%26%26p.location%21%3Dl%26%26p.location.host%3D%3Dl.host%29%7Bs.tfs%3Dp%3Breturn%20s.gtfsf%28s.tfs%29%7Dreturn%20s.tfs%7D%3Bs.gtfs%3Dfunction%28%29%7Bvar%20s%3Dthis%3Bif%28%21s.tfs%29%7Bs.tfs%3Ds.wd%3Bif%28%21s.etfs%29s.tfs%3Ds.cet%28%27gtfsf%27%2Cs.tfs%2C%27gtfset%27%2Cs.gtfsoe%2C%27gtfsfb%27%29%7Dreturn%20s.tfs%7D%3Bs.mrq%3Dfunction%28u%29%7Bvar%20s%3Dthis%2Cl%3Ds.rl%5Bu%5D%2Cn%2Cr%3Bs.rl%5Bu%5D%3D0%3Bif%28l%29for%28n%3D0%3Bn%3Cl.length%3Bn++%29%7Br%3Dl%5Bn%5D%3Bs.mr%280%2C0%2Cr.r%2C0%2Cr.t%2Cr.u%29%7D%7D%3Bs.br%3Dfunction%28id%2Crs%29%7Bvar%20s%3Dthis%3Bif%28s.disableBufferedRequests%7C%7C%21s.c_w%28%27s_br%27%2Crs%29%29s.brl%3Drs%7D%3Bs.flushBufferedRequests%3Dfunction%28%29%7Bvar%20s%3Dthis%3Bs.fbr%280%29%7D%3Bs.fbr%3Dfunction%28id%29%7Bvar%20s%3Dthis%2Cbr%3Ds.c_r%28%27s_br%27%29%3Bif%28%21br%29br%3Ds.brl%3Bif%28br%29%7Bif%28%21s.disableBufferedRequests%29s.c_w%28%27s_br%27%2C%27%27%29%3Bs.mr%280%2C0%2Cbr%29%7Ds.brl%3D0%7D%3Bs.mr%3Dfunction%28sess%2Cq%2Crs%2Cid%2Cta%2Cu%29%7Bvar%20s%3Dthis%2Cdc%3Ds.dc%2Ct1%3Ds.trackingServer%2Ct2%3Ds.trackingServerSecure%2Ctb%3Ds.trackingServerBase%2Cp%3D%27.sc%27%2Cns%3Ds.visitorNamespace%2Cun%3Du%3Fu%3A%28ns%3Fns%3As.fun%29%2Cunc%3Ds.rep%28un%2C%27_%27%2C%27-%27%29%2Cr%3Dnew%20Object%2Cl%2Cimn%3D%27s_i_%27+%28un%29%2Cim%2Cb%2Ce%3Bif%28%21rs%29%7Bif%28t1%29%7Bif%28t2%26%26s.ssl%29t1%3Dt2%7Delse%7Bif%28%21ns%29ns%3Dunc%3Bif%28%21tb%29tb%3D%272o7.net%27%3Bif%28dc%29dc%3D%28%27%27+dc%29.toLowerCase%28%29%3Belse%20dc%3D%27d1%27%3Bif%28tb%3D%3D%272o7.net%27%29%7Bif%28dc%3D%3D%27d1%27%29dc%3D%27112%27%3Belse%20if%28dc%3D%3D%27d2%27%29dc%3D%27122%27%3Bp%3D%27%27%7Dt1%3Dns+%27.%27+dc+%27.%27+p+tb%7Drs%3D%27http%27+%28s.ssl%3F%27s%27%3A%27%27%29+%27%3A//%27+t1+%27/b/ss/%27+s.un+%27/%27+%28s.mobile%3F%275.1%27%3A%271%27%29+%27/H.19.3/%27+sess+%27%3FAQB%3D1%26ndh%3D1%27+%28q%3Fq%3A%27%27%29+%27%26AQE%3D1%27%3Bif%28s.isie%26%26%21s.ismac%29%7Bif%28s.apv%3E5.5%29rs%3Ds.fl%28rs%2C4095%29%3Belse%20rs%3Ds.fl%28rs%2C2047%29%7Dif%28id%29%7Bs.br%28id%2Crs%29%3Breturn%7D%7Dif%28s.d.images%26%26s.apv%3E%3D3%26%26%28%21s.isopera%7C%7Cs.apv%3E%3D7%29%26%26%28s.ns6%3C0%7C%7Cs.apv%3E%3D6.1%29%29%7Bif%28%21s.rc%29s.rc%3Dnew%20Object%3Bif%28%21s.rc%5Bun%5D%29%7Bs.rc%5Bun%5D%3D1%3Bif%28%21s.rl%29s.rl%3Dnew%20Object%3Bs.rl%5Bun%5D%3Dnew%20Array%3BsetTimeout%28%27if%28window.s_c_il%29window.s_c_il%5B%27+s._in+%27%5D.mrq%28%22%27+un+%27%22%29%27%2C750%29%7Delse%7Bl%3Ds.rl%5Bun%5D%3Bif%28l%29%7Br.t%3Dta%3Br.u%3Dun%3Br.r%3Drs%3Bl%5Bl.length%5D%3Dr%3Breturn%20%27%27%7Dimn+%3D%27_%27+s.rc%5Bun%5D%3Bs.rc%5Bun%5D++%7Dim%3Ds.wd%5Bimn%5D%3Bif%28%21im%29im%3Ds.wd%5Bimn%5D%3Dnew%20Image%3Bim.s_l%3D0%3Bim.onload%3Dnew%20Function%28%27e%27%2C%27this.s_l%3D1%3Bvar%20wd%3Dwindow%2Cs%3Bif%28wd.s_c_il%29%7Bs%3Dwd.s_c_il%5B%27+s._in+%27%5D%3Bs.mrq%28%22%27+un+%27%22%29%3Bs.nrs--%3Bif%28%21s.nrs%29s.m_m%28%22rr%22%29%7D%27%29%3Bif%28%21s.nrs%29%7Bs.nrs%3D1%3Bs.m_m%28%27rs%27%29%7Delse%20s.nrs++%3Bim.src%3Drs%3Bif%28rs.indexOf%28%27%26pe%3D%27%29%3E%3D0%26%26%28%21ta%7C%7Cta%3D%3D%27_self%27%7C%7Cta%3D%3D%27_top%27%7C%7C%28s.wd.name%26%26ta%3D%3Ds.wd.name%29%29%29%7Bb%3De%3Dnew%20Date%3Bwhile%28%21im.s_l%26%26e.getTime%28%29-b.getTime%28%29%3C500%29e%3Dnew%20Date%7Dreturn%20%27%27%7Dreturn%20%27%3Cim%27+%27g%20sr%27+%27c%3D%22%27+rs+%27%22%20width%3D1%20height%3D1%20border%3D0%20alt%3D%22%22%3E%27%7D%3Bs.gg%3Dfunction%28v%29%7Bvar%20s%3Dthis%3Bif%28%21s.wd%5B%27s_%27+v%5D%29s.wd%5B%27s_%27+v%5D%3D%27%27%3Breturn%20s.wd%5B%27s_%27+v%5D%7D%3Bs.glf%3Dfunction%28t%2Ca%29%7Bif%28t.substring%280%2C2%29%3D%3D%27s_%27%29t%3Dt.substring%282%29%3Bvar%20s%3Dthis%2Cv%3Ds.gg%28t%29%3Bif%28v%29s%5Bt%5D%3Dv%7D%3Bs.gl%3Dfunction%28v%29%7Bvar%20s%3Dthis%3Bif%28s.pg%29s.pt%28v%2C%27%2C%27%2C%27glf%27%2C0%29%7D%3Bs.gv%3Dfunction%28v%29%7Bvar%20s%3Dthis%3Breturn%20s%5B%27vpm_%27+v%5D%3Fs%5B%27vpv_%27+v%5D%3A%28s%5Bv%5D%3Fs%5Bv%5D%3A%27%27%29%7D%3Bs.havf%3Dfunction%28t%2Ca%29%7Bvar%20s%3Dthis%2Cb%3Dt.substring%280%2C4%29%2Cx%3Dt.substring%284%29%2Cn%3DparseInt%28x%29%2Ck%3D%27g_%27+t%2Cm%3D%27vpm_%27+t%2Cq%3Dt%2Cv%3Ds.linkTrackVars%2Ce%3Ds.linkTrackEvents%2Cmn%3Bs%5Bk%5D%3Ds.gv%28t%29%3Bif%28s%5Bk%5D%29%7Bif%28s.pe%7C%7Cs.lnk%7C%7Cs.eo%29%7Bif%28s.pe%29%7Bmn%3Ds.pe.substring%280%2C1%29.toUpperCase%28%29+s.pe.substring%281%29%3Bif%28s%5Bmn%5D%29%7Bv%3Ds%5Bmn%5D.trackVars%3Be%3Ds%5Bmn%5D.trackEvents%7D%7Dv%3Dv%3Fv+%27%2C%27+s.vl_l+%27%2C%27+s.vl_l2%3A%27%27%3Bif%28v%26%26%21s.pt%28v%2C%27%2C%27%2C%27isf%27%2Ct%29%29s%5Bk%5D%3D%27%27%3Bif%28t%3D%3D%27events%27%26%26e%29s%5Bk%5D%3Ds.fs%28s%5Bk%5D%2Ce%29%7Ds%5Bm%5D%3D0%3Bif%28t%3D%3D%27dynamicVariablePrefix%27%29q%3D%27D%27%3Belse%20if%28t%3D%3D%27visitorID%27%29q%3D%27vid%27%3Belse%20if%28t%3D%3D%27pageURL%27%29%7Bq%3D%27g%27%3Bs%5Bk%5D%3Ds.fl%28s%5Bk%5D%2C255%29%7Delse%20if%28t%3D%3D%27referrer%27%29%7Bq%3D%27r%27%3Bs%5Bk%5D%3Ds.fl%28s%5Bk%5D%2C255%29%7Delse%20if%28t%3D%3D%27vmk%27%7C%7Ct%3D%3D%27visitorMigrationKey%27%29q%3D%27vmt%27%3Belse%20if%28t%3D%3D%27visitorMigrationServer%27%29%7Bq%3D%27vmf%27%3Bif%28s.ssl%26%26s.visitorMigrationServerSecure%29s%5Bk%5D%3D%27%27%7Delse%20if%28t%3D%3D%27visitorMigrationServerSecure%27%29%7Bq%3D%27vmf%27%3Bif%28%21s.ssl%26%26s.visitorMigrationServer%29s%5Bk%5D%3D%27%27%7Delse%20if%28t%3D%3D%27charSet%27%29%7Bq%3D%27ce%27%3Bif%28s%5Bk%5D.toUpperCase%28%29%3D%3D%27AUTO%27%29s%5Bk%5D%3D%27ISO8859-1%27%3Belse%20if%28s.em%3D%3D2%29s%5Bk%5D%3D%27UTF-8%27%7Delse%20if%28t%3D%3D%27visitorNamespace%27%29q%3D%27ns%27%3Belse%20if%28t%3D%3D%27cookieDomainPeriods%27%29q%3D%27cdp%27%3Belse%20if%28t%3D%3D%27cookieLifetime%27%29q%3D%27cl%27%3Belse%20if%28t%3D%3D%27variableProvider%27%29q%3D%27vvp%27%3Belse%20if%28t%3D%3D%27currencyCode%27%29q%3D%27cc%27%3Belse%20if%28t%3D%3D%27channel%27%29q%3D%27ch%27%3Belse%20if%28t%3D%3D%27transactionID%27%29q%3D%27xact%27%3Belse%20if%28t%3D%3D%27campaign%27%29q%3D%27v0%27%3Belse%20if%28t%3D%3D%27resolution%27%29q%3D%27s%27%3Belse%20if%28t%3D%3D%27colorDepth%27%29q%3D%27c%27%3Belse%20if%28t%3D%3D%27javascriptVersion%27%29q%3D%27j%27%3Belse%20if%28t%3D%3D%27javaEnabled%27%29q%3D%27v%27%3Belse%20if%28t%3D%3D%27cookiesEnabled%27%29q%3D%27k%27%3Belse%20if%28t%3D%3D%27browserWidth%27%29q%3D%27bw%27%3Belse%20if%28t%3D%3D%27browserHeight%27%29q%3D%27bh%27%3Belse%20if%28t%3D%3D%27connectionType%27%29q%3D%27ct%27%3Belse%20if%28t%3D%3D%27homepage%27%29q%3D%27hp%27%3Belse%20if%28t%3D%3D%27plugins%27%29q%3D%27p%27%3Belse%20if%28s.num%28x%29%29%7Bif%28b%3D%3D%27prop%27%29q%3D%27c%27+n%3Belse%20if%28b%3D%3D%27eVar%27%29q%3D%27v%27+n%3Belse%20if%28b%3D%3D%27list%27%29q%3D%27l%27+n%3Belse%20if%28b%3D%3D%27hier%27%29%7Bq%3D%27h%27+n%3Bs%5Bk%5D%3Ds.fl%28s%5Bk%5D%2C255%29%7D%7Dif%28s%5Bk%5D%26%26t%21%3D%27linkName%27%26%26t%21%3D%27linkType%27%29s.qav+%3D%27%26%27+q+%27%3D%27+s.ape%28s%5Bk%5D%29%3B%7Dreturn%20%27%27%7D%3Bs.hav%3Dfunction%28%29%7Bvar%20s%3Dthis%3Bs.qav%3D%27%27%3Bs.pt%28s.vl_t%2C%27%2C%27%2C%27havf%27%2C0%29%3Breturn%20s.qav%7D%3Bs.lnf%3Dfunction%28t%2Ch%29%7Bt%3Dt%3Ft.toLowerCase%28%29%3A%27%27%3Bh%3Dh%3Fh.toLowerCase%28%29%3A%27%27%3Bvar%20te%3Dt.indexOf%28%27%3D%27%29%3Bif%28t%26%26te%3E0%26%26h.indexOf%28t.substring%28te+1%29%29%3E%3D0%29return%20t.substring%280%2Cte%29%3Breturn%20%27%27%7D%3Bs.ln%3Dfunction%28h%29%7Bvar%20s%3Dthis%2Cn%3Ds.linkNames%3Bif%28n%29return%20s.pt%28n%2C%27%2C%27%2C%27lnf%27%2Ch%29%3Breturn%20%27%27%7D%3Bs.ltdf%3Dfunction%28t%2Ch%29%7Bt%3Dt%3Ft.toLowerCase%28%29%3A%27%27%3Bh%3Dh%3Fh.toLowerCase%28%29%3A%27%27%3Bvar%20qi%3Dh.indexOf%28%27%3F%27%29%3Bh%3Dqi%3E%3D0%3Fh.substring%280%2Cqi%29%3Ah%3Bif%28t%26%26h.substring%28h.length-%28t.length+1%29%29%3D%3D%27.%27+t%29return%201%3Breturn%200%7D%3Bs.ltef%3Dfunction%28t%2Ch%29%7Bt%3Dt%3Ft.toLowerCase%28%29%3A%27%27%3Bh%3Dh%3Fh.toLowerCase%28%29%3A%27%27%3Bif%28t%26%26h.indexOf%28t%29%3E%3D0%29return%201%3Breturn%200%7D%3Bs.lt%3Dfunction%28h%29%7Bvar%20s%3Dthis%2Clft%3Ds.linkDownloadFileTypes%2Clef%3Ds.linkExternalFilters%2Clif%3Ds.linkInternalFilters%3Blif%3Dlif%3Flif%3As.wd.location.hostname%3Bh%3Dh.toLowerCase%28%29%3Bif%28s.trackDownloadLinks%26%26lft%26%26s.pt%28lft%2C%27%2C%27%2C%27ltdf%27%2Ch%29%29return%20%27d%27%3Bif%28s.trackExternalLinks%26%26h.substring%280%2C1%29%21%3D%27%23%27%26%26%28lef%7C%7Clif%29%26%26%28%21lef%7C%7Cs.pt%28lef%2C%27%2C%27%2C%27ltef%27%2Ch%29%29%26%26%28%21lif%7C%7C%21s.pt%28lif%2C%27%2C%27%2C%27ltef%27%2Ch%29%29%29return%20%27e%27%3Breturn%20%27%27%7D%3Bs.lc%3Dnew%20Function%28%27e%27%2C%27var%20s%3Ds_c_il%5B%27+s._in+%27%5D%2Cb%3Ds.eh%28this%2C%22onclick%22%29%3Bs.lnk%3Ds.co%28this%29%3Bs.t%28%29%3Bs.lnk%3D0%3Bif%28b%29return%20this%5Bb%5D%28e%29%3Breturn%20true%27%29%3Bs.bc%3Dnew%20Function%28%27e%27%2C%27var%20s%3Ds_c_il%5B%27+s._in+%27%5D%2Cf%2Ctcf%3Bif%28s.d%26%26s.d.all%26%26s.d.all.cppXYctnr%29return%3Bs.eo%3De.srcElement%3Fe.srcElement%3Ae.target%3Btcf%3Dnew%20Function%28%22s%22%2C%22var%20e%3Btry%7Bif%28s.eo%26%26%28s.eo.tagName%7C%7Cs.eo.parentElement%7C%7Cs.eo.parentNode%29%29s.t%28%29%7Dcatch%28e%29%7B%7D%22%29%3Btcf%28s%29%3Bs.eo%3D0%27%29%3Bs.oh%3Dfunction%28o%29%7Bvar%20s%3Dthis%2Cl%3Ds.wd.location%2Ch%3Do.href%3Fo.href%3A%27%27%2Ci%2Cj%2Ck%2Cp%3Bi%3Dh.indexOf%28%27%3A%27%29%3Bj%3Dh.indexOf%28%27%3F%27%29%3Bk%3Dh.indexOf%28%27/%27%29%3Bif%28h%26%26%28i%3C0%7C%7C%28j%3E%3D0%26%26i%3Ej%29%7C%7C%28k%3E%3D0%26%26i%3Ek%29%29%29%7Bp%3Do.protocol%26%26o.protocol.length%3E1%3Fo.protocol%3A%28l.protocol%3Fl.protocol%3A%27%27%29%3Bi%3Dl.pathname.lastIndexOf%28%27/%27%29%3Bh%3D%28p%3Fp+%27//%27%3A%27%27%29+%28o.host%3Fo.host%3A%28l.host%3Fl.host%3A%27%27%29%29+%28h.substring%280%2C1%29%21%3D%27/%27%3Fl.pathname.substring%280%2Ci%3C0%3F0%3Ai%29+%27/%27%3A%27%27%29+h%7Dreturn%20h%7D%3Bs.ot%3Dfunction%28o%29%7Bvar%20t%3Do.tagName%3Bt%3Dt%26%26t.toUpperCase%3Ft.toUpperCase%28%29%3A%27%27%3Bif%28t%3D%3D%27SHAPE%27%29t%3D%27%27%3Bif%28t%29%7Bif%28t%3D%3D%27INPUT%27%26%26o.type%26%26o.type.toUpperCase%29t%3Do.type.toUpperCase%28%29%3Belse%20if%28%21t%26%26o.href%29t%3D%27A%27%3B%7Dreturn%20t%7D%3Bs.oid%3Dfunction%28o%29%7Bvar%20s%3Dthis%2Ct%3Ds.ot%28o%29%2Cp%2Cc%2Cn%3D%27%27%2Cx%3D0%3Bif%28t%26%26%21o.s_oid%29%7Bp%3Do.protocol%3Bc%3Do.onclick%3Bif%28o.href%26%26%28t%3D%3D%27A%27%7C%7Ct%3D%3D%27AREA%27%29%26%26%28%21c%7C%7C%21p%7C%7Cp.toLowerCase%28%29.indexOf%28%27javascript%27%29%3C0%29%29n%3Ds.oh%28o%29%3Belse%20if%28c%29%7Bn%3Ds.rep%28s.rep%28s.rep%28s.rep%28%27%27+c%2C%22%5Cr%22%2C%27%27%29%2C%22%5Cn%22%2C%27%27%29%2C%22%5Ct%22%2C%27%27%29%2C%27%20%27%2C%27%27%29%3Bx%3D2%7Delse%20if%28o.value%26%26%28t%3D%3D%27INPUT%27%7C%7Ct%3D%3D%27SUBMIT%27%29%29%7Bn%3Do.value%3Bx%3D3%7Delse%20if%28o.src%26%26t%3D%3D%27IMAGE%27%29n%3Do.src%3Bif%28n%29%7Bo.s_oid%3Ds.fl%28n%2C100%29%3Bo.s_oidt%3Dx%7D%7Dreturn%20o.s_oid%7D%3Bs.rqf%3Dfunction%28t%2Cun%29%7Bvar%20s%3Dthis%2Ce%3Dt.indexOf%28%27%3D%27%29%2Cu%3De%3E%3D0%3F%27%2C%27+t.substring%280%2Ce%29+%27%2C%27%3A%27%27%3Breturn%20u%26%26u.indexOf%28%27%2C%27+un+%27%2C%27%29%3E%3D0%3Fs.epa%28t.substring%28e+1%29%29%3A%27%27%7D%3Bs.rq%3Dfunction%28un%29%7Bvar%20s%3Dthis%2Cc%3Dun.indexOf%28%27%2C%27%29%2Cv%3Ds.c_r%28%27s_sq%27%29%2Cq%3D%27%27%3Bif%28c%3C0%29return%20s.pt%28v%2C%27%26%27%2C%27rqf%27%2Cun%29%3Breturn%20s.pt%28un%2C%27%2C%27%2C%27rq%27%2C0%29%7D%3Bs.sqp%3Dfunction%28t%2Ca%29%7Bvar%20s%3Dthis%2Ce%3Dt.indexOf%28%27%3D%27%29%2Cq%3De%3C0%3F%27%27%3As.epa%28t.substring%28e+1%29%29%3Bs.sqq%5Bq%5D%3D%27%27%3Bif%28e%3E%3D0%29s.pt%28t.substring%280%2Ce%29%2C%27%2C%27%2C%27sqs%27%2Cq%29%3Breturn%200%7D%3Bs.sqs%3Dfunction%28un%2Cq%29%7Bvar%20s%3Dthis%3Bs.squ%5Bun%5D%3Dq%3Breturn%200%7D%3Bs.sq%3Dfunction%28q%29%7Bvar%20s%3Dthis%2Ck%3D%27s_sq%27%2Cv%3Ds.c_r%28k%29%2Cx%2Cc%3D0%3Bs.sqq%3Dnew%20Object%3Bs.squ%3Dnew%20Object%3Bs.sqq%5Bq%5D%3D%27%27%3Bs.pt%28v%2C%27%26%27%2C%27sqp%27%2C0%29%3Bs.pt%28s.un%2C%27%2C%27%2C%27sqs%27%2Cq%29%3Bv%3D%27%27%3Bfor%28x%20in%20s.squ%29if%28x%26%26%28%21Object%7C%7C%21Object.prototype%7C%7C%21Object.prototype%5Bx%5D%29%29s.sqq%5Bs.squ%5Bx%5D%5D+%3D%28s.sqq%5Bs.squ%5Bx%5D%5D%3F%27%2C%27%3A%27%27%29+x%3Bfor%28x%20in%20s.sqq%29if%28x%26%26%28%21Object%7C%7C%21Object.prototype%7C%7C%21Object.prototype%5Bx%5D%29%26%26s.sqq%5Bx%5D%26%26%28x%3D%3Dq%7C%7Cc%3C2%29%29%7Bv+%3D%28v%3F%27%26%27%3A%27%27%29+s.sqq%5Bx%5D+%27%3D%27+s.ape%28x%29%3Bc++%7Dreturn%20s.c_w%28k%2Cv%2C0%29%7D%3Bs.wdl%3Dnew%20Function%28%27e%27%2C%27var%20s%3Ds_c_il%5B%27+s._in+%27%5D%2Cr%3Dtrue%2Cb%3Ds.eh%28s.wd%2C%22onload%22%29%2Ci%2Co%2Coc%3Bif%28b%29r%3Dthis%5Bb%5D%28e%29%3Bfor%28i%3D0%3Bi%3Cs.d.links.length%3Bi++%29%7Bo%3Ds.d.links%5Bi%5D%3Boc%3Do.onclick%3F%22%22+o.onclick%3A%22%22%3Bif%28%28oc.indexOf%28%22s_gs%28%22%29%3C0%7C%7Coc.indexOf%28%22.s_oc%28%22%29%3E%3D0%29%26%26oc.indexOf%28%22.tl%28%22%29%3C0%29s.eh%28o%2C%22onclick%22%2C0%2Cs.lc%29%3B%7Dreturn%20r%27%29%3Bs.wds%3Dfunction%28%29%7Bvar%20s%3Dthis%3Bif%28s.apv%3E3%26%26%28%21s.isie%7C%7C%21s.ismac%7C%7Cs.apv%3E%3D5%29%29%7Bif%28s.b%26%26s.b.attachEvent%29s.b.attachEvent%28%27onclick%27%2Cs.bc%29%3Belse%20if%28s.b%26%26s.b.addEventListener%29s.b.addEventListener%28%27click%27%2Cs.bc%2Cfalse%29%3Belse%20s.eh%28s.wd%2C%27onload%27%2C0%2Cs.wdl%29%7D%7D%3Bs.vs%3Dfunction%28x%29%7Bvar%20s%3Dthis%2Cv%3Ds.visitorSampling%2Cg%3Ds.visitorSamplingGroup%2Ck%3D%27s_vsn_%27+s.un+%28g%3F%27_%27+g%3A%27%27%29%2Cn%3Ds.c_r%28k%29%2Ce%3Dnew%20Date%2Cy%3De.getYear%28%29%3Be.setYear%28y+10+%28y%3C1900%3F1900%3A0%29%29%3Bif%28v%29%7Bv*%3D100%3Bif%28%21n%29%7Bif%28%21s.c_w%28k%2Cx%2Ce%29%29return%200%3Bn%3Dx%7Dif%28n%2510000%3Ev%29return%200%7Dreturn%201%7D%3Bs.dyasmf%3Dfunction%28t%2Cm%29%7Bif%28t%26%26m%26%26m.indexOf%28t%29%3E%3D0%29return%201%3Breturn%200%7D%3Bs.dyasf%3Dfunction%28t%2Cm%29%7Bvar%20s%3Dthis%2Ci%3Dt%3Ft.indexOf%28%27%3D%27%29%3A-1%2Cn%2Cx%3Bif%28i%3E%3D0%26%26m%29%7Bvar%20n%3Dt.substring%280%2Ci%29%2Cx%3Dt.substring%28i+1%29%3Bif%28s.pt%28x%2C%27%2C%27%2C%27dyasmf%27%2Cm%29%29return%20n%7Dreturn%200%7D%3Bs.uns%3Dfunction%28%29%7Bvar%20s%3Dthis%2Cx%3Ds.dynamicAccountSelection%2Cl%3Ds.dynamicAccountList%2Cm%3Ds.dynamicAccountMatch%2Cn%2Ci%3Bs.un%3Ds.un.toLowerCase%28%29%3Bif%28x%26%26l%29%7Bif%28%21m%29m%3Ds.wd.location.host%3Bif%28%21m.toLowerCase%29m%3D%27%27+m%3Bl%3Dl.toLowerCase%28%29%3Bm%3Dm.toLowerCase%28%29%3Bn%3Ds.pt%28l%2C%27%3B%27%2C%27dyasf%27%2Cm%29%3Bif%28n%29s.un%3Dn%7Di%3Ds.un.indexOf%28%27%2C%27%29%3Bs.fun%3Di%3C0%3Fs.un%3As.un.substring%280%2Ci%29%7D%3Bs.sa%3Dfunction%28un%29%7Bvar%20s%3Dthis%3Bs.un%3Dun%3Bif%28%21s.oun%29s.oun%3Dun%3Belse%20if%28%28%27%2C%27+s.oun+%27%2C%27%29.indexOf%28un%29%3C0%29s.oun+%3D%27%2C%27+un%3Bs.uns%28%29%7D%3Bs.m_i%3Dfunction%28n%2Ca%29%7Bvar%20s%3Dthis%2Cm%2Cf%3Dn.substring%280%2C1%29%2Cr%2Cl%2Ci%3Bif%28%21s.m_l%29s.m_l%3Dnew%20Object%3Bif%28%21s.m_nl%29s.m_nl%3Dnew%20Array%3Bm%3Ds.m_l%5Bn%5D%3Bif%28%21a%26%26m%26%26m._e%26%26%21m._i%29s.m_a%28n%29%3Bif%28%21m%29%7Bm%3Dnew%20Object%2Cm._c%3D%27s_m%27%3Bm._in%3Ds.wd.s_c_in%3Bm._il%3Ds._il%3Bm._il%5Bm._in%5D%3Dm%3Bs.wd.s_c_in++%3Bm.s%3Ds%3Bm._n%3Dn%3Bm._l%3Dnew%20Array%28%27_c%27%2C%27_in%27%2C%27_il%27%2C%27_i%27%2C%27_e%27%2C%27_d%27%2C%27_dl%27%2C%27s%27%2C%27n%27%2C%27_r%27%2C%27_g%27%2C%27_g1%27%2C%27_t%27%2C%27_t1%27%2C%27_x%27%2C%27_x1%27%2C%27_rs%27%2C%27_rr%27%2C%27_l%27%29%3Bs.m_l%5Bn%5D%3Dm%3Bs.m_nl%5Bs.m_nl.length%5D%3Dn%7Delse%20if%28m._r%26%26%21m._m%29%7Br%3Dm._r%3Br._m%3Dm%3Bl%3Dm._l%3Bfor%28i%3D0%3Bi%3Cl.length%3Bi++%29if%28m%5Bl%5Bi%5D%5D%29r%5Bl%5Bi%5D%5D%3Dm%5Bl%5Bi%5D%5D%3Br._il%5Br._in%5D%3Dr%3Bm%3Ds.m_l%5Bn%5D%3Dr%7Dif%28f%3D%3Df.toUpperCase%28%29%29s%5Bn%5D%3Dm%3Breturn%20m%7D%3Bs.m_a%3Dnew%20Function%28%27n%27%2C%27g%27%2C%27if%28%21g%29g%3D%22m_%22+n%3Bvar%20s%3Ds_c_il%5B%27+s._in+%27%5D%2Cc%3Ds%5Bg+%22_c%22%5D%2Cm%2Cx%2Cf%3D0%3Bif%28%21c%29c%3Ds.wd%5B%22s_%22+g+%22_c%22%5D%3Bif%28c%26%26s_d%29s%5Bg%5D%3Dnew%20Function%28%22s%22%2Cs_ft%28s_d%28c%29%29%29%3Bx%3Ds%5Bg%5D%3Bif%28%21x%29x%3Ds%5Bg%5D%3Ds.wd%5B%22s_%22+g%5D%3Bm%3Ds.m_i%28n%2C1%29%3Bif%28x%29%7Bm._i%3Df%3D1%3Bif%28%28%22%22+x%29.indexOf%28%22function%22%29%3E%3D0%29x%28s%29%3Belse%20s.m_m%28%22x%22%2Cn%2Cx%29%7Dm%3Ds.m_i%28n%2C1%29%3Bif%28m._dl%29m._dl%3Dm._d%3D0%3Bs.dlt%28%29%3Breturn%20f%27%29%3Bs.m_m%3Dfunction%28t%2Cn%2Cd%29%7Bt%3D%27_%27+t%3Bvar%20s%3Dthis%2Ci%2Cx%2Cm%2Cf%3D%27_%27+t%3Bif%28s.m_l%26%26s.m_nl%29for%28i%3D0%3Bi%3Cs.m_nl.length%3Bi++%29%7Bx%3Ds.m_nl%5Bi%5D%3Bif%28%21n%7C%7Cx%3D%3Dn%29%7Bm%3Ds.m_i%28x%29%3Bif%28m%5Bt%5D%29%7Bif%28t%3D%3D%27_d%27%29return%201%3Bif%28d%29m%5Bt%5D%28d%29%3Belse%20m%5Bt%5D%28%29%7Dif%28m%5Bt+1%5D%26%26%21m%5Bf%5D%29%7Bif%28d%29m%5Bt+1%5D%28d%29%3Belse%20m%5Bt+1%5D%28%29%7Dm%5Bf%5D%3D1%7D%7Dreturn%200%7D%3Bs.loadModule%3Dfunction%28n%2Cu%2Cd%2Cl%29%7Bvar%20s%3Dthis%2Cm%2Ci%3Dn.indexOf%28%27%3A%27%29%2Cg%3Di%3C0%3F%22m_%22+n%3An.substring%28i+1%29%2Co%3D0%2Cf%2Cc%3Ds.h%3Fs.h%3As.b%2Ctcf%3Bif%28i%3E%3D0%29n%3Dn.substring%280%2Ci%29%3Bm%3Ds.m_i%28n%29%3Bif%28%28l%7C%7C%21s.m_a%28n%2Cg%29%29%26%26u%26%26s.d%26%26c%26%26s.d.createElement%29%7Bif%28d%29%7Bm._d%3D1%3Bm._dl%3D1%7Dif%28s.ssl%29u%3Ds.rep%28u%2C%27http%3A%27%2C%27https%3A%27%29%3Bf%3Dnew%20Function%28%27e%27%2C%27s_c_il%5B%27+s._in+%27%5D.m_a%28%22%27+n+%27%22%2C%22%27+g+%27%22%29%27%29%3Btcf%3Dnew%20Function%28%27s%27%2C%27f%27%2C%27u%27%2C%27c%27%2C%27var%20e%2Co%3D0%3Btry%7Bo%3Ds.d.createElement%28%22script%22%29%3Bif%28o%29%7Bo.type%3D%22text/javascript%22%3Bif%28f%29o.onload%3Df%3Bo.src%3Du%3Bc.appendChild%28o%29%7D%7Dcatch%28e%29%7Bo%3D0%7Dreturn%20o%27%29%3Bo%3Dtcf%28s%2Cf%2Cu%2Cc%29%7Delse%20m%3Ds.m_i%28n%29%3Bm._e%3D1%3Breturn%20m%7D%3Bs.vo1%3Dfunction%28t%2Ca%29%7Bif%28a%5Bt%5D%7C%7Ca%5B%27%21%27+t%5D%29this%5Bt%5D%3Da%5Bt%5D%7D%3Bs.vo2%3Dfunction%28t%2Ca%29%7Bif%28%21a%5Bt%5D%29%7Ba%5Bt%5D%3Dthis%5Bt%5D%3Bif%28%21a%5Bt%5D%29a%5B%27%21%27+t%5D%3D1%7D%7D%3Bs.dlt%3Dnew%20Function%28%27var%20s%3Ds_c_il%5B%27+s._in+%27%5D%2Cd%3Dnew%20Date%2Ci%2Cvo%2Cf%3D0%3Bif%28s.dll%29for%28i%3D0%3Bi%3Cs.dll.length%3Bi++%29%7Bvo%3Ds.dll%5Bi%5D%3Bif%28vo%29%7Bif%28%21s.m_m%28%22d%22%29%7C%7Cd.getTime%28%29-vo._t%3E%3Ds.maxDelay%29%7Bs.dll%5Bi%5D%3D0%3Bs.t%28vo%29%7Delse%20f%3D1%7D%7Dif%28s.dli%29clearTimeout%28s.dli%29%3Bs.dli%3D0%3Bif%28f%29%7Bif%28%21s.dli%29s.dli%3DsetTimeout%28s.dlt%2Cs.maxDelay%29%7Delse%20s.dll%3D0%27%29%3Bs.dl%3Dfunction%28vo%29%7Bvar%20s%3Dthis%2Cd%3Dnew%20Date%3Bif%28%21vo%29vo%3Dnew%20Object%3Bs.pt%28s.vl_g%2C%27%2C%27%2C%27vo2%27%2Cvo%29%3Bvo._t%3Dd.getTime%28%29%3Bif%28%21s.dll%29s.dll%3Dnew%20Array%3Bs.dll%5Bs.dll.length%5D%3Dvo%3Bif%28%21s.maxDelay%29s.maxDelay%3D250%3Bs.dlt%28%29%7D%3Bs.t%3Dfunction%28vo%2Cid%29%7Bvar%20s%3Dthis%2Ctrk%3D1%2Ctm%3Dnew%20Date%2Csed%3DMath%26%26Math.random%3FMath.floor%28Math.random%28%29*10000000000000%29%3Atm.getTime%28%29%2Csess%3D%27s%27+Math.floor%28tm.getTime%28%29/10800000%29%2510+sed%2Cy%3Dtm.getYear%28%29%2Cvt%3Dtm.getDate%28%29+%27/%27+tm.getMonth%28%29+%27/%27+%28y%3C1900%3Fy+1900%3Ay%29+%27%20%27+tm.getHours%28%29+%27%3A%27+tm.getMinutes%28%29+%27%3A%27+tm.getSeconds%28%29+%27%20%27+tm.getDay%28%29+%27%20%27+tm.getTimezoneOffset%28%29%2Ctcf%2Ctfs%3Ds.gtfs%28%29%2Cta%3D%27%27%2Cq%3D%27%27%2Cqs%3D%27%27%2Ccode%3D%27%27%2Cvb%3Dnew%20Object%3Bs.gl%28s.vl_g%29%3Bs.uns%28%29%3Bif%28%21s.td%29%7Bvar%20tl%3Dtfs.location%2Ca%2Co%2Ci%2Cx%3D%27%27%2Cc%3D%27%27%2Cv%3D%27%27%2Cp%3D%27%27%2Cbw%3D%27%27%2Cbh%3D%27%27%2Cj%3D%271.0%27%2Ck%3Ds.c_w%28%27s_cc%27%2C%27true%27%2C0%29%3F%27Y%27%3A%27N%27%2Chp%3D%27%27%2Cct%3D%27%27%2Cpn%3D0%2Cps%3Bif%28String%26%26String.prototype%29%7Bj%3D%271.1%27%3Bif%28j.match%29%7Bj%3D%271.2%27%3Bif%28tm.setUTCDate%29%7Bj%3D%271.3%27%3Bif%28s.isie%26%26s.ismac%26%26s.apv%3E%3D5%29j%3D%271.4%27%3Bif%28pn.toPrecision%29%7Bj%3D%271.5%27%3Ba%3Dnew%20Array%3Bif%28a.forEach%29%7Bj%3D%271.6%27%3Bi%3D0%3Bo%3Dnew%20Object%3Btcf%3Dnew%20Function%28%27o%27%2C%27var%20e%2Ci%3D0%3Btry%7Bi%3Dnew%20Iterator%28o%29%7Dcatch%28e%29%7B%7Dreturn%20i%27%29%3Bi%3Dtcf%28o%29%3Bif%28i%26%26i.next%29j%3D%271.7%27%7D%7D%7D%7D%7Dif%28s.apv%3E%3D4%29x%3Dscreen.width+%27x%27+screen.height%3Bif%28s.isns%7C%7Cs.isopera%29%7Bif%28s.apv%3E%3D3%29%7Bv%3Ds.n.javaEnabled%28%29%3F%27Y%27%3A%27N%27%3Bif%28s.apv%3E%3D4%29%7Bc%3Dscreen.pixelDepth%3Bbw%3Ds.wd.innerWidth%3Bbh%3Ds.wd.innerHeight%7D%7Ds.pl%3Ds.n.plugins%7Delse%20if%28s.isie%29%7Bif%28s.apv%3E%3D4%29%7Bv%3Ds.n.javaEnabled%28%29%3F%27Y%27%3A%27N%27%3Bc%3Dscreen.colorDepth%3Bif%28s.apv%3E%3D5%29%7Bbw%3Ds.d.documentElement.offsetWidth%3Bbh%3Ds.d.documentElement.offsetHeight%3Bif%28%21s.ismac%26%26s.b%29%7Btcf%3Dnew%20Function%28%27s%27%2C%27tl%27%2C%27var%20e%2Chp%3D0%3Btry%7Bs.b.addBehavior%28%22%23default%23homePage%22%29%3Bhp%3Ds.b.isHomePage%28tl%29%3F%22Y%22%3A%22N%22%7Dcatch%28e%29%7B%7Dreturn%20hp%27%29%3Bhp%3Dtcf%28s%2Ctl%29%3Btcf%3Dnew%20Function%28%27s%27%2C%27var%20e%2Cct%3D0%3Btry%7Bs.b.addBehavior%28%22%23default%23clientCaps%22%29%3Bct%3Ds.b.connectionType%7Dcatch%28e%29%7B%7Dreturn%20ct%27%29%3Bct%3Dtcf%28s%29%7D%7D%7Delse%20r%3D%27%27%7Dif%28s.pl%29while%28pn%3Cs.pl.length%26%26pn%3C30%29%7Bps%3Ds.fl%28s.pl%5Bpn%5D.name%2C100%29+%27%3B%27%3Bif%28p.indexOf%28ps%29%3C0%29p+%3Dps%3Bpn++%7Ds.resolution%3Dx%3Bs.colorDepth%3Dc%3Bs.javascriptVersion%3Dj%3Bs.javaEnabled%3Dv%3Bs.cookiesEnabled%3Dk%3Bs.browserWidth%3Dbw%3Bs.browserHeight%3Dbh%3Bs.connectionType%3Dct%3Bs.homepage%3Dhp%3Bs.plugins%3Dp%3Bs.td%3D1%7Dif%28vo%29%7Bs.pt%28s.vl_g%2C%27%2C%27%2C%27vo2%27%2Cvb%29%3Bs.pt%28s.vl_g%2C%27%2C%27%2C%27vo1%27%2Cvo%29%7Dif%28s.usePlugins%29s.doPlugins%28s%29%3Bvar%20l%3Ds.wd.location%2Cr%3Dtfs.document.referrer%3Bif%28%21s.pageURL%29s.pageURL%3Dl.href%3Fl.href%3Al%3Bif%28%21s.referrer%26%26%21s._1_referrer%29%7Bs.referrer%3Dr%3Bs._1_referrer%3D1%7Ds.m_m%28%27g%27%29%3Bif%28%28vo%26%26vo._t%29%7C%7C%21s.m_m%28%27d%27%29%29%7Bif%28s.lnk%7C%7Cs.eo%29%7Bvar%20o%3Ds.eo%3Fs.eo%3As.lnk%3Bif%28%21o%29return%20%27%27%3Bvar%20p%3Ds.gv%28%27pageName%27%29%2Cw%3D1%2Ct%3Ds.ot%28o%29%2Cn%3Ds.oid%28o%29%2Cx%3Do.s_oidt%2Ch%2Cl%2Ci%2Coc%3Bif%28s.eo%26%26o%3D%3Ds.eo%29%7Bwhile%28o%26%26%21n%26%26t%21%3D%27BODY%27%29%7Bo%3Do.parentElement%3Fo.parentElement%3Ao.parentNode%3Bif%28%21o%29return%20%27%27%3Bt%3Ds.ot%28o%29%3Bn%3Ds.oid%28o%29%3Bx%3Do.s_oidt%7Doc%3Do.onclick%3F%27%27+o.onclick%3A%27%27%3Bif%28%28oc.indexOf%28%22s_gs%28%22%29%3E%3D0%26%26oc.indexOf%28%22.s_oc%28%22%29%3C0%29%7C%7Coc.indexOf%28%22.tl%28%22%29%3E%3D0%29return%20%27%27%7Dta%3Dn%3Fo.target%3A1%3Bh%3Ds.oh%28o%29%3Bi%3Dh.indexOf%28%27%3F%27%29%3Bh%3Ds.linkLeaveQueryString%7C%7Ci%3C0%3Fh%3Ah.substring%280%2Ci%29%3Bl%3Ds.linkName%3Fs.linkName%3As.ln%28h%29%3Bt%3Ds.linkType%3Fs.linkType.toLowerCase%28%29%3As.lt%28h%29%3Bif%28t%26%26%28h%7C%7Cl%29%29q+%3D%27%26pe%3Dlnk_%27+%28t%3D%3D%27d%27%7C%7Ct%3D%3D%27e%27%3Fs.ape%28t%29%3A%27o%27%29+%28h%3F%27%26pev1%3D%27+s.ape%28h%29%3A%27%27%29+%28l%3F%27%26pev2%3D%27+s.ape%28l%29%3A%27%27%29%3Belse%20trk%3D0%3Bif%28s.trackInlineStats%29%7Bif%28%21p%29%7Bp%3Ds.gv%28%27pageURL%27%29%3Bw%3D0%7Dt%3Ds.ot%28o%29%3Bi%3Do.sourceIndex%3Bif%28s.gg%28%27objectID%27%29%29%7Bn%3Ds.gg%28%27objectID%27%29%3Bx%3D1%3Bi%3D1%7Dif%28p%26%26n%26%26t%29qs%3D%27%26pid%3D%27+s.ape%28s.fl%28p%2C255%29%29+%28w%3F%27%26pidt%3D%27+w%3A%27%27%29+%27%26oid%3D%27+s.ape%28s.fl%28n%2C100%29%29+%28x%3F%27%26oidt%3D%27+x%3A%27%27%29+%27%26ot%3D%27+s.ape%28t%29+%28i%3F%27%26oi%3D%27+i%3A%27%27%29%7D%7Dif%28%21trk%26%26%21qs%29return%20%27%27%3Bs.sampled%3Ds.vs%28sed%29%3Bif%28trk%29%7Bif%28s.sampled%29code%3Ds.mr%28sess%2C%28vt%3F%27%26t%3D%27+s.ape%28vt%29%3A%27%27%29+s.hav%28%29+q+%28qs%3Fqs%3As.rq%28s.un%29%29%2C0%2Cid%2Cta%29%3Bqs%3D%27%27%3Bs.m_m%28%27t%27%29%3Bif%28s.p_r%29s.p_r%28%29%3Bs.referrer%3D%27%27%7Ds.sq%28qs%29%3B%7Delse%7Bs.dl%28vo%29%3B%7Dif%28vo%29s.pt%28s.vl_g%2C%27%2C%27%2C%27vo1%27%2Cvb%29%3Bs.lnk%3Ds.eo%3Ds.linkName%3Ds.linkType%3Ds.wd.s_objectID%3Ds.ppu%3Ds.pe%3Ds.pev1%3Ds.pev2%3Ds.pev3%3D%27%27%3Bif%28s.pg%29s.wd.s_lnk%3Ds.wd.s_eo%3Ds.wd.s_linkName%3Ds.wd.s_linkType%3D%27%27%3Bif%28%21id%26%26%21s.tc%29%7Bs.tc%3D1%3Bs.flushBufferedRequests%28%29%7Dreturn%20code%7D%3Bs.tl%3Dfunction%28o%2Ct%2Cn%2Cvo%29%7Bvar%20s%3Dthis%3Bs.lnk%3Ds.co%28o%29%3Bs.linkType%3Dt%3Bs.linkName%3Dn%3Bs.t%28vo%29%7D%3Bif%28pg%29%7Bs.wd.s_co%3Dfunction%28o%29%7Bvar%20s%3Ds_gi%28%22_%22%2C1%2C1%29%3Breturn%20s.co%28o%29%7D%3Bs.wd.s_gs%3Dfunction%28un%29%7Bvar%20s%3Ds_gi%28un%2C1%2C1%29%3Breturn%20s.t%28%29%7D%3Bs.wd.s_dc%3Dfunction%28un%29%7Bvar%20s%3Ds_gi%28un%2C1%29%3Breturn%20s.t%28%29%7D%7Ds.ssl%3D%28s.wd.location.protocol.toLowerCase%28%29.indexOf%28%27https%27%29%3E%3D0%29%3Bs.d%3Ddocument%3Bs.b%3Ds.d.body%3Bif%28s.d.getElementsByTagName%29%7Bs.h%3Ds.d.getElementsByTagName%28%27HEAD%27%29%3Bif%28s.h%29s.h%3Ds.h%5B0%5D%7Ds.n%3Dnavigator%3Bs.u%3Ds.n.userAgent%3Bs.ns6%3Ds.u.indexOf%28%27Netscape6/%27%29%3Bvar%20apn%3Ds.n.appName%2Cv%3Ds.n.appVersion%2Cie%3Dv.indexOf%28%27MSIE%20%27%29%2Co%3Ds.u.indexOf%28%27Opera%20%27%29%2Ci%3Bif%28v.indexOf%28%27Opera%27%29%3E%3D0%7C%7Co%3E0%29apn%3D%27Opera%27%3Bs.isie%3D%28apn%3D%3D%27Microsoft%20Internet%20Explorer%27%29%3Bs.isns%3D%28apn%3D%3D%27Netscape%27%29%3Bs.isopera%3D%28apn%3D%3D%27Opera%27%29%3Bs.ismac%3D%28s.u.indexOf%28%27Mac%27%29%3E%3D0%29%3Bif%28o%3E0%29s.apv%3DparseFloat%28s.u.substring%28o+6%29%29%3Belse%20if%28ie%3E0%29%7Bs.apv%3DparseInt%28i%3Dv.substring%28ie+5%29%29%3Bif%28s.apv%3E3%29s.apv%3DparseFloat%28i%29%7Delse%20if%28s.ns6%3E0%29s.apv%3DparseFloat%28s.u.substring%28s.ns6+10%29%29%3Belse%20s.apv%3DparseFloat%28v%29%3Bs.em%3D0%3Bif%28String.fromCharCode%29%7Bi%3Descape%28String.fromCharCode%28256%29%29.toUpperCase%28%29%3Bs.em%3D%28i%3D%3D%27%25C4%2580%27%3F2%3A%28i%3D%3D%27%25U0100%27%3F1%3A0%29%29%7Ds.sa%28un%29%3Bs.vl_l%3D%27dynamicVariablePrefix%2CvisitorID%2Cvmk%2CvisitorMigrationKey%2CvisitorMigrationServer%2CvisitorMigrationServerSecure%2Cppu%2CcharSet%2CvisitorNamespace%2CcookieDomainPeriods%2CcookieLifetime%2CpageName%2CpageURL%2Creferrer%2CcurrencyCode%27%3Bs.vl_t%3Ds.vl_l+%27%2CvariableProvider%2Cchannel%2Cserver%2CpageType%2CtransactionID%2CpurchaseID%2Ccampaign%2Cstate%2Czip%2Cevents%2Cproducts%2ClinkName%2ClinkType%27%3Bfor%28var%20n%3D1%3Bn%3C51%3Bn++%29s.vl_t+%3D%27%2Cprop%27+n+%27%2CeVar%27+n+%27%2Chier%27+n+%27%2Clist%27+n%3Bs.vl_l2%3D%27%2Ctnt%2Cpe%2Cpev1%2Cpev2%2Cpev3%2Cresolution%2CcolorDepth%2CjavascriptVersion%2CjavaEnabled%2CcookiesEnabled%2CbrowserWidth%2CbrowserHeight%2CconnectionType%2Chomepage%2Cplugins%27%3Bs.vl_t+%3Ds.vl_l2%3Bs.vl_g%3Ds.vl_t+%27%2CtrackingServer%2CtrackingServerSecure%2CtrackingServerBase%2CfpCookieDomainPeriods%2CdisableBufferedRequests%2Cmobile%2CvisitorSampling%2CvisitorSamplingGroup%2CdynamicAccountSelection%2CdynamicAccountList%2CdynamicAccountMatch%2CtrackDownloadLinks%2CtrackExternalLinks%2CtrackInlineStats%2ClinkLeaveQueryString%2ClinkDownloadFileTypes%2ClinkExternalFilters%2ClinkInternalFilters%2ClinkTrackVars%2ClinkTrackEvents%2ClinkNames%2Clnk%2Ceo%2C_1_referrer%27%3Bs.pg%3Dpg%3Bs.gl%28s.vl_g%29%3Bif%28%21ss%29s.wds%28%29");
if(p>0){p=parseInt(w=h.substring(p+5));if(p>3)p=parseFloat(w)}else p=t>0?parseFloat(n.substring(t+10)):parseFloat(h);if(p>=5&&h.indexOf("Opera")<0&&n.indexOf("Opera")<0){g.s_c=new Function("un","pg","ss","var s=this;"+f);return new s_c(c,d,b)}else x=new Function("un","pg","ss","var s=new Object;"+s_ft(f)+";return s");return x(c,d,b)}s_account="tuifly-"+s2.tuifly.util.Environment.get().getEnv()+"-en";s=a(s_account);window.s_gi=a;s_extraEvents="";qstring=location.search+"";if(qstring.indexOf("loginEvent=1")!=
-1)s_extraEvents=",event3";else if(qstring.indexOf("logoutEvent=1")!=-1)s_extraEvents=",event4";if(location.pathname.match(/^\/\w\w\/(index\.html)?$/))s_extraEvents+=",event66";s_trackEvent=function(c,d,b){s2.Logger.debug("Tracking event "+c+"...");var f=a(s_account);f.linkTrackVars="events";f.linkTrackEvents=c;f.events=c;f.tl(d,"o",b);s2.Logger.debug("...done")};s_trackAirBerlin=function(c,d,b,f,g,h,n,p){var t=a(s_account);t.linkTrackVars="prop35";t.prop35=c+","+d+","+b+","+f+","+g+","+n+","+h+","+
p;t.tl($(".bookingButton").get(0),"o","")};s.charSet="UTF-8";s.currencyCode="EUR";s.trackDownloadLinks=true;s.trackExternalLinks=true;s.trackInlineStats=true;s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,pdf,doc,docx,xls,xlsx,ppt,pptx";s.linkInternalFilters="javascript:,tuifly.com,"+window.location.host;s.linkLeaveQueryString=false;s.linkTrackVars="None";s.linkTrackEvents="None";s.formList="";s.trackFormList=false;s.trackPageName=true;s.useCommerce=false;s.varUsed="prop30";s.eventList=
"";s.usePlugins=true;s.doPlugins=function(c){c.server="en";c.events=c.apl(c.events,"event1",",",1);c.prop31=c.getNewRepeat();c.prop32=c.getDaysSinceLastVisit();var d=c.getQueryParam("AD");if(d!=null&&d!=""){c.campaign=d;d=c.getQueryParam("ATT");if(d!=null&&d!="")c.campaign+="-"+d}else{d=c.getQueryParam("zanpid");var b=c.getQueryParam("tduid");if(d!=null&&d!="")c.campaign="ZNX";else if(b!=null&&b!="")c.campaign="TDR"}c.campaign=c.getValOnce(c.campaign,"sc_cmp",0);d=c.getQueryParam("scte");if(d!=null&&
d!="")c.eVar1=d;d=c.getQueryParam("HBX_OU");if(d!=null&&d!=""){b=c.getQueryParam("HBX_PK");if(b!=null&&b!=""){c.prop27=d;c.eVar27=d;c.prop28=b;c.eVar28=b}}};s.getValOnce=new Function("v","c","e","var s=this,v=v?v:'',k=s.c_r(c),a=new Date,e=e?e:0;if(v){a.setTime(a.getTime()+e*86400000);s.c_w(c,v,e?a:0);}return v==k?'':v");s.getQueryParam=new Function("p","d","u","var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.location);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0?p.length:i;t=s.p_gpv(p.substring(0,i),u+'');if(t){t=t.indexOf('#')>-1?t.substring(0,t.indexOf('#')):t;}if(t)v+=v?d+t:t;p=p.substring(i==p.length?i:i+1)}return v");
s.p_gpv=new Function("k","u","var s=this,v='',i=u.indexOf('?'),q;if(k&&i>-1){q=u.substring(i+1);v=s.pt(q,'&','p_gvf',k)}return v");s.p_gvf=new Function("t","k","if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'True':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s.epa(v)}return ''");s.setupFormAnalysis=new Function("var s=this;if(!s.fa){s.fa=new Object;var f=s.fa;f.ol=s.wd.onload;s.wd.onload=s.faol;f.uc=s.useCommerce;f.vu=s.varUsed;f.vl=f.uc?s.eventList:'';f.tfl=s.trackFormList;f.fl=s.formList;f.va=new Array('','','','')}");
s.sendFormEvent=new Function("t","pn","fn","en","var s=this,f=s.fa;t=t=='s'?t:'e';f.va[0]=pn;f.va[1]=fn;f.va[3]=t=='s'?'Success':en;s.fasl(t);f.va[1]='';f.va[3]='';");s.faol=new Function("e","var s=s_c_il["+s._in+"],f=s.fa,r=true,fo,fn,i,en,t,tf;if(!e)e=s.wd.event;f.os=new Array;if(f.ol)r=f.ol(e);if(s.d.forms&&s.d.forms.length>0){for(i=s.d.forms.length-1;i>=0;i--){fo=s.d.forms[i];fn=fo.name;tf=f.tfl&&s.pt(f.fl,',','ee',fn)||!f.tfl&&!s.pt(f.fl,',','ee',fn);if(tf){f.os[fn]=fo.onsubmit;fo.onsubmit=s.faos;f.va[1]=fn;f.va[3]='No Data Entered';for(en=0;en<fo.elements.length;en++){el=fo.elements[en];t=el.type;if(t&&t.toUpperCase){t=t.toUpperCase();var md=el.onmousedown,kd=el.onkeydown,omd=md?md.toString():'',okd=kd?kd.toString():'';if(omd.indexOf('.fam(')<0&&okd.indexOf('.fam(')<0){el.s_famd=md;el.s_fakd=kd;el.onmousedown=s.fam;el.onkeydown=s.fam}}}}}f.ul=s.wd.onunload;s.wd.onunload=s.fasl;}return r;");
s.faos=new Function("e","var s=s_c_il["+s._in+"],f=s.fa,su;if(!e)e=s.wd.event;if(f.vu){s[f.vu]='';f.va[1]='';f.va[3]='';}su=f.os[this.name];return su?su(e):true;");s.fasl=new Function("e","var s=s_c_il["+s._in+"],f=s.fa,a=f.va,l=s.wd.location,ip=s.trackPageName,p=s.pageName;if(a[1]!=''&&a[3]!=''){a[0]=!p&&ip?l.host+l.pathname:a[0]?a[0]:p;if(!f.uc&&a[3]!='No Data Entered'){if(e=='e')a[2]='Error';else if(e=='s')a[2]='Success';else a[2]='Abandon'}else a[2]='';var tp=ip?a[0]+':':'',t3=e!='s'?':('+a[3]+')':'',ym=!f.uc&&a[3]!='No Data Entered'?tp+a[1]+':'+a[2]+t3:tp+a[1]+t3,ltv=s.linkTrackVars,lte=s.linkTrackEvents,up=s.usePlugins;if(f.uc){s.linkTrackVars=ltv=='None'?f.vu+',events':ltv+',events,'+f.vu;s.linkTrackEvents=lte=='None'?f.vl:lte+','+f.vl;f.cnt=-1;if(e=='e')s.events=s.pt(f.vl,',','fage',2);else if(e=='s')s.events=s.pt(f.vl,',','fage',1);else s.events=s.pt(f.vl,',','fage',0)}else{s.linkTrackVars=ltv=='None'?f.vu:ltv+','+f.vu}s[f.vu]=ym;s.usePlugins=false;var faLink=new Object();faLink.href='#';s.tl(faLink,'o','Form Analysis');s[f.vu]='';s.usePlugins=up}return f.ul&&e!='e'&&e!='s'?f.ul(e):true;");
s.fam=new Function("e","var s=s_c_il["+s._in+"],f=s.fa;if(!e) e=s.wd.event;var o=s.trackLastChanged,et=e.type.toUpperCase(),t=this.type.toUpperCase(),fn=this.form.name,en=this.name,sc=false;if(document.layers){kp=e.which;b=e.which}else{kp=e.keyCode;b=e.button}et=et=='MOUSEDOWN'?1:et=='KEYDOWN'?2:et;if(f.ce!=en||f.cf!=fn){if(et==1&&b!=2&&'BUTTONSUBMITRESETIMAGERADIOCHECKBOXSELECT-ONEFILE'.indexOf(t)>-1){f.va[1]=fn;f.va[3]=en;sc=true}else if(et==1&&b==2&&'TEXTAREAPASSWORDFILE'.indexOf(t)>-1){f.va[1]=fn;f.va[3]=en;sc=true}else if(et==2&&kp!=9&&kp!=13){f.va[1]=fn;f.va[3]=en;sc=true}if(sc){nface=en;nfacf=fn}}if(et==1&&this.s_famd)return this.s_famd(e);if(et==2&&this.s_fakd)return this.s_fakd(e);");
s.ee=new Function("e","n","return n&&n.toLowerCase?e.toLowerCase()==n.toLowerCase():false;");s.fage=new Function("e","a","var s=this,f=s.fa,x=f.cnt;x=x?x+1:1;f.cnt=x;return x==a?e:'';");s.getTimeParting=new Function("t","z","var s=this,cy;dc=new Date('1/1/2000');if(dc.getDay()!=6||dc.getMonth()!=0){return'Data Not Available'}else{;z=parseFloat(z);var dsts=new Date(s.dstStart);var dste=new Date(s.dstEnd);fl=dste;cd=new Date();if(cd>dsts&&cd<fl){z=z+1}else{z=z};utc=cd.getTime()+(cd.getTimezoneOffset()*60000);tz=new Date(utc + (3600000*z));thisy=tz.getFullYear();var days=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];if(thisy!=s.currentYear){return'Data Not Available'}else{;thish=tz.getHours();thismin=tz.getMinutes();thisd=tz.getDay();var dow=days[thisd];var ap='AM';var dt='Weekday';var mint='00';if(thismin>30){mint='30'}if(thish>=12){ap='PM';thish=thish-12};if (thish==0){thish=12};if(thisd==6||thisd==0){dt='Weekend'};var timestring=thish+':'+mint+ap;if(t=='h'){return timestring}if(t=='d'){return dow};if(t=='w'){return dt}}};");
s.getTimeToComplete=new Function("v","cn","e","var s=this,d=new Date,x=d,k;if(!s.ttcr){e=e?e:0;if(v=='start'||v=='stop')s.ttcr=1;x.setTime(x.getTime()+e*86400000);if(v=='start'){s.c_w(cn,d.getTime(),e?x:0);return '';}if(v=='stop'){k=s.c_r(cn);if(!s.c_w(cn,'',d)||!k)return '';v=(d.getTime()-k)/1000;var td=86400,th=3600,tm=60,r=5,u,un;if(v>td){u=td;un='days';}else if(v>th){u=th;un='hours';}else if(v>tm){r=2;u=tm;un='minutes';}else{r=.2;u=1;un='seconds';}v=v*r/u;return (Math.round(v)/r)+' '+un;}}return '';");
s.getDaysSinceLastVisit=new Function("var s=this,e=new Date(),cval,ct=e.getTime(),c='s_lastvisit',day=24*60*60*1000;e.setTime(ct+3*365*day);cval=s.c_r(c);if(!cval){s.c_w(c,ct,e);return 'First page view or cookies not supported';}else{var d=ct-cval;if(d>30*60*1000){if(d>30*day){s.c_w(c,ct,e);return 'More than 30 days';}if(d<30*day+1 && d>7*day){s.c_w(c,ct,e);return 'More than 7 days';}if(d<7*day+1 && d>day){s.c_w(c,ct,e);return 'Less than 7 days';}if(d<day+1){s.c_w(c,ct,e);return 'Less than 1 day';}}else return '';}");
s.getNewRepeat=new Function("var s=this,e=new Date(),cval,ct=e.getTime(),y=e.getYear();e.setTime(ct+30*24*60*60*1000);cval=s.c_r('s_nr');if(cval.length==0){s.c_w('s_nr',ct,e);return 'New';}if(cval.length!=0&&ct-cval<30*60*1000){s.c_w('s_nr',ct,e);return 'New';}if(cval<1123916400001){e.setTime(cval+30*24*60*60*1000);s.c_w('s_nr',ct,e);return 'Repeat';}else return 'Repeat';");s.apl=new Function("L","v","d","u","var s=this,m=0;if(!L)L='';if(u){var i,n,a=s.split(L,d);for(i=0;i<a.length;i++){n=a[i];m=m||(u==1?(n==v):(n.toLowerCase()==v.toLowerCase()));}}if(!m)L=L?L+d+v:v;return L");
s.split=new Function("l","d","var i,x=0,a=new Array;while(l){i=l.indexOf(d);i=i>-1?i:l.length;a[x++]=l.substring(0,i);l=l.substring(i+d.length);}return a");s.visitorNamespace="tuifly";s.dc=122;if(self!=top&&document.referrer.indexOf("tuifly.com")==-1){s.trackingServer="www.tuifly.com";s.trackingServerSecure="www.tuifly.com"}else{s.trackingServer="sc.tuifly.com";s.trackingServerSecure="sslsc.tuifly.com"}}OmniTrack();

