(function(){eval(liligo.namespace);var D=new Singleton(Observable,{init:function(){window.onbeforeunload=nullFunc;preload(["/hometop/img/hptob-box.png","/hometop/img/hu/hptop-submit.png","/hometop/img/hu/hptop-logo.png","/homepage_light/img/hptop-bubble.png"]);preload("/logsession.jsp?r="+Math.random());__Eo(document,"DOMContentLoaded",bind(this.start,this))},start:function(){this._fireEvent("start");__Eo("hptop-header-link","click",__EbS(this.reset,this));__Eo("hp-function-favorite","click",__EbS(this.addFavorite,this));preload("/homepage/img/widg-conf-error.png")},reset:function(){this._fireEvent("reset")},addFavorite:function(){var L=location.href,M=$$("title")[0].innerHTML,K=labels.homepage_top_footer_favorite_usehotkey;if(window.sidebar){K?alert(K):sidebar.addPanel(M,L,"")}else{if(window.external){external.AddFavorite(L,M)}}}});var I=new Class({submit:function(){I._fireEvent("submit",this)}},{init:function(){Observable.makeIt(this)}});var F=new Class(I,{constructor:function(K){this.form=Element("form",{action:K.action,method:K.method});Style.hide(this.form);DOM.add(this.form)},add:function(L,M){if(typeof L=="object"){return forEach(L,function(O,N){this.add(N,O)},this)}var K=Element("input",{type:"hidden",name:L,value:M});this.form.appendChild(K)},copy:function(L,K){if(typeof L=="object"){return forEach(L,function(N,M){this.copy(M,N)},this)}this.add(K,$(L).value)},submit:function(){this._base_submit();this.form.submit()}});var B=new Abstract({name:null,checkForm:null,submit:null,reset:null,init:function(){__Eo(D,"start",bind(this.initialize,this));__Eo(D,"reset",bind(this.reset,this))},initialize:function(){this.box=$("box-"+this.name);if(!this.box){return false}this.form=$("hptop-"+this.name+"-form");__Eo(this.form,"submit",__EbS(this.onSubmit,this));var K;if(safari&&(K=$(this.name+"-submit"))){this._fixSafariSubmit(K)}this.initialized=true},_submitted:false,onSubmit:function(K){if(this._submitted){return }if(this.checkForm()){this._submitted=true;Style.addClass(this.name+"-submit","loading");this.submit()}},_fixSafariSubmit:function(K){extend(K,{src:"/img/spacer.gif",type:"image",value:" "})},setError:function(N,K,O){if(!O&&(typeof N=="object")&&(N.constructor==[].constructor)){var L=false;forEach(N,function(P){if(this.setError(P,K,true)){L=true}},this);return L}Style.setClassIf(K,N,"error");Style.setClassIf(K,this.box,"error");if(K){$(this.name+"-error").innerHTML=labels[K];try{$(N).focus()}catch(M){}}return !!K}});var J=new Class(liligo.DatePicker,{filter:true,withNote:true,constructor:function(K){this._base_constructor(K);this.withNote=K.withNote||this.withNote;if(!J.initialized){J.initialize()}this._defaultValue=this.value.getTime();__Eo(this,"set",bind(this._onSet,this))},open:function(){if(this._disabled){return }Style.setClassIf(this.withNote,this,"dpWithNote");this._base_open()},enable:function(K){K=K!==false;this._disabled=!K;Style.setClassIf(!K,this.elem.parentNode,"disabled");if(!IE){this.elem.disabled=!K}this.opener.style.cursor=K?"":"default"},disable:function(){this.enable(false)},reset:function(){this.set(this._defaultValue)},_availables:[],setAvailables:function(K){this._availables=K;this.filter={};forEach(K,function(L){L=new Date(L);L.setHours(0);this.filter[1*L]=true},this);this.setAvailableAfter(this.value)},setAvailableAfter:function(L){if(typeof L=="object"){L=L.getTime()}var M=this._availables;for(var K=0;K<M.length;K++){if(M[K]>=L){this.set(M[K]);this.dispatchValue();return }}},_onSet:function(K){if(this.direction!=J.DIR_DEP){return }if(this.retPicker!=undefined){return }if((!this.oneWayRadio)||this.oneWayRadio.checked){return }this.retPicker.setAvailableAfter(DateTools.addDays(actual.value,this.preReturnDays))}},{init:function(){for(var K in liligo.DatePicker){var L=liligo.DatePicker[K];if(typeof L=="number"){this[K]=L}}},initialize:function(){this.initialized=true;Style.addRules(".dpNote{display:none}");liligo.DatePicker.div.appendChild(Element("div",{className:"dpNote",innerHTML:labels.datepicker_info_filter.replace("PREVIEW",'<img src="/homepage_light/img/datepicker-preview.png" height="14" widht="18" />')}))}});var C=new Class(Observable,{constructor:function(K){this.select=K=$(K);__Eo(K,"change",__Eb(this._fireChange,this))},setValue:function(K){this.select.value=K;this._fireChange()},_fireChange:function(K){this._fireEvent("change",K,this.select.value)},enable:function(K){K=K!==false;this.select.disabled=!K;Style.setClassIf(!K,this.select,"disabled")},disable:function(){this.enable(false)},push:function(){ArrayGen.optionsPush.apply(this.select.options,arguments)},clear:function(){this.select.options.length=0},fill:function(K){if(typeof K=="string"){K=JSON.decode(K)}forEach(K,function(L){this.push(L.label,L.value)},this)},focus:function(){this.select.focus()},setLoading:function(K){Style.setClassIf(K,this.select.parentNode,"loading")}});new Singleton(B,{name:"flight",Select:Class(C,{disable:function(){this._base_disable();this.select.value="0"}}),initialize:function(){window.flight=this;this._base_initialize();this.initSelects();this.fromDate=new J({direction:J.DIR_DEP,field:"flight-from-date",oneWayRadio:"flight-roundtrip-oneway"});this.toDate=new J({direction:J.DIR_RET,field:"flight-to-date",nextFocus:$("flight-submit"),oneWayRadio:"flight-roundtrip-oneway",depPicker:this.fromDate});this.fromDate.retPicker=this.toDate;__Eo(this.toDate,"set",bind(this.onToDateSet,this));this.fromDate.disable();this.toDate.disable();$("flight-roundtrip-roundtrip").checked=true;this.onewayChange();forEach(["oneway","roundtrip"],function(K){K=$("flight-roundtrip-"+K);__Eo(K,"click",bind(this.onewayChange,this));__Eo(K,"change",bind(this.onewayChange,this))},this)},initSelects:function(){var M=this.fromCountry=new this.Select("flight-from-country"),P=this.fromStation=new this.Select("flight-from-station"),O=this.toCountry=new this.Select("flight-to-country"),L=this.toStation=new this.Select("flight-to-station");__Eo(M,"change",bind(this.onDepCountryChange,this));
M.enable();M.select.value=config.fromCountry;__Eo(P,"change",bind(this.onDepStationChange,this));P.enable();P.select.value=config.fromStation;__Eo(O,"change",bind(this.onArrCountryChange,this));O.enable();var K=config.toCountry;O.select.value=K?K:"0";O.focus();__Eo(L,"change",bind(this.onArrStationChange,this));K?L.enable():L.disable();var N=config.toStation;L.select.value=N?N:"0";if(N){this.getDates(true)}},fillSelect:function(K,L,M){M=JSON.decode(M);K.fill(M);K.setLoading(false);K.enable();K.focus();if(M.length==1){K.setValue(M[0].value)}},disable:function(){forEach(arguments,function(K){K=this[K];K.disable();if(K.reset){K.reset()}},this)},onDepCountryChange:function(K,L){this.fromStation.clear();this.fromStation.push(labels.hp_light_top_form_air_select_city,0);this.disable("fromStation","toCountry","toStation","fromDate","toDate");if(this.fromCountry.select.value=="0"){return }this.fromStation.setLoading(true);new AjaxRequest("/homepage_light/data/depStations.jsp",{parameters:{country:L},onSuccess:bind(this.fillSelect,this,this.fromStation)})},onDepStationChange:function(K,L){this.toCountry.clear();this.toCountry.push(labels.hp_light_top_form_air_select_country,0);this.disable("toCountry","toStation","fromDate","toDate");if(this.fromStation.select.value=="0"){return }new AjaxRequest("/homepage_light/data/arrCountries.jsp",{parameters:{depStation:L},onSuccess:bind(this.fillSelect,this,this.toCountry)})},onArrCountryChange:function(K,L){this.toStation.clear();this.toStation.push(labels.hp_light_top_form_air_select_city,0);this.disable("toStation","fromDate","toDate");if(this.toCountry.select.value=="0"){return }this.toStation.setLoading(true);new AjaxRequest("/homepage_light/data/arrStations.jsp",{parameters:{depStation:this.fromStation.select.value,arrCountry:L},onSuccess:bind(this.fillSelect,this,this.toStation)})},onArrStationChange:function(K,L){if(L=="0"){this.disable("fromDate","toDate");return }this.getDates()},getDates:function(K){new AjaxRequest("/homepage_light/data/dates.jsp",{parameters:{depStation:this.fromStation.select.value,arrStation:this.toStation.select.value},onSuccess:bind(this.onDates,this,K)})},onDates:function(M,K,L){L=JSON.decode(L);this.fromDate.setAvailables(L.out);this.fromDate.enable();this.toDate.setAvailables(L.ret);this.toDate.enable();if(!M){$("flight-from-date").focus()}},reset:function(){$("flight-adults").value=1;$("flight-children").value=$("flight-infants").value=0;$("flight-roundtrip-roundtrip").checked=true},onToDateSet:function(){$("flight-roundtrip-roundtrip").checked=true;this.onewayChange()},onewayChange:function(){var K=$("flight-roundtrip-oneway").checked;Style.setClassIf(K,this.form,"oneway");if(K){$("flight-to-date").value=labels.homepage_top_form_air_roundtrip_oneway;this.fromDate.nextFocus=$("flight-submit")}else{this.toDate.saveToFields();this.fromDate.nextFocus=$("flight-to-date")}},checkForm:function(){if($("flight-from-country").value=="0"){this.setError("flight-from-country","homepage_top_form_air_alert_departure");return false}this.setError("flight-from-country","");if($("flight-from-station").value=="0"){this.setError("flight-from-station","homepage_top_form_air_alert_departure");return false}this.setError("flight-from-station","");if($("flight-to-station").value==0){this.setError("flight-to-station","homepage_top_form_air_alert_destination");return false}this.setError("flight-to-station","");return true},submit:function(){var K=$("hptop-flight-form");K=new F(K);K.copy({"flight-from-station":"fromLocationCode","flight-to-station":"toLocationCode","flight-from-date-day":"depDay","flight-from-date-month":"depMonth","flight-from-date-year":"depYear","flight-to-date-day":"retDay","flight-to-date-month":"retMonth","flight-to-date-year":"retYear","flight-adults":"adults","flight-children":"children","flight-infants":"infants"});K.add({ifSubmitButton:"ifSubmitButton",newSearch:"true",roundTrip:$("flight-roundtrip-roundtrip").checked?"roundTrip":"oneWay","class":"EC",rtime:"anytime",dtime:"anytime",includeNearbyAirports:"on"});K.submit()}});Singleton({init:function(){__Eo(D,"start",bind(this.track,this))},track:function(){window.dierr=function(){return true};window.tiSiteID=511;window.tiComplement="";var K=document.location.href.toString().indexOf("/")==5;addScript((K?"http":"https")+"://go.atraxio.com/decisiveinsight/trjs.asp")}});var H=new Singleton({init:function(){__Eo(D,"start",bind(this.initialize,this))},initialize:function(){__Eo(I,"submit",bind(this._trackSubmit,this));__Eo("hptop-boxes","click",bind(this._trackFirstAction,this));__Eo("hptop-boxes","change",bind(this._trackFirstAction,this))},_trackFirstAction:function(){if(this._firstActionTracked){return }this._firstActionTracked=true;urchinTracker("/SearchForm/Flight/Homepage/Action")},_trackSubmit:function(){urchinTracker("/SubmitButton/Flight/Homepage/Action/FormSubmitted")}});window.hpPopup=Abstract({name:null,submit:null,opener:false,noForm:false,initialize:function(){if(this.initialized){return }this.initialized=true;if(this.opener){__Eo(this.opener,"click",__EbS(this.show,this))}if(!this.noForm){Event.observe("hp-"+this.name+"-form","submit",this.bindedSubmit=Event.bindStop(this.submit,this))}__Eo("hp-"+this.name+"-close","click",__EbS(this.close,this))},hashOpen:function(){var K=document.location.hash;if(K&&K.indexOf(this.name)!=-1){this.show()}},show:function(){if(!this.initialized){this.initialize()}if(!this.noFade){hpPopupTools.setPosition("hp-"+this.name);hpPopupTools.fadeScreen(true)}Style.show("hp-"+this.name)},close:function(){Style.hide("hp-"+this.name);if(!this.noFade){hpPopupTools.fadeScreen(false)}},setError:function(L,K,M){L=$(L);if(M){L=L.parentNode}if(K===null){Style.removeClass(L,"error");Style.removeClass(L,"valid")}else{Style.setClassIf(K,L,"error");Style.setClassIf(!K,L,"valid")}return K}});window.hpPopupTools=Singleton({tabChain:Class({constructor:function(){var O=this.observers=this.observers||[],L=arguments,N,M=Event;if(L.length==1&&typeof L[0]=="object"&&L[0].length){L=L[0]
}this.list=L;for(var K=0;K<L.length-1;K++){N=function(Q,P){if(Q.keyCode==M.KEY_TAB){try{if(Q.shiftKey){if(P){$(L[P-1]).focus()}}else{$(L[P+1]).focus()}}catch(R){}M.stop(Q)}};N=M.bind(N,0,K);O.push(new M.Observer(L[K],"keydown",N))}},remove:function(){var L=this.observers,K;while(K=L.shift()){K.stop()}delete this.list}}),Shadow:Class({constructor:function(L,N){N=N||{};this.params={offsetX:4,offsetY:4,opacity:0.25,color:"#9d9d9d",zIndex:55,img:"/myliligo/popups/common/img/shadow-gray-alpha.png"};if((N.color=="#c9db58")&&!N.img){N.img="/myliligo/popups/common/img/shadow-green-alpha.png"}N=extend(this.params,N);var M=Geometry.dimension(this.elem=L=$(L)),O=Geometry.position(L),K=[];Style.hide(this.div=Element("div"));document.body.insertBefore(this.div,document.body.firstChild);Style.set(this.div,{opacity:N.opacity,zIndex:N.zIndex});(this.inner=Element("div")).style.position="relative";this.div.appendChild(this.inner);if(M[0]>20){K.push('<div style="height:20px;width:',M[0]-20,"px;position:absolute;background:",N.color,';right:20px;bottom:0"></div>')}if(M[1]>20){K.push('<div style="width:',M[0],"px;height:",M[1]-20,"px;position:absolute;background:",N.color,';bottom:20px;right:0"></div>')}K.push('<div style="width:',Math.min(M[0],20),"px;height:",Math.min(M[0],20),"px;position:absolute;bottom:0;right:0;");if(IE){K.push("filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='",N.img,"', sizingmethod='crop')")}else{K.push("background:url(",N.img,") 100% 100%;")}K.push('"></div>');this.inner.innerHTML=K.join("");Style.set(this.inner,{height:M[1]+"px",width:M[0]+"px"});Style.set(this.div,{position:"absolute",display:"block",left:O[0]+N.offsetX+"px",top:O[1]+N.offsetY+"px"})},remove:function(){this.div.removeChild(this.inner);document.body.removeChild(this.div);delete this.inner;delete this.div;this.remove=nullFunc}}),setPosition:function(N,O,L){N=$(N);if(self.pageYOffset){offset=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){offset=document.documentElement.scrollTop}else{if(document.body){offset=document.body.scrollTop}}}if(L){var K,M=0;if(self.innerHeight){M=self.innerHeight}else{if((K=document.documentElement)&&K.clientHeight){M=K.clientHeight}else{if(document.body){M=document.body.clientHeight}}}O=Math.round((M-Geometry.dimension(N)[1])/2)}else{if(O==undefined){O=100}}N.style.top=offset+O+"px"},getViewportY:function(){var K;if(self.innerHeight){return[window.pageYOffset,window.pageYOffset+self.innerHeight]}else{if((K=document.documentElement)&&K.clientHeight){return[K.scrollTop,K.scrollTop+K.clientHeight]}else{if(document.body){return[document.body.scrollTop,document.body.scrollTop+document.body.clientHeight]}}}},fadeScreen:function(M,N){var P={opacity:0.8,zIndex:40,color:"#abc600",minHeight:0};extend(P,N||{});if(!this.fader){this.fader=Element("div");Style.set(this.fader,{position:"absolute",top:0,left:0,overflow:"hidden",display:"none"});document.body.insertBefore(this.fader,document.body.firstChild)}if(M){var O,K,L=0;if(self.innerHeight){L=self.innerHeight}else{if((K=document.documentElement)&&K.clientHeight){L=K.clientHeight}else{if(document.body){L=document.body.clientHeight}}}var Q=document.body.style.height;document.body.style.height="auto";if(document.body&&(document.body.scrollWidth||document.body.scrollHeight)){O=[document.body.scrollWidth+"px",Math.max(document.body.scrollHeight,P.minHeight,L)+"px"]}else{if(document.body.offsetWidth){O=[document.body.offsetWidth+"px",Math.max(document.body.offsetHeight,P.minHeight,L)+"px"]}else{O=["100%","100%"]}}document.body.style.height=Q;J&&J.actual&&J.actual.close();Style.set(this.fader,{opacity:P.opacity,zIndex:P.zIndex,backgroundColor:P.color,width:O[0],height:O[1]});if(IE){forEach($$("select"),function(R){R.style.visibility="hidden"})}Style.show(this.fader)}else{Style.hide(this.fader);if(IE){forEach($$("select"),function(R){R.style.visibility="visible"})}}}});var E={emailRE:/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/};var G=Singleton(hpPopup,{name:"recommend",opener:"hp-function-recommend",initialize:function(){if(this.initialized){return }__Eo("hp-recommend-submit","click",bind(this.submit,this));__Eo("hp-recommend-cancel","click",bind(this.close,this));__Eo("hp-recommend-sent-close","click",__EbS(this.close,this));var K=$("hp-recommend-mail-popup-opener");if(K){__Eo(K,"mouseover",bind(this.manageMailPopup,this,true));__Eo(K,"mouseout",bind(this.manageMailPopup,this,false))}new hpPopupTools.tabChain("hp-recommend-mail-1","hp-recommend-mail-2","hp-recommend-mail-3","hp-recommend-mail-4","hp-recommend-name","hp-recommend-your-mail","hp-recommend-cancel","hp-recommend-submit","hp-recommend-mail-1");this._base_initialize();setTimeout(bind(this.hashOpen,this),500)},manageMailPopup:function(L){var K=$("hp-recommend-mail-popup");Style.showIf(L,K);if(L){if(liligo.getLang()=="hu"){K.style.marginLeft=(Geometry.position("hp-recommend-mail-popup-opener")[0]-146)+"px"}else{K.style.marginLeft=(Geometry.position("hp-recommend-mail-popup-opener")[0]-182)+"px"}}},submit:function(){var L={},O=[],N,S,R=false,P;for(var M=1;M<5;M++){S=$("hp-recommend-mail-"+M);this.setError(S,false);if(N=S.value){if(!E.emailRE.test(N)){if(!P){P=S}this.setError(S,R=true);$("hp-recommend-error").innerHTML="<span>"+labels.recommend_email_alert+"</span>"}else{O.push(N)}}}if(R){Style.addClass("hp-recommend-form","error");P.focus();P.select();return }if(!O.length){$("hp-recommend-error").innerHTML="<span>"+labels.recommend_email_alert_2+"</span>";this.setError("hp-recommend-mail-1",true);Style.addClass("hp-recommend-form","error");return }forEach(O,function(T,U){L["mail_"+(U+1)]=T});S=$("hp-recommend-name");var K=S.value;if(!K){$("hp-recommend-error").innerHTML="<span>"+labels.recommend_name_alert+"</span>";this.setError(S,true);Style.addClass("hp-recommend-form","error");S.focus();S.select();return }L["u-name"]=K;this.setError(S,false);S=$("hp-recommend-your-mail");N=S.value;if(!E.emailRE.test(N)){$("hp-recommend-error").innerHTML="<span>"+labels.recommend_email_alert_3+"</span>";
this.setError(S,true);Style.addClass("hp-recommend-form","error");S.focus();S.select();return }L["u-email"]=N;this.setError(S,false);Style.removeClass("hp-recommend-form","error");new AjaxRequest("/air/recommendliligo_submit.jsp",{parameters:L});var Q=[];forEach(O,function(T){Q.push("<li>",escapeHTML(T),"</li>")});$("hp-recommend-sent-list").innerHTML=Q.join("");Style.hide("hp-recommend-form");Style.show("hp-recommend-sent")},show:function(){if(!this.initialized){this.initialize()}$("hp-recommend-mail-1").value=$("hp-recommend-mail-2").value=$("hp-recommend-mail-3").value=$("hp-recommend-mail-4").value=$("hp-recommend-name").value=$("hp-recommend-your-mail").value="";var K=window.hp&&hp.profile&&hp.profile.user;if(K&&K.registered){if(K.nick){$("hp-recommend-name").value=K.nick}if(K.email){$("hp-recommend-your-mail").value=K.email}}this.setError("hp-recommend-mail-1",false);this.setError("hp-recommend-mail-2",false);this.setError("hp-recommend-mail-3",false);this.setError("hp-recommend-mail-4",false);this.setError("hp-recommend-name",false);this.setError("hp-recommend-your-mail",false);Style.removeClass("hp-recommend-form","error");Style.show("hp-recommend-form");Style.hide("hp-recommend-sent");this._base_show();$("hp-recommend-mail-1").focus();var N=$("hp-recommend-mail-popup"),L=$("hp-recommend-mail-popup-opener"),M=$("hp-recommend-mail-popup-hand");if(L){M.style.backgroundPosition=L.offsetLeft+L.offsetWidth/2-52+"px 100%";N.style.top=L.offsetTop+14+(IE?27:0)+"px"}}});new Singleton(G,{template:(new VTemplate("/myliligo/popups/recommend/template.vm",function(M){var N=new liligo.__VT_StringCat(),K="function",L=0;if(M.velocityCount){L=M.velocityCount}N.push('<div id="hp-recommend" style="display:none">	<div class="hp-popup">		<div class="hp-popup-body">			<div class="hp-popup-header">				<div class="corner"></div>				<div class="header">					<div id="hp-recommend-close" class="hp-popup-close">&times;</div>					<h2 class="title"><span>');N.push(M.labels.homepage_popups_recommend_title);N.push('</span></h2>				</div>			</div>			<div class="hp-popup-content">				<div class="hp-popup-shadow"><span></span></div>				<form action="');N.push('#" method="post" id="hp-recommend-form">					<h3>');N.push(M.labels.homepage_popups_recommend_formtitle);N.push('</h3>					<p class="hp-recommend-text">');N.push(M.labels.homepage_popups_recommend_formtext);N.push('</p>					<div class="hp-recommend-form-fields">						<div class="dots"></div>						<p class="hp-mandatory">* ');N.push(M.labels.homepage_popups_recommend_mandatory);N.push('</p>						<p class="error" id="hp-recommend-error"><span></span></p>						<label class="hp-recommend-email-friends" for="hp-recommend-mail-1">');N.push(M.labels.homepage_popups_recommend_friends);N.push('</label>						<div class="hp-recommend-group">							<div class="hp-recommend-email-1">								<label for="hp-recommend-mail-1">1.<span class="hp-mandatory">*</span></label>								<input class="error" id="hp-recommend-mail-1" type="text" />							</div>							<div class="hp-recommend-email-2">								<label for="hp-recommend-mail-2">2.</label>								<input id="hp-recommend-mail-2" type="text" />							</div>						</div>						<div class="hp-recommend-group">							<div class="hp-recommend-email-3">								<label for="hp-recommend-mail-3">3.</label>								<input id="hp-recommend-mail-3" type="text" />							</div>							<div class="hp-recommend-email-4">								<label for="hp-recommend-mail-4">4.</label>								<input id="hp-recommend-mail-4" type="text" />							</div>						</div>						<div class="line"></div>						<div class="hp-recommend-subgroup">							<div class="hp-recommend-name">								<label for="hp-recommend-name">');N.push(M.labels.homepage_popups_recommend_name);N.push(' <span class="hp-mandatory">*</span></label>								<input id="hp-recommend-name" type="text" />							</div>							<div class="hp-recommend-your-mail">								<label for="hp-recommend-your-mail">');N.push(M.labels.homepage_popups_recommend_email);N.push(' <span class="hp-mandatory">*</span></label>								<input id="hp-recommend-your-mail" type="text" />							</div>								<p><a href="');N.push('#">');N.push(M.labels.homepage_popups_recommend_signin);N.push('</a></p>						</div>						<div class="dots"></div>					</div>					<div class="buttons">						<a id="hp-recommend-cancel" href="javascript:void(0)" class="button-cancel"><span>');N.push(M.labels.homepage_popups_recommend_cancel);N.push('</span></a>						<a id="hp-recommend-submit" href="javascript:void(0)" class="button-submit"><span>');N.push(M.labels.homepage_popups_recommend_submit);N.push('</span></a>					</div>				</form>				<div id="hp-recommend-sent" style="display:none">					<h3>');N.push(M.labels.homepage_popups_recommend_sentlist);N.push('</h3>					<ul id="hp-recommend-sent-list"><li></li></ul>					<p>');N.push(M.labels.homepage_popups_recommend_thanks);N.push('</p>					<p><a id="hp-recommend-sent-close" href="');N.push('#">');N.push(M.labels.homepage_popups_recommend_close);N.push('</a></p>				</div>			</div>		</div>	</div>	<div class="hp-popup-footer">		<div class="hp-popup-footer-right">			<div>&nbsp;</div>		</div>		<div class="hp-popup-footer-left">			<div style="width:435px"></div>		</div>	</div>	');N.push('	<div id="hp-recommend-mail-popup" style="display:none">		<div id="hp-recommend-mail-popup-hand"></div>		<div id="hp-recommend-mail-popup-box">			');N.push(M.labels.homepage_popups_recommend_email_text_dummy);N.push("		</div>	</div></div>");return N.toString()})),init:function(){__Eo(D,"start",bind(this.initialize,this))},initialize:function(){DOM.add("div",{innerHTML:this.template.process()});this._base_initialize()}});var A=new Application({init:function(){this.index=$("directoryIndex");this.content=$("directoryContent");this.local=$("localIndex");this.html=this.content.cloneNode(true);this.keys=this.html.getElementsByTagName("h3");this.locals=$$(".local",this.html);this.content.innerHTML="";this.start()},start:function(){this.hash={};
this.range=[];this.ranges=[];this.keyHeights=[];this.rangeHeight=0;this.groupHeight=parseInt(Style.get(this.content,"minHeight"),10)||324;var M=Element("ul");for(var L=0,K=this.locals.length;L<K;L++){M.appendChild(this.locals[L].cloneNode(true))}this.hash[this.local.innerHTML]=Element("div");this.hash[this.local.innerHTML].appendChild(M);__Eo(this.local,"click",__EbS(this.onclick,this,this.local));forEach($$("ul",this.html),function(N){this.keyHeights.push($$("li",N).length*26+45)},this);this.groupKeys(0);forEach(this.ranges,function(S){var O=(S.length>1)?S[0].innerHTML+"-"+S[S.length-1].innerHTML:S[0].innerHTML;var N=Element("a",{href:"javascript:void(0)",innerHTML:O});__Eo(N,"click",__EbS(this.onclick,this,N));this.index.appendChild(N);this.hash[O]=document.createElement("div");for(var R=0,P=S.length;R<P;R++){var Q=S[R];var T=Q.cloneNode(true);while(Q.nextSibling.nodeType!=1){Q=Q.nextSibling}this.hash[O].appendChild(T);this.hash[O].appendChild(Q.nextSibling)}},this);this.onclick(null,this.local)},groupKeys:function(K){this.rangeHeight+=this.keyHeights[K];this.range.push(this.keys[K]);K++;if(this.keyHeights[K]&&this.rangeHeight+this.keyHeights[K]<this.groupHeight){this.groupKeys(K)}else{this.rangeHeight=0;this.ranges.push(this.range);this.range=[];if(this.keyHeights[K]){this.groupKeys(K)}}},onclick:function(L,K){if(this.lastA==K){return }if(this.lastA){Style.removeClass(this.lastA,"active")}Style.addClass(this.lastA=K,"active");this.content.innerHTML=this.hash[K.innerHTML].innerHTML}});eval(liligo.namespace);new Application({init:function(){var L=liligo.$$("a.hi-ma"),M,N=L.length,K;for(M=0;M<N;M++){K=L[M];K.id=K.id.replace("---","@");if(K.childNodes[0].nodeName=="img"){K.href="mailto:"+(K.id)}else{K.innerHTML=K.innerHTML.replace("---","@");K.href="mailto:"+(K.id||K.innerHTML)}}}});Singleton({init:function(){if(window.hp){__Eo(hp,"start",bind(this.start,this))}else{__Eo(D,"start",bind(this.start,this))}},start:function(){this.opener=$("addthis-button");if(!this.opener){return }this.items=[{"code":"email","name":labels.addthis_email},{"code":"favorites","name":labels.addthis_favorites},{"code":"print","name":labels.addthis_print},{"code":"delicious","name":"Delicious"},{"code":"digg","name":"Digg"},{"code":"google","name":"Google"},{"code":"myspace","name":"MySpace"},{"code":"live","name":"Live"},{"code":"facebook","name":"Facebook"},{"code":"stumbleupon","name":"StumbleUpon"},{"code":"twitter","name":"Twitter"},{"code":"more","name":labels.addthis_more}];this.template=new liligo.VTemplate("/v3/addthis/addthis.vm",function(M){var P=new liligo.__VT_StringCat(),K="function",L=0;if(M.velocityCount){L=M.velocityCount}P.push('	<div id="addthis-popup" style="display:none">		<div id="addthis-head">			<span>');P.push(M.labels.addthis_title);P.push('</span>		</div>		<div id="at_hover">	');for(var O in M.items){var N=M.items[O];if(typeof N==K){continue}L=O;P.push('			<a class="at_item" id="addthis-');P.push(N.code);P.push('" href="');P.push('#">				<span class="at_item_');P.push(N.code);P.push('">');P.push(N.name);P.push("</span>			</a>	")}L=0;P.push('			<div class="cb"></div>		</div>		<div id="addthis-footer">			<a href="http://www.addthis.com/?utm_source=hm&amp;utm_medium=img&amp;utm_content=ATLogo_orig&amp;utm_campaign=AT_main" id="at-logo" target="addthis"></a>		</div>	</div>');return P.toString()});this.wrapper=document.createElement("div");this.wrapper.innerHTML=this.template.process({items:this.items,labels:labels});document.body.appendChild(this.wrapper);this.popup=$("addthis-popup");__Eo(this.popup,"mouseout",bind(this.close,this,this.popup));__Eo(this.popup,"mouseover",bind(this.open,this,this.popup));__Eo(this.opener,"click",bind(this.sendto,this));__Eo(this.opener,"mouseout",bind(this.close,this,this.popup));__Eo(this.opener,"mouseover",bind(this.open,this,this.popup));forEach($$(".at_item","at_hover"),function(K){__Eo(K,"click",bind(this.sendto,this,K.id.replace("addthis-","")))},this);this.seq=1;this.ssid=(new Date().getTime()&268435455).toString(16)+(Math.floor(Math.random()*268435455)).toString(16)},open:function(M){var N=Geometry.position(this.opener);var L=Geometry.dimension(this.popup);var K=Geometry.dimension(document.body);if(N[0]+L[0]<K[0]){this.popup.style.left=N[0]+6+"px"}else{this.popup.style.left=N[0]-103+"px"}this.popup.style.top=N[1]+17+"px";if(this.closeTimer!==null){clearTimeout(this.closeTimer)}Style.show(M)},close:function(L,K){this.closeTimer=setTimeout(bind(function(){Style.hide(L)},this),(K===true?0:700))},sendto:function(K){this.close(this.popup,true);if(K==="favorites"){try{if(BOM.detect("safari")){alert(labels.addthis_favorite_hotkey)}else{if(document.all){window.external.AddFavorite(location.href,document.title)}else{window.sidebar.addPanel(document.title,location.href,"")}}urchinTracker("/HomePage/General/Events/Bookmark/"+K);(new Image()).src=this.genurl(K);return false}catch(L){}}if(K==="print"){window.print();urchinTracker("/HomePage/General/Events/Bookmark/"+K);(new Image()).src=this.genurl(K);return false}if(K==="email"){if(window.hp){hpRecommend.show()}else{G.show()}return false}if(!K||K==="more"){window.open(this.genurl(K,null),"addthis","scrollbars=no,menubar=no,width=625,height=495,resizable=no,toolbar=no,location=no,status=no");urchinTracker("/HomePage/General/Events/Bookmark/more")}else{window.open(this.genurl(K,null),"addthis");urchinTracker("/HomePage/General/Events/Bookmark/"+K)}},trim:function(K){try{K=K.replace(/^[\s\u3000]+|[\s\u3000]+$/g,"");K=encodeURIComponent(K)}catch(L){}return K},genurl:function(L){var K="AT-findworks/-/~/"+this.ssid+"/"+(this.seq++);var M="pub=findworks&s="+L+"&url="+this.trim(location.href)+"&title="+this.trim(document.title)+"&logo=&logobg=&logocolor=&ate="+K+"&adt=1&content=";return"http://www.addthis.com/bookmark.php?v=152&winname=addthis&"+M+"&CXNID=2000001.5215456080540439074NXC"}})})()
