$.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(){var A=this;A.jHidden=$("#ixiDoNotShow");A.jErrorTipWrapper=$("#errorTipWrapper");
A.jErrorTipContent=A.jErrorTipWrapper.find(".tip-content");A.jErrorTipTwisty=A.jErrorTipWrapper.find(".ixiTip");
A.jActionSearch=$("#actionSearch");$(document).click(function(B){if(A.jErrorTipWrapper.is(":visible")&&!$.isChild(B.target,A.jErrorTipWrapper[0])){A.jErrorTipWrapper.addClass("hide")
}})};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
}}}},error:function(A,C){var J=this,E=(A.jquery?A:$(A)),G=E.ixiPosition(),D,I,H,K,B,F;H=J.jHidden.html('<div style="font-size: 13px;">'+C+"</div>").width()+40;
F=J.jHidden.outerHeight();K=E.css("paddingTop");K=K?parseInt(K.split("px").join(""),10):0;I=G.top-F-13;
B=E.outerWidth();D=G.left+(B-H)/2;E.focus().trigger("focus");J.jErrorTipContent.html(C).width(H);J.jErrorTipTwisty.css("left",(H-5)/2+"px");
J.jErrorTipWrapper.css({left:D+"px",top:I+"px"}).removeClass("hide");J.jActionSearch.removeClass("wait")
},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 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.Service.CurrencyConverter=function(){var B=this,D,A=[],C=[];
B.options;B.currencies={};B.currentCurrency;B.init=function(){D=$("#ixiPosCurrency");if(!D[0]){return 
}D.change(function(){B.onChange()});$.ajaxSetup({cache:false});$.getJSON((document.location.protocol==="https:"?"/secure":"")+"/action/content/currency?searchFor=currency",B.onLoad)
};B.registerOnLoad=function(E){A[A.length]=E};B.registerOnChange=function(E){C[C.length]=E};B.onLoad=function(F){var E=D.val(),G,H,I;
if(!E){E=IXIGO.Cookie.getCurrency()}G=B.html(F,E);H=B.currencies;I=H[E];D.html(G);B.currentCurrency=$.extend(true,I,{factor:I.rate/H.INR.rate});
$.each(A,function(J,K){if(typeof K==="function"){K.call(null)}});$.ajaxSetup({cache:true})};B.html=function(F,I){var H,E,G="",K=B.currencies,L,J=false;
G='<option disabled="disabled">Choose Currency...</option>';for(H=0,E=F.length;H<E;H++){L=F[H];K[L.code]=L;
G+='<option value="'+L.code+'"'+(!J&&L.code===I?' selected="selected"':"")+">"+L.code+(L.code!==L.symbol?" - "+L.symbol:"")+"</option>";
if(L.code===I){J=true}}return G};B.onChange=function(){var G=B.currencies,H=G[D.val()],F=B.options,E=true;
B.currentCurrency=$.extend(true,H,{factor:H.rate/G.INR.rate});IXIGO.Cookie.setCurrency(H.code);$.each(C,function(I,J){if(typeof J==="function"){E=false;
J.call(null)}});if(E){window.location.reload()}};B.convert=function(H,F,E){if(F===E){return H}var I=B.currencies,G=I[E].rate/I[F].rate;
return(H*G)}};IXIGO.CurrencyConverter=new IXIGO.Service.CurrencyConverter();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.LightBox=function(){var A=this;A.jOverlay=$("#ixiOverlay");A.jOverlay.click(function(){IXIGO.LightBox.hide()
});$(window).bind("keypress",function(B){if(B.keyCode==27){IXIGO.LightBox.hide()}});$(".ixi-lb-close").click(function(){IXIGO.LightBox.hide()
})};IXIGO.Component.LightBox.prototype={show:function(C,G,B){if(!C){return }C=(typeof C==="string"||!C.jquery?$(C):C);
var I=this,A=IXIGO.Utils.getViewportDimensions(),F=IXIGO.Utils.getViewportPosition(),D=C.find(".ixi-lb-popup"),E=C.width(),H=C.outerHeight();
I.jOverlay.width(A.w).height(Math.max(A.h,$(document).height())).css({"opacity":"0","display":"block"}).animate({"opacity":"0.5"},300);
IXIGO.LightBox.lightBoxPosition(C,E,H);if(typeof B==="function"){I.cachedOnHide=B}},hide:function(B){var A=this;
$(".ixi-lb:visible").animate({"top":-$(window).height()},400,function(){$(this).hide();A.jOverlay.hide()
});if(A.cachedOnHide){A.cachedOnHide.call(null);A.cachedOnHide=null}},lightBoxPosition:function(B,A,D){var C=$(window).scrollTop()+(($(window).height()-D)/2);
B.css({"top":-$(window).height(),"display":"block"}).animate({"top":C},500)}};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.Pos=function(){var C=this,A=false,B=IXIGO.Cookie.read("ixiUsrLocale"),F=$("#ixiPosCountry"),D=$(".showcase-strip[imgUrl]"),E=document.forms.micrositeConfigs;
C.pos;C.configs;C.init=function(){if(A||!F[0]){return }A=true;C.configs=IXIGO.JSON.parse(E.configData.value);
if(typeof $.preferCulture==="function"){$.preferCulture(E.culture.value)}if(F.val()){C.pos=F.val().toLowerCase()
}else{C.pos=B.split(":")[3].split("=")[1].toLowerCase()}F.change(function(){C.select()});C.fill()};C.fill=function(){var G='<option disabled="disabled">Choose Country...</option>';
jQuery.each(C.configs,function(I,H){G+='<option value="'+I+'"'+(I===C.pos?' selected="selected"':"")+">"+H[0]+"</option>"
});F.html(G)};C.select=function(){var H=F.val(),G=$.richArray.has(["IN","GLOBAL"],C.pos.toUpperCase());
C.pos=H;C.change(G)};C.change=function(I){var J=(I?IXIGO.Cookie.read("ixiUsrLocale")||B:null),M,K,H,G,L=window.location.hostname.split(".");
if(J){M=J.split(":");for(K=0,H=M.length;K<H;K++){G=M[K].split("=");if(G[0]==="cnc"){M[K]=[G[0],C.pos.toUpperCase()].join("=")
}else{if(G[0]==="cc"){M[K]=[G[0],C.configs[C.pos][1]].join("=")}}}if(C.configs[C.pos][3]==="true"){IXIGO.Cookie.set("ixiUsrLocale",M.join(":"))
}}IXIGO.Cookie.remove("ixiSearch");window.location.href="http://"+[L[0],C.configs[C.pos][2]].join(".")+(window.location.port?":"+window.location.port:"")+(C.configs[C.pos][3]==="true"?"?ncr="+C.pos:"")
};C.loadShowCaseStrip=function(I){var G,H=false;if(!D[0]){return }D.hide();$.each(D,function(){G=$(this);
if(G.attr("product")===I){if(G.find("img")[0]){G.fadeIn("slow")}else{C.loadImage(G)}H=true}return !H});
if(!H){C.loadImage($(D[0]));D=$([])}};C.loadImage=function(G,K){var I=new Image(),J,H;I.onload=function(){J='<img style="border: 0 none; height: '+I.height+"px; width: "+I.width+'px;" src='+I.src+' title="'+(G.attr("imgtitle")||"")+'"></img>';
H=G.attr("imghref");if(H){J='<a href="'+H+'">'+J+"</a>"}G.html(J).fadeIn("slow")};I.src=G.attr("imgurl")
}};IXIGO.Handler.Testimonials=function(){var A=this,B=$("#allTestimonials");tagLineNo=-1;A.init=function(){A.show()
};A.hide=function(){$(B.find(".testi")[tagLineNo]).fadeTo(1000,"0.0",function(){A.show()})};A.show=function(){var C=B.find(".testi");
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.Facebook=(function(){var A=this;window.fbAsyncInit=function(){FB.init({appId:211728545570625,status:true,cookie:true,oauth:true,xfbml:true})
};return{fbInit:function(){(function(E,B,F){var D,C=E.getElementsByTagName(B)[0];if(E.getElementById(F)){return 
}D=E.createElement(B);D.id=F;D.src="//connect.facebook.net/en_US/all.js#xfbml=1&amp;appId=211728545570625";
C.parentNode.insertBefore(D,C)}(document,"script","facebook-jssdk"));(function(){var B=document.createElement("script");
B.type="text/javascript";B.async=true;B.src="https://apis.google.com/js/plusone.js";var C=document.getElementsByTagName("script")[0];
C.parentNode.insertBefore(B,C)})();$("#FaceBookLogin, #logWithFB").click(function(){FB.login(function(B){if(B.authResponse){FB.api("/me",function(C){$("#isFbLogIn").val("true");
$("#qlEmail").val(C.email);$("#quickloginform").submit();IXIGO.Cookie.set("ixiFBlogin",1)})}else{}},{scope:"email,user_birthday,user_location"})
});$("#signout").click(function(){if(IXIGO.Cookie.read("ixiFBlogin")){FB.logout(function(B){});IXIGO.Cookie.remove("ixiFBlogin")
}})}}})();IXIGO.chromeFrame=(function(){var A=this;return{init:function(){var C=$("#oldIE");if($("body").hasClass("lte7")){var B=navigator.userAgent.toLowerCase();
if(B.indexOf("chromeframe")>=0){return }C.slideDown()}$("#IEClose").click(function(){C.slideUp()})}}})();
$(document).ready(function(){var A=IXIGO.Handler,B;IXIGO.Cookie.remove("homeCookie","otaClick","otaFlightClick","otaHotelClick","otaTrainClick","ixiUserLocale");
IXIGO.Web.handlers={oAuth:new A.OpenAuth(),pos:new A.Pos(),testi:new A.Testimonials()};B=IXIGO.Web.handlers;
B.oAuth.init();IXIGO.CurrencyConverter.init();B.pos.init();B.testi.init();IXIGO.Utils.inlineHelp();IXIGO.Utils.enableFeedbackWidget()
});
