(function(){eval(liligo.namespace);var A=liligo.SiteunderUtils=new Singleton({openPopup:function(E,F,C){if(!F){F=640}if(!C){C=510}var D=window.open(E,"liligo_siteunder","location=no,status=no,scrollbars=no,resizeable=no,width="+F+",height="+C);D.blur();window.focus()},track:function(C){if(document.cookie.match(/_livedebug_=1/)){alert(C)}},Cookie:{save:function(E,F,I,G){if(I){var D=new Date();D.setTime(D.getTime()+(I*24*60*60*1000));var C="; expires="+D.toGMTString()}else{var C=""}var H=window.location.hostname.match(/liligo.*/);H="domain=."+(H&&H.length?H[0]:"liligo.fr");document.cookie=arguments[0]+"="+F+C+";path="+(G?G:"/")+";"+H},load:function(D){var F=D+"=";var C=document.cookie.split(";");for(var E=0;E<C.length;E++){var G=C[E];while(G.charAt(0)==" "){G=G.substring(1,G.length)}if(G.indexOf(F)==0){return G.substring(F.length,G.length)}}return null},destroy:function(C){liligo.SiteunderUtils.Cookie.save(C,"",-1)}}});var B=(A.Cookie.load("split16_hpsiteunder_carhotel")=="B");new Application({init:function(){setTimeout(bind(function(){if(!B){if(liligo.hp&&$("air-submit")){Event.observe(liligo.hp.apps.air._form,"doSubmit",function(){A.track("/siteunderTest/A/Flight/SearchLaunched")})}if(liligo.air){A.track("/siteunderTest/A/Flight/PageLoaded");Event.observe(liligo.air.app,"opendeeplink",function(){A.track("/siteunderTest/A/Flight/LeadClick")})}return }if(liligo.hp&&$("air-submit")){Event.observe($("suopener"),"click",bindAsEventListener(this.openHpPopup,this));Event.observe(liligo.hp.apps.air._form,"doSubmit",bindAsEventListener(this.openHpPopup,this));Event.observe(liligo.hp.apps.air._form,"doSubmit",function(){A.track("/siteunderTest/B/Flight/SearchLaunched")})}if(liligo.air){A.track("/siteunderTest/B/Flight/PageLoaded");Event.observe(liligo.air.app,"opendeeplink",function(){A.track("/siteunderTest/B/Flight/LeadClick")})}if(liligo.hotel){A.Cookie.save("hpsiteunder_beentohotel",1)}if(liligo.car){A.Cookie.save("hpsiteunder_beentocar",1)}},this),1000)},openHpPopup:function(){var C=$("air-subcategory-oneway").checked;var I=($$("#air-compare input:checked").length>0);var H=(A.Cookie.load("hpsiteunder_hideforgood")=="1");var F=(A.Cookie.load("hpsiteunder_shownonce")=="1");var G=(A.Cookie.load("hpsiteunder_beentocar")=="1");var E=(A.Cookie.load("hpsiteunder_beentohotel")=="1");this.log("oneWay:",C,"hiddenForGood:",H,"compareSiteActive:",I,"alreadyShowedInSession:",F);if(H||I||F||C){return }var D;if(!G&&E){D="car"}if(G&&!E){D="hotel"}if(!G&&!E){D="both"}if(!D){return }var J="Hotel+Car";if(D=="car"){J="Car"}else{if(D=="hotel"){J="Hotel"}}A.track("/siteunderTest/B/SiteUnder/Called/"+J);var K=function(L){return escape($(L).value)};A.openPopup("/siteunder/hotelcar/?type="+D+"&tracker="+J+"&to="+K("air-to")+"&toCode="+K("air-toCode")+"&out-date="+K("air-out-date")+"&out-date-year="+K("air-out-date-year")+"&out-date-month="+K("air-out-date-month")+"&out-date-day="+K("air-out-date-day")+"&ret-date="+K("air-ret-date")+"&ret-date-year="+K("air-ret-date-year")+"&ret-date-month="+K("air-ret-date-month")+"&ret-date-day="+K("air-ret-date-day"));A.Cookie.save("hpsiteunder_shownonce",1)},log:function(C){if(this.debug&&window.console&&window.console.log){console.log.call(this,arguments)}}})})()
