var build_date="Mon May 16 14:09:05 2011";build_date="Mon May 16 14:08:57 2011";var s2KeyCode={BACKSPACE:8,TAB:9,ENTER:13,ESC:27,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40};
(function(a,c){function d(h){return o.isWindow(h)?h:h.nodeType===9?h.defaultView||h.parentWindow:false}function b(h){if(!mb[h]){var n=o("<"+h+">").appendTo("body"),q=n.css("display");n.remove();if(q==="none"||q==="")q="block";mb[h]=q}return mb[h]}function e(h,n){var q={};o.each(pb.concat.apply([],pb.slice(0,n)),function(){q[this]=h});return q}function f(){try{return new a.XMLHttpRequest}catch(h){}}function g(){o(a).unload(function(){for(var h in db)db[h](0,1)})}function m(h,n,q,u){if(o.isArray(n)&&
n.length)o.each(n,function(z,C){q||Db.test(h)?u(h,C):m(h+"["+(typeof C==="object"||o.isArray(C)?z:"")+"]",C,q,u)});else if(q||n==null||typeof n!=="object")u(h,n);else if(o.isArray(n)||o.isEmptyObject(n))u(h,"");else for(var v in n)m(h+"["+v+"]",n[v],q,u)}function p(h,n,q,u,v,z){v=v||n.dataTypes[0];z=z||{};z[v]=true;v=h[v];for(var C=0,P=v?v.length:0,N=h===nb,L;C<P&&(N||!L);C++){L=v[C](n,q,u);typeof L==="string"&&(!N||z[L]?L=c:(n.dataTypes.unshift(L),L=p(h,n,q,u,L,z)))}(N||!L)&&!z["*"]&&(L=p(h,n,q,
u,"*",z));return L}function t(h){return function(n,q){typeof n!=="string"&&(q=n,n="*");if(o.isFunction(q))for(var u=n.toLowerCase().split(qb),v=0,z=u.length,C,P;v<z;v++){C=u[v];(P=/^\+/.test(C))&&(C=C.substr(1)||"*");C=h[C]=h[C]||[];C[P?"unshift":"push"](q)}}}function y(h,n,q){var u=n==="width"?h.offsetWidth:h.offsetHeight;if(q==="border")return u;o.each(n==="width"?Eb:Fb,function(){q||(u-=parseFloat(o.css(h,"padding"+this))||0);q==="margin"?u+=parseFloat(o.css(h,"margin"+this))||0:u-=parseFloat(o.css(h,
"border"+this+"Width"))||0});return u}function A(h,n){n.src?o.ajax({url:n.src,async:false,dataType:"script"}):o.globalEval(n.text||n.textContent||n.innerHTML||"");n.parentNode&&n.parentNode.removeChild(n)}function E(h){return"getElementsByTagName"in h?h.getElementsByTagName("*"):"querySelectorAll"in h?h.querySelectorAll("*"):[]}function J(h,n){if(n.nodeType===1){var q=n.nodeName.toLowerCase();n.clearAttributes();n.mergeAttributes(h);if(q==="object")n.outerHTML=h.outerHTML;else if(q!=="input"||h.type!==
"checkbox"&&h.type!=="radio")if(q==="option")n.selected=h.defaultSelected;else{if(q==="input"||q==="textarea")n.defaultValue=h.defaultValue}else{h.checked&&(n.defaultChecked=n.checked=h.checked);n.value!==h.value&&(n.value=h.value)}n.removeAttribute(o.expando)}}function Q(h,n){if(n.nodeType===1&&o.hasData(h)){var q=o.expando,u=o.data(h),v=o.data(n,u);if(u=u[q]){var z=u.events;v=v[q]=o.extend({},u);if(z){delete v.handle;v.events={};for(var C in z){q=0;for(u=z[C].length;q<u;q++)o.event.add(n,C+(z[C][q].namespace?
".":"")+z[C][q].namespace,z[C][q],z[C][q].data)}}}}}function K(h,n,q){if(o.isFunction(n))return o.grep(h,function(v,z){return!!n.call(v,z,v)===q});if(n.nodeType)return o.grep(h,function(v){return v===n===q});if(typeof n==="string"){var u=o.grep(h,function(v){return v.nodeType===1});if(Za.test(n))return o.filter(n,u,!q);n=o.filter(n,u)}return o.grep(h,function(v){return o.inArray(v,n)>=0===q})}function H(h,n){return(h&&h!=="*"?h+".":"")+n.replace(wa,"`").replace(Va,"&")}function aa(h){var n,q,u,v,
z,C,P,N,L,Z,ka,xa=[];v=[];z=o._data(this,"events");if(h.liveFired!==this&&z&&z.live&&!h.target.disabled&&(!h.button||h.type!=="click")){h.namespace&&(ka=RegExp("(^|\\.)"+h.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)"));h.liveFired=this;var pa=z.live.slice(0);for(P=0;P<pa.length;P++){z=pa[P];z.origType.replace(Da,"")===h.type?v.push(z.selector):pa.splice(P--,1)}v=o(h.target).closest(v,h.currentTarget);N=0;for(L=v.length;N<L;N++){Z=v[N];for(P=0;P<pa.length;P++){z=pa[P];if(Z.selector===z.selector&&
(!ka||ka.test(z.namespace))&&!Z.elem.disabled){C=Z.elem;u=null;if(z.preType==="mouseenter"||z.preType==="mouseleave"){h.type=z.preType;u=o(h.relatedTarget).closest(z.selector)[0]}(!u||u!==C)&&xa.push({elem:C,handleObj:z,level:Z.level})}}}N=0;for(L=xa.length;N<L;N++){v=xa[N];if(q&&v.level>q)break;h.currentTarget=v.elem;h.data=v.handleObj.data;h.handleObj=v.handleObj;ka=v.handleObj.origHandler.apply(v.elem,arguments);if(ka===false||h.isPropagationStopped()){q=v.level;ka===false&&(n=false);if(h.isImmediatePropagationStopped())break}}return n}}
function U(h,n,q){var u=o.extend({},q[0]);u.type=h;u.originalEvent={};u.liveFired=c;o.event.handle.call(n,u);u.isDefaultPrevented()&&q[0].preventDefault()}function B(){return true}function ga(){return false}function ra(h){for(var n in h)if(n!=="toJSON")return false;return true}function da(h,n,q){if(q===c&&h.nodeType===1){q=h.getAttribute("data-"+n);if(typeof q==="string"){try{q=q==="true"?true:q==="false"?false:q==="null"?null:o.isNaN(q)?va.test(q)?o.parseJSON(q):q:parseFloat(q)}catch(u){}o.data(h,
n,q)}else q=c}return q}var I=a.document,o=function(){function h(){if(!n.isReady){try{I.documentElement.doScroll("left")}catch(D){setTimeout(h,1);return}n.ready()}}var n=function(D,R){return new n.fn.init(D,R,v)},q=a.jQuery,u=a.$,v,z=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,C=/\S/,P=/^\s+/,N=/\s+$/,L=/\d/,Z=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,ka=/^[\],:{}\s]*$/,xa=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,pa=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Aa=/(?:^|:|,)(?:\s*\[)+/g,Ja=/(webkit)[ \/]([\w.]+)/,
Ea=/(opera)(?:.*version)?[ \/]([\w.]+)/,La=/(msie) ([\w.]+)/,Pa=/(mozilla)(?:.*? rv:([\w.]+))?/,x=navigator.userAgent,F=false,V,M="then done fail isResolved isRejected promise".split(" "),O,X=Object.prototype.toString,ha=Object.prototype.hasOwnProperty,fa=Array.prototype.push,sa=Array.prototype.slice,Ia=String.prototype.trim,Ha=Array.prototype.indexOf,Ma={};n.fn=n.prototype={constructor:n,init:function(D,R,Y){var ca,oa;if(!D)return this;if(D.nodeType){this.context=this[0]=D;this.length=1;return this}if(D===
"body"&&!R&&I.body){this.context=I;this[0]=I.body;this.selector="body";this.length=1;return this}if(typeof D==="string"){ca=z.exec(D);if(!ca||!ca[1]&&R)return!R||R.jquery?(R||Y).find(D):this.constructor(R).find(D);if(ca[1]){oa=(R=R instanceof n?R[0]:R)?R.ownerDocument||R:I;(Y=Z.exec(D))?n.isPlainObject(R)?(D=[I.createElement(Y[1])],n.fn.attr.call(D,R,true)):D=[oa.createElement(Y[1])]:(Y=n.buildFragment([ca[1]],[oa]),D=(Y.cacheable?n.clone(Y.fragment):Y.fragment).childNodes);return n.merge(this,D)}if((R=
I.getElementById(ca[2]))&&R.parentNode){if(R.id!==ca[2])return Y.find(D);this.length=1;this[0]=R}this.context=I;this.selector=D;return this}if(n.isFunction(D))return Y.ready(D);D.selector!==c&&(this.selector=D.selector,this.context=D.context);return n.makeArray(D,this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return sa.call(this,0)},get:function(D){return D==null?this.toArray():D<0?this[this.length+D]:this[D]},pushStack:function(D,R,Y){var ca=this.constructor();
n.isArray(D)?fa.apply(ca,D):n.merge(ca,D);ca.prevObject=this;ca.context=this.context;R==="find"?ca.selector=this.selector+(this.selector?" ":"")+Y:R&&(ca.selector=this.selector+"."+R+"("+Y+")");return ca},each:function(D,R){return n.each(this,D,R)},ready:function(D){n.bindReady();V.done(D);return this},eq:function(D){return D===-1?this.slice(D):this.slice(D,+D+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(sa.apply(this,arguments),
"slice",sa.call(arguments).join(","))},map:function(D){return this.pushStack(n.map(this,function(R,Y){return D.call(R,Y,R)}))},end:function(){return this.prevObject||this.constructor(null)},push:fa,sort:[].sort,splice:[].splice};n.fn.init.prototype=n.fn;n.extend=n.fn.extend=function(){var D,R,Y,ca,oa,ta,ya=arguments[0]||{},Ca=1,Na=arguments.length,Sa=false;typeof ya==="boolean"&&(Sa=ya,ya=arguments[1]||{},Ca=2);typeof ya!=="object"&&!n.isFunction(ya)&&(ya={});for(Na===Ca&&(ya=this,--Ca);Ca<Na;Ca++)if((D=
arguments[Ca])!=null)for(R in D){Y=ya[R];ca=D[R];if(ya!==ca)Sa&&ca&&(n.isPlainObject(ca)||(oa=n.isArray(ca)))?(oa?(oa=false,ta=Y&&n.isArray(Y)?Y:[]):ta=Y&&n.isPlainObject(Y)?Y:{},ya[R]=n.extend(Sa,ta,ca)):ca!==c&&(ya[R]=ca)}return ya};n.extend({noConflict:function(D){a.$=u;D&&(a.jQuery=q);return n},isReady:false,readyWait:1,ready:function(D){D===true&&n.readyWait--;if(!n.readyWait||D!==true&&!n.isReady){if(!I.body)return setTimeout(n.ready,1);n.isReady=true;if(!(D!==true&&--n.readyWait>0)){V.resolveWith(I,
[n]);n.fn.trigger&&n(I).trigger("ready").unbind("ready")}}},bindReady:function(){if(!F){F=true;if(I.readyState==="complete")return setTimeout(n.ready,1);if(I.addEventListener){I.addEventListener("DOMContentLoaded",O,false);a.addEventListener("load",n.ready,false)}else if(I.attachEvent){I.attachEvent("onreadystatechange",O);a.attachEvent("onload",n.ready);var D=false;try{D=a.frameElement==null}catch(R){}I.documentElement.doScroll&&D&&h()}}},isFunction:function(D){return n.type(D)==="function"},isArray:Array.isArray||
function(D){return n.type(D)==="array"},isWindow:function(D){return D&&typeof D==="object"&&"setInterval"in D},isNaN:function(D){return D==null||!L.test(D)||isNaN(D)},type:function(D){return D==null?String(D):Ma[X.call(D)]||"object"},isPlainObject:function(D){if(!D||n.type(D)!=="object"||D.nodeType||n.isWindow(D))return false;if(D.constructor&&!ha.call(D,"constructor")&&!ha.call(D.constructor.prototype,"isPrototypeOf"))return false;for(var R in D);return R===c||ha.call(D,R)},isEmptyObject:function(D){for(var R in D)return false;
return true},error:function(D){throw D;},parseJSON:function(D){if(typeof D!=="string"||!D)return null;D=n.trim(D);if(ka.test(D.replace(xa,"@").replace(pa,"]").replace(Aa,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(D):(new Function("return "+D))();n.error("Invalid JSON: "+D)},parseXML:function(D,R,Y){a.DOMParser?(Y=new DOMParser,R=Y.parseFromString(D,"text/xml")):(R=new ActiveXObject("Microsoft.XMLDOM"),R.async="false",R.loadXML(D));Y=R.documentElement;(!Y||!Y.nodeName||Y.nodeName==="parsererror")&&
n.error("Invalid XML: "+D);return R},noop:function(){},globalEval:function(D){if(D&&C.test(D)){var R=I.head||I.getElementsByTagName("head")[0]||I.documentElement,Y=I.createElement("script");n.support.scriptEval()?Y.appendChild(I.createTextNode(D)):Y.text=D;R.insertBefore(Y,R.firstChild);R.removeChild(Y)}},nodeName:function(D,R){return D.nodeName&&D.nodeName.toUpperCase()===R.toUpperCase()},each:function(D,R,Y){var ca,oa=0,ta=D.length,ya=ta===c||n.isFunction(D);if(Y)if(ya)for(ca in D){if(R.apply(D[ca],
Y)===false)break}else for(;oa<ta;){if(R.apply(D[oa++],Y)===false)break}else if(ya)for(ca in D){if(R.call(D[ca],ca,D[ca])===false)break}else for(Y=D[0];oa<ta&&R.call(Y,oa,Y)!==false;Y=D[++oa]);return D},trim:Ia?function(D){return D==null?"":Ia.call(D)}:function(D){return D==null?"":(D+"").replace(P,"").replace(N,"")},makeArray:function(D,R){var Y=R||[];if(D!=null){var ca=n.type(D);D.length==null||ca==="string"||ca==="function"||ca==="regexp"||n.isWindow(D)?fa.call(Y,D):n.merge(Y,D)}return Y},inArray:function(D,
R){if(R.indexOf)return R.indexOf(D);for(var Y=0,ca=R.length;Y<ca;Y++)if(R[Y]===D)return Y;return-1},merge:function(D,R){var Y=D.length,ca=0;if(typeof R.length==="number")for(var oa=R.length;ca<oa;ca++)D[Y++]=R[ca];else for(;R[ca]!==c;)D[Y++]=R[ca++];D.length=Y;return D},grep:function(D,R,Y){var ca=[],oa;Y=!!Y;for(var ta=0,ya=D.length;ta<ya;ta++){oa=!!R(D[ta],ta);Y!==oa&&ca.push(D[ta])}return ca},map:function(D,R,Y){for(var ca=[],oa,ta=0,ya=D.length;ta<ya;ta++){oa=R(D[ta],ta,Y);oa!=null&&(ca[ca.length]=
oa)}return ca.concat.apply([],ca)},guid:1,proxy:function(D,R,Y){arguments.length===2&&(typeof R==="string"?(Y=D,D=Y[R],R=c):R&&!n.isFunction(R)&&(Y=R,R=c));!R&&D&&(R=function(){return D.apply(Y||this,arguments)});D&&(R.guid=D.guid=D.guid||R.guid||n.guid++);return R},access:function(D,R,Y,ca,oa,ta){var ya=D.length;if(typeof R==="object"){for(var Ca in R)n.access(D,Ca,R[Ca],ca,oa,Y);return D}if(Y!==c){ca=!ta&&ca&&n.isFunction(Y);for(Ca=0;Ca<ya;Ca++)oa(D[Ca],R,ca?Y.call(D[Ca],Ca,oa(D[Ca],R)):Y,ta);return D}return ya?
oa(D[0],R):c},now:function(){return(new Date).getTime()},_Deferred:function(){var D=[],R,Y,ca,oa={done:function(){if(!ca){var ta=arguments,ya,Ca,Na,Sa,Ta;R&&(Ta=R,R=0);ya=0;for(Ca=ta.length;ya<Ca;ya++){Na=ta[ya];Sa=n.type(Na);Sa==="array"?oa.done.apply(oa,Na):Sa==="function"&&D.push(Na)}Ta&&oa.resolveWith(Ta[0],Ta[1])}return this},resolveWith:function(ta,ya){if(!ca&&!R&&!Y){Y=1;try{for(;D[0];)D.shift().apply(ta,ya)}catch(Ca){throw Ca;}finally{R=[ta,ya];Y=0}}return this},resolve:function(){oa.resolveWith(n.isFunction(this.promise)?
this.promise():this,arguments);return this},isResolved:function(){return Y||R},cancel:function(){ca=1;D=[];return this}};return oa},Deferred:function(D){var R=n._Deferred(),Y=n._Deferred(),ca;n.extend(R,{then:function(oa,ta){R.done(oa).fail(ta);return this},fail:Y.done,rejectWith:Y.resolveWith,reject:Y.resolve,isRejected:Y.isResolved,promise:function(oa){if(oa==null){if(ca)return ca;ca=oa={}}for(var ta=M.length;ta--;)oa[M[ta]]=R[M[ta]];return oa}});R.done(Y.cancel).fail(R.cancel);delete R.cancel;
D&&D.call(R,R);return R},when:function(D){var R=arguments.length,Y=R<=1&&D&&n.isFunction(D.promise)?D:n.Deferred(),ca=Y.promise();if(R>1){for(var oa=sa.call(arguments,0),ta=R,ya=function(Ca){return function(Na){oa[Ca]=arguments.length>1?sa.call(arguments,0):Na;--ta||Y.resolveWith(ca,oa)}};R--;)(D=oa[R])&&n.isFunction(D.promise)?D.promise().then(ya(R),Y.reject):--ta;ta||Y.resolveWith(ca,oa)}else Y!==D&&Y.resolve(D);return ca},uaMatch:function(D){D=D.toLowerCase();D=Ja.exec(D)||Ea.exec(D)||La.exec(D)||
D.indexOf("compatible")<0&&Pa.exec(D)||[];return{browser:D[1]||"",version:D[2]||"0"}},sub:function(){function D(Y,ca){return new D.fn.init(Y,ca)}n.extend(true,D,this);D.superclass=this;D.fn=D.prototype=this();D.fn.constructor=D;D.subclass=this.subclass;D.fn.init=function Y(Y,ca){ca&&ca instanceof n&&!(ca instanceof D)&&(ca=D(ca));return n.fn.init.call(this,Y,ca,R)};D.fn.init.prototype=D.fn;var R=D(I);return D},browser:{}});V=n._Deferred();n.each("Boolean Number String Function Array Date RegExp Object".split(" "),
function(D,R){Ma["[object "+R+"]"]=R.toLowerCase()});x=n.uaMatch(x);x.browser&&(n.browser[x.browser]=true,n.browser.version=x.version);n.browser.webkit&&(n.browser.safari=true);Ha&&(n.inArray=function(D,R){return Ha.call(R,D)});C.test(" ")&&(P=/^[\s\xA0]+/,N=/[\s\xA0]+$/);v=n(I);I.addEventListener?O=function(){I.removeEventListener("DOMContentLoaded",O,false);n.ready()}:I.attachEvent&&(O=function(){I.readyState==="complete"&&(I.detachEvent("onreadystatechange",O),n.ready())});return n}();(function(){o.support=
{};var h=I.createElement("div");h.style.display="none";h.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var n=h.getElementsByTagName("*"),q=h.getElementsByTagName("a")[0],u=I.createElement("select"),v=u.appendChild(I.createElement("option")),z=h.getElementsByTagName("input")[0];if(n&&n.length&&q){o.support={leadingWhitespace:h.firstChild.nodeType===3,tbody:!h.getElementsByTagName("tbody").length,htmlSerialize:!!h.getElementsByTagName("link").length,
style:/red/.test(q.getAttribute("style")),hrefNormalized:q.getAttribute("href")==="/a",opacity:/^0.55$/.test(q.style.opacity),cssFloat:!!q.style.cssFloat,checkOn:z.value==="on",optSelected:v.selected,deleteExpando:true,optDisabled:false,checkClone:false,noCloneEvent:true,noCloneChecked:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};z.checked=true;o.support.noCloneChecked=z.cloneNode(true).checked;u.disabled=true;o.support.optDisabled=!v.disabled;
var C=null;o.support.scriptEval=function(){if(C===null){var N=I.documentElement,L=I.createElement("script"),Z="script"+o.now();try{L.appendChild(I.createTextNode("window."+Z+"=1;"))}catch(ka){}N.insertBefore(L,N.firstChild);a[Z]?(C=true,delete a[Z]):C=false;N.removeChild(L)}return C};try{delete h.test}catch(P){o.support.deleteExpando=false}!h.addEventListener&&h.attachEvent&&h.fireEvent&&(h.attachEvent("onclick",function N(){o.support.noCloneEvent=false;h.detachEvent("onclick",N)}),h.cloneNode(true).fireEvent("onclick"));
h=I.createElement("div");h.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";n=I.createDocumentFragment();n.appendChild(h.firstChild);o.support.checkClone=n.cloneNode(true).cloneNode(true).lastChild.checked;o(function(){var N=I.createElement("div"),L=I.getElementsByTagName("body")[0];if(L){N.style.width=N.style.paddingLeft="1px";L.appendChild(N);o.boxModel=o.support.boxModel=N.offsetWidth===2;"zoom"in N.style&&(N.style.display="inline",N.style.zoom=1,o.support.inlineBlockNeedsLayout=
N.offsetWidth===2,N.style.display="",N.innerHTML="<div style='width:4px;'></div>",o.support.shrinkWrapBlocks=N.offsetWidth!==2);N.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var Z=N.getElementsByTagName("td");o.support.reliableHiddenOffsets=Z[0].offsetHeight===0;Z[0].style.display="";Z[1].style.display="none";o.support.reliableHiddenOffsets=o.support.reliableHiddenOffsets&&Z[0].offsetHeight===0;N.innerHTML="";L.removeChild(N).style.display="none"}});
n=function(N){var L=I.createElement("div");N="on"+N;if(!L.attachEvent)return true;var Z=N in L;Z||(L.setAttribute(N,"return;"),Z=typeof L[N]==="function");return Z};o.support.submitBubbles=n("submit");o.support.changeBubbles=n("change");h=n=q=null}})();var va=/^(?:\{.*\}|\[.*\])$/;o.extend({cache:{},uuid:0,expando:"jQuery"+(o.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(h){h=h.nodeType?o.cache[h[o.expando]]:
h[o.expando];return!!h&&!ra(h)},data:function(h,n,q,u){if(o.acceptData(h)){var v=o.expando,z=typeof n==="string",C=h.nodeType,P=C?o.cache:h,N=C?h[o.expando]:h[o.expando]&&o.expando;if(!((!N||u&&N&&!P[N][v])&&z&&q===c)){N||(C?h[o.expando]=N=++o.uuid:N=o.expando);P[N]||(P[N]={},C||(P[N].toJSON=o.noop));if(typeof n==="object"||typeof n==="function")u?P[N][v]=o.extend(P[N][v],n):P[N]=o.extend(P[N],n);h=P[N];u&&(h[v]||(h[v]={}),h=h[v]);q!==c&&(h[n]=q);if(n==="events"&&!h[n])return h[v]&&h[v].events;return z?
h[n]:h}}},removeData:function(h,n,q){if(o.acceptData(h)){var u=o.expando,v=h.nodeType,z=v?o.cache:h,C=v?h[o.expando]:o.expando;if(z[C]){if(n){var P=q?z[C][u]:z[C];if(P){delete P[n];if(!ra(P))return}}if(q){delete z[C][u];if(!ra(z[C]))return}n=z[C][u];o.support.deleteExpando||z!=a?delete z[C]:z[C]=null;n?(z[C]={},v||(z[C].toJSON=o.noop),z[C][u]=n):v&&(o.support.deleteExpando?delete h[o.expando]:h.removeAttribute?h.removeAttribute(o.expando):h[o.expando]=null)}}},_data:function(h,n,q){return o.data(h,
n,q,true)},acceptData:function(h){if(h.nodeName){var n=o.noData[h.nodeName.toLowerCase()];if(n)return n!==true&&h.getAttribute("classid")===n}return true}});o.fn.extend({data:function(h,n){var q=null;if(typeof h==="undefined"){if(this.length){q=o.data(this[0]);if(this[0].nodeType===1)for(var u=this[0].attributes,v,z=0,C=u.length;z<C;z++){v=u[z].name;v.indexOf("data-")===0&&(v=v.substr(5),da(this[0],v,q[v]))}}return q}if(typeof h==="object")return this.each(function(){o.data(this,h)});var P=h.split(".");
P[1]=P[1]?"."+P[1]:"";if(n===c){q=this.triggerHandler("getData"+P[1]+"!",[P[0]]);q===c&&this.length&&(q=o.data(this[0],h),q=da(this[0],h,q));return q===c&&P[1]?this.data(P[0]):q}return this.each(function(){var N=o(this),L=[P[0],n];N.triggerHandler("setData"+P[1]+"!",L);o.data(this,h,n);N.triggerHandler("changeData"+P[1]+"!",L)})},removeData:function(h){return this.each(function(){o.removeData(this,h)})}});o.extend({queue:function(h,n,q){if(h){n=(n||"fx")+"queue";var u=o._data(h,n);if(!q)return u||
[];!u||o.isArray(q)?u=o._data(h,n,o.makeArray(q)):u.push(q);return u}},dequeue:function(h,n){n=n||"fx";var q=o.queue(h,n),u=q.shift();u==="inprogress"&&(u=q.shift());u&&(n==="fx"&&q.unshift("inprogress"),u.call(h,function(){o.dequeue(h,n)}));q.length||o.removeData(h,n+"queue",true)}});o.fn.extend({queue:function(h,n){typeof h!=="string"&&(n=h,h="fx");if(n===c)return o.queue(this[0],h);return this.each(function(){var q=o.queue(this,h,n);h==="fx"&&q[0]!=="inprogress"&&o.dequeue(this,h)})},dequeue:function(h){return this.each(function(){o.dequeue(this,
h)})},delay:function(h,n){h=o.fx?o.fx.speeds[h]||h:h;n=n||"fx";return this.queue(n,function(){var q=this;setTimeout(function(){o.dequeue(q,n)},h)})},clearQueue:function(h){return this.queue(h||"fx",[])}});var ia=/[\n\t\r]/g,w=/\s+/,G=/\r/g,S=/^(?:href|src|style)$/,W=/^(?:button|input)$/i,ja=/^(?:button|input|object|select|textarea)$/i,qa=/^a(?:rea)?$/i,Ba=/^(?:radio|checkbox)$/i;o.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};o.fn.extend({attr:function(h,n){return o.access(this,h,n,true,o.attr)},removeAttr:function(h){return this.each(function(){o.attr(this,h,"");this.nodeType===1&&this.removeAttribute(h)})},addClass:function(h){if(o.isFunction(h))return this.each(function(L){var Z=o(this);Z.addClass(h.call(this,L,Z.attr("class")))});if(h&&typeof h==="string")for(var n=(h||"").split(w),q=0,u=this.length;q<u;q++){var v=this[q];if(v.nodeType===
1)if(v.className){for(var z=" "+v.className+" ",C=v.className,P=0,N=n.length;P<N;P++)z.indexOf(" "+n[P]+" ")<0&&(C+=" "+n[P]);v.className=o.trim(C)}else v.className=h}return this},removeClass:function(h){if(o.isFunction(h))return this.each(function(N){var L=o(this);L.removeClass(h.call(this,N,L.attr("class")))});if(h&&typeof h==="string"||h===c)for(var n=(h||"").split(w),q=0,u=this.length;q<u;q++){var v=this[q];if(v.nodeType===1&&v.className)if(h){for(var z=(" "+v.className+" ").replace(ia," "),C=
0,P=n.length;C<P;C++)z=z.replace(" "+n[C]+" "," ");v.className=o.trim(z)}else v.className=""}return this},toggleClass:function(h,n){var q=typeof h,u=typeof n==="boolean";if(o.isFunction(h))return this.each(function(v){var z=o(this);z.toggleClass(h.call(this,v,z.attr("class"),n),n)});return this.each(function(){if(q==="string")for(var v,z=0,C=o(this),P=n,N=h.split(w);v=N[z++];){P=u?P:!C.hasClass(v);C[P?"addClass":"removeClass"](v)}else if(q==="undefined"||q==="boolean"){this.className&&o._data(this,
"__className__",this.className);this.className=this.className||h===false?"":o._data(this,"__className__")||""}})},hasClass:function(h){h=" "+h+" ";for(var n=0,q=this.length;n<q;n++)if((" "+this[n].className+" ").replace(ia," ").indexOf(h)>-1)return true;return false},val:function(h){if(!arguments.length){var n=this[0];if(n){if(o.nodeName(n,"option")){var q=n.attributes.value;return!q||q.specified?n.value:n.text}if(o.nodeName(n,"select")){q=n.selectedIndex;var u=[],v=n.options;n=n.type==="select-one";
if(q<0)return null;for(var z=n?q:0,C=n?q+1:v.length;z<C;z++){var P=v[z];if(P.selected&&(o.support.optDisabled?!P.disabled:P.getAttribute("disabled")===null)&&(!P.parentNode.disabled||!o.nodeName(P.parentNode,"optgroup"))){h=o(P).val();if(n)return h;u.push(h)}}if(n&&!u.length&&v.length)return o(v[q]).val();return u}if(Ba.test(n.type)&&!o.support.checkOn)return n.getAttribute("value")===null?"on":n.value;return(n.value||"").replace(G,"")}return c}var N=o.isFunction(h);return this.each(function(L){var Z=
o(this),ka=h;if(this.nodeType===1){N&&(ka=h.call(this,L,Z.val()));ka==null?ka="":typeof ka==="number"?ka+="":o.isArray(ka)&&(ka=o.map(ka,function(pa){return pa==null?"":pa+""}));if(o.isArray(ka)&&Ba.test(this.type))this.checked=o.inArray(Z.val(),ka)>=0;else if(o.nodeName(this,"select")){var xa=o.makeArray(ka);o("option",this).each(function(){this.selected=o.inArray(o(this).val(),xa)>=0});xa.length||(this.selectedIndex=-1)}else this.value=ka}})}});o.extend({attrFn:{val:true,css:true,html:true,text:true,
data:true,width:true,height:true,offset:true},attr:function(h,n,q,u){if(!h||h.nodeType===3||h.nodeType===8||h.nodeType===2)return c;if(u&&n in o.attrFn)return o(h)[n](q);u=h.nodeType!==1||!o.isXMLDoc(h);var v=q!==c;n=u&&o.props[n]||n;if(h.nodeType===1){var z=S.test(n);if((n in h||h[n]!==c)&&u&&!z){v&&(n==="type"&&W.test(h.nodeName)&&h.parentNode&&o.error("type property can't be changed"),q===null?h.nodeType===1&&h.removeAttribute(n):h[n]=q);if(o.nodeName(h,"form")&&h.getAttributeNode(n))return h.getAttributeNode(n).nodeValue;
if(n==="tabIndex")return(n=h.getAttributeNode("tabIndex"))&&n.specified?n.value:ja.test(h.nodeName)||qa.test(h.nodeName)&&h.href?0:c;return h[n]}if(!o.support.style&&u&&n==="style"){v&&(h.style.cssText=""+q);return h.style.cssText}v&&h.setAttribute(n,""+q);if(!h.attributes[n]&&h.hasAttribute&&!h.hasAttribute(n))return c;h=!o.support.hrefNormalized&&u&&z?h.getAttribute(n,2):h.getAttribute(n);return h===null?c:h}v&&(h[n]=q);return h[n]}});var Da=/\.(.*)$/,Ka=/^(?:textarea|input|select)$/i,wa=/\./g,
Va=/ /g,Ua=/[^\w\s.|`]/g,la=function(h){return h.replace(Ua,"\\$&")};o.event={add:function(h,n,q,u){if(h.nodeType!==3&&h.nodeType!==8){try{o.isWindow(h)&&h!==a&&!h.frameElement&&(h=a)}catch(v){}if(q===false)q=ga;else if(!q)return;var z,C;q.handler&&(z=q,q=z.handler);q.guid||(q.guid=o.guid++);if(C=o._data(h)){var P=C.events,N=C.handle;P||(C.events=P={});N||(C.handle=N=function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(N.elem,arguments):c});N.elem=h;n=n.split(" ");for(var L,
Z=0,ka;L=n[Z++];){C=z?o.extend({},z):{handler:q,data:u};L.indexOf(".")>-1?(ka=L.split("."),L=ka.shift(),C.namespace=ka.slice(0).sort().join(".")):(ka=[],C.namespace="");C.type=L;C.guid||(C.guid=q.guid);var xa=P[L],pa=o.event.special[L]||{};if(!xa){xa=P[L]=[];if(!pa.setup||pa.setup.call(h,u,ka,N)===false)h.addEventListener?h.addEventListener(L,N,false):h.attachEvent&&h.attachEvent("on"+L,N)}pa.add&&(pa.add.call(h,C),C.handler.guid||(C.handler.guid=q.guid));xa.push(C);o.event.global[L]=true}h=null}}},
global:{},remove:function(h,n,q,u){if(h.nodeType!==3&&h.nodeType!==8){q===false&&(q=ga);var v,z,C=0,P,N,L,Z,ka,xa,pa=o.hasData(h)&&o._data(h),Aa=pa&&pa.events;if(pa&&Aa){n&&n.type&&(q=n.handler,n=n.type);if(!n||typeof n==="string"&&n.charAt(0)==="."){n=n||"";for(v in Aa)o.event.remove(h,v+n)}else{for(n=n.split(" ");v=n[C++];){Z=v;P=v.indexOf(".")<0;N=[];P||(N=v.split("."),v=N.shift(),L=RegExp("(^|\\.)"+o.map(N.slice(0).sort(),la).join("\\.(?:.*\\.)?")+"(\\.|$)"));if(ka=Aa[v])if(q){Z=o.event.special[v]||
{};for(z=u||0;z<ka.length;z++){xa=ka[z];if(q.guid===xa.guid){if(P||L.test(xa.namespace)){u==null&&ka.splice(z--,1);Z.remove&&Z.remove.call(h,xa)}if(u!=null)break}}if(ka.length===0||u!=null&&ka.length===1){(!Z.teardown||Z.teardown.call(h,N)===false)&&o.removeEvent(h,v,pa.handle);delete Aa[v]}}else for(z=0;z<ka.length;z++){xa=ka[z];if(P||L.test(xa.namespace)){o.event.remove(h,Z,xa.handler,z);ka.splice(z--,1)}}}if(o.isEmptyObject(Aa)){(n=pa.handle)&&(n.elem=null);delete pa.events;delete pa.handle;o.isEmptyObject(pa)&&
o.removeData(h,c,true)}}}}},trigger:function(h,n,q,u){var v=h.type||h;if(!u){h=typeof h==="object"?h[o.expando]?h:o.extend(o.Event(v),h):o.Event(v);v.indexOf("!")>=0&&(h.type=v=v.slice(0,-1),h.exclusive=true);q||(h.stopPropagation(),o.event.global[v]&&o.each(o.cache,function(){var ka=this[o.expando];ka&&ka.events&&ka.events[v]&&o.event.trigger(h,n,ka.handle.elem)}));if(!q||q.nodeType===3||q.nodeType===8)return c;h.result=c;h.target=q;n=o.makeArray(n);n.unshift(h)}h.currentTarget=q;(u=o._data(q,"handle"))&&
u.apply(q,n);u=q.parentNode||q.ownerDocument;try{q&&q.nodeName&&o.noData[q.nodeName.toLowerCase()]||q["on"+v]&&q["on"+v].apply(q,n)===false&&(h.result=false,h.preventDefault())}catch(z){}if(!h.isPropagationStopped()&&u)o.event.trigger(h,n,u,true);else if(!h.isDefaultPrevented()){var C;u=h.target;var P=v.replace(Da,""),N=o.nodeName(u,"a")&&P==="click",L=o.event.special[P]||{};if((!L._default||L._default.call(q,h)===false)&&!N&&!(u&&u.nodeName&&o.noData[u.nodeName.toLowerCase()])){try{u[P]&&(C=u["on"+
P],C&&(u["on"+P]=null),o.event.triggered=true,u[P]())}catch(Z){}C&&(u["on"+P]=C);o.event.triggered=false}}},handle:function(h){var n,q,u,v;v=[];var z=o.makeArray(arguments);h=z[0]=o.event.fix(h||a.event);h.currentTarget=this;(n=h.type.indexOf(".")<0&&!h.exclusive)||(q=h.type.split("."),h.type=q.shift(),v=q.slice(0).sort(),u=RegExp("(^|\\.)"+v.join("\\.(?:.*\\.)?")+"(\\.|$)"));h.namespace=h.namespace||v.join(".");v=o._data(this,"events");q=(v||{})[h.type];if(v&&q){q=q.slice(0);v=0;for(var C=q.length;v<
C;v++){var P=q[v];if(n||u.test(P.namespace)){h.handler=P.handler;h.data=P.data;h.handleObj=P;P=P.handler.apply(this,z);P!==c&&(h.result=P,P===false&&(h.preventDefault(),h.stopPropagation()));if(h.isImmediatePropagationStopped())break}}}return h.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(h){if(h[o.expando])return h;var n=h;h=o.Event(n);for(var q=this.props.length,u;q;){u=this.props[--q];h[u]=n[u]}h.target||(h.target=h.srcElement||I);h.target.nodeType===3&&(h.target=h.target.parentNode);!h.relatedTarget&&h.fromElement&&(h.relatedTarget=h.fromElement===h.target?h.toElement:h.fromElement);if(h.pageX==null&&h.clientX!=null){n=I.documentElement;q=I.body;h.pageX=h.clientX+(n&&n.scrollLeft||q&&q.scrollLeft||0)-(n&&n.clientLeft||q&&q.clientLeft||0);h.pageY=h.clientY+(n&&n.scrollTop||
q&&q.scrollTop||0)-(n&&n.clientTop||q&&q.clientTop||0)}h.which==null&&(h.charCode!=null||h.keyCode!=null)&&(h.which=h.charCode!=null?h.charCode:h.keyCode);!h.metaKey&&h.ctrlKey&&(h.metaKey=h.ctrlKey);!h.which&&h.button!==c&&(h.which=h.button&1?1:h.button&2?3:h.button&4?2:0);return h},guid:1E8,proxy:o.proxy,special:{ready:{setup:o.bindReady,teardown:o.noop},live:{add:function(h){o.event.add(this,H(h.origType,h.selector),o.extend({},h,{handler:aa,guid:h.handler.guid}))},remove:function(h){o.event.remove(this,
H(h.origType,h.selector),h)}},beforeunload:{setup:function(h,n,q){o.isWindow(this)&&(this.onbeforeunload=q)},teardown:function(h,n){this.onbeforeunload===n&&(this.onbeforeunload=null)}}}};o.removeEvent=I.removeEventListener?function(h,n,q){h.removeEventListener&&h.removeEventListener(n,q,false)}:function(h,n,q){h.detachEvent&&h.detachEvent("on"+n,q)};o.Event=function(h){if(!this.preventDefault)return new o.Event(h);h&&h.type?(this.originalEvent=h,this.type=h.type,this.isDefaultPrevented=h.defaultPrevented||
h.returnValue===false||h.getPreventDefault&&h.getPreventDefault()?B:ga):this.type=h;this.timeStamp=o.now();this[o.expando]=true};o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=B;var h=this.originalEvent;h&&(h.preventDefault?h.preventDefault():h.returnValue=false)},stopPropagation:function(){this.isPropagationStopped=B;var h=this.originalEvent;h&&(h.stopPropagation&&h.stopPropagation(),h.cancelBubble=true)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=
B;this.stopPropagation()},isDefaultPrevented:ga,isPropagationStopped:ga,isImmediatePropagationStopped:ga};var T=function(h){var n=h.relatedTarget;try{if(!(n!==I&&!n.parentNode)){for(;n&&n!==this;)n=n.parentNode;n!==this&&(h.type=h.data,o.event.handle.apply(this,arguments))}}catch(q){}},ba=function(h){h.type=h.data;o.event.handle.apply(this,arguments)};o.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(h,n){o.event.special[h]={setup:function(q){o.event.add(this,n,q&&q.selector?ba:T,h)},
teardown:function(q){o.event.remove(this,n,q&&q.selector?ba:T)}}});o.support.submitBubbles||(o.event.special.submit={setup:function(){if(this.nodeName&&this.nodeName.toLowerCase()!=="form"){o.event.add(this,"click.specialSubmit",function(h){var n=h.target,q=n.type;(q==="submit"||q==="image")&&o(n).closest("form").length&&U("submit",this,arguments)});o.event.add(this,"keypress.specialSubmit",function(h){var n=h.target,q=n.type;(q==="text"||q==="password")&&o(n).closest("form").length&&h.keyCode===
13&&U("submit",this,arguments)})}else return false},teardown:function(){o.event.remove(this,".specialSubmit")}});if(!o.support.changeBubbles){var ea,ma=function(h){var n=h.type,q=h.value;n==="radio"||n==="checkbox"?q=h.checked:n==="select-multiple"?q=h.selectedIndex>-1?o.map(h.options,function(u){return u.selected}).join("-"):"":h.nodeName.toLowerCase()==="select"&&(q=h.selectedIndex);return q},na=function(h,n){var q=h.target,u,v;if(Ka.test(q.nodeName)&&!q.readOnly){u=o._data(q,"_change_data");v=
ma(q);(h.type!=="focusout"||q.type!=="radio")&&o._data(q,"_change_data",v);if(!(u===c||v===u))if(u!=null||v){h.type="change";h.liveFired=c;o.event.trigger(h,n,q)}}};o.event.special.change={filters:{focusout:na,beforedeactivate:na,click:function(h){var n=h.target,q=n.type;(q==="radio"||q==="checkbox"||n.nodeName.toLowerCase()==="select")&&na.call(this,h)},keydown:function(h){var n=h.target,q=n.type;(h.keyCode===13&&n.nodeName.toLowerCase()!=="textarea"||h.keyCode===32&&(q==="checkbox"||q==="radio")||
q==="select-multiple")&&na.call(this,h)},beforeactivate:function(h){h=h.target;o._data(h,"_change_data",ma(h))}},setup:function(){if(this.type==="file")return false;for(var h in ea)o.event.add(this,h+".specialChange",ea[h]);return Ka.test(this.nodeName)},teardown:function(){o.event.remove(this,".specialChange");return Ka.test(this.nodeName)}};ea=o.event.special.change.filters;ea.focus=ea.beforeactivate}I.addEventListener&&o.each({focus:"focusin",blur:"focusout"},function(h,n){function q(u){u=o.event.fix(u);
u.type=n;return o.event.handle.call(this,u)}o.event.special[n]={setup:function(){this.addEventListener(h,q,true)},teardown:function(){this.removeEventListener(h,q,true)}}});o.each(["bind","one"],function(h,n){o.fn[n]=function(q,u,v){if(typeof q==="object"){for(var z in q)this[n](z,u,q[z],v);return this}if(o.isFunction(u)||u===false){v=u;u=c}var C=n==="one"?o.proxy(v,function(N){o(this).unbind(N,C);return v.apply(this,arguments)}):v;if(q==="unload"&&n!=="one")this.one(q,u,v);else{z=0;for(var P=this.length;z<
P;z++)o.event.add(this[z],q,C,u)}return this}});o.fn.extend({unbind:function(h,n){if(typeof h!=="object"||h.preventDefault)for(var q=0,u=this.length;q<u;q++)o.event.remove(this[q],h,n);else for(q in h)this.unbind(q,h[q]);return this},delegate:function(h,n,q,u){return this.live(n,q,u,h)},undelegate:function(h,n,q){return arguments.length===0?this.unbind("live"):this.die(n,null,q,h)},trigger:function(h,n){return this.each(function(){o.event.trigger(h,n,this)})},triggerHandler:function(h,n){if(this[0]){var q=
o.Event(h);q.preventDefault();q.stopPropagation();o.event.trigger(q,n,this[0]);return q.result}},toggle:function(h){for(var n=arguments,q=1;q<n.length;)o.proxy(h,n[q++]);return this.click(o.proxy(h,function(u){var v=(o._data(this,"lastToggle"+h.guid)||0)%q;o._data(this,"lastToggle"+h.guid,v+1);u.preventDefault();return n[v].apply(this,arguments)||false}))},hover:function(h,n){return this.mouseenter(h).mouseleave(n||h)}});var za={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};
o.each(["live","die"],function(h,n){o.fn[n]=function(q,u,v,z){var C,P=0,N,L,Z=z||this.selector;z=z?this:o(this.context);if(typeof q==="object"&&!q.preventDefault){for(C in q)z[n](C,u,q[C],Z);return this}o.isFunction(u)&&(v=u,u=c);for(q=(q||"").split(" ");(C=q[P++])!=null;){N=Da.exec(C);L="";N&&(L=N[0],C=C.replace(Da,""));if(C==="hover")q.push("mouseenter"+L,"mouseleave"+L);else{N=C;C==="focus"||C==="blur"?(q.push(za[C]+L),C+=L):C=(za[C]||C)+L;if(n==="live"){L=0;for(var ka=z.length;L<ka;L++)o.event.add(z[L],
"live."+H(C,Z),{data:u,selector:Z,handler:v,origType:C,origHandler:v,preType:N})}else z.unbind("live."+H(C,Z),v)}}return this}});o.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(h,n){o.fn[n]=function(q,u){u==null&&(u=q,q=null);return arguments.length>0?this.bind(n,q,u):this.trigger(n)};o.attrFn&&(o.attrFn[n]=true)});(function(){function h(x,
F,V,M,O,X){O=0;for(var ha=M.length;O<ha;O++){var fa=M[O];if(fa){var sa=false;for(fa=fa[x];fa;){if(fa.sizcache===V){sa=M[fa.sizset];break}if(fa.nodeType===1){X||(fa.sizcache=V,fa.sizset=O);if(typeof F!=="string"){if(fa===F){sa=true;break}}else if(L.filter(F,[fa]).length>0){sa=fa;break}}fa=fa[x]}M[O]=sa}}}function n(x,F,V,M,O,X){O=0;for(var ha=M.length;O<ha;O++){var fa=M[O];if(fa){var sa=false;for(fa=fa[x];fa;){if(fa.sizcache===V){sa=M[fa.sizset];break}fa.nodeType===1&&!X&&(fa.sizcache=V,fa.sizset=
O);if(fa.nodeName.toLowerCase()===F){sa=fa;break}fa=fa[x]}M[O]=sa}}}var q=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,u=0,v=Object.prototype.toString,z=false,C=true,P=/\\/g,N=/\W/;[0,0].sort(function(){C=false;return 0});var L=function(x,F,V,M){V=V||[];var O=F=F||I;if(F.nodeType!==1&&F.nodeType!==9)return[];if(!x||typeof x!=="string")return V;var X,ha,fa,sa,Ia,Ha,Ma=true,D=L.isXML(F),R=[],Y=x;do{q.exec("");if(X=
q.exec(Y)){Y=X[3];R.push(X[1]);if(X[2]){sa=X[3];break}}}while(X);if(R.length>1&&ka.exec(x))if(R.length===2&&Z.relative[R[0]])ha=Pa(R[0]+R[1],F);else for(ha=Z.relative[R[0]]?[F]:L(R.shift(),F);R.length;){x=R.shift();Z.relative[x]&&(x+=R.shift());ha=Pa(x,ha)}else{!M&&R.length>1&&F.nodeType===9&&!D&&Z.match.ID.test(R[0])&&!Z.match.ID.test(R[R.length-1])&&(Ia=L.find(R.shift(),F,D),F=Ia.expr?L.filter(Ia.expr,Ia.set)[0]:Ia.set[0]);if(F){Ia=M?{expr:R.pop(),set:Aa(M)}:L.find(R.pop(),R.length===1&&(R[0]===
"~"||R[0]==="+")&&F.parentNode?F.parentNode:F,D);ha=Ia.expr?L.filter(Ia.expr,Ia.set):Ia.set;for(R.length>0?fa=Aa(ha):Ma=false;R.length;){X=Ha=R.pop();Z.relative[Ha]?X=R.pop():Ha="";X==null&&(X=F);Z.relative[Ha](fa,X,D)}}else fa=[]}fa||(fa=ha);fa||L.error(Ha||x);if(v.call(fa)==="[object Array]")if(Ma)if(F&&F.nodeType===1)for(x=0;fa[x]!=null;x++)fa[x]&&(fa[x]===true||fa[x].nodeType===1&&L.contains(F,fa[x]))&&V.push(ha[x]);else for(x=0;fa[x]!=null;x++)fa[x]&&fa[x].nodeType===1&&V.push(ha[x]);else V.push.apply(V,
fa);else Aa(fa,V);sa&&(L(sa,O,V,M),L.uniqueSort(V));return V};L.uniqueSort=function(x){if(Ea){z=C;x.sort(Ea);if(z)for(var F=1;F<x.length;F++)x[F]===x[F-1]&&x.splice(F--,1)}return x};L.matches=function(x,F){return L(x,null,null,F)};L.matchesSelector=function(x,F){return L(F,null,null,[x]).length>0};L.find=function(x,F,V){var M;if(!x)return[];for(var O=0,X=Z.order.length;O<X;O++){var ha,fa=Z.order[O];if(ha=Z.leftMatch[fa].exec(x)){var sa=ha[1];ha.splice(1,1);if(sa.substr(sa.length-1)!=="\\"){ha[1]=
(ha[1]||"").replace(P,"");M=Z.find[fa](ha,F,V);if(M!=null){x=x.replace(Z.match[fa],"");break}}}}M||(M=typeof F.getElementsByTagName!=="undefined"?F.getElementsByTagName("*"):[]);return{set:M,expr:x}};L.filter=function(x,F,V,M){for(var O,X,ha=x,fa=[],sa=F,Ia=F&&F[0]&&L.isXML(F[0]);x&&F.length;){for(var Ha in Z.filter)if((O=Z.leftMatch[Ha].exec(x))!=null&&O[2]){var Ma,D,R=Z.filter[Ha];D=O[1];X=false;O.splice(1,1);if(D.substr(D.length-1)!=="\\"){sa===fa&&(fa=[]);if(Z.preFilter[Ha])if(O=Z.preFilter[Ha](O,
sa,V,fa,M,Ia)){if(O===true)continue}else X=Ma=true;if(O)for(var Y=0;(D=sa[Y])!=null;Y++)if(D){Ma=R(D,O,Y,sa);var ca=M^!!Ma;V&&Ma!=null?ca?X=true:sa[Y]=false:ca&&(fa.push(D),X=true)}if(Ma!==c){V||(sa=fa);x=x.replace(Z.match[Ha],"");if(!X)return[];break}}}if(x===ha)if(X==null)L.error(x);else break;ha=x}return sa};L.error=function(x){throw"Syntax error, unrecognized expression: "+x;};var Z=L.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(x){return x.getAttribute("href")},type:function(x){return x.getAttribute("type")}},relative:{"+":function(x,F){var V=typeof F==="string",M=V&&!N.test(F);V=V&&!M;M&&(F=F.toLowerCase());M=0;for(var O=x.length,X;M<O;M++)if(X=x[M]){for(;(X=X.previousSibling)&&X.nodeType!==1;);x[M]=V||X&&X.nodeName.toLowerCase()===F?X||false:X===F}V&&L.filter(F,x,true)},">":function(x,F){var V,M=typeof F==="string",O=0,X=x.length;if(M&&!N.test(F))for(F=F.toLowerCase();O<X;O++){if(V=
x[O]){V=V.parentNode;x[O]=V.nodeName.toLowerCase()===F?V:false}}else{for(;O<X;O++)(V=x[O])&&(x[O]=M?V.parentNode:V.parentNode===F);M&&L.filter(F,x,true)}},"":function(x,F,V){var M,O=u++,X=h;typeof F==="string"&&!N.test(F)&&(F=F.toLowerCase(),M=F,X=n);X("parentNode",F,O,x,M,V)},"~":function(x,F,V){var M,O=u++,X=h;typeof F==="string"&&!N.test(F)&&(F=F.toLowerCase(),M=F,X=n);X("previousSibling",F,O,x,M,V)}},find:{ID:function(x,F,V){if(typeof F.getElementById!=="undefined"&&!V)return(x=F.getElementById(x[1]))&&
x.parentNode?[x]:[]},NAME:function(x,F){if(typeof F.getElementsByName!=="undefined"){for(var V=[],M=F.getElementsByName(x[1]),O=0,X=M.length;O<X;O++)M[O].getAttribute("name")===x[1]&&V.push(M[O]);return V.length===0?null:V}},TAG:function(x,F){if(typeof F.getElementsByTagName!=="undefined")return F.getElementsByTagName(x[1])}},preFilter:{CLASS:function(x,F,V,M,O,X){x=" "+x[1].replace(P,"")+" ";if(X)return x;X=0;for(var ha;(ha=F[X])!=null;X++)ha&&(O^(ha.className&&(" "+ha.className+" ").replace(/[\t\n\r]/g,
" ").indexOf(x)>=0)?V||M.push(ha):V&&(F[X]=false));return false},ID:function(x){return x[1].replace(P,"")},TAG:function(x){return x[1].replace(P,"").toLowerCase()},CHILD:function(x){if(x[1]==="nth"){x[2]||L.error(x[0]);x[2]=x[2].replace(/^\+|\s*/g,"");var F=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(x[2]==="even"&&"2n"||x[2]==="odd"&&"2n+1"||!/\D/.test(x[2])&&"0n+"+x[2]||x[2]);x[2]=F[1]+(F[2]||1)-0;x[3]=F[3]-0}else x[2]&&L.error(x[0]);x[0]=u++;return x},ATTR:function(x,F,V,M,O,X){F=x[1]=x[1].replace(P,"");
!X&&Z.attrMap[F]&&(x[1]=Z.attrMap[F]);x[4]=(x[4]||x[5]||"").replace(P,"");x[2]==="~="&&(x[4]=" "+x[4]+" ");return x},PSEUDO:function(x,F,V,M,O){if(x[1]==="not")if((q.exec(x[3])||"").length>1||/^\w/.test(x[3]))x[3]=L(x[3],null,null,F);else{x=L.filter(x[3],F,V,true^O);V||M.push.apply(M,x);return false}else if(Z.match.POS.test(x[0])||Z.match.CHILD.test(x[0]))return true;return x},POS:function(x){x.unshift(true);return x}},filters:{enabled:function(x){return x.disabled===false&&x.type!=="hidden"},disabled:function(x){return x.disabled===
true},checked:function(x){return x.checked===true},selected:function(x){return x.selected===true},parent:function(x){return!!x.firstChild},empty:function(x){return!x.firstChild},has:function(x,F,V){return!!L(V[3],x).length},header:function(x){return/h\d/i.test(x.nodeName)},text:function(x){return"text"===x.getAttribute("type")},radio:function(x){return"radio"===x.type},checkbox:function(x){return"checkbox"===x.type},file:function(x){return"file"===x.type},password:function(x){return"password"===x.type},
submit:function(x){return"submit"===x.type},image:function(x){return"image"===x.type},reset:function(x){return"reset"===x.type},button:function(x){return"button"===x.type||x.nodeName.toLowerCase()==="button"},input:function(x){return/input|select|textarea|button/i.test(x.nodeName)}},setFilters:{first:function(x,F){return F===0},last:function(x,F,V,M){return F===M.length-1},even:function(x,F){return F%2===0},odd:function(x,F){return F%2===1},lt:function(x,F,V){return F<V[3]-0},gt:function(x,F,V){return F>
V[3]-0},nth:function(x,F,V){return V[3]-0===F},eq:function(x,F,V){return V[3]-0===F}},filter:{PSEUDO:function(x,F,V,M){var O=F[1],X=Z.filters[O];if(X)return X(x,V,F,M);if(O==="contains")return(x.textContent||x.innerText||L.getText([x])||"").indexOf(F[3])>=0;if(O==="not"){F=F[3];V=0;for(M=F.length;V<M;V++)if(F[V]===x)return false;return true}L.error(O)},CHILD:function(x,F){var V=F[1],M=x;switch(V){case "only":case "first":for(;M=M.previousSibling;)if(M.nodeType===1)return false;if(V==="first")return true;
M=x;case "last":for(;M=M.nextSibling;)if(M.nodeType===1)return false;return true;case "nth":V=F[2];var O=F[3];if(V===1&&O===0)return true;var X=F[0],ha=x.parentNode;if(ha&&(ha.sizcache!==X||!x.nodeIndex)){var fa=0;for(M=ha.firstChild;M;M=M.nextSibling)M.nodeType===1&&(M.nodeIndex=++fa);ha.sizcache=X}M=x.nodeIndex-O;return V===0?M===0:M%V===0&&M/V>=0}},ID:function(x,F){return x.nodeType===1&&x.getAttribute("id")===F},TAG:function(x,F){return F==="*"&&x.nodeType===1||x.nodeName.toLowerCase()===F},CLASS:function(x,
F){return(" "+(x.className||x.getAttribute("class"))+" ").indexOf(F)>-1},ATTR:function(x,F){var V=F[1];V=Z.attrHandle[V]?Z.attrHandle[V](x):x[V]!=null?x[V]:x.getAttribute(V);var M=V+"",O=F[2],X=F[4];return V==null?O==="!=":O==="="?M===X:O==="*="?M.indexOf(X)>=0:O==="~="?(" "+M+" ").indexOf(X)>=0:X?O==="!="?M!==X:O==="^="?M.indexOf(X)===0:O==="$="?M.substr(M.length-X.length)===X:O==="|="?M===X||M.substr(0,X.length+1)===X+"-":false:M&&V!==false},POS:function(x,F,V,M){var O=Z.setFilters[F[2]];if(O)return O(x,
V,F,M)}}},ka=Z.match.POS,xa=function(x,F){return"\\"+(F-0+1)},pa;for(pa in Z.match){Z.match[pa]=RegExp(Z.match[pa].source+/(?![^\[]*\])(?![^\(]*\))/.source);Z.leftMatch[pa]=RegExp(/(^(?:.|\r|\n)*?)/.source+Z.match[pa].source.replace(/\\(\d+)/g,xa))}var Aa=function(x,F){x=Array.prototype.slice.call(x,0);if(F){F.push.apply(F,x);return F}return x};try{Array.prototype.slice.call(I.documentElement.childNodes,0)}catch(Ja){Aa=function(x,F){var V=0,M=F||[];if(v.call(x)==="[object Array]")Array.prototype.push.apply(M,
x);else if(typeof x.length==="number")for(var O=x.length;V<O;V++)M.push(x[V]);else for(;x[V];V++)M.push(x[V]);return M}}var Ea,La;I.documentElement.compareDocumentPosition?Ea=function(x,F){if(x===F){z=true;return 0}if(!x.compareDocumentPosition||!F.compareDocumentPosition)return x.compareDocumentPosition?-1:1;return x.compareDocumentPosition(F)&4?-1:1}:(Ea=function(x,F){var V,M,O=[],X=[];V=x.parentNode;M=F.parentNode;var ha=V;if(x===F){z=true;return 0}if(V===M)return La(x,F);if(!V)return-1;if(!M)return 1;
for(;ha;){O.unshift(ha);ha=ha.parentNode}for(ha=M;ha;){X.unshift(ha);ha=ha.parentNode}V=O.length;M=X.length;for(ha=0;ha<V&&ha<M;ha++)if(O[ha]!==X[ha])return La(O[ha],X[ha]);return ha===V?La(x,X[ha],-1):La(O[ha],F,1)},La=function(x,F,V){if(x===F)return V;for(x=x.nextSibling;x;){if(x===F)return-1;x=x.nextSibling}return 1});L.getText=function(x){for(var F="",V,M=0;x[M];M++){V=x[M];V.nodeType===3||V.nodeType===4?F+=V.nodeValue:V.nodeType!==8&&(F+=L.getText(V.childNodes))}return F};(function(){var x=I.createElement("div"),
F="script"+(new Date).getTime(),V=I.documentElement;x.innerHTML="<a name='"+F+"'/>";V.insertBefore(x,V.firstChild);I.getElementById(F)&&(Z.find.ID=function(M,O,X){if(typeof O.getElementById!=="undefined"&&!X)return(O=O.getElementById(M[1]))?O.id===M[1]||typeof O.getAttributeNode!=="undefined"&&O.getAttributeNode("id").nodeValue===M[1]?[O]:c:[]},Z.filter.ID=function(M,O){var X=typeof M.getAttributeNode!=="undefined"&&M.getAttributeNode("id");return M.nodeType===1&&X&&X.nodeValue===O});V.removeChild(x);
V=x=null})();(function(){var x=I.createElement("div");x.appendChild(I.createComment(""));x.getElementsByTagName("*").length>0&&(Z.find.TAG=function(F,V){var M=V.getElementsByTagName(F[1]);if(F[1]==="*"){for(var O=[],X=0;M[X];X++)M[X].nodeType===1&&O.push(M[X]);M=O}return M});x.innerHTML="<a href='#'></a>";x.firstChild&&typeof x.firstChild.getAttribute!=="undefined"&&x.firstChild.getAttribute("href")!=="#"&&(Z.attrHandle.href=function(F){return F.getAttribute("href",2)});x=null})();I.querySelectorAll&&
function(){var x=L,F=I.createElement("div");F.innerHTML="<p class='TEST'></p>";if(!F.querySelectorAll||F.querySelectorAll(".TEST").length!==0){L=function(M,O,X,ha){O=O||I;if(!ha&&!L.isXML(O)){var fa=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(M);if(fa&&(O.nodeType===1||O.nodeType===9)){if(fa[1])return Aa(O.getElementsByTagName(M),X);if(fa[2]&&Z.find.CLASS&&O.getElementsByClassName)return Aa(O.getElementsByClassName(fa[2]),X)}if(O.nodeType===9){if(M==="body"&&O.body)return Aa([O.body],X);if(fa&&fa[3]){var sa=
O.getElementById(fa[3]);if(!sa||!sa.parentNode)return Aa([],X);if(sa.id===fa[3])return Aa([sa],X)}try{return Aa(O.querySelectorAll(M),X)}catch(Ia){}}else if(O.nodeType===1&&O.nodeName.toLowerCase()!=="object"){fa=O;var Ha=(sa=O.getAttribute("id"))||"__sizzle__",Ma=O.parentNode,D=/^\s*[+~]/.test(M);sa?Ha=Ha.replace(/'/g,"\\$&"):O.setAttribute("id",Ha);D&&Ma&&(O=O.parentNode);try{if(!D||Ma)return Aa(O.querySelectorAll("[id='"+Ha+"'] "+M),X)}catch(R){}finally{sa||fa.removeAttribute("id")}}}return x(M,
O,X,ha)};for(var V in x)L[V]=x[V];F=null}}();(function(){var x=I.documentElement,F=x.matchesSelector||x.mozMatchesSelector||x.webkitMatchesSelector||x.msMatchesSelector,V=false;try{F.call(I.documentElement,"[test!='']:sizzle")}catch(M){V=true}F&&(L.matchesSelector=function(O,X){X=X.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!L.isXML(O))try{if(V||!Z.match.PSEUDO.test(X)&&!/!=/.test(X))return F.call(O,X)}catch(ha){}return L(X,null,null,[O]).length>0})})();(function(){var x=I.createElement("div");
x.innerHTML="<div class='test e'></div><div class='test'></div>";if(x.getElementsByClassName&&x.getElementsByClassName("e").length!==0){x.lastChild.className="e";if(x.getElementsByClassName("e").length!==1){Z.order.splice(1,0,"CLASS");Z.find.CLASS=function(F,V,M){if(typeof V.getElementsByClassName!=="undefined"&&!M)return V.getElementsByClassName(F[1])};x=null}}})();I.documentElement.contains?L.contains=function(x,F){return x!==F&&(x.contains?x.contains(F):true)}:I.documentElement.compareDocumentPosition?
L.contains=function(x,F){return!!(x.compareDocumentPosition(F)&16)}:L.contains=function(){return false};L.isXML=function(x){return(x=(x?x.ownerDocument||x:0).documentElement)?x.nodeName!=="HTML":false};var Pa=function(x,F){for(var V,M=[],O="",X=F.nodeType?[F]:F;V=Z.match.PSEUDO.exec(x);){O+=V[0];x=x.replace(Z.match.PSEUDO,"")}x=Z.relative[x]?x+"*":x;V=0;for(var ha=X.length;V<ha;V++)L(x,X[V],M);return L.filter(O,M)};o.find=L;o.expr=L.selectors;o.expr[":"]=o.expr.filters;o.unique=L.uniqueSort;o.text=
L.getText;o.isXMLDoc=L.isXML;o.contains=L.contains})();var ua=/Until$/,Fa=/^(?:parents|prevUntil|prevAll)/,Ga=/,/,Za=/^.[^:#\[\.,]*$/,eb=Array.prototype.slice,Ra=o.expr.match.POS,Qa={children:true,contents:true,next:true,prev:true};o.fn.extend({find:function(h){for(var n=this.pushStack("","find",h),q=0,u=0,v=this.length;u<v;u++){q=n.length;o.find(h,this[u],n);if(u>0)for(var z=q;z<n.length;z++)for(var C=0;C<q;C++)if(n[C]===n[z]){n.splice(z--,1);break}}return n},has:function(h){var n=o(h);return this.filter(function(){for(var q=
0,u=n.length;q<u;q++)if(o.contains(this,n[q]))return true})},not:function(h){return this.pushStack(K(this,h,false),"not",h)},filter:function(h){return this.pushStack(K(this,h,true),"filter",h)},is:function(h){return!!h&&o.filter(h,this).length>0},closest:function(h,n){var q=[],u,v,z=this[0];if(o.isArray(h)){var C,P={},N=1;if(z&&h.length){u=0;for(v=h.length;u<v;u++){C=h[u];P[C]||(P[C]=o.expr.match.POS.test(C)?o(C,n||this.context):C)}for(;z&&z.ownerDocument&&z!==n;){for(C in P){u=P[C];(u.jquery?u.index(z)>
-1:o(z).is(u))&&q.push({selector:C,elem:z,level:N})}z=z.parentNode;N++}}return q}C=Ra.test(h)?o(h,n||this.context):null;u=0;for(v=this.length;u<v;u++)for(z=this[u];z;){if(C?C.index(z)>-1:o.find.matchesSelector(z,h)){q.push(z);break}z=z.parentNode;if(!z||!z.ownerDocument||z===n)break}q=q.length>1?o.unique(q):q;return this.pushStack(q,"closest",h)},index:function(h){if(!h||typeof h==="string")return o.inArray(this[0],h?o(h):this.parent().children());return o.inArray(h.jquery?h[0]:h,this)},add:function(h,
n){var q=typeof h==="string"?o(h,n):o.makeArray(h),u=o.merge(this.get(),q);return this.pushStack(!q[0]||!q[0].parentNode||q[0].parentNode.nodeType===11||!u[0]||!u[0].parentNode||u[0].parentNode.nodeType===11?u:o.unique(u))},andSelf:function(){return this.add(this.prevObject)}});o.each({parent:function(h){return(h=h.parentNode)&&h.nodeType!==11?h:null},parents:function(h){return o.dir(h,"parentNode")},parentsUntil:function(h,n,q){return o.dir(h,"parentNode",q)},next:function(h){return o.nth(h,2,"nextSibling")},
prev:function(h){return o.nth(h,2,"previousSibling")},nextAll:function(h){return o.dir(h,"nextSibling")},prevAll:function(h){return o.dir(h,"previousSibling")},nextUntil:function(h,n,q){return o.dir(h,"nextSibling",q)},prevUntil:function(h,n,q){return o.dir(h,"previousSibling",q)},siblings:function(h){return o.sibling(h.parentNode.firstChild,h)},children:function(h){return o.sibling(h.firstChild)},contents:function(h){return o.nodeName(h,"iframe")?h.contentDocument||h.contentWindow.document:o.makeArray(h.childNodes)}},
function(h,n){o.fn[h]=function(q,u){var v=o.map(this,n,q),z=eb.call(arguments);ua.test(h)||(u=q);u&&typeof u==="string"&&(v=o.filter(u,v));v=this.length>1&&!Qa[h]?o.unique(v):v;(this.length>1||Ga.test(u))&&Fa.test(h)&&(v=v.reverse());return this.pushStack(v,h,z.join(","))}});o.extend({filter:function(h,n,q){q&&(h=":not("+h+")");return n.length===1?o.find.matchesSelector(n[0],h)?[n[0]]:[]:o.find.matches(h,n)},dir:function(h,n,q){var u=[];for(h=h[n];h&&h.nodeType!==9&&(q===c||h.nodeType!==1||!o(h).is(q));){h.nodeType===
1&&u.push(h);h=h[n]}return u},nth:function(h,n,q){n=n||1;for(var u=0;h;h=h[q])if(h.nodeType===1&&++u===n)break;return h},sibling:function(h,n){for(var q=[];h;h=h.nextSibling)h.nodeType===1&&h!==n&&q.push(h);return q}});var fb=/ jQuery\d+="(?:\d+|null)"/g,Wa=/^\s+/,rb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,sb=/<([\w:]+)/,Gb=/<tbody/i,Hb=/<|&#?\w+;/,tb=/<(?:script|object|embed|option|style)/i,ub=/checked\s*(?:[^=]|=\s*.checked.)/i,Oa={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,"",""]};Oa.optgroup=Oa.option;Oa.tbody=Oa.tfoot=Oa.colgroup=Oa.caption=Oa.thead;Oa.th=Oa.td;o.support.htmlSerialize||(Oa._default=[1,"div<div>","</div>"]);o.fn.extend({text:function(h){if(o.isFunction(h))return this.each(function(n){var q=
o(this);q.text(h.call(this,n,q.text()))});if(typeof h!=="object"&&h!==c)return this.empty().append((this[0]&&this[0].ownerDocument||I).createTextNode(h));return o.text(this)},wrapAll:function(h){if(o.isFunction(h))return this.each(function(q){o(this).wrapAll(h.call(this,q))});if(this[0]){var n=o(h,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&n.insertBefore(this[0]);n.map(function(){for(var q=this;q.firstChild&&q.firstChild.nodeType===1;)q=q.firstChild;return q}).append(this)}return this},
wrapInner:function(h){if(o.isFunction(h))return this.each(function(n){o(this).wrapInner(h.call(this,n))});return this.each(function(){var n=o(this),q=n.contents();q.length?q.wrapAll(h):n.append(h)})},wrap:function(h){return this.each(function(){o(this).wrapAll(h)})},unwrap:function(){return this.parent().each(function(){o.nodeName(this,"body")||o(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(h){this.nodeType===1&&this.appendChild(h)})},
prepend:function(){return this.domManip(arguments,true,function(h){this.nodeType===1&&this.insertBefore(h,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(n){this.parentNode.insertBefore(n,this)});if(arguments.length){var h=o(arguments[0]);h.push.apply(h,this.toArray());return this.pushStack(h,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(n){this.parentNode.insertBefore(n,
this.nextSibling)});if(arguments.length){var h=this.pushStack(this,"after",arguments);h.push.apply(h,o(arguments[0]).toArray());return h}},remove:function(h,n){for(var q=0,u;(u=this[q])!=null;q++)if(!h||o.filter(h,[u]).length){!n&&u.nodeType===1&&(o.cleanData(u.getElementsByTagName("*")),o.cleanData([u]));u.parentNode&&u.parentNode.removeChild(u)}return this},empty:function(){for(var h=0,n;(n=this[h])!=null;h++)for(n.nodeType===1&&o.cleanData(n.getElementsByTagName("*"));n.firstChild;)n.removeChild(n.firstChild);
return this},clone:function(h,n){h=h==null?false:h;n=n==null?h:n;return this.map(function(){return o.clone(this,h,n)})},html:function(h){if(h===c)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(fb,""):null;if(typeof h!=="string"||tb.test(h)||!o.support.leadingWhitespace&&Wa.test(h)||Oa[(sb.exec(h)||["",""])[1].toLowerCase()])o.isFunction(h)?this.each(function(v){var z=o(this);z.html(h.call(this,v,z.html()))}):this.empty().append(h);else{h=h.replace(rb,"<$1></$2>");try{for(var n=0,q=
this.length;n<q;n++)this[n].nodeType===1&&(o.cleanData(this[n].getElementsByTagName("*")),this[n].innerHTML=h)}catch(u){this.empty().append(h)}}return this},replaceWith:function(h){if(this[0]&&this[0].parentNode){if(o.isFunction(h))return this.each(function(n){var q=o(this),u=q.html();q.replaceWith(h.call(this,n,u))});typeof h!=="string"&&(h=o(h).detach());return this.each(function(){var n=this.nextSibling,q=this.parentNode;o(this).remove();n?o(n).before(h):o(q).append(h)})}return this.pushStack(o(o.isFunction(h)?
h():h),"replaceWith",h)},detach:function(h){return this.remove(h,true)},domManip:function(h,n,q){var u,v,z,C=h[0],P=[];if(!o.support.checkClone&&arguments.length===3&&typeof C==="string"&&ub.test(C))return this.each(function(){o(this).domManip(h,n,q,true)});if(o.isFunction(C))return this.each(function(Z){var ka=o(this);h[0]=C.call(this,Z,n?ka.html():c);ka.domManip(h,n,q)});if(this[0]){z=C&&C.parentNode;o.support.parentNode&&z&&z.nodeType===11&&z.childNodes.length===this.length?u={fragment:z}:u=o.buildFragment(h,
this,P);z=u.fragment;z.childNodes.length===1?v=z=z.firstChild:v=z.firstChild;if(v){n=n&&o.nodeName(v,"tr");v=0;for(var N=this.length,L=N-1;v<N;v++)q.call(n?o.nodeName(this[v],"table")?this[v].getElementsByTagName("tbody")[0]||this[v].appendChild(this[v].ownerDocument.createElement("tbody")):this[v]:this[v],u.cacheable||N>1&&v<L?o.clone(z,true,true):z)}P.length&&o.each(P,A)}return this}});o.buildFragment=function(h,n,q){var u,v,z;n=n&&n[0]?n[0].ownerDocument||n[0]:I;h.length===1&&typeof h[0]==="string"&&
h[0].length<512&&n===I&&h[0].charAt(0)==="<"&&!tb.test(h[0])&&(o.support.checkClone||!ub.test(h[0]))&&(v=true,z=o.fragments[h[0]],z&&z!==1&&(u=z));u||(u=n.createDocumentFragment(),o.clean(h,n,u,q));v&&(o.fragments[h[0]]=z?u:1);return{fragment:u,cacheable:v}};o.fragments={};o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(h,n){o.fn[h]=function(q){var u=[];q=o(q);var v=this.length===1&&this[0].parentNode;if(v&&v.nodeType===11&&
v.childNodes.length===1&&q.length===1){q[n](this[0]);return this}v=0;for(var z=q.length;v<z;v++){var C=(v>0?this.clone(true):this).get();o(q[v])[n](C);u=u.concat(C)}return this.pushStack(u,h,q.selector)}});o.extend({clone:function(h,n,q){var u=h.cloneNode(true),v,z,C;if((!o.support.noCloneEvent||!o.support.noCloneChecked)&&(h.nodeType===1||h.nodeType===11)&&!o.isXMLDoc(h)){J(h,u);v=E(h);z=E(u);for(C=0;v[C];++C)J(v[C],z[C])}if(n){Q(h,u);if(q){v=E(h);z=E(u);for(C=0;v[C];++C)Q(v[C],z[C])}}return u},
clean:function(h,n,q,u){n=n||I;typeof n.createElement==="undefined"&&(n=n.ownerDocument||n[0]&&n[0].ownerDocument||I);for(var v=[],z=0,C;(C=h[z])!=null;z++){typeof C==="number"&&(C+="");if(C){if(typeof C!=="string"||Hb.test(C)){if(typeof C==="string"){C=C.replace(rb,"<$1></$2>");var P=(sb.exec(C)||["",""])[1].toLowerCase(),N=Oa[P]||Oa._default,L=N[0],Z=n.createElement("div");for(Z.innerHTML=N[1]+C+N[2];L--;)Z=Z.lastChild;if(!o.support.tbody){L=Gb.test(C);P=P==="table"&&!L?Z.firstChild&&Z.firstChild.childNodes:
N[1]==="<table>"&&!L?Z.childNodes:[];for(N=P.length-1;N>=0;--N)o.nodeName(P[N],"tbody")&&!P[N].childNodes.length&&P[N].parentNode.removeChild(P[N])}!o.support.leadingWhitespace&&Wa.test(C)&&Z.insertBefore(n.createTextNode(Wa.exec(C)[0]),Z.firstChild);C=Z.childNodes}}else C=n.createTextNode(C);C.nodeType?v.push(C):v=o.merge(v,C)}}if(q)for(z=0;v[z];z++)!u||!o.nodeName(v[z],"script")||v[z].type&&v[z].type.toLowerCase()!=="text/javascript"?(v[z].nodeType===1&&v.splice.apply(v,[z+1,0].concat(o.makeArray(v[z].getElementsByTagName("script")))),
q.appendChild(v[z])):u.push(v[z].parentNode?v[z].parentNode.removeChild(v[z]):v[z]);return v},cleanData:function(h){for(var n,q,u=o.cache,v=o.expando,z=o.event.special,C=o.support.deleteExpando,P=0,N;(N=h[P])!=null;P++)if(!(N.nodeName&&o.noData[N.nodeName.toLowerCase()]))if(q=N[o.expando]){if((n=u[q]&&u[q][v])&&n.events){for(var L in n.events)z[L]?o.event.remove(N,L):o.removeEvent(N,L,n.handle);n.handle&&(n.handle.elem=null)}C?delete N[o.expando]:N.removeAttribute&&N.removeAttribute(o.expando);delete u[q]}}});
var vb=/alpha\([^)]*\)/i,Ib=/opacity=([^)]*)/,Jb=/-([a-z])/ig,Kb=/([A-Z])/g,wb=/^-?\d+(?:px)?$/i,Lb=/^-?\d/,Mb={position:"absolute",visibility:"hidden",display:"block"},Eb=["Left","Right"],Fb=["Top","Bottom"],ib,$a,jb,Nb=function(h,n){return n.toUpperCase()};o.fn.css=function(h,n){if(arguments.length===2&&n===c)return this;return o.access(this,h,n,true,function(q,u,v){return v!==c?o.style(q,u,v):o.css(q,u)})};o.extend({cssHooks:{opacity:{get:function(h,n){if(n){var q=ib(h,"opacity","opacity");return q===
""?"1":q}return h.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":o.support.cssFloat?"cssFloat":"styleFloat"},style:function(h,n,q,u){if(h&&h.nodeType!==3&&h.nodeType!==8&&h.style){var v,z=o.camelCase(n),C=h.style,P=o.cssHooks[z];n=o.cssProps[z]||z;if(q===c){if(P&&"get"in P&&(v=P.get(h,false,u))!==c)return v;return C[n]}if(!(typeof q==="number"&&isNaN(q)||q==null)){typeof q==="number"&&!o.cssNumber[z]&&(q+="px");if(!P||!("set"in P)||
(q=P.set(h,q))!==c)try{C[n]=q}catch(N){}}}},css:function(h,n,q){var u,v=o.camelCase(n),z=o.cssHooks[v];n=o.cssProps[v]||v;if(z&&"get"in z&&(u=z.get(h,true,q))!==c)return u;if(ib)return ib(h,n,v)},swap:function(h,n,q){var u={},v;for(v in n){u[v]=h.style[v];h.style[v]=n[v]}q.call(h);for(v in n)h.style[v]=u[v]},camelCase:function(h){return h.replace(Jb,Nb)}});o.curCSS=o.css;o.each(["height","width"],function(h,n){o.cssHooks[n]={get:function(q,u,v){var z;if(u){q.offsetWidth!==0?z=y(q,n,v):o.swap(q,Mb,
function(){z=y(q,n,v)});if(z<=0){z=ib(q,n,n);z==="0px"&&jb&&(z=jb(q,n,n));if(z!=null)return z===""||z==="auto"?"0px":z}if(z<0||z==null){z=q.style[n];return z===""||z==="auto"?"0px":z}return typeof z==="string"?z:z+"px"}},set:function(q,u){if(!wb.test(u))return u;u=parseFloat(u);if(u>=0)return u+"px"}}});o.support.opacity||(o.cssHooks.opacity={get:function(h,n){return Ib.test((n&&h.currentStyle?h.currentStyle.filter:h.style.filter)||"")?parseFloat(RegExp.$1)/100+"":n?"1":""},set:function(h,n){var q=
h.style;q.zoom=1;var u=o.isNaN(n)?"":"alpha(opacity="+n*100+")",v=q.filter||"";q.filter=vb.test(v)?v.replace(vb,u):q.filter+" "+u}});I.defaultView&&I.defaultView.getComputedStyle&&($a=function(h,n,q){var u;q=q.replace(Kb,"-$1").toLowerCase();if(!(n=h.ownerDocument.defaultView))return c;if(n=n.getComputedStyle(h,null)){u=n.getPropertyValue(q);u===""&&!o.contains(h.ownerDocument.documentElement,h)&&(u=o.style(h,q))}return u});I.documentElement.currentStyle&&(jb=function(h,n){var q,u=h.currentStyle&&
h.currentStyle[n],v=h.runtimeStyle&&h.runtimeStyle[n],z=h.style;!wb.test(u)&&Lb.test(u)&&(q=z.left,v&&(h.runtimeStyle.left=h.currentStyle.left),z.left=n==="fontSize"?"1em":u||0,u=z.pixelLeft+"px",z.left=q,v&&(h.runtimeStyle.left=v));return u===""?"auto":u});ib=$a||jb;o.expr&&o.expr.filters&&(o.expr.filters.hidden=function(h){var n=h.offsetHeight;return h.offsetWidth===0&&n===0||!o.support.reliableHiddenOffsets&&(h.style.display||o.css(h,"display"))==="none"},o.expr.filters.visible=function(h){return!o.expr.filters.hidden(h)});
var Ob=/%20/g,Db=/\[\]$/,xb=/\r?\n/g,Pb=/#.*$/,Qb=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Rb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Sb=/^(?:GET|HEAD)$/,Tb=/^\/\//,yb=/\?/,Ub=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Vb=/^(?:select|textarea)/i,qb=/\s+/,Wb=/([?&])_=[^&]*/,Xb=/(^|\-)([a-z])/g,Yb=function(h,n,q){return n+q.toUpperCase()},zb=/^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/,Ab=o.fn.load,nb={},Bb={},ab,bb;try{ab=I.location.href}catch(ec){ab=
I.createElement("a");ab.href="";ab=ab.href}bb=zb.exec(ab.toLowerCase());o.fn.extend({load:function(h,n,q){if(typeof h!=="string"&&Ab)return Ab.apply(this,arguments);if(!this.length)return this;var u=h.indexOf(" ");if(u>=0){var v=h.slice(u,h.length);h=h.slice(0,u)}u="GET";n&&(o.isFunction(n)?(q=n,n=c):typeof n==="object"&&(n=o.param(n,o.ajaxSettings.traditional),u="POST"));var z=this;o.ajax({url:h,type:u,dataType:"html",data:n,complete:function(C,P,N){N=C.responseText;C.isResolved()&&(C.done(function(L){N=
L}),z.html(v?o("<div>").append(N.replace(Ub,"")).find(v):N));q&&z.each(q,[N,P,C])}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Vb.test(this.nodeName)||Rb.test(this.type))}).map(function(h,n){var q=o(this).val();return q==null?null:o.isArray(q)?o.map(q,function(u){return{name:n.name,value:u.replace(xb,
"\r\n")}}):{name:n.name,value:q.replace(xb,"\r\n")}}).get()}});o.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(h,n){o.fn[n]=function(q){return this.bind(n,q)}});o.each(["get","post"],function(h,n){o[n]=function(q,u,v,z){o.isFunction(u)&&(z=z||v,v=u,u=c);return o.ajax({type:n,url:q,data:u,success:v,dataType:z})}});o.extend({getScript:function(h,n){return o.get(h,c,n,"script")},getJSON:function(h,n,q){return o.get(h,n,q,"json")},ajaxSetup:function(h,n){n?
o.extend(true,h,o.ajaxSettings,n):(n=h,h=o.extend(true,o.ajaxSettings,n));for(var q in{context:1,url:1})q in n?h[q]=n[q]:q in o.ajaxSettings&&(h[q]=o.ajaxSettings[q]);return h},ajaxSettings:{url:ab,isLocal:/(?:^file|^widget|\-extension):$/.test(bb[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":o.parseJSON,"text xml":o.parseXML}},ajaxPrefilter:t(nb),ajaxTransport:t(Bb),ajax:function(h,n){function q(M,O,X,ha){if(Ea!==2){Ea=2;Aa&&clearTimeout(Aa);pa=c;ka=ha||"";x.readyState=M?4:0;var fa,sa,Ia;if(X){ha=u;var Ha=x,Ma=ha.contents,D=ha.dataTypes,R=ha.responseFields,Y,ca,oa,ta;for(ca in R)ca in X&&(Ha[R[ca]]=X[ca]);for(;D[0]==="*";){D.shift();Y===c&&(Y=ha.mimeType||Ha.getResponseHeader("content-type"))}if(Y)for(ca in Ma)if(Ma[ca]&&
Ma[ca].test(Y)){D.unshift(ca);break}if(D[0]in X)oa=D[0];else{for(ca in X){if(!D[0]||ha.converters[ca+" "+D[0]]){oa=ca;break}ta||(ta=ca)}oa=oa||ta}if(oa){oa!==D[0]&&D.unshift(oa);X=X[oa]}else X=void 0}else X=c;X=X;if(M>=200&&M<300||M===304){if(u.ifModified){if(Y=x.getResponseHeader("Last-Modified"))o.lastModified[L]=Y;if(Y=x.getResponseHeader("Etag"))o.etag[L]=Y}if(M===304){O="notmodified";fa=true}else try{Y=u;X=X;Y.dataFilter&&(X=Y.dataFilter(X,Y.dataType));var ya=Y.dataTypes;ca={};var Ca,Na,Sa=ya.length,
Ta,Xa=ya[0],gb,ob,Ya,cb,hb;for(Ca=1;Ca<Sa;Ca++){if(Ca===1)for(Na in Y.converters)typeof Na==="string"&&(ca[Na.toLowerCase()]=Y.converters[Na]);gb=Xa;Xa=ya[Ca];if(Xa==="*")Xa=gb;else if(gb!=="*"&&gb!==Xa){ob=gb+" "+Xa;Ya=ca[ob]||ca["* "+Xa];if(!Ya){hb=c;for(cb in ca){Ta=cb.split(" ");if(Ta[0]===gb||Ta[0]==="*")if(hb=ca[Ta[1]+" "+Xa]){cb=ca[cb];cb===true?Ya=hb:hb===true&&(Ya=cb);break}}}!Ya&&!hb&&o.error("No conversion from "+ob.replace(" "," to "));Ya!==true&&(X=Ya?Ya(X):hb(cb(X)))}}sa=X;O="success";
fa=true}catch(Zb){O="parsererror";Ia=Zb}}else{Ia=O;if(!O||M){O="error";M<0&&(M=0)}}x.status=M;x.statusText=O;fa?C.resolveWith(v,[sa,O,x]):C.rejectWith(v,[x,O,Ia]);x.statusCode(N);N=c;La&&z.trigger("ajax"+(fa?"Success":"Error"),[x,u,fa?sa:Ia]);P.resolveWith(v,[x,O]);La&&(z.trigger("ajaxComplete",[x,u]),--o.active||o.event.trigger("ajaxStop"))}}typeof h==="object"&&(n=h,h=c);n=n||{};var u=o.ajaxSetup({},n),v=u.context||u,z=v!==u&&(v.nodeType||v instanceof o)?o(v):o.event,C=o.Deferred(),P=o._Deferred(),
N=u.statusCode||{},L,Z={},ka,xa,pa,Aa,Ja,Ea=0,La,Pa,x={readyState:0,setRequestHeader:function(M,O){Ea||(Z[M.toLowerCase().replace(Xb,Yb)]=O);return this},getAllResponseHeaders:function(){return Ea===2?ka:null},getResponseHeader:function(M){var O;if(Ea===2){if(!xa)for(xa={};O=Qb.exec(ka);)xa[O[1].toLowerCase()]=O[2];O=xa[M.toLowerCase()]}return O===c?null:O},overrideMimeType:function(M){Ea||(u.mimeType=M);return this},abort:function(M){M=M||"abort";pa&&pa.abort(M);q(0,M);return this}};C.promise(x);
x.success=x.done;x.error=x.fail;x.complete=P.done;x.statusCode=function(M){if(M){var O;if(Ea<2)for(O in M)N[O]=[N[O],M[O]];else{O=M[x.status];x.then(O,O)}}return this};u.url=((h||u.url)+"").replace(Pb,"").replace(Tb,bb[1]+"//");u.dataTypes=o.trim(u.dataType||"*").toLowerCase().split(qb);u.crossDomain||(Ja=zb.exec(u.url.toLowerCase()),u.crossDomain=Ja&&(Ja[1]!=bb[1]||Ja[2]!=bb[2]||(Ja[3]||(Ja[1]==="http:"?80:443))!=(bb[3]||(bb[1]==="http:"?80:443))));u.data&&u.processData&&typeof u.data!=="string"&&
(u.data=o.param(u.data,u.traditional));p(nb,u,n,x);if(Ea===2)return false;La=u.global;u.type=u.type.toUpperCase();u.hasContent=!Sb.test(u.type);La&&o.active++===0&&o.event.trigger("ajaxStart");if(!u.hasContent){u.data&&(u.url+=(yb.test(u.url)?"&":"?")+u.data);L=u.url;if(u.cache===false){Ja=o.now();var F=u.url.replace(Wb,"$1_="+Ja);u.url=F+(F===u.url?(yb.test(u.url)?"&":"?")+"_="+Ja:"")}}if(u.data&&u.hasContent&&u.contentType!==false||n.contentType)Z["Content-Type"]=u.contentType;u.ifModified&&(L=
L||u.url,o.lastModified[L]&&(Z["If-Modified-Since"]=o.lastModified[L]),o.etag[L]&&(Z["If-None-Match"]=o.etag[L]));Z.Accept=u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+(u.dataTypes[0]!=="*"?", */*; q=0.01":""):u.accepts["*"];for(Pa in u.headers)x.setRequestHeader(Pa,u.headers[Pa]);if(u.beforeSend&&(u.beforeSend.call(v,x,u)===false||Ea===2)){x.abort();return false}for(Pa in{success:1,error:1,complete:1})x[Pa](u[Pa]);if(pa=p(Bb,u,n,x)){x.readyState=1;La&&z.trigger("ajaxSend",
[x,u]);u.async&&u.timeout>0&&(Aa=setTimeout(function(){x.abort("timeout")},u.timeout));try{Ea=1;pa.send(Z,q)}catch(V){status<2?q(-1,V):o.error(V)}}else q(-1,"No Transport");return x},param:function(h,n){var q=[],u=function(z,C){C=o.isFunction(C)?C():C;q[q.length]=encodeURIComponent(z)+"="+encodeURIComponent(C)};n===c&&(n=o.ajaxSettings.traditional);if(o.isArray(h)||h.jquery&&!o.isPlainObject(h))o.each(h,function(){u(this.name,this.value)});else for(var v in h)m(v,h[v],n,u);return q.join("&").replace(Ob,
"+")}});o.extend({active:0,lastModified:{},etag:{}});var $b=o.now(),kb=/(\=)\?(&|$)|()\?\?()/i;o.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return o.expando+"_"+$b++}});o.ajaxPrefilter("json jsonp",function(h,n,q){var u=typeof h.data==="string";if(h.dataTypes[0]==="jsonp"||n.jsonpCallback||n.jsonp!=null||h.jsonp!==false&&(kb.test(h.url)||u&&kb.test(h.data))){var v,z=h.jsonpCallback=o.isFunction(h.jsonpCallback)?h.jsonpCallback():h.jsonpCallback,C=a[z];n=h.url;var P=h.data,N="$1"+z+"$2",
L=function(){a[z]=C;v&&o.isFunction(C)&&a[z](v[0])};h.jsonp!==false&&(n=n.replace(kb,N),h.url===n&&(u&&(P=P.replace(kb,N)),h.data===P&&(n+=(/\?/.test(n)?"&":"?")+h.jsonp+"="+z)));h.url=n;h.data=P;a[z]=function(Z){v=[Z]};q.then(L,L);h.converters["script json"]=function(){v||o.error(z+" was not called");return v[0]};h.dataTypes[0]="json";return"script"}});o.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},
converters:{"text script":function(h){o.globalEval(h);return h}}});o.ajaxPrefilter("script",function(h){h.cache===c&&(h.cache=false);h.crossDomain&&(h.type="GET",h.global=false)});o.ajaxTransport("script",function(h){if(h.crossDomain){var n,q=I.head||I.getElementsByTagName("head")[0]||I.documentElement;return{send:function(u,v){n=I.createElement("script");n.async="async";h.scriptCharset&&(n.charset=h.scriptCharset);n.src=h.url;n.onload=n.onreadystatechange=function(z,C){if(!n.readyState||/loaded|complete/.test(n.readyState)){n.onload=
n.onreadystatechange=null;q&&n.parentNode&&q.removeChild(n);n=c;C||v(200,"success")}};q.insertBefore(n,q.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var ac=o.now(),db;o.ajaxSettings.xhr=a.ActiveXObject?function(){var h;if(!(h=!this.isLocal&&f()))a:{try{h=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(n){}h=void 0}return h}:f;$a=o.ajaxSettings.xhr();o.support.ajax=!!$a;o.support.cors=$a&&"withCredentials"in $a;$a=c;o.support.ajax&&o.ajaxTransport(function(h){if(!h.crossDomain||o.support.cors){var n;
return{send:function(q,u){var v=h.xhr(),z,C;h.username?v.open(h.type,h.url,h.async,h.username,h.password):v.open(h.type,h.url,h.async);if(h.xhrFields)for(C in h.xhrFields)v[C]=h.xhrFields[C];h.mimeType&&v.overrideMimeType&&v.overrideMimeType(h.mimeType);(!h.crossDomain||h.hasContent)&&!q["X-Requested-With"]&&(q["X-Requested-With"]="XMLHttpRequest");try{for(C in q)v.setRequestHeader(C,q[C])}catch(P){}v.send(h.hasContent&&h.data||null);n=function(N,L){var Z,ka,xa,pa,Aa;try{if(n&&(L||v.readyState===
4)){n=c;z&&(v.onreadystatechange=o.noop,delete db[z]);if(L)v.readyState!==4&&v.abort();else{Z=v.status;xa=v.getAllResponseHeaders();pa={};(Aa=v.responseXML)&&Aa.documentElement&&(pa.xml=Aa);pa.text=v.responseText;try{ka=v.statusText}catch(Ja){ka=""}Z||!h.isLocal||h.crossDomain?Z===1223&&(Z=204):Z=pa.text?200:404}}}catch(Ea){L||u(-1,Ea)}pa&&u(Z,ka,pa,xa)};h.async&&v.readyState!==4?(db||(db={},g()),z=ac++,v.onreadystatechange=db[z]=n):n()},abort:function(){n&&n(0,1)}}}});var mb={},bc=/^(?:toggle|show|hide)$/,
cc=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,lb,pb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];o.fn.extend({show:function(h,n,q){if(h||h===0)return this.animate(e("show",3),h,n,q);q=0;for(var u=this.length;q<u;q++){h=this[q];n=h.style.display;!o._data(h,"olddisplay")&&n==="none"&&(n=h.style.display="");n===""&&o.css(h,"display")==="none"&&o._data(h,"olddisplay",b(h.nodeName))}for(q=0;q<u;q++){h=this[q];
n=h.style.display;if(n===""||n==="none")h.style.display=o._data(h,"olddisplay")||""}return this},hide:function(h,n,q){if(h||h===0)return this.animate(e("hide",3),h,n,q);h=0;for(n=this.length;h<n;h++){q=o.css(this[h],"display");q!=="none"&&!o._data(this[h],"olddisplay")&&o._data(this[h],"olddisplay",q)}for(h=0;h<n;h++)this[h].style.display="none";return this},_toggle:o.fn.toggle,toggle:function(h,n,q){var u=typeof h==="boolean";o.isFunction(h)&&o.isFunction(n)?this._toggle.apply(this,arguments):h==
null||u?this.each(function(){var v=u?h:o(this).is(":hidden");o(this)[v?"show":"hide"]()}):this.animate(e("toggle",3),h,n,q);return this},fadeTo:function(h,n,q,u){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:n},h,q,u)},animate:function(h,n,q,u){var v=o.speed(n,q,u);if(o.isEmptyObject(h))return this.each(v.complete);return this[v.queue===false?"each":"queue"](function(){var z=o.extend({},v),C,P=this.nodeType===1,N=P&&o(this).is(":hidden"),L=this;for(C in h){var Z=o.camelCase(C);
C!==Z&&(h[Z]=h[C],delete h[C],C=Z);if(h[C]==="hide"&&N||h[C]==="show"&&!N)return z.complete.call(this);if(P&&(C==="height"||C==="width")){z.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(o.css(this,"display")==="inline"&&o.css(this,"float")==="none")if(o.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"}o.isArray(h[C])&&((z.specialEasing=z.specialEasing||
{})[C]=h[C][1],h[C]=h[C][0])}z.overflow!=null&&(this.style.overflow="hidden");z.curAnim=o.extend({},h);o.each(h,function(ka,xa){var pa=new o.fx(L,z,ka);if(bc.test(xa))pa[xa==="toggle"?N?"show":"hide":xa](h);else{var Aa=cc.exec(xa),Ja=pa.cur();if(Aa){var Ea=parseFloat(Aa[2]),La=Aa[3]||(o.cssNumber[ka]?"":"px");La!=="px"&&(o.style(L,ka,(Ea||1)+La),Ja=(Ea||1)/pa.cur()*Ja,o.style(L,ka,Ja+La));Aa[1]&&(Ea=(Aa[1]==="-="?-1:1)*Ea+Ja);pa.custom(Ja,Ea,La)}else pa.custom(Ja,xa,"")}});return true})},stop:function(h,
n){var q=o.timers;h&&this.queue([]);this.each(function(){for(var u=q.length-1;u>=0;u--)q[u].elem===this&&(n&&q[u](true),q.splice(u,1))});n||this.dequeue();return this}});o.each({slideDown:e("show",1),slideUp:e("hide",1),slideToggle:e("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(h,n){o.fn[h]=function(q,u,v){return this.animate(n,q,u,v)}});o.extend({speed:function(h,n,q){var u=h&&typeof h==="object"?o.extend({},h):{complete:q||!q&&n||o.isFunction(h)&&
h,duration:h,easing:q&&n||n&&!o.isFunction(n)&&n};u.duration=o.fx.off?0:typeof u.duration==="number"?u.duration:u.duration in o.fx.speeds?o.fx.speeds[u.duration]:o.fx.speeds._default;u.old=u.complete;u.complete=function(){u.queue!==false&&o(this).dequeue();o.isFunction(u.old)&&u.old.call(this)};return u},easing:{linear:function(h,n,q,u){return q+u*h},swing:function(h,n,q,u){return(-Math.cos(h*Math.PI)/2+0.5)*u+q}},timers:[],fx:function(h,n,q){this.options=n;this.elem=h;this.prop=q;n.orig||(n.orig=
{})}});o.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(o.fx.step[this.prop]||o.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 h,n=o.css(this.elem,this.prop);return isNaN(h=parseFloat(n))?!n||n==="auto"?0:n:h},custom:function(h,n,q){function u(C){return v.step(C)}var v=this,z=o.fx;this.startTime=o.now();this.start=h;this.end=n;this.unit=
q||this.unit||(o.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;u.elem=this.elem;u()&&o.timers.push(u)&&!lb&&(lb=setInterval(z.tick,z.interval))},show:function(){this.options.orig[this.prop]=o.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(h){var n=
o.now(),q=true;if(h||n>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var u in this.options.curAnim)this.options.curAnim[u]!==true&&(q=false);if(q){if(this.options.overflow!=null&&!o.support.shrinkWrapBlocks){var v=this.elem,z=this.options;o.each(["","X","Y"],function(P,N){v.style["overflow"+N]=z.overflow[P]})}this.options.hide&&o(this.elem).hide();if(this.options.hide||this.options.show)for(var C in this.options.curAnim)o.style(this.elem,
C,this.options.orig[C]);this.options.complete.call(this.elem)}return false}h=n-this.startTime;this.state=h/this.options.duration;n=this.options.easing||(o.easing.swing?"swing":"linear");this.pos=o.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||n](this.state,h,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update();return true}};o.extend(o.fx,{tick:function(){for(var h=o.timers,n=0;n<h.length;n++)h[n]()||h.splice(n--,1);h.length||o.fx.stop()},
interval:13,stop:function(){clearInterval(lb);lb=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(h){o.style(h.elem,"opacity",h.now)},_default:function(h){h.elem.style&&h.elem.style[h.prop]!=null?h.elem.style[h.prop]=(h.prop==="width"||h.prop==="height"?Math.max(0,h.now):h.now)+h.unit:h.elem[h.prop]=h.now}}});o.expr&&o.expr.filters&&(o.expr.filters.animated=function(h){return o.grep(o.timers,function(n){return h===n.elem}).length});var dc=/^t(?:able|d|h)$/i,Cb=/^(?:body|html)$/i;
"getBoundingClientRect"in I.documentElement?o.fn.offset=function(h){var n=this[0],q;if(h)return this.each(function(C){o.offset.setOffset(this,h,C)});if(!n||!n.ownerDocument)return null;if(n===n.ownerDocument.body)return o.offset.bodyOffset(n);try{q=n.getBoundingClientRect()}catch(u){}var v=n.ownerDocument,z=v.documentElement;if(!q||!o.contains(z,n))return q?{top:q.top,left:q.left}:{top:0,left:0};n=v.body;v=d(v);return{top:q.top+(v.pageYOffset||o.support.boxModel&&z.scrollTop||n.scrollTop)-(z.clientTop||
n.clientTop||0),left:q.left+(v.pageXOffset||o.support.boxModel&&z.scrollLeft||n.scrollLeft)-(z.clientLeft||n.clientLeft||0)}}:o.fn.offset=function(h){var n=this[0];if(h)return this.each(function(L){o.offset.setOffset(this,h,L)});if(!n||!n.ownerDocument)return null;if(n===n.ownerDocument.body)return o.offset.bodyOffset(n);o.offset.initialize();var q,u=n.offsetParent,v=n.ownerDocument,z=v.documentElement,C=v.body;q=(v=v.defaultView)?v.getComputedStyle(n,null):n.currentStyle;for(var P=n.offsetTop,N=
n.offsetLeft;(n=n.parentNode)&&n!==C&&n!==z;){if(o.offset.supportsFixedPosition&&q.position==="fixed")break;q=v?v.getComputedStyle(n,null):n.currentStyle;P-=n.scrollTop;N-=n.scrollLeft;n===u&&(P+=n.offsetTop,N+=n.offsetLeft,o.offset.doesNotAddBorder&&(!o.offset.doesAddBorderForTableAndCells||!dc.test(n.nodeName))&&(P+=parseFloat(q.borderTopWidth)||0,N+=parseFloat(q.borderLeftWidth)||0),u=n.offsetParent);o.offset.subtractsBorderForOverflowNotVisible&&q.overflow!=="visible"&&(P+=parseFloat(q.borderTopWidth)||
0,N+=parseFloat(q.borderLeftWidth)||0);q=q}if(q.position==="relative"||q.position==="static"){P+=C.offsetTop;N+=C.offsetLeft}o.offset.supportsFixedPosition&&q.position==="fixed"&&(P+=Math.max(z.scrollTop,C.scrollTop),N+=Math.max(z.scrollLeft,C.scrollLeft));return{top:P,left:N}};o.offset={initialize:function(){var h=I.body,n=I.createElement("div"),q,u,v,z=parseFloat(o.css(h,"marginTop"))||0;o.extend(n.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});
n.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>";h.insertBefore(n,h.firstChild);q=n.firstChild;u=q.firstChild;v=q.nextSibling.firstChild.firstChild;this.doesNotAddBorder=u.offsetTop!==5;this.doesAddBorderForTableAndCells=v.offsetTop===5;u.style.position=
"fixed";u.style.top="20px";this.supportsFixedPosition=u.offsetTop===20||u.offsetTop===15;u.style.position=u.style.top="";q.style.overflow="hidden";q.style.position="relative";this.subtractsBorderForOverflowNotVisible=u.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=h.offsetTop!==z;h.removeChild(n);o.offset.initialize=o.noop},bodyOffset:function(h){var n=h.offsetTop,q=h.offsetLeft;o.offset.initialize();o.offset.doesNotIncludeMarginInBodyOffset&&(n+=parseFloat(o.css(h,"marginTop"))||0,q+=parseFloat(o.css(h,
"marginLeft"))||0);return{top:n,left:q}},setOffset:function(h,n,q){var u=o.css(h,"position");u==="static"&&(h.style.position="relative");var v=o(h),z=v.offset(),C=o.css(h,"top"),P=o.css(h,"left"),N=u==="absolute"&&o.inArray("auto",[C,P])>-1;u={};var L={};N&&(L=v.position());C=N?L.top:parseInt(C,10)||0;P=N?L.left:parseInt(P,10)||0;o.isFunction(n)&&(n=n.call(h,q,z));n.top!=null&&(u.top=n.top-z.top+C);n.left!=null&&(u.left=n.left-z.left+P);"using"in n?n.using.call(h,u):v.css(u)}};o.fn.extend({position:function(){if(!this[0])return null;
var h=this[0],n=this.offsetParent(),q=this.offset(),u=Cb.test(n[0].nodeName)?{top:0,left:0}:n.offset();q.top-=parseFloat(o.css(h,"marginTop"))||0;q.left-=parseFloat(o.css(h,"marginLeft"))||0;u.top+=parseFloat(o.css(n[0],"borderTopWidth"))||0;u.left+=parseFloat(o.css(n[0],"borderLeftWidth"))||0;return{top:q.top-u.top,left:q.left-u.left}},offsetParent:function(){return this.map(function(){for(var h=this.offsetParent||I.body;h&&!Cb.test(h.nodeName)&&o.css(h,"position")==="static";)h=h.offsetParent;return h})}});
o.each(["Left","Top"],function(h,n){var q="scroll"+n;o.fn[q]=function(u){var v=this[0],z;if(!v)return null;if(u!==c)return this.each(function(){(z=d(this))?z.scrollTo(h?o(z).scrollLeft():u,h?u:o(z).scrollTop()):this[q]=u});return(z=d(v))?"pageXOffset"in z?z[h?"pageYOffset":"pageXOffset"]:o.support.boxModel&&z.document.documentElement[q]||z.document.body[q]:v[q]}});o.each(["Height","Width"],function(h,n){var q=n.toLowerCase();o.fn["inner"+n]=function(){return this[0]?parseFloat(o.css(this[0],q,"padding")):
null};o.fn["outer"+n]=function(u){return this[0]?parseFloat(o.css(this[0],q,u?"margin":"border")):null};o.fn[q]=function(u){var v=this[0];if(!v)return u==null?null:this;if(o.isFunction(u))return this.each(function(C){var P=o(this);P[q](u.call(this,C,P[q]()))});if(o.isWindow(v)){var z=v.document.documentElement["client"+n];return v.document.compatMode==="CSS1Compat"&&z||v.document.body["client"+n]||z}if(v.nodeType===9)return Math.max(v.documentElement["client"+n],v.body["scroll"+n],v.documentElement["scroll"+
n],v.body["offset"+n],v.documentElement["offset"+n]);if(u===c){v=o.css(v,q);z=parseFloat(v);return o.isNaN(z)?v:z}return this.css(q,typeof u==="string"?u:u+"px")}});a.jQuery=a.$=o})(window);
(function(){var a=this,c=a._,d={},b=Array.prototype,e=Object.prototype,f=b.slice,g=b.unshift,m=e.toString,p=e.hasOwnProperty,t=b.forEach,y=b.map,A=b.reduce,E=b.reduceRight,J=b.filter,Q=b.every,K=b.some,H=b.indexOf,aa=b.lastIndexOf;e=Array.isArray;var U=Object.keys,B=function(w){return new o(w)};if(typeof module!=="undefined"&&module.exports){module.exports=B;B._=B}else a._=B;B.VERSION="1.1.4";var ga=B.each=B.forEach=function(w,G,S){if(w!=null)if(t&&w.forEach===t)w.forEach(G,S);else if(B.isNumber(w.length))for(var W=
0,ja=w.length;W<ja;W++){if(G.call(S,w[W],W,w)===d)break}else for(W in w)if(p.call(w,W))if(G.call(S,w[W],W,w)===d)break};B.map=function(w,G,S){var W=[];if(w==null)return W;if(y&&w.map===y)return w.map(G,S);ga(w,function(ja,qa,Ba){W[W.length]=G.call(S,ja,qa,Ba)});return W};B.reduce=B.foldl=B.inject=function(w,G,S,W){var ja=S!==void 0;if(w==null)w=[];if(A&&w.reduce===A){if(W)G=B.bind(G,W);return ja?w.reduce(G,S):w.reduce(G)}ga(w,function(qa,Ba,Da){if(!ja&&Ba===0){S=qa;ja=true}else S=G.call(W,S,qa,Ba,
Da)});if(!ja)throw new TypeError("Reduce of empty array with no initial value");return S};B.reduceRight=B.foldr=function(w,G,S,W){if(w==null)w=[];if(E&&w.reduceRight===E){if(W)G=B.bind(G,W);return S!==void 0?w.reduceRight(G,S):w.reduceRight(G)}w=(B.isArray(w)?w.slice():B.toArray(w)).reverse();return B.reduce(w,G,S,W)};B.find=B.detect=function(w,G,S){var W;ra(w,function(ja,qa,Ba){if(G.call(S,ja,qa,Ba)){W=ja;return true}});return W};B.filter=B.select=function(w,G,S){var W=[];if(w==null)return W;if(J&&
w.filter===J)return w.filter(G,S);ga(w,function(ja,qa,Ba){if(G.call(S,ja,qa,Ba))W[W.length]=ja});return W};B.reject=function(w,G,S){var W=[];if(w==null)return W;ga(w,function(ja,qa,Ba){G.call(S,ja,qa,Ba)||(W[W.length]=ja)});return W};B.every=B.all=function(w,G,S){G=G||B.identity;var W=true;if(w==null)return W;if(Q&&w.every===Q)return w.every(G,S);ga(w,function(ja,qa,Ba){if(!(W=W&&G.call(S,ja,qa,Ba)))return d});return W};var ra=B.some=B.any=function(w,G,S){G=G||B.identity;var W=false;if(w==null)return W;
if(K&&w.some===K)return w.some(G,S);ga(w,function(ja,qa,Ba){if(W=G.call(S,ja,qa,Ba))return d});return W};B.include=B.contains=function(w,G){var S=false;if(w==null)return S;if(H&&w.indexOf===H)return w.indexOf(G)!=-1;ra(w,function(W){if(S=W===G)return true});return S};B.invoke=function(w,G){var S=f.call(arguments,2);return B.map(w,function(W){return(G?W[G]:W).apply(W,S)})};B.pluck=function(w,G){return B.map(w,function(S){return S[G]})};B.max=function(w,G,S){if(!G&&B.isArray(w))return Math.max.apply(Math,
w);var W={computed:-Infinity};ga(w,function(ja,qa,Ba){qa=G?G.call(S,ja,qa,Ba):ja;qa>=W.computed&&(W={value:ja,computed:qa})});return W.value};B.min=function(w,G,S){if(!G&&B.isArray(w))return Math.min.apply(Math,w);var W={computed:Infinity};ga(w,function(ja,qa,Ba){qa=G?G.call(S,ja,qa,Ba):ja;qa<W.computed&&(W={value:ja,computed:qa})});return W.value};B.sortBy=function(w,G,S){return B.pluck(B.map(w,function(W,ja,qa){return{value:W,criteria:G.call(S,W,ja,qa)}}).sort(function(W,ja){var qa=W.criteria,Ba=
ja.criteria;return qa<Ba?-1:qa>Ba?1:0}),"value")};B.sortedIndex=function(w,G,S){S=S||B.identity;for(var W=0,ja=w.length;W<ja;){var qa=W+ja>>1;S(w[qa])<S(G)?W=qa+1:ja=qa}return W};B.toArray=function(w){if(!w)return[];if(w.toArray)return w.toArray();if(B.isArray(w))return w;if(B.isArguments(w))return f.call(w);return B.values(w)};B.size=function(w){return B.toArray(w).length};B.first=B.head=function(w,G,S){return G&&!S?f.call(w,0,G):w[0]};B.rest=B.tail=function(w,G,S){return f.call(w,B.isUndefined(G)||
S?1:G)};B.last=function(w){return w[w.length-1]};B.compact=function(w){return B.filter(w,function(G){return!!G})};B.flatten=function(w){return B.reduce(w,function(G,S){if(B.isArray(S))return G.concat(B.flatten(S));G[G.length]=S;return G},[])};B.without=function(w){var G=f.call(arguments,1);return B.filter(w,function(S){return!B.include(G,S)})};B.uniq=B.unique=function(w,G){return B.reduce(w,function(S,W,ja){if(0==ja||(G===true?B.last(S)!=W:!B.include(S,W)))S[S.length]=W;return S},[])};B.intersect=
function(w){var G=f.call(arguments,1);return B.filter(B.uniq(w),function(S){return B.every(G,function(W){return B.indexOf(W,S)>=0})})};B.zip=function(){for(var w=f.call(arguments),G=B.max(B.pluck(w,"length")),S=Array(G),W=0;W<G;W++)S[W]=B.pluck(w,""+W);return S};B.indexOf=function(w,G,S){if(w==null)return-1;if(S){S=B.sortedIndex(w,G);return w[S]===G?S:-1}if(H&&w.indexOf===H)return w.indexOf(G);S=0;for(var W=w.length;S<W;S++)if(w[S]===G)return S;return-1};B.lastIndexOf=function(w,G){if(w==null)return-1;
if(aa&&w.lastIndexOf===aa)return w.lastIndexOf(G);for(var S=w.length;S--;)if(w[S]===G)return S;return-1};B.range=function(w,G,S){var W=f.call(arguments),ja=W.length<=1;w=ja?0:W[0];G=ja?W[0]:W[1];S=W[2]||1;W=Math.max(Math.ceil((G-w)/S),0);ja=0;for(var qa=Array(W);ja<W;){qa[ja++]=w;w+=S}return qa};B.bind=function(w,G){var S=f.call(arguments,2);return function(){return w.apply(G||{},S.concat(f.call(arguments)))}};B.bindAll=function(w){var G=f.call(arguments,1);if(G.length==0)G=B.functions(w);ga(G,function(S){w[S]=
B.bind(w[S],w)});return w};B.memoize=function(w,G){var S={};G=G||B.identity;return function(){var W=G.apply(this,arguments);return W in S?S[W]:S[W]=w.apply(this,arguments)}};B.delay=function(w,G){var S=f.call(arguments,2);return setTimeout(function(){return w.apply(w,S)},G)};B.defer=function(w){return B.delay.apply(B,[w,1].concat(f.call(arguments,1)))};var da=function(w,G,S){var W;return function(){var ja=this,qa=arguments,Ba=function(){W=null;w.apply(ja,qa)};S&&clearTimeout(W);if(S||!W)W=setTimeout(Ba,
G)}};B.throttle=function(w,G){return da(w,G,false)};B.debounce=function(w,G){return da(w,G,true)};B.wrap=function(w,G){return function(){var S=[w].concat(f.call(arguments));return G.apply(this,S)}};B.compose=function(){var w=f.call(arguments);return function(){for(var G=f.call(arguments),S=w.length-1;S>=0;S--)G=[w[S].apply(this,G)];return G[0]}};B.keys=U||function(w){if(B.isArray(w))return B.range(0,w.length);var G=[],S;for(S in w)if(p.call(w,S))G[G.length]=S;return G};B.values=function(w){return B.map(w,
B.identity)};B.functions=B.methods=function(w){return B.filter(B.keys(w),function(G){return B.isFunction(w[G])}).sort()};B.extend=function(w){ga(f.call(arguments,1),function(G){for(var S in G)w[S]=G[S]});return w};B.clone=function(w){return B.isArray(w)?w.slice():B.extend({},w)};B.tap=function(w,G){G(w);return w};B.isEqual=function(w,G){if(w===G)return true;var S=typeof w;if(S!=typeof G)return false;if(w==G)return true;if(!w&&G||w&&!G)return false;if(w._chain)w=w._wrapped;if(G._chain)G=G._wrapped;
if(w.isEqual)return w.isEqual(G);if(B.isDate(w)&&B.isDate(G))return w.getTime()===G.getTime();if(B.isNaN(w)&&B.isNaN(G))return false;if(B.isRegExp(w)&&B.isRegExp(G))return w.source===G.source&&w.global===G.global&&w.ignoreCase===G.ignoreCase&&w.multiline===G.multiline;if(S!=="object")return false;if(w.length&&w.length!==G.length)return false;S=B.keys(w);var W=B.keys(G);if(S.length!=W.length)return false;for(var ja in w)if(!(ja in G)||!B.isEqual(w[ja],G[ja]))return false;return true};B.isEmpty=function(w){if(B.isArray(w)||
B.isString(w))return w.length===0;for(var G in w)if(p.call(w,G))return false;return true};B.isElement=function(w){return!!(w&&w.nodeType==1)};B.isArray=e||function(w){return m.call(w)==="[object Array]"};B.isArguments=function(w){return!!(w&&p.call(w,"callee"))};B.isFunction=function(w){return!!(w&&w.constructor&&w.call&&w.apply)};B.isString=function(w){return!!(w===""||w&&w.charCodeAt&&w.substr)};B.isNumber=function(w){return!!(w===0||w&&w.toExponential&&w.toFixed)};B.isNaN=function(w){return w!==
w};B.isBoolean=function(w){return w===true||w===false};B.isDate=function(w){return!!(w&&w.getTimezoneOffset&&w.setUTCFullYear)};B.isRegExp=function(w){return!!(w&&w.test&&w.exec&&(w.ignoreCase||w.ignoreCase===false))};B.isNull=function(w){return w===null};B.isUndefined=function(w){return w===void 0};B.noConflict=function(){a._=c;return this};B.identity=function(w){return w};B.times=function(w,G,S){for(var W=0;W<w;W++)G.call(S,W)};B.mixin=function(w){ga(B.functions(w),function(G){ia(G,B[G]=w[G])})};
var I=0;B.uniqueId=function(w){var G=I++;return w?w+G:G};B.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g};B.template=function(w,G){var S=B.templateSettings;S="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+w.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(S.interpolate,function(W,ja){return"',"+ja.replace(/\\'/g,"'")+",'"}).replace(S.evaluate||null,function(W,ja){return"');"+ja.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,
"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";S=new Function("obj",S);return G?S(G):S};var o=function(w){this._wrapped=w};B.prototype=o.prototype;var va=function(w,G){return G?B(w).chain():w},ia=function(w,G){o.prototype[w]=function(){var S=f.call(arguments);g.call(S,this._wrapped);return va(G.apply(B,S),this._chain)}};B.mixin(B);ga(["pop","push","reverse","shift","sort","splice","unshift"],function(w){var G=b[w];o.prototype[w]=function(){G.apply(this._wrapped,arguments);
return va(this._wrapped,this._chain)}});ga(["concat","join","slice"],function(w){var G=b[w];o.prototype[w]=function(){return va(G.apply(this._wrapped,arguments),this._chain)}});o.prototype.chain=function(){this._chain=true;return this};o.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,e){d+=", "+e;c[e]=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 e=a;if(d)e=d.getName()+"."+a;b._name=e}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,e){c._initializeFromProp(e,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(e,f){typeof e=="function"?b.meta.addMethod(f,e):b.meta.addAttribute(f,{init:e})});this.addSuperClass(b)},addSuperClass:function(a){this.dieIfString(a);for(var c=this,d=a.meta.getMethodNames(),b=0;b<d.length;b++){var e=d[b],f=a.meta.getMethodObject(e);if(f){f=
f.copy();f.setIsFromSuperClass(true);c.addMethodObject(f)}if(f=a.meta.getClassMethodObject(e)){f=f.copy();f.setIsFromSuperClass(true);c.addMethodObject(f)}}Joose.O.eachSafe(a.meta.attributes,function(g,m){c.addAttribute(m,g.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 e=this.getMethodObject(a);if(e)this.addMethodObject(e[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,e){d.addAttribute(e,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(),e;if(b){if(!b.meta)throw Error("Isa declarations in attribute declarations must be Joose classes, roles or type constraints");
var f=false,g=false;if(Joose.Role&&b.meta.meta.isa(Joose.Role))f=true;else if(Joose.TypeConstraint&&b.meta.isa(Joose.TypeConstraint))g=true;e=function(m,p){var t=m;try{if(!(d.nullable===true&&t==undefined))if(g){var y=null;if(d.coerce)y=b.coerce(t);if(y==null&&d.nullable!==true)b.validate(t);else t=y}else{if(!t||!t.meta)throw new ReferenceError("The attribute "+c+" only accepts values that have a meta object.");if(!(f?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(A){if(p)p.call(this,A,b);else throw A;}this[c]=t;return this}}else e=function(m){this[c]=m;return this};a.addMethod(this.setterName(),e)},addGetter:function(a){a=a.meta;var c=this.getName(),d=this.getProps(),b=function(){return this[c]},e=d.init;if(d.lazy)b=function(){var f=this[c];if(typeof f=="function"&&f===e)this[c]=f.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 e=joose.top;b=b.split(".");for(var f=0;f<b.length;f++)e=e[b[f]];d=e}if(d==null){if(c&&c.meta){e=c.meta;delete c.meta}else e=c&&c.isa&&c.isa!=Joose.Class?c.isa.meta.builder:
Joose.Class;d=new e;d.builder=e;d=d.createClass(a,null,joose.currentModule);d.meta.builder=e;b=d.meta.className();if(a&&b){e=joose.top;b=(new String(b)).split(".");for(f=0;f<b.length-1;f++){if(e[b[f]]==null)e[b[f]]={};e=e[b[f]]}e[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 e in c.prototype)if(e!="meta"){var f=c.prototype[e];if(typeof f=="function")b.addMethod(e,f);else{var g={};if(typeof f!="undefined")g.init=f;b.addAttribute(e,g)}}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,e=this.SUPER;this.SUPER=function(){return d.apply(b,arguments)};var f=c.apply(this,arguments);this.SUPER=e;return f})},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 e=this.INNER;this.INNER=function(){return b.__INNER_STACK__.pop().apply(b,arguments)};var f=d.apply(this,arguments);this.INNER=e;return f})}}})})(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(),e=this.getName(),f,g=false;if(typeof d!="undefined"&&typeof d[b]!="undefined"){f=d[b];g=true}else{var m=this.getProps(),p=m.init;if(typeof p=="function"&&!m.lazy){f=p.call(c);g=true}else if(m.required)throw"Required initialization parameter missing: "+
b+"(While initializing "+c+")";}if(g){b=this.setterName();if(c.meta.can(b))c[b](f);else c[e]=f}},handleHandles:function(c){c=c.meta;var d=this.getName(),b=this.getProps(),e=b.handles,f=b.isa;if(e)if(e=="*"){if(!f)throw"I need an isa property in order to handle a class";c.decorate(f,d,b.handleWith)}else throw"Unsupported value for handles: "+e;},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,e=false,f=[],g=0;g<b.length;g++)if(b[g]===d)e=true;else f.push(b[g]);if(!e)throw Error("The role "+
this.className()+" was not applied to the object at runtime");b=c.meta.getSuperClass().meta.makeAnonSubclass();e=new b;for(g=0;g<f.length;g++){d=f[g];b.meta.addRole(d)}b.prototype=e;c.meta=b.meta;c.constructor=b;c.__proto__=e},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(e){var f=d.getMethodObject(e);f&&d.addMethodToClass(f,c);(f=d.getClassMethodObject(e))&&d.addMethodToClass(f,c)});this.metaRoles&&Joose.A.each(this.metaRoles,function(e){e.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,e=true;Joose.A.each(this.requiresMethodNames,function(f){if(!c.meta.can(f)){if(d)throw"Class "+c.meta.className()+" does not fully implement the role "+b.className()+". The method is "+f+" missing.";e=false}});return e},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,e){c.handleGearsMessage(e)}}},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 e="on"+Joose.S.uppercaseFirst(c),f=this.meta.getClassObject().ajaxRequest;if(this.canGears()){var g=this.can("jsonURL")?this.c.jsonURL():"json2.js";g=(new Joose.SimpleRequest).getText(g);var m="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 = "+f.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";m+=g;var p=this.wp,t=p.createWorker(m),y=this;g=function(){for(var A=[],E=0;E<arguments.length;E++)A.push(arguments[E]);p.sendMessage({args:A,cbName:e,index:y.callIndex},t);y.calls[y.callIndex]=this;y.callIndex++}}else g=function(){var A=this,E={sendReturn:function(Q,K){A.meta.can(K)&&A[K].call(A,Q)},clientHasGears:function(){return false},ajaxRequest:f},J=d.apply(E,arguments);E.sendReturn(J,e)};this.addMethod(c,
g,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,e,f){var g;g=this.clientHasGears()?google.gears.factory.create("beta.httprequest"):
window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest;var m="";if(b)for(var p in b)m+=encodeURIComponent(p)+"="+encodeURIComponent(b[p])+"&";var t=d;if(b&&c=="GET")t+="?"+m;g.open(c,t,true);g.onreadystatechange=function(){if(g.readyState==4)if(g.status>=200&&g.status<400)e(g.responseText);else if(f)return f(g);else throw Error("Error fetching url "+t+". Response code: "+g.status+" Response text: "+g.responseText);};if(b&&c=="POST")g.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
else m="";g.send(m)}}})})(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 e=d.identity();if(b[e])return{__ID__:e}}d.meta.can("prepareStorage")&&d.prepareStorage();if(b)b[d.identity()]=true;var f={__CLASS__:this.packedClassName(d),__ID__:d.identity()};e=d.meta.getAttributes();Joose.O.eachSafe(e,function(g,m){if(g.isPersistent())f[m]=d[m]});return f},unpack:function(d,b){var e=d.meta.instantiate(),f=false;Joose.O.eachSafe(b,function(g,m){if(m=="__CLASS__"){var p=Joose.Storage.Unpacker.packedClassNameToJSClassName(g);
if(p!=e.meta.className())throw Error("Storage data is of wrong type "+p+". I am "+e.meta.className()+".");f=true}else e[m]=g});if(!f)throw Error("Serialized data needs to include a __CLASS__ attribute.: "+b);delete e.__ID__;e.meta.can("finishUnpack")&&e.finishUnpack();return e},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 e=
d.identity();if(b[e])return{objectid__:e}}d.meta.can("prepareStorage")&&d.prepareStorage();if(b)b[d.identity()]=true;var f={classname__:this.packedClassName(d),classmodule__:this.packedModuleName(d),objectid__:d.identity()};e=d.meta.getAttributes();Joose.O.eachSafe(e,function(g,m){if(g.isPersistent())f[m]=d[m]});return f},unpack:function(d,b){var e=d.meta.instantiate(),f=false;Joose.O.eachSafe(b,function(g,m){if(m=="classname__"){var p=g,t=b.classmodule__;if(t)p=""+t+"."+g;if(p!=e.meta.className())throw Error("Storage data is of wrong type "+
p+". I am "+e.meta.className()+".");f=true}else if(m!="classmodule__")e[m]=g});if(!f)throw Error("Serialized data needs to include a __CLASS__ attribute.: "+b);e.meta.can("finishUnpack")&&e.finishUnpack();return e},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(e,f){Joose.Storage.CACHE={};return c(e,function(g,m){var p=m;if(f)p=f(g,m);return d(g,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 e=this;c=c.meta.getInstanceMethods();Joose.A.each(c,function(f){var g=f.getName();if(!e.can(g)){f=function(){var m=this[d];return m[g].apply(m,arguments)};if(b)f=b(g);e.addMethod(g,f)}})}}});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("."),e=joose.top,f=[],g,m=0;m<b.length;m++){var p=b[m];if(p=="meta")throw"Module names may not include a part called 'meta'.";g=e[p];f.push(p);c=f.join(".");if(typeof g=="undefined"){e[p]={};g=new Joose.Module(c);g.setContainer(e[p]);e[p].meta=g;Joose.Module._allModules.push(e[p])}else{g=g.meta;if(!(g&&g.meta&&g.meta.isa(Joose.Module)))throw"Trying to setup module "+
c+" failed. There is already something else: "+g;}e=e[p]}b=joose.currentModule;joose.currentModule=g;d&&d(e);joose.currentModule=b;return e},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 e=d.globalName(b.meta.className());if(c[e]!==b){if(typeof c[e]!="undefined")throw"There is already something else in the spot "+e;c[e]=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 e=0;e<d.coerce.length;e++){var f=d.coerce[e];b.addCoercion(new Joose.TypeCoercion({from:f.from,via:f.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,e;b=0;for(e=d.length;b<e;b++){var f=d[b],g=false;g=f instanceof RegExp?f.test(c):f.call(this,c);if(!g)return b}return-1},coerce:function(c){if(this.validateBool(c))return c;for(var d=this._coercions,b=0,e=d.length;b<e;b++){var f=d[b].coerce(c);if(f!==null)return f}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){if(this._from.validateBool(d))return this._via(d);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){e.lastIndex=0;return e.test(t)?'"'+t.replace(e,function(y){var A=m[y];return typeof A==="string"?A:"\\u"+("0000"+y.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function d(t,y){var A,E,J,Q,K=f,H,aa=y[t];if(aa&&typeof aa==="object"&&typeof aa.toJSON==="function")aa=aa.toJSON(t);if(typeof p==="function")aa=p.call(y,t,aa);switch(typeof aa){case "string":return c(aa);case "number":return isFinite(aa)?String(aa):"null";case "boolean":case "null":return String(aa);
case "object":if(!aa)return"null";f+=g;H=[];if(Object.prototype.toString.apply(aa)==="[object Array]"){Q=aa.length;for(A=0;A<Q;A+=1)H[A]=d(A,aa)||"null";J=H.length===0?"[]":f?"[\n"+f+H.join(",\n"+f)+"\n"+K+"]":"["+H.join(",")+"]";f=K;return J}if(p&&typeof p==="object"){Q=p.length;for(A=0;A<Q;A+=1){E=p[A];if(typeof E==="string")if(J=d(E,aa))H.push(c(E)+(f?": ":":")+J)}}else for(E in aa)if(Object.hasOwnProperty.call(aa,E))if(J=d(E,aa))H.push(c(E)+(f?": ":":")+J);J=H.length===0?"{}":f?"{\n"+f+H.join(",\n"+
f)+"\n"+K+"}":"{"+H.join(",")+"}";f=K;return J}}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,
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,m={"":"\\b","\t":"\\t","\n":"\\n","":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},p;if(typeof JSON.stringify!=="function")JSON.stringify=function(t,y,A){var E;g=f="";if(typeof A==="number")for(E=0;E<A;E+=1)g+=" ";else if(typeof A==="string")g=A;if((p=y)&&typeof y!=="function"&&(typeof y!=="object"||typeof y.length!=="number"))throw Error("JSON.stringify");return d("",{"":t})};
if(typeof JSON.parse!=="function")JSON.parse=function(t,y){function A(J,Q){var K,H,aa=J[Q];if(aa&&typeof aa==="object")for(K in aa)if(Object.hasOwnProperty.call(aa,K)){H=A(aa,K);if(H!==undefined)aa[K]=H;else delete aa[K]}return y.call(J,Q,aa)}var E;b.lastIndex=0;if(b.test(t))t=t.replace(b,function(J){return"\\u"+("0000"+J.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 y==="function"?A({"":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(e,f){var g=d.getAttribute(f);if(!g)throw Error("Cant find attribute "+f+" for binding");b.push(f);var m={selector:null,accessor:"val",args:[],notifyOn:[]};Joose.O.extend(m,e);var p=m.selector,t=m.accessor,y=m.args,A=m.notifyOn;m=g.getterName();g=g.setterName();d.wrapMethod(m,"before",function(){var E=this.$;if(p)E=this.$.find(p);E=E[t].apply(E,
y);this[f]=E});d.wrapMethod(g,"after",function(){var E=this[f],J=this.$;if(p)J=this.$.find(p);for(var Q=[],K=0;K<y.length;K++)Q.push(y[K]);Q.push(E);J[t].apply(J,Q)});d.wrapMethod("draw","after",function(){for(var E=this,J=0;J<A.length;J++){var Q=A[J],K=this.$;if(p)K=K.find(p);K.bind(Q,function(H){E.notify(Q,this,H)})}})});d.addMethod("redraw",function(){for(var e=0;e<b.length;e++){var f=b[e];this[this.meta.getAttribute(f).setterName()](this[f])}})}}});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,e){return function(f,g){var m=(g?a.sprintf(g,f):""+f).split("."),p=m[0];m=m.length>1?b+m[1]:"";for(var t=/(\d+)(\d{3})/;t.test(p);)p=p.replace(t,"$1"+e+"$2");return p+m}};var d={};Class("Factory",{classMethods:{register:function(b){d[b.identifier()]=b},get:function(b){b=b||c;var e=d[b];if(!e)throw Error("Unknown culture "+b);return e}}});
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],e=RegExp(/(%([%]|(\-)?(\+|\x20)?(0)?(\d+)?(\.(\d)?)?([bcdfosxX])))/g),f=[],g=[],m=0,p=0,t=0;p=0;for(var y="",A=null;A=e.exec(b);){if(A[9])m+=1;p=p;t=e.lastIndex-A[0].length;g[g.length]=b.substring(p,t);p=e.lastIndex;f[f.length]={match:A[0],left:A[3]?true:false,sign:A[4]||"",pad:A[5]||" ",min:A[6]||0,precision:A[8],code:A[9]||"%",negative:parseInt(arguments[m])<0?true:false,argument:String(arguments[m])}}g[g.length]=b.substring(p);if(f.length==0)return b;
if(arguments.length-1<m)return null;b=null;for(b=0;b<f.length;b++){if(f[b].code=="%")substitution="%";else if(f[b].code=="b"){f[b].argument=String(Math.abs(parseInt(f[b].argument)).toString(2));substitution=sprintfWrapper.convert(f[b],true)}else if(f[b].code=="c"){f[b].argument=String(String.fromCharCode(parseInt(Math.abs(parseInt(f[b].argument)))));substitution=sprintfWrapper.convert(f[b],true)}else if(f[b].code=="d"){f[b].argument=String(Math.abs(parseInt(f[b].argument)));substitution=sprintfWrapper.convert(f[b])}else if(f[b].code==
"f"){f[b].argument=String(Math.abs(parseFloat(f[b].argument)).toFixed(f[b].precision?f[b].precision:6));substitution=sprintfWrapper.convert(f[b])}else if(f[b].code=="o"){f[b].argument=String(Math.abs(parseInt(f[b].argument)).toString(8));substitution=sprintfWrapper.convert(f[b])}else if(f[b].code=="s"){f[b].argument=f[b].argument.substring(0,f[b].precision?f[b].precision:f[b].argument.length);substitution=sprintfWrapper.convert(f[b],true)}else if(f[b].code=="x"){f[b].argument=String(Math.abs(parseInt(f[b].argument)).toString(16));
substitution=sprintfWrapper.convert(f[b])}else if(f[b].code=="X"){f[b].argument=String(Math.abs(parseInt(f[b].argument)).toString(16));substitution=sprintfWrapper.convert(f[b]).toUpperCase()}else substitution=f[b].match;y+=g[b];y+=substitution}y+=g[b];return y},convert:function(b,e){b.sign=e?"":b.negative?"-":b.sign;var f=b.min-b.argument.length+1-b.sign.length;f=Array(f<0?0:f).join(b.pad);return b.left?b.pad=="0"||e?b.sign+b.argument+f.replace(/0/g," "):b.sign+b.argument+f:b.pad=="0"||e?b.sign+f+
b.argument:f+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(e){var f=e.getName();e=e.getterName();var g;g=e&&c[e]?c[e]():c[g];b.log("  "+f+" = "+g)})}}});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(e){return e};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 da=B.selected();if(!da)return false;var I=da.result;Q=I;if(d.multiple){var o=f(E.val());if(o.length>1)I=o.slice(0,o.length-1).join(d.multipleSeparator)+d.multipleSeparator+I;I+=d.multipleSeparator}E.val(ra(I));m();E.trigger("result",[da.data,da.value]);return true}function e(da,I){if(aa==y.DEL)B.hide();else{s2.Logger.debug("Open");
var o=E.val();if(o.match(/\.\.\.$/))o=E.data("completeValue");if(!(!I&&o==Q)){s2.Logger.debug("Open2");Q=o;o=g(o);if(o.length>=d.minChars){E.addClass(d.loadingClass);d.matchCase||(o=o.toLowerCase());t(o,p,m);s2.Logger.debug("Open3")}else{E.removeClass(d.loadingClass);B.hide();s2.Logger.debug("Open4")}}}}function f(da){if(!da)return[""];da=da.split(d.multipleSeparator);var I=[];a.each(da,function(o,va){if(a.trim(va))I[o]=a.trim(va)});return I}function g(da){if(!d.multiple)return da;da=f(da);return da[da.length-
1]}function m(){s2.tuifly.controller.AirportInfoHideEvent.trigger();var da=B.visible();B.hide();clearTimeout(J);E.removeClass(d.loadingClass);d.mustMatch&&E.search(function(I){if(!I)if(d.multiple){I=f(E.val()).slice(0,-1);E.val(ra(I.join(d.multipleSeparator)+(I.length?d.multipleSeparator:"")))}else E.val("")});da&&a.Autocompleter.Selection(c,c.value.length,c.value.length)}function p(da,I){if(I&&I.length&&H){E.removeClass(d.loadingClass);B.display(I,da);var o=I[0].value;if(d.autoFill&&g(E.val()).toLowerCase()==
da.toLowerCase()&&aa!=y.BACKSPACE){E.val(ra(E.val()+o.substring(g(Q).length)));a.Autocompleter.Selection(c,Q.length,Q.length+o.length)}B.show();B.scrollTo(E.val())}else m()}function t(da,I,o){d.matchCase||(da=da.toLowerCase());var va=K.load(da);s2.Logger.debug("Open4.5");if(va&&va.length){s2.Logger.debug("Open5 "+va.length);I(da,va)}else if(typeof d.url=="string"&&d.url.length>0){var ia={timestamp:+new Date};a.each(d.extraParams,function(w,G){ia[w]=typeof G=="function"?G():G});a.ajax({mode:"abort",
port:"autocomplete"+c.name,dataType:d.dataType,url:d.url,data:a.extend({q:g(da),limit:d.max},ia),success:function(w){var G;if(!(G=d.parse&&d.parse(w))){G=[];w=w.split("\n");for(var S=0;S<w.length;S++){var W=a.trim(w[S]);if(W){W=W.split("|");G[G.length]={data:W,value:W[0],result:d.formatResult&&d.formatResult(W,W[0])||W[0]}}}G=G}G=G;K.add(da,G);I(da,G)}})}else{B.emptyList();o(da)}}var y={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},A,E=a(c).attr("autocomplete",
"off").addClass(d.inputClass),J,Q="",K=a.Autocompleter.Cache(d),H=0,aa,U={mouseDownOnSelect:false},B=a.Autocompleter.Select(d,c,b,U);B.init();var ga;a.browser.opera&&a(c.form).bind("submit.autocomplete",function(){if(ga)return ga=false});E.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(da){aa=da.keyCode;switch(da.keyCode){case y.UP:da.preventDefault();B.visible()?B.prev():e(0,true);break;case y.DOWN:da.preventDefault();B.visible()?B.next():e(0,true);break;case y.PAGEUP:da.preventDefault();
B.visible()?B.pageUp():e(0,true);break;case y.PAGEDOWN:da.preventDefault();B.visible()?B.pageDown():e(0,true);break;case d.multiple&&a.trim(d.multipleSeparator)==","&&y.COMMA:case y.TAB:if(b()){da.preventDefault();return ga=true}break;case y.RETURN:if(b()){da.preventDefault();ga=true;return false}break;case y.ESC:B.hide();break;default:clearTimeout(J);J=setTimeout(e,d.delay)}}).focus(function(){s2.Logger.debug("focus");H++}).blur(function(){H=0;if(!U.mouseDownOnSelect){m();s2.Logger.debug("blur/hide")}}).click(function(){d.showAllOnFullMatch=
true;if(H++>0&&!B.visible()){e(0,true);A=(new Date).getTime()}d.showAllOnFullMatch=false}).bind("search",function(){function da(o,va){var ia;if(va&&va.length)for(var w=0;w<va.length;w++)if(va[w].result.toLowerCase()==o.toLowerCase()){ia=va[w];break}typeof I=="function"?I(ia):E.trigger("result",ia&&[ia.data,ia.value])}var I=arguments.length>1?arguments[1]:null;a.each(f(E.val()),function(o,va){t(va,da,da)})}).bind("flushCache",function(){K.flush()}).bind("setOptions",function(da,I){a.extend(d,I);"data"in
I&&K.populate()}).bind("unautocomplete",function(){B.unbind();E.unbind();a(c.form).unbind(".autocomplete")}).bind("s2:closeIfOpen",function(){H>0&&(new Date).getTime()-A>300&&m()});var ra=function(da){jQuery("<span>"+da+"</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(m,p){c.matchCase||(m=m.toLowerCase());var t=m.indexOf(p);if(t==-1)return false;return t==0||c.matchContains}function b(m,p){g>c.cacheLength&&e();f[m]||g++;f[m]=p}function e(){f=
{};g=0}var f={},g=0;return{flush:e,add:b,populate:function(){s2.Logger.debug("Pipulate cache");if(!c.data)return false;var m={},p=0;if(!c.url)c.cacheLength=1;m[""]=[];for(var t=0,y=c.data.length;t<y;t++){var A=c.data[t];A=typeof A=="string"?[A]:A;var E=c.formatMatch(A,t+1,c.data.length);if(E!==false){var J=E.charAt(0).toLowerCase();m[J]||(m[J]=[]);A={value:E,data:A,result:c.formatResult&&c.formatResult(A)||E};m[J].push(A);p++<c.max&&m[""].push(A)}}a.each(m,function(Q,K){c.cacheLength++;b(Q,K)});s2.Logger.debug("Pipulate cache2")},
load:function(m){if(!c.cacheLength||!g)return null;if(!c.url&&c.matchContains){var p=[],t=[],y;for(y in f)if(y.length>0){var A=f[y];a.each(A,function(E,J){d(J.value,m)&&p.push(J);t.push(J)})}if(c.handleResult)if(A=c.handleResult(c,p,t,m))return A;return p}else if(f[m])return f[m];else if(c.matchSubset)for(y=m.length-1;y>=c.minChars;y--)if(A=f[m.substr(0,y)]){p=[];a.each(A,function(E,J){if(d(J.value,m))p[p.length]=J});return p}return null}}};a.Autocompleter.Select=function(c,d,b,e){function f(){if(J){Q=
a("<div/>").hide().addClass(c.resultsClass).css("position","absolute").appendTo(document.body);K=a("<ul/>").appendTo(Q).mouseover(function(H){if(g(H).nodeName&&g(H).nodeName.toUpperCase()=="LI"){y=a("li",K).removeClass(p.ACTIVE).index(g(H));a(g(H)).addClass(p.ACTIVE)}}).click(function(H){window.triggerClickCompactSearchAllowed=true;a(g(H)).addClass(p.ACTIVE);b();try{d.focus()}catch(aa){}return false}).mousedown(function(){e.mouseDownOnSelect=true}).mouseup(function(){e.mouseDownOnSelect=false});c.width>
0&&Q.css("width",c.width);J=false}}function g(H){for(H=H.target;H&&H.tagName!="LI";)H=H.parentNode;if(!H)return[];return H}function m(H){t.slice(y,y+1).removeClass(p.ACTIVE);y+=H;if(y<0)y=t.size()-1;else if(y>=t.size())y=0;H=t.slice(y,y+1).addClass(p.ACTIVE);if(c.scroll){var aa=0;t.slice(0,y).each(function(){aa+=this.offsetHeight});if(aa+H[0].offsetHeight-K.scrollTop()>K[0].clientHeight)K.scrollTop(aa+H[0].offsetHeight-K.innerHeight());else aa<K.scrollTop()&&K.scrollTop(aa)}s2.tuifly.controller.AirportInfoShowEvent.trigger(H)}
var p={ACTIVE:"ac_over"},t,y=-1,A,E="",J=true,Q,K;return{display:function(H,aa){f();A=H;E=aa;K.empty();for(var U=c.max&&c.max<A.length?c.max:A.length,B=0;B<U;B++)if(A[B]){var ga=c.formatItem(A[B].data,B+1,U,A[B].value,E);if(ga!==false){var ra=B%2==0?"ac_even":"ac_odd",da=a("<li class='ac_element "+ra+"'/>");ga=c.highlight(ga,E);if(da=a(A[B].data[0]).html().match(/([^\(\)]+) \(([a-z]{3})\)/i)){var I=da[1];if(I.length>21)I=I.substr(0,18)+"...";ga=ga.replace(/>.+<\/span/,"><div class='qAirportname' style='float:left;'>"+
I+"</div><div class='qAirportCode' style='float:right; text-align:left; width:25px;'>"+da[2]+"</div></span")}da=a("<li class='ac_element "+ra+"'/>");da.get(0).innerHTML=ga;da.appendTo(K);da=da[0];a.data(da,"ac_data",A[B])}}t=K.find("li");if(c.selectFirst){t.slice(0,1).addClass(p.ACTIVE);y=0}a.fn.bgiframe&&K.bgiframe();s2.tuifly.controller.AutoCompleteShowEvent.trigger()},init:function(){f()},next:function(){m(1)},prev:function(){m(-1)},pageUp:function(){y!=0&&y-8<0?m(-y):m(-8)},pageDown:function(){y!=
t.size()-1&&y+8>t.size()?m(t.size()-1-y):m(8)},hide:function(){Q&&Q.hide();t&&t.removeClass(p.ACTIVE);y=-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 H=a(d).offset();Q.css({width:typeof c.width=="string"||c.width>0?c.width:a(d).width(),top:H.top+d.offsetHeight,
left:H.left}).show();if(c.scroll){K.scrollTop(0);K.css({maxHeight:c.scrollHeight,overflow:"auto"});if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var aa=0;t.each(function(){aa+=this.offsetHeight});H=aa>c.scrollHeight;K.css("height","270px");H||t.width(K.width()-parseInt(t.css("padding-left"))-parseInt(t.css("padding-right")))}}},selected:function(){var H=t&&t.filter("."+p.ACTIVE).removeClass(p.ACTIVE);return H&&H.length&&a.data(H[0],"ac_data")},emptyList:function(){K&&K.empty()},
unbind:function(){Q&&Q.remove()},scrollTo:function(H){var aa=K.get(0);H=H.replace(/\([^(]*$/,"").replace(/\.\.\.$/,"");H=K.find("li:contains('"+H+"')");if(H.length>0){H.get(0);H=H.position().top;s2.Logger.debug("Scroll pos "+H+";"+aa.scrollTop);aa.scrollTop=H;s2.Logger.debug("Scroll pos "+H+";"+aa.scrollTop)}else s2.Logger.debug("not found")}}};a.Autocompleter.Selection=function(c,d,b){if(c.createTextRange){var e=c.createTextRange();e.collapse(true);e.moveStart("character",d);e.moveEnd("character",
b);try{e.select()}catch(f){}}else if(c.setSelectionRange)try{c.setSelectionRange(d,b)}catch(g){}else if(c.selectionStart){c.selectionStart=d;c.selectionEnd=b}try{c.focus()}catch(m){}}})(jQuery);(function(){var a;jQuery.fn.typingEnded=function(c,d){d=jQuery.extend({delay:600},d);var b=d.delay;this.keydown(function(){var e=this,f=arguments;a&&clearTimeout(a);a=setTimeout(function(){c.apply(e,f)},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 e;e=this instanceof jQuery?this.find(d):jQuery(d);return b[d]=e};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,e=false,f;if(c.constructor==Boolean){e=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((f=arguments[d])!=null)for(var g in f)if(c!==f[g])if(e&&f[g]&&typeof f[g]=="object"&&c[g]&&!f[g].nodeType)c[g]=a.extend_deep(true,c[g],f[g]);else if(f[g]!=undefined)c[g]=f[g];return c};a.metaobjects=function(c){function d(e){eval("value = "+e+";");return e}function b(e,
f){for(var g=e.split("."),m={},p=m,t=0,y=g.length-1;t<=y;t++)if(g[t])p=p[g[t]]=t==y?f:{};return m}c=a.extend({context:document,clean:true,selector:"object.metaobject"},c);return a(c.selector,c.context).each(function(){var e={target:this.parentNode,cache:false};a("> param[name=metaparam]",this).each(function(){a.extend(e,d(this.value))});a("> param",this).not("[name=metaparam]").each(function(){var f=this.name,g=d(this.value);if(e.cache){var m=f.split("."),p=m.shift(),t=(m=m.join("."))?b(m,g):g;a(e.target).each(function(){var y=
a.data(this,p);y?a.extend_deep(true,y,t):a.data(this,p,t)})}else a(e.target).each(function(){a.extend_deep(true,this,b(f,g))})});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(){K=0;U.hide();o=false;if(H){H=false;aa.trigger("customSelect_changedAndClosed")}}function b(){A=g(B.attr("id"));A=$(A);U.append(A);t=$("li",U);y=t.eq(0)}function e(ia){if(t)if(!(K>0)){U.not(":visible").length>0&&U.show();Q+=ia;if(Q<0)Q=0;else if(Q>=t.size())Q=t.size()-1;t.filter("."+m.hoverClass).removeClass(m.hoverClass);t.filter("."+m.currentClass).removeClass(m.currentClass);A.scrollTop($(t[Q]).addClass(m.hoverClass).addClass(m.currentClass).position().top-
y.position().top);f()}}function f(){var ia=$("li."+m.currentClass,U).get(0),w=(""+ia.id).split("_");aa.val(w[w.length-1]);B.val($(ia).text());H=true;aa.change();return true}function g(ia){var w=document.createElement("ul");if(aa.closest(".queryCustomSelects").length>0){var G=aa.closest(".queryCustomSelects").attr("optionWidth"),S=aa.closest(".queryCustomSelects").attr("optionHeight");if(G&&S){$(w).css("height",S+"px");$(w).css("width",G+"px");$(w).css("overflow","auto")}}aa.children("option").each(function(){var W=
document.createElement("li");W.setAttribute("id",ia+"_"+$(this).val());W.innerHTML=$(this).html();if($(this).is(":selected")){B.val($(this).text());$(W).addClass(m.currentClass)}w.appendChild(W);$(w).mouseout(function(){K=-1}).mouseover(function(){K=1});$(W).mouseover(function(ja){K=1;m.debug&&console.log("over on : "+this.id);t.filter("."+m.hoverClass).removeClass(m.hoverClass);Q=t.index($(ja.target,U).addClass(m.hoverClass))}).mouseout(function(){m.debug&&console.log("out on : "+this.id)}).click(function(){m.debug&&
console.log("click on :"+this.id);$("li."+m.currentClass,U).removeClass(m.currentClass);$(this).addClass(m.currentClass);Q=t.index($(this));f();d()})});return w}var m=c||{};m.inputClass=m.inputClass||"selectbox";m.containerClass=m.containerClass||"selectbox-wrapper";m.hoverClass=m.hoverClass||"current";m.currentClass=m.selectedClass||"selected";m.debug=m.debug||false;var p=a.id,t,y,A,E="",J,Q=-1,K=0,H=false,aa=$(a),U=function(ia){var w=document.createElement("div");U=$(w);U.attr("id",p+"_container");
U.addClass(ia.containerClass);U.css("position","absolute");U.hide();return U}(m),B=function(ia){var w=document.createElement("input");w=$(w);w.attr("id",p+"_input");w.attr("type","text");w.addClass(ia.inputClass);w.attr("autocomplete","off");w.attr("readonly","readonly");w.attr("tabIndex",aa.attr("tabindex"));return w}(m);if(c.maxlength){var ga=B.val;B.val=function(ia){if(arguments.length>0){ia=""+ia;return ga.call(this,ia.substring(0,parseInt(c.maxlength)))}return ga.call(this)}}if(c.abbreviate){ga=
B.val;B.val=function(ia){if(arguments.length>0){ia=s2.tuifly.util.toolbox.shortenTextInElement(B,ia,"...");return ga.call(this,ia)}return ga.call(this)}}aa.hide().before(B).before(U);var ra=U.show,da=false;U.show=function(){da||b();da=true;ra.apply($(this));t.filter("."+m.hoverClass).removeClass(m.hoverClass);var ia=t.filter(function(){return $(this).text().match(RegExp("^\\s*"+B.val().replace(/\.\.\.$/,"").replace(/([()^$.*+?\\[\]\/])/g,"\\$1"),"i"))}).eq(0).addClass(m.hoverClass);Q=t.index(ia);
ia.length!=0&&A.scrollTop(ia.position().top-y.position().top)};var I=0,o=false;B.click(function(){if(o&&(new Date).getTime()-I>200){U.hide();o=false}else{U.show();o=true}}).focus(function(){if(U.not(":visible")){var ia=B.position(),w=ia.top+B.outerHeight();U.css("top",w+"px");U.css("left",ia.left+"px");U.show();o=true;I=(new Date).getTime()}}).keydown(function(ia){switch(ia.keyCode){case 38:ia.preventDefault();e(-1);break;case 40:ia.preventDefault();e(1);break;case 13:ia.preventDefault();$("li."+
m.hoverClass,U).trigger("click");break;case 27:ia.preventDefault();d()}}).keypress(function(ia){if(!(K>0)){var w;if(ia.which==null)w=ia.keyCode;else if(ia.which>0)w=ia.which;ia=String.fromCharCode(w);if(w&&31<w&&w!=127&&ia.match(/[^\\\.\*\+\?\[\]\(\)\^\$\/]/)){U.not(":visible").length>0&&U.show();E+=ia;w=U.find("li:startsWith("+E+")");if(E.match(/(.)\1/i)&&w.length==0||E.length==1&&w.filter("."+m.hoverClass).length==1&&w.length>1){E=ia;w=w.length>0?w:U.find("li:startsWith("+E+")");ia=w.index(w.filter("."+
m.hoverClass))+1;ia=ia<w.length?ia:0;w=w.eq(ia)}else w=w.eq(0);if(w.length>0){t.filter("."+m.hoverClass).removeClass(m.hoverClass);w.addClass(m.hoverClass);Q=t.index(w);A.scrollTop(w.position().top-y.position().top);t.filter("."+m.currentClass).removeClass(m.currentClass);w.addClass(m.currentClass);f()}J&&window.clearTimeout(J);J=window.setTimeout(function(){E=""},1E3)}}}).blur(function(){if(K>0)m.debug&&console.log("container visible and has focus");else d()});var va=function(){B.val(aa.find(":selected").text())};
aa.data("update",va);aa.data("updateList",function(){if(A)A.remove();else da=true;b()});$(window).load(va);s2.tuifly.events.AvailibilityCookieDataSet.observe(va)};
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 e=a.success||function(){};b.push(function(f,g){jQuery(a.target).attr("innerHTML",f).evalScripts().each(e,[f,g])})}else a.success&&b.push(a.success);a.success=function(f,g){for(var m=0,p=b.length;m<p;m++)b[m](f,g)};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 e=0,f=b.length;e<f;e++){var g=b[e],m=g.name;if(m)if(a&&d.clk&&g.type=="image")!g.disabled&&d.clk==g&&c.push({name:m+".x",value:d.clk_x},{name:m+".y",value:d.clk_y});else{g=jQuery.fieldValue(g,true);if(g!==null)if(g.constructor==Array)for(var p=0,t=g.length;p<t;p++)c.push({name:m,value:g[p]});else c.push({name:m,value:g})}}if(!a&&d.clk){a=d.getElementsByTagName("input");
e=0;for(f=a.length;e<f;e++){b=a[e];(m=b.name)&&!b.disabled&&b.type=="image"&&d.clk==b&&c.push({name:m+".x",value:d.clk_x},{name:m+".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 e=0,f=b.length;e<f;e++)c.push({name:d,value:b[e]});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,e=this.length;b<e;b++){var f=this[b],g=jQuery.fieldValue(f,a);if(!(g===null||typeof g=="undefined"||g.constructor==Array&&!g.length)){if(f.type!="checkbox")return g;d=d||f.name;if(d!=f.name)break;c=c||[];c.push(g)}}return c};
jQuery.fieldValue=function(a,c){var d=a.name,b=a.type,e=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||e=="select"&&a.selectedIndex==-1))return null;if(e=="select"){var f=a.selectedIndex;if(f<0)return null;d=[];e=a.options;var g=(b=b=="select-one")?f+1:e.length;for(f=b?f:0;f<g;f++){var m=e[f];if(m.selected){m=jQuery.browser.msie&&!m.attributes.value.specified?m.text:
m.value;if(b)return m;d.push(m)}}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 addTrackingTags(){var a="",c="";if(!location.href.match(/select\.aspx/i)&&!location.href.match(/selectnew\.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))c+='<script type="text/javascript" src="https://trk.newtention.net/trk?rt=1&ti=1976&cs=8727&cpi=&pi=&rpi=&ts='+Math.random()+'"><\/script>';location.href.match(/itinerary\.aspx/i)||
(a+='<script type="text/javascript">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;<\/script><script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js"><\/script>');document.write(a);$(document).ready(function(){$("body").append(c)})}
function writeNewtentionTag(){addTrackingTags()}
var swfobject=function(){function a(){if(!Da){try{var T=I.getElementsByTagName("body")[0].appendChild(I.createElement("span"));T.parentNode.removeChild(T)}catch(ba){return}Da=true;T=ia.length;for(var ea=0;ea<T;ea++)ia[ea]()}}function c(T){if(Da)T();else ia[ia.length]=T}function d(T){if(typeof da.addEventListener!=U)da.addEventListener("load",T,false);else if(typeof I.addEventListener!=U)I.addEventListener("load",T,false);else if(typeof da.attachEvent!=U)J(da,"onload",T);else if(typeof da.onload==
"function"){var ba=da.onload;da.onload=function(){ba();T()}}else da.onload=T}function b(){var T=I.getElementsByTagName("body")[0],ba=I.createElement(B);ba.setAttribute("type",ga);var ea=T.appendChild(ba);if(ea){var ma=0;(function(){if(typeof ea.GetVariable!=U){var na=ea.GetVariable("$version");if(na){na=na.split(" ")[1].split(",");la.pv=[parseInt(na[0],10),parseInt(na[1],10),parseInt(na[2],10)]}}else if(ma<10){ma++;setTimeout(arguments.callee,10);return}T.removeChild(ba);ea=null;e()})()}else e()}
function e(){var T=w.length;if(T>0)for(var ba=0;ba<T;ba++){var ea=w[ba].id,ma=w[ba].callbackFn,na={success:false,id:ea};if(la.pv[0]>0){var za=E(ea);if(za)if(Q(w[ba].swfVersion)&&!(la.wk&&la.wk<312)){H(ea,true);if(ma){na.success=true;na.ref=f(ea);ma(na)}}else if(w[ba].expressInstall&&g()){na={};na.data=w[ba].expressInstall;na.width=za.getAttribute("width")||"0";na.height=za.getAttribute("height")||"0";if(za.getAttribute("class"))na.styleclass=za.getAttribute("class");if(za.getAttribute("align"))na.align=
za.getAttribute("align");var ua={};za=za.getElementsByTagName("param");for(var Fa=za.length,Ga=0;Ga<Fa;Ga++)if(za[Ga].getAttribute("name").toLowerCase()!="movie")ua[za[Ga].getAttribute("name")]=za[Ga].getAttribute("value");m(na,ua,ea,ma)}else{p(za);ma&&ma(na)}}else{H(ea,true);if(ma){if((ea=f(ea))&&typeof ea.SetVariable!=U){na.success=true;na.ref=ea}ma(na)}}}}function f(T){var ba=null;if((T=E(T))&&T.nodeName=="OBJECT")if(typeof T.SetVariable!=U)ba=T;else if(T=T.getElementsByTagName(B)[0])ba=T;return ba}
function g(){return!Ka&&Q("6.0.65")&&(la.win||la.mac)&&!(la.wk&&la.wk<312)}function m(T,ba,ea,ma){Ka=true;qa=ma||null;Ba={success:false,id:ea};var na=E(ea);if(na){if(na.nodeName=="OBJECT"){W=t(na);ja=null}else{W=na;ja=ea}T.id=ra;if(typeof T.width==U||!/%$/.test(T.width)&&parseInt(T.width,10)<310)T.width="310";if(typeof T.height==U||!/%$/.test(T.height)&&parseInt(T.height,10)<137)T.height="137";I.title=I.title.slice(0,47)+" - Flash Player Installation";ma=la.ie&&la.win?"ActiveX":"PlugIn";ma="MMredirectURL="+
da.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ma+"&MMdoctitle="+I.title;if(typeof ba.flashvars!=U)ba.flashvars+="&"+ma;else ba.flashvars=ma;if(la.ie&&la.win&&na.readyState!=4){ma=I.createElement("div");ea+="SWFObjectNew";ma.setAttribute("id",ea);na.parentNode.insertBefore(ma,na);na.style.display="none";(function(){na.readyState==4?na.parentNode.removeChild(na):setTimeout(arguments.callee,10)})()}y(T,ba,ea)}}function p(T){if(la.ie&&la.win&&T.readyState!=4){var ba=I.createElement("div");
T.parentNode.insertBefore(ba,T);ba.parentNode.replaceChild(t(T),ba);T.style.display="none";(function(){T.readyState==4?T.parentNode.removeChild(T):setTimeout(arguments.callee,10)})()}else T.parentNode.replaceChild(t(T),T)}function t(T){var ba=I.createElement("div");if(la.win&&la.ie)ba.innerHTML=T.innerHTML;else if(T=T.getElementsByTagName(B)[0])if(T=T.childNodes)for(var ea=T.length,ma=0;ma<ea;ma++)!(T[ma].nodeType==1&&T[ma].nodeName=="PARAM")&&T[ma].nodeType!=8&&ba.appendChild(T[ma].cloneNode(true));
return ba}function y(T,ba,ea){var ma,na=E(ea);if(la.wk&&la.wk<312)return ma;if(na){if(typeof T.id==U)T.id=ea;if(la.ie&&la.win){var za="",ua;for(ua in T)if(T[ua]!=Object.prototype[ua])if(ua.toLowerCase()=="data")ba.movie=T[ua];else if(ua.toLowerCase()=="styleclass")za+=' class="'+T[ua]+'"';else if(ua.toLowerCase()!="classid")za+=" "+ua+'="'+T[ua]+'"';ua="";for(var Fa in ba)if(ba[Fa]!=Object.prototype[Fa])ua+='<param name="'+Fa+'" value="'+ba[Fa]+'" />';na.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+
za+">"+ua+"</object>";G[G.length]=T.id;ma=E(T.id)}else{Fa=I.createElement(B);Fa.setAttribute("type",ga);for(var Ga in T)if(T[Ga]!=Object.prototype[Ga])if(Ga.toLowerCase()=="styleclass")Fa.setAttribute("class",T[Ga]);else Ga.toLowerCase()!="classid"&&Fa.setAttribute(Ga,T[Ga]);for(za in ba)if(ba[za]!=Object.prototype[za]&&za.toLowerCase()!="movie"){T=Fa;ua=za;Ga=ba[za];ea=I.createElement("param");ea.setAttribute("name",ua);ea.setAttribute("value",Ga);T.appendChild(ea)}na.parentNode.replaceChild(Fa,
na);ma=Fa}}return ma}function A(T){var ba=E(T);if(ba&&ba.nodeName=="OBJECT")if(la.ie&&la.win){ba.style.display="none";(function(){if(ba.readyState==4){var ea=E(T);if(ea){for(var ma in ea)if(typeof ea[ma]=="function")ea[ma]=null;ea.parentNode.removeChild(ea)}}else setTimeout(arguments.callee,10)})()}else ba.parentNode.removeChild(ba)}function E(T){var ba=null;try{ba=I.getElementById(T)}catch(ea){}return ba}function J(T,ba,ea){T.attachEvent(ba,ea);S[S.length]=[T,ba,ea]}function Q(T){var ba=la.pv;T=
T.split(".");T[0]=parseInt(T[0],10);T[1]=parseInt(T[1],10)||0;T[2]=parseInt(T[2],10)||0;return ba[0]>T[0]||ba[0]==T[0]&&ba[1]>T[1]||ba[0]==T[0]&&ba[1]==T[1]&&ba[2]>=T[2]?true:false}function K(T,ba,ea,ma){if(!(la.ie&&la.mac)){var na=I.getElementsByTagName("head")[0];if(na){ea=ea&&typeof ea=="string"?ea:"screen";if(ma)Va=wa=null;if(!wa||Va!=ea){ma=I.createElement("style");ma.setAttribute("type","text/css");ma.setAttribute("media",ea);wa=na.appendChild(ma);if(la.ie&&la.win&&typeof I.styleSheets!=U&&
I.styleSheets.length>0)wa=I.styleSheets[I.styleSheets.length-1];Va=ea}if(la.ie&&la.win)wa&&typeof wa.addRule==B&&wa.addRule(T,ba);else wa&&typeof I.createTextNode!=U&&wa.appendChild(I.createTextNode(T+" {"+ba+"}"))}}}function H(T,ba){if(Ua){var ea=ba?"visible":"hidden";if(Da&&E(T))E(T).style.visibility=ea;else K("#"+T,"visibility:"+ea)}}function aa(T){return/[\\\"<>\.;]/.exec(T)!=null&&typeof encodeURIComponent!=U?encodeURIComponent(T):T}var U="undefined",B="object",ga="application/x-shockwave-flash",
ra="SWFObjectExprInst",da=window,I=document,o=navigator,va=false,ia=[function(){va?b():e()}],w=[],G=[],S=[],W,ja,qa,Ba,Da=false,Ka=false,wa,Va,Ua=true,la=function(){var T=typeof I.getElementById!=U&&typeof I.getElementsByTagName!=U&&typeof I.createElement!=U,ba=o.userAgent.toLowerCase(),ea=o.platform.toLowerCase(),ma=ea?/win/.test(ea):/win/.test(ba);ea=ea?/mac/.test(ea):/mac/.test(ba);ba=/webkit/.test(ba)?parseFloat(ba.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;var na=!+"1",za=[0,0,0],ua=
null;if(typeof o.plugins!=U&&typeof o.plugins["Shockwave Flash"]==B){if((ua=o.plugins["Shockwave Flash"].description)&&!(typeof o.mimeTypes!=U&&o.mimeTypes[ga]&&!o.mimeTypes[ga].enabledPlugin)){va=true;na=false;ua=ua.replace(/^.*\s+(\S+\s+\S+$)/,"$1");za[0]=parseInt(ua.replace(/^(.*)\..*$/,"$1"),10);za[1]=parseInt(ua.replace(/^.*\.(.*)\s.*$/,"$1"),10);za[2]=/[a-zA-Z]/.test(ua)?parseInt(ua.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else if(typeof da.ActiveXObject!=U)try{var Fa=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
if(Fa)if(ua=Fa.GetVariable("$version")){na=true;ua=ua.split(" ")[1].split(",");za=[parseInt(ua[0],10),parseInt(ua[1],10),parseInt(ua[2],10)]}}catch(Ga){}return{w3:T,pv:za,wk:ba,ie:na,win:ma,mac:ea}}();(function(){if(la.w3){if(typeof I.readyState!=U&&I.readyState=="complete"||typeof I.readyState==U&&(I.getElementsByTagName("body")[0]||I.body))a();if(!Da){typeof I.addEventListener!=U&&I.addEventListener("DOMContentLoaded",a,false);if(la.ie&&la.win){I.attachEvent("onreadystatechange",function(){if(I.readyState==
"complete"){I.detachEvent("onreadystatechange",arguments.callee);a()}});da==top&&function(){if(!Da){try{I.documentElement.doScroll("left")}catch(T){setTimeout(arguments.callee,0);return}a()}}()}la.wk&&function(){Da||(/loaded|complete/.test(I.readyState)?a():setTimeout(arguments.callee,0))}();d(a)}}})();(function(){la.ie&&la.win&&window.attachEvent("onunload",function(){for(var T=S.length,ba=0;ba<T;ba++)S[ba][0].detachEvent(S[ba][1],S[ba][2]);T=G.length;for(ba=0;ba<T;ba++)A(G[ba]);for(var ea in la)la[ea]=
null;la=null;for(var ma in swfobject)swfobject[ma]=null;swfobject=null})})();return{registerObject:function(T,ba,ea,ma){if(la.w3&&T&&ba){var na={};na.id=T;na.swfVersion=ba;na.expressInstall=ea;na.callbackFn=ma;w[w.length]=na;H(T,false)}else ma&&ma({success:false,id:T})},getObjectById:function(T){if(la.w3)return f(T)},embedSWF:function(T,ba,ea,ma,na,za,ua,Fa,Ga,Za){var eb={success:false,id:ba};if(la.w3&&!(la.wk&&la.wk<312)&&T&&ba&&ea&&ma&&na){H(ba,false);c(function(){ea+="";ma+="";var Ra={};if(Ga&&
typeof Ga===B)for(var Qa in Ga)Ra[Qa]=Ga[Qa];Ra.data=T;Ra.width=ea;Ra.height=ma;Qa={};if(Fa&&typeof Fa===B)for(var fb in Fa)Qa[fb]=Fa[fb];if(ua&&typeof ua===B)for(var Wa in ua)if(typeof Qa.flashvars!=U)Qa.flashvars+="&"+Wa+"="+ua[Wa];else Qa.flashvars=Wa+"="+ua[Wa];if(Q(na)){fb=y(Ra,Qa,ba);Ra.id==ba&&H(ba,true);eb.success=true;eb.ref=fb}else if(za&&g()){Ra.data=za;m(Ra,Qa,ba,Za);return}else H(ba,true);Za&&Za(eb)})}else Za&&Za(eb)},switchOffAutoHideShow:function(){Ua=false},ua:la,getFlashPlayerVersion:function(){return{major:la.pv[0],
minor:la.pv[1],release:la.pv[2]}},hasFlashPlayerVersion:Q,createSWF:function(T,ba,ea){if(la.w3)return y(T,ba,ea)},showExpressInstall:function(T,ba,ea,ma){la.w3&&g()&&m(T,ba,ea,ma)},removeSWF:function(T){la.w3&&A(T)},createCSS:function(T,ba,ea,ma){la.w3&&K(T,ba,ea,ma)},addDomLoadEvent:c,addLoadEvent:d,getQueryParamValue:function(T){var ba=I.location.search||I.location.hash;if(ba){if(/\?/.test(ba))ba=ba.split("?")[1];if(T==null)return aa(ba);ba=ba.split("&");for(var ea=0;ea<ba.length;ea++)if(ba[ea].substring(0,
ba[ea].indexOf("="))==T)return aa(ba[ea].substring(ba[ea].indexOf("=")+1))}return""},expressInstallCallback:function(){if(Ka){var T=E(ra);if(T&&W){T.parentNode.replaceChild(W,T);if(ja){H(ja,true);if(la.ie&&la.win)W.style.display="block"}qa&&qa(Ba)}Ka=false}}}}();
(function(a){function c(b,e,f){b=a[b][e].getter||[];b=typeof b=="string"?b.split(/,?\s+/):b;return a.inArray(f,b)!=-1}a.ui={plugin:{add:function(b,e,f){b=a.ui[b].prototype;for(var g in f){b.plugins[g]=b.plugins[g]||[];b.plugins[g].push([e,f[g]])}},call:function(b,e,f){if(e=b.plugins[e])for(var g=0;g<e.length;g++)b.options[e[g][0]]&&e[g][1].apply(b.element,f)}},cssCache:{},css:function(b){if(a.ui.cssCache[b])return a.ui.cssCache[b];var e=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(e.css("cursor"))||/^[1-9]/.test(e.css("height"))||/^[1-9]/.test(e.css("width"))||!/none/.test(e.css("backgroundImage"))||!/transparent|rgba\(0, 0, 0, 0\)/.test(e.css("backgroundColor")));try{a("body").get(0).removeChild(e.get(0))}catch(f){}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,e){var f=/top/.test(e||"top")?"scrollTop":"scrollLeft",g=false;if(b[f]>0)return true;b[f]=1;g=b[f]>0?true:false;b[f]=0;return g},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,e){var f=b.split(".")[0];b=b.split(".")[1];a.fn[b]=function(g){var m=typeof g=="string",p=Array.prototype.slice.call(arguments,1);if(m&&c(f,b,g)){var t=a.data(this[0],b);return t?t[g].apply(t,p):undefined}return this.each(function(){var y=a.data(this,b);if(m&&y&&a.isFunction(y[g]))y[g].apply(y,p);else m||a.data(this,b,new a[f][b](this,g))})};a[f][b]=function(g,m){var p=
this;this.widgetName=b;this.widgetBaseClass=f+"-"+b;this.options=a.extend({},a.widget.defaults,a[f][b].defaults,m);this.element=a(g).bind("setData."+b,function(t,y,A){return p.setData(y,A)}).bind("getData."+b,function(t,y){return p.getData(y)}).bind("remove",function(){return p.destroy()});this.init()};a[f][b].prototype=a.extend({},a.widget.prototype,e)};a.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(b){return this.options[b]},setData:function(b,
e){this.options[b]=e;if(b=="disabled")this.element[e?"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(e){return b.mouseDown(e)});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 e=this,f=b.which==1,g=typeof this.options.cancel=="string"?a(b.target).parents().add(b.target).filter(this.options.cancel).length:false;if(!f||g||!this.mouseCapture(b))return true;this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){e._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(m){return e.mouseMove(m)};this._mouseUpDelegate=function(m){return e.mouseUp(m)};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 e=this.offsetParent.offset();if(this.offsetParent[0]==
document.body&&a.browser.mozilla)e={top:0,left:0};this.offset.parent={top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};e=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:e.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)){e=a(d.containment)[0];var f=a(d.containment).offset();this.containment=[f.left+(parseInt(a(e).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,f.top+(parseInt(a(e).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,f.left+Math.max(e.scrollWidth,
e.offsetWidth)-(parseInt(a(e).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),f.top+Math.max(e.scrollHeight,e.offsetHeight)-(parseInt(a(e).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,e=a(this).data("draggable");b.scrollSensitivity=b.scrollSensitivity||20;b.scrollSpeed=b.scrollSpeed||20;e.overflowY=function(f){do{if(/auto|scroll/.test(f.css("overflow"))||/auto|scroll/.test(f.css("overflow-y")))return f;
f=f.parent()}while(f[0].parentNode);return a(document)}(this);e.overflowX=function(f){do{if(/auto|scroll/.test(f.css("overflow"))||/auto|scroll/.test(f.css("overflow-x")))return f;f=f.parent()}while(f[0].parentNode);return a(document)}(this);if(e.overflowY[0]!=document&&e.overflowY[0].tagName!="HTML")e.overflowYOffset=e.overflowY.offset();if(e.overflowX[0]!=document&&e.overflowX[0].tagName!="HTML")e.overflowXOffset=e.overflowX.offset()},drag:function(c,d){var b=d.options,e=a(this).data("draggable");
if(e.overflowY[0]!=document&&e.overflowY[0].tagName!="HTML"){if(e.overflowYOffset.top+e.overflowY[0].offsetHeight-c.pageY<b.scrollSensitivity)e.overflowY[0].scrollTop+=b.scrollSpeed;if(c.pageY-e.overflowYOffset.top<b.scrollSensitivity)e.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(e.overflowX[0]!=document&&e.overflowX[0].tagName!="HTML"){if(e.overflowXOffset.left+e.overflowX[0].offsetWidth-c.pageX<b.scrollSensitivity)e.overflowX[0].scrollLeft+=b.scrollSpeed;if(c.pageX-e.overflowXOffset.left<b.scrollSensitivity)e.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 e=a(this),f=e.offset();this!=b.element[0]&&b.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:f.top,left:f.left})})},drag:function(c,d){for(var b=a(this).data("draggable"),e=d.options.snapTolerance||20,f=d.absolutePosition.left,g=f+b.helperProportions.width,m=d.absolutePosition.top,
p=m+b.helperProportions.height,t=b.snapElements.length-1;t>=0;t--){var y=b.snapElements[t].left,A=y+b.snapElements[t].width,E=b.snapElements[t].top,J=E+b.snapElements[t].height;if(y-e<f&&f<A+e&&E-e<m&&m<J+e||y-e<f&&f<A+e&&E-e<p&&p<J+e||y-e<g&&g<A+e&&E-e<m&&m<J+e||y-e<g&&g<A+e&&E-e<p&&p<J+e){if(d.options.snapMode!="inner"){var Q=Math.abs(E-p)<=20,K=Math.abs(J-m)<=20,H=Math.abs(y-g)<=20,aa=Math.abs(A-f)<=20;if(Q)d.position.top=b.convertPositionTo("relative",{top:E-b.helperProportions.height,left:0}).top;
if(K)d.position.top=b.convertPositionTo("relative",{top:J,left:0}).top;if(H)d.position.left=b.convertPositionTo("relative",{top:0,left:y-b.helperProportions.width}).left;if(aa)d.position.left=b.convertPositionTo("relative",{top:0,left:A}).left}if(d.options.snapMode!="outer"){Q=Math.abs(E-m)<=20;K=Math.abs(J-p)<=20;H=Math.abs(y-f)<=20;aa=Math.abs(A-g)<=20;if(Q)d.position.top=b.convertPositionTo("relative",{top:E,left:0}).top;if(K)d.position.top=b.convertPositionTo("relative",{top:J-b.helperProportions.height,
left:0}).top;if(H)d.position.left=b.convertPositionTo("relative",{top:0,left:y}).left;if(aa)d.position.left=b.convertPositionTo("relative",{top:0,left:A-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 e=a.data(this,"sortable");b.sortables.push({instance:e,shouldRevert:e.options.revert});e.refreshItems();e.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"),e=this,f=function(g){var m=g.left,p=m+g.width,t=g.top;g=t+g.height;return m<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<g};a.each(b.sortables,function(){if(f.call(b,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(e).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(e,
f){return(parseInt(a(e).css("zIndex"),10)||d.options.stack.min)-(parseInt(a(f).css("zIndex"),10)||d.options.stack.min)});a(b).each(function(e){this.style.zIndex=d.options.stack.min+e});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 e={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;"},f=0;f<b.length;f++){var g=a.trim(b[f]),m=d.defaultTheme,p="ui-resizable-"+g,t=!a.ui.css(p)&&!d.knobHandles,y=a.ui.css("ui-resizable-knob-handle");m=a.extend(m[p],m["ui-resizable-handle"]);y=a.extend(d.knobTheme[p],!y?d.knobTheme["ui-resizable-handle"]:{});var A=/sw|se|ne|nw/.test(g)?{zIndex:++d.zIndex}:{};p=a(['<div class="ui-resizable-handle ',p,'" style="',t?e[g]:"",e.handle,'"></div>'].join("")).css(A);d.handles[g]=
".ui-resizable-"+g;this.element.append(p.css(t?m:{}).css(d.knobHandles?y:{}).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 J in d.handles){if(d.handles[J].constructor==String)d.handles[J]=a(d.handles[J],this.element).show();d.transparent&&d.handles[J].css({opacity:0});if(this.element.is(".ui-wrapper")&&d._nodeName.match(/textarea|input|select|button/i)){var Q=
a(d.handles[J],this.element),K=0;K=/sw|ne|nw|se|n|s/.test(J)?Q.outerHeight():Q.outerWidth();Q=["padding",/ne|nw|n/.test(J)?"Top":/se|sw|s/.test(J)?"Bottom":/^e$/.test(J)?"Right":"Left"].join("");d.transparent||E.css(Q,K);this._proportionallyResize()}a(d.handles[J])}};this._renderAxis(this.element);d._handles=a(".ui-resizable-handle",c.element);d.disableSelection&&d._handles.each(function(E,J){a.ui.disableSelection(J)});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(e){a(e).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 e=this.element.position();b=this.element;var f=function(p){return parseInt(p,10)||0},g=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 m=a.browser.msie&&!d.containment&&/absolute/.test(b.css("position"))&&!/relative/.test(b.parent().css("position"));b.css({position:"absolute",top:e.top+(m?d.documentScroll.top:0),left:e.left+(m?d.documentScroll.left:0)})}a.browser.opera&&/relative/.test(b.css("position"))&&b.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();e=f(this.helper.css("left"));f=f(this.helper.css("top"));if(d.containment){e+=a(d.containment).scrollLeft()||
0;f+=a(d.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:e,top:f};this.size=d.helper||g?{width:b.outerWidth(),height:b.outerHeight()}:{width:b.width(),height:b.height()};this.originalSize=d.helper||g?{width:b.outerWidth(),height:b.outerHeight()}:{width:b.width(),height:b.height()};this.originalPosition={left:e,top:f};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,e=this.originalMousePosition,f=this._change[this.axis];if(!f)return false;e=f.apply(this,[c,c.pageX-e.left||0,c.pageY-e.top||0]);if(b._aspectRatio||c.shiftKey)e=this._updateRatio(e,c);e=this._respectSize(e,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(e);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,e=b&&/textarea/i.test(b.get(0).nodeName);b=e&&a.ui.hasScroll(b.get(0),"left")?0:this.sizeDiff.height;e={width:this.size.width-(e?
0:this.sizeDiff.width),height:this.size.height-b};b=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null;var f=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null;d.animate||this.element.css(a.extend(e,{top:f,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,e=this.size,f=this.axis;if(c.height)c.width=e.height/d.aspectRatio;else if(c.width)c.height=e.width*d.aspectRatio;if(f=="sw"){c.left=b.left+(e.width-c.width);c.top=null}if(f=="nw"){c.top=b.top+(e.height-c.height);c.left=b.left+(e.width-c.width)}return c},_respectSize:function(c){var d=
this.options,b=this.axis,e=c.width&&d.maxWidth&&d.maxWidth<c.width,f=c.height&&d.maxHeight&&d.maxHeight<c.height,g=c.width&&d.minWidth&&d.minWidth>c.width,m=c.height&&d.minHeight&&d.minHeight>c.height;if(g)c.width=d.minWidth;if(m)c.height=d.minHeight;if(e)c.width=d.maxWidth;if(f)c.height=d.maxHeight;var p=this.originalPosition.left+this.originalSize.width,t=this.position.top+this.size.height,y=/sw|nw|w/.test(b);b=/nw|ne|n/.test(b);if(g&&y)c.left=p-d.minWidth;if(e&&y)c.left=p-d.maxWidth;if(m&&b)c.top=
t-d.minHeight;if(f&&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 e=[d.css("borderTopWidth"),d.css("borderRightWidth"),d.css("borderBottomWidth"),d.css("borderLeftWidth")],f=[d.css("paddingTop"),d.css("paddingRight"),d.css("paddingBottom"),d.css("paddingLeft")];c.borderDif=
a.map(e,function(g,m){var p=parseInt(g,10)||0,t=parseInt(f[m],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,e=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-e+"px",top:this.elementOffset.top-e+"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,e=a(this).data("resizable"),f=e.element;b=b.containment;if(f=b instanceof a?b.get(0):/parent/.test(b)?f.parent().get(0):b){e.containerElement=a(f);if(/document/.test(b)||b==document){e.containerOffset={left:0,top:0};e.containerPosition={left:0,top:0};e.parentData=
{element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{e.containerOffset=a(f).offset();e.containerPosition=a(f).position();e.containerSize={height:a(f).innerHeight(),width:a(f).innerWidth()};b=e.containerOffset;var g=e.containerSize.height,m=e.containerSize.width;m=a.ui.hasScroll(f,"left")?f.scrollWidth:m;g=a.ui.hasScroll(f)?f.scrollHeight:g;e.parentData={element:f,left:b.left,top:b.top,width:m,height:g}}}},resize:function(c,
d){var b=d.options,e=a(this).data("resizable"),f=e.containerOffset,g=e.position,m=b._aspectRatio||c.shiftKey,p={top:0,left:0},t=e.containerElement;if(t[0]!=document&&/static/.test(t.css("position")))p=e.containerPosition;if(g.left<(b.helper?f.left:p.left)){e.size.width+=b.helper?e.position.left-f.left:e.position.left-p.left;if(m)e.size.height=e.size.width*b.aspectRatio;e.position.left=b.helper?f.left:p.left}if(g.top<(b.helper?f.top:0)){e.size.height+=b.helper?e.position.top-f.top:e.position.top;if(m)e.size.width=
e.size.height/b.aspectRatio;e.position.top=b.helper?f.top:0}g=(b.helper?e.offset.left-f.left:e.position.left-p.left)+e.sizeDiff.width;f=(b.helper?e.offset.top-f.top:e.position.top)+e.sizeDiff.height;if(g+e.size.width>=e.parentData.width){e.size.width=e.parentData.width-g;if(m)e.size.height=e.size.width*b.aspectRatio}if(f+e.size.height>=e.parentData.height){e.size.height=e.parentData.height-f;if(m)e.size.width=e.size.height/b.aspectRatio}},stop:function(c,d){var b=d.options,e=a(this).data("resizable"),
f=e.containerOffset,g=e.containerPosition,m=e.containerElement,p=a(e.helper);e=p.offset();var t=p.innerWidth();p=p.innerHeight();b.helper&&!b.animate&&/relative/.test(m.css("position"))&&a(this).css({left:e.left-f.left,top:e.top-f.top,width:t,height:p});b.helper&&!b.animate&&/static/.test(m.css("position"))&&a(this).css({left:g.left+(e.left-f.left),top:g.top+(e.top-f.top),width:t,height:p})}});a.ui.plugin.add("resizable","grid",{resize:function(c,d){var b=d.options,e=a(this).data("resizable"),f=e.size,
g=e.originalSize,m=e.originalPosition,p=e.axis;b.grid=typeof b.grid=="number"?[b.grid,b.grid]:b.grid;var t=Math.round((f.width-g.width)/(b.grid[0]||1))*(b.grid[0]||1);b=Math.round((f.height-g.height)/(b.grid[1]||1))*(b.grid[1]||1);if(/^(se|s|e)$/.test(p)){e.size.width=g.width+t;e.size.height=g.height+b}else if(/^(ne)$/.test(p)){e.size.width=g.width+t;e.size.height=g.height+b;e.position.top=m.top-b}else{if(/^(sw)$/.test(p)){e.size.width=g.width+t;e.size.height=g.height+b}else{e.size.width=g.width+
t;e.size.height=g.height+b;e.position.top=m.top-b}e.position.left=m.left-t}}});a.ui.plugin.add("resizable","animate",{stop:function(c,d){var b=d.options,e=a(this).data("resizable"),f=b.proportionallyResize,g=f&&/textarea/i.test(f.get(0).nodeName),m=g&&a.ui.hasScroll(f.get(0),"left")?0:e.sizeDiff.height;g={width:e.size.width-(g?0:e.sizeDiff.width),height:e.size.height-m};m=parseInt(e.element.css("left"),10)+(e.position.left-e.originalPosition.left)||null;var p=parseInt(e.element.css("top"),10)+(e.position.top-
e.originalPosition.top)||null;e.element.animate(a.extend(g,p&&m?{top:p,left:m}:{}),{duration:b.animateDuration||"slow",easing:b.animateEasing||"swing",step:function(){var t={width:parseInt(e.element.css("width"),10),height:parseInt(e.element.css("height"),10),top:parseInt(e.element.css("top"),10),left:parseInt(e.element.css("left"),10)};f&&f.css({width:t.width,height:t.height});e._updateCache(t);e.propagate("animate",c)}})}});a.ui.plugin.add("resizable","ghost",{start:function(c,d){var b=d.options,
e=a(this).data("resizable"),f=b.proportionallyResize,g=e.size;e.ghost=f?f.clone():e.element.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:g.height,width:g.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof b.ghost=="string"?b.ghost:"");e.ghost.appendTo(e.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 e=function(f){a(f).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];e(b.alsoResize)}else a.each(b.alsoResize,
function(f){e(f)});else e(b.alsoResize)},resize:function(c,d){var b=d.options,e=a(this).data("resizable"),f=e.originalSize,g=e.originalPosition,m={height:e.size.height-f.height||0,width:e.size.width-f.width||0,top:e.position.top-g.top||0,left:e.position.left-g.left||0},p=function(t,y){a(t).each(function(){var A=a(this).data("resizable-alsoresize"),E={};a.each((y&&y.length?y:["width","height","top","left"])||["width","height","top","left"],function(J,Q){var K=(A[Q]||0)+(m[Q]||0);if(K&&K>=0)E[Q]=K||
null});a(this).css(E)})};typeof b.alsoResize=="object"?a.each(b.alsoResize,function(t,y){p(t,y)}):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,e=this.options.positionLayer||"absolute",f=typeof b.resizable=="string"?b.resizable:"n,e,s,w,se,sw,ne,nw",g=this.element.addClass("ui-dialog-content").wrap("<div/>").wrap("<div/>"),
m=this.uiDialogContainer=g.parent().addClass("ui-dialog-container").css({position:"relative",width:"100%",height:"100%"}),p=b.title||g.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(m);e=(this.uiDialog=m.parent()).appendTo(document.body).hide().addClass("ui-dialog").addClass(b.dialogClass).addClass(g.attr("className")).removeClass("ui-dialog-content").css({position:e,
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(e);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){e.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||e.draggable("disable")}if(a.fn.resizable){e.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:f,stop:function(){b.autoResize&&d.size.apply(d);b.resizeStop&&b.resizeStop.apply(d.element[0],arguments);a.ui.dialog.overlay.resize()}});b.resizable||e.resizable("disable")}this.createButtons(b.buttons);this.isOpen=false;b.bgiframe&&a.fn.bgiframe&&e.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),e=a(document),f=e.scrollTop();e=e.scrollLeft();var g=f;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)e+=d[0];else switch(d[0]){case "left":e+=0;break;case "right":e+=b.width()-this.uiDialog.width();break;default:case "center":e+=(b.width()-this.uiDialog.width())/2}if(d[1].constructor==Number)f+=d[1];else switch(d[1]){case "top":f+=0;break;case "bottom":f+=b.height()-this.uiDialog.height();break;default:case "middle":f+=(b.height()-this.uiDialog.height())/2}f=Math.max(f,g);
this.uiDialog.css({top:f,left:e})},size:function(){var d=this.uiDialogContainer,b=this.uiDialogTitlebar,e=this.element,f=parseInt(e.css("margin-top"),10)+parseInt(e.css("margin-bottom"),10),g=parseInt(e.css("margin-left"),10)+parseInt(e.css("margin-right"),10);e.height(d.height()-b.outerHeight()-f);e.width(d.width()-g)},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,e=false,f=this.uiDialogButtonPane;f.empty().hide();a.each(d,function(){return!(e=true)});if(e){f.show();a.each(d,function(g,m){a("<button/>").text(g).click(function(){m.apply(b.element[0],arguments)}).appendTo(f)})}}});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){a(document).bind("keydown.dialog-overlay",function(e){e.keyCode&&e.keyCode==27&&d.close();if(e.keyCode&&e.keyCode==27)try{s2.tuifly.widget.dialog.divLayerClose()}catch(f){}});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:"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,e){a.extend(b,e);for(var f in e)if(e[f]==null||e[f]==undefined)b[f]=e[f];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,e){var f=null;for(attrName in this._defaults){var g=b.getAttribute("date:"+attrName);if(g){f=f||{};try{f[attrName]=eval(g)}catch(m){f[attrName]=g}}}g=b.nodeName.toLowerCase();var p=g=="div"||g=="span";if(!b.id)b.id="dp"+(new Date).getTime();var t=this._newInst(a(b),p);t.settings=a.extend({},e||{},f||{});if(g=="input")this._connectDatepicker(b,t);else p&&this._inlineDatepicker(b,t)},_newInst:function(b,e){return{id:b[0].id,input:b,selectedDay:0,selectedMonth:0,
selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:!e?this.dpDiv:a('<div class="ui-datepicker-inline"></div>')}},_connectDatepicker:function(b,e){var f=a(b);if(!f.hasClass(this.markerClassName)){var g=this._get(e,"appendText"),m=this._get(e,"isRTL");if(g)f[m?"before":"after"]('<span class="'+this._appendClass+'">'+g+"</span>");g=this._get(e,"showOn");if(g=="focus"||g=="both")f.focus(this._showDatepicker);if(g=="button"||g=="both"){g=this._get(e,"buttonText");var p=this._get(e,"buttonImage");g=a(this._get(e,
"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:p,alt:g,title:g}):a('<button type="button"></button>').addClass(this._triggerClass).html(p==""?g:a("<img/>").attr({src:p,alt:g,title:g})));f[m?"before":"after"](g);g.click(function(){a.datepicker._datepickerShowing&&a.datepicker._lastInput==b?a.datepicker._hideDatepicker():a.datepicker._showDatepicker(b);return false})}f.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",
function(t,y,A){e.settings[y]=A}).bind("getData.datepicker",function(t,y){return this._get(e,y)});a.data(b,"datepicker",e)}},_inlineDatepicker:function(b,e){var f=a(b);if(!f.hasClass(this.markerClassName)){f.addClass(this.markerClassName).append(e.dpDiv).bind("setData.datepicker",function(g,m,p){e.settings[m]=p}).bind("getData.datepicker",function(g,m){return this._get(e,m)});a.data(b,"datepicker",e);this._setDate(e,this._getDefaultDate(e));this._updateDatepicker(e)}},_dialogDatepicker:function(b,
e,f,g,m){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,g||{});this._dialogInput.val(e);this._pos=m?m.length?m:[m.pageX,m.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=f;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 e=b.nodeName.toLowerCase(),f=a(b);a.removeData(b,"datepicker");if(e=="input")f.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(e=="div"||e=="span")f.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(e){return e==b?null:e})},_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(e){return e==b?null:e});
this._disabledInputs[this._disabledInputs.length]=b},_isDisabledDatepicker:function(b){if(!b)return false;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]==b)return true;return false},_changeDatepicker:function(b,e,f){var g=e||{};if(typeof e=="string"){g={};g[e]=f}if(inst=a.data(b,"datepicker")){d(inst.settings,g);this._updateDatepicker(inst)}},_setDateDatepicker:function(b,e,f){if(b=a.data(b,"datepicker")){this._setDate(b,e,f);this._updateDatepicker(b)}},_getDateDatepicker:function(b){(b=
a.data(b,"datepicker"))&&this._setDateFromField(b);return b?this._getDate(b):null},_doKeyDown:function(b){var e=a.data(b.target,"datepicker"),f=true;if(a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker(null,"");break;case 13:a.datepicker._selectDay(b.target,e.selectedMonth,e.selectedYear,a("td.ui-datepicker-days-cell-over",e.dpDiv)[0]);return false;case 27:a.datepicker._hideDatepicker(null,a.datepicker._get(e,"duration"));break;case 33:a.datepicker._adjustDate(b.target,
b.ctrlKey?-1:-a.datepicker._get(e,"stepMonths"),b.ctrlKey?"Y":"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+1:+a.datepicker._get(e,"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:f=false}else if(b.keyCode==36&&b.ctrlKey)a.datepicker._showDatepicker(this);else f=false;if(f){b.preventDefault();b.stopPropagation()}},_doKeyPress:function(b){var e=a.data(b.target,"datepicker");e=a.datepicker._possibleChars(a.datepicker._get(e,"dateFormat"));var f=String.fromCharCode(b.charCode==undefined?b.keyCode:b.charCode);return b.ctrlKey||f<" "||!e||e.indexOf(f)>-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 e=a.data(b,"datepicker"),f=a.datepicker._get(e,"beforeShow");d(e.settings,f?f.apply(b,[b,e]):{});a.datepicker._hideDatepicker(null,"");a.datepicker._lastInput=b;a.datepicker._setDateFromField(e);if(a.datepicker._inDialog)b.value="";if(!a.datepicker._pos){a.datepicker._pos=a.datepicker._findPos(b);a.datepicker._pos[1]+=b.offsetHeight}var g=false;a(b).parents().each(function(){g|=a(this).css("position")==
"fixed";return!g});if(g&&a.browser.opera){a.datepicker._pos[0]-=document.documentElement.scrollLeft;a.datepicker._pos[1]-=document.documentElement.scrollTop}b={};b=a.datepicker._get(e,"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;e.rangeStart=null;e.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});a.datepicker._updateDatepicker(e);e.dpDiv.width(a.datepicker._getNumberOfMonths(e)[1]*
a(".ui-datepicker",e.dpDiv[0])[0].offsetWidth);b=a.datepicker._checkOffset(e,b,g);e.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":g?"fixed":"absolute",display:"none",left:b.left+"px",top:b.top-25+"px"});if(!e.inline){b=a.datepicker._get(e,"showAnim")||"show";f=a.datepicker._get(e,"duration");var m=function(){a.datepicker._datepickerShowing=true};a.effects&&a.effects[b]?e.dpDiv.show(b,a.datepicker._get(e,"showOptions"),f,m):e.dpDiv[b](f,m);f==""&&m();e.input[0].type!="hidden"&&e.input[0].focus();
a.datepicker._curInst=e}if(a.datepicker._get(e,"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,e){if(s2.tuifly.helper.search.getSearchParam("direction")=="OneWay")e=b;if(!b&&!e){b=a.datepicker.selectedDateRangeStart;e=a.datepicker.selectedDateRangeEnd;s2.tuifly.helper.search.getSearchParam("direction")=="OneWay"?a(".qPeriod").hide():a(".qPeriod").show()}!b||!e?a(".qReisedauer").text(0):a(".qReisedauer").text(parseInt((Date.parseExact(e,"dd.MM.yyyy")-Date.parseExact(b,"dd.MM.yyyy"))/864E5+1,
10));var f=a("#dateButton");if(b&&e){f.removeClass("qNotClickable");f.removeClass("showButton");f.addClass("bookingButton");f.addClass("qClickable")}else{f.removeClass("qClickable");f.removeClass("bookingButton");f.addClass("showButton");f.addClass("qNotClickable")}a(".qDepartureDate").text(b);a(".qArrivalDate").text(e)},_updateDatepicker:function(b){b.dpDiv.width();b.dpDiv.height();b.dpDiv.empty().append(this._generateDatepicker(b));var e=this._getNumberOfMonths(b);b.dpDiv[(e[0]!=1||e[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,e,f){var g=b.input?this._findPos(b.input[0]):null,m=window.innerWidth||
document.documentElement.clientWidth,p=document.documentElement.scrollLeft||document.body.scrollLeft,t=document.documentElement.scrollTop||document.body.scrollTop;if(this._get(b,"isRTL")||e.left+b.dpDiv.width()-p>m)e.left=Math.max(f?0:p,g[0]+(b.input?b.input.width():0)-(f?p:0)-b.dpDiv.width()-(f&&a.browser.opera?document.documentElement.scrollLeft:0));else e.left-=f?p:0;b.dpDiv.height();e.top-=f?t:0;return e},_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,e){var f=this._curInst;if(f){this._get(f,"rangeSelect")&&this._stayOpen&&this._selectDate("#"+f.id,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear));this._stayOpen=false;if(this._datepickerShowing){e=e!=null?e:this._get(f,"duration");var g=this._get(f,"showAnim"),m=function(){a.datepicker._tidyDialog(f)};e!=""&&a.effects&&a.effects[g]?f.dpDiv.hide(g,a.datepicker._get(f,"showOptions"),e,m):f.dpDiv[e==""?"hide":g=="slideDown"?"slideUp":g==
"fadeIn"?"fadeOut":"hide"](e,m);e==""&&this._tidyDialog(f);if(g=this._get(f,"onClose"))g.apply(f.input?f.input[0]:null,[this._getDate(f),f]);this._datepickerShowing=false;this._lastInput=null;f.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 e=0;_.each(a.datepicker.inputs.slice(0,
2),function(f){var g=a.data(f,"datepicker");g=a.datepicker._get(g,"onSelect");var m="";m=e++===0?a.datepicker.selectedDateRangeStart:a.datepicker.selectedDateRangeEnd;a(f).val(m);g.apply(f,[m])});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,e,f){b=a(b);b=a.data(b[0],"datepicker");this._adjustInstDate(b,e,f);this._updateDatepicker(b)},_gotoToday:function(b){b=a(b);var e=a.data(b[0],"datepicker");if(this._get(e,"gotoCurrent")&&e.currentDay){e.selectedDay=e.currentDay;e.drawMonth=e.selectedMonth=e.currentMonth;e.drawYear=e.selectedYear=e.currentYear}else{var f=new Date;
e.selectedDay=f.getDate();e.drawMonth=e.selectedMonth=f.getMonth();e.drawYear=e.selectedYear=f.getFullYear()}this._adjustDate(b);this._notifyChange(e)},_selectMonthYear:function(b,e,f){b=a(b);var g=a.data(b[0],"datepicker");g._selectingMonthYear=false;g[f=="M"?"drawMonth":"drawYear"]=e.options[e.selectedIndex].value-0;this._adjustDate(b);this._notifyChange(g)},_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,e){var f=a(b);f=a.data(f[0],"datepicker");f.settings.firstDay=e;this._updateDatepicker(f)},_selectDay:function(b,e,f,g){if(!a(g).hasClass(this._unselectableClass)){var m=a(b);m=a.data(m[0],"datepicker");var p=this._get(m,"rangeSelect"),t=this._get(m,"customRangeSelect");if(t){this._stayOpen=true;if(a.datepicker.selectedDateRangeEnd||!a.datepicker.selectedDateRangeStart&&!a.datepicker.selectedDateRangeEnd){a(".ui-datepicker td").removeClass(this._selectedRangeClass);
a(g).addClass(this._selectedRangeClass);a.datepicker.selectedDateRangeStart=a(g).data("date");a.datepicker.selectedDateRangeEnd=s2.tuifly.helper.search.getSearchParam("direction")=="OneWay"?a.datepicker.selectedDateRangeStart:"";a.datepicker._updateDurationAndRange(a(g).data("date"),"")}else{a.datepicker.selectedDateRangeEnd=a(g).data("date");a.datepicker._updateRangeSelection()}}else{m.selectedDay=m.currentDay=a("a",g).html();m.selectedMonth=m.currentMonth=e;m.selectedYear=m.currentYear=f;if(this._stayOpen)m.endDay=
m.endMonth=m.endYear=null;else if(p){m.endDay=m.currentDay;m.endMonth=m.currentMonth;m.endYear=m.currentYear}this._selectDate(b,this._formatDate(m,m.currentDay,m.currentMonth,m.currentYear));if(!t)if(this._stayOpen){m.rangeStart=this._daylightSavingAdjust(new Date(m.currentYear,m.currentMonth,m.currentDay));this._updateDatepicker(m)}else if(p){m.selectedDay=m.currentDay=m.rangeStart.getDate();m.selectedMonth=m.currentMonth=m.rangeStart.getMonth();m.selectedYear=m.currentYear=m.rangeStart.getFullYear();
m.rangeStart=null;m.inline&&this._updateDatepicker(m)}}}},_updateRangeSelection:function(){if(a.datepicker.selectedDateRangeStart||a.datepicker.selectedDateRangeEnd){var b=Date.parseExact(a.datepicker.selectedDateRangeStart,"dd.MM.yyyy"),e=Date.parseExact(a.datepicker.selectedDateRangeEnd,"dd.MM.yyyy");if(b&&e&&b>e){e=a.datepicker.selectedDateRangeStart;a.datepicker.selectedDateRangeStart=a.datepicker.selectedDateRangeEnd;a.datepicker.selectedDateRangeEnd=e;Date.parseExact(a.datepicker.selectedDateRangeStart,
"dd.MM.yyyy");e=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")e=Date.parseExact(a.datepicker.selectedDateRangeStart,"dd.MM.yyyy");var f=a(".ui-datepicker td");f.removeClass(a.datepicker._selectedRangeClass);for(f.removeClass(a.datepicker._currentClass);e-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 e=a.data(b[0],"datepicker");if(!this._get(e,"mandatory")){this._stayOpen=false;e.endDay=e.endMonth=e.endYear=e.rangeStart=
null;this._selectDate(b,"")}},_selectDate:function(b,e){var f=a(b);f=a.data(f[0],"datepicker");e=e!=null?e:this._formatDate(f);if(this._get(f,"rangeSelect")&&e)e=(f.rangeStart?this._formatDate(f,f.rangeStart):e)+this._get(f,"rangeSeparator")+e;f.input&&f.input.val(e);this._updateAlternate(f);var g=this._get(f,"onSelect");if(g)g.apply(f.input?f.input[0]:null,[e,f]);else f.input&&f.input.trigger("change");if(f.inline)this._updateDatepicker(f);else if(!this._stayOpen){this._hideDatepicker(null,this._get(f,
"duration"));this._lastInput=f.input[0];typeof f.input[0]!="object"&&f.input[0].focus();this._lastInput=null}},_updateAlternate:function(b){var e=this._get(b,"altField");if(e){var f=this._get(b,"altFormat"),g=this._getDate(b);dateStr=g&&(a.browser.safari&&typeof g=="object"&&g.length||g.constructor&&g.constructor.toString().match(/\Array\(\)/))?!g[0]&&!g[1]?"":this.formatDate(f,g[0],this._getFormatConfig(b))+this._get(b,"rangeSeparator")+this.formatDate(f,g[1]||g[0],this._getFormatConfig(b)):this.formatDate(f,
g,this._getFormatConfig(b));a(e).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 e=new Date(b.getFullYear(),0,4),f=e.getDay()||7;e.setDate(e.getDate()+1-f);if(f<4&&b<e){b.setDate(b.getDate()-3);return a.datepicker.iso8601Week(b)}else if(b>new Date(b.getFullYear(),11,28)){f=(new Date(b.getFullYear()+1,0,4)).getDay()||7;if(f>4&&(b.getDay()||7)<f-3){b.setDate(b.getDate()+
3);return a.datepicker.iso8601Week(b)}}return Math.floor((b-e)/864E5/7)+1},dateStatus:function(b,e){return a.datepicker.formatDate(a.datepicker._get(e,"dateStatus"),b,a.datepicker._getFormatConfig(e))},parseDate:function(b,e,f){if(b==null||e==null)throw"Invalid arguments";e=typeof e=="object"?e.toString():e+"";if(e=="")return null;var g=(f?f.shortYearCutoff:null)||this._defaults.shortYearCutoff,m=(f?f.dayNamesShort:null)||this._defaults.dayNamesShort,p=(f?f.dayNames:null)||this._defaults.dayNames,
t=(f?f.monthNamesShort:null)||this._defaults.monthNamesShort;f=(f?f.monthNames:null)||this._defaults.monthNames;for(var y=-1,A=-1,E=-1,J=false,Q=function(ra){(ra=B+1<b.length&&b.charAt(B+1)==ra)&&B++;return ra},K=function(ra){Q(ra);for(var da=ra=ra=="@"?14:ra=="y"?4:2,I=0;da>0&&U<e.length&&e.charAt(U)>="0"&&e.charAt(U)<="9";){I=I*10+(e.charAt(U++)-0);da--}if(da==ra)throw"Missing number at position "+U;return I},H=function(ra,da,I){ra=Q(ra)?I:da;for(I=da=0;I<ra.length;I++)da=Math.max(da,ra[I].length);
I="";for(var o=U;da>0&&U<e.length;){I+=e.charAt(U++);for(var va=0;va<ra.length;va++)if(I==ra[va])return va+1;da--}throw"Unknown name at position "+o;},aa=function(){if(e.charAt(U)!=b.charAt(B))throw"Unexpected literal at position "+U;U++},U=0,B=0;B<b.length;B++)if(J)if(b.charAt(B)=="'"&&!Q("'"))J=false;else aa();else switch(b.charAt(B)){case "d":E=K("d");break;case "D":H("D",m,p);break;case "m":A=K("m");break;case "M":A=H("M",t,f);break;case "y":y=K("y");break;case "@":var ga=new Date(K("@"));y=ga.getFullYear();
A=ga.getMonth()+1;E=ga.getDate();break;case "'":if(Q("'"))aa();else J=true;break;default:aa()}if(y<100)y+=(new Date).getFullYear()-(new Date).getFullYear()%100+(y<=g?0:-100);ga=this._daylightSavingAdjust(new Date(y,A-1,E));if(ga.getFullYear()!=y||ga.getMonth()+1!=A||ga.getDate()!=E)throw"Invalid date";return ga},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,e,f){if(!e)return"";var g=(f?f.dayNamesShort:null)||this._defaults.dayNamesShort,m=(f?f.dayNames:null)||this._defaults.dayNames,p=(f?f.monthNamesShort:null)||this._defaults.monthNamesShort;f=(f?f.monthNames:null)||this._defaults.monthNames;var t=function(K){(K=Q+1<b.length&&b.charAt(Q+1)==K)&&Q++;return K},y=function(K,H){return(t(K)&&H<10?"0":"")+H},A=function(K,H,aa,U){return t(K)?U[H]:aa[H]},E="",J=false;if(e)for(var Q=0;Q<b.length;Q++)if(J)if(b.charAt(Q)==
"'"&&!t("'"))J=false;else E+=b.charAt(Q);else switch(b.charAt(Q)){case "d":E+=y("d",e.getDate());break;case "D":E+=A("D",e.getDay(),g,m);break;case "m":E+=y("m",e.getMonth()+1);break;case "M":E+=A("M",e.getMonth(),p,f);break;case "y":E+=t("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case "@":E+=e.getTime();break;case "'":if(t("'"))E+="'";else J=true;break;default:E+=b.charAt(Q)}return E},_possibleChars:function(b){for(var e="",f=false,g=0;g<b.length;g++)if(f)if(b.charAt(g)==
"'"&&!lookAhead("'"))f=false;else e+=b.charAt(g);else switch(b.charAt(g)){case "d":case "m":case "y":case "@":e+="0123456789";break;case "D":case "M":return null;case "'":if(lookAhead("'"))e+="'";else f=true;break;default:e+=b.charAt(g)}return e},_get:function(b,e){return b.settings[e]!==undefined?b.settings[e]:this._defaults[e]},_setDateFromField:function(b){var e=this._get(b,"dateFormat"),f=b.input?b.input.val().split(this._get(b,"rangeSeparator")):null;b.endDay=b.endMonth=b.endYear=null;var g=
defaultDate=this._getDefaultDate(b);if(f.length>0){var m=this._getFormatConfig(b);if(f.length>1){g=this.parseDate(e,f[1],m)||defaultDate;b.endDay=g.getDate();b.endMonth=g.getMonth();b.endYear=g.getFullYear()}try{g=this.parseDate(e,f[0],m)||defaultDate}catch(p){this.log(p);g=defaultDate}}b.selectedDay=g.getDate();b.drawMonth=b.selectedMonth=g.getMonth();b.drawYear=b.selectedYear=g.getFullYear();b.currentDay=f[0]?g.getDate():0;b.currentMonth=f[0]?g.getMonth():0;b.currentYear=f[0]?g.getFullYear():0;
this._adjustInstDate(b)},_getDefaultDate:function(b){var e=this._determineDate(this._get(b,"defaultDate"),new Date),f=this._getMinMaxDate(b,"min",true);b=this._getMinMaxDate(b,"max");e=f&&e<f?f:e;return e=b&&e>b?b:e},_determineDate:function(b,e){var f=function(m){var p=new Date;p.setDate(p.getDate()+m);return p},g=function(m,p){var t=new Date,y=t.getFullYear(),A=t.getMonth();t=t.getDate();for(var E=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,J=E.exec(m);J;){switch(J[2]||"d"){case "d":case "D":t+=J[1]-0;
break;case "w":case "W":t+=J[1]*7;break;case "m":case "M":A+=J[1]-0;t=Math.min(t,p(y,A));break;case "y":case "Y":y+=J[1]-0;t=Math.min(t,p(y,A))}J=E.exec(m)}return new Date(y,A,t)};if(b=(b=b==null?e:typeof b=="string"?g(b,this._getDaysInMonth):typeof b=="number"?isNaN(b)?e:f(b):b)&&b.toString()=="Invalid Date"?e: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,e,f){var g=!e;e=this._determineDate(e,new Date);b.selectedDay=b.currentDay=e.getDate();b.drawMonth=b.selectedMonth=b.currentMonth=e.getMonth();b.drawYear=b.selectedYear=b.currentYear=e.getFullYear();if(this._get(b,"rangeSelect"))if(f){f=this._determineDate(f,null);b.endDay=f.getDate();b.endMonth=f.getMonth();b.endYear=f.getFullYear()}else{b.endDay=b.currentDay;b.endMonth=b.currentMonth;b.endYear=b.currentYear}this._adjustInstDate(b);if(b.input)b.input.val(g?"":this._formatDate(b)+
(!this._get(b,"rangeSelect")?"":this._get(b,"rangeSeparator")+this._formatDate(b,b.endDay,b.endMonth,b.endYear)))},_getDate:function(b){var e=!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||e,!b.endYear?b.rangeStart||e:this._daylightSavingAdjust(new Date(b.endYear,b.endMonth,b.endDay))]:e},_generateDatepicker:function(b){var e=new Date;e=this._daylightSavingAdjust(new Date(e.getFullYear(),
e.getMonth(),e.getDate()));var f=this._get(b,"showStatus"),g=this._get(b,"isRTL"),m=this._get(b,"mandatory")?"":'<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate(\'#'+b.id+"');\""+(f?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");m='<div class="ui-datepicker-control">'+t+'<strong class="ui-datepicker-headline">'+p+"</strong>"+(g?"":m)+'<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"'+(f?this._addStatus(b,this._get(b,"closeStatus")||"&#xa0;"):"")+">"+this._get(b,"closeText")+"</a></div>"+(g?m:"")+"</div>";var y=this._get(b,"prompt");p=this._get(b,"closeAtTop");
var A=this._get(b,"hideIfNoPrevNext"),E=this._get(b,"navigationAsDateFormat");t=this._getNumberOfMonths(b);var J=this._get(b,"stepMonths"),Q=t[0]!=1||t[1]!=1,K=this._daylightSavingAdjust(!b.currentDay?new Date(9999,9,9):new Date(b.currentYear,b.currentMonth,b.currentDay)),H=this._getMinMaxDate(b,"min",false),aa=this._getMinMaxDate(b,"max"),U=b.drawMonth,B=b.drawYear;if(aa){var ga=this._daylightSavingAdjust(new Date(aa.getFullYear(),aa.getMonth()-t[1]+1,aa.getDate()));for(ga=H&&ga<H?H:ga;this._daylightSavingAdjust(new Date(B,
U,1))>ga;){U--;if(U<0){U=11;B--}}}ga=this._get(b,"prevText");ga=!E?ga:this.formatDate(ga,this._daylightSavingAdjust(new Date(B,U-J,1)),this._getFormatConfig(b));ga='<div class="ui-datepicker-prev">'+(this._canAdjustMonth(b,-1,B,U)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+b.id+"', -"+J+", 'M');\""+(f?this._addStatus(b,this._get(b,"prevStatus")||"&#xa0;"):"")+">"+ga+"</a>":A?"":"<label>"+ga+"</label>")+"</div>";var ra=this._get(b,"nextText");ra=!E?ra:this.formatDate(ra,this._daylightSavingAdjust(new Date(B,
U+J,1)),this._getFormatConfig(b));A='<div class="ui-datepicker-next">'+(this._canAdjustMonth(b,+1,B,U)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+b.id+"', +"+J+", 'M');\""+(f?this._addStatus(b,this._get(b,"nextStatus")||"&#xa0;"):"")+">"+ra+"</a>":A?"":"<label>"+ra+"</label>")+"</div>";J=this._get(b,"currentText");J=!E?J:this.formatDate(J,e,this._getFormatConfig(b));g=(y?'<div class="'+this._promptClass+'">'+y+"</div>":"")+(p&&!b.inline?m:"")+'<div class="ui-datepicker-links">'+(g?A:ga)+(this._isInRange(b,
this._get(b,"gotoCurrent")&&b.currentDay?K:e)?'<div class="ui-datepicker-current"><a onclick="jQuery.datepicker._gotoToday(\'#'+b.id+"');\""+(f?this._addStatus(b,this._get(b,"currentStatus")||"&#xa0;"):"")+">"+J+"</a></div>":"")+(g?ga:A)+"</div>";y=this._get(b,"firstDay");E=this._get(b,"changeFirstDay");A=this._get(b,"dayNames");J=this._get(b,"dayNamesShort");ga=this._get(b,"dayNamesMin");ra=this._get(b,"monthNames");for(var da=this._get(b,"beforeShowDay"),I=this._get(b,"highlightWeek"),o=this._get(b,
"showOtherMonths"),va=this._get(b,"showWeeks"),ia=this._get(b,"calculateWeek")||this.iso8601Week,w=f?this._get(b,"dayStatus")||"&#xa0;":"",G=this._get(b,"statusForDate")||this.dateStatus,S=b.endDay?this._daylightSavingAdjust(new Date(b.endYear,b.endMonth,b.endDay)):K,W=0,ja=0;ja<t[0];ja++)for(var qa=0;qa<t[1];qa++){var Ba=this._daylightSavingAdjust(new Date(B,U,b.selectedDay));g+='<div class="ui-datepicker-one-month'+(qa==0?" ui-datepicker-new-row":"")+'">'+this._generateMonthYearHeader(b,U,B,H,aa,
Ba,ja>0||qa>0,f,ra)+'<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead><tr class="ui-datepicker-title-row">'+(va?"<td>"+this._get(b,"weekHeader")+"</td>":"");for(var Da=0;Da<7;Da++){var Ka=(Da+y)%7,wa=w.indexOf("DD")>-1?w.replace(/DD/,A[Ka]):w.replace(/D/,J[Ka]);g+="<td"+((Da+y+6)%7>=5?' class="ui-datepicker-week-end-cell"':"")+">"+(!E?"<span":"<a onclick=\"jQuery.datepicker._changeFirstDay('#"+b.id+"', "+Ka+');"')+(f?this._addStatus(b,wa):"")+' title="'+A[Ka]+'">'+ga[Ka]+(E?"</a>":
"</span>")+"</td>"}g+="</tr></thead><tbody>";Ka=this._getDaysInMonth(B,U);if(B==b.selectedYear&&U==b.selectedMonth)b.selectedDay=Math.min(b.selectedDay,Ka);Da=(this._getFirstDayOfMonth(B,U)-y+7)%7;Ka=Q?6:Math.ceil((Da+Ka)/7);wa=this._daylightSavingAdjust(new Date(B,U,1-Da));for(var Va=0;Va<Ka;Va++){g+='<tr class="ui-datepicker-days-row">'+(va?'<td class="ui-datepicker-week-col">'+ia(wa)+"</td>":"");for(Da=0;Da<7;Da++){W++;var Ua=da?da.apply(b.input?b.input[0]:null,[wa]):[true,""],la=wa.getMonth()!=
U,T=la||!Ua[0]||H&&wa<H||aa&&wa>aa,ba=wa.getMonth(),ea=wa.getFullYear(),ma=wa.getMonth()!=U;g+='<td data-date="'+this._formatDate(b,wa.getDate(),wa.getMonth(),wa.getFullYear())+'" data-position="'+W+'" class="ui-datepicker-days-cell'+((Da+y+6)%7>=5?" ui-datepicker-week-end-cell":"")+(ma?" ui-datepicker-otherMonth":"")+(wa.getTime()==Ba.getTime()&&U==b.selectedMonth?" ui-datepicker-days-cell-over":"")+(T?" "+this._unselectableClass:"")+(la&&!o?"":" "+Ua[1]+(wa.getTime()>=K.getTime()&&wa.getTime()<=
S.getTime()?" "+this._currentClass:"")+(wa.getTime()==e.getTime()?" ui-datepicker-today":""))+'"'+((!la||o)&&Ua[2]?' title="'+Ua[2]+'"':"")+(T?I?" 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')"+(I?".parent().addClass('ui-datepicker-week-over')":"")+";"+(!f||la&&!o?"":"jQuery('#ui-datepicker-status-"+b.id+"').html('"+(G.apply(b.input?
b.input[0]:null,[wa,b])||"&#xa0;")+"');")+"\" onmouseout=\"jQuery(this).removeClass('ui-datepicker-days-cell-over')"+(I?".parent().removeClass('ui-datepicker-week-over')":"")+";"+(!f||la&&!o?"":"jQuery('#ui-datepicker-status-"+b.id+"').html('&#xa0;');")+'" onclick="jQuery.datepicker._selectDay(\'#'+b.id+"',"+ba+","+ea+', this);"')+">"+(la?o?wa.getDate():"&#xa0;":T?wa.getDate():"<a>"+wa.getDate()+"</a>")+"</td>";wa.setDate(wa.getDate()+1);wa=this._daylightSavingAdjust(wa)}g+="</tr>"}U++;if(U>11){U=
0;B++}g+="</tbody></table></div>"}g+=(f?'<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?m:"")+(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 g},_generateMonthYearHeader:function(b,e,f,g,m,p,t,y,A){g=b.rangeStart&&g&&p<g?p:g;p='<div class="ui-datepicker-header">';if(t||!this._get(b,"changeMonth"))p+=A[e]+"&#xa0;";else{var E=g&&g.getFullYear()==f,J=m&&m.getFullYear()==f;p+='<select class="ui-datepicker-new-month" onchange="jQuery.datepicker._selectMonthYear(\'#'+b.id+"', this, 'M');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+b.id+
"');\""+(y?this._addStatus(b,this._get(b,"monthStatus")||"&#xa0;"):"")+">";for(var Q=0;Q<12;Q++)if((!E||Q>=g.getMonth())&&(!J||Q<=m.getMonth()))p+='<option value="'+Q+'"'+(Q==e?' selected="selected"':"")+">"+A[Q]+"</option>";p+="</select>"}if(t||!this._get(b,"changeYear"))p+=f;else{e=this._get(b,"yearRange").split(":");A=t=0;if(e.length!=2){t=f-10;A=f+10}else if(e[0].charAt(0)=="+"||e[0].charAt(0)=="-"){t=A=(new Date).getFullYear();t+=parseInt(e[0],10);A+=parseInt(e[1],10)}else{t=parseInt(e[0],10);
A=parseInt(e[1],10)}t=g?Math.max(t,g.getFullYear()):t;A=m?Math.min(A,m.getFullYear()):A;for(p+='<select class="ui-datepicker-new-year" onchange="jQuery.datepicker._selectMonthYear(\'#'+b.id+"', this, 'Y');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+b.id+"');\""+(y?this._addStatus(b,this._get(b,"yearStatus")||"&#xa0;"):"")+">";t<=A;t++)p+='<option value="'+t+'"'+(t==f?' selected="selected"':"")+">"+t+"</option>";p+="</select>"}p+="</div>";return p},_addStatus:function(b,e){return" onmouseover=\"jQuery('#ui-datepicker-status-"+
b.id+"').html('"+e+"');\" onmouseout=\"jQuery('#ui-datepicker-status-"+b.id+"').html('&#xa0;');\""},_adjustInstDate:function(b,e,f){var g=b.drawYear+(f=="Y"?e:0),m=b.drawMonth+(f=="M"?e:0);e=Math.min(b.selectedDay,this._getDaysInMonth(g,m))+(f=="D"?e:0);g=this._daylightSavingAdjust(new Date(g,m,e));m=this._getMinMaxDate(b,"min",true);e=this._getMinMaxDate(b,"max");g=m&&g<m?m:g;g=e&&g>e?e:g;b.selectedDay=g.getDate();b.drawMonth=b.selectedMonth=g.getMonth();b.drawYear=b.selectedYear=g.getFullYear();
if(f=="M"||f=="Y")this._notifyChange(b)},_notifyChange:function(b){var e=this._get(b,"onChangeMonthYear");if(e)e.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,e,f){e=this._determineDate(this._get(b,e+"Date"),null);return!f||!b.rangeStart?e:!e||b.rangeStart>e?b.rangeStart:e},_getDaysInMonth:function(b,e){return 32-(new Date(b,e,32)).getDate()},
_getFirstDayOfMonth:function(b,e){return(new Date(b,e,1)).getDay()},_canAdjustMonth:function(b,e,f,g){var m=this._getNumberOfMonths(b);f=this._daylightSavingAdjust(new Date(f,g+(e<0?e:m[1]),1));e<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth()));return this._isInRange(b,f)},_isInRange:function(b,e){var f=!b.rangeStart?null:this._daylightSavingAdjust(new Date(b.selectedYear,b.selectedMonth,b.selectedDay));f=(f=f&&b.rangeStart<f?b.rangeStart:f)||this._getMinMaxDate(b,"min");var g=this._getMinMaxDate(b,
"max");return(!f||e>=f)&&(!g||e<=g)},_getFormatConfig:function(b){var e=this._get(b,"shortYearCutoff");e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);return{shortYearCutoff:e,dayNamesShort:this._get(b,"dayNamesShort"),dayNames:this._get(b,"dayNames"),monthNamesShort:this._get(b,"monthNamesShort"),monthNames:this._get(b,"monthNames")}},_formatDate:function(b,e,f,g){if(!e){b.currentDay=b.selectedDay;b.currentMonth=b.selectedMonth;b.currentYear=b.selectedYear}e=e?typeof e=="object"?
e:this._daylightSavingAdjust(new Date(g,f,e)):this._daylightSavingAdjust(new Date(b.currentYear,b.currentMonth,b.currentDay));return this.formatDate(this._get(b,"dateFormat"),e,this._getFormatConfig(b))}});a.fn.datepicker=function(b){var e=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(e));return this.each(function(){typeof b=="string"?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,
[this].concat(e)):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)),e=d.replace(/Year$/,"Month");d=d.replace(/Year$/,"Day");e=parseInt($("#"+e).val())-1;d=parseInt($("#"+d).val());if(d>0&&e>0&&b>0){b=new Date(b,e,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,e=a.getAttribute(this.validateIfCheckedOnlyAttribute);b=a.getAttribute(b);if(e!=null){var f=document.getElementById(e);f||(f=document.getElementById(this.namespace+e));if(f!=null)if($(f).attr("type")=="checkbox"&&!f.checked||$(f).attr("type")!="checkbox"&&$(f).val()!="checked")d=null}if(b!=null){f=document.getElementById(this.namespace+
b);if(f!=null)if(f.checked!=undefined)if(f.type=="checkbox"&&f.checked!=false||f.type!="checkbox"&&f.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 e=c[d].replace(/{\s*(\w+)\s*}/,"$1");b=b.replace(/{\s*\w+\s*}/,this.cleanAttributeForErrorDisplay(a,e))}$(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){s2.tuifly.initialize.diff("ChangeDest0");var b=0,e="";if(typeof s2=="undefined"&&parseInt(a.selectedIndex,10)>0){e=c.options[0].text;var f=parseInt(a.selectedIndex,10);a=a.options[f].value;c.length=1;c.options[0]=new Option(e);if(c.requiredempty)c.options[0].value=c.requiredempty;for(f=0;f<SortedStations.length;f++){for(j=0;j<Stations[a].mkts.length;j++){var g=Stations[a].mkts[j];if(Stations[g])if(SortedStations[f]==g&&Stations[g].validDest==true){if(g==d)b=c.length;
c.length+=1;e=showStationCodes?Stations[g].name+" ("+g+")":Stations[g].name;c.options[c.length-1]=new Option(e);c.options[c.length-1].value=g;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>"];s2.tuifly.initialize.diff("Filllist0");for(var b="",e=0;e<SortedStations.length;e++){var f=
SortedStations[e];if(b=Stations[f])if(b.validDest){var g=false;if(c==f)g=true;b=b.name+" ("+f+")";d.push('<option value="'+f+'"'+(g?" selected=selected":"")+">"+b+"</option>")}}s2.tuifly.initialize.diff("Filllist1");a.innerHTML="";$(a).html(d.join(""));s2.tuifly.initialize.diff("Filllist2")}}else s2.Logger.debug("There's no DropDownDest!")}
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){var c="",d,b,e,f,g,m,p=0;for(a=Base64._utf8_encode(a);p<a.length;){d=a.charCodeAt(p++);b=a.charCodeAt(p++);e=a.charCodeAt(p++);f=d>>2;d=(d&3)<<4|b>>4;g=(b&15)<<2|e>>6;m=e&63;if(isNaN(b))g=m=64;else if(isNaN(e))m=64;c=c+this._keyStr.charAt(f)+this._keyStr.charAt(d)+this._keyStr.charAt(g)+this._keyStr.charAt(m)}return c},decode:function(a){var c="",d,b,e,f,g,m=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");m<a.length;){d=this._keyStr.indexOf(a.charAt(m++));b=this._keyStr.indexOf(a.charAt(m++));f=this._keyStr.indexOf(a.charAt(m++));g=this._keyStr.indexOf(a.charAt(m++));d=d<<2|b>>4;b=(b&15)<<4|f>>2;e=(f&3)<<6|g;c+=String.fromCharCode(d);if(f!=64)c+=String.fromCharCode(b);if(g!=64)c+=String.fromCharCode(e)}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 e=PromoCodes[promoCode].routes[b];if(e==a||e==c){togglePromoCodeIcon("valid");return true}d!=" "?d+=", "+e:d+=e}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,e,f,g,m){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(e);t=t+"&airport="+encodeURI(f);t=t+"&language="+encodeURI(g);t=t+"&source="+encodeURI(m);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,e=0,f=screen.availWidth,g=screen.availHeight,m=d.split(",");for(i=0;i<m.length;i++){if(m[i].indexOf("width")!=-1){tmpArray2=m[i].split("=");b=tmpArray2[1]}if(m[i].indexOf("height")!=-1){tmpArray2=m[i].split("=");e=tmpArray2[1]}}b=eval(f/2-b/2);e=eval(g/2-e/2);d+=",top="+e+",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 e=b[1],f=b[2];b=b[3];var g=b.lastIndexOf("/");g=b.substring(0,g+1);f.match(/^([^:]*):[0-9]*$/);b=d.match(/^(http[s]?):\/\/([^\/]*)(\/.*)$/i);if(b!=null){e=b[1];d=b[3]}if(d.charAt(0)!="/")d=g+d;f=e=="https"?c?document.dynamic_server_ssl:document.static_server_ssl:c?document.dynamic_server:document.static_server;d=f+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,e=d.lastIndexOf(" ");if(e!=-1){var f=d.length;d=unescape(d.substring(0,e));++e;b=unescape(b.substring(e,f))}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),e=a.substring(8,10);a=a.substring(10,12);return b+" "+monthName[d]+" "+c+" "+e+":"+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 e=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;e=true}e==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=[],e=1;e<=numDatesToValidate;e++)if(MarketAction[e]!="Cancel")if(validateElement("DropDownListMarketDay"+e)){var f=a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+e].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+
e].selectedIndex].value,g=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].selectedIndex].value.substring(5,7),m=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].selectedIndex].value.substring(0,4);b[e]=""+m+g+f}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=[],e=1;e<=numDatesToValidate;e++)if(MarketAction[e]!="Cancel")if(validateElement("DropDownListMarketDay"+e)){var f=a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+e].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+e].selectedIndex].value,
g=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].selectedIndex].value.substring(5,7),m=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].selectedIndex].value.substring(0,4);b[e]=""+m+g+f}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 e=0;e<b.length;e++)if(b[e].value=="PMO"){b.selectedIndex=e;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(e=0;e<d.length;e++)if(d[e].value==
"PMO"){d.selectedIndex=e;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 e=String(b.getDate());if(e.length==1)e="0"+e;var f=String(b.getMonth()+1);if(f.length==1)f="0"+f;b=String(b.getFullYear());b=b+f+e;if(d>b){alert(a);
b=(new Date).getTime();b+=1728E5;b=new Date(b);e=String(b.getDate());if(e.length==1)e="0"+e;f=String(b.getMonth()+1);if(f.length==1)f="0"+f;b=String(b.getFullYear());c[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"].value=e;c[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"].value=b+"-"+f;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);e=String(b.getDate());if(e.length==1)e="0"+e;f=String(b.getMonth()+1);if(f.length==1)f="0"+f;b=String(b.getFullYear());c[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].value=e;c[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].value=b+"-"+f;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,e=message.fleugplaneinschraenkung_laterPrefix,f=message.fleugplaneinschraenkung_laterInfixTo,g=message.fleugplaneinschraenkung_laterInfixDate,m=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,y=GetMarketStructure()!="OneWay",
A=p[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"].selectedIndex].value,E=p[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"].selectedIndex].value,J=p[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"].options[p[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"].selectedIndex].text,Q=p[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"].options[p[applicationJavaScriptHtmlId+
"_DropDownListMarketDestination1"].selectedIndex].text,K=true,H=checkAvailabilityDate(A,E,t);if(H!=""){K=H.slice(6,8)+"."+H.slice(4,6)+"."+H.slice(0,4);t<H?s2.tuifly.widget.dialog.alertNotice(a+J+c+Q+d+K+b):s2.tuifly.widget.dialog.alertNotice(e+J+f+Q+g+K+m);K=false;t=H.slice(6,8);var aa=H.slice(0,4)+"-"+H.slice(4,6),U;for(U=0;U<p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"].options.length;U++)if(p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"].options[U].value==aa){p[applicationJavaScriptHtmlId+
"_DropDownListMarketMonth1"].selectedIndex=U;$(p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth1"]).change()}for(U=0;U<p[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"].options.length;U++)if(p[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"].options[U].value==t){p[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"].selectedIndex=U;$(p[applicationJavaScriptHtmlId+"_DropDownListMarketDay1"]).change()}if(y){U=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(U<H){for(U=0;U<p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].options.length;U++)if(p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].options[U].value==
aa){p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].selectedIndex=U;$(p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"]).change()}for(U=0;U<p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].options.length;U++)if(p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].options[U].value==t){p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].selectedIndex=U;$(p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"]).change()}}}}else{H=getAvailabilitySearchRange(A,E,t);
for(element in p.elements)if(element.type=="hidden"&&element.name.indexof("_DropDownListMarketDateRange1")>-1){element.value=H;break}}if(y){U=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;H=checkAvailabilityDate(E,A,U);if(H!=""){K=H.slice(6,8)+"."+H.slice(4,6)+"."+H.slice(0,4);U<H?s2.tuifly.widget.dialog.alertNotice(a+Q+c+J+d+K+b):s2.tuifly.widget.dialog.alertNotice(e+Q+f+J+g+K+m);K=false;t=H.slice(6,8);aa=H.slice(0,4)+"-"+H.slice(4,6);for(U=0;U<p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].options.length;U++)if(p[applicationJavaScriptHtmlId+"_DropDownListMarketMonth2"].options[U].value==aa)p[applicationJavaScriptHtmlId+
"_DropDownListMarketMonth2"].selectedIndex=U;for(U=0;U<p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].options.length;U++)if(p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].options[U].value==t)p[applicationJavaScriptHtmlId+"_DropDownListMarketDay2"].selectedIndex=U}else{H=getAvailabilitySearchRange(E,A,U);for(element in p.elements)if(element.type=="hidden"&&element.name.indexof("_DropDownListMarketDateRange2")>-1){element.value=H;break}}}return K}
function checkAvailabilityGroups(){var a=message.fleugplaneinschraenkung_priorPrefix,c=message.fleugplaneinschraenkung_priorInfixTo,d=message.fleugplaneinschraenkung_priorInfixDate,b=message.fleugplaneinschraenkung_priorSuffix,e=message.fleugplaneinschraenkung_laterPrefix,f=message.fleugplaneinschraenkung_laterInfixTo,g=message.fleugplaneinschraenkung_laterInfixDate,m=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,y="";y=document.getElementById("travel_type2").checked?"OneWay":"RoundTrip";y=y!="OneWay";var A=p.sector1_o.options[p.sector1_o.selectedIndex].value,E=p.sector1_d.options[p.sector1_d.selectedIndex].value,J=p.sector1_o.options[p.sector1_o.selectedIndex].text,Q=p.sector1_d.options[p.sector1_d.selectedIndex].text,K=true,H=checkAvailabilityDate(A,E,t);if(H!=""){K=H.slice(6,8)+"."+H.slice(4,6)+
"."+H.slice(0,4);t<H?s2.tuifly.widget.dialog.alertNotice(a+J+c+Q+d+K+b):s2.tuifly.widget.dialog.alertNotice(e+J+f+Q+g+K+m);K=false;var aa=H.slice(6,8),U=H.slice(0,4)+H.slice(4,6),B;for(B=0;B<p.year_o.options.length;B++)if(p.year_o.options[B].value==U)p.year_o.selectedIndex=B;for(B=0;B<p.day_o.options.length;B++)if(p.day_o.options[B].value==aa)p.day_o.selectedIndex=B;if(y){B=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(B<H){for(B=0;B<p.year_d.options.length;B++)if(p.year_d.options[B].value==U)p.year_d.selectedIndex=B;for(B=0;B<p.day_d.options.length;B++)if(p.day_d.options[B].value==aa)p.day_d.selectedIndex=B}}}if(y){B=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;B<t&&alert(localizedTextEarlierDatePre);H=checkAvailabilityDate(E,A,B);if(H!=""){K=
H.slice(6,8)+"."+H.slice(4,6)+"."+H.slice(0,4);B<H?s2.tuifly.widget.dialog.alertNotice(a+Q+c+J+d+K+b):s2.tuifly.widget.dialog.alertNotice(e+Q+f+J+g+K+m);K=false;aa=H.slice(6,8);U=H.slice(0,4)+H.slice(4,6);for(B=0;B<p.year_d.options.length;B++)if(p.year_d.options[B].value==U)p.year_d.selectedIndex=B;for(B=0;B<p.day_d.options.length;B++)if(p.day_d.options[B].value==aa)p.day_d.selectedIndex=B}}return K}
function getAvailabilitySearchRange(a,c,d){var b=2,e=2;if(!available)return""+b+"|"+e;if(!available[a+" "+c])return""+b+"|"+e;var f=available[a+" "+c].slice(0,8);a=available[a+" "+c].slice(9,17);var g=new Date,m=g.getFullYear();c=g.getMonth()+1;var p=g.getDate();m=g.getFullYear().toString();if(c<10)m+="0";m+=c.toString();if(p<10)m+="0";m+=p.toString();if(f<m)f=m;g=new Date;g.setFullYear(d.slice(0,4));g.setMonth(d.slice(4,6)-1);g.setDate(d.slice(6,8));g.setTime(g.getTime()-864E5*b);m=""+g.getFullYear();
c="0"+(g.getMonth()+1);if(c.length>2)c=c.slice(c.length-2,c.length);p="0"+g.getDate();if(p.length>2)p=p.slice(p.length-2,p.length);for(c=m+c+p;c<f&&b>0;){b--;g.setTime(g.getTime()+864E5);m=""+g.getFullYear();c="0"+(g.getMonth()+1);if(c.length>2)c=c.slice(c.length-2,c.length);p="0"+g.getDate();if(p.length>2)p=p.slice(p.length-2,p.length);c=m+c+p}g=new Date;g.setFullYear(d.slice(0,4));g.setMonth(d.slice(4,6)-1);g.setDate(d.slice(6,8));g.setTime(g.getTime()+864E5*e);m=""+g.getFullYear();c="0"+(g.getMonth()+
1);if(c.length>2)c=c.slice(c.length-2,c.length);p="0"+g.getDate();if(p.length>2)p=p.slice(p.length-2,p.length);for(c=m+c+p;c>a&&e>0;){e--;g.setTime(g.getTime()-864E5);m=""+g.getFullYear();c="0"+(g.getMonth()+1);if(c.length>2)c=c.slice(c.length-2,c.length);p="0"+g.getDate();if(p.length>2)p=p.slice(p.length-2,p.length);c=m+c+p}return""+b+"|"+e}
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 e=new Date;e.getFullYear();c=e.getMonth()+1;var f=e.getDate();e=e.getFullYear().toString();if(c<10)e+="0";e+=c.toString();if(f<10)e+="0";e+=f.toString();if(b<e)b=e;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="",e=0;e<c+1;e++)b+="    ";if(typeof a=="object")for(var f in a){e=a[f];if(typeof e=="object"){d+=b+"'"+f+"' ...\n";d+=dump(e,c+1)}else d+=b+"'"+f+"' => \""+e+'"\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 e=0;e<d.length;e++)if(currentStationMarket==d[e]){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 e=0;e<allyoucanflyRoutes[currentStation.code].length;e++)if(currentStationMarket==allyoucanflyRoutes[currentStation.code][e]){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 e=0;e<b.mkts.length;++e){var f=available[b.code+" "+b.mkts[e]];if(f){var g=new Date;g.setDate(f.substring(15,17));g.setMonth(f.substring(13,15)-1);g.setFullYear(f.substring(9,13));if(RouteMaxDate==null)RouteMaxDate=g;if(RouteMaxDate.getTime()<g.getTime())RouteMaxDate=g;if(g.getTime()<c){b.mkts.splice(e,1);e--;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],e=false,f=[];if(c[d.code]!=null)f=f.concat(c[d.code]);if(c[b]!=null)f=f.concat(c[b]);if(f.length>0)for(l=0;l<f.length;++l)if(f[l]==d.code||f[l]==b){e=true;break}if(!e){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)}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();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(),e=GetChildCount();if(d>c){s2.tuifly.widget.dialog.alertNotice(a);return false}a=d>0||b>0||e>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,e=a.dateSelected.getMonth()+1;if(e<10)e="0"+e;var f=a.dateSelected.getDate();if(f<10)f="0"+f;c[b].value=a.dateSelected.getFullYear()+"-"+e;c[d].value=f}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,e=1;e<=numDatesToValidate;e++)if(MarketAction[e]!="Cancel")if(validateElement("DropDownListMarketDay"+e)){var f=a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+e].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+e].selectedIndex].value,g=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+
e].selectedIndex].value.substring(5,7),m=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].selectedIndex].value.substring(0,4),p=a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].selectedIndex].text,t=""+m+g+f;if(!CheckDaysOfMonth(f,g,m)){s2.tuifly.widget.dialog.alert(localizedTextInvalidDatePre+f+localizedTextInvalidDateMid+p+localizedTextInvalidDatePost);
return false}if(MarketLiftStatus[e]==null)MarketLiftStatus[e]="Default";if(t<c&&MarketLiftStatus[e]==applicationLiftStatus){if(e==1){c=localizedTextPastDatePre;if(MarketAction[e]=="New"||MarketAction[e]=="Change"){c+=localizedTextPastDatePost;s2.tuifly.widget.dialog.alert(c);a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+e].options.selectedIndex=d-1;a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].options.selectedIndex=findIndexByValue(a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+
e],b);$(a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+e]).change()}else s2.tuifly.widget.dialog.alert(c)}else{c=localizedTextEarlierDatePre;if(MarketAction[e]=="New"||MarketAction[e]=="Change"){c+=localizedTextEarlierDatePost;s2.tuifly.widget.dialog.alert(c);a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+e].options.selectedIndex=parseInt(a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+(e-1)].options.selectedIndex,10)+0;a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+
e].options.selectedIndex=parseInt(a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+(e-1)].options.selectedIndex,10)+0;$(a[applicationJavaScriptHtmlId+"_DropDownListMarketDay"+e]).change()}else s2.tuifly.widget.dialog.alert(c)}return false}c=t}for(e=1;e<=numDatesToValidate;e++)if(!(MarketAction[e]=="Cancel"||MarketAction[e]=="Retain"))if(validateElement("DropDownListMarketDay"+e)){a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+
e].selectedIndex].value.substring(5,7);a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].options[a[applicationJavaScriptHtmlId+"_DropDownListMarketMonth"+e].selectedIndex].value.substring(0,4);break}return true}var tempEventArgs,retryCount=0;function ExistingMarket(a,c,d,b,e){this.orig=a;this.dest=c;this.day=d;this.monthYear=b;this.monthYearValue=e}
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,e=0;e<a.length;e++)if(c[a[e]]!=void 0){d=true;b+=parseInt(c[a[e]].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,e=1;e<=numMarketsToValidate;e++)if(MarketAction[e]!="Cancel")if(applicationUseDropDownForStations){if(validateElement("DropDownListMarketOrigin"+e)){b+=1;if(c[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin"+e].selectedIndex==0)if(a=="TripPlanner"&&e>1){numMarketsToValidate=e-1;numDatesToValidate=e-1;break}else{s2.tuifly.widget.dialog.alert(localizedMissingOrigin);return false}}else if(a=="TripPlanner"&&e>1){numMarketsToValidate=
e-1;numDatesToValidate=e-1;break}if(validateElement("DropDownListMarketDestination"+e)){b+=1;if(c[applicationJavaScriptHtmlId+"_DropDownListMarketDestination"+e].selectedIndex==0){s2.tuifly.widget.dialog.alert(localizedMissingDest);return false}}}else{if(validateElement("TextBoxMarketOrigin"+e)){b+=1;d[b]=c[applicationJavaScriptHtmlId+"_TextBoxMarketOrigin"+e];if(IsEmpty(d[b],localizedTextTextBoxMarketOrigin))if(a=="TripPlanner"&&e>1){numMarketsToValidate=e-1;numDatesToValidate=e-1;break}else{s2.tuifly.widget.dialog.alert(localizedMissingOrigin);
return false}}else if(a=="TripPlanner"&&e>1){numMarketsToValidate=e-1;numDatesToValidate=e-1;break}if(validateElement("TextBoxMarketDestination"+e)){b+=1;d[b]=c[applicationJavaScriptHtmlId+"_TextBoxMarketDestination"+e];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),e=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDestination"+a);c&&OriginMac(c);d&&DestinationMac(d);b&&OriginMac(b);e&&DestinationMac(e)}}
function highlightMoveDays(a,c){var d=a.id.charAt(a.id.length-1);try{var b=window["moveDepartureDays"+d]}catch(e){return}if(b!=null){d=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDay"+d);for(var f=0;f<d.options.length;f++)d.options[f].className="";if(b[a.value]!=null){b=b[a.value].split(",");for(f=0;f<b.length;f++)d.options[b[f]-1].className=c}}}
function highlightMoveOriginCities(a,c){try{var d=window["moveDepartureCities"+a]}catch(b){return}if(d!=null)for(var e=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketOrigin"+a),f=0;f<d.length;f++)for(var g=0;g<e.options.length;g++)if(d[f]==e.options[g].value){e.options[g].className=c;break}}
function highlightMoveDestinationCities(a,c){try{var d=window["moveArrivalCities"+a]}catch(b){return}if(d!=null)for(var e=document.getElementById(applicationJavaScriptHtmlId+"_DropDownListMarketDestination"+a),f=0;f<d.length;f++)for(var g=0;g<e.options.length;g++)if(d[f]==e.options[g].value){e.options[g].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(){var a=document.SkySales,c=GetValue(a[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"]);a=GetValue(a[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"]);var d=s2.tuifly.model.flightSearch.StationManager.getInstance().findStation(c),b=$("input[id$='_OneWay']").is(":checked"),e=true,f=s2.tuifly.helper.restrictions.validateSearch(c,a,b);if(f!=null){var g=s2.tuifly.util.culture.get(f.error);g!=null&&jQuery.each(f,function(m,p){g=g.replace(RegExp("{"+
m+"}"),p)});s2.tuifly.widget.dialog.alertNotice(g);return false}if(s2.tuifly.util.routes.airports[c]&&s2.tuifly.util.routes.airports[c].noOrigin&&$.inArray(a,s2.tuifly.util.routes.airports[c].airports)>=0)e=false;if(d&&!d.isInGermany()&&s2.tuifly.util.routes.airports[a]&&s2.tuifly.util.routes.airports[a].onlyValidFromGermany>=0&&$.inArray(c,s2.tuifly.util.routes.airports[a].airports)>=0)e=false;if(b&&s2.tuifly.util.routes.airports[a]&&s2.tuifly.util.routes.airports[a].onlyWithReturn&&$.inArray(c,
s2.tuifly.util.routes.airports[a].airports)>=0)e=false;if(e)return true;else{d=s2.tuifly.util.culture.get("lengthOfStayMessageCS");c=s2.tuifly.util.routes.airports[c]?s2.tuifly.util.routes.airports[c]:s2.tuifly.util.routes.airports[a];d=d.replace(/{minLengthOfStay}/,c.min);d=d.replace(/{maxLengthOfStay}/,c.max);s2.tuifly.widget.dialog.alertNotice(d);return false}}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.namespace=function(c,d){for(var b=c.split("."),e=window,f=0;f<b.length;f++){var g=b[f];if(e[g]==null)e[g]=new a;e=e[g]}d.call(e,e)};window.s2.evalNamespace=function(c){c=c.split(".");for(var d=window,b=0;b<c.length;b++){var e=c[b];if(d[e]==null)d[e]=new a;d=d[e]}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,e=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",e);this.addClassMethod("create",function(){e();return this.create.apply(this,arguments)});this.c.getInstance=function(){e();return this.getInstance.apply(this,arguments)}}}})});
s2.namespace("s2.tuifly",function(){var a=false,c,d="",b=2,e=function(){c.show();c.html(d)},f=false;$(document).ready(function(){f=true});var g="";this.Logger={init:function(){if((new String(location.hash)).indexOf("debug")>-1)b=4},log:function(m,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+m):console.log(t+m)}else if(f){if(g){m=g+"\n"+m;g=null}if(a){m=m.replace(/\n/g,
"<br />\n");d=m+"<br />\n"+d;t&&clearTimeout(t);t=setTimeout(e,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(m)}}else g+=m},debug:function(m){b<4||this.log(m)},error:function(m){this.log(m,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 e=b[c];b[c]=function(){var f=e.apply(this,arguments);d.apply(this,arguments);return f}};this.around=function(c,d,b){b=b;if(b==null)b=window;var e=b[c];b[c]=function(){var f=[e].concat(Array.prototype.slice.call(arguments,0));return d.apply(this,
f)}};this.getDotNetNamespacedThing=function(c){var d=RegExp(c+"$"),b;Joose.O.each(window,function(e,f){if(f.match(d)){b=e;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,e){c.apply(d,e)})},observeOnce:function(c){var d=this;this.observe(function(b,e){e?c.apply(d,e):c.call(d);$(document).unbind(d.eventName,c)})},observeLazy:function(c,d){var b=this,
e=a,f=d||200;this.observe(function(){b.lazyTimeout[e]&&clearTimeout(b.lazyTimeout[e]);var g=arguments;b.lazyTimeout[e]=setTimeout(function(){c.apply(b,g)},f)});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")});
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){var d=JooseX.Culture.Factory.get(),b;c=c.replace(/\&nbsp\;/g," ");if(b=c.match(/(\D*)\s*(-*\d+[.,]*\d*[.,]*\d*)\s*(\D*)/)){c=d.parseNumber(b[2]);d=b[1];var e=b[3];d=(b=typeof e=="string"&&e.length>0?true:false)?e:d;d=d.replace(/\s/g,"");c=new a.CurrencyValue({value:c,symbol:d});c.setSymbolAfterValue(b);return c}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 e=parts[b].split("=");if(e[0]!="")d[this.normalize(unescape(e[0]))]=unescape(e[1])}return a=d},toString:function(){var d=[],b;for(b in this.query){var e=b;if(e!=null&&e!=""){e=this.normalize(e);d.push(encodeURIComponent(e)+"="+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,e){d=d.replace(RegExp("{"+e+"}"),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(),e=10;(!(d<=a)||!(a<b))&&e>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();e--}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.airports={MRU:{airports:["MUC","FRA"],noOrigin:true,onlyFromGermany:true,onlyWithReturn:true,min:5,max:35},MCT:{airports:["MUC","FRA"],noOrigin:true,onlyFromGermany:true,onlyWithReturn:true,min:5,max:35},DXB:{airports:["MUC","FRA"],noOrigin:true,onlyFromGermany:true,onlyWithReturn:true,min:5,max:35},BKK:{airports:["MUC","FRA"],noOrigin:true,onlyFromGermany:true,onlyWithReturn:true,
min:5,max:35},MLE:{airports:["MUC","FRA"],noOrigin:true,onlyFromGermany:true,onlyWithReturn:true,min:5,max:35},CMB:{airports:["MUC","FRA"],noOrigin:true,onlyFromGermany:true,onlyWithReturn:true,min:5,max:35}};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(e){e=
e.replace(/^csv=/,"");e=e.split("\r\n");var f={},g;for(g in e){var m=e[g].split(";");if(m.length>2){var p=m[0].toLowerCase(),t=m[1].toLowerCase();m=m[2].toLowerCase();p=s2.tuifly.util.generateRouteKey(p,t,m);f[p]=true}}b.obj=f;d(b)})},check:function(d,b,e){d=d.toLowerCase();b=b.toLowerCase();return this.obj[s2.tuifly.util.generateRouteKey(d,b,e)]?true:false},isX3:function(d,b){return this.check(d,b,"x3")||this.check(d,b,"hf")}};this.generateRouteKey=function(d,b,e){d=d.toLowerCase();b=b.toLowerCase();
e=e.toLowerCase();return d+"-"+b+"-"+e}});
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 e="Culture mit der ID <"+d+"> ist bereits vorhanden:\n\n"+a.get(d);location.href.match(/tuifly\.com/)?s2.Logger.error(e):origAlert(e)}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 e=[];e=c.match(/^(http|https)/i)?c.match(/^(http|https):\/\/[-:\.a-z0-9]+(\/.+)\?(.*)/i):c.match(/(.+)\?(.*)/i);if(e[1]&&e[2]){b.action=e[1];e=e[2].split("&");jQuery.each(e,function(f,g){var m=g.split("="),p=m[0];g=m[1];b.parameters[p]=g})}};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,e){var f=$($("<input/>"));f.attr("type","hidden");f.attr("name",b);f.attr("value",e);d.append(f)});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 e=new s2.tuifly.util.TextMetrics(c,d),f=e.elementWidth();if(0<f&&f<e.width())d=d.substr(0,e.getIndexAtX(f-(new s2.tuifly.util.TextMetrics(c,b)).width()))+b;return d}});
s2.namespace("s2.tuifly.util.tracking",function(){var a=this,c={ORDINARY:"o",DOWNLOAD:"d",EXIT:"e"};a.fire=function(d){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=[],e=[];if(d.events.length>0){b.push("events");e=d.events}for(var f in d.values){s[f]=d.values[f];b.push(f)}if(typeof s=="undefined"||typeof s=="string")s=a.getObject();s.linkTrackVars=b.join(",");s.events=s.linkTrackEvents=
e.join(",");s.tl(d.delay?d.element:true,d.type,d.name)};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 e=events[d];if(e!=void 0)for(var f=0;f<e.length;f++){var g=e[f];if(g&&window[g]){if(window[g](b)==false)return false}else s2.Logger.debug("Cant find event "+d+" func "+g)}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,e,f){this.form=d;this.namespace=b;this.errors=[];this.setfocus=null;this.errorsHeader=e;this.namedErrors=[];if(f)this.regexElementIdFilter=f;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,e,f){if(d.type=="radio"){var g=d.getAttribute("name");if(g.length>0){if(this.namedErrors[g]!=null)return;this.namedErrors[g]=g}}g=d.errorAttribute;if(g==null)g=d.getAttribute(b);g||(g=d[this.defaultErrorAttribute]?d[this.defaultErrorAttribute]:e?e:this.defaultError);g=g.replace(/^{\s*\w+\s*}\:\s+/,"");if(b=g.match(/{\s*(\w+)\s*}/g))for(e=0;e<b.length;e++){var m=b[e].replace(/{\s*(\w+)\s*}/,"$1");g=g.replace(/{\s*\w+\s*}/,this.cleanAttributeForErrorDisplay(d,m))}g=new s2.tuifly.validation.Error(d,
g);g.displayAsAlert=f==true;this.errors.push(g);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 e=this.errors.length;d<e;d++){var f=this.errors[d];if(!f.isRequiredError)if(f.displayAsAlert)alert(f.message);
else if(document.getElementById("paymentInputContent"))alert(requiredErrorMessage);else{f.errorLabel.addClass("formRowErrorMessage");f.errorLabel.removeClass("hidden")}}}return false}return true};this.validate=function(d,b,e){if(document.getElementById&&document.createTextNode){s2.tuifly.validation.Error.clearAll();if(d.getAttribute)d=d.getAttribute("id").replace(/_\w+$/,"");e=new c.Validate(document.SkySales,d+"_","Please correct the following.\n\n",e);if(b){var f=b;b.getAttribute||(f=document.getElementById(d+
"_"+b));e.validateSingleElement(f);return e.outputErrors()}return e.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){this.element=$(c);this.formRow=$(c).parent();this.message=d;this.label=$("label[for="+c.id+"]");this.displayErrorAsAlert=this.isRequiredError=false;var b=this.element.closest("#paymentMethodSelection");if(b.length>0){this.element=b;this.formRow=b.parent()}this.formRow.prepend("<span class='hidden'>"+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.fadeAndSetHiddenField();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(),e=$("select[id$='DropDownListDOBYear']").val();if(b=="2")if(parseInt(e)%
4==0&&(parseInt(e)%100!=0||parseInt(e)%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,e){if(b=="2")if(parseInt(e)%4==0&&(parseInt(e)%100!=0||parseInt(e)%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(e){if(e&&e.target){e=e.target==document?null:e.target;a.FocusChangeEvent.trigger(c,e);c=e}};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(){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()}})}});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(g){var m=$(this);g=Date.parse(g);if(e(g)){g=g.add(7);if(e(g)){g=JooseX.Culture.Factory.get().formatDate(g);m.val(g);m.change();s2.Logger.debug("Picked date "+g)}}},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},e=function(g){return g!=null&&
g!=NaN};this.dateOK=e;this.initialize=function(){var g=JooseX.Culture.Factory.get();$.datepicker.setDefaults($.datepicker.regional[g.subIdentifier().toLowerCase()]);var m;if(document.getElementById("flugsuche")||document.getElementById("availabilitySearchInput")||document.getElementById("hotelSearch")||document.getElementById("carSearch")||document.getElementById("holidaySearch")||document.getElementById("lrDatepicker")){m=$("input.datepickerForSelect");m.each(function(){var y=$(this);jQuery.browser.msie&&
jQuery.browser.version.substr(0,1)=="7"&&y.data("flightMonthIE",y.parent().find("select").eq(1).val());window.setTimeout(function(){f(y)},10)});var p=$(m.get(0)),t=$(m.get(1));p.length>0&&t.length>0&&p.change(function(){var y=Date.parse(p.val());if(e(y)){var A=Date.parse(t.val());if(t.val()==""||!e(A)||y.getTime()>A.getTime()){t.val(g.formatDate(y));t.change()}}})}m||(m=$("input.simpleDatePicker"));if(document.getElementById("home")||document.getElementById("homeHLXAgencyMaster")||document.getElementById("select")||
document.getElementById("selectnew")||document.getElementById("homeHLXConsumer"))b.customRangeSelect=true;m.datepicker(b);this.datePickers=m};this.getFlight=function(){return $("#datePickerFlight")};this.getReturnFlight=function(){return $("#datePickerReturn")};var f=function(g){var m=JooseX.Culture.Factory.get(),p=g.parent().find("select"),t=$(p.get(1)),y=$(p.get(0));t.val()==null&&g.data("flightMonthIE")&&t.val(g.data("flightMonthIE"));var A=function(){var H=Date.parseExact(t.val()+"-"+y.val(),
"yyyy-MM-dd"),aa=false;if(e(H)){var U=Date.today();if(H.compareTo(U)<0){H=U;aa=true}g.val(m.formatDate(H));g.change()}else aa=true;if(document.getElementById("searchChange")&&aa){if(H=t.attr("id"))H=H.substr(H.length-1,H.length);$("#availabilitySearchInput .departure-flight-already-done").show();$("#searchChange #availabilitySearchInput .datemarket"+H).hide();if(MarketAction)MarketAction[H]="Cancel"}},E=function(H){var aa=JooseX.Culture.Factory.get().parseDate(H);H=$(this);if(e(aa)){var U=aa.toString("yyyy-MM");
aa=aa.toString("dd");t.val(U);y.val(aa);H.change();s2.Logger.debug("Picked date "+t.val()+"-"+y.val())}};A();E(g.val());y.change(function(){s2.Logger.debug("Day select changed");A()});t.change(function(){s2.Logger.debug("Month select changed");A()});p=function(){E(this.value)};g.change(p);g.typingEnded(p);g.datepicker(jQuery.extend(b,{onSelect:E}));var J=new s2.tuifly.util.Query;p=J.param("startDate");J=J.param("returnDate");var Q=$("input.datepickerForSelect").get(0),K=$("input.datepickerForSelect").get(1);
Q&&p&&$(Q).val(p);K&&J&&$(K).val(J);s2.tuifly.events.AvailibilityCookieDataSet.observe(A);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 e=0,f=a.length;e<f;e++)if(d!=e){var g=a.eq(e).find("h2"),m=$('<a href="#">'+g.text()+"</a>");m.click(function(p){return function(t){p.trigger("click");t.preventDefault()}}(g));c.eq(d).find(".tabGroup").append(m)}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")+"'":"",e=a.after("<input type=text "+b+" class='"+d+" hidden' value='"+c+"'/>").next();setTimeout(function(){if(a.val()==""){a.hide();e.show()}},0);var f=0;e.focus(function(){e.hide();
a.show();a.focus();a.click();f++});a.get(0).showStub=function(){e.focus()};a.change(function(){if(this.value!=""&&f==0){a.show();e.hide()}});a.get(0).showInput=function(){a.show();e.hide()};a.blur(function(){window.setTimeout(function(){if(!a.val()){e.show();a.hide()}f--},100)})})}});
s2.namespace("s2.tuifly.widget.overlay",function(){var a=this;this.initialize=function(){};var c,d,b;this.init=function(e){var f;e.each(function(){if(!this.initDone){var g=$(this);this.initDone=true;this.showOverlay=function(m,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 y=t.closest(".ssrWrapper");y.length>0&&y.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(m,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);f=t.get(0)};g.click(function(m){m.stopPropagation()})}});$(document).click(function(g){if(f)if(g.target!==f){$(f).hide();f=null;if(jQuery.browser.msie6){$("select:visible").removeClass("invisible");b.length>0&&b.css("position","relative")}}})};this.adjustOrientation=function(e,f,g,m){if(!f.hasClass("adjusted")){f.show();var p=$(window).width();
if(f.offset().left+f.outerWidth()>p||m){f.addClass("leftOverlay");if(g){m=g;f.width(m)}else m=jQuery.browser.msie&&jQuery.browser.version.substr(0,1)=="7"?f.attr("clientWidth"):f.outerWidth();g=f.offset().left;s2.Logger.debug("curLeft "+g);e=$(e.target);p=e.offset().left-20;if(jQuery.browser.msie6)p-=20;if(e.is("a.enterNumber"))p=e.offset().left;if(e.is("a.enterNumber > span.value"))p=e.parent().offset().left;s2.Logger.debug("targetLeft "+p);e=parseInt(p-m,10);s2.Logger.debug("newLeft "+e);e=g-e;
s2.Logger.debug("delta "+e);g=parseInt(f.css("left"),10);if(g+""=="NaN"||g==null)g=0;s2.Logger.debug("cur "+g);e=g-e;s2.Logger.debug("left "+e);e=Math.round(e);f.css("left",e+"px")}f.addClass("adjusted")}f.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,e){if(d.showAllOnFullMatch&&b.length==1)return e},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 e=d[b];if(window[e]){this.origInput=$("#availabilitySearchInputOriginInput");this.destInput=$("#availabilitySearchInputDestinationInput");this.inputs=$([this.origInput,this.destInput]);s2.tuifly.monkeyPatch.wrap(e,function(){a.initialBind();a.rebind();a.inputs.each(function(){var f=$(this),g=a.getSelect(f).get(0);if(g.selectedIndex>
0){g=$(g.options[g.selectedIndex]);var m=g.text(),p=g.val();f.parent().find(".qAirportName").html(m.replace(/\([a-z]+\)/i,""));f.parent().find(".qAirportCode").html(p);f.parent().find(".qDisplayField").removeClass("hidden");f.val(m);if(p&&p.length==3)if(f.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 e=false,f=function(m){var p=a.getSelect(b),t="",y=false;t=$("<pre>"+m+"</pre>");if(t.find(".zugZumFlug").size()>0)y=true;m=t.text();if(t=t.find("span[value]").attr("value"))m=t;inputVal=m;if(b.attr("abbreviate")){t=new s2.tuifly.util.TextMetrics(b,inputVal);var A=b.width();if(0<A&&A<t.width())inputVal=inputVal.substr(0,t.getIndexAtX(A-(new s2.tuifly.util.TextMetrics(b,
"...")).width()))+"...";b.data("completeValue",m)}else b.removeData("completeValue");b.val(inputVal);$(b).get(0).showInput();if(A=d.findStation(m)){t=A.getIataCode();if(!e&&s2.tuifly.helper.restrictions.isRestrictedOrigin(t))s2.tuifly.model.flightSearch.OrigChangeEvent.trigger(t,y);else{p.val(t);b.parent().find(".qAirportName").html(A.longName);b.parent().find(".qAirportCode").html(t);b.parent().find(".qDisplayField").removeClass("hidden");if(p.val()!=t){p.append('<option value="'+t+'">'+A.toString()+
"</option>");p.val(t)}t==m.toUpperCase()&&b.val(A.toString());e?s2.tuifly.model.flightSearch.DestChangeEvent.trigger(t,y):s2.tuifly.model.flightSearch.OrigChangeEvent.trigger(t,y);s2.Logger.debug("Picked "+p.val())}}else e&&s2.tuifly.model.flightSearch.DestChangeEvent.trigger("",y)};b.result(function(m,p,t){f(t)});b.blur(function(){f(this.value)});b.change(function(){f(this.value)});if(!b.hasClass("origin"))if(b.hasClass("destination"))e=true;else throw"missing queryCity class";var g;b.click(function(m){var p=
$(this);if(g==null)g=b.offset();var t=p.width()-15+g.left;if(m.pageX>t){s2.Logger.debug("Click in range");p.trigger("s2:closeIfOpen")}else s2.Logger.debug("Click out of range");m.target.value=""})});s2.tuifly.controller.FlightSearch.getInstance().navitairReady()};a.getValues=function(d){var b=[],e=0;d.parent().find("option").each(function(){e++!=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.triggerHandler("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 e=false;Joose.A.each(["a.bookingButton","a.returnButton","a.showButton"],function(f){var g=b.find(f);if(g.length==1&&b.find(".queryPseudoForm "+f).length==0){a.clickButton(g);e=true;return false}});if(e)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 e=d;for(b||(b="focused");e.length>0;){if(e.hasClass("formRow")||e.is("tr.queryformRow"))e.toggleClass(b);e=e.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;$("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()});
$("a.bookingButton:not(.noClickEvent)").each(function(){var d=$(this),b=this.onclick;this.onclick=function(){};d.click(function(e){var f=$(this);f.hasClass(".qNoSpinning")||c(f);e.preventDefault();var g;if(!s2.tuifly.validation.checkBeforeSkySalesValidation())return false;if(typeof b=="function")g=b.call(this,e);if(g!==false){typeof s2.tuifly.widget.ssrLuggageCheckSelector!="undefined"&&s2.tuifly.widget.ssrLuggageCheckSelector.activateDisabledInputs();typeof s2.tuifly.helper.zugZumFlug!="undefined"&&
s2.tuifly.helper.zugZumFlug.activateDisabledInputs();var m=f.attr("href");if(m&&m.indexOf("javascript:")==0)window.setTimeout(function(){eval(m.replace("javascript:",""))},10);else if(m&&m.length>0)if(f.attr("target")=="_top")window.top.location.href=m;else if(f.attr("target")=="_parent")window.parent.location.href=m;else if(f.attr("target")=="_blank")window.open(m);else location.href=m}else a.unSpinButton(d);return g})})}});
s2.namespace("s2.tuifly.widget.tooltip",function(){var a=this,c=0;this.initialize=function(){};var d={};$(".queryTooltip").live("mouseover",function(){var b=$(this),e=b.attr("id");if(!e||!d[e]){a.init(b);b.mouseover()}});this.init=function(b){var e=this;b.each(function(){var f,g=$(this),m=g.attr("id");if(m==null||m=="")g.attr("id","anonTooltip"+ ++c);d[m]=true;var p,t,y,A=$(this),E=A.attr("id"),J=$("select:visible");if($("#ShowOnRegisterIRC").get(0))J=$("select");g.mouseover(function(Q){try{$.browser.msie&&
$.browser.version.substr(0,1)=="6"&&!g.hasClass("deactivated")&&J.addClass("invisible");if(f){f.remove();f=null}var K=$(this).find(".queryTooltipContent");if(!K.closest(".queryTooltip").hasClass("deactivated")){f=K.clone();e.createTooltip(f,Q)}}catch(H){s2.Logger.debug("Error: "+H);return}try{p=p!=null?p:A.offset();t=t!=null?t:A.outerWidth();y=y!=null?y:A.outerHeight();$(window).bind("resize",function(){y=t=p=null});t>0&&y>0||s2.Logger.debug("we have no width and height, so we do not listen to the mousemove event ["+
E+"]")}catch(aa){s2.Logger.debug("MouseoverError: "+aa)}});g.mouseout(function(){$.browser.msie&&$.browser.version.substr(0,1)=="6"&&!g.hasClass("deactivated")&&J.removeClass("invisible");if(f){f.remove();f=null}})})};this.createTooltip=function(b,e){if(b.hasClass("initTooltip"))b.show();else{b.addClass("initTooltip");b.hide();b=this.calculatePosition(b,e);b.css("position","absolute");b.css("z-Index",999999999);$("body").append(b);var f=false;if(b.hasClass("leftOrientation"))f=true;b.length&&window.setTimeout(function(){s2.tuifly.widget.overlay.adjustOrientation(e,
b,350,f);b.show()},0)}};this.calculatePosition=function(b,e){if(b.hasClass("calculated"))return b;b.addClass("calculated");var f=b.attr("posX")||0,g=b.attr("posY")||0;g=$(e.target);var m=g.offset();f=Math.round(m.left+g.width()+parseInt(f));g=Math.round(m.top);b.css("left",f+"px");b.css("top",g+"px");return b}});
s2.namespace("s2.tuifly.widget.dialog",function(){var a=this,c={closeOnEscape:true,modal:true,bgiframe:true,draggable:true,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(f,g){s2.tuifly.widget.dialog.alert(f,g)}};this.copyOptions=function(){var f={},g;for(g in c)f[g]=c[g];return f};this.getTitle=function(f){if(f&&
f.title)return f.title;return{de:"Achtung",en:"Attention",it:"Considerazione",es:"Considerar"}[JooseX.Culture.Factory.get().majorIdentifier()]};this.getTitleNotice=function(f){if(f&&f.title)return f.title;return{de:"Hinweis",en:"Hint",it:"Indicazione",es:"Nota"}[JooseX.Culture.Factory.get().majorIdentifier()]};var d=function(f,g){var m=f,p="";if(g){m=f+""+g;p=g}var t=$("#"+m);if(t.length>0){t.empty();e=t}else e=$("body").append('<div id="'+m+'" class="'+p+'"></div>').find("#"+m);var y=e.dialog;e.dialog=
function(){if(arguments.length&&arguments[0]=="close")b=false;y.apply(this,arguments)};return e},b=false;this.confirm=function(f,g){if(g)g.confirm=1;s2.tuifly.widget.dialog.alert(f,g)};this.confirmNotice=function(f,g){if(g)g.confirm=1;s2.tuifly.widget.dialog.alertNotice(f,g)};this.alertNotice=function(f,g){g||(g={});g.view="note";g.title=this.getTitleNotice(g);s2.tuifly.widget.dialog.alert(f,g)};this.replaceLinebreak=function(f){return f=f.replace(/\n/,"<br />")};this.alert=function(f,g){g||(g={});
if(this.displayInline)$(".error").html(f);else if(!(b&&!g.forceDisplay)){if(!g.forceIframeAlert&&window!=parent)try{return parent.s2?parent.s2.tuifly.widget.dialog.alert(f,g):parent.alert(f)}catch(m){return origAlert(f)}if(typeof f=="undefined")f="undefined";else if(typeof f!="string")f=f.toString();g.noLinebreakReplace||(f=this.replaceLinebreak(f));var p=this.copyOptions();g||(g={});jQuery.extend(p,g);g=p;b=true;var t=d("s2AlertBox");t.html(f);var y=function(H){window.setTimeout(function(){t.dialog("close");
typeof H=="function"&&H()},10)},A,E=g.okCallback;A=typeof E=="function"?function(){y(E)}:y;var J,Q=g.cancelCallback;J=typeof Q=="function"?function(){y(Q)}:y;if(p.confirm){var K={};K[p.okButtonText]=A;K[p.cancelButtonText]=J;g={};g.buttons=K;g.dialogClass=p.dialogClass;g.dialogClass||(g.dialogClass="confirmBox");jQuery.extend(p,g)}else p.noButtons||jQuery.extend(p,{buttons:{OK:A},dialogClass:p.dialogClass?p.dialogClass:""});if(!p.title){A=this.getTitle(p);p.title=A}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(H){H==0&&$(this).addClass("buttonOK");H==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 e;this.ajaxLayer=function(f,g,m,p,t){if(!b){this.prepare(g,m);f+=f.match(/\?/)?"&":"?";m.disableCache||(f+="noCache="+Math.random().toString());g=$.get;if(t&&t.toUpperCase()=="POST")g=$.post;this.showAjaxLoadingOverlay();g(f,p,function(y){s2.Logger.debug("Data arrived");e.find(".waitMessage").addClass("hidden");s2.tuifly.widget.dialog.closeAjaxLoadingOverlay();e.html(y);e.dialog("open");a.setFocus();var A=m.callback;A&&typeof A=="function"&&A(y)})}};this.divLayer=function(f,g,m){if(!b){this.prepare(g,
m);if(m.clone){g=f.clone(true);if(m&&m.removeSource){f.remove();e.empty();e.append(g)}}else e.html(f.html());e.dialog("open");a.setFocus();(f=m.callback)&&typeof f=="function"&&f()}};this.setFocus=function(){try{if(e.find(".bookingButton").length)e.find(".bookingButton")[0].focus();else e.find("input").length&&e.find("input")[0].focus()}catch(f){}};this.divLayerMove=function(f){var g=e.children().clone(true);e.remove();$("#"+f).append(g);theForm=$("#SkySales").get(0)};this.prepare=function(f,g){var m=
this.copyOptions();f=f?f:"s2AlertBox";m=jQuery.extend(m,{width:"700px"});if(g)m=jQuery.extend(m,g);e=d(f,"ajaxLayer");e.dialog(jQuery.extend(m,{draggable:false}));g.message&&$(e).html('<div class="waitMessage">'+g.message+"</div>");b=true};this.myTUIflyLayer=function(f){this.ajaxLayer(f,"myTUIfly",{width:"560px",height:"580px",dialogClass:"myTUIflyLayer",callback:s2.tuifly.helper.mytuiflyLoginBox.prepare})};this.bordshopLayer=function(f){this.ajaxLayer(f,"myTUIfly",{width:"625px",height:"410px",dialogClass:"myTUIflyLayer"})};
this.darkSiteLayer=function(f){this.ajaxLayer(f,"darkSite-",{width:"805px",height:"482px",dialogClass:"darkSiteLayer"})};this.tuiHotelDetailLayer=function(f,g){this.ajaxLayer(f,"tuiHotelDetail-",{width:"905px",height:"503px",dialogClass:"tuiHotelDetailLayer",message:g})};this.tuiHotelVariationsLayer=function(f,g){this.ajaxLayer(f,"TUIHotelVariationBox-",{width:"481px",height:"416px",dialogClass:"tuiHotelVariationsAjaxLayer",message:g})};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(f,g){this.ajaxLayer(f,"tuiHotelDetail-",{width:"400px",height:"auto",dialogClass:"tuiHotelDetailLayer",callback:g})};this.priceAlarmStoreLayer=function(){this.divLayer($("#priceAlarmStoreLayer"),"priceAlarmStore-",{width:"372px",height:"460px",
dialogClass:"priceAlarmStoreLayer"})};this.notepadPreviewLayer=function(f,g,m){this.ajaxLayer(f,"notepadPreview-",{width:"710px",height:"auto",dialogClass:"notepadPreviewLayer",callback:function(){$("#notepadPreview-ajaxLayer").prepend('<div id="opacityDiv"></div>');$(".notepadPreviewLayer .ui-dialog-titlebar").prepend(m)}},g,"POST")};this.christmasLayer=function(f){this.ajaxLayer(f,"christmas-",{width:"790px",height:"700px",dialogClass:"christmasLayer"})};this.airlineLayer=function(f,g){this.ajaxLayer(f,
"airlines-",{width:"850px",height:"720px",dialogClass:"airlinesLayer",callback:g,disableCache:true})};this.selectViewLayer=function(f){this.divLayer(f,"selectView-",{width:"790px",height:"auto",dialogClass:"selectViewLayer",overlay:{backgroundColor:"black",opacity:0.7}});f.find(".layerContent").html("")};this.updateBrowser=function(){this.divLayer($("#updateBrowser"),"updateBrowser-",{width:"420px",height:"auto",dialogClass:"updateBrowserLayer"})};this.emailMissingLayer=function(f){this.ajaxLayer(f,
"standard-",{width:"420px",height:"auto",dialogClass:"standardLayer"})};this.lateroomsDetailLayer=function(f){b=false;this.ajaxLayer(f,"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(f){b=
false;this.ajaxLayer(f,"tuiflyCreditCard-",{position:["auto",50],width:"792px",height:"auto",dialogClass:"tuiflyCreditCardLayer"})};this.standardLayer=function(f,g){g||(g={});if(typeof f=="string")content=$.get(f,function(m){m="<div>"+m+"</div>";var p=$("h1",m).html();g.title=p;m=$(".contentDialog",m).html();g.noLinebreakReplace=true;alert(m,g);if(g.noDefaultButton){$(".ui-dialog button").addClass("hidden");$(".ui-dialog button").after("<br /><br />")}});else if(typeof f=="object"){alert($(".content",
f).html(),g);if(g.noDefaultButton){$(".ui-dialog button").addClass("hidden");$(".ui-dialog button").after("<br /><br />")}}g.view=="note"&&$(".ui-dialog-container, .ui-dialog-buttonpane").addClass("hint")};this.standardImageLayer=function(f){$(".ajaxLayer.zoomImageLayer").remove();b=false;var g=$("<span/>"),m=$("<img/>");$(m).attr("id","zoomImageLayer");$(m).attr("clss","hidden");$(g).html($(m));this.divLayer($(g),"zoomImage",{width:"",height:"",dialogClass:"zoomImageLayer",callback:function(){$(".ajaxLayer.zoomImageLayer").css("top",
"-9999px");$("#zoomImageLayer").attr("src",f);$("#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(){e&&e.dialog("close")};this.divLayerClose=function(f){this.ajaxLayerClose();f&&this.divLayerMove(f)};this.showAjaxLoadingOverlay=
function(){var f=$("<div/>");$(f).addClass("dialogOverlay");$("body").append("<div class='loadingAjax'></div>");$("body").append(f);f=$(window).scrollTop()+$(window).height()/2-$(".loadingAjax").innerHeight()/2;var g=$("body").get(0).clientWidth/2-$(".loadingAjax").innerWidth()/2;$(".loadingAjax").css("top",f+"px");$(".loadingAjax").css("left",g+"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),e=d.attr("maxlength");if(e)b.maxlength=e;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 e=this.buildPartnerBannerValue,f=this.buildPartnerBannerString;if(c=="partnerBanner"){e=this.buildPartnerBannerValue;f=this.buildPartnerBannerString}else if(c=="csLanding"){e=this.buildCSLandingValue;f=this.buildCSLandingString}$(a).empty();for(var g=0;g<13;g++){var m=e.apply(this,[d,b]),p=f.apply(this,[d,b]),t=$("<option>");t.attr("value",m);
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(){this.initialize=function(){if(this.isOldBrowser()&&location.href.match(/index\.html/)){var a=JooseX.Culture.Factory.get().majorIdentifier(),c="";if(a=="de")c='<A href="http://www.mozilla-europe.org/de/" target=_blank><IMG src="/images/elements/ie_update_ff.png"></A><A href="http://www.google.com/chrome" target=_blank><IMG src="/images/elements/ie_update_chrome.png"></A> <A href="http://www.microsoft.com/germany/windows/internet-explorer/" target=_blank><IMG src="/images/elements/ie_update_ie.png"></A></div><p><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></p>';
else if(a=="en")c='<A href="http://www.mozilla-europe.org/en/" target=_blank><IMG src="/images/elements/ie_update_ff.png"></A> <A href="http://www.google.com/chrome?hl=en" target=_blank><IMG src="/images/elements/ie_update_chrome.png"></A> <A href="http://www.microsoft.com/windows/internet-explorer/" target=_blank><IMG src="/images/elements/ie_update_ie.png"></A></div><p><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></p>';
else if(a=="it")c='<A href="http://www.mozilla-europe.org/it/" target=_blank><IMG src="/images/elements/ie_update_ff.png"></A> <A href="http://www.google.com/chrome?hl=it" target=_blank><IMG src="/images/elements/ie_update_chrome.png"></A> <A href="http://windows.microsoft.com/it-IT/windows/downloads" target=_blank><IMG src="/images/elements/ie_update_ie.png"></A> </div><p><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></p>';
else if(a=="es")c='<A href="http://www.mozilla-europe.org/es/" target=_blank><IMG src="/images/elements/ie_update_ff.png"></A> <A href="http://www.google.com/chrome?hl=es" target=_blank><IMG src="/images/elements/ie_update_chrome.png"></A> <A href="http://windows.microsoft.com/es-ES/windows/downloads" target=_blank><IMG src="/images/elements/ie_update_ie.png"></A></div><p><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></p>';
a='<div id="updateIE"><div class="floatRight"><a href="#" onclick="$(\'#updateIE\').hide();"><img src="/skyres/images/buttons/tuiHotelLayerClose.gif" /></a></div><div class="updateBrowser">'+c+"</div>";$("body").prepend(a);$(".flashRow").css("top","532px")}};this.isOldBrowser=function(){var a=false;if(jQuery.browser.msie&&parseFloat(jQuery.browser.version)<9)a=true;else if(navigator.userAgent.match(/Firefox/)){a=navigator.userAgent.match(/Firefox\/(.*)/);a=a.length>0?a[1]:0;a=parseFloat(a);a=a<3?
true:false}return a}});
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(){$(".qTPSTeaser").each(function(){var d=$(this),b=d.find(".qOffer").length;if(b<=7)d.find(".qOffer").show();else{var e=[];for(d.find(".qOffer").hide();e.length<7;){var f=Math.floor(Math.random()*(b+1));if(f>0)if($.inArray(f,e)<0){var g=d.find(".qOffer"+f);c?g.show():g.fadeIn(1E3);e.push(f)}}}});c=false}});
s2.namespace("s2.tuifly.widget.lastSearches",function(){var a=this,c=null;a.initialize=function(){if(document.getElementById("home")){var d=false;$.cachedFind("#lastFlights .qClose").live("click",function(){var e=$(this).parents("[data-key]").data("key");a.removeEntry(e)});$.cachedFind("#lastFlights .qOffer").live("click",function(){var e=$(this).parents("[data-key]").data("key");a.deeplink(e)});var b=[];a.storage().all(function(e){if(e.length){d=true;var f=$.cachedFind("#lastFlights").find(".qTemplate").clone();
_.each(_.sortBy(e,function(g){var m=this.lastId==0||this.lastId>g.id;if(!this.lastId)this.lastId=g.id;return m},{lastId:0}),function(g){if(typeof Stations!="undefined"&&Stations[g.departureAirport]&&Stations[g.arrivalAirport]){var m=g.key.replace("lastSearches::","");f.find(".flight").removeClass("hidden");f.find(".flight").attr("data-key",m);f.find(".qOrigin").text(Stations[g.departureAirport].name);f.find(".qDestination").text(Stations[g.arrivalAirport].name);m=Date.parseExact(g.departureDate,"yyyy-MM-dd");
g=Date.parseExact(g.arrivalDate,"yyyy-MM-dd");m=m?m.toString("dd.MM.yyyy"):"";g=g?g.toString("dd.MM.yyyy"):"";f.find(".qDate").text(m+(g?" - "+g:""));f.find("div:first").addClass("qLastSearchEntry");b.push(f.html())}});$.cachedFind("#lastFlights .allFlights").append(b.join(""))}});if(d&&b.length>0){$.cachedFind("#lastFlights").show();$.cachedFind("#noLastFlights").hide()}else{$.cachedFind("#lastFlights").hide();$.cachedFind("#noLastFlights").show()}}};a.storage=function(){if(c===null)c=new Lawnchair({adaptor:window.Storage?
"dom":"userdata",table:"lastSearches"});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 e=Date.parseExact(d.departureDate,"yyyy-MM-dd");d.arrivalDate=e.add(7).days().toString("yyyy-MM-dd")}if(d.direction=="OneWay")d.arrivalDate="";a.storage().all(function(f){var g=f.length,m=null,p=null,t=null;_.each(f,function(y){if(m===null||
m>y.id){m=y.id;t=y}if(p===null||p<y.id)p=y.id});g>=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 e;a.initialize=function(){$("div.qDiashowStart").length&&a.initDiashow({element:"div.qDiashowElement",clickHandler:window.s2.evalNamespace($("div.qDiashowElement").data("clickHandler")).diashowClickHandler})};a.initDiashow=function(g){a.diashowElement=g.element;a.partnerWidth=g.width||$(a.diashowElement).data("elementWidth");g.clickHandler=g.clickHandler||function(){};b=a.diashow;c=$(a.diashowElement).find("ul li").length;
e=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(m){g.clickHandler.apply(a,[this,m])})};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(g,m){m=m||1;var p=a.calcWidth();return 50/m*(g/p)*1E3};a.calcDistanceRight=function(){var g=b().css("left");g=parseInt(g,10);if(g<0)g*=-1;return a.calcWidth()-g};a.calcDistanceLeft=function(){var g=b().css("left");g=parseInt(g,10);if(g<0)g*=-1;return g};a.runLeft=function(g){if(!a.isStopped)if(!a.paused){clearTimeout(e);
var m=a.calcWidth();g=a.calcSpeed(a.calcDistanceRight(),g);a.stop();a.isStopped=false;b().animate({left:"-"+m+"px",queue:true},g,"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(g){if(!a.isStopped)if(!a.paused){clearTimeout(e);g=a.calcSpeed(a.calcDistanceLeft(),g);a.stop();a.isStopped=false;b().animate({left:"0px",queue:true},g,"linear");d="right"}};a.calcWidth=function(){return(c-
2)*a.partnerWidth};var f;a.diashow=function(){f||(f=$(a.diashowElement).find("ul"));return f}});
s2.namespace("s2.tuifly.flash.airportMap",function(){var a=this;a.flashLoaded=false;a.initialize=function(){var d=a.flashMovie("flashMap");d&&s2.Logger.debug("Have a flash map "+d.id)};var c;a.sortedStations=function(){if(c)return c;var d=s2.tuifly.model.flightSearch.StationManager.getInstance(),b=[];Joose.O.each(d.stationByIataCode,function(e){b.push(e)});c=d.sortStations(b);new s2.tuifly.model.flightSearch.Station({iataCode:"ZRH",longName:"Zürich",validDest:true,dests:["CGN"],country:"AT"});return c};
a.getStations=function(){s2.Logger.debug("Flash: getStations");var d=a.sortedStations(),b={};Joose.A.each(d,function(e){b[e.getIataCode()]=e.asNavitairStation()});d=[];for(i in b)d.push(b[i]);return d};a.getAirportCountryMapping=function(){s2.Logger.debug("Flash: getAirportCountryMapping");var d=[],b=a.sortedStations();Joose.A.each(b,function(e){d.push({airportCode:e.getIataCode(),countryCode:e.getCountry()})});return d};a.getCurrentStations=function(){s2.Logger.debug("Flash: getCurrentStations");
var d=s2.tuifly.controller.FlightSearch.getInstance();return[d.getOrigCode(),d.getDestCode()]};a.fireOriginChanged=function(d){s2.Logger.debug("notify flash origin");var b=a.flashMovie("flashMap");b&&b.eventOriginChanged&&b.eventOriginChanged(d);$("input[name='scorigin']").val("CS-Home");return true};a.fireDestChanged=function(d){s2.Logger.debug("notify flash dest");var b=a.flashMovie("flashMap");b&&b.eventDestChanged&&b.eventDestChanged(d);$("input[name='scorigin']").val("CS-Home");return true};
a.clearStations=function(){s2.tuifly.controller.FlightSearch.getInstance().clear()};a.eventOriginChanged=function(d,b){s2.Logger.debug("Flash fires origin changed "+d);if(d!=null&&d!=""){var e=$("#availabilitySearchInputOriginInput"),f=s2.tuifly.controller.FlightSearch.getInstance();if(f.getOrigCode()!=d){f.closeAutocomplete();e.val(d);e.change()}b&&$("input[name='scorigin']").val("FLASH_MAP")}return true};a.eventDestChanged=function(d,b,e){s2.Logger.debug("Flash fires dest changed "+d);if(d!=null&&
d!=""){var f=$("#availabilitySearchInputDestinationInput"),g=s2.tuifly.controller.FlightSearch.getInstance();if(g.getDestCode()!=d){g.closeAutocomplete();f.val(d);f.change();s2.tuifly.model.flightSearch.DestChangeEvent.trigger(d,b)}e&&$("input[name='scorigin']").val("FLASH_MAP")}return true};a.eventPOIChanged=function(d){d=d.toUpperCase();$("div.selectDestination h1").hide();$("div.shortInfoFlugziele").hide();if($("#detail"+d).length){$("#detail"+d).show();$("#detail"+d+" h1").show()}else{$("#detailDefault").show();
$("#detailDefault h1").show()}};a.flashMovie=function(d){if(window[d])return window[d];if(document[d])return document[d];s2.Logger.debug("Cant find flash movie");return null};a.show=function(){var d=a.flashMovie("flashMap");d!=null&&d.openFlashMap&&d.openFlashMap()};a.showZZFTeaser=function(){var d=a.flashMovie("flashMap");d!=null&&d.showLayerZZF&&d.showLayerZZF(true)};a.hideZZFTeaser=function(){var d=a.flashMovie("flashMap");d!=null&&d.showLayerZZF&&d.showLayerZZF(false)};a.embedAlternativeDestinations=
function(d,b){var e="";if(jQuery.browser.msie6)e="?rand="+Math.random();var f={};f.configFile="/de/map_config.xml";f.destination=d;f.alternatives=b;var g={};g.allowscriptaccess="always";g.allownetworking="all";g.wmode="transparent";var m={};m.id="altDest";m.name="altDest";if(swfobject.hasFlashPlayerVersion("9.0.28")){$(".flashContainer").removeClass("hidden");swfobject.embedSWF("/skyres/flash/map/alt_dest_map.swf"+e,"altDestMap","191","105","9.0.28","/skyres/flash/expressInstall.swf",f,g,m)}else $("#altDestImage").removeClass("hidden")};
a.embed=function(d,b,e,f){s2.tuifly.model.flightSearch.InitializedEvent.observeOnce(function(){var g={};f||(f={});var m=(new s2.tuifly.util.Query).param("country");if(m&&m.length>0)g.countryZoom=m;var p=JooseX.Culture.Factory.get().majorIdentifier(),t=s2.tuifly.util.Skin.get().identifier();m=f.version?"?v="+f.version:"";if(jQuery.browser.msie6)m="?r="+(Math.random()+"").substr(2,7);t="/promo/xml/map_"+t+"_"+p+"_data.xml"+m;s2.Logger.debug("LanguageFile for Flash: "+t);g.configFile="/de/map_config.xml"+
m;g.airportLinksFile="/"+p+"/flashmap_config.xml"+m;g.languageFile=t;g.mode=d;g.trackingAccount=s2.tuifly.util.Environment.get().OmnitureAccount();g.agentId=(new s2.tuifly.util.Cookie).get("user");g.deepLingking=(new s2.tuifly.util.Query).param("deepLinking");g.countryZoom=(new s2.tuifly.util.Query).param("countryZoom");g.continentZoom=(new s2.tuifly.util.Query).param("continentZoom");s2.Logger.debug("trackingAccount for Flash: "+g.trackingAccount);p={};p.allowscriptaccess="always";p.allownetworking=
"all";p.wmode="transparent";t=736;if(d=="basic")t=711;if($(".SkinHLXAgencyMaster").length>0)e=360;b=b||t;e=e||401;t={};t.id="flashMap";t.name="flashMap";if(!($("#flashMap")&&$("#flashMap").html().match(/\.swf/)))if(swfobject.hasFlashPlayerVersion("9.0.28")&&!a.flashLoaded){swfobject.embedSWF("/skyres/flash/map/map.swf"+m,"flashMap",b,e,"9.0.28","/skyres/flash/expressInstall.swf",g,p,t);a.flashLoaded=true}else $("#flashMap .noFlash").show()});s2.tuifly.model.flightSearch.Station.initializeFromAjax()};
a.showMap=function(){var d="mapVisible",b=JooseX.Culture.Factory.get().majorIdentifier();d=d+"-"+b;$("body").addClass(d);s2.tuifly.widget.collapsibleNavigation.openIfClosed($("#flugsuche h2.toggleNavigationHeadline"))};a.hideMap=function(){var d="mapVisible",b=JooseX.Culture.Factory.get().majorIdentifier();d=d+"-"+b;$("body").removeClass(d)};a.setDestination=function(){return(new s2.tuifly.util.Query).param("destination")};a.setDeparture=function(){var d=(new s2.tuifly.util.Query).param("departure");
return d?d: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"],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){$("#flugsuche select.selectAdult").val(b);$("#flugsuche select.selectAdult").trigger("change")}},0);$("#flugsuche").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").click(function(){$.cachedFind("#datePickerFlight").trigger("focus")})};a.setClickHandlerGroupSelection=function(){$("[id$='_ADT_input_+10']").live("click",function(){$("[id$='_ADT_input_10']").trigger("click")});$("[id$='_CHD_input_+10']").live("click",function(){$("[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.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=$("#travelOptions input");a.fields.$direction=$("#travelOptions input:checked");a.fields.$departureAirport=$("[id$=_DropDownListMarketOrigin1]");a.fields.$arrivalAirport=$("[id$=_DropDownListMarketDestination1]");a.fields.$departureDay=$("[id$=_DropDownListMarketDay1]");a.fields.$departureMonthYear=$("[id$=_DropDownListMarketMonth1]");a.fields.$arrivalDay=$("[id$=_DropDownListMarketDay2]");a.fields.$arrivalMonthYear=
$("[id$=_DropDownListMarketMonth2]");a.fields.$adultCount=$("[id$=_DropDownListNewPassengerType_ADT]");a.fields.$childCount=$("[id$=_DropDownListPassengerType_CHD]");a.fields.$infantCount=$("[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 e=$("[id$=_DropDownListMarketOrigin1]");e.val(b);e.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 e=$("[id$=_DropDownListMarketDestination1]");e.val(b);e.change();setTimeout("s2.tuifly.helper.search.submitSearch()",
100)};this.submitSearch=function(){s2.tuifly.widget.submittableForm.clickButton($("#flugsucheButton a"))};this.adjustDate=function(b,e){var f=b==1?s2.tuifly.widget.datepickerForSelect.getFlight():s2.tuifly.widget.datepickerForSelect.getReturnFlight(),g=Date.parse(f.val());if(s2.tuifly.widget.datepickerForSelect.dateOK(g)){var m=JooseX.Culture.Factory.get();g.addDays(e);var p=Date.today();if(g.getTime()>=p.getTime()){f.val(m.formatDate(g));f.change();AFRICA_NOTE_DISPLAYED=true;a.saveInitSearchParams();
this.submitSearch()}}};this.checkAirberlinRedirection=function(){var b=document.SkySales,e=$(".flightSelection :radio:checked"),f=e.eq(0).val().match(/\d\d\/\d\d\/\d\d\d\d/g)[0];e=e.length==2?e.eq(1).val().match(/\d\d\/\d\d\/\d\d\d\d/g)[0]:null;var g=b[applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1"].value,m=b[applicationJavaScriptHtmlId+"_DropDownListMarketDestination1"].value;return!airberlinAvailable[g+m]||!redirectToAirberlin("http://www.airberlin.com/site/abvakanz_c.php",affiliateConfirmMessages.AB,
new Date(f.substring(6),f.substring(0,2)-1,f.substring(3,5)),e!=null?new Date(e.substring(6),e.substring(0,2)-1,e.substring(3,5)):null,g,m,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 e=$("#"+applicationJavaScriptHtmlId+"_DropdownlistOptServiceCharge option:first").attr("selected",
true).text();$("#"+applicationJavaScriptHtmlId+"_DropdownlistOptServiceCharge_input").val(e)}});return false};this.groupRoutes={};this.validateGroupRoute=function(){var b=parseInt($("#"+applicationJavaScriptHtmlId+"_DropDownListPassengerType_ADT").val(),10),e=parseInt($("#"+applicationJavaScriptHtmlId+"_DropDownListPassengerType_CHD").val(),10);if(b+e<=9)return true;b=$("#"+applicationJavaScriptHtmlId+"_DropDownListMarketOrigin1").val();e=$("#"+applicationJavaScriptHtmlId+"_DropDownListMarketDestination1").val();
var f=$("#"+applicationJavaScriptHtmlId+"_DropDownListMarketMonth1").val()+"-"+$("#"+applicationJavaScriptHtmlId+"_DropDownListMarketDay1").val(),g=f;if($("#"+applicationJavaScriptHtmlId+"_RoundTrip").is(":checked"))g=$("#"+applicationJavaScriptHtmlId+"_DropDownListMarketMonth2").val()+"-"+$("#"+applicationJavaScriptHtmlId+"_DropDownListMarketDay2").val();return this.validateGroupRouteInternal(b,e,f,g)};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 e=parseInt($("input[id$='_TextBoxPaxCount_CHD']").val(),10);if(isNaN(e))e=0;if(b+e<=9){alert(s2.tuifly.util.culture.get("groupTooSmall"));$("#quickGroupSearch input").placeholder();return false}b=$("input[id$='_TextBoxOrigin']").val().toUpperCase();e=$("input[id$='_TextBoxDestination']").val().toUpperCase();
var f=this.createValidDateValue($("input[id$='_TextBoxDeparture']").val());f=Date.parse(f);if(f==null){s2.tuifly.widget.dialog.confirmNotice(s2.tuifly.util.culture.get("invalidOutboundDate"));return false}var g=new Date(f.getTime());if($("input[id$='_RoundTrip']").is(":checked")){var m=$("input[id$='_TextBoxReturn']").val();if(m.match(/^\d{1,3}$/))g.setDate(g.getDate()+parseInt(m,10));else{m=this.createValidDateValue($("input[id$='_TextBoxReturn']").val());g=Date.parse(m);if(g==null){s2.tuifly.widget.dialog.confirmNotice(s2.tuifly.util.culture.get("invalidInboundDate"));
return false}}}return this.validateGroupRouteInternal(b,e,f.toString("yyyy-MM-dd"),g.toString("yyyy-MM-dd"))};this.createValidDateValue=function(b){if(b.match(/^\d{2}\d{2}(\d{2}|\d{4})?$/i)){var e=b.substr(0,2),f=b.substr(2,2);b=b.substr(4);b=e+"."+f+(!b?"":"."+b)}return b};this.validateGroupRouteInternal=function(b,e,f,g){var m,p=this.groupRoutes[b];if(p==undefined)p=this.groupRoutes[e];if(p!=undefined)for(var t=p.length,y=0;y<t;++y){var A=p[y];if(A.destination==e||A.destination==b){m=A;if(A.from<=
f&&A.till>=g)return true;break}}p=this.groupRoutes["*"];if(p!=undefined){A=p[0];if(A.from<=f&&A.till>=g)return true}var E;if(m==undefined)E=s2.tuifly.util.culture.get("noGroupRoute");else if(m.from>f){E=s2.tuifly.util.culture.get("noGroupRouteFrom");b=Date.parseExact(m.from,"yyyy-MM-dd");E=E.replace(/\{0\}/,b.toString(Date.CultureInfo.formatPatterns.shortDate))}else if(m.till<g){E=s2.tuifly.util.culture.get("noGroupRouteTill");b=Date.parseExact(m.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}});
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 e=$("#datePickerHotelCheckIn");this.initDatepicker(e);var f=$("#datePickerHotelCheckOut");this.initDatepicker(f);e.val(b.formatDate(Date.today()));f.val(b.formatDate(Date.today().add(7).days()));
e.bind("change",function(){b.parseDate(f.val())<b.parseDate(e.val())&&f.val(e.val())});var g=window.location.protocol+"//"+window.location.host+"/skyres/data/hotels.json",m=$("#hotelSearch .queryCustomSelects");jQuery.getJSON(g,function(t){function y(o,va){for(var ia=o;ia<U;ia++)if(va.text.toUpperCase()<aa[ia].text.toUpperCase())return ia;return ia>0?ia:0}var A="hotelSearchDest",E=t[A],J=jQuery("<select id='"+A+"Select' name='ziel'/>"),Q;for(Q in E)J.append(jQuery("<option value='"+E[Q]+"'>"+Q+"</option>"));
J.children(":first").attr("selected","selected");$("#"+A).append(J);A="hotelSearchRegion";t=t[A];var K=jQuery("<select id='"+A+"Select' name='region'/>");E=jQuery("<option value='-1'>"+t["-1"]+"</option>");var H={},aa=[],U=0;delete t["-1"];for(var B in t){Q=t[B];var ga="",ra;for(ra in Q)ga=ga+"<option value='"+Q[ra]+"'>"+ra+"</option>";ga=jQuery(ga);H[B]=E.add(ga);var da=-1;Q=0;for(var I=ga.length;Q<I;Q++,U++){da=y(da+1,ga.get(Q));aa.splice(da,0,ga.get(Q))}}H["-1"]=E.add(jQuery(aa));K.children(":first").attr("selected",
"selected");K.append(H["-1"]);$("#"+A).append(K);K.bind("change",function(){var o=K.val().match(/[^|]+$/);if(o!="-1"){J.children("[value="+o+"]").attr("selected","selected");J.data("update")()}});J.bind("change",function(){var o=K.val();K.empty();K.append(H[J.val()]);o!="-1"&&K.children("[value="+o+"]").length>0?K.children("[value="+o+"]").attr("selected","selected"):K.children(":first").attr("selected","selected");K.parent().removeClass("init");K.parent().find("input, div").remove();s2.tuifly.widget.customSelect.convert("#hotelSearch");
K.data("update")()});s2.tuifly.widget.customSelect.convert("#hotelSearch");A=m.find("select");for(Q=A.length-1;Q>=0;Q--)A.eq(Q).data("update")()});$(".childsel");var p=$("#hotelSearchChildrenDetails");$("#hotelSearchChildren").bind("change",function(){var t=$("#hotelSearchChildren").val(),y=$(".childsel").prevAll("input");y.hide();y.filter(":lt("+t+")").show();y.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"),e=$("#datePickerHotelCheckIn");if(!e.val()){if(b.hasClass("loading")){b.removeClass("loading");
b.find(".loadingImage").remove()}alert(window.hotelCheckInDateError);return false}var f=JooseX.Culture.Factory.get();e.after('<input type="hidden" name="termin" value="'+f.parseDate(e.val()).getTime()/1E3+'" />');$("#hotelSearchRegionSelect").val()!="-1"&&$("#hotelSearchDestSelect").val()=="-1"&&$("#hotelSearchRegionSelect").change();e=$("#keyword").val();var g=$("#hotelSearchGuests").val(),m=$("#nights").val();f=JooseX.Culture.Factory.get();var p=JooseX.Culture.Factory.get().majorIdentifier(),t=
$("#datePickerHotelCheckIn").val();t=f.parseDate(t).getTime();f=(new Date(t)).toString("yyyyMMdd");f="http://hotels.tuifly.com/"+p+"/p8538/pvhpsearch/Hotels.aspx?k="+e+"&d="+f+"&n="+m+"&rt="+g;if(b.hasClass("loading")){b.removeClass("loading");b.find(".loadingImage").remove()}e==""||e==c?alert(d):$("#hotelSearch a").attr("href",f)}});
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 e=$("#datePickerHolidayCheckOut");this.initDatepicker(e);b.val(d.formatDate(Date.today()));e.val(d.formatDate(Date.today().add(7).days()));b.bind("change",
function(){d.parseDate(e.val())<d.parseDate(b.val())&&e.val(b.val())});$.getScript("https://images.traveltainment.de/booking/cache/790006/654/cachefiles_654_js.php?getCacheFiles=1",function(){for(var g=0;g<window.cacheFiles_654.length;++g){var m=window.cacheFiles_654[g];if(m.search(/regionen.*/)!=-1){$.getScript("https://images.traveltainment.de/booking/cache/790006/654/"+m,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 y=0;y<p.length;++y){var A=p[y].split("|");A[1]>=1E4&&t.append(jQuery("<option value='"+A[1]+"'>"+A[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(y=0;y<p.length;++y){A=p[y].split("|");A[1]<1E4&&E.append(jQuery("<option value='"+
A[1]+"|"+A[2]+"'>"+A[0]+"</option>"))}E.children(":first").attr("selected","selected");$("#holidaySearchRegion").append(E);E.bind("change",function(){var J=E.val().match(/[^|]+$/);if(J!="-1"){t.children("[value="+J+"]").attr("selected","selected");t.data("update")()}});t.bind("change",function(){var J=E.val(),Q=t.val();E.empty();E.append(jQuery("<option value='-1'>"+window.allRegionsOption+"</option>"));for(var K=0;K<p.length;++K){var H=p[K].split("|");if(H[1]<1E4&&(H[2]==Q||Q==-1))E.append(jQuery("<option value='"+
H[1]+"|"+H[2]+"'>"+H[0]+"</option>"))}J!="-1"&&E.children("[value="+J+"]").length>0?E.children("[value="+J+"]").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");y=$("#holidaySearch .queryCustomSelects").find("select");for(A=y.length-1;A>=0;A--)y.eq(A).data("update")()});
break}}});var f=$("#holidaySearchChildrenDetails");$("#holidaySearchChildren").bind("change",function(){var g=$("#holidaySearchChildren").val();a=g;var m=$(".childsel",f).prevAll("input");m.hide();m.filter(":lt("+g+")").show();m.next().find("li:first").click();g>0?f.show():f.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"),e=$("#datePickerHolidayCheckOut");if(b.val()){if(!e.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 f=JooseX.Culture.Factory.get();$("#holidaySearch input[name='termin']").remove();b.after('<input type="hidden" name="termin" value="'+f.parseDate(b.val()).getTime()/1E3+'" />');$("#holidaySearch input[name='ruecktermin']").remove();e.after('<input type="hidden" name="ruecktermin" value="'+f.parseDate(e.val()).getTime()/1E3+'" />');b=$("#holidaySearchAdults").val();e=$("#holidaySearchChildren").val();for(f=1;f<=e;++f){var g=$("#holidaySearchChild"+f).val();b+=";"+g}$("#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?"+$("#holidaySearch input, #holidaySearch select").serialize();if(d.hasClass("loading")){d.removeClass("loading");d.find(".loadingImage").remove()}if(a>0){d=true;e=$("#holidaySearchChildrenDetails select").filter(":lt("+a+")");for(i=0;i<e.length;i++)if(e[i].options[e[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}})};this.load=function(){var c=JooseX.Culture.Factory.get(),d=$("#datePickerCarLeasing");this.initDatepicker(d);var b=$("#carSearchLeasingTime"),e=$("#datePickerCarReturn");this.initDatepicker(e);var f=$("#carSearchReturnTime");d.val(c.formatDate(Date.today().add(14).days()));e.val(c.formatDate(Date.today().add(21).days()));
d.bind("change",function(){c.parseDate(e.val())<c.parseDate(d.val())&&e.val(c.formatDate(c.parseDate(d.val()).add(1).days()));if(c.parseDate(e.val()+" "+f.val())<c.parseDate(d.val()+" "+b.val())){f.val(b.val());f.data("update")()}});b.bind("change",function(){if(c.parseDate(e.val()+" "+f.val())<c.parseDate(d.val()+" "+b.val())){f.val(b.val());f.data("update")()}});var g=$("#carSearch .queryCustomSelects"),m="carSearchCountry",p=jQuery("<select id='"+m+"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);$("#"+m).append(p);m="carSearchRegion";var t=jQuery("<select id='"+m+"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);$("#"+m).append(t);m="carSearchCity";
var y=jQuery("<select id='"+m+"Select' name='lb_city'/>");y.data("dataUrl","https://ww5.tui.com/cars/ibe/services/suche_lb_city_tf_"+c.majorIdentifier()+".php");y.data("notSelectedOption",window.carSearchCityNotSelected);y.data("parameter",{landid:p,regionid:t});t.data("successor",y);$("#"+m).append(y);m="carSearchStation";t=jQuery("<select id='"+m+"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:y});y.data("successor",t);$("#"+m).append(t);$("#carSearchCountry select, #carSearchLocation select").bind("customSelect_changedAndClosed",function(){var A=$(this).data("successor");if(A!=undefined){var E=A.data("parameter"),J="",Q;for(Q in E)J+=Q+"="+E[Q].val()+"&";J+="callback=?";A.empty();A.append(A.data("notSelectedOption"));if(!E.cityid||E.cityid.val().length>0)jQuery.get(A.data("dataUrl")+"?"+J,null,function(K){for(var H=0,aa=K.length;H<
aa;H++)A.append(jQuery("<option value='"+K[H][0]+"'>"+K[H][1]+"</option>"));A.data("updateList")();A.data("update")();A.trigger("customSelect_changedAndClosed")},"jsonp");else{A.data("updateList")();A.data("update")();A.trigger("customSelect_changedAndClosed")}}else s2.tuifly.widget.customSelect.convert("#carSearch")});jQuery.getJSON(p.data("dataUrl")+"?callback=?",function(A){b.val("10:00");f.val("10:00");p.append(window.carSearchCountryNotSelected);for(var E=0,J=A.length;E<J;E++)p.append(jQuery("<option value='"+
A[E][0]+"'>"+A[E][1]+"</option>"));p.bind("change",function(){$("#carSearchLocation").show()});s2.tuifly.widget.customSelect.convert("#carSearch");A=g.find("select");for(E=A.length-1;E>=0;E--)A.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=ifl&tuian=051428&oh=1&lg_c="+d+"&lg_s="+
d+"&"+$("#carSearch input, #carSearch select").serialize();var b="";switch(c.identifier()){case "de-DE":b="DEU";break;case "en-GB":b="ENG";break;case "it-IT":b="ITA";break;case "es-ES":b="ESP"}$("#carSearch a").attr("target","_blank");$("#carSearch a").attr("href","http://"+window.location.host+"/specials/partnerframe/index.php?scte=CSCars_HP_220_P_K4708V1&lang="+b+"&sub=tuicars&suburl="+Base64.encode(d));return true}});
s2.namespace("s2.tuifly.helper.webCheckIn",function(){this.submit=function(){message=$("#errorMessage");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(e){if(e[2]!="")top.location.href=
e[2];message.html(e[1]);message.fadeIn("3000");s2.tuifly.events.AjaxEndEvent.trigger("webCheckin")},dataType:"jsonp"})}});s2.namespace("s2.tuifly.helper.keepAlive",function(){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,3E5);(""+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){var c=$(a).attr("href");if(c.match(/Side=$/i)||c.match(/zpar0=$/i)||c.match(/epi=$/i)||c.match(/p2=$/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(),e="";jQuery.each(b,function(f,g){e+=e==""?"?":"&";e+=f+"="+g});d+=e;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(e,f,g){if(g.url.match(/notepad\/StoreWithAlarm/)){a.prepareForResult($("#priceAlarmStore-ajaxLayer"));a.displayError($("#priceAlarmStore-ajaxLayer"))}});a.doNotShowExitLayer=true;$.post("/notepad/StoreWithAlarm",d,function(e){a.prepareForResult($("#priceAlarmStore-ajaxLayer"));
var f=false;if(e&&e.success)f=e.success;if(f){a.addFacebookShareButton(d);s2.tuifly.helper.notepad.writeCounter(e)}else a.displayError($("#priceAlarmStore-ajaxLayer"))},"json");return true};a.addFacebookShareButton=function(d){var b=$("<a/>"),e="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";
e=e.replace(/\[originName\]/g,Stations[d.OAIATA].name);e=e.replace(/\[destinationName\]/g,Stations[d.DAIATA].name);e=e.replace(/\[origin\]/g,d.OAIATA);e=e.replace(/\[destination\]/g,d.DAIATA);d=$("#row"+selectedIds[1]).attr("departure");d=d.replace(/\s.*/,"");e=e.replace(/\[abflugdatum\]/g,d);d="";if(selectedIds[2]){d=$("#row"+selectedIds[2]).attr("departure");d=d.replace(/\s.*/,"")}e=e.replace(/\[rueckflugdatum\]/g,d);b.attr("href",e);b.click(function(){popup(e,"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,e,f){if(f.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 e=0;if(b&&b.success&&b.count>0)e=1;e?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(e){if(e!=""&&$.trim(e).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(e){if(e.success){s2.tuifly.widget.dialog.alertNotice(b);
e=$(".qNotepad-"+d);e.find(".qActiveText").hide();e.find(".qNotActiveText").show();e.find(".priceAlarmIcon").removeClass("priceAlarmActive");e.find(".priceAlarmIcon").addClass("priceAlarmNotActive");e.find(".qActivateLink").show();e.find(".qDeactivateLink").hide();e.find(".priceAlarmIconLink").removeClass("priceAlarmNotActive");e.find(".priceAlarmIconLink").addClass("priceAlarmActive")}else alert("error: "+e.error)})};a.activateNotepad=function(d,b){jQuery.getJSON("/notepad/ActivatePriceAlarm",{hash:d,
rand:Math.random()},function(e){if(e.success){s2.tuifly.widget.dialog.alertNotice(b);a.activateAlarmSuccess(d)}else alert("error: "+e.error)})};a.addAlarmToNotepad=function(d,b){a.callbackAddAlarmToNotepad=function(f){var g=new s2.tuifly.util.Cookie;g={Culture:JooseX.Culture.Factory.get().identifier(),Hash:d,Email:f.email,CustomerNumber:g.get("customerNumber"),EmailIsEncrypted:f.mailEncrypted,rand:Math.random()};jQuery.getJSON("/notepad/CreateAlarmFromNotepad",g,function(m){if(m.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);a.savedPriceAlarmEmail=f.email}else alert("error: "+m.error)})};var e=cookie.get("customerEMailEncrypted");if(a.savedPriceAlarmEmail)a.callbackAddAlarmToNotepad({mailEncrypted:false,email:a.savedPriceAlarmEmail});else e?a.callbackAddAlarmToNotepad({mailEncrypted:true,email:e}):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(e){e=$(e).html();$("#priceAlarmLayer").html(e)})};a.changeMeinTUIflyNavigationBehaviour=function(){var d=function(){var b=$(this),e=b.attr("href");if(e!=null)if(e.match(/mein-TUIfly\/merkzettel\.html$/i)){e=$(".navNotepad a").attr("href");b.attr("href",e)}};$(".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 e=screen.availHeight,f=eval(screen.availWidth/2-c/2);e=eval(e/2-d/2);c="width="+c+",height="+d+",top="+e+",left="+f;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(e){s2.Logger.debug("Error "+e)}};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,e){if(e==undefined)e=true;if(d||b){var f={events:["event7"],values:{},delay:true,element:c,name:"Teaserklick"};if(b)f.values.prop8=b;if(d)f.values.eVar1=d;s2.tuifly.util.tracking.fire(f);e&&a.updateForExternalTracking(c,d)}};a.updateForExternalTracking=function(c,d){var b=$(c).attr("href");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,e){var f={};f.bgColor=a;f.geschwindigkeit="1";f.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",e,f,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"),e=d.find("#errorSectionContentDetails01 div.formRow"),f=d.find("#errorSectionContentDetails02 div.formRow"),g=0;e.each(function(m){var p=$(this).find("strong").eq(0).text();p=p.substring(1,p.indexOf(":"));for(var t=b.eq(m).text(),y=c.length-1;y>=0;y--)if(p==
c[y]){b.eq(m).hide();e.eq(m).hide();f.eq(m).hide();g+=1;g==e.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"),e=0;e<b.length;++e){var f=$(b[e]);f=jQuery.parseJSON(f.attr("value"));c.push(f)}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 e=0;e<c.length;++e){var f=c[e];if(f.excludeOrigin!=null&&f.excludeOrigin.length!=0)for(var g in f.excludeOrigin)if(b.search(RegExp(f.excludeOrigin[g].origin))!=-1)return true}return false};a.getRestrictedOrigins=function(){for(var b=[],e=0;e<c.length;++e){var f=c[e];if(f.excludeOrigin!=null&&f.excludeOrigin.length!=0)for(var g in f.excludeOrigin)b=b.concat(f.excludeOrigin[g].originList.split(","))}return b};a.validateSearch=function(b,e,f){return a.validateRoute({origin:b,
destination:e,direction:f?"oneway":"return"})};var d=function(b,e){for(var f in e)if(f!=="meta"){if(b[f]==null)return false;if(f==="direction"){if(e[f]!=b[f])return false}else if(f==="origin"||f==="destination")if(b[f].search(RegExp(e[f]))==-1)return false}return true};a.validateRoute=function(b){for(var e=0;e<c.length;++e){var f=c[e];if(f.excludeRoute!=null&&f.excludeRoute.length!=0)for(var g in f.excludeRoute){var m=f.excludeRoute[g];if(d(b,m))return m.meta}}return null}});
s2.namespace("s2.tuifly.helper.airlines",function(){var a=this;a.initialize=function(){a.initOfferClickHandler();a.initInfoHandler();a.changeNavigationLinks();if($.cachedFind("#airlinePage").length){var c=$("div.qDiashowElement li:first").data("code");a.loadDetails(c);s2.tuifly.widget.diashow.initDiashow({element:"div.qDiashowElement",clickHandler:a.diashowClickHandler})}};a.openAirlines=function(){s2.tuifly.widget.dialog.airlineLayer("/farefinder/CarrierOverviewLayer",function(){a.track({values:{prop25:"Carrier-Layer",
eVar8:"Carrier-Layer",eVar48:"Carrier-Layer"},name:"CarrierLayer öffnen"});var c=$("div.qDiashowElement li:first").data("code");a.loadDetails(c);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",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",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){a.showLoading();a.highlightCarrier(c);$.get("/farefinder/CarrierDetails?carrier="+c+"&rand=",function(d){a.hideLoading();
$("#AirlineOffers .qContent").html(d);d=c.toLowerCase();var b=c.toUpperCase();$("#AirlineOffers ."+d+", #AirlineOffers ."+b).show()})};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.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");a.map=new GMap2(c);G_NORMAL_MAP.getMinimumResolution=function(){return 2};c=new GMapUIOptions;c.maptypes={normal:true,physical:true};c.zoom={doubleclick:true,scrollwheel:true};c.controls={largemapcontrol3d:true};c.keyboard=
false;a.map.setUI(c);a.map.setCenter(new GLatLng(49.95122,10.283203),4);a.markerManager=new MarkerManager(a.map);c="";for(var d in a.airplanes){var b="javascript:s2.tuifly.helper.mottoFlieger.activateAircraft('"+d+"')",e=$("#mottoVisual");if(c)e.find(".dots").append('<a class="dot dotNotActive qDots qDot'+d+'" href="'+b+'"></a>');else{c=d;e.append("<img />");a.activateAircraft(c);e.append('<div class="dots"></div>');e.find(".dots").append('<a class="dot dotActive qDots qDot'+d+'" href="'+b+'"></a>')}}a.activateFirstRoute(c)};
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.map.clearOverlays();if(a.data[c]){var b={geodesic:true},e=[];jQuery.each(a.data[c].Flights,function(){var g=this.Id,m=new GLatLng(this.Origin.Airport.Lat,this.Origin.Airport.Lng),p=new GLatLng(this.Destination.Airport.Lat,this.Destination.Airport.Lng);$("#routeDetailLayer");
var t=this.Origin.Airport.IATAcode;if(a.markerData[t])a.markerData[t].flights.push(this);else{a.markerData[t]={};a.markerData[t].flights=[this]}a.markerData[t].point=m;t=this.Destination.Airport.IATAcode;if(a.markerData[t])a.markerData[t].flights.push(this);else{a.markerData[t]={};a.markerData[t].flights=[this]}a.markerData[t].point=p;e.push(m);e.push(p);new GPolyline([m,p],"#1a498e",2,1,b);m=new GPolyline([m,p],"#112c82",2,1,b);a.routes[g]={currentRoute:m};m.hide();a.map.addOverlay(m)});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(e.length>1){c=new GLatLngBounds;for(var f=0;f<e.length;f++)c.extend(e[f]);f=a.map.getBoundsZoomLevel(c);a.map.setCenter(c.getCenter(),f)}}}};a.resetSelection=function(){jQuery.each(a.routes,function(){this.currentRoute.hide()});$(".qRoute").removeClass("selected")};a.activateRoutes=function(c){if(c){jQuery.each(a.routes,function(){this.currentRoute.hide()});$(".qRoute").removeClass("selected");
jQuery.each(c,function(){if(a.routes[this]){a.routes[this].currentRoute.show();$(".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 GIcon(G_DEFAULT_ICON);b.image="/skyres/images/sondermodelle/marker.png";b.iconSize=new GSize(12,12);b.iconAnchor=new GPoint(6,6);b.shadowSize=new GSize(0,0);b=new GMarker(c,{icon:b,clickable:true});GEvent.addListener(b,"mouseover",function(){var e=[];jQuery.each(d,function(){e.push(this.Id)});a.activateRoutes(e);var f=$("table .q"+a.currentSelectedAircraft+" tr"),g=$(".q"+
a.currentSelectedAircraft);setTimeout(function(){var m=0;f.removeClass("selected");jQuery.each(e,function(){m||(m=this.toString());g.find(".qRoute"+this).addClass("selected")});var p=[];g.find(".qRoute").each(function(){var A=$(this);p.push(A.attr("route"))});var t=jQuery.inArray(m,p);if(t<0)t=0;t=a.FLIGHTROWHEIGHT*t-a.FLIGHTROWHEIGHT;var y=$(".qFlightList").scrollTop();if(y<t)for(y=y;y<t;){if(y+a.STEPINPX>=t)y=t;else y+=a.STEPINPX;$(".qFlightList").scrollTop(y)}else for(y=y;y>t;){if(y-a.STEPINPX<=
t)y=t;else y-=a.STEPINPX;$(".qFlightList").scrollTop(y)}},0)});GEvent.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 e=
0;d=function(){var f=b[e++];if(e>=b.length)e=0;var g=$(".qPhotoAlbum img"),m=$(".qImageDescription");g.closest("div").fadeOut("slow",function(){g.attr("src",f.picture);g.attr("title",f.name);g.addClass("border");g.removeClass("loading");g.parent().attr("href",f.link);m.text(f.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(){a.initPositionFooter()};a.initPositionFooter=function(){var c=$.cachedFind("#fixedFooter");if(window.location.href.match(/aspx/)!=null)c.addClass("stop");else{a.checkFooterPosition();$(window).scroll(function(){a.checkFooterPosition()})}};a.checkFooterPosition=function(){var c=$.cachedFind("#fixedFooter");if($.cachedFind("#footer").length){var d=$.cachedFind("#footer").offset().top,b=$(document).scrollTop()+
$(window).height();d<b?c.addClass("stop"):c.removeClass("stop")}}});
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),e=[];s2.Logger.debug("Creating class "+d.meta.className()+
" -> "+b.length);b.each(function(){var f=$(this);d.select(f).each(function(){var g=d.meta.instantiate(jQuery.extend({$:jQuery(this),context$:f},c));e.push(g);s2.tuifly.initialize.diff(d.meta.className())})});return e}}})});
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(e){e=e.toUpperCase();var f;if(f=this.getStation(e))return f;Joose.O.each(this.stationByIataCode,function(g){if(g.toString().toUpperCase()==e)f=
g});return f},addStation:function(e){this.stationByIataCode[e.getIataCode()]=e},getStation:function(e){return this.stationByIataCode[e]},getStations:function(e){var f=this,g=[];Joose.A.each(e,function(m){var p=f.getStation(m);p?g.push(p):s2.Logger.debug("Missing station "+m)});return g},manualSortedIataCodes:function(){var e=[];Joose.O.each(this.stationByIataCode,function(f,g){e.push(g)});return e},addDestToOrigMapping:function(e,f){var g=this.destToOrig;if(g[e]==null)g[e]={};g[e][f]=true},initDestToOrigMapping:function(){if(!c){c=
true;Joose.A.each(this.allStations(),function(e){Joose.A.each(e.getDests(),function(f){d.addDestToOrigMapping(f,e.iataCode)})})}},getOrigs:function(e){this.initDestToOrigMapping();e=this.destToOrig[e]||{};var f=[],g;for(g in e)f.push(g);return this.getStations(f)},validOrigs:function(){var e=this.getSortedStations(),f=[];jQuery.each(e,function(g){g=e[g];s2.tuifly.helper.restrictions.isRestrictedOrigin(g)||f.push(g)});return this.getStations(f)},allStations:function(){return this.getStations(this.getSortedStations())},
getSortedStations:function(){if(typeof SortedStations=="undefined"){var e=[];Joose.O.each(this.stationByIataCode,function(f){e.push(f)});return d.sortStations(e)}else return SortedStations},validDests:function(){var e=[];Joose.A.each(this.allStations(),function(f){f.isValidDest()&&e.push(f)});return e},sortStations:function(e,f,g){var m=function(A,E){if(!f){if(A.isInGermany()&&!E.isInGermany())return-1;if(!A.isInGermany()&&E.isInGermany())return 1}return A.getLongName()>E.getLongName()?1:-1};if(typeof SortedStations==
"undefined"){e.sort(m);return e}var p={};Joose.A.each(e,function(A){p[A.getIataCode()]=true});var t=[];Joose.A.each(this.allStations(),function(A){p[A.getIataCode()]!=null&&t.push(A)});if((location.pathname.match(/BookGroup\.aspx/i)||location.pathname.match(/BookCharter\.aspx/i))&&f&&g){var y=[];jQuery.each(t,function(){s2.tuifly.util.routes.isInAirberlinFormerTuifly(this.getIataCode())||y.push(this)});t=y}if(f)return t.sort(m);return t},getAirportsInRegion:function(e){var f=[];Joose.O.each(this.regionToIataCodes,
function(g,m){if(m.indexOf(e)>-1)f=f.concat(g)});return f}}});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(e){if(e)for(var f in e)this[f]=e[f]}}});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(e){if(e)for(var f in e)this[f]=
e[f]},origStations:function(){return d.getOrigs(this.iataCode)},destStations:function(){return d.getStations(this.getDests())},isInGermany:function(){var e=this.getCountry();return e==="DE"||e==="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 e=this.longName;e||(e="");if(this.iataCode.match("-"))return e;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(e,f){var g=s2.tuifly.model.flightSearch.StationManager.getInstance(),m=e.name,p=[],t=e.mkts;if(!location.pathname.match(/BookGroup\.aspx/i)&&!location.pathname.match(/BookCharter\.aspx/i))p=[].concat(t||[]);else for(var y in t)this.routes.isX3(e.code,t[y])&&p.push(t[y]);m=new s2.tuifly.model.flightSearch.Station({iataCode:e.code,
longName:m,validOrig:e.validOrig,validDest:e.validDest,dests:p,country:f});g.addStation(m)},newFromParams:function(e){var f=s2.tuifly.model.flightSearch.StationManager.getInstance();e=new this({iataCode:e.iataCode,longName:e.name});f.addStation(e)},initialize:function(){var e=this;s2.tuifly.util.routes.get(function(f){e.routes=f;e.text=new s2.tuifly.util.Text(window.LocalText);f=window.NavitairGlobal_airportCountryMap;for(var g=Stations,m=SortedStations,p=0;p<m.length;++p){var t=g[m[p]];if(typeof t==
"object"&&t.name!==true){var y=f[t.code];y?s2.tuifly.model.flightSearch.Station.newFromNavitairStation(t,y):s2.Logger.debug("missing country "+t.code)}}d.iataToCountryCode=f;b=true;a.InitializedEvent.trigger()})},initializeFromAjax:function(e){e="/pregenerated/"+JooseX.Culture.Factory.get().majorIdentifier()+"/farefinder/"+s2.tuifly.util.Skin.get().identifier()+"/orig-dest-pairs.json";var f=this;if(b)window.setTimeout(function(){a.InitializedEvent.trigger()});else{if(typeof Stations!="undefined")return this.initialize();
jQuery.getJSON(e,function(g){var m=s2.tuifly.model.flightSearch.StationManager.getInstance();Joose.O.each(g.iataCodes,function(p,t){var y=g.dests[t]||[];y=f.meta.instantiate({iataCode:t,longName:p,validDest:y.length>0?true:false,dests:y,country:g.countries[t]});Joose.A.each(y.getDests(),function(A){m.addDestToOrigMapping(A,t)});m.iataToCountryCode=g.countries;m.addStation(y);m.regionToIataCodes=g.regions});Joose.O.each(g.countryName,function(p,t){m.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 e=b.getInstance();e.ready();var f=e.meta.className();
window.S2Controllers[f]=e;s2.tuifly.initialize.diff(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(){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;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 e=new JooseX.Culture.Factory.get;location.href="/Search.aspx?culture="+e.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(f,g){b.setDestCode(f);b.destChanged(f,
g)});s2.tuifly.model.flightSearch.OrigChangeEvent.observe(function(f,g){b.setOrigCode(f);b.origChanged(f,g)});s2.tuifly.model.flightSearch.Station.initialize();var e=JooseX.Culture.Factory.get();if(e.identifier()=="de-DE"||e.identifier()=="en-GB")$("body > div.ac_results").find("li.ac_element").live("mouseover",function(f){f.preventDefault();f=$(f.target);c=false;s2.tuifly.controller.AirportInfoShowEvent.trigger(f)});s2.tuifly.controller.AirportInfoHideEvent.observeLazy(function(){$("#destinationInfo").hide();
$(".dontClickLayer").hide();c=true});s2.tuifly.controller.AutoCompleteShowEvent.observe(function(){c=false});s2.tuifly.initialize.diff("FlightSearchNavitairReady");typeof RouteMaxDate!="undefined"&&s2.tuifly.widget.datepickerForSelect.datePickers.each(function(){$(this).data("datepicker").settings.maxDate=RouteMaxDate});s2.tuifly.controller.AirportInfoShowEvent.observeLazy(function(f){var g=false,m=f.parent();if(f.find("span.dest").length>0)g=true;if(!g&&!m.is("ul")&&m.find("span.dest").length>0){f=
m;g=true}s2.Logger.debug("event");var p=f.find(".qAirportCode").text(),t,y;if(m=p.match(/(\w+)$/)){t=m[1];s2.Logger.debug("over "+t);y=$("<span>"+f.html()+"</span>").find(".zugZumFlug").length>0?b.text.get("zzfText"):"";m="/"+JooseX.Culture.Factory.get().majorIdentifier()+"/destinations/"+t.toLowerCase()+".html";var A=function(E,J){if(!c)if(JooseX.Culture.Factory.get().identifier()!="it-IT"){s2.Logger.debug("Status "+J);if(J!="error"){var Q=$("<div class='dontClickLayer'/></div>");destinationInfo=
$("#destinationInfo");if(destinationInfo.length==0){Q.appendTo($(document.body));destinationInfo=$("<div style='z-index: 9999; display:none' id=destinationInfo />").appendTo($(document.body))}if(y){var K;if(g){Q=b.getOrigInput().val();K=p}else{Q=p;K=b.getDestInput().val()}E=b.text.get("zzfDirection",{orig:Q,dest:K});b.setCurrentSelectTarget(f)}else if(g)if((Q=b.getOrigCode())&&t){Q=a.getStation(Q);K=a.getStation(t);if(Q&&K&&!Q.isInGermany()&&K.isInGermany())E+="<br/><br/><p>"+b.text.get("zzfToGermany")+
"</p>"}destinationInfo.html(E+y);K=$("#marketCityPair_1 input:visible");Q=K.offset().left;K=K.outerWidth();Q+=K;s2.Logger.debug("Left: "+Q);K=(K=f.closest("ul").offset())?Math.round(K.top)-1:0;if(K>0){destinationInfo.css("top",K+"px");destinationInfo.css("left",Q+"px");s2.Logger.debug("Pos "+K+"-"+Q);$(".dontClickLayer").show();destinationInfo.show()}}}};$.ajax({url:m,dataType:"html",error:A,success:A})}})}},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 e=this,f=this.getOrigInput();this.setOptions(f,b.origStations(),"orig");s2.tuifly.model.flightSearch.OrigChangeEvent.observeOnce(function(){e.setOptions(f,a.validOrigs(),"orig")})},destChanged:function(b,e){s2.Logger.debug("destChanged");
var f=this.getOrigInput();if(b){var g=a.getStation(b);d=false;if(f.val()==="")this.setOrigsForDest(g);else if(e){d=true;this.setOrigsForDest(g);f.val("");f.parent().find(".qAirportName").html("");f.parent().find(".qAirportCode").html("");this.clickInput(f)}try{s2.tuifly.flash.airportMap.fireDestChanged(b)}catch(m){s2.Logger.debug("Flash Error: "+m)}}else this.setOptions(f,a.validOrigs(),"orig")},origChanged:function(b){s2.Logger.debug("origChanged");var e=a.getStation(b);if(typeof e!="undefined"){var f=
this.sortDests(e.destStations(),s2.tuifly.util.routes.isInAirberlinFormerTuifly(e.getIataCode())),g=this.getDestInput(),m=false;if(!Joose.A.exists(f,g.val())){m=true;g.val("");g.parent().find(".qAirportName").html("");g.parent().find(".qAirportCode").html("");$("#destDisplayField").addClass("hidden")}if(e.isInGermany()&&document.URL.indexOf("BookGroup")==-1){f=[].concat(f);f.push("--------------------------------");e=a.validDests();Joose.A.each(e,function(p){!p.isInGermany()&&!Joose.A.exists(f,p)&&
f.push('<span class="zugZumFlug">'+p.toString()+"</span>")})}m&&window.triggerClickCompactSearchAllowed&&this.clickInput(g);this.setOptions(g,f,"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}},clickInput:function(b){window.setTimeout(function(){if(!$("#flugsuche").hasClass("closed")){b.get(0).showInput&&
b.get(0).showInput();try{b.focus()}catch(e){}b.click()}},50)},setOptions:function(b,e,f){var g=true,m=0,p=0;e=jQuery.map(e,function(t){if(t.meta&&g&&!t.isInGermany()&&t.getCountry()!=null){g=false;p=m}t=""+t;t=t.match(/class=\"/)?t.replace(/class=\"/,'class="'+f+" "):'<span class="'+f+'">'+t+"</span>";++m;return t});p>0&&e.splice(p,0,"<span>--------------------------------</span>");b.flushCache();b.setOptions({data:e})},sortDests:function(b,e){return s2.tuifly.model.flightSearch.StationManager.getInstance().sortStations(b,
true,e)},sortStations:function(b){return s2.tuifly.model.flightSearch.StationManager.getInstance().sortStations(b,false)}}})});
s2.namespace("s2.tuifly.util",function(){this.Cookie=function(){this.doc=document};this.Cookie.prototype={get:function(a){var c=this.doc.cookie;c=c.replace("+","%20");a=a+"=";var d=c.indexOf("; "+a);if(d==-1){d=c.indexOf(a);if(d!=0)return""}else d+=2;var b=c.indexOf(";",d);if(b==-1)b=c.length;c=unescape(c.substring(d+a.length,b));if(c==";")return"";return c},set:function(a,c,d,b){this.doc.cookie=a+"="+escape(c)+(d?"; expires="+d.toGMTString():"")+"; path=/"+(b?"; secure":"");d=this.get(a);d!=c&&XSSdebug("Failed Setting cookie "+
a+" "+c+"->"+d)}}});
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 e=jQuery("meta[name='culture']").attr("content");e?JooseX.Culture.setCurrentCulture(e):s2.Logger.debug("missing culture tag");var f=
jQuery("meta[name='defaultCurrency']").attr("content");e?s2.tuifly.util.CurrencyValue.setDefaultCurrencySymbol(f):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(e=="de-DE"){jQuery("#collectingBlueMiles_2082").remove();jQuery("#collectingBlueMiles_3533").remove()}else if(e=="en-GB"){jQuery("#collectingBlueMiles_2079").remove();
jQuery("#collectingBlueMiles_2078").remove();jQuery("#collectingBlueMiles_2081").remove()}else if(e=="it-IT"){jQuery("#collectingBlueMiles_2079").remove();jQuery("#collectingBlueMiles_2078").remove()}else if(e=="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.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.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://",e=location.hostname;if(location.port!="80"&&location.port!="443"&&location.port!="")e+=":"+location.port;var f=b+e+location.pathname+location.search,g=b+e+"/GlobalLogin.aspx",m=b+e+"/GlobalLogin.aspx?globalLogout=true&culture="+c;d=b+e+"/"+d+"/mein-TUIfly/index.html";
$("#globalLoginForm").append('<input type="hidden" name="culture" value="'+c+'">');$("#returnURL").val(f);location.pathname=="/Register.aspx"&&$("#returnURL").val(d);c=$("#globalLoginForm");c.attr("action",g);$("#globalLogoutAction").attr("href",m);$("#globalLoginFindPasswordAction").attr("href","javascript:s2.tuifly.widget.passwortVergessenLayer.open()");c.submit(function(p){var t=$("#loginName"),y=$("#loginPassword");if(t.val()==""){p.preventDefault();t.focus()}else if(y.val()==""){p.preventDefault();
y.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()});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(e,f){d(e)&&b(e,f)})},each:function(a){var c=this.adaptor.terseToVerboseCallback(a);
this.all(function(d){for(var b=d.length,e=0;e<b;e++)c(d[e],e)})}};
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 e=0;e<a;e++)b[e]=d[0|Math.random()*c];else{var f;b[8]=b[13]=b[18]=b[23]="-";b[14]="4";for(e=0;e<36;e++)if(!b[e]){f=0|Math.random()*16;b[e]=d[e==19?f&3|8:f]}}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,e,f=0,g=c.length;f<g;f++){b=c[f];if(e=this.deserialize(b.nodeValue)){e.key=b.nodeName;d.push(e)}}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,e=d.length;b<e;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,e){d[b]=e+"";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 e=this.storage.key(d),f=e.split("::")[0],g=e.split("::").slice(1).join("::");if(f==this.table){e=this.deserialize(this.storage.getItem(e));
e.key=g;c.push(e)}}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,e=d.length;b<e;b++)c.remove(d[b]);a&&a()})}};var langCode="de",message=[];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="Ihren Vornamen\n";message.errorLastname="Ihren Nachnamen\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.noFlightFound="Der von Ihnen gewählte Flugtermin liegt außerhalb unseres Flugplans.";message.notAllowedChar='Ein unerlaubtes Zeichen wurde automatisch entfernt: "&", "<", ">", "|", "%".\nSofern dies nötig ist, geben Sie bitte ein alternatives Zeichen ein.';
message.notAllowedCharName='Ein unerlaubtes Zeichen wurde automatisch entfernt: "&", "<", ">", "|", "%", "0-9".\nSofern dies nötig ist, geben Sie bitte ein alternatives Zeichen ein.';message.paymentMethodNotAllowedForElvia="Die Buchung einer ELVIA Reiseversicherung ist nur möglich mit den Kreditkarten Visa,  Mastercard und American Express";message.SeatAssignmentExitSeatConfirmation="Sie haben einen Sitzplatz am Notausgang gewählt. Leider müssen wir darauf hinweisen, dass folgender Personenkreis - bedingt durch Sicherheitsauflagen der Behörden - nicht in der Notausstiegsreihe sitzen darf:<br /><br /> - Babys und Kinder (bis einschließlich 11 Jahre)<br /> - Personen, die Tiere in der Kabine mitführen<br /> - werdende Mütter<br /> - körperlich und/oder geistig behinderte Personen<br /> - Personen, die durch ihre Körpermaße, Krankheit oder aus Altersgründen eingeschränkt beweglich sind<br /><br />Mit Buchung sichern Sie zu, dass diese Kriterien für Sie und die von Ihnen gebuchten Personen nicht zutreffen. Sollte dies doch der Fall sein, sind wir berechtigt, der/den betreffenden Person(en) ohne Rückerstattung der Reservierungskosten einen anderen Sitzplatz zuzuweisen.";
message.SeatAssignmentFrontRowConfirmation="Sie haben einen Sitzplatz in der 1. Reihe gewählt. Wir weisen Sie hiermit darauf hin, dass Sie in diesem Bereich nicht Platz nehmen dürfen, sollten Sie ein Tier oder sperrige Gegenstände in der Kabine befördern.<br /><br />Eine ordnungsgemäße Verstauung ist in diesem Bereich nicht möglich.<br /><br />Mit Ihrer Buchung sichern Sie zu, dass diese Kriterien für Sie und die von Ihnen gebuchten Personen nicht zutreffen. Sollte dies doch der Fall sein, sind wir berechtigt, der/den betreffenden Person(en) ohne Rückerstattung der Reservierungskosten einen anderen Sitzplatz zu zuweisen.";
message.SeatAssignmentChange1="Sie hatten in Ihrer ursprünglichen Buchung ";message.SeatAssignmentChange2=" Sitzplätz(e) reserviert. Bitte nehmen Sie wieder mindestens ";message.SeatAssignmentChange3=" Sitzplatzreservierung(en) vor.";message.UAM="Sie möchten einen Flug für ein alleinreisendes Kind unter 12 Jahren buchen. Bitte beachten Sie folgendes:\n\nJugendliche ab ihrem 12. Geburtstag müssen als Erwachsene gebucht werden und benötigen eine schriftliche Einwilligungserklärung des/r Erziehungsberechtigten.\n\nFür alleinreisende Kinder unter 12 Jahren ist eine Internetbuchung nicht möglich.\n\nBitte wenden Sie sich hier an unser Servicecenter 0900 - 1000 2000 (0,49 €/Min. aus dem deutschen Festnetz, abweichender Mobilfunktarif). Eventuelle Wartezeiten bis zur Verbindung mit unseren Servicemitarbeitern sind kostenfrei für Anrufer aus dem deutschen Festnetz. Das Servicecenter ist montags bis freitags von 7.30 bis 22.30 Uhr (MEZ), samstags, sonntags und feiertags von 08.30 bis 21.00 Uhr (MEZ) erreichbar.";
message.fleugplaneinschraenkung_priorPrefix="Flüge von ";message.fleugplaneinschraenkung_priorInfixTo=" nach ";message.fleugplaneinschraenkung_priorInfixDate=" starten am ";message.fleugplaneinschraenkung_priorSuffix=". \nKlicken Sie auf OK, um zur Datumseingabe zurückzukehren.";message.fleugplaneinschraenkung_laterPrefix="Flüge von ";message.fleugplaneinschraenkung_laterInfixTo=" nach ";message.fleugplaneinschraenkung_laterInfixDate=" sind nur bis zum ";
message.fleugplaneinschraenkung_laterSuffix=" buchbar.\nKlicken Sie auf OK, um zur Datumseingabe zurückzukehren.";message.HanRomNoCIA="Flüge von Hannover nach Rom-Ciampino/von Rom-Ciampino nach Hannover sind nur bis zum 27.10.2007 buchbar. Ab dem 30.10.2007 fliegen wir den Flughafen Rom-Fiumicino an. Bitte ändern Sie Ihre Auswahl.";message.HanRomNoFCO="Flüge von Hannover nach Rom-Fiumicino/von Rom-Fiumicino nach Hannover sind erst ab dem 30.10.2007 buchbar. Bis zum 27.10.2007 fliegen wir den Flughafen Rom-Ciampino an. Bitte ändern Sie Ihre Auswahl.";
message.HanRomNoCIA2="Flüge von Hannover nach Rom-Ciampino/von Rom-Ciampino nach Hannover sind nur bis zum 27.10.2007 buchbar. Ab dem 30.10.2007 fliegen wir den Flughafen Rom-Fiumicino an. Bitte buchen Sie Ihren Hin- und Rückflug separat.";message.HanRomNoFCO2="Flüge von Hannover nach Rom-Fiumicino/von Rom-Fiumicino nach Hannover sind erst ab dem 30.10.2007 buchbar. Bis zum 27.10.2007 fliegen wir den Flughafen Rom-Ciampino an. Bitte buchen Sie Ihren Hin- und Rückflug separat.";
message.CTAReroutedPMO="Lieber Kunde,\n\nleider können wir Ihnen die gewählte Verbindung nicht anbieten, da in der Zeit vom\n\n12. – 15. Mai 2008 der Flughafen Catania schließt.\n\nEine Alternative zum gleichen Termin wären Angebote nach/von Palermo.";message.lateAllYouCanFly="All you can fly Flüge sind erst ab 48 Stunden vor Abflug verfügbar. Bitte ändern Sie Ihre Suchauswahl entprechend.";message.errorHotelSearch="Bitte geben Sie ein Hotel, eine Stadt oder eine Region ein.";var weinziele=[];
weinziele.VLC="/"+langCode+"/offers/weinziel_VLC.html";weinziele.VCE="/"+langCode+"/offers/weinziel_VCE.html";weinziele.STR="/"+langCode+"/offers/weinziel_STR.html";weinziele.PSA="/"+langCode+"/offers/weinziel_PSA.html";weinziele.PMO="/"+langCode+"/offers/weinziel_PMO.html";weinziele.NAP="/"+langCode+"/offers/weinziel_NAP.html";weinziele.BIO="/"+langCode+"/offers/weinziel_BIO.html";weinziele.MRS="/"+langCode+"/offers/weinziel_MRS.html";var flugziele=[];flugziele.BRI="/"+langCode+"/destinations/bari.html";
flugziele.TXL="/"+langCode+"/destinations/berlin.html";flugziele.BIO="/"+langCode+"/destinations/bilbao_biarritzkueste.html";flugziele.BHX="/"+langCode+"/destinations/birmingham.html";flugziele.CGN="/"+langCode+"/destinations/bonn.html";flugziele.CAG="/"+langCode+"/destinations/cagliari.html";flugziele.CTA="/"+langCode+"/destinations/catania.html";flugziele.DUB="/"+langCode+"/destinations/dublin.html";flugziele.DBV="/"+langCode+"/destinations/dubrovnik.html";flugziele.DUS="/"+langCode+"/destinations/duesseldorf.html";
flugziele.GOA="/"+langCode+"/destinations/genua.html";flugziele.HAM="/"+langCode+"/destinations/hamburg.html";flugziele.HAJ="/"+langCode+"/destinations/hannover.html";flugziele.CAI="/"+langCode+"/destinations/kairo.html";flugziele.KLU="/"+langCode+"/destinations/klagenfurt_kaernten.html";flugziele.CGN="/"+langCode+"/destinations/koeln.html";flugziele.LEJ="/"+langCode+"/destinations/leipzig.html";flugziele.MXP="/"+langCode+"/destinations/mailand_bergamo.html";flugziele.PMI="/"+langCode+"/destinations/palma_de_mallorca.html";
flugziele.MAN="/"+langCode+"/destinations/manchester.html";flugziele.MRS="/"+langCode+"/destinations/marseille_provence.html";flugziele.MUC="/"+langCode+"/destinations/muenchen.html";flugziele.NAP="/"+langCode+"/destinations/neapel.html";flugziele.NCL="/"+langCode+"/destinations/newcastle.html";flugziele.NCE="/"+langCode+"/destinations/nizza.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.OPO="/"+langCode+"/destinations/porto.html";flugziele.RJK="/"+langCode+"/destinations/rijeka.html";flugziele.RMI="/"+langCode+"/destinations/rimini.html";flugziele.CIA="/"+langCode+"/destinations/rom.html";flugziele.SZG="/"+langCode+"/destinations/salzburg.html";flugziele.ARN="/"+langCode+"/destinations/stockholm.html";flugziele.STR="/"+langCode+"/destinations/stuttgart.html";
flugziele.GWT="/"+langCode+"/destinations/sylt.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.MUC="MUCT01";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";autoCodes.OPO="OPOT01";autoCodes.RMI="RMIT01";autoCodes.CTA="CTAT01";autoCodes.GOA="GOAT01";autoCodes.NCE="NCET01";autoCodes.BHX="BHXT01";
var hotelCodes=[];hotelCodes=[];hotelCodes.BRI="Apulien & Molise";hotelCodes.TXL="Berlin";hotelCodes.BIO="Baskenland / País Vasco";hotelCodes.CVT="England / West Midlands";hotelCodes.DUB="Osten / Leinster / Dublin & Umgebung";hotelCodes.EDI="Schottland";hotelCodes.HAM="Hamburg";hotelCodes.HAJ="Hannover & Umgebung";hotelCodes.KLU="Kärnten & Osttirol";hotelCodes.CGN="Köln";hotelCodes.BGY="Northern Italy / Milan & environs";hotelCodes.PMI="Balearen / Mallorca";hotelCodes.MAN="England / Nordwesten";
hotelCodes.MRS="Provence-Alpes-Côte d'Azur";hotelCodes.MUC="Bayern / München & Umgebung";hotelCodes.NAP="Kampanien / Neapel & Umgebung";hotelCodes.NCL="England / Nordosten / Northumberland";hotelCodes.OLB="Sardinien (Norden)";hotelCodes.PMO="Sizilien / Palermo & Umgebung";hotelCodes.PSA="Toskana";hotelCodes.CIA="Latium / Rom & Umgebung";hotelCodes.RJK="Kvarner Bucht / Rijeka";hotelCodes.SZG="Salzburg Stadt";hotelCodes.STR="Stuttgart & Umgebung";hotelCodes.ARN="Stockholm & Umgebung";
hotelCodes.SNN="Süden / Munster";hotelCodes.VLC="Valencia & Umgebung";hotelCodes.VCE="Venetien & Friaul-Julisch Venetien";var interhome=[];interhome.BRI="&amp;countrycode=I&amp;regioncode=77";interhome.TXL="dummyk=1&amp;dummys=D&amp;dummya=50519&amp;dummyc=D&amp;OK";interhome.BIO="&amp;countrycode=E&amp;xregioncode=08";interhome.CVT="dummyk=333&amp;dummys=D&amp;dummya=50519&amp;dummyc=GB&amp;OK";interhome.DUB="dummyk=1&amp;dummys=D&amp;dummya=50519&amp;dummyc=EI&amp;region_kz=IRL&amp;OK";
interhome.GVA="&amp;countrycode=C&amp;xregioncode=01";interhome.HAM="dummyk=1&amp;dummys=D&amp;dummya=50519&amp;dummyc=D&amp;OK";interhome.HAJ="dummyk=1&amp;dummys=D&amp;dummya=50519&amp;dummyc=D&amp;OK";interhome.KLU="&amp;countrycode=A&amp;regioncode=70";interhome.CGN="dummyk=1&amp;dummys=D&amp;dummya=50519&amp;dummyc=D&amp;OK";interhome.MXP="dummyk=333&amp;dummys=D&amp;dummya=50519&amp;dummyc=I&amp;OK";interhome.MAN="dummyk=1&amp;dummys=D&amp;dummya=50519&amp;dummyc=GB&amp;region_kz=ENG&amp;OK";
interhome.MRS="&amp;countrycode=F&amp;regioncodegrouper=75-77";interhome.NAP="&amp;countrycode=I&amp;regioncode=70";interhome.NCL="dummyk=1&amp;dummys=D&amp;dummya=50519&amp;dummyc=GB&amp;OK";interhome.OLB="&amp;countrycode=I&amp;regioncode=90";interhome.PMO="&amp;countrycode=I&amp;regioncode=80";interhome.PMI="&amp;countrycode=E&amp;regioncode=90";interhome.PSA="&amp;countrycode=I&amp;regioncode=42";interhome.FCO="dummyk=333&amp;dummys=D&amp;dummya=50519&amp;dummyc=I&amp;OK";interhome.SZG="&amp;countrycode=A&amp;regioncode=30";
interhome.SVQ="&amp;countrycode=E&amp;xregioncode=48";interhome.STR="dummyk=1&amp;dummys=D&amp;dummya=50519&amp;dummyc=D&amp;region_kz=DSW&amp;OK";interhome.VLC="&amp;countrycode=E&amp;regioncode=40";interhome.VCE="&amp;countrycode=I&amp;regioncode=25";interhome.CIA="&amp;countrycode=I&amp;regioncode=60&amp;nrefgrouper=i5602-i5895";interhome.MUC="&amp;countrycode=D&amp;regioncode=23";interhome.RJK="&amp;countrycode=H&amp;regioncode=30";interhome.ARN="dummyk=1&amp;dummys=D&amp;dummya=50519&amp;dummyc=S&amp;region_kz=STK&amp;OK";
interhome.CAG="&amp;countrycode=I&amp;regioncode=90";interhome.CTA="&amp;countrycode=I&amp;regioncode=80";interhome.OPO="&amp;countrycode=P&amp;regioncode=01";interhome.ORY="&amp;countrycode=F&amp;placecode=1000";interhome.LEJ="&amp;countrycode=D&amp;regioncode=D15";interhome.DBV="&amp;countrycode=H&amp;regioncode=60";interhome.GOA="&amp;countrycode=I&amp;regioncode=41";interhome.RMI="&amp;countrycode=I&amp;regioncode=30";interhome.SBL="&amp;countrycode=A&amp;regioncode=30&amp;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,SDMR,FVMR";airportCode.TXL="EBMN,CLMR,IDMR,SDMR,FVMR";airportCode.CGN="EBMN,CLMR,IDMR,SDMR,FVMR";airportCode.HAM="EBMN,CLMR,IDMR,SWMR,FVMR";airportCode.HAJ="EBMN,CLMR,IDMR,SWMR,FVMR";airportCode.LEJ="EBMN,CLMR,IDMR,SDMR,FVMR";airportCode.STR="EBMN,CLMR,IDMR,SDMR,FVMR";
airportCode.DUS="EBMN,CLMR,IDMR,SDMR,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,EDMN,CDMN,IDMR,FVMN";airportCode.EDI="EBMN,EDMN,CDMN,IDMR,FVMN";airportCode.MAN="EBMN,EDMN,CDMN,IVMR,FVMN";airportCode.NCL="EDMN,EDMN,CDMN,IVMR,FVMN";airportCode.SNN="ECMN,EDMN,CCMN,IDMR,FVMR";airportCode.BRI="EBMR,EDMR,CDMR,IVMR,FVMR";
airportCode.CAG="EBMR,EDMR,CDMR,CWMR,IVMR";airportCode.CTA="EBMR,EDMR,CDMR,IVMR,FVMR";airportCode.CIA="EBMN,EDMR,CDMR,CWMR,IVMR";airportCode.MXP="EBMR,EDMR,CDMR,IVMR,FVMR";airportCode.BGY="EBMR,EDMR,CDMR,CWMR,IVMR";airportCode.NAP="EBMR,EDMR,CDMR,IVMR,SVMR";airportCode.OLB="EBMR,EDMR,CDMR,CWMR,IVMR";airportCode.PMO="EBMR,EDMR,CDMR,IVMR,FVMR";airportCode.PSA="EBMR,EDMR,CDMR,IVMR,FVMR";airportCode.VCE="EBMR,EDMR,CDMR,IVMR,FVMR";airportCode.ARN="ECMN,CCMN,CDMR,IDMN,SVMN";airportCode.OPO="EBMN,EDMN,CDMR,IDMR,CWMR";
airportCode.DBV="EBMN,EDMN,CDMR,IVMR,IDMR";airportCode.BHX="EDMN,CCMN,CXMN,IDMR,FVMN";airportCode.GOA="EBMR,EDMR,CDMR,CWMR,IVMR";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="/de/skylights/auto.html";url_hotel="/de/skylights/hotel.html";url_flugHotel="/de/skylights/flug_und_hotel.html";
url_ferienwohnungen="/de/skylights/ferienwohnung.html";url_reiseversicherungen="/de/skylights/reiseversicherung.html";url_tiefstpreisseite="/de/offers/tiefstpreise.jsp?currency=EUR";
Date.CultureInfo={name:"de-DE",englishName:"German (Germany)",nativeName:"Deutsch (Deutschland)",dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],abbreviatedDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],shortestDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],firstLetterDayNames:["S","M","D","M","D","F","S"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],abbreviatedMonthNames:["Jan","Feb","Mrz",
"Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dddd, d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, d. 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(uar)?/i,
feb:/^feb(ruar)?/i,mar:/^märz/i,apr:/^apr(il)?/i,may:/^mai/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dez(ember)?/i,sun:/^sonntag/i,mon:/^montag/i,tue:/^dienstag/i,wed:/^mittwoch/i,thu:/^donnerstag/i,fri:/^freitag/i,sat:/^samstag/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 e=8-(new Date(c,0,1)).getDay();if(e==8)e=1;d=(Date.UTC(c,d,b,0,0,0)-Date.UTC(c,0,1,0,0,0))/864E5+1;d=Math.floor((d-e+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/),e="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),f=function(m){return function(){if(this._is){this._is=false;return this.getDay()==m}return this.moveToDayOfWeek(m,this._orient)}},g=0;g<d.length;g++)a[d[g]]=a[d[g].substring(0,3)]=f(g);d=function(m){return function(){if(this._is){this._is=
false;return this.getMonth()===m}return this.moveToMonth(m,this._orient)}};for(f=0;f<b.length;f++)a[b[f]]=a[b[f].substring(0,3)]=d(f);d=function(m){return function(){if(m.substring(m.length-1)!="s")m+="s";return this["add"+m](this._orient)}};f=function(m){return function(){this._dateElement=m;return this}};for(g=0;g<e.length;g++){b=e[g].toLowerCase();a[b]=a[b+"s"]=d(e[g]);c[b]=c[b+"s"]=f(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(f){this.message="Parse error at '"+f.substring(0,10)+" ...'"}};for(var a=Date.Parsing,c=a.Operators={rtoken:function(f){return function(g){var m=g.match(f);if(m)return[m[0],g.substring(m[0].length)];else throw new a.Exception(g);}},token:function(){return function(f){return c.rtoken(RegExp("^s*"+f+"s*"))(f)}},stoken:function(f){return c.rtoken(RegExp("^"+f))},until:function(f){return function(g){for(var m=[],p=null;g.length;){try{p=f.call(this,g)}catch(t){m.push(p[0]);
g=p[1];continue}break}return[m,g]}},many:function(f){return function(g){for(var m=[],p=null;g.length;){try{p=f.call(this,g)}catch(t){break}m.push(p[0]);g=p[1]}return[m,g]}},optional:function(f){return function(g){var m=null;try{m=f.call(this,g)}catch(p){return[null,g]}return[m[0],m[1]]}},not:function(f){return function(g){try{f.call(this,g)}catch(m){return[null,g]}throw new a.Exception(g);}},ignore:function(f){return f?function(g){var m=null;m=f.call(this,g);return[null,m[1]]}:null},product:function(){for(var f=
arguments[0],g=Array.prototype.slice.call(arguments,1),m=[],p=0;p<f.length;p++)m.push(c.each(f[p],g));return m},cache:function(f){var g={},m=null;return function(p){try{m=g[p]=g[p]||f.call(this,p)}catch(t){m=g[p]=t}if(m instanceof a.Exception)throw m;else return m}},any:function(){var f=arguments;return function(g){for(var m=null,p=0;p<f.length;p++)if(f[p]!=null){try{m=f[p].call(this,g)}catch(t){m=null}if(m)return m}throw new a.Exception(g);}},each:function(){var f=arguments;return function(g){for(var m=
[],p=null,t=0;t<f.length;t++)if(f[t]!=null){try{p=f[t].call(this,g)}catch(y){throw new a.Exception(g);}m.push(p[0]);g=p[1]}return[m,g]}},all:function(){var f=f;return f.each(f.optional(arguments))},sequence:function(f,g,m){g=g||c.rtoken(/^\s*/);m=m||null;if(f.length==1)return f[0];return function(p){for(var t=null,y=null,A=[],E=0;E<f.length;E++){try{t=f[E].call(this,p)}catch(J){break}A.push(t[0]);try{y=g.call(this,t[1])}catch(Q){y=null;break}p=y[1]}if(!t)throw new a.Exception(p);if(y)throw new a.Exception(y[1]);
if(m)try{t=m.call(this,t[1])}catch(K){throw new a.Exception(t[1]);}return[A,t?t[1]:p]}},between:function(f,g,m){m=m||f;var p=c.each(c.ignore(f),g,c.ignore(m));return function(t){t=p.call(this,t);return[[t[0][0],r[0][2]],t[1]]}},list:function(f,g,m){g=g||c.rtoken(/^\s*/);m=m||null;return f instanceof Array?c.each(c.product(f.slice(0,-1),c.ignore(g)),f.slice(-1),c.ignore(m)):c.each(c.many(c.each(f,c.ignore(g))),px,c.ignore(m))},set:function(f,g,m){g=g||c.rtoken(/^\s*/);m=m||null;return function(p){var t=
null;for(var y=t=null,A=null,E=[[],p],J=false,Q=0;Q<f.length;Q++){t=y=null;J=f.length==1;try{t=f[Q].call(this,p)}catch(K){continue}A=[[t[0]],t[1]];if(t[1].length>0&&!J)try{y=g.call(this,t[1])}catch(H){J=true}else J=true;if(!J&&y[1].length===0)J=true;if(!J){t=[];for(J=0;J<f.length;J++)Q!=J&&t.push(f[J]);t=c.set(t,g).call(this,y[1]);if(t[0].length>0){A[0]=A[0].concat(t[0]);A[1]=t[1]}}if(A[1].length<E[1].length)E=A;if(E[1].length===0)break}if(E[0].length===0)return E;if(m){try{y=m.call(this,E[1])}catch(aa){throw new a.Exception(E[1]);
}E[1]=y[1]}return E}},forward:function(f,g){return function(m){return f[g].call(this,m)}},replace:function(f,g){return function(m){m=f.call(this,m);return[g,m[1]]}},process:function(f,g){return function(m){m=f.call(this,m);return[g.call(this,m[0]),m[1]]}},min:function(f,g){return function(m){var p=g.call(this,m);if(p[0].length<f)throw new a.Exception(m);return p}}},d=function(f){return function(){var g=null,m=[];if(arguments.length>1)g=Array.prototype.slice.call(arguments);else if(arguments[0]instanceof
Array)g=arguments[0];if(g)for(var p=g.shift();0<p.length;){g.unshift(p[0]);m.push(f.apply(null,g));g.shift();return m}else return f.apply(null,arguments)}},b="optional not ignore cache".split(/\s/),e=0;e<b.length;e++)c[b[e]]=d(c[b[e]]);d=function(f){return function(){return arguments[0]instanceof Array?f.apply(null,arguments[0]):f.apply(null,arguments)}};b="each any all".split(/\s/);for(e=0;e<b.length;e++)c[b[e]]=d(c[b[e]])})();
(function(){var a=function(m){for(var p=[],t=0;t<m.length;t++)if(m[t]instanceof Array)p=p.concat(a(m[t]));else m[t]&&p.push(m[t]);return p};Date.Grammar={};Date.Translator={hour:function(m){return function(){this.hour=Number(m)}},minute:function(m){return function(){this.minute=Number(m)}},second:function(m){return function(){this.second=Number(m)}},meridian:function(m){return function(){this.meridian=m.slice(0,1).toLowerCase()}},timezone:function(m){return function(){var p=m.replace(/[^\d\+\-]/g,
"");if(p.length)this.timezoneOffset=Number(p);else this.timezone=m.toLowerCase()}},day:function(m){var p=m[0];return function(){this.day=Number(p.match(/\d+/)[0])}},month:function(m){return function(){this.month=m.length==3?Date.getMonthNumberFromName(m):Number(m)-1}},year:function(m){return function(){var p=Number(m);this.year=m.length>2?p:p+(p+2E3<Date.CultureInfo.twoDigitYearMax?2E3:1900)}},rday:function(m){return function(){switch(m){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(m){m=m instanceof Array?m:[m];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<m.length;p++)m[p]&&m[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.");m=new Date(this.year,this.month,
this.day,this.hour,this.minute,this.second);if(this.timezone)m.set({timezone:this.timezone});else this.timezoneOffset&&m.set({timezoneOffset:this.timezoneOffset});return m},finish:function(m){m=m instanceof Array?a(m):[m];if(m.length===0)return null;for(var p=0;p<m.length;p++)typeof m[p]=="function"&&m[p].call(this);if(this.now)return new Date;m=Date.today();if(this.days!=null||this.orient||this.operator){var t,y;y=this.orient=="past"||this.operator=="subtract"?-1:1;if(this.weekday){this.unit="day";
p=Date.getDayNumberFromName(this.weekday)-m.getDay();t=7;this.days=p?(p+y*t)%t:y*t}if(this.month){this.unit="month";p=this.month-m.getMon
