(function(I){var E=[i18n_dictionary.m,i18n_dictionary.t,i18n_dictionary.w,i18n_dictionary.th,i18n_dictionary.f,i18n_dictionary.sa,i18n_dictionary.su],L=[i18n_dictionary.january,i18n_dictionary.february,i18n_dictionary.march,i18n_dictionary.april,i18n_dictionary.may,i18n_dictionary.june,i18n_dictionary.july,i18n_dictionary.august,i18n_dictionary.september,i18n_dictionary.october,i18n_dictionary.november,i18n_dictionary.december],D=[0,10,0,0,0,0,0,0,20,0,20,20],Q=[],G,U,B,T,X,J,O;
I.initCalendar=function(){if(!I("body > div#ixiCalWrapper")[0]){W()}};I.hideCalendar=function(){M()};
I.fn.calendar=function(a){I.initCalendar();B=new Date();J=a.minDate;O=a.maxDate;return I.each(this,function(){G=I(this);
B=R(G.val());C(B.clone());A(B);V()})};function W(){var a=""+'<iframe id="ixiCalFrame" src="about:blank" scrolling="no" frameborder="0" class="calFrame"></iframe>'+'<div id="ixiCalLeft" invoke="redraw">&#171;</div>'+'<div id="ixiCalRight" style="padding-right: 2px;" invoke="redraw">&#187;</div>'+'<div id="ixiCalClose" invoke="close">&#215;</div>'+'<table id="ixiCalTable" cellspacing="0" cellpadding="0" border="0"><tr>'+'<td id="ixiCalOne">'+Z()+"</td>"+'<td id="ixiCalTwo">'+Z()+"</td>"+"</tr></table>",b=I('<div id="ixiCalWrapper"></div>').html(a).appendTo("body");
U=I("#ixiCalTable");b[0].onselectstart=function(){return false};I(document).click(function(c){F(c)});
I("#ixiCalWrapper").click(function(c){H(c)})}function Z(){var a=""+'<table cellspacing="0" cellpadding="0" border="0">'+"<thead>"+'<tr><th class="month" colspan="7">&#160;</th></tr>'+P()+"</thead>"+"<tbody>"+Y()+"</tbody>"+"</table>";
return a}function P(){var a="";I.each(E,function(b,c){a+=["<th"+(b>4?' class="weekend"':"")+">","</th>"].join(c)
});return["<tr>","</tr>"].join(a)}function Y(){var c=[],b,d,a;for(d=0;d<6;d++){b=[];for(a=0;a<7;a++){b[b.length]="<td"+(a>4?' class="weekend"':"")+">&#160;</td>"
}c[c.length]="<tr"+(d==0?' class="firstweek"':d==5?' class="lastweek"':"")+">"+b.join("")+"</tr>"}return c.join("")
}function K(c,e){var f=U.find("td#"+c+" table"),d=e.getMonth()+"-"+e.getFullYear(),b=J.toPaddedDate()+"-"+O.toPaddedDate(),a=Q[d]?Q[d][b]:null;
if(!a){e.setDate(1);a=N(e,new Date(e.getFullYear(),e.getMonth(),(e.getDay()===0?e.getDay()-6:1-e.getDay())));
Q[d]=Q[d]||[];Q[d][b]=a}f.find("thead th.month").html("<span"+(c.indexOf("Two")>0?' style="margin-right:'+D[e.getMonth()]+'px;"':"")+">"+L[e.getMonth()]+" "+e.getFullYear()+"</span>");
f.find("tbody tr").each(function(g,h){I(this).find("td").each(function(i,k){this.innerHTML=a[(g*7)+i]
})})}function N(f,e){var b=[];for(var d=0;d<6;d++){for(var c=0;c<7;c++){var a;e.setDate(e.getDate()+1);
if(f.getMonth()==e.getMonth()){blocked=!e.between(J,O);a=blocked?e.getDate():'<a href="javascript: void(0);" invoke="selectDate" id="'+e.toPaddedDate()+'">'+e.getDate()+"</a>"
}else{a="&#160;"}b[(d*7)+c]=a}}return b}function F(a){if(I("#ixiCalWrapper")[0]&&!I.isChild(a.target,I("#ixiCalWrapper")[0])){M()
}}function H(d){var a=I(d.target),c=a.attr("invoke");if(c=="selectDate"){var f=G.val();var g=a.attr("id");
if(f!==g){var b=f.split("/");Q[(parseInt(b[1],10)-1)+"-"+b[2]]=null;G.val(g).trigger("change")}M()}else{if(c=="close"){M()
}else{if(c=="redraw"){var b=Date.fromPaddedDate(a.attr("date"));b.setDate(1);C(b.clone());A(b)}}}}function M(){I("#ixiCalTable, #ixiCalFrame, #ixiCalClose, #ixiCalLeft, #ixiCalRight").hide()
}function V(){var b=S(G[0]),a=U.width();b.top+=G[0].offsetHeight;U.css({"display":"block","position":"absolute","left":b.left+"px","top":b.top+"px"});
I("#ixiCalFrame").css({"display":"block","position":"absolute","left":b.left+"px","top":b.top+"px","width":U[0].offsetWidth+"px","height":U[0].offsetHeight+"px"});
I("#ixiCalLeft").css({"left":(b.left+7)+"px","top":(b.top+5)+"px"});I("#ixiCalRight").css({"left":(a+b.left-40)+"px","top":(b.top+5)+"px"});
I("#ixiCalClose").css({"display":"block","left":(a+b.left-20)+"px","top":(b.top+5)+"px"})}function S(c){var b=0,a=0;
if(c.offsetParent){b=c.offsetLeft;a=c.offsetTop;while((c=c.offsetParent)){b+=c.offsetLeft;a+=c.offsetTop
}}else{if(c.x){b+=c.x}if(c.y){a+=c.y}}return{left:b,top:a}}function R(b){var a=Date.fromPaddedDate(b);
if(!a||!a.between(J,O)){a=J.clone()}return a}function C(a){a.setDate(1);T=a;X=a.clone();X.setMonth(X.getMonth()+1);
U.find("td.selected").removeClass("selected");K("ixiCalOne",T);K("ixiCalTwo",X);U.find("a#"+B.toPaddedDate().replace(/\//g,"\\/")).parent().addClass("selected")
}function A(d){var b=d.clone(),c=d.clone(),a=d.clone();b.setDate(0);c.setDate(1);c.setMonth(c.getMonth()+1);
a.setMonth(a.getMonth()+2);a.setDate(0);I("#ixiCalLeft").css("display",b.between(J,O)?"block":"none").attr("date",b.toPaddedDate());
I("#ixiCalRight").css("display",c.between(J,O)&&a.between(J,O)?"block":"none").attr("date",c.toPaddedDate())
}})(jQuery);$.namespace("IXIGO.Web");$.namespace("IXIGO.Component");$.namespace("IXIGO.Service");$.namespace("IXIGO.Handler");
Date.fromPaddedDate=function(F){var C=null,D=/^([0123]?\d)\/([01]?\d)\/([2]\d\d\d)$/,B=D.exec(F),E,A,G;
if(B&&B.length>3){E=parseInt(B[1],10);A=parseInt(B[2],10)-1;G=parseInt(B[3],10);C=new Date(G,A,E);E=((E>9)?"":"0")+E;
A=A+1;A=((A>9)?"":"0")+A;if(C&&C.toPaddedDate()!==(E+"/"+A+"/"+G)){C=null}}return C};Date.fromFlatDate=function(F){var C=null,D=/^(\d\d)(\d\d)([2]\d\d\d)$/,B=D.exec(F),E,A,G;
if(B&&B.length>3){E=parseInt(B[1],10);A=parseInt(B[2],10)-1;G=parseInt(B[3],10);C=new Date(G,A,E)}return C
};Date.prototype.toPaddedDate=function(){var B=this.getDate(),A=this.getMonth()+1,C=this.getFullYear();
return((B>9)?"":"0")+B+"/"+((A>9)?"":"0")+A+"/"+C};Date.prototype.toPaddedTime=function(){var B=this.getHours(),A=this.getMinutes();
return((B>9)?"":"0")+B+":"+((A>9)?"":"0")+A};Date.prototype.serialize=function(){var A=function(D,C){while((""+D).length<C){D="0"+D;
return D}};var B=""+this.getFullYear();B+=A(this.getMonth()+1,2);B+=A(this.getDate(),2);B+=A(this.getHours(),2);
B+=A(this.getMinutes(),2);return B};Date.prototype.toDDMMYY=function(){var B=this.getDate(),A=this.getMonth()+1,C=(""+this.getFullYear()).substring(2);
return((B>9)?"":"0")+B+((A>9)?"":"0")+A+C};Date.prototype.toDDMMYYYY=function(){var B=this.getDate(),A=this.getMonth()+1,C=this.getFullYear();
return((B>9)?"":"0")+B+((A>9)?"":"0")+A+C};Date.prototype.between=function(B,A){return(this.after(B)&&this.before(A))||this.sameDay(B)||this.sameDay(A)
};Date.prototype.sameDay=function(A){return(this.getFullYear()==A.getFullYear()&&this.getMonth()==A.getMonth()&&this.getDate()==A.getDate())
};Date.prototype.before=function(A){return(this.getTime()<A.getTime())};Date.prototype.after=function(A){return(this.getTime()>A.getTime())
};Date.prototype.clone=function(){var A=new Date();A.setTime(this.getTime());return A};Date.prototype.daysInMonth=function(){var A=new Date(this);
A.setMonth(A.getMonth()+1);A.setDate(0);return A.getDate()};Date.prototype.getWeekDay=function(){var A=[i18n_dictionary.sunday,i18n_dictionary.monday,i18n_dictionary.tuesday,i18n_dictionary.wednesday,i18n_dictionary.thursday,i18n_dictionary.friday,i18n_dictionary.saturday];
return A[this.getDay()]};Date.prototype.getSmallMonthName=function(){var A=[i18n_dictionary.jan,i18n_dictionary.feb,i18n_dictionary.mar,i18n_dictionary.apr,i18n_dictionary.may,i18n_dictionary.jun,i18n_dictionary.jul,i18n_dictionary.aug,i18n_dictionary.sep,i18n_dictionary.oct,i18n_dictionary.nov,i18n_dictionary.dec];
return A[this.getMonth()]};Date.prototype.toStr=function(){var A=this.toString();return A.substr(0,A.lastIndexOf(":"))
};Date.getDifference=function(B,A){return Math.round((A-B)/86400000)};Range=function(A,B){this.start=A;
this.end=B;this.contains=function(C){return(C>=this.start)&&(C<=this.end)}};String.compare=function(B,A){if(B==A){return 0
}else{if(B>A){return 1}}return -1};String.compareIgnoreCase=function(B,A){if(B){B=B.toLowerCase()}if(A){A=A.toLowerCase()
}return String.compare(B,A)};String.prototype.trim=function(){return(this.replace(/^\s+/,"").replace(/\s+$/,""))
};String.prototype.hashCode=function(){var A=0,B;if(this.length==0){return A}for(i=0;i<this.length;i++){B=this.charCodeAt(i);
A=((A<<5)-A)+B;A=A&A}return A};IXIGO.Service.Ajax=function(){};IXIGO.Service.Ajax.prototype={get:function(B,A,E,C){var D=jQuery.ajax({type:"GET",url:B,dataType:(A||"json"),success:function(G,H,F){if(typeof E==="function"){E.call(this,G)
}},error:function(F,H,G){if(typeof C==="function"){C.call(this,F,H,G)}},beforeSend:function(F){if(F){F.setRequestHeader("Accept","application/json")
}}});return D},getJson:function(A,C,B){this.get(A,"json",C,B)},postJson:function(A,C,E,B){var D=jQuery.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:A,data:IXIGO.JSON.stringify(C),dataType:"json",success:function(G,H,F){if(typeof E==="function"){E.call(this,G)
}},error:function(F,H,G){if(typeof B==="function"){B.call(this,F,H,G)}},beforeSend:function(F){if(F){F.setRequestHeader("Accept","application/json")
}}});return D}};IXIGO.Ajax=new IXIGO.Service.Ajax();IXIGO.Service.Json=function(){};IXIGO.Service.Json.prototype={parse:function(B){try{return jQuery.parseJSON(B)
}catch(C){try{return(new Function("return "+B))()}catch(A){return null}}},stringify:function(F){if(window.JSON&&typeof window.JSON.stringify==="function"){return JSON.stringify(F)
}else{var D,C,B,E,A;switch(typeof F){case"string":return IXIGO.Utils.quote(F);case"number":return isFinite(F)?String(F):"null";
case"boolean":case"null":return String(F);case"object":if(!F){return"null"}A=[];if(Object.prototype.toString.apply(F)==="[object Array]"){E=F.length;
for(D=0;D<E;D+=1){A[D]=IXIGO.JSON.stringify(F[D])||"null"}B=A.length===0?"[]":"["+A.join(",")+"]";return B
}for(C in F){if(Object.hasOwnProperty.call(F,C)){B=IXIGO.JSON.stringify(F[C]);if(B){A.push(IXIGO.Utils.quote(C)+":"+B)
}}}B=A.length===0?"{}":"{"+A.join(",")+"}";return B}}}};IXIGO.JSON=new IXIGO.Service.Json();IXIGO.Vars={escapable:/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,meta:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"}};
IXIGO.Service.Utilities=function(){this.jHidden=$("#ixiDoNotShow")};IXIGO.Service.Utilities.prototype={bookmark:function(){var B=document.title,A=document.URL;
if(window.sidebar){window.sidebar.addPanel(B,A,"")}else{if(window.external){window.external.AddFavorite(A,B)
}else{if(window.opera&&window.print){return true}}}},corners:function(){if($("body").hasClass("ie")){document.execCommand("BackgroundImageCache",false,true);
$(".round_all").corner();$(".round_top").corner("top");$(".round_bottom").corner("bottom");$(".round_top_l").corner("tl");
$(".round_top_r").corner("tr");$(".round_bottom_l").corner("bl");$(".round_bottom_r").corner("br")}},potentialWidth:function(D,C){var B=this.jHidden,A;
B.removeClass().html(D);if(C){B.addClass(C)}A=B.show().outerWidth();B.hide();return A},doPngFixOnBgImg:function(D){if(!D){return 
}var H=navigator.appVersion.split("MSIE"),I=parseFloat(H[1]),C,F,E,A,B,G;if((I>=5.5)&&(I<7)&&(document.body.filters)){B=D.style;
G=D.currentStyle;C="img/x.gif";F="scale";E=G.backgroundImage;A=E.substring(5,E.length-2);if(G.backgroundRepeat=="no-repeat"){F="crop"
}B.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+A+"', sizingMethod='"+F+"')";B.backgroundImage="url("+C+")";
B.backgroundPositionX=G.backgroundPositionX;B.backgroundPositionY=G.backgroundPositionY}},doPngFixOnEl:function(B){if(!B){return 
}var E=navigator.appVersion.split("MSIE"),A=parseFloat(E[1]),F,D,C;if((A>=5.5)&&(A<7)&&(document.body.filters)){C=B.style;
F="img/x.gif";D=B.src;C.width=B.width+"px";C.height=B.height+"px";C.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+D+"', sizingMethod='scale')";
B.src=F}},getStaticPath:function(){var A=$("#jQueryPath").attr("src");if(A&&A.indexOf("http://edge")!=-1){return A.substring(0,A.indexOf(".com")+4)
}return""},getViewportPosition:function(){var C={x:0,y:0},B=document.documentElement,A=document.body;
if(B&&(B.scrollTop||B.scrollLeft)){C.x=B.scrollLeft;C.y=B.scrollTop}else{if(A){C.x=A.scrollLeft;C.y=A.scrollTop
}}return C},getViewportDimensions:function(){var C={w:0,h:0},B=window,A=document.body;if(B.innerWidth){C.w=B.innerWidth;
C.h=B.innerHeight}else{if(A&&A.parentElement&&A.parentElement.clientWidth){C.w=A.parentElement.clientWidth;
C.h=A.parentElement.clientHeight}else{if(A&&A.clientWidth){C.w=A.clientWidth;C.h=A.clientHeight}}}return C
},inlineHelp:function(){jQuery(".inline-help[title]").each(function(){var A=jQuery(this),C=A.val(),B=A.attr("title");
if(!C||C===B){A.val(B).addClass("inactive")}else{A.removeClass("inactive")}A.focus(function(){var D=this.getAttribute("title");
if(this.value===D){this.value=""}jQuery(this).removeClass("inactive")}).blur(function(){var D=this.getAttribute("title");
if(!this.value){this.value=D;jQuery(this).addClass("inactive")}})})},isArray:function(A){return Object.prototype.toString.call(A)==="[object Array]"
},isValidEmail:function(B){var A=/^([a-zA-Z0-9_\.\-])+(\+[a-zA-Z0-9]+)*\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
return A.test(B)},onHoverButton:function(C,B,D){if($(C+"Left").length!=0){var A=($(C+"Left").attr("class").indexOf("hover")===-1)?"-hover":"";
$.each({l:"Left",m:"Middle",r:"Right"},function(E,F){$(C+F).attr("class",[B+"sprite-button"+D,B+"sprite-button-"+E+A].join(" "))
})}},print:function(){window.print()},quote:function(A){var B=IXIGO.Vars.escapable;B.lastIndex=0;return B.test(A)?'"'+A.replace(B,function(C){var D=IXIGO.Vars.meta[C];
return typeof D==="string"?D:"\\u"+("0000"+C.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+A+'"'},getScript:function(B,C){var A=document.createElement("script");
A.type="text/javascript";A.async=true;A.src=B;if(typeof C==="function"){A.onload=A.onreadystatechange=function(){if(!this.readyState||this.readyState==="loaded"||this.readyState==="complete"){C.call()
}}}$("head")[0].appendChild(A)},enableFeedbackWidget:function(){var A=(arguments[0]&&arguments[0].jquery?arguments[0]:$(".ur-feedback"));
A.click(function(){IXIGO.Utils.launchFeedbackWidget(function(){USR.Main.show()});return false}).attr("href","javascript: void(0);").removeAttr("target")
},launchFeedbackWidget:function(A){if(typeof window.USR!=="undefined"&&typeof A==="function"){A.call()
}else{window._usrp={type:"inline",company:"ixigo",mode:"advanced",lang:"en",getVisitorId:function(){return IXIGO.Cookie.read("ixiUID")||""
},getAdditionalParams:function(){return{"Referrer":location.href,"User Agent":navigator.userAgent,"Cookies Enabled":""+navigator.cookieEnabled,"Java Enabled":""+navigator.javaEnabled(),"Search":IXIGO.Cookie.stringifyIxiSearch(),"User Locale":IXIGO.Cookie.read("ixiUsrLocale")}
}};this.getScript("http://dtkm4pd19nw6z.cloudfront.net/js/userrules/677129b2a9b6d29c1a8fd8d8d20d631a/usrFeedback.js",function(){if(typeof A==="function"){A.call()
}})}}};IXIGO.Utils=new IXIGO.Service.Utilities();IXIGO.Service.CookieManager=function(){};IXIGO.Service.CookieManager.prototype={set:function(D,B){var A=new Date(),C;
A.setYear(A.getFullYear()+20);C=D+"="+B+";expires="+A.toGMTString()+";path=/";document.cookie=C},read:function(E){var C=E+"=",B=document.cookie.split(";"),F,D,A;
for(D=0,A=B.length;D<A;D++){F=B[D].trim();if(F.indexOf(C)===0){return F.substring(C.length,F.length).replace(/^"/,"").replace(/"$/,"")
}}return null},remove:function(){var D,B,C,A;for(C=0,A=arguments.length;C<A;C++){D=arguments[C];B=D+"=;expires=Thu, 01-Jan-1970 00:00:01 GMT;path=/";
document.cookie=B}},getCurrency:function(){var C=IXIGO.Cookie.read("ixiUsrLocale"),E,D,B,A;if(!C){return"INR"
}E=C.split(":");for(D=0,B=E.length;D<B;D++){A=E[D].split("=");if(A[0]==="cc"){return A[1]}}return"INR"
},setCurrency:function(C){var D=IXIGO.Cookie.read("ixiUsrLocale"),F,E,B,A;if(!D){return }F=D.split(":");
for(E=0,B=F.length;E<B;E++){A=F[E].split("=");if(A[0]==="cc"){F[E]=[A[0],C].join("=");break}}IXIGO.Cookie.set("ixiUsrLocale",F.join(":"))
},iXiSearch:{name:"ixiSearch",order:["t","fs","hs","ts","bs","ds","fo","ho","to","bo","tf"],names:["tab","flightSearch","hotelSearch","trainSearch","busSearch","dealSearch","flightOta","hotelOta","trainOta","busOta","flightChkBoxOnTrainSearch"]},setIxiSearch:function(C,G){var B=this,F=B.iXiSearch,E=B.read(F.name),A,D=B.findLocInIxiSearch(C);
if(D>-1){A=(E?E.split("."):new Array(F.order.length));A[D]=G.replace(/[\s]+/g,"_").replace(/,/g,"~").split("?")[0];
B.set(F.name,A.join("."))}},readIxiSearch:function(B,D){var A=this,E=A.read(A.iXiSearch.name),C=A.findLocInIxiSearch(B);
return(E&&C>-1?E.split(".")[C].replace(/~/g,",").replace(/_/g," "):D)},findLocInIxiSearch:function(B){var C,A,D=this.iXiSearch.order;
for(C=0,A=D.length;C<A;C++){if(D[C]===B){return C}}return -1},stringifyIxiSearch:function(){var D=this,A=[],F,B,E=D.iXiSearch,G=E.names,C=D.read(E.name);
if(C){C=C.split(".");for(F=0,B=C.length;F<B;F++){if(C[F]){A[A.length]=[G[F],C[F]].join(": ")}}}return A.join(encodeURIComponent("&lt;br /&gt;"))
}};IXIGO.Cookie=new IXIGO.Service.CookieManager();IXIGO.GAQ=(function(A,G){var C=false,B="ixigo.com",E=IXIGO.Cookie.read("ixiUID")||"",F=function(){var H=G.createElement("script"),D=G.getElementsByTagName("script")[0];
H.type="text/javascript";H.async=true;H.src=("https:"==G.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";
D.parentNode.insertBefore(H,D)};return{track:function(D,H){if(!C){F();C=true}A._gaq=A._gaq||[];A._gaq.push(["_setAccount","UA-949229-"+(D||1)]);
if(self.trackerId==1){A._gaq.push(["_setDomainName",B])}A._gaq.push(["_setCustomVar",3,"ixiUID",E,1]);
A._gaq.push(H?["_trackPageview",H]:["_trackPageview"]);A._gaq.push(["_trackPageLoadTime"]);A._gaq.push(["g._setAccount","UA-949229-25"],["g._setDomainName",B],["g._setCustomVar",3,"ixiUID",E,1],(H?["g._trackPageview",H]:["g._trackPageview"]),["_trackPageLoadTime"])
}}})(window,document);IXIGO.Component.ExpandableBox=function(){};IXIGO.Component.ExpandableBox.prototype={register:function(B){var A=IXIGO.ExpandableBox;
$(B+"ColExp").click(function(){A.toggle(B)})},toggle:function(C){var A=IXIGO.ExpandableBox,B=$(C+"ColExp");
$(C+"Content").slideToggle(300);B.toggleClass("sprite-icon-expand").toggleClass("sprite-icon-collapse").attr("title",(B.attr("class").indexOf("sprite-icon-expand")>-1)?"expand":"collapse")
}};IXIGO.ExpandableBox=new IXIGO.Component.ExpandableBox();IXIGO.Component.LightBox=function(){$("#transparent_div").click(function(){IXIGO.LightBox.hide()
})};IXIGO.Component.LightBox.prototype={show:function(C,D){if(!C){return }var A=IXIGO.LightBox;A.current=C;
if(!IXIGO.isAffiliate){var B=IXIGO.Utils.getViewportDimensions();B.h=Math.max(B.h,$(document).height());
$("#transparent_div").css({"width":B.w,"height":B.h}).show()}$("#hotelDistance, #hotelDistanceFrom, #currencyOption, #maxStops, div#ads_openX_hotels_468_60, div#adContainer,select.returnDayTimeSelect, select.leaveDayTimeSelect, select#trainClass").css("visibility","hidden");
$(A.current).fadeIn(200,function(){$(A.current+"_close").show();if($(A.current+"_close_img")[0]&&!$(A.current+"_close_img").attr("src")){$(A.current+"_close_img").attr("src","/img/closebox_orange.png");
IXIGO.Utils.doPngFixOnEl($(A.current+"_close_img")[0])}var G,E;var F=A.current;if($(A.current+"_bl").length>0){G=navigator.appVersion.split("MSIE");
E=parseFloat(G[1]);if((E>=5.5)&&(E<7)&&(document.body.filters)){$(A.current+"_ieshadow").show()}else{$(F+"_bl, "+F+"_br, "+F+"_tl, "+F+"_tr, "+F+"_left, "+F+"_right, "+F+"_top, "+F+"_bottom").show()
}}if(D){D.call(A)}});$(window).bind("keypress",function(E){if(E.keyCode==27){IXIGO.LightBox.hide()}})
},hide:function(D){var A=IXIGO.LightBox;if(A.current){$(A.current).fadeOut(500,function(){$("#hotelDistance, #hotelDistanceFrom, #currencyOption, #maxStops, div#ads_openX_hotels_468_60, div#adContainer,select.returnDayTimeSelect, select.leaveDayTimeSelect, select#trainClass").css("visibility","visible");
$("#map_canvas").html("").hide();if(typeof D==="function"){D.call(A)}});$("#transparent_div").hide()}else{return 
}var B=A.current;if($(A.current+"_bl")[0]){if($(A.current+"_bl").css("display")=="block"){$(B+"_bl, "+B+"_br, "+B+"_tl, "+B+"_tr, "+B+"_left, "+B+"_right, "+B+"_top, "+B+"_bottom").hide()
}else{$(A.current+"_ieshadow").hide()}}$(A.current+"_close").hide();$(window).unbind("keypress")}};IXIGO.LightBox=new IXIGO.Component.LightBox();
IXIGO.Toggle=function(){this.name=null;var A=this;this.init=function(B){this.name=B;$("div#"+B+"QuestionsAll ."+B+"Question").click(function(C){A.toggle(this,C)
})};this.toggle=function(C,B){$($(C.parentNode).children("."+this.name+"Answer")[0]).toggle();B.stopPropagation()
}};IXIGO.Alert=function(){var F,E,A,D,B,C;return{init:function(){if(!$("body > #ixiAlertWrapper")[0]){var G=""+'<div class="ixiAlert info" id="ixiAlertWrapper" tabindex="0">'+'<div class="ixiAlert-img"><table><tr><td valign="middle"><div class="ixiAlert-img-body"></div></td></tr></table></div>'+'<div class="ixiAlert-msg">'+'<table><tr><td><div class="ixiAlert-msg-header">info</div></td></tr></table>'+'<div class="ixiAlert-msg-body"></div>'+'<div class="ixiAlert-btn"><button name="ok">ok</button><button name="cancel">cancel</button></div>'+'</div><div class="clear" />'+"</div>";
$("body").append(G);F=$("#ixiAlertWrapper");E=F.find(".ixiAlert-msg-header");A=F.find(".ixiAlert-msg-body");
D=F.find(".ixiAlert-btn");B=F.find("div.ixiAlert-img td");C=$("#transparent_div")}},show:function(I,J){this.init();
F.attr("class","ixiAlert "+I.type);E.html((I.type==="warn"?"warning":I.type));A.html(I.msg);var G="";
$.each(I.buttons,function(L,K){if(K.name){G+='<button name="'+K.name+'">'+K.val+"</button>"}else{G+='<button name="'+K+'">'+K+"</button>"
}});D.html(G);D.find("button").click(function(){C.hide();F.hide();if(typeof J==="function"){J.call(IXIGO.Alert,this.name)
}});B.css("height","").height(F.height());var H=IXIGO.Utils.getViewportDimensions();H.h=Math.max(H.h,$(document).height());
C.css({"width":H.w,"height":H.h}).show();if($.browser.msie){F.css("width",(I.width||"350px"))}F.css({"left":(H.w-F.width())/2+"px","top":"120px"}).show()
}}}();IXIGO.Handler.OpenAuth=function(){var J=this,A,B=$("#signin"),C=$("#quickLoginBox"),G=$("#quickLoginBoxFrame"),H=$("#loginform .inputBlock"),D=$("#oAuthMessage"),E=$("#oAuthInfoModal"),I=$("#oAuthCallbackModal"),K=$("#oAuthProfileId"),F;
J.init=function(){$(".oauthlogin .sprite-icon").click(function(){J.startThirdPartyLogin(this);A.hide()
});$("#oAuthInfoModal, #oAuthCallbackModal").find(".ixiBox-close").click(function(){J.hideBox($(this).parents(".ixiBox"))
});if(B[0]){A=J.quickLogin();B.click(function(L){A.toggle(L)}).children("a").attr("href","javascript: void(0);");
$(document).click(function(L){A.check(L)})}$("#oAuthEmailConfirm").click(function(){D.hide();document.forms["oAuthAssociateForm"].submit()
}).mouseover(function(L){IXIGO.Utils.onHoverButton("#oAuthEmailConfirm","","")}).mouseout(function(L){IXIGO.Utils.onHoverButton("#oAuthEmailConfirm","","")
});$("#oAuthEmailCheck").click(function(){if($("#emailRegistered").attr("checked")){$("#oAuthUserPasswordContent").show()
}else{$("#oAuthUserPasswordContent").hide()}})};J.quickLogin=function(){$("#qlRedirectTo").val(window.location.href);
return{toggle:function(L){if($.isChild(L.target,C[0],G[0])){return }B.toggleClass("active");C.toggle();
G.css({"height":C.outerHeight(),"width":C.outerWidth()}).toggle();L.stopPropagation()},hide:function(){C.hide();
G.hide();B.removeClass("active")},check:function(L){if(C[0]&&C.is(":visible")&&!$.isChild(L.target,C[0])){this.hide()
}}}};J.startThirdPartyLogin=function(M){var L=$(M).attr("data").split("|");J.open(L[0]);E.find(".ixiBox-body label").html("Waiting for you to login via<br />"+L[1]);
$("#transparent_div").show();var N=IXIGO.Utils.getViewportPosition();E.css("top",N.y+100+"px").show()
};J.open=function(N){var M=IXIGO.Utils.getViewportDimensions(),O=M.w*0.9,L=M.h*0.9,Q=(screen.width/2)-(O/2),P=(screen.height/2)-(L/2);
F=window.open(N,"OAuthLogin","menubar=yes,resizable=yes,scrollbars=yes,"+"width="+O+",height="+L+",left="+Q+",top="+P);
F.focus()};J.close=function(){if(F){F.close()}window.focus()};J.onLoginSuccess=function(){var L=$("#qlRedirectTo").val();
if(L){window.location.href=L}else{window.location.reload()}J.close()};J.onLoginFailure=function(L,M){var N;
if(L==="true"){N="could not connect to rpx server. try again!"}else{if(M==="true"){N="bad request. try again!"
}}if(N){H.html('<div class="error" id="messages"><ul><li>'+N+"</li></ul></div>")}J.hideBox(E);J.close()
};J.onLoginIncomplete=function(L){K.val(L);var M=IXIGO.Utils.getViewportPosition();I.css("top",M.y+100+"px");
$("#transparent_div").show();$.showHide(I,E);$("#oAuthUserEmail").focus();J.close()};J.hideBox=function(L){L.fadeOut(function(){$("#transparent_div").hide()
});D.hide()};J.onPostAssociate=function(M){var L=IXIGO.JSON.parse(M);if(L.exception){D.find("li").html(L.message).end().show()
}else{J.onLoginSuccess()}}};IXIGO.Handler.SearchMenu=function(){var B=this,A=$("#searchBoxPanel");B.init=function(){if(!A.hasClass("search-menu")){return 
}$.each(["flight","hotel","bus","train","deal","more"],function(E,D){$("div#"+D+"-tab-sprite").mouseover(function(){B.tabHover(D)
}).mouseout(function(){B.tabHover(D)})});var C;$("#more-tab-sprite").click(function(D){if($.browser.msie){$("#moreMenuContainer").slideToggle("fast",function(){B.toggleFrameLayover()
})}else{$("#moreMenuContainer").slideFadeToggle(200,function(){B.toggleFrameLayover()})}});$("#moreSearchTab").hover(function(D){clearTimeout(C)
},function(D){C=setTimeout(function(){$("#moreMenuFrame").hide();$("#moreMenuContainer").animate({opacity:"hide",height:"hide"},"slow",function(){B.toggleFrameLayover()
})},50)});$("#moreMenu > ul > li.menu-item").mouseover(function(D){$(this).addClass("menu-item-hover")
}).mouseout(function(){$(this).removeClass("menu-item-hover")})};B.tabHover=function(C){var D=$("div#"+C+"-tab-sprite")[0].className;
if(D.indexOf("hover")===-1){$("div#"+C+"-tab-sprite").attr("class","search-tab-sprite "+C+"-tab "+C+"-tab-hover")
}else{$("div#"+C+"-tab-sprite").attr("class","search-tab-sprite "+C+"-tab "+C+"-tab-inactive")}};B.toggleFrameLayover=function(){if($("#moreMenuContainer:visible")[0]){$("#moreMenuFrame").css({"height":$("#moreMenuContainer").outerHeight(),"width":$("#moreMenuContainer").outerWidth()-3}).show();
if($.isIE6Or7()){$(".jq-rnd-exception").css("position","static")}}else{$("#moreMenuFrame").hide();if($.isIE6Or7()){$(".jq-rnd-exception").css("position","relative")
}}}};IXIGO.Handler.Testimonials=function(){var A=this,B=$("#allTestimonials");tagLineNo=-1;A.init=function(){A.show()
};A.hide=function(){$(B.find(".oneTesti")[tagLineNo]).fadeTo(1000,"0.0",function(){A.show()})};A.show=function(){var C=B.find(".oneTesti");
if(tagLineNo!==-1){$(C[tagLineNo]).hide()}tagLineNo++;if(tagLineNo===C.length){tagLineNo=0}$(C[tagLineNo]).show().fadeTo(1000,"1.0",function(){setTimeout(function(){A.hide()
},5000)})}};IXIGO.Handler.Pos=function(){var C=this,A=false,B=IXIGO.Cookie.read("ixiUsrLocale"),G=$("#countrySelector"),D=$("#countrySelectorBox"),H=$("#countrySelectorBoxFrame"),E=$(".showcase-strip[imgUrl]"),F=document.forms.micrositeConfigs;
C.flag;C.configs;C.init=function(){if(A){return }if(F){C.configs=IXIGO.JSON.parse(F.configData.value);
if(typeof $.preferCulture==="function"){$.preferCulture(F.culture.value)}}if(G[0]){C.flag=C.find(G.find(".country-flag").attr("class"));
G.click(function(){C.toggle()});$(document).click(function(I){C.check(I)});D.click(function(I){C.select(I)
})}A=true};C.toggle=function(){if(!G.hasClass("active")&&!D.find(".country-row")[0]){C.fill()}G.toggleClass("active");
D.toggle();H.css({"height":D.outerHeight(),"width":D.outerWidth()}).toggle()};C.hide=function(){D.add(H).hide();
G.removeClass("active")};C.check=function(I){if(G[0]&&G.is(":visible")&&!$.isChild(I.target,D[0],G[0])){C.hide()
}};C.fill=function(){var I="";C.flag=C.find(G.find(".country-flag").attr("class"));jQuery.each(C.configs,function(K,J){if(K!==C.flag){I+='<div invoke="select" class="country-row"><div class="floatleft country-flag sprite-icon country-'+K+'"></div><div class="floatleft">'+J[0]+'</div><div class="clear" /></div>'
}});D.html(I);D.find(".country-row").hover(function(){$(this).toggleClass("hover")},function(){$(this).toggleClass("hover")
})};C.find=function(I){var K,J;jQuery.each(I.split(" "),function(){J=this.split("-");if(J[1]&&J[0]==="country"&&J[1]!=="flag"){K=J[1];
return false}});return K};C.select=function(K){var J=$(K.target).closest("[invoke]"),L=C.find(J.find(".country-flag").attr("class")),I=$.richArray.has(["IN","GLOBAL"],C.flag.toUpperCase());
G.find(".country-flag").removeClass("country-"+C.flag).addClass("country-"+L).end().find(".link").html(C.configs[L][0]);
C.hide();D.html("");C.flag=L;C.change(I)};C.change=function(K){var L=(K?IXIGO.Cookie.read("ixiUsrLocale")||B:null),O,M,J,I,N=window.location.hostname.split(".");
if(L){O=L.split(":");for(M=0,J=O.length;M<J;M++){I=O[M].split("=");if(I[0]==="cnc"){O[M]=[I[0],C.flag.toUpperCase()].join("=")
}else{if(I[0]==="cc"){O[M]=[I[0],C.configs[C.flag][1]].join("=")}}}if(C.configs[C.flag][3]==="true"){IXIGO.Cookie.set("ixiUsrLocale",O.join(":"))
}}IXIGO.Cookie.remove("ixiSearch");window.location.href="http://"+[N[0],C.configs[C.flag][2]].join(".")+(window.location.port?":"+window.location.port:"")+(C.configs[C.flag][3]==="true"?"?ncr="+C.flag:"")
};C.loadShowCaseStrip=function(K){var I,J=false;if(!E[0]){return }E.hide();$.each(E,function(){I=$(this);
if(I.attr("product")===K){if(I.find("img")[0]){I.fadeIn("slow")}else{C.loadImage(I)}J=true}return !J});
if(!J){C.loadImage($(E[0]));E=$([])}};C.loadImage=function(I,M){var K=new Image(),L,J;K.onload=function(){L='<img style="border: 0 none; height: '+K.height+"px; width: "+K.width+'px;" src='+K.src+' title="'+(I.attr("imgtitle")||"")+'"></img>';
J=I.attr("imghref");if(J){L='<a href="'+J+'">'+L+"</a>"}I.html(L).fadeIn("slow")};K.src=I.attr("imgurl")
}};$(document).ready(function(){var A=IXIGO.Handler,B;IXIGO.Utils.corners();IXIGO.Cookie.remove("homeCookie","otaClick","otaFlightClick","otaHotelClick","otaTrainClick","ixiUserLocale");
IXIGO.Web.handlers={oAuth:new A.OpenAuth(),pos:new A.Pos(),searchMenu:new A.SearchMenu(),testi:new A.Testimonials()};
B=IXIGO.Web.handlers;B.oAuth.init();B.searchMenu.init();B.pos.init();B.testi.init();IXIGO.Utils.inlineHelp();
IXIGO.Utils.enableFeedbackWidget();$("#tellFriend, #recommendFriend").click(function(){var C="/html/info/tell-a-friend.ixi?provider=email&channel=email&id=200811273770";
C+="&link="+encodeURIComponent(location.href);C+="&title="+encodeURIComponent(document.title);window.open(C,"iXiGO","scrollbars=no,menubar=no,width=490,height=520,resizable=no,toolbar=no,location=no,status=no,screenX=200,screenY=100,left=200,top=100");
return false});$("#footerLinks a, #footerAllLinks a").css("text-decoration","none");$("#footerAllLinks a:not(.footerLinkHeader)").css("color","#888").hover(function(){$(this).css("color","#333")
},function(){$(this).css("color","#888")});$(".footerGreyLink").css("text-decoration","none").css("color","#888").hover(function(){$(this).css("color","#333")
},function(){$(this).css("color","#888")})});IXIGO.Handler.Searchbox=function(){var A=this;A.args;A.url="";A.checkbox=[];A.initSuper=function(){A=this;
A.pos=(IXIGO.Web.handlers.pos.flag||"IN").toUpperCase()};A.serialize=function(C){var B=[];$.each((C||A.args),function(E,D){B[B.length]=(E+"="+D)
});if(C){return B.join("&")}else{A.url+=B.join("&")}};A.open=function(B,D){var C=window.open(B,(D||"ota redirect"),"width=1024,height=768,scrollbars=yes,resizable=yes,toolbar=yes,status=yes,location=yes,screenX=200,screenY=100,left=200,top=100");
if(C){C.blur()}}};IXIGO.Handler.OTACheckbox={};IXIGO.Handler.OTACheckbox.Flights=function(){var A=this,E=$("#originCityInput"),C=$("#destCityInput"),B=$("#otaCheckboxes"),D=document.forms.flightRequestForm;
A.init=function(){A.initSuper();A.url="/checkbox/redirect.ixi?";$("#flightCompareAllBox").click(function(){var F=A.checkbox,G;
for(G in F){$("#searchFlight-"+F[G]["c"]).attr("checked",false)}})};A.show=function(I,H){if(!I||!H||I===H||(E.is(":visible")&&(E.hasClass("inactive")||C.hasClass("inactive")))){B.hide();
return }var F=I.lastIndexOf("("),G=H.lastIndexOf("(");if(F>=0){I=I.substr(F+1,3)}if(G>=0){H=H.substr(G+1,3)
}IXIGO.Ajax.getJson("/action/content/checkbox?"+A.serialize({searchFor:"checkboxflights",origin:I,destination:H,pos:A.pos}),function(N){A.checkbox=[];
var K="",L,J,M,Q,O,P;for(L=0,J=N.length;L<J;L++){M=N[L];K+='<div id="otaflight-'+M.c+'" style="float: left; margin-right: 10px;"><input'+(M.ch?' checked="checked"':"")+' type="checkbox" id="searchFlight-'+M.c+'" class="filterAirlineBox" style="margin-right: 3px;" /><label style="display: inline;font-size: 8pt;" for="searchFlight-'+M.c+'">'+M.n+"</label></div>";
A.checkbox[L]=M}K+='<div class="clear"></div>';$("#otaflight").html(K);$("#otaCheckboxes")[A.checkbox.length>0?"show":"hide"]();
Q=IXIGO.Cookie.readIxiSearch("fo");if(Q){O=Q.split("|");for(L in O){P=O[L].split("-");$("#searchFlight-"+P[0]).attr("checked",P[1]==="y")
}}})};A.build=function(P){var O=E.val(),J=C.val(),N,M,F=D.flightDepartCalendar.value,I=D.flightReturnCalendar.value,L=D.adults.value,G=D.children.value,R=D.infants.value,H=D.classType.value,Q=!D.journeyReturn.checked;
if(E.is(":visible")){N=O.substr(O.lastIndexOf("(")+1,3);M=J.substr(J.lastIndexOf("(")+1,3)}else{N=D.originCity.value;
M=D.destCity.value}if(P){var K={product:"flight",origin:N,destination:M,depDate:F,adt:L,chd:G,inf:R,"class":H};
if(!Q){K.retDate=I}return("/redirect/provider?"+A.serialize(K))}else{A.args={type:1,origin:N,destination:M,leave:F.split("/").join(""),adults:L,children:G,infants:R,"class":H};
if(!Q){A.args["return"]=I.split("/").join("")}A.serialize()}};A.redirect=function(){var F=A.checkbox,H=[],J,M,G=false;
for(J in F){if(F.hasOwnProperty(J)){M=A.checkbox[J];H[H.length]=[M.c,($("#searchFlight-"+M.c).is(":checked")?"y":"n")].join("-");
if($("#searchFlight-"+M.c).is(":checked")){if(!G){A.build();G=true}var K=M.n,I=M.c,L;if(I==="ez"){L=A.build(true)+"&id="+I+"&title="+K
}else{L=A.url+"&code="+I}A.open(L,"flight"+K)}}}IXIGO.Cookie.setIxiSearch("fo",H.join("|"))}};IXIGO.Handler.OTACheckbox.Flights.prototype=new IXIGO.Handler.Searchbox();
IXIGO.Handler.OTACheckbox.Hotels=function(){var B=this,A=$("#htl_where"),C=document.forms.hotelRequestForm;
B.init=function(){B.initSuper();B.url="/checkbox/redirect.ixi?";$("#hotelCompareAllBox").click(function(){var D=B.checkbox,E;
for(E in D){$("#searchHotel-"+D[E]["c"]).attr("checked",false)}})};B.show=function(D){if(A.hasClass("inactive")){return 
}IXIGO.Ajax.getJson("/action/content/checkbox?"+B.serialize({searchFor:"checkboxhotels",city:(D||A.val()),pos:B.pos}),function(K){if(!K){return 
}try{B.checkbox=[];var L="",I,H,E,F,J,G;for(I=0,H=K.length;I<H;I++){if($.browser.msie&&I>0&&I%4===0){L+='<div class="clear"></div>'
}E=K[I];L+=""+'<div id="otahotel-'+E.c+'" style="float: left; margin-right: 10px;">'+"<input"+(E.ch?' checked="checked"':"")+' type="checkbox" id="searchHotel-'+E.c+'" class="filterAirlineBox" style="margin-right: 3px;" />'+'<label style="display: inline; font-size: 8pt;" for="searchHotel-'+E.c+'">'+E.n+"</label>"+"</div>";
B.checkbox[I]=E}L+='<div class="clear"></div>';$("#otahotel").html(L);$("#otaHotelCheckboxes")[B.checkbox.length>0?"show":"hide"]();
F=IXIGO.Cookie.readIxiSearch("ho");if(F){J=F.split("|");for(I in J){G=J[I].split("-");$("#searchHotel-"+G[0]).attr("checked",G[1]==="y")
}}}catch(M){}})};B.build=function(){var H=C.htl_where.value,D=C.htl_checkIn.value,G=C.htl_checkOut.value,K=(+C.htl_rooms.value),J,I;
if(D&&G){J=Date.fromPaddedDate(D).getTime();I=Date.fromPaddedDate(G).getTime();D=D.split("/").join("");
G=G.split("/").join("")}else{var F=Date.today(),E=Date.today();E.setDate(E.getDate()+7);F.setDate(F.getDate()+12-F.getDay());
if(F.sameDay(E)||F.before(E)){F.setDate(F.getDate()+7)}D=F.toDDMMYYYY();J=F.getTime();F.setDate(F.getDate()+2);
I=F.getTime();G=F.toDDMMYYYY()}B.args={type:9,city:H,country:H.split(",")[1].trim(),checkin:D,checkout:G,numRooms:K,d1:J,d2:I,adults1:C.htl_adult1.value,children1:C.htl_children1.value,adults2:(K>=2?C.htl_adult2.value:0),children2:(K>=2?C.htl_children2.value:0),adults3:(K>2?C.htl_adult3.value:0),children3:(K>2?C.htl_children3.value:0)};
B.serialize()};B.redirect=function(){var D=B.checkbox,F=[],H,K,E=false;for(H in D){if(D.hasOwnProperty(H)){K=B.checkbox[H];
F[F.length]=[K.c,($("#searchHotel-"+K.c).is(":checked")?"y":"n")].join("-");if($("#searchHotel-"+K.c).is(":checked")){if(!E){B.build();
E=true}var I=K.n,G=K.c,J=B.url+"&code="+G;B.open(J,"hotel"+I)}}}IXIGO.Cookie.setIxiSearch("ho",F.join("|"))
}};IXIGO.Handler.OTACheckbox.Hotels.prototype=new IXIGO.Handler.Searchbox();IXIGO.Handler.CrossSell={};
IXIGO.Handler.CrossSell.Flights=function(){var B=this,E=$("#searchHotel"),C=$("#destCityInput"),F=$("#destCityCombo"),A=document.forms,D=A.flightRequestForm;
B.initSuper();B.redirect=function(){if(!E.is(":checked")){return }var H=C.val(),G=(C.is(":visible")?H.split("-")[0].trim():$("#destCityCombo").find("option:selected").text()+", India"),L=D.flightDepartCalendar.value.split("/").join(""),K=D.flightReturnCalendar.value.split("/").join(""),J,I;
if(L===K){J=Date.fromPaddedDate(D.calendarInput2.value);J.setDate(J.getDate()+1);K=J.toDDMMYYYY()}I="/track?url="+[A.hotelRequestForm.action,G,L,K,"1/0/0/0/0/0"].join("/");
B.open(I,"iXiGO")}};IXIGO.Handler.CrossSell.Flights.prototype=new IXIGO.Handler.Searchbox();IXIGO.Handler.CrossSell.Trains=function(){var B=this,D=$("#searchFlight"),C=document.forms.trainRequestForm,E=IXIGO.JSON.parse($("#trainFlightData").text().trim()),A=(E?E[0].ota.split(","):[]);
B.init=function(){B.initSuper();D.attr("checked",(E&&E[0].checked==="true"))};B.redirect=function(){if(!A[0]){return 
}if(!D.is(":checked")){IXIGO.Cookie.setIxiSearch("tf","n");return }var J=window.ixigo.currentRequest,G=C.calendarInputId1Train.value.split("/").join(""),I,F,K,H;
B.url="/checkbox/redirect.ixi?";B.args={type:1,source:"tc",origin:J.nearestOrgnIATA,destination:J.nearestDstnIATA,leave:G,retDate:G,adults:C.adultsTrain.value,children:C.childrenTrain.value,infants:0,"class":"e"};
B.serialize();for(I=0,F=A.length;I<F;I++){H=A[I];K="flightota"+H;B.open(B.url+"&code="+H,K)}IXIGO.Cookie.setIxiSearch("tf","y")
}};IXIGO.Handler.CrossSell.Trains.prototype=new IXIGO.Handler.Searchbox();$.namespace("IXIGO.Handler");IXIGO.data={baseURL:"http://"+window.location.hostname+(window.location.port?":"+window.location.port:""),flightTripDuration:2,defaultStartDay:5};
IXIGO.MultiSearch=function(){var C=this,E=$("#searchTabContainer"),F=E.find(".searchTabContainerBg"),A=$("#homePageDeals"),D=$("#email4DealsInput"),B={error:$("#dealUserMessage .msg-error"),info:$("#dealUserMessage .msg-info")};
C.COUNTRY_CULTURE=document.forms.micrositeConfigs.culture.value;C.defaultTab="flight";C.avlRequests={hotel:new IXIGO.HotelSearch(),bus:new IXIGO.BusSearch(),flight:new IXIGO.FlightSearch(C.COUNTRY_CULTURE),train:new IXIGO.TrainSearch(),deal:new IXIGO.DealSearch()};
C.currentRequest=null;C.currentTab=null;C.isExpanded=false;C.isSearchPage=true;C.currentFare=0;C.init=function(){var I=["flight","hotel","bus","train","deal","more"],G=this.getResultType(),J=IXIGO.Cookie.readIxiSearch("t"),H;
$("#searchButton").click(function(){C.onSearchClick()});E.click(function(K){C.onClickTab(this,K)});$("#searchButton").mouseover(function(K){IXIGO.Utils.onHoverButton("#productSearchbutton","b-","-bg-2")
}).mouseout(function(K){IXIGO.Utils.onHoverButton("#productSearchbutton","b-","-bg-2")});$("#more-tab-sprite").click(function(K){if($.browser.msie){$("#moreMenuContainer").slideToggle("fast",function(){C.toggleFrameLayover()
})}else{$("#moreMenuContainer").slideFadeToggle(200,function(){C.toggleFrameLayover()})}});$("#moreSearchTab").hover(function(K){clearTimeout(H)
},function(K){H=setTimeout(function(){$("#moreMenuFrame").hide();$("#moreMenuContainer").animate({opacity:"hide",height:"hide"},"slow",function(){C.toggleFrameLayover()
})},50)});$("#moreMenu > ul > li.menu-item").mouseover(function(K){$(this).addClass("menu-item-hover")
}).mouseout(function(){$(this).removeClass("menu-item-hover")});$("#email4DealsButton").hover(function(){IXIGO.Utils.onHoverButton("#email4DealsButton","b-","-bg-2")
},function(){IXIGO.Utils.onHoverButton("#email4DealsButton","b-","-bg-2")}).click(function(){C.subscribeToDeals()
});A.find("span[href]").click(function(){C.redirectCrossSellDeal(this)});C.isSearchPage=(G!==null);C.defaultTab=G||J||C.defaultTab;
C.defaultTab=!$("#flightSearchTab")[0]?"hotel":(!$("#hotelSearchTab")[0]?"flight":C.defaultTab);if(location.pathname.indexOf("search/airline")>=0){C.defaultTab="flight"
}$.each(I,function(L,K){$("#"+K+"-tab-sprite").hover(function(){C.tabHover(K)},function(){C.tabHover(K)
});$("#"+K+"Box, #"+K+"BoxMessage, #"+K+"RecentSearch").hide();if(K!=="more"&&(C.resultType===K||location.pathname.indexOf(K)>=0)){C.defaultTab=K
}});if(C.isSearchPage){$("#searchOpenBtn").click(function(K){K.stopPropagation();C.show()});$("#searchCloseBtn").click(function(K){K.stopPropagation();
C.hide()});C.currentTab=C.defaultTab}else{$("#newFeatures").show();C.selectTab(C.defaultTab)}};C.toggleFrameLayover=function(){if($("#moreMenuContainer:visible")[0]){$("#moreMenuFrame").css({"height":$("#moreMenuContainer").outerHeight(),"width":$("#moreMenuContainer").outerWidth()-3}).show();
if($.isIE6Or7()){$("#homePageDeals .deal-header .icon-deal-tag, #dealTagOverlay").hide();$(".jq-rnd-exception").css("position","static")
}}else{$("#moreMenuFrame").hide();if($.isIE6Or7()){$("#homePageDeals .deal-header .icon-deal-tag, #dealTagOverlay").show();
$(".jq-rnd-exception").css("position","relative")}}};C.subscribeToDeals=function(){var G=D.val(),I=function(){return(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(G))
},H;if(D.hasClass("inactive")||!G){H=i18n_dictionary.enterEmail}else{if(!I()){H=i18n_dictionary.validEmail
}}if(H){B.error.html(H).fadeIn("normal")}else{$("#dealUserInput").add(B.error).hide();IXIGO.Ajax.getJson("/user/action?action=subscribe-to-deals&user="+encodeURIComponent(G),function(){B.info.fadeIn("normal")
})}};C.tabHover=function(H){var G="#"+H,J=$(G+"-tab-sprite"),I=J.attr("class");if(C.currentTab!==H){J.attr("class","search-tab-sprite "+H+"-tab "+H+"-tab-"+((I.indexOf("hover")===-1)?"hover":"inactive"))
}else{if(I.indexOf("tab-active")===-1){J.attr("class","search-tab-sprite "+H+"-tab "+H+"-tab-"+((I.indexOf("hover")===-1)?"hover":"inactive"))
}}};C.getResultType=function(){var H=null;if($.isNamespace("IXIGO.FlightResultPage")||$.isNamespace("IXIGO.Product.Flights.Main")){H="flight"
}else{if($.isNamespace("IXIGO.Product.Hotels.Main")){H="hotel"}else{if($.isNamespace("IXIGO.BusResult")){H="bus"
}else{if($.isNamespace("IXIGO.TrainResult")){H="train"}else{if($.isNamespace("IXIGO.DealResult")){H="deal"
}}}}}if(H){var I=new RegExp("search/result/[^/]*/(.*)"),G=I.exec(window.location);IXIGO.Cookie.setIxiSearch(H.charAt(0)+"s",G[1])
}return H};C.showTab=function(J){var I="#"+J;C.isExpanded=true;C.currentRequest=C.avlRequests[J];C.avlRequests[J].init();
$(I+"Box, "+I+"BoxMessage, "+I+"RecentSearch").show();A.find(".deal-list."+J).show();$(I+"SearchTabLink").attr("class","searchTabTitle selected");
$(I+"-tab-sprite").attr("class","search-tab-sprite "+J+"-tab "+J+"-tab-active");$("#multiSearchBox").css("padding",(J==="bus"?"0 0 5px":"0"));
if(J==="flight"&&(typeof IXIGO.Affiliate==="undefined")){$("#flightHotelBox").css("display","inline")
}else{$("#flightHotelBox").hide()}if(J==="train"&&(typeof IXIGO.Affiliate==="undefined"&&$("#trainFlightData").html()!=="")){$("#trainFlightBox").css("display","inline")
}else{$("#trainFlightBox").hide()}if(J=="deal"){$.showHide("#dealPopular, #dealTagOverlay, #dealEmailContainer","#recentSearchContent");
$("#searchButton").css("margin-right","8px")}else{$("#searchButton").css("margin-right","0px")}var L=J==="bus"?"search buses":"search "+J+"s";
if(J==="flight"){L=i18n_dictionary.searchFlight}else{if(J==="hotel"){L=i18n_dictionary.searchHotel}}$("#productSearchbutton").html(L);
var G=C.avlRequests[J].msgs,K="<ul>";for(var H=0;G[H];H++){K+="<li>"+G[H]+"</li>"}K+="</ul>";$("#statusBox").html(K);
if(J==="hotel"){C.avlRequests[J].checkboxHandler.show()}};C.hideTab=function(H){if(!H){return }var G="#"+H;
$.hideCalendar();$.showHide("#recentSearchContent","#dealPopular, #dealEmailContainer, "+G+"Box, "+G+"BoxMessage, "+G+"RecentSearch");
A.find(".deal-list."+H).hide();$(G+"SearchTabLink").attr("class","searchTabTitle");$(G+"-tab-sprite").attr("class","search-tab-sprite "+H+"-tab "+H+"-tab-inactive")
};C.selectTab=function(G){if(!G||G===C.currentTab){return }IXIGO.Cookie.setIxiSearch("t",G);C.hideTab(C.currentTab);
C.showTab(G);C.currentTab=G;IXIGO.Web.handlers.pos.loadShowCaseStrip(G)};C.setExpanded=function(G){C.isExpanded=G;
if(C.isSearchPage){$("#searchOpenBtn").css("display",(G?"none":"block"));$("#searchCloseBtn").css("display",(G?"block":"none"))
}};C.show=function(){C.setExpanded(true);if(!$.browser.msie){C.showTab(C.currentTab)}F.removeClass("round_all").addClass("round_top");
$.showHide($("#searchBoxBottom"),F.find(".jquery-corner:last"));$("#multiSearchBox").slideDown(300,function(){if($.browser.msie){C.showTab(C.currentTab)
}})};C.hide=function(){C.setExpanded(false);$.hideCalendar();$("#"+C.currentTab+"SearchTabLink").attr("class","searchTabTitle");
$("#"+C.currentTab+"-tab-sprite").attr("class","search-tab-sprite "+C.currentTab+"-tab "+C.currentTab+"-tab-inactive");
$("#multiSearchBox").slideUp(300,function(){F.removeClass("round_top").addClass("round_all");$.showHide(F.find(".jquery-corner:last"),$("#searchBoxBottom"))
})};C.onClickTab=function(J,I){var H="",G=$(I.target).closest("[action]");if(G[0]){if(!(C.isExpanded||G[0].id==="moreSearchTab")){C.show()
}H=G.attr("action").replace(/Search/,"");H=H.lastIndexOf("/")!==-1?H.substring(H.lastIndexOf("/")+1):H;
if(C.avlRequests[H]){C.selectTab(H)}}I.stopPropagation()};C.onSearchClick=function(){var G=C.currentRequest;
G.onSearchClick(function(){if(G.checkboxHandler){G.checkboxHandler.redirect()}if(G.crossSellHandler){G.crossSellHandler.redirect()
}})};C.redirectCrossSellDeal=function(H){var G=window.open(H.getAttribute("href"));if(G){G.blur()}}};
IXIGO.Search=function(){var A;this.form=null;this.url=null;this.checkboxHandler;this.onSearchClick=function(B){A=B;
if(this.validate()){this.constructAndLaunch()}};this.constructAndLaunch=function(){this.constructURL();
if(typeof A==="function"){A.call()}window.location.href=this.url;window.focus()};this.validate=function(){return false
};this.hideErrors=function(){$("#statusBox").fadeOut(500)};this.showErrors=function(D){var C="<UL>";for(var B=0;
D[B];B++){C+="<LI>"+D[B]+"</LI>"}C+="</UL>";$("#statusBox").html(C).fadeIn(500)};this.setWeekDay=function(E){var B=$(E),D=B.siblings(".calWeekDay"),C=Date.fromPaddedDate(B.val());
if(!C){D.html("").fadeOut(200)}else{D.html(C.getWeekDay()).fadeIn(200)}};this.checkReturnDate=function(G,C,E){var H=(G.jquery?G:$(G)),F=(C.jquery?C:$(C)),D=Date.fromPaddedDate(H.val()),B=Date.fromPaddedDate(F.val());
if(D&&(!B||B.before(D))){D.setDate(D.getDate()+IXIGO.data.flightTripDuration+(E=="flight-international"?5:0));
F.val(D.toPaddedDate()).trigger("change");if(E.indexOf("flight")>-1){this.CALENDAR_INPUTS[this.SEARCH_TYPE].to=D.toPaddedDate()
}}else{if(D&&(E==="hotel")&&B.sameDay(D)){D.setDate(D.getDate()+IXIGO.data.flightTripDuration);F.val(D.toPaddedDate()).trigger("change")
}}}};IXIGO.FlightSearch=function(G){var O=this,E=$("#flightJourneyType"),L=E.find("input:radio"),N=$("#flightSearchLocation"),A=$("#returnOption"),J=$("#originCityInput"),D=$("#destCityInput"),K=$("#flightDepartCalendar"),F=$("#flightReturnCalendar"),I=$("#flightHotelBox"),H,C,B=false,M=false;
O.COUNTRY_CULTURE=G;O.data={};O.msgs=[];O.SEARCH_TYPE="domestic";O.CALENDAR_INPUTS;O.multiCityHandler=new IXIGO.FlightSearch.MultiCity(G);
O.checkboxHandler=new IXIGO.Handler.OTACheckbox.Flights();O.crossSellHandler=new IXIGO.Handler.CrossSell.Flights();
O.init=function(){if(B){return }if(O.msgs.length>0){O.showErrors(O.msgs)}else{O.hideErrors()}O.CALENDAR_INPUTS={"domestic":{},"international":{}};
O.form=document.forms.flightRequestForm;L.change(function(){$.hideCalendar();O.onChangeJourneyType()});
$(O.form.adults).focus(function(){$.hideCalendar()}).change(function(){setTimeout(function(){O.setInfants()
},10)});K.click(function(P){P.stopPropagation();O.showCalendar(K)}).focus(function(){O.showCalendar(K);
O.hideErrors()}).keypress(function(P){return P.keyCode!=13}).change(function(){O.CALENDAR_INPUTS[O.SEARCH_TYPE].from=this.value;
O.setWeekDay(this);O.checkReturnDate("#flightDepartCalendar","#flightReturnCalendar","flight-"+O.SEARCH_TYPE)
});F.click(function(P){P.stopPropagation();O.showCalendar(F)}).focus(function(){O.showCalendar(F);O.hideErrors()
}).keypress(function(P){return P.keyCode!=13}).change(function(){O.CALENDAR_INPUTS[O.SEARCH_TYPE].to=this.value;
O.setWeekDay(this)});J.add(D).keypress(function(P){return P.keyCode!=13}).focus(function(){$.hideCalendar();
O.msgs=[]}).autocomplete({source:function(Q,P){if(Q.XHR){Q.XHR.abort()}Q.XHR=IXIGO.Ajax.getJson(IXIGO.data.baseURL+"/action/content/airports?searchFor=airport&value="+Q.term,function(T){var S=[],R;
jQuery.each(T,function(U,V){R=V.split("-");S[S.length]={label:(R[0]+'<br /><div class="smaller">'+R[1].trim()+"</div>"),value:V}
});P(S)})},minLength:3,minWidth:218,callback:function(P){O.checkboxHandler.show(J.val(),D.val())},cache:(O.COUNTRY_CULTURE.split("-")[0].toLowerCase()==="en"?[]:null)});
O.checkboxHandler.init();C=Date.today();C.setFullYear(C.getFullYear()+1);H=C.clone();H.setMonth(H.getMonth()-1);
L[(O.SEARCH_TYPE=="international"?0:1)].checked=true;O.setCalendarInputs();O.fillForm();O.onChangeJourneyType();
K.add(F).trigger("change");B=true};O.fillForm=function(){if(L[1].checked){A.hide()}var U=(IXIGO.FlightResultPage?location.pathname.substring(location.pathname.indexOf("search/result/flight")+"search/result/flight/".length):IXIGO.Cookie.readIxiSearch("fs")),R=O.form;
if(location.pathname.indexOf("-flights")<0&&U){var T=U.split("/"),P=Date.fromFlatDate(T[2]),S=parseInt(T[6]);
J.val(T[0]).removeClass("inactive");D.val(T[1]).removeClass("inactive");IXIGO.Ajax.getJson("/action/content/airports?searchFor=airportCode&value="+T[0],function(V){if(V[0]){R.originCityInput.value=V[0]
}});IXIGO.Ajax.getJson("/action/content/airports?searchFor=airportCode&value="+T[1],function(V){if(V[0]){R.destCityInput.value=V[0]
}});R.adults.value=T[4];R.children.value=T[5];R.classType.value=(T[7]?T[7].substring(0,1):"e");if(S>1){for(var Q=0;
Q<=S;Q++){R.infants.options[Q]=new Option(Q,Q)}}R.infants.value=S;if(!P.before(Date.today())){K.val(P.toPaddedDate());
if(T[3]){L[0].checked=true;F.val(Date.fromFlatDate(T[3]).toPaddedDate())}else{L[1].checked=true;A.hide()
}}O.checkboxHandler.show(J.val(),D.val())}else{if(location.pathname.indexOf("-flights")>-1){O.checkboxHandler.show(J.val(),D.val())
}}};O.setCalendarInputs=function(){var Q=Date.today(),P=Date.today();P.setDate(P.getDate()+7);Q.setDate(Q.getDate()+IXIGO.data.defaultStartDay+(O.SEARCH_TYPE=="international"?7:0)-Q.getDay());
if(Q.sameDay(Date.today())||Q.before(Date.today())||(O.SEARCH_TYPE=="international"&&(Q.sameDay(P)||Q.before(P)))){Q.setDate(Q.getDate()+7)
}K.val(Q.toPaddedDate())};O.setInfants=function(){var R=$(O.form.infants),S=R.val(),P=O.form.adults.value,Q=R.find('option[value="2"]');
if(Q[0]){if(P==1){Q.remove()}}else{if(P>1){R.append('<option value="2">2</option>')}}};O.showCalendar=function(Q){var P=Date.today(),R=P,S=H;
if(Q[0].id==="flightReturnCalendar"){R=Date.fromPaddedDate(K.val());R=R?R:P;S=C}Q.calendar({minDate:R,maxDate:S})
};O.onChangeJourneyType=function(){var P=+L.filter(":checked").val();switch(P){case 0:case 1:M=false;
N.ixiSwitch("nonMultiCity");A[(P===0?"fadeOut":"fadeIn")]("slow");I.show();break;case 2:M=true;N.ixiSwitch("multiCity");
I.hide();O.multiCityHandler.init();break}};O.validate=function(){var Q=false,U=O.form,W=Date.today(),P=Date.fromPaddedDate(K.val()),S=Date.fromPaddedDate(F.val()),Z=J.val(),V=D.val(),Y=Z.substr(Z.lastIndexOf("(")+1,3),X=V.substr(V.lastIndexOf("(")+1,3);
O.msgs=[];if(J.hasClass("inactive")){O.msgs.push(i18n_dictionary.orgCityMsg)}else{if(D.hasClass("inactive")){O.msgs.push(i18n_dictionary.destCityMsg)
}else{if(Y===X){O.msgs.push(i18n_dictionary.orgEqDest)}else{if(!P){O.msgs.push(i18n_dictionary.dateFormat)
}else{if(!P.between(W,H)){O.msgs.push(i18n_dictionary.depDateRange)}else{if(L[0].checked){if(!S){O.msgs.push(i18n_dictionary.dateFormat+"<br/>"+i18n_dictionary.retDateHelp)
}else{if(P&&S.before(P)){O.msgs.push(i18n_dictionary.retDateRange)}else{if(!S.between(W,C)){O.msgs.push(i18n_dictionary.retDateRangeYr)
}}}}}}}}}Q=(O.msgs.length<1);if(D.is(":visible")){if(Q){var T=$.ajax({async:false,type:"GET",url:"/action/content/airports",data:"searchFor=airport&value="+Z,dataType:"json",beforeSend:function(a){a.setRequestHeader("Accept","text/javascript")
}}).responseText,R=$.ajax({async:false,type:"GET",url:"/action/content/airports",data:"searchFor=airport&value="+V,dataType:"json",beforeSend:function(a){a.setRequestHeader("Accept","text/javascript")
}}).responseText;O.checkLocations(IXIGO.JSON.parse(T),IXIGO.JSON.parse(R))}else{O.showErrors(O.msgs)}return false
}else{if(Q){O.hideErrors()}else{O.showErrors(O.msgs)}return Q}};O.checkLocations=function(Q,R){var P=false;
if(Q.length<1||R.length<1){O.msgs=[];O.msgs.push(i18n_dictionary.checkLocation)}P=(O.msgs.length<1);if(P){O.hideErrors();
O.constructAndLaunch()}else{O.showErrors(O.msgs)}};O.constructURL=function(){var U=O.form,V=J.val(),S=D.val(),R=V.substr(V.lastIndexOf("(")+1,3),P=S.substr(S.lastIndexOf("(")+1,3),Q=U.providerId.value,T=[O.form.action,R,P,K.val().split("/").join(""),(L[0].checked?F.val().split("/").join(""):""),U.adults.value,U.children.value,U.infants.value,U.classType.value];
if(Q){T.push(Q)}O.url=T.join("/")}};IXIGO.FlightSearch.prototype=new IXIGO.Search();IXIGO.FlightSearch.MultiCity=function(G){var L=this,I=false,E=$(".mc-row"),A=document.forms.flightRequestForm,C=Date.today(),M=Date.today(),F=[],H=function(){},K=function(O){var N=$(O.target);
N.calendar({minDate:C,maxDate:M})},J=function(N){return(/\([^\)]{3}\)/g.test(N)?N.substr(N.lastIndexOf("(")+1,3):null)
},D=function(Q){var O=$(Q.target),N,P;if(O.hasClass("inactive")){return }P=+O[0].id.split("mcFrom")[1];
N=$("#mcTo"+(P-1));if(N.hasClass("inactive")){return }O.val(N.val())},B=function(Q){var O=$("#mcFrom"+Q),N=$("#mcTo"+Q),P=$("#mcDepart"+Q);
if(O.hasClass("inactive")||N.hasClass("inactive")){return false}return[J(O.val()),J(N.val()),P.val().split("/").join("")].join("-")
};L.init=function(){if(I){return }M.setFullYear(M.getFullYear()+1);E.find(".mc-row-dep").click(function(N){H();
K(N);N.stopPropagation()}).focus(function(N){H();K(N)}).keypress(function(N){return N.keyCode!=13});E.find(".mc-row-loc").keypress(function(N){return N.keyCode!=13
}).focus(function(){$.hideCalendar();F=[]}).autocomplete({source:function(O,N){if(O.XHR){O.XHR.abort()
}O.XHR=IXIGO.Ajax.getJson(IXIGO.data.baseURL+"/action/content/airports?searchFor=airport&value="+O.term,function(R){var Q=[],P;
jQuery.each(R,function(S,T){P=T.split("-");Q[Q.length]={label:(P[0]+'<br /><div class="smaller">'+P[1].trim()+"</div>"),value:T}
});N(Q)})},minLength:3,minWidth:218,callback:function(N){},cache:(G.split("-")[0].toLowerCase()==="en"?[]:null)});
E.find('input[id^="mcFrom"]').not(":first").click(function(N){H();D(N);N.stopPropagation()}).focus(function(N){H();
D(N)});I=true};L.fillForm=function(){};L.validate=function(){return true};L.constructUrl=function(){var O=["/search/result/mflight"],Q,P=0,N=3;
for(;P<N;P++){Q=B(P);if(Q){O.push(Q)}}O.push.apply(O,[A.adults.value,A.children.value,A.infants.value,A.classType.value]);
return O.join("/")}};IXIGO.HotelSearch=function(){var C=this,B=$("#htl_where"),E=false,A,D;C.msgs=[];
C.checkboxHandler=new IXIGO.Handler.OTACheckbox.Hotels();C.init=function(){if(C.msgs.length>=1){C.showErrors(C.msgs)
}else{C.hideErrors()}if(E){return }E=true;C.form=document.forms.hotelRequestForm;C.url+=C.form.action;
B.focus(function(){$.hideCalendar();C.hideErrors();C.msgs=[]}).keypress(function(F){return F.keyCode!=13
});$("#htl_checkIn, #htl_checkIn_avl").click(function(F){F.stopPropagation();C.showCalendar(this,"in")
}).focus(function(){C.showCalendar(this,"in");C.hideErrors()}).keypress(function(F){return F.keyCode!=13
}).change(function(){var F=$(this);C.setWeekDay(this);C.checkReturnDate(F,F.closest(".option-checkin").siblings(".option-checkout").find("input"),"hotel");
C.showNights(this)});$("#htl_checkOut, #htl_checkOut_avl").click(function(F){F.stopPropagation();C.showCalendar(this,"out")
}).focus(function(){C.showCalendar(this,"out");C.hideErrors()}).keypress(function(F){return F.keyCode!=13
}).change(function(){C.setWeekDay(this);C.showNights(this)});$("#htl_rooms, #htl_rooms_avl").focus(function(){$.hideCalendar()
}).change(function(){var F=this;setTimeout(function(){C.showRoom(F)},10)});$("#hotelSearchContent .optional-row-header .link").click(function(){$("#htl_checkIn, #htl_checkOut").val("");
$(".optional-row #cal1HtlWeekDay, .optional-row #cal2HtlWeekDay, .optional-row #numNights").hide();C.hideErrors();
C.msgs=[]});C.checkboxHandler.init();D=Date.today();D.setFullYear(D.getFullYear()+1);A=D.clone();A.setMonth(A.getMonth()-1);
B.autocomplete({source:function(G,F){if(G.XHR){G.XHR.abort()}G.XHR=IXIGO.Ajax.getJson(IXIGO.data.baseURL+"/action/content/city?searchFor=hotelCity&value="+G.term,function(I){var H=[];
jQuery.each(I.r,function(J,K){H[H.length]={label:K.c,value:K.c,param:K.i}});F(H)})},minLength:3,minWidth:410,callback:function(F,G){C.checkboxHandler.show(G)
},cache:null});C.fillForm()};C.fillForm=function(){var J=$.isNamespace("IXIGO.Product.Hotels.Main")?location.pathname.substring(location.pathname.indexOf("search/result/hotel")+"search/result/hotel/".length):IXIGO.Cookie.readIxiSearch("hs");
if(J&&location.pathname.indexOf("search-")===-1){var K=J.split("/"),I=document.forms.hotelRequestForm,F=Date.fromFlatDate(K[1]);
B.val(decodeURIComponent(K[0])).removeClass("inactive");if(F){var H=parseInt(K[5]),G=parseInt(K[7]);if(!F.before(Date.today())){I.htl_checkIn.value=F.toPaddedDate();
I.htl_checkOut.value=Date.fromFlatDate(K[2]).toPaddedDate()}I.htl_adult1.value=K[3];I.htl_children1.value=K[4];
if(G>=1){I.htl_rooms.value="3";I.htl_adult2.value=K[5];I.htl_children2.value=K[6];I.htl_adult3.value=K[7];
I.htl_children3.value=K[8];$("#htl_guestOptions2, #htl_guestOptions3").show()}else{if(H>=1){I.htl_rooms.value="2";
I.htl_adult2.value=K[5];I.htl_children2.value=K[6];$("#htl_guestOptions2").show()}}}}};C.showNights=function(K){var F=$(K).closest("form"),L=F.find("#numNights"),I=Date.fromPaddedDate(F.find(".option-checkin input").val()),H=Date.fromPaddedDate(F.find(".option-checkout input").val());
if(I&&H){var G=(Math.ceil(H.getTime()-I.getTime()))/(1000*60*60*24),J=(G>1)?G+" "+i18n_dictionary.nights:G+" "+i18n_dictionary.night;
L.html("("+J+")").show()}else{L.hide()}};C.showRoom=function(I){var F=$(I),G=F.closest(".option-rooms").siblings(".option-guests"),H=F.val();
if(H==="3"){G.find(".room.two, .room.three").show()}else{if(H==="2"){$.showHide(G.find(".room.two"),G.find(".room.three"))
}else{G.find(".room.two, .room.three").hide()}}};C.showCalendar=function(J,I){var F=Date.today(),G=$(J),H;
if(I==="in"){G.calendar({minDate:F,maxDate:A})}else{if(I==="out"){H=Date.fromPaddedDate(G.closest(".option-checkout").siblings(".option-checkin").find("input").val());
H=H?H:F;H=new Date(H.getFullYear(),H.getMonth(),H.getDate()+1);G.calendar({minDate:H,maxDate:D})}}};C.validate=function(){var K=C.form,J=false,M=K.htl_where.value.trim(),L=new RegExp("[^0-9 A-Z-,().'/¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ]","gi");
C.msgs=[];if(!M||M.trim()===""||M===K.htl_where.title){C.msgs.push(i18n_dictionary.cityName)}else{if(L.test(M.trim())){C.msgs.push(i18n_dictionary.validCity)
}}if(K.htl_checkIn.value){var G=Date.today(),H=Date.fromPaddedDate(K.htl_checkIn.value),I=Date.fromPaddedDate(K.htl_checkOut.value);
if(!H){C.msgs.push(i18n_dictionary.dateFormat)}else{if(!H.between(G,A)){C.msgs.push(i18n_dictionary.chkInDateRange)
}else{if(!I){C.msgs.push(i18n_dictionary.dateFormat)}else{if(H&&I.before(H)){C.msgs.push(i18n_dictionary.chkInDatePeriod)
}else{if(!I.between(G,D)){C.msgs.push(i18n_dictionary.chkInDateRangeYr)}else{if(H.sameDay(I)){C.msgs.push(i18n_dictionary.chkOutDateRange)
}}}}}}}else{if(K.htl_checkOut.value){C.msgs.push(i18n_dictionary.dateFormat)}}J=(C.msgs.length<1);if(J){var F=$.ajax({async:false,type:"GET",url:"/action/content/intlcity",data:"searchFor=findHotelCityId&value="+M,dataType:"json",beforeSend:function(N){N.setRequestHeader("Accept","text/javascript")
}}).responseText;C.checkCity(IXIGO.JSON.parse(F))}else{C.showErrors(C.msgs)}return false};C.checkCity=function(F){var G=true;
if(F.exception){C.msgs=[];C.msgs.push(i18n_dictionary.matchingCity+" "+(F.code==="MULTIPLE_CITY_FOUND"?i18n_dictionary.multipleMatch:i18n_dictionary.noMatch)+i18n_dictionary.spellCheck);
G=false}if(G){C.hideErrors();C.constructAndLaunch()}else{C.showErrors(C.msgs)}};C.constructURL=function(){var G=C.form,F;
C.url=C.form.action+"/";F=C.form.htl_where.value.trim();if(G.htl_checkIn.value){F+="/"+G.htl_checkIn.value.replace(new RegExp("/","g"),"")+"/";
F+=G.htl_checkOut.value.replace(new RegExp("/","g"),"")+"/";F+=G.htl_adult1.value+"/"+G.htl_children1.value+"/";
if(G.htl_rooms.value==="2"){F+=G.htl_adult2.value+"/"+G.htl_children2.value+"/0/0"}else{if(G.htl_rooms.value==="3"){F+=G.htl_adult2.value+"/"+G.htl_children2.value+"/"+G.htl_adult3.value+"/"+G.htl_children3.value
}else{F+="0/0/0/0"}}}C.url+=F}};IXIGO.HotelSearch.prototype=new IXIGO.Search();IXIGO.BusSearch=function(){var D=this,C=$("#bus_from"),A=$("#bus_to"),B,F,H=false,G='<option value=" ">-Please select from city-</option>',E='<option value=" ">Loading cities...</option>';
D.data={};D.msgs=[];D.init=function(){if(H){return }else{H=true}if(D.msgs.length>0){D.showErrors(D.msgs)
}else{D.hideErrors()}D.form=document.forms.busRequestForm;C.add(A).focus(function(){$.hideCalendar();
D.hideErrors();D.msgs=[]}).keypress(function(J){return J.keyCode!=13});C.blur(function(){D.checkOrigin()
});$(D.form.passengers).focus(function(){$.hideCalendar()});$("#calendarInputId1Bus").click(function(J){J.stopPropagation();
D.showCalendar("calendarInputId1Bus")}).focus(function(){D.showCalendar("calendarInputId1Bus")}).keypress(function(J){return J.keyCode!=13
}).change(function(){D.setWeekDay(this)});F=Date.today();F.setFullYear(F.getFullYear()+1);B=Date.today();
B.setMonth(B.getMonth()+2);var I=Date.today();I.setDate(I.getDate()+IXIGO.data.defaultStartDay-I.getDay());
if(I.sameDay(Date.today())||I.before(Date.today())){I.setDate(I.getDate()+7)}D.form.calendarInputId1Bus.value=I.toPaddedDate();
D.fillForm();C.autocomplete({source:function(L,J){var K=IXIGO.data.baseURL+"/action/content/city?searchFor=buscity&value="+L.term+(L.el[0].id==="bus_to"?"&origin="+D.form.bus_from.value:"");
IXIGO.Ajax.getJson(K,function(O){var N=[],M;jQuery.each(O,function(P,Q){M=Q.split(",");N[N.length]={label:(M[0]+'<br /><div class="smaller">'+M[1].trim()+"</div>"),value:M[0]}
});J(N)})},minLength:2,minWidth:210});$("#calendarInputId1Bus, #calendarInputId2Bus").trigger("change")
};D.fillForm=function(){var M=(IXIGO.BusResult?location.pathname.substring(location.pathname.indexOf("search/result/bus")+"search/result/bus/".length):IXIGO.Cookie.readIxiSearch("bs")),L=location.pathname,O,K=document.forms.busRequestForm,J=(L.indexOf("search/bus")===-1?true:false);
if(M&&J){var N=M.split("/"),I;K.bus_from.value=decodeURIComponent(N[0]);D.refreshBusTo(function(){K.bus_to.value=decodeURIComponent(N[1])
});I=Date.fromFlatDate(N[2]);if(!I.before(Date.today())){K.calendarInput1Bus.value=Date.fromFlatDate(N[2]).toPaddedDate()
}K.passengers.value=N[4];C.removeClass("inactive")}else{if(!J){O=L.split("search/bus/")[1];K.bus_from.value=O.split("/")[0];
D.refreshBusTo(function(){K.bus_to.value=O.split("/")[1]})}}};D.showCalendar=function(I){var J=Date.today(),K;
if(I==="calendarInputId1Bus"){$("#"+I).calendar({minDate:J,maxDate:B})}else{if(I==="calendarInputId2Bus"){K=Date.fromPaddedDate(D.form.calendarInput1Bus.value);
K=K?K:J;$("#"+I).calendar({minDate:K,maxDate:F})}}};D.validate=function(){var M=D.form,L=false,J=Date.today(),N=Date.fromPaddedDate(M.calendarInput1Bus.value),K=Date.fromPaddedDate(M.calendarInput2Bus.value),O=new RegExp("[^0-9 A-Z-(),.&]","gi");
D.msgs=[];if(C.hasClass("inactive")||!M.bus_from.value.trim()){D.msgs.push(i18n_dictionary.forgotOrg)
}else{if(!M.bus_to.value.trim()){D.msgs.push(i18n_dictionary.forgotDest)}else{if(M.bus_from.value===M.bus_to.value){D.msgs.push(i18n_dictionary.eqOrgDest)
}else{if(O.test(M.bus_from.value.trim())){D.msgs.push(i18n_dictionary.specialCharOrg)}else{if(O.test(M.bus_to.value.trim())){D.msgs.push(i18n_dictionary.specialCharDest)
}else{if(!N){D.msgs.push(i18n_dictionary.dateFormat)}else{if(!N.between(J,B)){D.msgs.push(i18n_dictionary.depDateRange)
}else{if(M.returnBus[0].checked){if(!K){D.msgs.push(i18n_dictionary.dateFormat)}else{if(N&&K.before(N)){D.msgs.push(i18n_dictionary.retDateRange)
}else{if(!K.between(J,F)){D.msgs.push(i18n_dictionary.retDateRangeYr)}}}}}}}}}}}L=(D.msgs.length<1);if(L){var I=$.ajax({async:false,type:"GET",url:IXIGO.data.baseURL+"/action/content/city",data:"searchFor=busMatchingcity&origin="+D.form.bus_from.value.trim()+"&value="+this.form.bus_to.value.trim(),dataType:"json",beforeSend:function(P){P.setRequestHeader("Accept","text/javascript")
}}).responseText;D.checkDestinationCity(IXIGO.JSON.parse(I))}else{D.showErrors(D.msgs)}return false};
D.checkDestinationCity=function(L){var K=false;if(L.exact.length<1){var M=i18n_dictionary.noMatchingDest;
var I=L.matching;if(I.length>0){M+="<br/> "+i18n_dictionary.didMean+": ";for(var J=0;J<I.length;J++){M+='<a class="link busDestinationCity">'+I[J]+"</a>";
if(J!==I.length-1){M+=" "+i18n_dictionary.or+" "}}D.msgs.push(M)}else{D.msgs.push(i18n_dictionary.noBus+" "+D.form.bus_from.value.trim()+" "+i18n_dictionary.to+" "+D.form.bus_to.value.trim()+".")
}}K=(D.msgs.length<1);if(K){D.hideErrors();D.constructAndLaunch()}else{D.showErrors(D.msgs);$(".busDestinationCity").click(function(){D.form.bus_to.value=$(this).html();
D.onSearchClick()})}};D.checkOrigin=function(){if(!D.form.bus_from.value.trim()||D.form.bus_from.value==="e.g. Bengaluru"){A.html(G);
return }$.ajax({type:"GET",url:IXIGO.data.baseURL+"/action/content/city",data:"searchFor=busMatchingcity&value="+D.form.bus_from.value.trim(),dataType:"json",success:function(I){D.checkOriginCity(I)
},error:function(I){},beforeSend:function(I){I.setRequestHeader("Accept","text/javascript")}})};D.checkOriginCity=function(L){var M=L.exact;
var K=false;if(M.length<1){var N=i18n_dictionary.noMatchingOrg;var I=L.matching;if(I.length>0){N+="<br/> "+i18n_dictionary.didMean+": ";
for(var J=0;J<I.length;J++){N+='<a class="link busOriginCity">'+I[J]+"</a>";if(J!==I.length-1){N+=" "+i18n_dictionary.or+" "
}}}D.msgs.push(N);D.showErrors(D.msgs);A.html(G);$(".busOriginCity").click(function(){D.form.bus_from.value=$(this).html();
D.hideErrors();D.refreshBusTo();D.form.bus_to.focus()})}else{D.refreshBusTo()}};D.refreshBusTo=function(I){if(!D.form.bus_from.value.trim()){return 
}A.html(E);IXIGO.Ajax.getJson(IXIGO.data.baseURL+"/action/content/city?searchFor=busCityConnectivity&value="+D.form.bus_from.value.trim(),function(K){var J="";
if(K.dest.length>0){jQuery.each(K.dest,function(L,M){J+='<option value="'+M.split(", ")[0]+'">'+M+"</option>"
})}else{J+=G}A.html(J);if(typeof I==="function"){I.call(D)}})};D.constructURL=function(){var J=D.form;
D.url=D.form.action+"/";var I="";I+=J.bus_from.value.trim()+"/";I+=J.bus_to.value.trim()+"/";I+=J.calendarInput1Bus.value.replace(new RegExp("/","g"),"")+"/";
if(J.returnBus[0].checked){I+=J.calendarInput2Bus.value.replace(new RegExp("/","g"),"")}I+="/"+J.passengers.value+"";
D.url+=I}};IXIGO.BusSearch.prototype=new IXIGO.Search();IXIGO.TrainSearch=function(){var D=this,C=$("#train_from"),A=$("#train_to"),B,E=false;
D.msgs=[];D.nearestOrgnIATA;D.nearestDstnIATA;D.crossSellHandler=new IXIGO.Handler.CrossSell.Trains();
D.init=function(){if(E){return }else{E=true}if(D.msgs.length>0){D.showErrors(D.msgs)}else{D.hideErrors()
}D.form=$("form[name='trainRequestForm']");B=Date.today();B.setDate(B.getDate()+90);$("select","#whoTrain, #whichTrain").focus(function(){$.hideCalendar()
});$("#calendarInputId1Train").click(function(G){G.stopPropagation();$(this).calendar({minDate:Date.today(),maxDate:B});
D.hideErrors()}).focus(function(G){G.stopPropagation();$(this).calendar({minDate:Date.today(),maxDate:B});
D.hideErrors()}).change(function(){D.setWeekDay(this);D.ifValidForTatkal()});C.add(A).focus(function(G){$.hideCalendar();
D.hideErrors();D.msgs=[]}).keypress(function(G){return G.keyCode!=13});C.add(A).autocomplete({source:function(H,G){IXIGO.Ajax.getJson(IXIGO.data.baseURL+"/action/content/trainstation?searchFor=trainstations&anchor=false&value="+H.term,function(J){var I=[];
jQuery.each(J,function(K,L){I[I.length]={label:L.e,value:L.e,param:L.a}});G(I)})},minLength:3,minWidth:218,callback:function(H,G){D["nearest"+(H[0].id==="train_from"?"Orgn":"Dstn")+"IATA"]=G
}});var F=Date.today();F.setDate(F.getDate()+IXIGO.data.defaultStartDay-F.getDay());if(F.sameDay(Date.today())||F.before(Date.today())){F.setDate(F.getDate()+7)
}D.form.get(0).calendarInputId1Train.value=F.toPaddedDate();D.crossSellHandler.init();D.fillForm();$("#calendarInputId1Train").trigger("change");
$("#trainBox").click(function(){D.hideErrors()})};D.ifValidForTatkal=function(){var F=Date.fromPaddedDate(D.form.get(0).calendarInput1Train.value);
$("#trainLeaveDtMsg").css("display",(Date.getDifference(Date.today(),F)<=1?"block":"none"))};D.fillForm=function(){var G=null,H=IXIGO.Cookie.readIxiSearch("tf");
if(IXIGO.TrainResult){G=location.pathname.substring(location.pathname.indexOf("search/result/train")+"search/result/train/".length)
}else{G=IXIGO.Cookie.readIxiSearch("ts")}if(G){var J=G.split("/");var I=document.forms.trainRequestForm;
$("#train_from, #train_to").removeClass("inactive");$.get(IXIGO.data.baseURL+"/action/content/trainstation?searchFor=trainstation&value="+J[0],function(K){I.train_from.value=K
},"html");$.get(IXIGO.data.baseURL+"/action/content/trainstation?searchFor=trainstation&value="+J[1],function(K){I.train_to.value=K
},"html");I.adultsTrain.value=J[4];I.childrenTrain.value=J[5];I.seniorMenTrain.value=J[6];I.seniorWomenTrain.value=J[7];
I.classTypeTrain.value=J[8];var F=Date.fromFlatDate(J[2]);if(!F.before(Date.today())){I.calendarInput1Train.value=F.toPaddedDate()
}}if(H){$("#searchFlight").attr("checked",H.indexOf("y")>=0)}};D.validate=function(){var K=D.form.get(0),J=false,G=Date.today(),L=Date.fromPaddedDate(K.calendarInput1Train.value),H=new RegExp("[^0-9 A-Z-().]","gi");
D.msgs=[];if(C.hasClass("inactive")){D.msgs.push(i18n_dictionary.forgotOrg)}else{if(A.hasClass("inactive")){D.msgs.push(i18n_dictionary.forgotDest)
}else{if(K.train_from.value===K.train_to.value){D.msgs.push(i18n_dictionary.eqOrgDest)}else{if(H.test(K.train_from.value.trim())){D.msgs.push(i18n_dictionary.specialCharOrg)
}else{if(H.test(K.train_to.value.trim())){D.msgs.push(i18n_dictionary.specialCharDest)}else{if(!L){D.msgs.push(i18n_dictionary.dateFormat)
}else{if(!L.between(G,B)){D.msgs.push(i18n_dictionary.trainDepDate)}else{var I=0;$("select","#whoTrain").each(function(M){I+=(+this.value)
});if(I==0){D.msgs.push(i18n_dictionary.minPassenger)}else{if(I>6){D.msgs.push(i18n_dictionary.maxPassenger)
}}}}}}}}}J=(D.msgs.length<1);if(J){var F=$.ajax({async:false,type:"GET",url:IXIGO.data.baseURL+"/action/content/trainstation",data:"searchFor=trainstations&anchor=true&value="+K.train_from.value,dataType:"json",beforeSend:function(M){M.setRequestHeader("Accept","text/javascript")
}}).responseText;D.checkDstnCity(IXIGO.JSON.parse(F))}else{D.showErrors(D.msgs)}return false};D.checkDstnCity=function(H){var G=false;
D.handleCityResponse(H,D.form.get(0).train_from,"nearestOrgnIATA");G=(D.msgs.length<1);if(G){var F=$.ajax({async:false,type:"GET",url:IXIGO.data.baseURL+"/action/content/trainstation",data:"searchFor=trainstations&anchor=true&value="+D.form.get(0).train_to.value,dataType:"json",beforeSend:function(I){I.setRequestHeader("Accept","text/javascript")
}}).responseText;D.checkCity(IXIGO.JSON.parse(F))}else{D.showErrors(D.msgs)}};D.checkCity=function(G){var F=false;
D.handleCityResponse(G,D.form.get(0).train_to,"nearestDstnIATA");F=(D.msgs.length<1);if(F){D.hideErrors();
D.constructAndLaunch()}else{D.showErrors(D.msgs)}};D.handleCityResponse=function(K,J,G){if(!K[0]){D.msgs.push(i18n_dictionary.noMatchingStation+" ("+J.value+"). "+i18n_dictionary.spellCheck)
}else{var H=0,F,I;if(K.length>1){for(F=K.length;H<F;H++){if(K[H].e.match(J.value)){break}}}I=K[H]||K[0];
J.value=I.e;D[G]=I.a}};D.constructURL=function(){var G=D.form.get(0),F=[G.action,D.getLocationVal(G.train_from),D.getLocationVal(G.train_to),G.calendarInput1Train.value.replace(new RegExp("/","g"),""),""];
F=F.concat([G.adultsTrain.value,G.childrenTrain.value,G.seniorMenTrain.value,G.seniorWomenTrain.value,G.classTypeTrain.value]);
D.url=F.join("/")};D.getLocationVal=function(G){var J=G.value.trim(),I="",F=J.indexOf("("),H=J.indexOf(" - All stations");
if(F>0){I=J.substring(F+1,J.indexOf(")"))}else{if(H>0){I=J.substring(0,H)+"-All"}}return I}};IXIGO.TrainSearch.prototype=new IXIGO.Search();
IXIGO.DealSearch=function(){var B=this,C=$("#deal_search"),A,D=false;B.msgs=[];B.flightTags=null;B.hotelTags=null;
B.vacationTags=null;B.init=function(){if(D){return }D=true;B.form=$("form[name='dealRequestForm']");C.focus(function(){B.hideErrors();
B.msgs=[]}).keypress(function(E){if(E.keyCode==13){B.onSearchClick()}});$("#dealPopularOptions").click(function(E){B.dealTabChange(this,E)
});B.fillForm();B.getDealsTag()};B.fillForm=function(){var E=null;if(IXIGO.DealResult){E=location.pathname.substring(location.pathname.indexOf("search/result/deal")+"search/result/deal/".length)
}else{E=IXIGO.Cookie.readIxiSearch("ds")}if(E){C.val(E.replace("-"," ").replace(/\+/g," ")).removeClass("inactive")
}};B.dealTabChange=function(H,E){var F=$(E.target).closest("[invoke]"),G=F.attr("invoke");if(G){$("#dealPopular"+$("#dealPopularTypeTip").attr("tab")).css("color","#007CD3");
$("#dealPopularTypeTip").css("left",G=="Flight"?"107px":G=="Hotel"?"170px":"245px");$("#dealPopular"+G).css("color","#666666");
$("#dealPopularTypeTip").attr("tab",G);$("#dealPopularTags").html($("#dealTags"+G).html());$("#dealTagOverlay").css("height",$("#dealPopularTags").height()+5+"px");
$("#dealTagOverlay").show()}};B.validate=function(){var F=B.form.get(0),E=false;B.msgs=[];E=(B.msgs.length<1);
if(E){B.hideErrors()}else{B.showErrors(B.msgs)}return E};B.constructURL=function(){var F=B.form.get(0),E="";
B.url=F.action+"/";if(C.hasClass("inactive")){E+=C.val().replace(/ /g,"+")}B.url+=E};B.getDealsTag=function(){IXIGO.Ajax.getJson(IXIGO.data.baseURL+"/api/deals?cmd=tagCloud",function(E){B.showDealsTag(E)
})};B.showDealsTag=function(E){tagCloud=function(I){var M=[],N=1,G=1,J=1,Q=1,P;for(P in I){if(Q<=20){N=I[P]>N?I[P]:N;
G=I[P]<G?I[P]:G}Q++}var R="",H=18,O=12,L,K,T,S=(H-O)/(N-G);Q=1;for(P in I){if(Q<=20){J=I[P];T=O+((N-(N-(J-G)))*S);
color="#007CD4";R+='<a style="font-weight:bold;text-decoration: none;padding:2px;font-size: '+T+'px;" href="/search/result/deal/'+P.trim().replace(/ /g,"-")+'">'+P+"</a>\n"
}Q++}return R};B.flightTags="<p>"+tagCloud(E.flight)+"</p>";B.hotelTags="<p>"+tagCloud(E.hotel)+"</p>";
B.vacationTags="<p>"+tagCloud(E.deal)+"</p>";$("#dealPopularTags").html(B.flightTags);$("#dealTagsFlight").html(B.flightTags);
$("#dealTagsHotel").html(B.hotelTags);$("#dealTagsVacation").html(B.vacationTags);var F=$("#dealPopularTags").position();
$("#dealTagOverlay").css({"left":(F.left+382)+"px","top":(F.top+5)+"px","height":($("#dealPopularTags").height()+5)+"px"});
IXIGO.Utils.doPngFixOnBgImg($("#dealTagOverlay")[0])}};IXIGO.DealSearch.prototype=new IXIGO.Search();
