function setPickup(){}function findPos(n){var t=curtop=0;if(n.offsetParent)for(t=n.offsetLeft,curtop=n.offsetTop;n=n.offsetParent;)t+=n.offsetLeft,curtop+=n.offsetTop;return[curtop,t]}function VehiclePopup(n){popupWindow=window.open(n)}function Popup(n,t,i){var r="innerHeight"in window?window.innerHeight:document.documentElement.offsetHeight;t=typeof t!="undefined"?t:940;i=typeof i!="undefined"?i:r*.9;window.open(n+"&popup=true","_blank","height="+i+",width="+t+",left=0,top=10,resizable=no,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no")}function formatCurrency(n){n=n.toString().replace(/\$|\,/g,"");isNaN(n)&&(n="0");sign=n==(n=Math.abs(n));n=Math.floor(n*100+.50000000001);cents=n%100;n=Math.floor(n/100).toString();cents<10&&(cents="0"+cents);for(var t=0;t<Math.floor((n.length-(1+t))/3);t++)n=n.substring(0,n.length-(4*t+3))+","+n.substring(n.length-(4*t+3));return(sign?"":"-")+n+"."+cents}function parseCurrency(num){return eval(num.split(" ").join("").split(gCurrencySymbol).join("").split(",").join(""))}function getParameterByName(n,t){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var u="[\\?&]"+n+"=([^&#]*)",i=new RegExp(u),r=t?i.exec(t):i.exec(window.location.href);return r==null?"":decodeURIComponent(r[1].replace(/\+/g," "))}function readMore(){$(".jsMore").each(function(){var t=$(this).children(),n="more &raquo;",i="&laquo less";t.outerHeight()>$(this).outerHeight()&&($(this).wrap('<div class="morewrap"/>'),$(this).addClass("less"),$('<a class="rmore" href="#">'+n+"<\/a>").appendTo($(this).parent()));$(".rmore").click(function(){return $(this).prev().hasClass("less")?($(this).prev().removeClass("less").addClass("more"),$(this).html(i)):($(this).prev().removeClass("more").addClass("less"),$(this).html(n)),!1})})}function footerFix(){}function liveChat(){$("#LiveChat").click(function(){LC_API.open_chat_window()})}function DriveNowChat(){$("#DriveNowChat").click(function(){olark("api.box.show")})}function Verisign(){$("#bnVerisign").click(function(){window.open($(this).attr("data-href"),"_blank","width=560,height=433")})}function CheckAvailabilityQuote(n,t){tb_show(t,n)}function BookNowQuote(n){Popup(n)}function AddToShortlist(n){var t=JSON.parse($.cookie("shortlist")),i;return(t==null&&(t=[]),t.length<4)?(i={hash:n},t.push(i),$("#CompareCount").text(t.length+" / 4"),$.cookie("shortlist",JSON.stringify(t),{expires:1,path:"/"}),$("#divQuoteCompare").show(),!0):!1}function RemoveFromShortlist(n){var t=JSON.parse($.cookie("shortlist"));t==null&&(t=[]);$(t).each(function(i,r){r.hash==n&&t.splice(i,1)});$("#CompareCount").text(t.length+" / 4");t.length>0?$("#divQuoteCompare").show():$("#divQuoteCompare").hide();$.cookie("shortlist",JSON.stringify(t),{expires:1,path:"/"})}function ResetShortlist(){$.cookie("shortlist",JSON.stringify([]),{expires:1,path:"/"});$("#CompareCount").text("0 / 4");$("#divQuoteCompare").hide();$(".bnCompare").removeClass("active")}function setCookie(n,t,i){var r=new Date,u;r.setTime(r.getTime()+i*864e5);u="expires="+r.toUTCString();document.cookie=n+"="+t+"; "+u}function getCookie(n){for(var r=n+"=",u=document.cookie.split(";"),t,i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return""}function badgeclick(){LC_API.open_chat_window()}function generateGuid(){for(var i,t="",n=0;n<32;n++)(n==8||n==12||n==16||n==20)&&(t=t+"-"),i=Math.floor(Math.random()*16).toString(16).toUpperCase(),t=t+i;return t}function Calculator_Init(){var t,i,n;if($("#CurrentChannelCode").val()=="AU"||$("#CurrentChannelCode").val()=="AUN"||$("#CurrentChannelCode").val()=="NZ"||$("#CurrentChannelCode").val()=="NZN"||$("#CurrentChannelCode").val()=="US"||$("#CurrentChannelCode").val()=="USN"||$("#CurrentChannelCode").val()=="CA"||$("#CurrentChannelCode").val()=="CAN"||$("#CurrentChannelCode").val()=="ZA"||$("#CurrentChannelCode").val()=="EU")return!0;if(ParticipateDN_ABTest(),$("#txtPickupDate, #txtDropOffDate").datepicker({numberOfMonths:3,showButtonPanel:!0,dateFormat:"dd/mm/yy",changeMonth:!0,changeYear:!0,minDate:new Date,maxDate:(new Date).add({years:2}),showAnim:""}),Modernizr.touch&&Modernizr.inputtypes.date||$("#mtxtPickupDate, #mtxtDropOffDate").attr("type","text").prop("readonly",!0).datepicker({dateFormat:"dd/mm/yy",minDate:new Date,maxDate:(new Date).add({years:2}),showAnim:""}),$("#ddlDepotsPickup, #ddlDepotsDropOff").change(function(){$("#Warning").text("")}),$("#ddlLicenseType").change(function(){$("#Warning").text("")}),$(".popuplink").removeAttr("href"),$(".popuplink").attr("href","#"),$("#ddlStatesPickup option").remove(),$("#ddlStatesDropOff option").remove(),$("#ddlStates option").each(function(n,t){$("#ddlStatesPickup").append($(t).clone());$("#ddlStatesDropOff").append($(t).clone())}),$("#ddlDepotsPickup *").remove(),$("#ddlDepotsDropOff *").remove(),$("#ddlRegions optgroup").length?$("#ddlRegions optgroup").each(function(n,t){$("#ddlDepotsPickup").append($(t).clone());$("#ddlDepotsDropOff").append($(t).clone())}):$("#ddlRegions option").each(function(n,t){$("#ddlDepotsPickup").append($(t).clone());$("#ddlDepotsDropOff").append($(t).clone())}),FormStyling(),BindCookies(),SetFormValues(),$("#calculator select[data-search='true']").select2(),$("#calculator select[data-search='false']").selectpicker({style:"btn-info",size:4}),/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)&&$("#calculator select[data-search='false']").selectpicker("mobile"),$("#calculator").attr("data-format"))switch($("#calculator").attr("data-format")){case"square":Square_Init()}$("#IsDNTrackingEnabled").val()=="true"&&window.location.pathname=="/"&&(t=$("#txtPickupDate").is(":visible")?$("#txtPickupDate").val():$("#mtxtPickupDate").val(),i=$("#txtDropOffDate").is(":visible")?$("#txtDropOffDate").val():$("#mtxtDropOffDate").val(),t!=""&&t.indexOf("/")>-1&&(n=t.split("/"),t=n[2]+"-"+n[1]+"-"+n[0]),i!=""&&i.indexOf("/")>-1&&(n=i.split("/"),i=n[2]+"-"+n[1]+"-"+n[0]),divolte.signal("affiliateSearchWidgetView",{affiliateCode:$("#CurrentChannelCode").val(),frontendName:"campertravel",environment:$("#CurrentEnvironment").val(),pageTitle:document.title,vehicleCategory:"campervan-hire",locationCountryCode:$("#CurrentMarketCode").val(),frontendVersion:"2.1.0",frontendServerId:"CT-Web",backendServerId:"CT-SQL",countryCode:$("#CurrentMarketCode").val(),site:"campertravel",referer:document.referrer==null||document.referrer==""?location.href:document.referrer,pickupDate:t+"T00:00:00",dropoffDate:i+"T00:00:00",pickupLocationType:"ctloc",pickupLocationName:$("#ddlDepotsPickup").val(),pickupLocationValue:"ctloc;"+$("#ddlDepotsPickup").val()+";"+$("#ddlDepotsPickup").val(),pickupLocation:$("#ddlDepotsPickup").val(),dropoffLocationType:"ctloc",dropoffLocationName:$("#ddlDepotsDropOff").val(),dropoffLocationValue:"ctloc;"+$("#ddlDepotsDropOff").val()+";"+$("#ddlDepotsDropOff").val(),dropoffLocation:$("#ddlDepotsDropOff").val(),widgetType:"campertravel"}),divolte_session_ids="&divolteRelatedPartyId="+window.divolte.partyId+"&divolteRelatedPartySessionId="+window.divolte.sessionId+"&divolteRelatedPageViewId="+window.divolte.pageViewId)}function Search(n){var i,r,t,u,o,s;if($("#IsDNTrackingEnabled").val()=="true"&&(i=$("#txtPickupDate").is(":visible")?$("#txtPickupDate").val():$("#mtxtPickupDate").val(),r=$("#txtDropOffDate").is(":visible")?$("#txtDropOffDate").val():$("#mtxtDropOffDate").val(),i!=""&&i.indexOf("/")>-1&&(t=i.split("/"),i=t[2]+"-"+t[1]+"-"+t[0]),r!=""&&r.indexOf("/")>-1&&(t=r.split("/"),r=t[2]+"-"+t[1]+"-"+t[0]),divolte.signal("searchWidgetSearch",{affiliateCode:$("#CurrentChannelCode").val(),frontendName:"campertravel",environment:$("#CurrentEnvironment").val(),pageTitle:document.title,vehicleCategory:"campervan-hire",locationCountryCode:$("#CurrentMarketCode").val(),site:"campertravel",frontendVersion:"2.1.0",frontendServerId:"CT-Web",backendServerId:"CT-SQL",countryCode:$("#CurrentMarketCode").val(),pickupDate:i+"T00:00:00",dropoffDate:r+"T00:00:00",pickupLocationType:"ctloc",pickupLocationName:$("#ddlDepotsPickup").val(),pickupLocationValue:"ctloc;"+$("#ddlDepotsPickup").val()+";"+$("#ddlDepotsPickup").val(),pickupLocation:$("#ddlDepotsPickup").val(),dropoffLocationType:"ctloc",dropoffLocationName:$("#ddlDepotsDropOff").val(),dropoffLocationValue:"ctloc;"+$("#ddlDepotsDropOff").val()+";"+$("#ddlDepotsDropOff").val(),dropoffLocation:$("#ddlDepotsDropOff").val(),widgetType:"campertravel"}),$.trim(divolte_session_ids).length==0&&(divolte_session_ids="&divolteRelatedPartyId="+window.divolte.partyId+"&divolteRelatedPartySessionId="+window.divolte.sessionId+"&divolteRelatedPageViewId="+window.divolte.pageViewId)),Modernizr.touch&&Modernizr.inputtypes.date?(pDate=$("#txtPickupDate").is(":visible")?$("#txtPickupDate").datepicker("getDate"):new Date($("#mtxtPickupDate").val()),dDate=$("#txtDropOffDate").is(":visible")?$("#txtDropOffDate").datepicker("getDate"):new Date($("#mtxtDropOffDate").val())):(pDate=$("#txtPickupDate").is(":visible")?$("#txtPickupDate").datepicker("getDate"):$("#mtxtPickupDate").datepicker("getDate"),dDate=$("#txtDropOffDate").is(":visible")?$("#txtDropOffDate").datepicker("getDate"):$("#mtxtDropOffDate").datepicker("getDate")),setCookie("searchpageno","",1),pDate>dDate)return TranslateWarningMessages("Dropoff should be later than or equal to the pickup date.","#Warning"),!1;if($("#ddlDepotsPickup").val()=="0"||$("#ddlDepotsPickup").val()==null)return TranslateWarningMessages("Please select a pickup location.","#Warning"),!1;if($("#ddlDepotsDropOff").val()=="0"||$("#ddlDepotsDropOff").val()==null)return TranslateWarningMessages("Please select a dropoff location.","#Warning"),!1;var e=0,f=0,h=$("#hdChannelID").val();e=getParameterByName("v")?getParameterByName("v"):$("#hdVehicleId").val();u=0;$("*[name=Berth]:checked").val()=="4WD"?(f=0,u=4,$.cookie("vt",4,{expires:1,path:"/"})):(f=$("#Berth").length==0?$("input[name=Berth]:checked").val():$("#Berth").val(),u=$("input[name=w-type]:checked").val(),f=="4WD"&&(u=4,$.cookie("vt",4,{expires:1,path:"/"})));o=$("#txtPickupDate").is(":visible")?$("#txtPickupDate").val():$("#mtxtPickupDate").val();s=$("#txtDropOffDate").is(":visible")?$("#txtDropOffDate").val():$("#mtxtDropOffDate").val();redirect="/Search/?b="+f+"&lp="+$("#ddlDepotsPickup").val()+"&ld="+$("#ddlDepotsDropOff").val();redirect+="&dp="+o+"&dd="+s;redirect+="&at="+$("#cbAutomatic").is(":checked");redirect+="&sh="+$("#cbShower").is(":checked");redirect+="&dlt="+$("#lic-type").val();redirect+="&v="+e;redirect+="&vt="+u;redirect+="&ch="+h;redirect+=experimentURL;redirect+=divolte_session_ids;$("#SearchButton").hide();$("#Warning").hide();$("#loading").show();$(".btn-form-search").hide();$("#loads").on("click",function(){$("#searchload").hide()});n?window.open(redirect):$("#IsDNTrackingEnabled").val()=="true"?divolte.whenCommitted(function(){document.location.href=redirect}):setTimeout("window.parent.location.href = redirect",100)}function BindCookies(){var b,lp,ld,lps,lds,dp,dd,dlt,at,sh,pickDate,dropDate;b=getParameterByName("b")?getParameterByName("b"):$.cookie("b");b?($("*[name='Berth']").is(":radio")?$("*[name='Berth'][value='"+b+"']").attr("checked",!0):$("#Berth").val(b),$.cookie("b",b,{expires:1,path:"/"})):$.cookie("b",2,{expires:1,path:"/"});lp=getParameterByName("lp")?getParameterByName("lp"):$.cookie("lp");lp?($("#ddlDepotsPickup").val(lp),$("#ddlStatesPickup").val($("#ddlDepotsPickup option:selected").attr("data-state")),$.cookie("lp",lp,{expires:1,path:"/"})):$.cookie("lp",$("#ddlDepotsPickup").val(),{expires:1,path:"/"});ld=getParameterByName("ld")?getParameterByName("ld"):$.cookie("ld");ld?($("#ddlDepotsDropOff").val(ld),$("#ddlStatesDropOff").val($("#ddlDepotsDropOff option:selected").attr("data-state")),$.cookie("ld",ld,{expires:1,path:"/"})):$.cookie("ld",$("#ddlDepotsDropOff").val(),{expires:1,path:"/"});dp=getParameterByName("dp")?getParameterByName("dp"):$.cookie("dp");dp?($("#txtPickupDate").val(dp),$("#mtxtPickupDate").val(dp),$.cookie("dp",dp,{expires:1,path:"/"})):(pickDate=$("#txtPickupDate").is(":visible")?$("#txtPickupDate").val():$("#mtxtPickupDate").val(),$.cookie("dp",pickDate,{expires:1,path:"/"}));dd=getParameterByName("dd")?getParameterByName("dd"):$.cookie("dd");dd?($("#txtDropOffDate").val(dd),$("#mtxtDropOffDate").val(dd),$.cookie("dd",dd,{expires:1,path:"/"})):(dropDate=$("#txtDropOffDate").is(":visible")?$("#txtDropOffDate").val():$("#mtxtDropOffDate").val(),$.cookie("dd",dropDate,{expires:1,path:"/"}));$("#lic-type").attr("type")!="hidden"&&(dlt=getParameterByName("dlt")?getParameterByName("dlt"):$.cookie("dlt"),dlt?($("#lic-type").val(dlt),$.cookie("dlt",dlt,{expires:1,path:"/"})):$.cookie("dlt",$("#lic-type").val(),{expires:1,path:"/"}));vt=getParameterByName("vt")?getParameterByName("vt"):$.cookie("vt");vt?($("input[name='w-type'][value='"+vt+"']").attr("checked",!0),vt=="4"&&$("input[name='Berth'][value='4WD']").attr("checked",!0),$.cookie("vt",vt,{expires:1,path:"/"})):$.cookie("vt",0,{expires:1,path:"/"});at=getParameterByName("at")!=""?getParameterByName("at"):$.cookie("at");eval(at)?($("#cbAutomatic").attr("checked","checked"),$.cookie("at",!0,{expires:1,path:"/"})):$.cookie("at",!1,{expires:1,path:"/"});sh=getParameterByName("sh")!=""?getParameterByName("sh"):$.cookie("sh");eval(sh)?($("#cbShower").attr("checked","checked"),$.cookie("sh",!0,{expires:1,path:"/"})):$.cookie("sh",!1,{expires:1,path:"/"});$("input[name='Berth']").is(":radio")?$("input[name='Berth']").click(function(){b=$(this).val();$.cookie("b",b,{expires:1,path:"/"})}):$("#Berth").change(function(){b=$(this).val();$.cookie("b",b,{expires:1,path:"/"})});$("#vehicleType").change(function(){b=$(this).val();$.cookie("b",b,{expires:1,path:"/"})});$("#ddlDepotsPickup").change(function(){lp=$(this).val();$.cookie("lp",lp,{expires:1,path:"/"})});$("#ddlStatesPickup").change(function(){lps=$(this).val();$.cookie("lps",lps,{expires:1,path:"/"});GetPickupCities()});$("#ddlDepotsDropOff").change(function(){ld=$(this).val();$.cookie("ld",ld,{expires:1,path:"/"})});$("#ddlStatesDropOff").change(function(){lds=$(this).val();$.cookie("lds",lds,{expires:1,path:"/"});GetDropOffCities()});$("#txtPickupDate").change(function(){dp=$(this).val();$.cookie("dp",dp,{expires:1,path:"/"})});$("#mtxtPickupDate").change(function(){dp=$(this).val();$.cookie("dp",dp,{expires:1,path:"/"})});$("#txtDropOffDate").change(function(){dd=$(this).val();$.cookie("dd",dd,{expires:1,path:"/"})});$("#mtxtDropOffDate").change(function(){dd=$(this).val();$.cookie("dd",dd,{expires:1,path:"/"})});$("#lic-type").click(function(){dlt=$(this).val();$.cookie("dlt",dlt,{expires:1,path:"/"})});$("input[name='w-type']").click(function(){vt=$(this).val();$.cookie("vt",vt,{expires:1,path:"/"})});$("#cbAutomatic").click(function(){at=$(this).is(":checked");$.cookie("at",at,{expires:1,path:"/"})});$("#cbShower").click(function(){sh=$(this).is(":checked");$.cookie("sh",sh,{expires:1,path:"/"})})}function GetPickupCities(){$("#ddlDepotsPickup option").remove();$("#ddlRegions option").each(function(n,t){$(t).attr("data-state")==$("#ddlStatesPickup").val()&&$("#ddlDepotsPickup").append($(t).clone())});SetFormValues()}function GetDropOffCities(){$("#ddlDepotsDropOff option").remove();$("#ddlRegions option").each(function(n,t){$(t).attr("data-state")==$("#ddlStatesDropOff").val()&&$("#ddlDepotsDropOff").append($(t).clone())});SetFormValues()}function FormStyling(){$("label select").on("change",function(){$(this).prev().find("b").text($("option:selected",this).text())});$("label input:text").on("change",function(){$(this).prev().find("b").text($(this).val())});$(".chkbox label").on("change",function(){$(this).find(".chkbox").toggleClass("thick")})}function SetFormValues(){$("label select,label input").each(function(){var n=$(this).val();$(this).is("select")&&$("option:selected",this).val()!=""&&(n=$("option:selected",this).text());$(this).is("input:checkbox")&&$(this).is(":checked")&&$(this).prev().addClass("thick");$(this).prev().find("b").text(n)});$("#ddlDepotsPickup").change();$("#ddlDepotsDropOff").change()}function Square_Init(){$(".calc .datepicker").each(function(){var n=$(this).val();$(this).val()!=""&&(n=$(this).val());$(this).attr("disable","disable").css({"z-index":10,opacity:0}).after('<div class="text text-date">'+n+"<\/div>").change(function(){val=$(this).val();$(this).next().text(val)})})}function TranslateWarningMessages(n,t){var i=$("html").attr("lang");i=="en"?$(t).text(n):$.ajax({type:"GET",url:"/CMS/GoogleAPITranslate?WordsToBeTranslated="+n}).done(function(n,i){i=="success"?$(t).text(n):$(t).text("Error in translation.")})}function SearchRedirect(n,t,i){var r,e,o;if(Modernizr.touch&&Modernizr.inputtypes.date?(pDate=$("#txtPickupDate").is(":visible")?$("#txtPickupDate").datepicker("getDate"):new Date($("#mtxtPickupDate").val()),dDate=$("#txtDropOffDate").is(":visible")?$("#txtDropOffDate").datepicker("getDate"):new Date($("#mtxtDropOffDate").val())):(pDate=$("#txtPickupDate").is(":visible")?$("#txtPickupDate").datepicker("getDate"):$("#mtxtPickupDate").datepicker("getDate"),dDate=$("#txtDropOffDate").is(":visible")?$("#txtDropOffDate").datepicker("getDate"):$("#mtxtDropOffDate").datepicker("getDate")),setCookie("searchpageno","",1),pDate>dDate)return TranslateWarningMessages("Dropoff should be later than or equal to the pickup date.","#Warning"),!1;if($("#ddlDepotsPickup").val()=="0"||$("#ddlDepotsPickup").val()==null)return TranslateWarningMessages("Please select a pickup location.","#Warning"),!1;if($("#ddlDepotsDropOff").val()=="0"||$("#ddlDepotsDropOff").val()==null)return TranslateWarningMessages("Please select a dropoff location.","#Warning"),!1;var f=0,u=0,s=i;f=getParameterByName("v")?getParameterByName("v"):$("#hdVehicleId").val();r=0;$("*[name=Berth]:checked").val()=="4WD"?(u=0,r=4,$.cookie("vt",4,{expires:1,path:"/"})):(u=$("#Berth").length==0?$("input[name=Berth]:checked").val():$("#Berth").val(),r=$("input[name=w-type]:checked").val(),u=="4WD"&&(r=4,$.cookie("vt",4,{expires:1,path:"/"})));e=$("#txtPickupDate").is(":visible")?$("#txtPickupDate").val():$("#mtxtPickupDate").val();o=$("#txtDropOffDate").is(":visible")?$("#txtDropOffDate").val():$("#mtxtDropOffDate").val();redirect=t+"/Search/?b="+u+"&lp="+$("#ddlDepotsPickup").val()+"&ld="+$("#ddlDepotsDropOff").val();redirect+="&dp="+e+"&dd="+o;redirect+="&at="+$("#cbAutomatic").is(":checked");redirect+="&sh="+$("#cbShower").is(":checked");redirect+="&dlt="+$("#lic-type").val();redirect+="&v="+f;redirect+="&vt="+r;redirect+="&ch="+s;$("#SearchButton").hide();$("#Warning").hide();$("#loading").show();$(".btn-form-search").hide();$("#loads").on("click",function(){$("#searchload").hide()});n?window.open(redirect):setTimeout("window.parent.location.href = redirect",100)}function ParticipateDN_ABTest(){var f=$("#IsDNTestEnabled").val(),t,r;if(f=="true"){$("#calculator").hide();$("#DNQuoteCalc").hide();var i=$("#DriveNowABTestExperimentName").val(),e=$("#DriveNowABTestExperimentAlt1").val(),o=$("#DriveNowABTestExperimentAlt2").val(),s=$("#DriveNowABTestExperimentAlt3").val(),h=$("#DriveNowABTestExperimentAlt4").val(),u=$.cookie("clientid"),n="";u==""||u==null?(n=$("#ClientId").val(),$.cookie("clientid",n,{expires:1,path:"/"})):n=$.cookie("clientid");experimentURL="&experiment="+i+"&client_id="+n;t=$("#Current_AB_Alternative").val();t==e||t==s?($("#calculator").show(),$("#DNQuoteCalc").hide()):t==o||t==h?($("#calculator").hide(),$("#DNQuoteCalc").show()):($("#calculator").show(),$("#DNQuoteCalc").hide());window.location.pathname=="/"&&divolte.signal("abTestParticipation",{affiliateCode:$("#CurrentChannelCode").val(),frontendName:"campertravel",environment:$("#CurrentEnvironment").val(),pageTitle:document.title,vehicleCategory:"campervan-hire",locationCountryCode:$("#CurrentMarketCode").val(),site:"campertravel",abTestExperiment:i,abTestAlternative:t,abTestProvider:"sixpack-ct",frontendServerId:"CT-Web",backendServerId:"CT-SQL",frontendVersion:"2.1.0",countryCode:$("#CurrentMarketCode").val(),abTestClientId:n});$("body").attr("id")=="body_search_index"&&document.location.href.indexOf("experiment=")==-1&&document.location.href.indexOf("client_id=")==-1&&(r=document.location.href+"&experiment="+i+"&client_id="+n,history.pushState&&window.history.pushState({path:r},"",r))}}function Home_Index_Init(){$(".ca").click(function(){tb_show("Check Availability","/Calculator/Vehicle/"+$(this).attr("data-vehicle")+"?KeepThis=true&TB_iframe=true&height=300&width=720&popup=true")})}function Search_Init(){$("#bnResetShortlist").click(ResetShortlist);$(".bnCompare").on("click",function(){if($(this).hasClass("active"))RemoveFromShortlist($(this).attr("data-hash")),$(this).toggleClass("active");else{var n=AddToShortlist($(this).attr("data-hash"));n&&$(this).toggleClass("active")}});GetOffers()}function GetOffers(){currentpage=1;$("#divOffers").addClass("loading");$.get("OfferPaged",{SearchId:$("#hdSearchId").val(),PageNo:currentpage},OffersReturned)}function OffersReturned(n){$("#divOffers").removeClass("loading");$("#divOffers").html(n);$("#OfferDataPagination").quickPagination({pageSize:"8",pagerLocation:"both"});$(".simplePagerContainer").removeClass("col-xs-12 col-sm-7 col-md-7 col-lg-7");$(".simplePagerNav:first").addClass("row top")}function GetPagedOffer(n){getCookie("searchpageno")!=n&&(setCookie("searchpageno",n,1),$("#divOffers").addClass("loading"),$.get("OfferPaged",{SearchId:$("#hdSearchId").val(),PageNo:n},OffersReturned))}function GetPrevNextOffer(n,t){switch(n){case"PrevTop":scroll=!1;t--;break;case"NextTop":scroll=!0;t++;break;case"PrevBottom":scroll=!1;t--;break;case"NextBottom":scroll=!0;t++}setCookie("searchpageno",t,1);$("#divOffers").addClass("loading");$.get("OfferPaged",{SearchId:$("#hdSearchId").val(),PageNo:t},OffersReturned)}function VehicleDetails_Init(){$("#bnVehicleDetailsCheckAvailability").click(function(){CheckAvailabilityQuote($(this).attr("data-href"))});$("#bnCheckAvailabilityQuote").click(function(){CheckAvailabilityQuote($("#bnVehicleDetailsCheckAvailability").attr("data-href"))});$("#bnCheckAvailabilityCalculator").click(function(){tb_show("Check Availability","/Calculator/Vehicle/"+$(this).attr("data-vehicle")+"?KeepThis=true&TB_iframe=true&height=300&width=720&popup=true")});$("#bnVehicleDetailsCheckAvailability").length>0&&$("#bnCheckAvailabilityQuote").show();readMore();$(".fancybox").fancybox({showCloseButton:!1,titlePosition:"inside",titleFormat:formatTitle,showNavArrows:!0,cyclic:!0,opacity:!0});$("#VideoUrl").length&&$("#VideoUrl").click(function(){return $.fancybox({padding:0,autoScale:!1,transitionIn:"none",transitionOut:"none",title:this.title,width:680,height:495,href:this.href.replace(new RegExp("watch\\?v=","i"),"v/"),type:"iframe",showNavArrows:!1}),!1})}function formatTitle(n,t,i){return'<div id="fancy-nav"><a style="float:left" href="javascript:void(0)" onclick="$.fancybox.prev()"><img src="/Content/site/images/btn-prev.gif" /><\/a> <span><a href="javascript:void(0)"  onclick="$.fancybox.next()"><img src="/Content/site/images/btn-next.gif" /><\/a><\/span><\/div><div id="tip7-title"><span><a href="javascript:;" onclick="$.fancybox.close();"><img src="/Content/site/images/closelabel.gif" /><\/a><\/span>'+(n&&n.length?"<b>"+n+"<\/b>":"")+"Image "+(i+1)+" of "+t.length+"<\/div>"}function Depot_Operator_Init(){$(".ca").click(function(){});$("#OperatorCheckAvail").on("show.bs.modal",function(n){var t=$(n.relatedTarget),u=t.data("title"),f=t.data("vehicle"),e="/Calculator/Vehicle/"+f,i=$(this),r=$("body").attr("id")=="body_home_index"?!0:!1;$.get(e,function(n){i.find(".modal-title").text(u);i.find(".modal-dialog").html(n);$("#CurrentChannelCode").val()=="AU"||$("#CurrentChannelCode").val()=="AUN"||$("#CurrentChannelCode").val()=="NZ"||$("#CurrentChannelCode").val()=="NZN"||$("#CurrentChannelCode").val()=="US"||$("#CurrentChannelCode").val()=="USN"||$("#CurrentChannelCode").val()=="CA"||$("#CurrentChannelCode").val()=="CAN"||$("#CurrentChannelCode").val()=="ZA"||$("#CurrentChannelCode").val()=="EU"?Calculator_Init():(r&&InitializeModalDatePickers(),Calculator_Init(),r&&(PopulatePickupDropoffOnModal(),InitializeModalDropdowns(),$("#loading").attr("id","loading_main")));$("#searchload_vehiclecalc").on("click",function(){$("#searchload_vehiclecalc").hide();$("#loading_vehiclecalc").show()})})});$(".sInfo h3").on("click",function(){$(this).hasClass("active")?$(this).removeClass().next().removeClass():$(this).addClass("active").next().addClass("active")});$.ajax({url:"https://ws.sharethis.com/button/buttons.js",dataType:"script",cache:!0}).done(function(){stLight.options({publisher:"ur-42449945-ec4f-cbd3-c4f-3d059d588583"})})}function PopulatePickupDropoffOnModal(){$("#ddlRegions optgroup").length?$("#modal-content #ddlRegions optgroup").each(function(n,t){$("#modal-content select[id='ddlDepotsPickup']").append($(t).clone());$("#modal-content select[id='ddlDepotsDropOff']").append($(t).clone())}):$("#modal-content #ddlRegions option").each(function(n,t){$("#modal-content select[id='ddlDepotsPickup']").append($(t).clone());$("#modal-content select[id='ddlDepotsDropOff']").append($(t).clone())});$("#modal-content select[id='ddlDepotsPickup']").val($("#ddlDepotsPickup").val());$("#modal-content select[id='ddlDepotsDropOff']").val($("#ddlDepotsDropOff").val());$("#modal-content select[id='ddlDepotsPickup']").click(function(){var n=$(this).find("option:selected");$("#ddlDepotsPickup").val(n.val())});$("#modal-content select[id='ddlDepotsDropOff']").click(function(){var n=$(this).find("option:selected");$("#ddlDepotsDropOff").val(n.val())});$("#modal-content select[id='lic-type']").val($("#lic-type").val());$("#modal-content select[id='lic-type']").click(function(){var n=$(this).find("option:selected");$("#lic-type").val(n.val())});$("#modal-content div[id='Warning']").attr("id","Warning1");$("#modal-content .ModalSearchButton").attr("onclick","SearchModal()")}function InitializeModalDatePickers(){$("#modal-content input[id='txtPickupDate']").attr("id","txtPickupDate1");$("#modal-content input[id='txtDropOffDate']").attr("id","txtDropOffDate1");$("#modal-content input[id='mtxtPickupDate']").attr("id","mtxtPickupDate1");$("#modal-content input[id='mtxtDropOffDate']").attr("id","mtxtDropOffDate1");$("#modal-content input[id='txtPickupDate1']").datepicker({numberOfMonths:3,showButtonPanel:!0,dateFormat:"dd/mm/yy",changeMonth:!0,changeYear:!0,minDate:new Date,maxDate:(new Date).add({years:2}),showAnim:"",onSelect:function(){$("#txtPickupDate").val($(this).val())}});$("#modal-content input[id='txtDropOffDate1']").datepicker({numberOfMonths:3,showButtonPanel:!0,dateFormat:"dd/mm/yy",changeMonth:!0,changeYear:!0,minDate:new Date,maxDate:(new Date).add({years:2}),showAnim:"",onSelect:function(){$("#txtDropOffDate").val($(this).val())}});Modernizr.touch&&Modernizr.inputtypes.date||($("#modal-content input[id='mtxtPickupDate1']").attr("type","text").prop("readonly",!0).datepicker({dateFormat:"dd/mm/yy",minDate:new Date,maxDate:(new Date).add({years:2}),showAnim:"",onSelect:function(){$("#mtxtPickupDate").val($(this).val())}}),$("#modal-content input[id='mtxtDropOffDate1']").attr("type","text").prop("readonly",!0).datepicker({dateFormat:"dd/mm/yy",minDate:new Date,maxDate:(new Date).add({years:2}),showAnim:"",onSelect:function(){$("#mtxtDropOffDate").val($(this).val())}}));$("#modal-content input[id='mtxtPickupDate1']").val($("#mtxtPickupDate").val());$("#modal-content input[id='mtxtDropOffDate1']").val($("#mtxtDropOffDate").val());$("#modal-content input[id='txtPickupDate1']").val($("#txtPickupDate").val());$("#modal-content input[id='txtDropOffDate1']").val($("#txtDropOffDate").val());$("#calculator input[id='hdVehicleId']").val($("#modal-content input[id='hdVehicleId']").val())}function InitializeModalDropdowns(){$("#modal-content select[id='ddlDepotsPickup']").attr("id","ddlDepotsPickup1");$("#modal-content select[id='ddlDepotsDropOff']").attr("id","ddlDepotsDropOff1");$("#modal-content select[id='lic-type']").attr("id","lic-type1");$("#modal-content select[id='ddlDepotsPickup1']").val($("#ddlDepotsPickup").val());$("#modal-content select[id='ddlDepotsDropOff1']").val($("#ddlDepotsDropOff").val());$("#modal-content select[id='lic-type1']").val($("#lic-type").val())}function SearchModal(){if(Modernizr.touch&&Modernizr.inputtypes.date?(pDate=$("#txtPickupDate1").is(":visible")?$("#txtPickupDate1").datepicker("getDate"):new Date($("#mtxtPickupDate1").val()),dDate=$("#txtDropOffDate1").is(":visible")?$("#txtDropOffDate1").datepicker("getDate"):new Date($("#mtxtDropOffDate1").val()),$("#mtxtPickupDate").val($("#mtxtPickupDate1").val()),$("#mtxtDropOffDate").val($("#mtxtDropOffDate1").val())):(pDate=$("#txtPickupDate1").is(":visible")?$("#txtPickupDate1").datepicker("getDate"):$("#mtxtPickupDate1").datepicker("getDate"),dDate=$("#txtDropOffDate1").is(":visible")?$("#txtDropOffDate1").datepicker("getDate"):$("#mtxtDropOffDate1").datepicker("getDate")),pDate>dDate)return $("#Warning1").text("Dropoff should be later than or equal to the pickup date."),!1;$("#ddlDepotsPickup").val($("#ddlDepotsPickup1").val());$("#ddlDepotsDropOff").val($("#ddlDepotsDropOff1").val());$("#lic-type").val($("#lic-type1").val());Search()}function CheckAvailability_Init(){var r,i,o;if($.cookie("AV.FirstName")&&$("#FirstName").val($.cookie("AV.FirstName")),$.cookie("AV.LastName")&&$("#LastName").val($.cookie("AV.LastName")),$.cookie("AV.Email")&&$("#Email").val($.cookie("AV.Email")),$.cookie("AV.Phone")&&$("#Phone").val($.cookie("AV.Phone")),$.cookie("AV.Country")&&$("#Country_CountryID").val($.cookie("AV.Country")),$.cookie("AV.Adults")&&$("#Adults").val($.cookie("AV.Adults")),$.cookie("AV.Children")&&$("#Children").val($.cookie("AV.Children")),r=getParameterByName("type"),r=="booknow")$.cookie("AV.CreditCardNumber")&&$("#CreditCardNumber").val($.cookie("AV.CreditCardNumber")),$.cookie("AV.NameOnCard")&&$("#NameOnCard").val($.cookie("AV.NameOnCard")),$.cookie("AV.CreditCardType")&&$("#CreditCardType").val($.cookie("AV.CreditCardType")),$.cookie("AV.ExpiryMonth")&&$("#ExpiryMonth").val($.cookie("AV.ExpiryMonth")),$.cookie("AV.ExpiryYear")&&$("#ExpiryYear").val($.cookie("AV.ExpiryYear")),$.cookie("AV.Comments")&&$("#Comments").val($.cookie("AV.Comments")),$("#bnPackageTerms1").click(function(){Popup(URLGet("terms"))}),$("#bnCTTerms").click(function(){Popup("/Info/TermsAndConditions/?p=1")}),$("#bnBook").click(function(n){window.parent.oBooking&&(oBooking=window.parent.oBooking,$(oBooking.InsuranceApplicable).each(function(n,t){t.Description=null}),$(oBooking.ExtraHiresApplicable).each(function(n,t){t.ExtraHireItem.Description=null}),$("#InsuranceChoices").val($.toJSON(oBooking.InsuranceApplicable).replace(/\/Date\(\d+\)\//g,"01/01/1900")),$("#ExtraChoices").val($.toJSON(oBooking.ExtraHiresApplicable).replace(/\/Date\(\d+\)\//g,"01/01/1900")));$.cookie("AV.FirstName",$("#FirstName").val(),{expires:1,path:"/"});$.cookie("AV.LastName",$("#LastName").val(),{expires:1,path:"/"});$.cookie("AV.Email",$("#Email").val(),{expires:1,path:"/"});$.cookie("AV.Phone",$("#Phone").val(),{expires:1,path:"/"});$.cookie("AV.Country",$("#Country_CountryID").val(),{expires:1,path:"/"});$.cookie("AV.Adults",$("#Adults").val(),{expires:1,path:"/"});$.cookie("AV.Children",$("#Children").val(),{expires:1,path:"/"});$.cookie("AV.CreditCardNumber",$("#CreditCardNumber").val(),{expires:1,path:"/"});$.cookie("AV.NameOnCard",$("#NameOnCard").val(),{expires:1,path:"/"});$.cookie("AV.CreditCardType",$("#CreditCardType").val(),{expires:1,path:"/"});$.cookie("AV.ExpiryMonth",$("#ExpiryMonth").val(),{expires:1,path:"/"});$.cookie("AV.ExpiryYear",$("#ExpiryYear").val(),{expires:1,path:"/"});$.cookie("AV.Comments",$("#Comments").val(),{expires:1,path:"/"});$("#Children").val()=="0"&&$("#ChildrenAge").val("No children");n.preventDefault();$("form").submit()}),$("#booknow form").attr("action","/quote/booknow?"+location.href.split("?")[1]);else if(r=="search3"||document.URL.indexOf("/Search3/?")>0){parseInt($("#Children").val())==0||parseInt($("button[data-id='Children']").attr("title"))==0?$("#jsAgeOfChildren").hide():$("#jsAgeOfChildren").show();$(document.body).on("change","#Children",function(){parseInt($("#Children").val())==0||parseInt($("button[data-id='Children']").attr("title"))==0?$("#jsAgeOfChildren").hide():($("#AgeOfChildren").val(""),$("#jsAgeOfChildren").show())});$(document.body).on("click","#bnBook",function(n){var i,t;window.parent.oBooking&&(oBooking=window.parent.oBooking,$(oBooking.InsuranceApplicable).each(function(n,t){t.Description=null}),$(oBooking.ExtraHiresApplicable).each(function(n,t){t.ExtraHireItem.Description=null}),$("#InsuranceChoices").val($.toJSON(oBooking.InsuranceApplicable).replace(/\/Date\(\d+\)\//g,"01/01/1900")),$("#ExtraChoices").val($.toJSON(oBooking.ExtraHiresApplicable).replace(/\/Date\(\d+\)\//g,"01/01/1900")));$.cookie("AV.FirstName",$("#FirstName").val(),{expires:1,path:"/"});$.cookie("AV.LastName",$("#LastName").val(),{expires:1,path:"/"});$.cookie("AV.Email",$("#Email").val(),{expires:1,path:"/"});$.cookie("AV.Phone",$("#Phone").val(),{expires:1,path:"/"});$.cookie("AV.Country",$("#Country_CountryID").val(),{expires:1,path:"/"});$.cookie("AV.Adults",$("#Adults").val(),{expires:1,path:"/"});$.cookie("AV.Children",$("#Children").val(),{expires:1,path:"/"});$("input:hidden[id='Toddler']").val(0);(parseInt($("#Children").val())==0||parseInt($("button[data-id='Children']").attr("title"))==0)&&$("#AgeOfChildren").val("none");i=$("#AgeOfChildren").val();$("#AgeOfChildren").val(i.replace(/(<([^>]+)>)/ig,""));n.preventDefault();$(this).parents("form").submit();$(this).data("src")!=="search-page"&&$(".searchavailability").addClass("loading");$("#FirstName").hasClass("input-validation-error")||$("#LastName").hasClass("input-validation-error")||$("#Email").hasClass("input-validation-error")||(t=document.URL,t.indexOf("/Search/?")>0&&(location.hash="thankyou"));$("#FirstName").hasClass("input-validation-error")||$("#LastName").hasClass("input-validation-error")||$("#Email").hasClass("input-validation-error")||(t=document.URL,t.indexOf("/Search3/?")>0&&(location.hash="thankyou"))});$("#CheckAvailability form").attr("action","/quote/availabilitysearch3?"+location.href.split("?")[1])}else if(r=="search4"||document.URL.indexOf("/Search4/?")>0){$("#bnBook").hide();i=$("#Country_CountryID option:selected").val();u(i);$("#Country_CountryID").on("change",function(){var n=$("#Country_CountryID option:selected").val();alert(n);u(n)});function u(n){var t=$(".not-allowed").attr("data-countries"),i,r,u;if(t!=undefined)if(t!=null)if(i=t.split(","),i.length>0)for(r=0;r<i.length;r++){if(u=parseInt(i[r]),u==n)return $("#bnBook").hide(),$("#CheckAvailability").button("refresh"),$("#message-notallowed").show(),!1;$("#bnBook").show();$("#message-notallowed").hide()}else countryname=t,$("#bnBook").show();else $("#bnBook").show();else $("#bnBook").show()}$(document.body).on("click","#bnBook",function(n){var t;window.parent.oBooking&&(oBooking=window.parent.oBooking,$(oBooking.InsuranceApplicable).each(function(n,t){t.Description=null}),$(oBooking.ExtraHiresApplicable).each(function(n,t){t.ExtraHireItem.Description=null}),$("#InsuranceChoices").val($.toJSON(oBooking.InsuranceApplicable).replace(/\/Date\(\d+\)\//g,"01/01/1900")),$("#ExtraChoices").val($.toJSON(oBooking.ExtraHiresApplicable).replace(/\/Date\(\d+\)\//g,"01/01/1900")));$.cookie("AV.FirstName",$("#FirstName").val(),{expires:1,path:"/"});$.cookie("AV.LastName",$("#LastName").val(),{expires:1,path:"/"});$.cookie("AV.Email",$("#Email").val(),{expires:1,path:"/"});$.cookie("AV.Phone",$("#Phone").val(),{expires:1,path:"/"});$.cookie("AV.Country",$("#Country_CountryID").val(),{expires:1,path:"/"});$.cookie("AV.Adults",$("#Adults").val(),{expires:1,path:"/"});$.cookie("AV.Children",$("#Children").val(),{expires:1,path:"/"});n.preventDefault();$(this).parents("form").submit();$(this).data("src")!=="search-page"&&$(".searchavailability").addClass("loading");$("#FirstName").hasClass("input-validation-error")||$("#LastName").hasClass("input-validation-error")||$("#Email").hasClass("input-validation-error")||(t=document.URL,t.indexOf("/Search/?")>0&&(location.hash="thankyou"));$("#FirstName").hasClass("input-validation-error")||$("#LastName").hasClass("input-validation-error")||$("#Email").hasClass("input-validation-error")||(t=document.URL,t.indexOf("/Search3/?")>0&&(location.hash="thankyou"))});$("#CheckAvailability form").attr("action","/quote/availability?"+location.href.split("?")[1])}else{$(document).on("click","#AddAdult",function(){var n=parseInt($("#AdultSelected").text())+1;n<=8&&$("#AdultSelected").text(n)});$(document).on("click","#SubtractAdult",function(){var n=parseInt($("#AdultSelected").text())-1;n>=1&&$("#AdultSelected").text(n)});$(document).on("click","#AddChild",function(){var n=parseInt($("#ChildrenSelected").text())+1;n<=8&&$("#ChildrenSelected").text(n)});$(document).on("click","#SubtractChild",function(){var n=parseInt($("#ChildrenSelected").text())-1;n>=0&&$("#ChildrenSelected").text(n)});$(document).on("click","#AddToddler",function(){var n=parseInt($("#ToddlerSelected").text())+1;n<=8&&$("#ToddlerSelected").text(n)});$(document).on("click","#SubtractToddler",function(){var n=parseInt($("#ToddlerSelected").text())-1;n>=0&&$("#ToddlerSelected").text(n)});$("#bnBook").hide();i=$("#Country_CountryID option:selected").val();u(i);$("#Country_CountryID").on("change",function(){var n=$("#Country_CountryID option:selected").val();u(n)});function u(n){var t=$(".not-allowed").attr("data-countries"),i,r,u;if(t!=undefined)if(t!=null)if(i=t.split(","),i.length>0)for(r=0;r<i.length;r++){if(u=parseInt(i[r]),u==n)return $("#bnBook").hide(),$("#CheckAvailability").button("refresh"),$("#message-notallowed").show(),!1;$("#bnBook").show();$("#message-notallowed").hide()}else countryname=t,$("#bnBook").show();else $("#bnBook").show();else $("#bnBook").show()}$(document.body).on("click","#bnBook",function(n){var i,r,t;if(window.parent.oBooking){if(oBooking=window.parent.oBooking,$(".pcheckavail form").length&&(oBooking.Vehicle.Supplier.SupplierID==79||oBooking.Vehicle.Supplier.SupplierID==2)&&(i=0,$(oBooking.ExtraHiresApplicable).each(function(n,t){if((t.ExtraHireItem.ItemName.toLowerCase().indexOf("mileage option")!=-1||t.ExtraHireItem.ItemName.toLowerCase().indexOf("kilometer option")!=-1)&&t.ExtraHireItem.Parent==0)return i=t.ExtraHireItem.ExtraHireItemID,!1}),r=!1,$(oBooking.ExtraHiresApplicable).each(function(n,t){t.ExtraHireItem.Parent==i&&t.Added>0&&(r=!0)}),!r))return alert("Please select a Mileage / Kilometer option."),!1;$(oBooking.InsuranceApplicable).each(function(n,t){t.Description=null});$(oBooking.ExtraHiresApplicable).each(function(n,t){t.ExtraHireItem.Description=null});$("#InsuranceChoices").val($.toJSON(oBooking.InsuranceApplicable).replace(/\/Date\(\d+\)\//g,"01/01/1900"));$("#ExtraChoices").val($.toJSON(oBooking.ExtraHiresApplicable).replace(/\/Date\(\d+\)\//g,"01/01/1900"))}$.cookie("AV.FirstName",$("#FirstName").val(),{expires:1,path:"/"});$.cookie("AV.LastName",$("#LastName").val(),{expires:1,path:"/"});$.cookie("AV.Email",$("#Email").val(),{expires:1,path:"/"});$.cookie("AV.Phone",$("#Phone").val(),{expires:1,path:"/"});$.cookie("AV.Country",$("#Country_CountryID").val(),{expires:1,path:"/"});$("input:hidden[id='Adults']").val($("#AdultSelected").text());$("input:hidden[id='Children']").val($("#ChildrenSelected").text());$("input:hidden[id='Toddler']").val($("#ToddlerSelected").text());$("input:hidden[id='AgeOfChildren']").val("none");n.preventDefault();$(this).parents("form").submit();$(this).data("src")!=="search-page"&&$(".searchavailability").addClass("loading");$("#FirstName").hasClass("input-validation-error")||$("#LastName").hasClass("input-validation-error")||$("#Email").hasClass("input-validation-error")||(t=document.URL,t.indexOf("/Search/?")>0&&(location.hash="thankyou"));$("#FirstName").hasClass("input-validation-error")||$("#LastName").hasClass("input-validation-error")||$("#Email").hasClass("input-validation-error")||(t=document.URL,t.indexOf("/Search3/?")>0&&(location.hash="thankyou"))});$("#CheckAvailability form").attr("action","/quote/availability?"+location.href.split("?")[1])}var n=getParameterByName("sid"),s=Date.today().add({days:30}),e=getParameterByName("dp").split("/"),f=new Date(e[2],e[1]-1,e[0]),h=$("#no_deposit_thl_avail").attr("data-thl2017-startdate"),t=new Date(h);t.setHours(0);t.setMinutes(0);t.setSeconds(0);t.setMilliseconds(0);o=Date.today().add({days:90});n?(n=="22"||n=="28"||n=="3"||n=="37"||n=="12"||n=="32"||n=="4"||n=="27"||n=="26"||n=="73")&&s<f&&f<t?$("#no_deposit_thl_avail").show():(n=="22"||n=="28"||n=="3"||n=="37"||n=="12"||n=="32"||n=="4"||n=="27"||n=="26"||n=="73")&&o<f&&f>=t?$("#no_deposit_thl_avail").hide():$("#no_deposit_thl_avail").hide():$("#no_deposit_thl_avail").hide()}function URLGet(n){var t=document.URL.split("#").shift().toLowerCase();switch(n){case"terms":t=t.replace("{Quote}","Quote");t=t.replace("{Action}","PackageTerms");break;default:t=document.URL.split("#").shift()}return t}function PriceDetails_Init(){var t,n,i;version=getParameterByName("version");$(".price .c li > a").on("click",function(){$(this).toggleClass("active").parent().find("p").toggle()});$(".ExtraHireItem").find("input[type='checkbox']").click(function(){resetGroup(this)});$(".ExtraHireDropDown").change(function(){resetGroup(this)});$(".InsuranceRadio").click(function(){Calculate()});$(".SpecialsRadio").click(function(){LoadSpecials(this)});$("#bnVehicleSpecs").click(function(){Popup(URLGet("specs"))});$("#bnPackageTerms").click(function(){Popup(URLGet("terms"))});$("#jsDisplayTravelDateRentalAverage").click(function(n){if(n.shiftKey){var t=URLGet("breakdown");Popup(t)}});$("#bnPriceDetailsCheckAvailability").click(function(){$("#hdBooking").val(oBooking.TravelDatesTotal);CheckAvailabilityQuote(URLGet("availability"))});$("#row_deposit").show();$("#no_deposit_thl").hide();t=getParameterByName("suptype");t!="b2b"&&$(".notify").hide();n=document.URL.split("#").shift().toLowerCase();n.indexOf("onlinebooknow")>-1&&($("#row_deposit_avail2").show(),$("#deposit_blurb").show(),$("#no_deposit_thl_avail").hide(),$("#GrandTotalDepositFooter").show(),$("#GrandTotalDepositFooter_Currency").show(),$("#Non-THL-Deposit-Line").show(),$("#THL-No-Deposit-Line").hide());i=getParameterByName("type");(type="booknowb")&&n.indexOf("onlinebooknow")>-1&&$.get("/Search2/GetPackageTypeUrls/?VehicleId="+getParameterByName("vid")+"&SearchId="+getParameterByName("searchId"),function(t){StandardPackageParameter=t.StandardPackageUrl;AllInclusivePackageParameter=t.AllInclusivePackageUrl;$("#SaveYourQuoteButton").click(function(){$("#MainForm").show();$(".BookNowForm").hide();$(".SaveYourQuoteForm").show();$("#bnSaveQuote").show();$("#bnBook").hide();$("input[name='PackageType'][value='Standard']").is(":checked")?$("form").attr("action","/Quote/OnlineBookNow/?"+StandardPackageParameter):$("input[name='PackageType'][value='AllInclusive']").is(":checked")&&$("form").attr("action","/Quote/OnlineBookNow/?"+AllInclusivePackageParameter);$("#FirstName").focus()});$("#BookNowButton").click(function(){$("#MainForm").show();$(".BookNowForm").show();$(".SaveYourQuoteForm").show();$("#bnSaveQuote").hide();$("#bnBook").show();$("input[name='PackageType'][value='Standard']").is(":checked")?$("form").attr("action","/Quote/OnlineBookNow/?"+StandardPackageParameter):$("input[name='PackageType'][value='AllInclusive']").is(":checked")&&$("form").attr("action","/Quote/OnlineBookNow/?"+AllInclusivePackageParameter);$("#NameOnCard").focus()});$("input[type=radio][name=PackageType]").change(function(){this.value=="Standard"?(BookingGetOnlineBookNow(StandardPackageParameter),$("#MainForm").is(":visible")&&$("form").attr("action","/Quote/OnlineBookNow/?"+StandardPackageParameter)):(this.value="AllInclusive")&&(BookingGetOnlineBookNow(AllInclusivePackageParameter),$("#MainForm").is(":visible")&&$("form").attr("action","/Quote/OnlineBookNow/?"+AllInclusivePackageParameter))});$("#bnPackageTermsOnlineBookNow").click(function(){$("input[name='PackageType'][value='Standard']").is(":checked")?Popup(URLGetOnlineBookNow("terms",StandardPackageParameter)):$("input[name='PackageType'][value='AllInclusive']").is(":checked")&&Popup(URLGetOnlineBookNow("terms",AllInclusivePackageParameter))});StandardPackageParameter!=""&&AllInclusivePackageParameter!=""?($("#StandardCheckBox").show(),$("#AllInclusiveCheckBox").show(),n.indexOf("inc=true")>-1?$("input[name='PackageType'][value='AllInclusive']").attr("checked","checked"):$("input[name='PackageType'][value='Standard']").attr("checked","checked")):StandardPackageParameter==""&&AllInclusivePackageParameter!=""?($("#StandardCheckBox").hide(),$("#AllInclusiveCheckBox").show(),$("input[name='PackageType'][value='AllInclusive']").attr("checked","checked")):StandardPackageParameter!=""&&AllInclusivePackageParameter==""&&($("#StandardCheckBox").show(),$("#AllInclusiveCheckBox").hide(),$("input[name='PackageType'][value='Standard']").attr("checked","checked"));$("input[name='PackageType'][value='Standard']").is(":checked")?BookingGetOnlineBookNow(StandardPackageParameter):$("input[name='PackageType'][value='AllInclusive']").is(":checked")&&BookingGetOnlineBookNow(AllInclusivePackageParameter)});window.scrollTo=function(){};n.indexOf("onlinebooknow")>-1||BookingGet()}function getRate(rate){var output=$("#ddlCurrencySelect").val(),input=$("#ddlCurrencySelect option:contains('"+$(".jsCurrencyCode").text()+"')").val(),mAmount=rate.split(",").join(""),mExchange;return isNaN(mAmount)?"<strong> --.-- <\/strong>":(mExchange=eval(output*mAmount/input),"<strong> "+formatCurrency(mExchange)+" <\/strong>")}function BookingGet(){var t=URLGet("booking"),n;sPreviousSpecials!=specials&&($(".jsLoading").addClass("loading"),sPreviousSpecials=specials,$.post(t+specials,{},BookingReturned),n=getParameterByName("pdtype"),n=="pricedetails_singlepage"||window.history.pushState&&window.history.pushState(null,null,URLGet()),$("form").attr("action",URLGet("availability")))}function URLGet(n){var t=document.URL.split("#").shift().toLowerCase(),i;t=t.replace("pricebreakdown","{Action}");t=t.replace("pricedetails","{Action}");t=t.replace("extrasandspecials","{Action}");t=t.replace("onlinebooknow","{Action}");i=(t.match(/quote/g)||[]).length;t=i>1?CustomReplace(t,"quote","{Quote}",2):t.replace("quote","{Quote}");switch(n){case"specs":t=t.replace("{Quote}","Vehicle");t=t.replace("{Action}","Specs");break;case"booking":t=t.replace("{Quote}","Quote");t=t.replace("{Action}","GetBooking");break;case"breakdown":t=t.replace("{Quote}","Quote");t=t.replace("{Action}","PriceBreakdown");case"terms":t=t.replace("{Quote}","Quote");t=t.replace("{Action}","PackageTerms");break;case"specials":t=t.replace("{Quote}","Quote");t=t.replace("{Action}","GetSpecials");break;case"availability":t=t.replace("{Quote}","Quote");t=t.replace("{Action}","Availability");break;default:t=document.URL.split("#").shift()}return bFirstLoad||(t=t.replace(/\&spid\=(\d+)/gi,"")),specials="",$(aSpecials).each(function(n,i){i.Included&&t.indexOf("&spid="+i.PackageID)<0&&(specials+="&spid="+i.PackageID)}),t+specials}function BookingReturned(args){function selCountryResidence(n){var t=$(".not-allowed").attr("data-countries"),i,r,u;if(t!=undefined)if(t!=null)if(i=t.split(","),i.length>0)for(r=0;r<i.length;r++){if(u=parseInt(i[r]),u==n)return $("#bnBook").hide(),$("#CheckAvailability").button("refresh"),$("#message-notallowed").show(),!1;$("#bnBook").show();$("#message-notallowed").hide()}else countryname=t,$("#bnBook").show();else $("#bnBook").show();else $("#bnBook").show()}var pdType=getParameterByName("pdtype"),sSelectedInsurance,sUrl,arr_SelectedInsurance,sSelectedExtras,sSelectedExtrasDet,arr_SelectedExtraHires,arr_SelectedExtraHiresDet,sel,sTermsLink,sAdditionalInfo,sUrlOnlineBookNow,arrDate;$(".jsLoading").removeClass("loading");oBooking=eval(args);sSelectedInsurance=getParameterByName("inselected");sUrl=document.URL.split("#").shift().toLowerCase();sUrl.indexOf("onlinebooknow")>-1&&sSelectedInsurance!=""&&(arr_SelectedInsurance=sSelectedInsurance.split(","),$(oBooking.InsuranceApplicable).each(function(n,t){arr_SelectedInsurance.indexOf(t.InsuranceID.toString())>-1&&(t.InclusionType=2)}));sSelectedExtras=getParameterByName("exselected");sSelectedExtrasDet=getParameterByName("exselecteddet");sUrl.indexOf("onlinebooknow")>-1&&sSelectedExtras!=""&&(arr_SelectedExtraHires=sSelectedExtras.split(","),arr_SelectedExtraHiresDet=sSelectedExtrasDet.split(","),$(oBooking.ExtraHiresApplicable).each(function(n,t){if(arr_SelectedExtraHires.indexOf(t.ExtraHireItem.ExtraHireItemID.toString())>-1){var i=arr_SelectedExtraHires.indexOf(t.ExtraHireItem.ExtraHireItemID.toString());t.Added=arr_SelectedExtraHiresDet[i]}}));$("#jsDisplayTravelDateRentalAverage").text(formatCurrency(oBooking.DisplayTravelDateRentalAverage));$("#jsTravelDatesTotal").text(formatCurrency(oBooking.TravelDatesTotal));$("#jsDisplayTravelDatesCount").text(oBooking.DisplayTravelDatesCount);$("#jsVehicleName").text(oBooking.Vehicle.VehicleName);document.title=sUrl.indexOf("onlinebooknow")>-1?oBooking.Vehicle.VehicleName+" - Online Booking":oBooking.Vehicle.VehicleName+" - Online Quote";oBooking.Vehicle.VehicleImages.length>0?(pdType=="pricedetailsearch3"||sUrl.indexOf("onlinebooknow")>-1?$("#imgVehicle").attr("src",media+"/images/vehicles/"+oBooking.Vehicle.VehicleID+"/"+oBooking.Vehicle.VehicleImages[0].ImageFileName):$("#imgVehicle").attr("src",media+"/images/vehicles/"+oBooking.Vehicle.VehicleID+"/thumbnails/"+oBooking.Vehicle.VehicleImages[0].ImageFileName),$("#imgSupplierLogo").attr("src",media+"/images/suppliers/"+oBooking.PickupLocation.Supplier.SupplierID+".jpg"),$("#imgVehicle").show()):$("#imgVehicle").hide();$("#jsPickupDepot").text(oBooking.PickupLocation.Region.RegionName);$("#jsDropoffDepot").text(oBooking.DropoffLocation.Region.RegionName);$(".jsCurrencySymbol").text(oBooking.Currency.Symbol);$(".jsCurrencyCode").text(oBooking.Currency.Code);$(".jsTravelDateComputation").text(oBooking.TravelDateComputation);$(".jsTravelDateComputationEach").text(oBooking.TravelDateComputation.replace("s",""));oBooking.FeesOneWay>0?($("#jsFeesOneWay").text(formatCurrency(oBooking.FeesOneWay)),$("#jsPanelFeesOneWay").show()):oBooking.OneWayFeeWaived?($("#jsFeesOneWay").text("(waived)"),$("#jsPanelFeesOneWay").show()):($("#jsFeesOneWay").text("0.00"),$("#jsPanelFeesOneWay").hide());$(".DynamicRow").remove();oBooking.BookingFees.length>0?($(oBooking.BookingFees).each(function(n,t){if($.trim(t.Label).length>0){var i=$("#jsBookingFeeTemplate").clone();i.removeAttr("id");i.addClass("DynamicRow");i.find(".BookingFeeLabel").text(t.Label);i.find(".BookingFeeAmount").text(formatCurrency(t.Amount));i.insertBefore($("#jsBookingFeeTemplate"));i.show()}}),$("#jsPanelRemoteLocationFee").show()):($("#jsRemoteLocationFee").text("0.00"),$("#jsPanelRemoteLocationFee").hide());oBooking.FeesAdmin>0?($("#jsFeesAdmin").text(formatCurrency(oBooking.FeesAdmin)),$("#jsPanelFeesAdmin").show()):($("#jsFeesAdmin").text("0.00"),$("#jsPanelFeesAdmin").hide());oBooking.Inclusions.length>2?($("#PanelInclusions").show(),$("#jsInclusions").html(oBooking.Inclusions),sel=$("#Country_CountryID option:selected").val(),selCountryResidence(sel)):$("#PanelInclusions").hide();$("#Country_CountryID").on("change",function(){var n=$("#Country_CountryID option:selected").val();selCountryResidence(n)});if($.trim(oBooking.BasicCover).length>0?$("#jsBasicCover").html(oBooking.BasicCover.replace(/\n/g,"<br />")):$("#jsBasicCover").remove(),(oBooking.Market.MarketID==1||oBooking.Market.MarketID==3)&&version!="amber"?oBooking.IsAllInclusive?$("#jsOfferType").text("Inclusive Package"):$("#jsOfferType").text("Standard Package"):oBooking.IsAllInclusive?$("#jsOfferType").text("Fees Inclusive Package"):$("#jsOfferType").text("Standard Package"),oBooking.InsuranceApplicable.length>0?(oBooking.Market.MarketID==1||oBooking.Market.MarketID==3)&&version!="amber"?oBooking.IsAllInclusive?($("#jsAllInclusiveLabel").text("Inclusive Option"),$("#PanelInsurance").hide(),pdType=="pricedetailsearch3"&&($("#headingInsurance").hide(),$("#accordionInsurance").hide())):($("#jsAllInclusiveLabel").text("Excess Reduction"),$("#PanelInsurance").show(),$("#jsInsuranceAllowed").text(oBooking.MaxInsuranceCount)):($("#jsAllInclusiveLabel").text("Insurance"),$("#PanelInsurance").show(),$("#jsInsuranceAllowed").text(oBooking.MaxInsuranceCount)):($("#PanelInsurance").hide(),pdType=="pricedetailsearch3"&&($("#headingInsurance").hide(),$("#accordionInsurance").hide())),$(oBooking.InsuranceApplicable).each(function(n,t){var i=$("#InsuranceOptionTemplate").clone(),r,e,u,f;i.removeAttr("id");i.attr("id","Insurance-"+n);i.addClass("DynamicRow");i.find(".InsuranceRadio").val(t.InsuranceID);t.InclusionType>1&&i.find(".InsuranceRadio").attr("checked",!0);t.InclusionType==3&&i.find(".InsuranceRadio").attr("disabled",!0);i.find(".InsuranceName").html(t.Title);i.find("#insuranceToggle").attr("href","#insurance-panel"+n);i.find("#insurance-panel").attr("id","insurance-panel"+n);i.find(".InsuranceDescription").html(t.Description);r=oBooking.InsuredDaysPayable;t.AmountCap>0?(e=t.GrossRate*r+t.FixedRate,u=0,u=t.MarginValueType!=1&&t.MarginType==2?t.AmountCap+t.AmountCap*(t.MarginAmount/100):t.MarginValueType==1&&t.MarginType==2?t.AmountCap+t.MarginAmount:t.AmountCap,e>u?(f=u,t.FixedRate>0?t.GrossRate>0?i.find(".InsuranceDailyAverage").text(formatCurrency(f/oBooking.DisplayTravelDatesCount)):i.find(".InsuranceDailyAverage").text(formatCurrency(t.FixedRate/oBooking.DisplayTravelDatesCount)):i.find(".InsuranceDailyAverage").text(formatCurrency(f/oBooking.DisplayTravelDatesCount)),i.find(".InsuranceTotal").text(formatCurrency(f))):(t.FixedRate>0?t.GrossRate>0?i.find(".InsuranceDailyAverage").text(formatCurrency(t.FixedRate)+" + "+formatCurrency(t.GrossRate*r/oBooking.DisplayTravelDatesCount)):i.find(".InsuranceDailyAverage").text(formatCurrency(t.FixedRate/oBooking.DisplayTravelDatesCount)):i.find(".InsuranceDailyAverage").text(formatCurrency(t.GrossRate*r/oBooking.DisplayTravelDatesCount)),i.find(".InsuranceTotal").text(formatCurrency(t.GrossRate*r+t.FixedRate))),i.find(".InsuranceRadio").click(function(){thisCb=$(this);$(oBooking.InsuranceApplicable).each(function(n,t){thisCb.val()==t.InsuranceID&&t.InclusionType<3&&(t.InclusionType=thisCb.is(":checked")?2:0)});Calculate()})):(oBooking.TravelDatesCount>t.DaysCap&&(r=t.DaysCap),t.FixedRate>0?t.GrossRate>0?i.find(".InsuranceDailyAverage").text(formatCurrency(t.FixedRate)+" + "+formatCurrency(t.GrossRate*r/oBooking.DisplayTravelDatesCount)):i.find(".InsuranceDailyAverage").text(formatCurrency(t.FixedRate/oBooking.DisplayTravelDatesCount)):i.find(".InsuranceDailyAverage").text(formatCurrency(t.GrossRate*r/oBooking.DisplayTravelDatesCount)),i.find(".InsuranceTotal").text(formatCurrency(t.GrossRate*r+t.FixedRate)),i.find(".InsuranceRadio").click(function(){thisCb=$(this);$(oBooking.InsuranceApplicable).each(function(n,t){thisCb.val()==t.InsuranceID&&t.InclusionType<3&&(t.InclusionType=thisCb.is(":checked")?2:0)});Calculate()}));i.show();$("#InsuranceFooter").before(i)}),oBooking.ExtraHiresApplicable.length>0?($("#PanelExtraHire").show(),$(oBooking.ExtraHiresApplicable).each(function(n,t){var i=$("#jsExtraHireTemplate").clone(),r,u,f,n;i.removeAttr("id");i.attr("id","ExtraHire-"+t.ExtraHireItem.ExtraHireItemID);i.addClass("DynamicRow");switch(t.ExtraHireItem.PricingType){case 1:r=" per "+oBooking.TravelDateComputation.replace("s","");break;case 2:r="";break;case 3:r=" each per "+oBooking.TravelDateComputation.replace("s","");break;case 4:r=" each"}if(t.ExtraHireItem.GrossFixedRate?(i.find(".jsExtraHirePrice").text(formatCurrency(t.ExtraHireItem.GrossFixedRate)),t.ExtraHireItem.GrossRate&&i.find(".jsExtraHirePrice").text(i.find(".jsExtraHirePrice").text()+" + "+formatCurrency(t.ExtraHireItem.GrossRate))):i.find(".jsExtraHirePrice").text(formatCurrency(t.ExtraHireItem.GrossRate)),i.find(".jsExtraHirePriceType").text(r),i.find("#extraHireToggle").attr("href","#add"+n),i.find("#add").attr("id","add"+n),i.find(".jsExtraHireDescription").text(t.ExtraHireItem.ItemDescription),t.ExtraHireItem.Prebooked?(i.find(".jsExtraHireName").text(t.ExtraHireItem.ItemName),i.find(".jsIsPrebooked").text("- Must be Prebooked")):i.find(".jsExtraHireName").text(t.ExtraHireItem.ItemName),i.find(".jsParent").text(t.ExtraHireItem.Parent),t.ExtraHireItem.PricingType==2||t.ExtraHireItem.PricingType==1)i.find(".jsExtraHirePricing").html('<input class="jsExtraHireNumber" type="checkbox" value="'+t.ExtraHireItem.ExtraHireItemID+'" />'),cb=i.find(".jsExtraHireNumber"),(t.Included>0||t.Added>0||t.Required>0)&&cb.attr("checked",!0),(t.Included>0||t.Required>0)&&cb.attr("disabled",!0),cb.click(function(){thisCb=$(this);iAdded=0;thisCb.is(":checked")&&(iAdded=1);$(oBooking.ExtraHiresApplicable).each(function(n,t){thisCb.val()==t.ExtraHireItem.ExtraHireItemID&&(t.Added=iAdded,ClearGroup(t))});Calculate()});else{for(i.find(".jsExtraHirePricing").html('<select id="'+t.ExtraHireItem.ExtraHireItemID+'" class="jsExtraHireNumber selectpicker"><\/select>'),u=t.Included>t.ExtraHireItem.ItemCap?t.Included:t.ExtraHireItem.ItemCap,f=t.Included>t.Required?t.Included:t.Required,ddl=i.find(".jsExtraHireNumber"),n=f;n<=u;n++)n-t.Included==t.Added?ddl.append('<option value="'+(n-t.Included)+'" selected="selected">'+n+"<\/option>"):ddl.append('<option value="'+(n-t.Included)+'">'+n+"<\/option>");ddl.change(function(){thisDdl=$(this);$(oBooking.ExtraHiresApplicable).each(function(n,t){thisDdl.attr("id")==t.ExtraHireItem.ExtraHireItemID&&(t.Added=thisDdl.val(),ClearGroup(t))});Calculate()})}t.ExtraHireItem.Parent==0&&i.show();$("#jsExtraHireTemplate").before(i)}),$(oBooking.ExtraHiresApplicable).each(function(n,t){t.ExtraHireItem.Parent==0&&ToggleChildren(t)})):$("#PanelExtraHire").hide(),sTermsLink="",sAdditionalInfo="",$(oBooking.PackagesApplied).each(function(n,t){sTermsLink+=t.PackageID;sAdditionalInfo+=t.AdditionalInfo;sAdditionalInfo+=t.DriverRequirementsInfo;sAdditionalInfo+=t.PaymentScheduleInfo;sAdditionalInfo+=t.ImportantNoteInfo}),$("#jsAdditionalInfo").html(sAdditionalInfo.replace(/\n/g,"<br />")),$(".jsWarning").not("#jsWarningTemplate").remove(),oBooking.Warnings.length>0?($("#Warning").show(),$("#CheckAvailability").hide(),$("#booknow").hide(),$(oBooking.Warnings).each(function(n,t){var i=$("#jsWarningTemplate").clone();i.removeAttr("id");i.html(t.Warning.replace(/\n/g,"<br />"));i.show();$("#jsWarningTemplate").before(i)})):($("#Warning").hide(),$("#CheckAvailability").show()),Calculate(),bFirstLoad&&(bFirstLoad=!1,sUrlOnlineBookNow=document.URL.split("#").shift().toLowerCase(),sUrlOnlineBookNow.indexOf("onlinebooknow")>-1?$("input[name='PackageType'][value='Standard']").is(":checked")?SpecialsGetOnlineBookNow(StandardPackageParameter):$("input[name='PackageType'][value='AllInclusive']").is(":checked")&&SpecialsGetOnlineBookNow(AllInclusivePackageParameter):SpecialsGet()),version=="currencyconverter"&&$("#PanelCurrency").show(),pdType=getParameterByName("pdtype"),oBooking.Warnings.length>0?pdType=="pricedetails_singlepage"&&$("#SaveQuoteBottom").hide():pdType=="pricedetails_singlepage"&&$("#SaveQuoteBottom").show(),$(".selectpicker").selectpicker({size:4}),/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)&&$(".selectpicker").selectpicker("mobile"),$("#IsDNTrackingEnabled").val()=="true"){var pickupLoc=oBooking.PickupLocation.Region.RegionName,dropoffLoc=oBooking.DropoffLocation.Region.RegionName,vid=oBooking.Vehicle.VehicleID,pd=getParameterByName("dp"),dd=getParameterByName("dd");pd!=""&&pd.indexOf("/")>-1&&(arrDate=pd.split("/"),pd=arrDate[2]+"-"+arrDate[1]+"-"+arrDate[0]);dd!=""&&dd.indexOf("/")>-1&&(arrDate=dd.split("/"),dd=arrDate[2]+"-"+arrDate[1]+"-"+arrDate[0]);divolte.signal("pageView",{affiliateCode:$("#CurrentChannelCode").val(),frontendName:"campertravel",environment:$("#CurrentEnvironment").val(),pageTitle:"Price Details",vehicleCategory:"campervan-hire",locationCountryCode:$("#CurrentMarketCode").val(),site:"campertravel",pageStatusCode:$("#CurrentPageStatusCode").val(),pageNavigationTrigger:"navigation",frontendServerId:"CT-Web",backendServerId:"CT-SQL",referer:document.referrer,countryCode:$("#CurrentMarketCode").val(),pickupDate:pd+"T00:00:00",dropoffDate:dd+"T00:00:00",vehicle:vid,pickupLocationType:"ctloc",pickupLocationName:pickupLoc,pickupLocationValue:pickupLoc,pickupLocation:"ctloc;"+pickupLoc+";"+pickupLoc,dropoffLocationType:"ctloc",dropoffLocationName:dropoffLoc,dropoffLocationValue:dropoffLoc,dropoffLocation:"ctloc;"+dropoffLoc+";"+dropoffLoc,frontendVersion:"2.1.0"})}}function SpecialsGet(){$("#PanelSpecials").addClass("loading");$.get(URLGet("specials"),{},SpecialsReturned)}function SpecialsReturned(args){var pdType=getParameterByName("pdtype");$("#PanelSpecials").removeClass("loading");$(".Specials").not("#SpecialsTemplate").remove();aSpecials=eval(args);aSpecials.length>0?($("#jsSpecialsAllowed").text(oBooking.MaxSpecialsCount),$("#PanelSpecials").show()):($("#PanelSpecials").hide(),pdType=="pricedetailsearch3"&&($("#headingSpecial").hide(),$("#accordionSpecial").hide()));$(aSpecials).each(function(n,t){var i=$("#SpecialsTemplate").clone(),r=!1;$(oBooking.PackagesApplied).each(function(n,i){t.PackageID==i.PackageID&&(r=!0,t.Included=!0,sPreviousSpecials+="&spid="+t.PackageID)});i.removeAttr("id");i.attr("id","SpecialsTemplate-"+n);i.find(".jsSpecialsName").text(t.PackageName);i.find(".jsSpecialsDescription").html(t.Description);i.find(".jsSpecialsRadio").val(t.PackageID);i.find(".jsSpecialsRadio").attr("checked",r);i.find(".jsSpecialsRadio").click(function(){if(thisCb=$(this),specialsSelected=SpecialsCount(),specialsSelected>=oBooking.MaxSpecialsCount&&thisCb.is(":checked"))return thisCb.attr("checked",!1),SpecialsInclude(thisCb.val(),!1),$("#jsSpecialsCount").text(SpecialsCount()),!1;SpecialsInclude(thisCb.val(),thisCb.is(":checked"));$("#jsSpecialsCount").text(SpecialsCount());var n=document.URL.split("#").shift().toLowerCase();n.indexOf("onlinebooknow")>-1?$("input[name='PackageType'][value='Standard'").is(":checked")?BookingGetOnlineBookNow(StandardPackageParameter):$("input[name='PackageType'][value='AllInclusive'").is(":checked")&&BookingGetOnlineBookNow(AllInclusivePackageParameter):BookingGet()});i.find("#specials-toggle").attr("href","#specials-panel"+n);i.find("#specials-panel").attr("id","specials-panel"+n);i.show();$("#SpecialsFooter").before(i)})}function Calculate(){var t,i,o,e,r,c,u,f,s,l,a,v,y;mExtraHireTotal=0;mExtraHireLineTotal=0;mExtraHireDeposit=0;mExtraHireLineDeposit=0;totalTravelDays=oBooking.TravelDatesCount;$(oBooking.ExtraHiresApplicable).each(function(n,t){mRate=t.ExtraHireItem.GrossRate;mDeposit=t.ExtraHireItem.Margin;iUnits=t.Added;iIncluded=t.Included;iCap=t.ExtraHireItem.ItemCap;OfferPricing=t.OfferPricing;iDays=oBooking.TravelDatesCount;iDaysCap=t.ExtraHireItem.DaysCap;iItemCap=t.ExtraHireItem.ItemCap;switch(t.ExtraHireItem.PricingType){case 4:iUnits>iCap&&iCap!=0&&(iUnits=iCap);iUnits==0&&iIncluded>0?$("#ExtraHire-"+t.ExtraHireItem.ExtraHireItemID).find(".jsExtraHireTotal").text("included"):(mExtraHireLineTotal=mRate*iUnits+t.GrossFixedRate,mExtraHireLineDeposit=mDeposit*iUnits+t.FixedRateMargin,mExtraHireTotal+=mExtraHireLineTotal,mExtraHireDeposit+=mExtraHireLineDeposit,$("#ExtraHire-"+t.ExtraHireItem.ExtraHireItemID).find(".jsExtraHireTotal").text(formatCurrency(mExtraHireLineTotal)));break;case 2:if(t.Included+t.Added+t.Required==0){$("#ExtraHire-"+t.ExtraHireItem.ExtraHireItemID).find(".jsExtraHireTotal").text(formatCurrency(0));break}iIncluded>0&&OfferPricing==0?$("#ExtraHire-"+t.ExtraHireItem.ExtraHireItemID).find(".jsExtraHireTotal").text("included"):(t.Included+t.Added+t.Required>0?(mExtraHireLineTotal=mRate+t.GrossFixedRate,mExtraHireLineDeposit=mDeposit+t.FixedRateMargin):mExtraHireLineTotal=0,$("#ExtraHire-"+t.ExtraHireItem.ExtraHireItemID).find(".jsExtraHireTotal").text(formatCurrency(mExtraHireLineTotal)),mExtraHireDeposit+=mExtraHireLineDeposit,mExtraHireTotal+=mExtraHireLineTotal);break;case 1:if(t.Included+t.Added+t.Required==0){$("#ExtraHire-"+t.ExtraHireItem.ExtraHireItemID).find(".jsExtraHireTotal").text(formatCurrency(0));break}iUnits=iDays-t.DayStart+1;iUnits>iDaysCap&&iDaysCap!=0&&(iUnits=iDaysCap);iIncluded>0&&OfferPricing==0?$("#ExtraHire-"+t.ExtraHireItem.ExtraHireItemID).find(".jsExtraHireTotal").text("included"):(t.Included+t.Added+t.Required>0?(mExtraHireLineTotal=mRate*iUnits+t.GrossFixedRate,mExtraHireLineDeposit=mDeposit*iUnits+t.FixedRateMargin):mExtraHireLineTotal=0,$("#ExtraHire-"+t.ExtraHireItem.ExtraHireItemID).find(".jsExtraHireTotal").text(formatCurrency(mExtraHireLineTotal)),mExtraHireDeposit+=mExtraHireLineDeposit,mExtraHireTotal+=mExtraHireLineTotal);break;case 3:iDays=iDays-t.DayStart+1;iDays>iDaysCap&&iDaysCap!=0&&(iDays=iDaysCap);iUnits==0&&iIncluded>0?$("#ExtraHire-"+t.ExtraHireItem.ExtraHireItemID).find(".jsExtraHireTotal").text("included"):(mExtraHireLineTotal=mRate*iUnits*iDays+t.GrossFixedRate,mExtraHireLineDeposit=mDeposit*iUnits*iDays+t.FixedRateMargin,$("#ExtraHire-"+t.ExtraHireItem.ExtraHireItemID).find(".jsExtraHireTotal").text(formatCurrency(mExtraHireLineTotal)),mExtraHireDeposit+=mExtraHireLineDeposit,mExtraHireTotal+=mExtraHireLineTotal)}});mInsuranceTotal=0;mInsuranceDeposit=0;mFixedRate=0;mRate=0;t=0;i=0;$(oBooking.InsuranceApplicable).each(function(n,r){var u=oBooking.InsuredDaysPayable,e,f;r.AmountCap>0?(e=r.GrossRate*u+r.FixedRate,f=0,f=r.MarginValueType!=1&&r.MarginType==2?r.AmountCap+r.AmountCap*(r.MarginAmount/100):r.MarginValueType==1&&r.MarginType==2?r.AmountCap+r.MarginAmount:r.AmountCap,e>f?r.InclusionType>1&&(t>=oBooking.MaxInsuranceCount?(r.InclusionType=1,$(".InsuranceRadio[value='"+r.InsuranceID+"']").attr("checked",!1)):(mInsuranceTotal+=f,mRate+=r.GrossRate,r.MarginValueType!=1&&(i=r.FixedRate*(r.MarginAmount/100)),mInsuranceDeposit+=f*(r.MarginAmount/100)+i,t++)):r.InclusionType>1&&(t>=oBooking.MaxInsuranceCount?(r.InclusionType=1,$(".InsuranceRadio[value='"+r.InsuranceID+"']").attr("checked",!1)):(mInsuranceTotal+=r.GrossRate*u,mFixedRate+=r.FixedRate,mRate+=r.GrossRate,r.MarginValueType!=1&&(i=r.FixedRate*(r.MarginAmount/100)),mInsuranceDeposit+=r.Margin*u+i,t++))):(u>r.DaysCap&&(u=r.DaysCap),r.InclusionType>1&&(t>=oBooking.MaxInsuranceCount?(r.InclusionType=1,$(".InsuranceRadio[value='"+r.InsuranceID+"']").attr("checked",!1)):(mInsuranceTotal+=r.GrossRate*u,mFixedRate+=r.FixedRate,mRate+=r.GrossRate,r.MarginValueType!=1&&(i=r.FixedRate*(r.MarginAmount/100)),mInsuranceDeposit+=r.Margin*u+i,t++)))});$("#jsInsuranceCount").text(t);t>0?$("#jsBasicCover").hide("slow"):$("#jsBasicCover").show("slow");mInitialTotal=oBooking.BasicTotal;mInitialDeposit=oBooking.TravelDatesTotalMargin+oBooking.OneWayFeeMargin+oBooking.PackageFeeMargin;$("#GrandTotalBasic").text(formatCurrency(mInitialTotal));o="";o=mFixedRate>0&&mRate==0?"":formatCurrency(mFixedRate)+" + ";mFixedRate>0?(mInsuranceTotal+=mFixedRate,$("#GrandTotalInsurance").text(formatCurrency(mInsuranceTotal)),mRate>0?$("#GrandTotalInsuranceDaily").text(o+formatCurrency((mInsuranceTotal-mFixedRate)/oBooking.DisplayTravelDatesCount)):$("#GrandTotalInsuranceDaily").text(o+formatCurrency(mFixedRate/oBooking.DisplayTravelDatesCount))):($("#GrandTotalInsurance").text(formatCurrency(mInsuranceTotal)),$("#GrandTotalInsuranceDaily").text(formatCurrency(mInsuranceTotal/oBooking.DisplayTravelDatesCount)));mInsuranceTotal>0?$("#SidePanelInsurance").show():$("#SidePanelInsurance").hide();$("#GrandTotalExtras").text(formatCurrency(mExtraHireTotal));mExtraHireTotal>0?$("#SidePanelExtras").show():$("#SidePanelExtras").hide();salesTaxPCT=oBooking.PickupLocation.SalesTax/100;Tax=(mInitialTotal+mExtraHireTotal+mInsuranceTotal)*salesTaxPCT;Tax>0?($("#divSalesTax").html(formatCurrency(Tax)),$("#SidePanelSalesTax").show()):$("#SidePanelSalesTax").hide();$("#lblGrandTotal").text(formatCurrency(mInitialTotal+mExtraHireTotal+mInsuranceTotal+Tax));$("#GrandTotalDeposit").text(formatCurrency(mInitialDeposit+mExtraHireDeposit+mInsuranceDeposit));e=document.URL.split("#").shift().toLowerCase();e.indexOf("onlinebooknow")>-1&&$("#GrandTotalDepositFooter").text(formatCurrency(mInitialDeposit+mExtraHireDeposit+mInsuranceDeposit));var w=getParameterByName("pdtype"),p=Date.today().add({days:30}),n=new Date(parseInt(oBooking.PickupDate.replace(/\/Date\((\d+)\)\//gi,"$1"))),h="";h=e.indexOf("onlinebooknow")>-1?$("#THL-No-Deposit-Line").attr("data-thl2017-startdate"):$("#no_deposit_thl").attr("data-thl2017-startdate");r=new Date(h);r.setHours(0);r.setMinutes(0);r.setSeconds(0);r.setMilliseconds(0);c=Date.today().add({days:90});u=new Date($("#no_deposit_thl").attr("data-lionstour-startdate"));u.setHours(0);u.setMinutes(0);u.setSeconds(0);u.setMilliseconds(0);f=new Date($("#no_deposit_thl").attr("data-lionstour-enddate"));f.setHours(0);f.setMinutes(0);f.setSeconds(0);f.setMilliseconds(0);s=Date.today().add({days:100});(oBooking.PickupLocation.Supplier.SupplierID=="27"||oBooking.PickupLocation.Supplier.SupplierID=="28"||oBooking.PickupLocation.Supplier.SupplierID=="37")&&s<n&&n>=u&&n<=f?(l=mInitialTotal+mExtraHireTotal+mInsuranceTotal+Tax,a=l*.1,$("#GrandTotalDeposit").text(formatCurrency(a))):(oBooking.PickupLocation.Supplier.SupplierID=="27"||oBooking.PickupLocation.Supplier.SupplierID=="28"||oBooking.PickupLocation.Supplier.SupplierID=="37")&&s>=n&&n>=u&&n<=f?$("#row_deposit").hide():(oBooking.PickupLocation.Supplier.SupplierID=="22"||oBooking.PickupLocation.Supplier.SupplierID=="28"||oBooking.PickupLocation.Supplier.SupplierID=="3"||oBooking.PickupLocation.Supplier.SupplierID=="37"||oBooking.PickupLocation.Supplier.SupplierID=="12"||oBooking.PickupLocation.Supplier.SupplierID=="32"||oBooking.PickupLocation.Supplier.SupplierID=="4"||oBooking.PickupLocation.Supplier.SupplierID=="27"||oBooking.PickupLocation.Supplier.SupplierID=="26"||oBooking.PickupLocation.Supplier.SupplierID=="73")&&p<n&&n<r?(e.indexOf("onlinebooknow")>-1?($("#no_deposit_thl_avail").show(),$("#row_deposit_avail2").hide(),$("#deposit_blurb").hide(),$("#GrandTotalDepositFooter").hide(),$("#GrandTotalDepositFooter_Currency").hide(),$("#THL-No-Deposit-Line-New").hide(),$("#Non-THL-Deposit-Line").hide(),$("#THL-No-Deposit-Line").show(),v=oBooking.Vehicle.Supplier.DaysPriorDue*-1,y=n.add({days:v}),$("#TotalAmountLabel_Old").text("Total Amount will be charged on"),$("#DateAmountWillBeCharged_Old").text(y.toString("dddd, dd MMMM yyyy"))):$("#no_deposit_thl").show(),$("#row_deposit").hide()):(oBooking.PickupLocation.Supplier.SupplierID=="22"||oBooking.PickupLocation.Supplier.SupplierID=="28"||oBooking.PickupLocation.Supplier.SupplierID=="3"||oBooking.PickupLocation.Supplier.SupplierID=="37"||oBooking.PickupLocation.Supplier.SupplierID=="12"||oBooking.PickupLocation.Supplier.SupplierID=="32"||oBooking.PickupLocation.Supplier.SupplierID=="4"||oBooking.PickupLocation.Supplier.SupplierID=="27"||oBooking.PickupLocation.Supplier.SupplierID=="26"||oBooking.PickupLocation.Supplier.SupplierID=="73")&&c<n&&n>=r?($("#no_deposit_thl").hide(),$("#row_deposit").show()):(e.indexOf("onlinebooknow")>-1?($("#no_deposit_thl_avail").hide(),$("#row_deposit_avail2").show(),$("#deposit_blurb").show(),$("#GrandTotalDepositFooter").show(),$("#GrandTotalDepositFooter_Currency").show(),$("#Non-THL-Deposit-Line").show(),$("#THL-No-Deposit-Line").hide(),$("#THL-No-Deposit-Line-New").hide()):$("#no_deposit_thl").hide(),$("#row_deposit").show())}function SetChoices(){aExtraHire=[];$(".ExtraHireItem").each(function(i,tr){oExtraHire=$.parseJSON($("#hdExtraItemJSON").val());oExtraHire.ExtraHireItem.ExtraHireItemID=$(tr).find(".ItemID").val();switch($(tr).find(".PricingType").val()){case"PerItemPerBooking":iUnits=eval($(tr).find(".ExtraHireDropDown").val());iUnits!=parseInt(iUnits)&&(iUnits=0);iCap=eval($(tr).find(".Cap").val());iUnits>iCap&&iCap!=0&&(iUnits=iCap);oExtraHire.Added=iUnits;break;case"PerBooking":iIncluded=eval($(tr).find(".Included").val());OfferPricing=eval($(tr).find(".OfferPricing").val());oExtraHire.Added=iIncluded>0&&OfferPricing==0?0:$(tr).find(":checked").length>0?1:0;break;case"PerDay":iIncluded=eval($(tr).find(".Included").val());iUnits=eval($("#hdTravelDays").val());iCap=eval($(tr).find(".Cap").val());OfferPricing=eval($(tr).find(".OfferPricing").val());iUnits>iCap&&iCap!=0&&(iUnits=iCap);oExtraHire.Added=iIncluded>0&&OfferPricing==0?0:$(tr).find(":checked").length>0?iUnits:0;break;case"PerItemPerDay":iUnits=eval($(tr).find(".ExtraHireDropDown").val());iUnits!=parseInt(iUnits)&&(iUnits=0);iDays=eval($("#hdTravelDays").val());iCap=eval($(tr).find(".Cap").val());iDays>iCap&&iCap!=0&&(iDays=iCap);oExtraHire.Added=iUnits==0?0:iUnits}aExtraHire[i]=oExtraHire});$("#hdExtraItems").val($.toJSON(aExtraHire));$("#hdInsuranceOptionSet").val("");aInsurance=null;aInsurance=[];$("input.InsuranceRadio:checked").each(function(n,t){var i;i=$.parseJSON($("#hdInsuranceOptionJSON").val());i.InsuranceID=$(t).val();aInsurance[n]=i;i=null});$("#hdInsuranceOptionSet").val($.toJSON(aInsurance))}function toggleDesc(n){$(n).parent().parent().find(".extrahire-desc").toggle();$(n).parent().parent().find(".toggleLink").toggle()}function toggleblock(n){$("#"+n).toggleClass("hidden-block")}function ClearGroup(n){$(oBooking.ExtraHiresApplicable).each(function(t,i){(i.ExtraHireItem.ExtraHireItemID!=n.ExtraHireItem.ExtraHireItemID&&i.ExtraHireItem.ItemGroup==n.ExtraHireItem.ItemGroup&&n.ExtraHireItem.ItemGroup.length>0||i.ExtraHireItem.Parent==n.ExtraHireItem.ExtraHireItemID&&n.Added==0)&&(i.Added=0,i.ExtraHireItem.PricingType==2||i.ExtraHireItem.PricingType==1?$(".jsExtraHireNumber[value='"+i.ExtraHireItem.ExtraHireItemID+"']").attr("checked",!1):($("#"+i.ExtraHireItem.ExtraHireItemID).val(0),i.Included>0?$(".btn-group").find('[data-id="'+i.ExtraHireItem.ExtraHireItemID+'"]').find("span:first-child").text(i.Included):$(".btn-group").find('[data-id="'+i.ExtraHireItem.ExtraHireItemID+'"]').find("span:first-child").text(0),$(".btn-group").find(".selectpicker").find('li[class="selected"]').attr("class",""),$(".btn-group").find(".selectpicker").find('[data-original-index="0"]').attr("class","selected")),i.ExtraHireItem.Parent==0&&ClearChildren(i));i.ExtraHireItem.Parent==0&&ToggleChildren(i)})}function ClearChildren(n){$(oBooking.ExtraHiresApplicable).each(function(t,i){i.ExtraHireItem.Parent==n.ExtraHireItem.ExtraHireItemID&&n.Added==0&&(i.Added=0,i.ExtraHireItem.PricingType==2||i.ExtraHireItem.PricingType==1?$(".jsExtraHireNumber[value='"+i.ExtraHireItem.ExtraHireItemID+"']").attr("checked",!1):$("#"+i.ExtraHireItem.ExtraHireItemID).val(0),$("#ExtraHire-"+i.ExtraHireItem.ExtraHireItemID).hide())})}function ToggleChildren(n){var t=document.URL.split("#").shift().toLowerCase();$(oBooking.ExtraHiresApplicable).each(function(i,r){r.ExtraHireItem.Parent==n.ExtraHireItem.ExtraHireItemID&&(n.Added>0?$("#ExtraHire-"+r.ExtraHireItem.ExtraHireItemID).show():$("#ExtraHire-"+r.ExtraHireItem.ExtraHireItemID).hide());t.indexOf("extrasandspecials")>-1&&r.ExtraHireItem.Parent==n.ExtraHireItem.ExtraHireItemID&&($("#ExtraHire-"+r.ExtraHireItem.ExtraHireItemID).show(),$("#ExtraHire-"+r.ExtraHireItem.ExtraHireItemID).find("a").css("margin-left","30px"),$("#ExtraHire-"+r.ExtraHireItem.ExtraHireItemID).css("list-style-type","none"),$("#ExtraHire-"+r.ExtraHireItem.ExtraHireItemID).find(".jsExtraHireName"))})}function ClearSpecialsGroup(n){$(aSpecials).each(function(t,i){i.PackageID!=n.PackageID&&i.PackageGroup==n.PackageGroup&&n.PackageGroup.length>0&&(i.Included=!1,$(".jsSpecialsRadio[value='"+i.PackageID+"']").attr("checked",!1))})}function SpecialsInclude(n,t){$(aSpecials).each(function(i,r){if(n==r.PackageID)return r.Included=t,t&&ClearSpecialsGroup(r),!1})}function SpecialsCount(){return specialsSelected=0,$(aSpecials).each(function(n,t){t.Included&&specialsSelected++}),specialsSelected}function CustomReplace(n,t,i,r){for(var u=n.indexOf(t),f=1;f<r;f++)u=n.indexOf(t,u+1);return u>=0?n.substr(0,u)+i+n.substr(u+t.length,n.length):n}function BookingGetOnlineBookNow(n){var i=URLGetOnlineBookNow("booking",n),t;$(".jsLoading").addClass("loading");$.post(i+specials,{},BookingReturned);t=getParameterByName("pdtype");t=="pricedetails_singlepage"||window.history.pushState&&window.history.pushState(null,null,URLGet());$("form").attr("action",URLGet("availability"))}function URLGetOnlineBookNow(n,t){var i="";switch(n){case"booking":i="/Quote/GetBooking/?"+t;break;case"specials":i="/Quote/GetSpecials/?"+t;break;case"terms":i="/Quote/PackageTerms/?"+t;break;default:i=""}return bFirstLoad||(i=i.replace(/\&spid\=(\d+)/gi,"")),specials="",$(aSpecials).each(function(n,t){t.Included&&i.indexOf("&spid="+t.PackageID)<0&&(specials+="&spid="+t.PackageID)}),i+specials}function SpecialsGetOnlineBookNow(n){$("#PanelSpecials").addClass("loading");$.get(URLGetOnlineBookNow("specials",n),{},SpecialsReturned)}function getPreviousUrl(){window.open(document.referrer,"_self")}var experimentURL,divolte_session_ids;jQuery.cookie=function(n,t,i){var f,r,e,o,u,s;if(typeof t!="undefined"){i=i||{};t===null&&(t="",i.expires=-1);f="";i.expires&&(typeof i.expires=="number"||i.expires.toUTCString)&&(typeof i.expires=="number"?(r=new Date,r.setTime(r.getTime()+i.expires*864e5)):r=i.expires,f="; expires="+r.toUTCString());var h=i.path?"; path="+i.path:"",c=i.domain?"; domain="+i.domain:"",l=i.secure?"; secure":"";document.cookie=[n,"=",encodeURIComponent(t),f,h,c,l].join("")}else{if(e=null,document.cookie&&document.cookie!="")for(o=document.cookie.split(";"),u=0;u<o.length;u++)if(s=jQuery.trim(o[u]),s.substring(0,n.length+1)==n+"="){e=decodeURIComponent(s.substring(n.length+1));break}return e}};$(document).ready(function(){$("#cphTopPanel_ddlDepotsPickup").bind("change",setPickup)}),function(n){n.fn.thumbnailScroller=function(t){var t=n.extend({scrollerType:"hoverPrecise",scrollerOrientation:"horizontal",scrollEasing:"easeOutCirc",scrollEasingAmount:800,acceleration:2,scrollSpeed:600,noScrollCenterSpace:0,autoScrolling:0,autoScrollingSpeed:8e3,autoScrollingEasing:"easeInOutQuad",autoScrollingDelay:2500},t);return this.each(function(){function k(){s<i.width()/2&&r.position().left>=0?r.stop(!0,!0).css("left",0):s>i.width()/2&&r.position().left<=-(u-i.width())?r.stop(!0,!0).css("left",-(u-i.width())):s<=i.width()/2-t.noScrollCenterSpace||s>=i.width()/2+t.noScrollCenterSpace?(p=Math.round(Math.cos(s/i.width()*Math.PI)*(l+t.acceleration)),r.stop(!0,!0).animate({left:"+="+p},l,"linear")):r.stop(!0,!0);h<i.height()/2&&r.position().top>=0?r.stop(!0,!0).css("top",0):h>i.height()/2&&r.position().top<=-(o-i.height())?r.stop(!0,!0).css("top",-(o-i.height())):h<=i.height()/2-t.noScrollCenterSpace||h>=i.height()/2+t.noScrollCenterSpace?(w=Math.cos(h/i.height()*Math.PI)*(l+t.acceleration),r.stop(!0,!0).animate({top:"+="+w},l,"linear")):r.stop(!0,!0)}function b(){r.delay(t.autoScrollingDelay).animate({left:-(u-i.width()),top:-(o-i.height())},t.autoScrollingSpeed,t.autoScrollingEasing,function(){r.animate({left:0,top:0},t.autoScrollingSpeed,t.autoScrollingEasing,function(){v++;t.autoScrolling>1&&t.autoScrolling!=v&&b()})})}function d(){e.hide();f.show();f.click(function(n){n.preventDefault();var c=r.position().left,s=u+(c-i.width()),l=r.position().top,h=o+(l-i.height());e.stop().show("fast");t.scrollerOrientation=="horizontal"?s>=i.width()?r.stop().animate({left:"-="+i.width()},t.scrollSpeed,t.scrollEasing,function(){s==i.width()&&f.stop().hide("fast")}):(f.stop().hide("fast"),r.stop().animate({left:i.width()-u},t.scrollSpeed,t.scrollEasing)):h>=i.height()?r.stop().animate({top:"-="+i.height()},t.scrollSpeed,t.scrollEasing,function(){h==i.height()&&f.stop().hide("fast")}):(f.stop().hide("fast"),r.stop().animate({top:i.height()-o},t.scrollSpeed,t.scrollEasing))});e.click(function(n){n.preventDefault();var s=r.position().left,c=u+(s-i.width()),h=r.position().top,l=o+(h-i.height());f.stop().show("fast");t.scrollerOrientation=="horizontal"?s+i.width()<=0?r.stop().animate({left:"+="+i.width()},t.scrollSpeed,t.scrollEasing,function(){s+i.width()==0&&e.stop().hide("fast")}):(e.stop().hide("fast"),r.stop().animate({left:0},t.scrollSpeed,t.scrollEasing)):h+i.height()<=0?r.stop().animate({top:"+="+i.height()},t.scrollSpeed,t.scrollEasing,function(){h+i.height()==0&&e.stop().hide("fast")}):(e.stop().hide("fast"),r.stop().animate({top:0},t.scrollSpeed,t.scrollEasing))})}var i=n(this),y=i.children(".jTscrollerContainer"),r=i.children(".jTscrollerContainer").children(".jTscroller"),f=i.children(".jTscrollerNextButton"),e=i.children(".jTscrollerPrevButton"),u,o,c,s,h,a,l,p,w,v;t.scrollerOrientation=="horizontal"?(y.css("width",999999),u=r.outerWidth(!0),y.css("width",u)):u=r.outerWidth(!0);o=r.outerHeight(!0);u>i.width()||o>i.height()?(t.scrollerType=="hoverAccelerate"?(l=8,i.hover(function(){i.mousemove(function(n){c=findPos(this);s=n.pageX-c[1];h=n.pageY-c[0]});clearInterval(a);a=setInterval(k,l)},function(){clearInterval(a);r.stop()}),e.add(f).hide()):t.scrollerType=="clickButtons"?d():(c=findPos(this),i.mousemove(function(n){var f,e,l,a;s=n.pageX-c[1];h=n.pageY-c[0];f=s/i.width();f>1&&(f=1);e=h/i.height();e>1&&(e=1);l=Math.round(-((u-i.width())*f));a=Math.round(-((o-i.height())*e));r.stop(!0,!1).animate({left:l,top:a},t.scrollEasingAmount,t.scrollEasing)}),e.add(f).hide()),t.autoScrolling>0&&b()):e.add(f).hide();v=0})}}(jQuery),function(n,t,r){(function(n){"use strict";"function"==typeof define&&define.amd?define(["jquery","imagesloaded"],n):jQuery&&!jQuery.fn.qtip&&n(jQuery)})(function(u){function hi(n,t,i,r){this.id=i;this.target=n;this.tooltip=c;this.elements=elements={target:n};this._id=h+"-"+i;this.timers={img:{}};this.options=t;this.plugins={};this.cache=cache={event:{},target:u(),disabled:f,attr:r,onTooltip:f,lastClass:""};this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=f}function tt(n){return n===c||"object"!==u.type(n)}function ci(n){return!(u.isFunction(n)||n&&n.attr||n.length||"object"===u.type(n)&&(n.jquery||n.then))}function pt(n){var t,r,i,s;return tt(n)?f:(tt(n.metadata)&&(n.metadata={type:n.metadata}),"content"in n&&(t=n.content,tt(t)||t.jquery||t.done?t=n.content={text:r=ci(t)?f:t}:r=t.text,"ajax"in t&&(i=t.ajax,s=i&&i.once!==f,delete t.ajax,t.text=function(n,t){var f=r||u(this).attr(t.options.content.attr)||"Loading...",e=u.ajax(u.extend({},i,{context:t})).then(i.success,c,i.error).then(function(n){return n&&s&&t.set("content.text",n),n},function(n,i,r){t.destroyed||0===n.status||t.set("content.text",i+": "+r)});return s?f:(t.set("content.text",f),e)}),"title"in t&&(tt(t.title)||(t.button=t.title.button,t.title=t.title.text),ci(t.title||f)&&(t.title=f))),"position"in n&&tt(n.position)&&(n.position={my:n.position,at:n.position}),"show"in n&&tt(n.show)&&(n.show=n.show.jquery?{target:n.show}:n.show===e?{ready:e}:{event:n.show}),"hide"in n&&tt(n.hide)&&(n.hide=n.hide.jquery?{target:n.hide}:{event:n.hide}),"style"in n&&tt(n.style)&&(n.style={classes:n.style}),u.each(o,function(){this.sanitize&&this.sanitize(n)}),n)}function li(n,t){for(var u,f=0,i=n,r=t.split(".");i=i[r[f++]];)r.length>f&&(u=i);return[u||n,r.pop()]}function or(n,t){var i,r,u;for(i in this.checks)for(r in this.checks[i])(u=RegExp(r,"i").exec(n))&&(t.push(u),("builtin"===i||this.plugins[i])&&this.checks[i][r].apply(this.plugins[i]||this,t))}function wt(n){return lr.concat("").join(n?"-"+n+" ":" ")}function ai(n){if(this.tooltip.hasClass(p))return f;clearTimeout(this.timers.show);clearTimeout(this.timers.hide);var t=u.proxy(function(){this.toggle(e,n)},this);this.options.show.delay>0?this.timers.show=setTimeout(t,this.options.show.delay):t()}function vi(n){var i;if(this.tooltip.hasClass(p))return f;var t=u(n.relatedTarget),r=t.closest(rt)[0]===this.tooltip[0],e=t[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==t[0]&&"mouse"===this.options.position.target&&r||this.options.hide.fixed&&/mouse(out|leave|move)/.test(n.type)&&(r||e))try{n.preventDefault();n.stopImmediatePropagation()}catch(o){}else i=u.proxy(function(){this.toggle(f,n)},this),this.options.hide.delay>0?this.timers.hide=setTimeout(i,this.options.hide.delay):i()}function ui(n){return this.tooltip.hasClass(p)||!this.options.hide.inactive?f:(clearTimeout(this.timers.inactive),this.timers.inactive=setTimeout(u.proxy(function(){this.hide(n)},this),this.options.hide.inactive),r)}function yi(n){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(n)}function pi(n,i,r){u(t.body).delegate(n,(i.split?i:i.join(ei+" "))+ei,function(){var n=l.api[u.attr(this,gt)];n&&!n.disabled&&r.apply(n,arguments)})}function sr(n,i,r){var y,s,v,o,b,k=u(t.body),p=n[0]===t?k:n,w=n.metadata?n.metadata(r.metadata):c,d="html5"===r.metadata.type&&w?w[r.metadata.name]:c,a=n.data(r.metadata.name||"qtipopts");try{a="string"==typeof a?u.parseJSON(a):a}catch(g){}if(o=u.extend(e,{},l.defaults,r,"object"==typeof a?pt(a):c,pt(d||w)),s=o.position,o.id=i,"boolean"==typeof o.content.text){if(v=n.attr(o.content.attr),o.content.attr===f||!v)return f;o.content.text=v}if(s.container.length||(s.container=k),s.target===f&&(s.target=p),o.show.target===f&&(o.show.target=p),o.show.solo===e&&(o.show.solo=s.container.closest("body")),o.hide.target===f&&(o.hide.target=p),o.position.viewport===e&&(o.position.viewport=s.container),s.container=s.container.eq(0),s.at=new it(s.at,e),s.my=new it(s.my),n.data(h))if(o.overwrite)n.qtip("destroy");else if(o.overwrite===f)return f;return n.attr(di,i),o.suppress&&(b=n.attr("title"))&&n.removeAttr("title").attr(ut,b).attr("title",""),y=new hi(n,o,i,!!v),n.data(h,y),n.one("remove.qtip-"+i+" removeqtip.qtip-"+i,function(){var n;(n=u(this).data(h))&&n.destroy()}),y}function lt(n){return n.charAt(0).toUpperCase()+n.slice(1)}function hr(n,t){var i,u,f=t.charAt(0).toUpperCase()+t.slice(1),e=(t+" "+yr.join(f+" ")+f).split(" "),o=0;if(si[t])return n.css(si[t]);for(;i=e[o++];)if((u=n.css(i))!==r)return si[t]=i,u}function et(n,t){return parseInt(hr(n,t),10)}function wi(n,t){this._ns="tip";this.options=t;this.offset=t.offset;this.size=[t.width,t.height];this.init(this.qtip=n)}function bi(n,t){this.options=t;this._ns="-modal";this.init(this.qtip=n)}function ki(n){this._ns="ie6";this.init(this.qtip=n)}var l,s,it,bt,kt,e=!0,f=!1,c=null,b="x",w="y",ot="width",dt="height",y="top",v="left",g="bottom",k="right",a="center",cr="flipinvert",nt="shift",o={},h="qtip",di="data-hasqtip",gt="data-qtip-id",lr=["ui-widget","ui-tooltip"],rt="."+h,gi="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),nr=h+"-fixed",fi=h+"-default",st=h+"-focus",ar=h+"-hover",p=h+"-disabled",ht="_replacedByqTip",ut="oldtitle",tr,ir,at,ei,ii,ft,ri,d,fr,er;BROWSER={ie:function(){for(var n=3,i=t.createElement("div");(i.innerHTML="<!--[if gt IE "+ ++n+"]><i><\/i><![endif]-->")&&i.getElementsByTagName("i")[0];);return n>4?n:NaN}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||f};s=hi.prototype;s.render=function(n){if(this.rendered||this.destroyed)return this;var i=this,t=this.options,w=this.cache,a=this.elements,v=t.content.text,r=t.content.title,b=t.content.button,s=t.position,y="."+this._id+" ",c=[];return u.attr(this.target[0],"aria-describedby",this._id),this.tooltip=a.tooltip=tooltip=u("<div/>",{id:this._id,"class":[h,fi,t.style.classes,h+"-pos-"+t.position.my.abbrev()].join(" "),width:t.style.width||"",height:t.style.height||"",tracking:"mouse"===s.target&&s.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":f,"aria-describedby":this._id+"-content","aria-hidden":e}).toggleClass(p,this.disabled).attr(gt,this.id).data(h,this).appendTo(s.container).append(a.content=u("<div />",{"class":h+"-content",id:this._id+"-content","aria-atomic":e})),this.rendered=-1,this.positioning=e,r&&(this._createTitle(),u.isFunction(r)||c.push(this._updateTitle(r,f))),b&&this._createButton(),u.isFunction(v)||c.push(this._updateContent(v,f)),this.rendered=e,this._setWidget(),u.each(t.events,function(n,t){u.isFunction(t)&&tooltip.bind(("toggle"===n?["tooltipshow","tooltiphide"]:["tooltip"+n]).join(y)+y,t)}),u.each(o,function(n){var t;"render"===this.initialize&&(t=this(i))&&(i.plugins[n]=t)}),this._assignEvents(),u.when.apply(u,c).then(function(){i._trigger("render");i.positioning=f;i.hiddenDuringWait||!t.show.ready&&!n||i.toggle(e,w.event,f);i.hiddenDuringWait=f}),l.api[this.id]=this,this};s.destroy=function(n){function t(){if(!this.destroyed){this.destroyed=e;var n=this.target,t=n.attr(ut);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove();u.each(this.plugins,function(){this.destroy&&this.destroy()});clearTimeout(this.timers.show);clearTimeout(this.timers.hide);this._unassignEvents();n.removeData(h).removeAttr(gt).removeAttr("aria-describedby");this.options.suppress&&t&&n.attr("title",t).removeAttr(ut);this._unbind(n);this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=c;delete l.api[this.id]}}return this.destroyed?this.target:(n!==e&&this.rendered?(tooltip.one("tooltiphidden",u.proxy(t,this)),!this.triggering&&this.hide()):t.call(this),this.target)};bt=s.checks={builtin:{"^id$":function(n,t,i,r){var o=i===e?l.nextid:i,s=h+"-"+o;o!==f&&o.length>0&&!u("#"+s).length?(this._id=s,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):n[t]=r},"^prerender":function(n,t,i){i&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(n,t,i){this._updateContent(i)},"^content.attr$":function(n,t,i,r){this.options.content.text===this.target.attr(r)&&this._updateContent(this.target.attr(i))},"^content.title$":function(n,t,i){return i?(i&&!this.elements.title&&this._createTitle(),this._updateTitle(i),r):this._removeTitle()},"^content.button$":function(n,t,i){this._updateButton(i)},"^content.title.(text|button)$":function(n,t,i){this.set("content."+t,i)},"^position.(my|at)$":function(n,t,i){"string"==typeof i&&(n[t]=new it(i,"at"===t))},"^position.container$":function(n,t,i){this.tooltip.appendTo(i)},"^show.ready$":function(n,t,i){i&&(!this.rendered&&this.render(e)||this.toggle(e))},"^style.classes$":function(n,t,i,r){this.tooltip.removeClass(r).addClass(i)},"^style.width|height":function(n,t,i){this.tooltip.css(t,i)},"^style.widget|content.title":function(){this._setWidget()},"^style.def":function(n,t,i){this.tooltip.toggleClass(fi,!!i)},"^events.(render|show|move|hide|focus|blur)$":function(n,t,i){tooltip[(u.isFunction(i)?"":"un")+"bind"]("tooltip"+t,i)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var n=this.options.position;tooltip.attr("tracking","mouse"===n.target&&n.adjust.mouse);this._unassignEvents();this._assignEvents()}}};s.get=function(n){if(this.destroyed)return this;var i=li(this.options,n.toLowerCase()),t=i[0][i[1]];return t.precedance?t.string():t};tr=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i;ir=/^prerender|show\.ready/i;s.set=function(n,t){if(this.destroyed)return this;var s,h=this.rendered,i=f,o=this.options;return this.checks,"string"==typeof n?(s=n,n={},n[s]=t):n=u.extend({},n),u.each(n,function(t,f){if(!h&&!ir.test(t))return delete n[t],r;var s,e=li(o,t.toLowerCase());s=e[0][e[1]];e[0][e[1]]=f&&f.nodeType?u(f):f;i=tr.test(t)||i;n[t]=[e[0],e[1],f,s]}),pt(o),this.positioning=e,u.each(n,u.proxy(or,this)),this.positioning=f,this.rendered&&this.tooltip[0].offsetWidth>0&&i&&this.reposition("mouse"===o.position.target?c:this.cache.event),this};s._update=function(n,t){var r=this,i=this.cache;return this.rendered&&n?(u.isFunction(n)&&(n=n.call(this.elements.target,i.event,this)||""),u.isFunction(n.then)?(i.waiting=e,n.then(function(n){return i.waiting=f,r._update(n,t)},c,function(n){return r._update(n,t)})):n===f||!n&&""!==n?f:(n.jquery&&n.length>0?t.children().detach().end().append(n.css({display:"block"})):t.html(n),i.waiting=e,(u.fn.imagesLoaded?t.imagesLoaded():u.Deferred().resolve(u([]))).done(function(n){i.waiting=f;n.length&&r.rendered&&r.tooltip[0].offsetWidth>0&&r.reposition(i.event,!n.length)}).promise())):f};s._updateContent=function(n,t){this._update(n,this.elements.content,t)};s._updateTitle=function(n,t){this._update(n,this.elements.title,t)===f&&this._removeTitle(f)};s._createTitle=function(){var n=this.elements,t=this._id+"-title";n.titlebar&&this._removeTitle();n.titlebar=u("<div />",{"class":h+"-titlebar "+(this.options.style.widget?wt("header"):"")}).append(n.title=u("<div />",{id:t,"class":h+"-title","aria-atomic":e})).insertBefore(n.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(n){u(this).toggleClass("ui-state-active ui-state-focus","down"===n.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(n){u(this).toggleClass("ui-state-hover","mouseover"===n.type)});this.options.content.button&&this._createButton()};s._removeTitle=function(n){var t=this.elements;t.title&&(t.titlebar.remove(),t.titlebar=t.title=t.button=c,n!==f&&this.reposition())};s.reposition=function(i,r){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=e;var c,l,w=this.cache,d=this.tooltip,p=this.options.position,h=p.target,ut=p.my,b=p.at,ft=p.viewport,ot=p.container,nt=p.adjust,lt=nt.method.split(" "),st=d.outerWidth(f),ht=d.outerHeight(f),tt=0,it=0,at=d.css("position"),s={left:0,top:0},vt=d[0].offsetWidth>0,yt=i&&"scroll"===i.type,et=u(n),ct=ot[0].ownerDocument,rt=this.mouse;if(u.isArray(h)&&2===h.length)b={x:v,y:y},s={left:h[0],top:h[1]};else if("mouse"===h&&(i&&i.pageX||w.event.pageX))b={x:v,y:y},i=!rt||!rt.pageX||!nt.mouse&&i&&i.pageX?(!i||"resize"!==i.type&&"scroll"!==i.type?i&&i.pageX&&"mousemove"===i.type?i:(!nt.mouse||this.options.show.distance)&&w.origin&&w.origin.pageX?w.origin:i:w.event)||i||w.event||rt||{}:rt,"static"!==at&&(s=ot.offset()),ct.body.offsetWidth!==(n.innerWidth||ct.documentElement.clientWidth)&&(l=u(ct.body).offset()),s={left:i.pageX-s.left+(l&&l.left||0),top:i.pageY-s.top+(l&&l.top||0)},nt.mouse&&yt&&(s.left-=rt.scrollX-et.scrollLeft(),s.top-=rt.scrollY-et.scrollTop());else{if("event"===h&&i&&i.target&&"scroll"!==i.type&&"resize"!==i.type?w.target=u(i.target):"event"!==h&&(w.target=u(h.jquery?h:elements.target)),h=w.target,h=u(h).eq(0),0===h.length)return this;h[0]===t||h[0]===n?(tt=BROWSER.iOS?n.innerWidth:h.width(),it=BROWSER.iOS?n.innerHeight:h.height(),h[0]===n&&(s={top:(ft||h).scrollTop(),left:(ft||h).scrollLeft()})):o.imagemap&&h.is("area")?c=o.imagemap(this,h,b,o.viewport?lt:f):o.svg&&h[0].ownerSVGElement?c=o.svg(this,h,b,o.viewport?lt:f):(tt=h.outerWidth(f),it=h.outerHeight(f),s=h.offset());c&&(tt=c.width,it=c.height,l=c.offset,s=c.position);s=this.reposition.offset(h,s,ot);(BROWSER.iOS>3.1&&4.1>BROWSER.iOS||BROWSER.iOS>=4.3&&4.33>BROWSER.iOS||!BROWSER.iOS&&"fixed"===at)&&(s.left-=et.scrollLeft(),s.top-=et.scrollTop());(!c||c&&c.adjustable!==f)&&(s.left+=b.x===k?tt:b.x===a?tt/2:0,s.top+=b.y===g?it:b.y===a?it/2:0)}return s.left+=nt.x+(ut.x===k?-st:ut.x===a?-st/2:0),s.top+=nt.y+(ut.y===g?-ht:ut.y===a?-ht/2:0),o.viewport?(s.adjusted=o.viewport(this,s,p,tt,it,st,ht),l&&s.adjusted.left&&(s.left+=l.left),l&&s.adjusted.top&&(s.top+=l.top)):s.adjusted={left:0,top:0},this._trigger("move",[s,ft.elem||ft],i)?(delete s.adjusted,r===f||!vt||isNaN(s.left)||isNaN(s.top)||"mouse"===h||!u.isFunction(p.effect)?d.css(s):u.isFunction(p.effect)&&(p.effect.call(d,this,u.extend({},s)),d.queue(function(n){u(this).css({opacity:"",height:""});BROWSER.ie&&this.style.removeAttribute("filter");n()})),this.positioning=f,this):this};s.reposition.offset=function(n,i,r){function s(n,t){i.left+=t*n.scrollLeft();i.top+=t*n.scrollTop()}if(!r[0])return i;var o,h,e,c,l=u(n[0].ownerDocument),a=!!BROWSER.ie&&"CSS1Compat"!==t.compatMode,f=r[0];do"static"!==(h=u.css(f,"position"))&&("fixed"===h?(e=f.getBoundingClientRect(),s(l,-1)):(e=u(f).position(),e.left+=parseFloat(u.css(f,"borderLeftWidth"))||0,e.top+=parseFloat(u.css(f,"borderTopWidth"))||0),i.left-=e.left+(parseFloat(u.css(f,"marginLeft"))||0),i.top-=e.top+(parseFloat(u.css(f,"marginTop"))||0),o||"hidden"===(c=u.css(f,"overflow"))||"visible"===c||(o=u(f)));while(f=f.offsetParent);return o&&(o[0]!==l[0]||a)&&s(o,1),i};at=(it=s.reposition.Corner=function(n,t){n=(""+n).replace(/([A-Z])/," $1").replace(/middle/gi,a).toLowerCase();this.x=(n.match(/left|right/i)||n.match(/center/)||["inherit"])[0].toLowerCase();this.y=(n.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();this.forceY=!!t;var i=n.charAt(0);this.precedance="t"===i||"b"===i?w:b}).prototype;at.invert=function(n,t){this[n]=this[n]===v?k:this[n]===k?v:t||this[n]};at.string=function(){var n=this.x,t=this.y;return n===t?n:this.precedance===w||this.forceY&&"center"!==t?t+" "+n:n+" "+t};at.abbrev=function(){var n=this.string().split(" ");return n[0].charAt(0)+(n[1]&&n[1].charAt(0)||"")};at.clone=function(){return new it(this.string(),this.forceY)};s.toggle=function(n,i){var s=this.cache,p=this.options,r=this.tooltip;if(i){if(/over|enter/.test(i.type)&&/out|leave/.test(s.event.type)&&p.show.target.add(i.target).length===p.show.target.length&&r.has(i.relatedTarget).length)return this;s.event=u.extend({},i)}if(this.waiting&&!n&&(this.hiddenDuringWait=e),!this.rendered)return n?this.render(1):this;if(this.destroyed||this.disabled)return this;var a,v,y=n?"show":"hide",o=this.options[y],w=(this.options[n?"hide":"show"],this.options.position),l=this.options.content,b=this.tooltip.css("width"),k=this.tooltip[0].offsetWidth>0,d=n||1===o.target.length,g=!i||2>o.target.length||s.target[0]===i.target;return(typeof n).search("boolean|number")&&(n=!k),a=!r.is(":animated")&&k===n&&g,v=a?c:!!this._trigger(y,[90]),v!==f&&n&&this.focus(i),!v||a?this:(u.attr(r[0],"aria-hidden",!n),n?(s.origin=u.extend({},this.mouse),u.isFunction(l.text)&&this._updateContent(l.text,f),u.isFunction(l.title)&&this._updateTitle(l.title,f),!kt&&"mouse"===w.target&&w.adjust.mouse&&(u(t).bind("mousemove."+h,this._storeMouse),kt=e),b||r.css("width",r.outerWidth(f)),this.reposition(i,arguments[2]),b||r.css("width",""),o.solo&&("string"==typeof o.solo?u(o.solo):u(rt,o.solo)).not(r).not(o.target).qtip("hide",u.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete s.origin,kt&&!u(rt+'[tracking="true"]:visible',o.solo).not(r).length&&(u(t).unbind("mousemove."+h),kt=f),this.blur(i)),after=u.proxy(function(){n?(BROWSER.ie&&r[0].style.removeAttribute("filter"),r.css("overflow",""),"string"==typeof o.autofocus&&u(this.options.show.autofocus,r).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):r.css({display:"",visibility:"",opacity:"",left:"",top:""});this._trigger(n?"visible":"hidden")},this),o.effect===f||d===f?(r[y](),after()):u.isFunction(o.effect)?(r.stop(1,1),o.effect.call(r,this),r.queue("fx",function(n){after();n()})):r.fadeTo(90,n?1:0,after),n&&o.target.trigger("qtip-"+this.id+"-inactive"),this)};s.show=function(n){return this.toggle(e,n)};s.hide=function(n){return this.toggle(f,n)};s.focus=function(n){if(!this.rendered||this.destroyed)return this;var t=u(rt),i=this.tooltip,f=parseInt(i[0].style.zIndex,10),r=l.zindex+t.length;return i.hasClass(st)||this._trigger("focus",[r],n)&&(f!==r&&(t.each(function(){this.style.zIndex>f&&(this.style.zIndex=this.style.zIndex-1)}),t.filter("."+st).qtip("blur",n)),i.addClass(st)[0].style.zIndex=r),this};s.blur=function(n){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(st),this._trigger("blur",[this.tooltip.css("zIndex")],n),this)};s.disable=function(n){return this.destroyed?this:("boolean"!=typeof n&&(n=!(this.tooltip.hasClass(p)||this.disabled)),this.rendered&&this.tooltip.toggleClass(p,n).attr("aria-disabled",n),this.disabled=!!n,this)};s.enable=function(){return this.disable(f)};s._createButton=function(){var e=this,n=this.elements,i=n.tooltip,t=this.options.content.button,o="string"==typeof t,r=o?t:"Close tooltip";n.button&&n.button.remove();n.button=t.jquery?t:u("<a />",{"class":"qtip-close "+(this.options.style.widget?"":h+"-icon"),title:r,"aria-label":r}).prepend(u("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"}));n.button.appendTo(n.titlebar||i).attr("role","button").click(function(n){return i.hasClass(p)||e.hide(n),f})};s._updateButton=function(n){if(!this.rendered)return f;var t=this.elements.button;n?this._createButton():t.remove()};s._setWidget=function(){var t=this.options.style.widget,n=this.elements,i=n.tooltip,r=i.hasClass(p);i.removeClass(p);p=t?"ui-state-disabled":"qtip-disabled";i.toggleClass(p,r);i.toggleClass("ui-helper-reset "+wt(),t).toggleClass(fi,this.options.style.def&&!t);n.content&&n.content.toggleClass(wt("content"),t);n.titlebar&&n.titlebar.toggleClass(wt("header"),t);n.button&&n.button.toggleClass(h+"-icon",!t)};s._storeMouse=function(i){this.mouse={pageX:i.pageX,pageY:i.pageY,type:"mousemove",scrollX:n.pageXOffset||t.body.scrollLeft||t.documentElement.scrollLeft,scrollY:n.pageYOffset||t.body.scrollTop||t.documentElement.scrollTop}};s._bind=function(n,t,i,r,f){var e="."+this._id+(r?"-"+r:"");t.length&&u(n).bind((t.split?t:t.join(e+" "))+e,u.proxy(i,f||this))};s._unbind=function(n,t){u(n).unbind("."+this._id+(t?"-"+t:""))};ei="."+h;u(function(){pi(rt,["mouseenter","mouseleave"],function(n){var r="mouseenter"===n.type,i=u(n.currentTarget),f=u(n.relatedTarget||n.target),t=this.options;r?(this.focus(n),i.hasClass(nr)&&!i.hasClass(p)&&clearTimeout(this.timers.hide)):"mouse"===t.position.target&&t.hide.event&&t.show.target&&!f.closest(t.show.target[0]).length&&this.hide(n);i.toggleClass(ar,r)});pi("["+gt+"]",gi,ui)});s._trigger=function(n,t,i){var r=u.Event("tooltip"+n);return r.originalEvent=i&&u.extend({},i)||this.cache.event||c,this.triggering=e,this.tooltip.trigger(r,[this].concat(t||[])),this.triggering=f,!r.isDefaultPrevented()};s._assignEvents=function(){var i=this.options,f=i.position,s=this.tooltip,o=i.show.target,e=i.hide.target,b=f.container,a=f.viewport,v=u(t),y=(u(t.body),u(n)),h=i.show.event?u.trim(""+i.show.event).split(" "):[],c=i.hide.event?u.trim(""+i.hide.event).split(" "):[],w=[];/mouse(out|leave)/i.test(i.hide.event)&&"window"===i.hide.leave&&this._bind(v,["mouseout","blur"],function(n){/select|option/.test(n.target.nodeName)||n.relatedTarget||this.hide(n)});i.hide.fixed?e=e.add(s.addClass(nr)):/mouse(over|enter)/i.test(i.show.event)&&this._bind(e,"mouseleave",function(){clearTimeout(this.timers.show)});(""+i.hide.event).indexOf("unfocus")>-1&&this._bind(b.closest("html"),["mousedown","touchstart"],function(n){var t=u(n.target),i=this.rendered&&!this.tooltip.hasClass(p)&&this.tooltip[0].offsetWidth>0,r=t.parents(rt).filter(this.tooltip[0]).length>0;t[0]===this.target[0]||t[0]===this.tooltip[0]||r||this.target.has(t[0]).length||!i||this.hide(n)});"number"==typeof i.hide.inactive&&(this._bind(o,"qtip-"+this.id+"-inactive",ui),this._bind(e.add(s),l.inactiveEvents,ui,"-inactive"));c=u.map(c,function(n){var t=u.inArray(n,h);return t>-1&&e.add(o).length===e.length?(w.push(h.splice(t,1)[0]),r):n});this._bind(o,h,ai);this._bind(e,c,vi);this._bind(o,w,function(n){(this.tooltip[0].offsetWidth>0?vi:ai).call(this,n)});this._bind(o.add(s),"mousemove",function(n){if("number"==typeof i.hide.distance){var t=this.cache.origin||{},r=this.options.hide.distance,u=Math.abs;(u(n.pageX-t.pageX)>=r||u(n.pageY-t.pageY)>=r)&&this.hide(n)}this._storeMouse(n)});"mouse"===f.target&&f.adjust.mouse&&(i.hide.event&&this._bind(o,["mouseenter","mouseleave"],function(n){this.cache.onTarget="mouseenter"===n.type}),this._bind(v,"mousemove",function(n){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(p)&&this.tooltip[0].offsetWidth>0&&this.reposition(n)}));(f.adjust.resize||a.length)&&this._bind(u.event.special.resize?a:y,"resize",yi);f.adjust.scroll&&this._bind(y.add(f.container),"scroll",yi)};s._unassignEvents=function(){var i=[this.options.show.target[0],this.options.hide.target[0],this.rendered&&this.tooltip[0],this.options.position.container[0],this.options.position.viewport[0],this.options.position.container.closest("html")[0],n,t];this.rendered?this._unbind(u([]).pushStack(u.grep(i,function(n){return"object"==typeof n}))):u(i[0]).unbind("."+this._id+"-create")};l=u.fn.qtip=function(n,t,i){var o=(""+n).toLowerCase(),v=c,y=u.makeArray(arguments).slice(1),s=y[y.length-1],a=this[0]?u.data(this[0],h):c;return!arguments.length&&a||"api"===o?a:"string"==typeof n?(this.each(function(){var n=u.data(this,h);if(!n)return e;if(s&&s.timeStamp&&(n.cache.event=s),t&&("option"===o||"options"===o)){if(i===r&&!u.isPlainObject(t))return v=n.get(t),f;n.set(t,i)}else n[o]&&n[o].apply(n,y)}),v!==c?v:this):"object"!=typeof n&&arguments.length?r:(a=pt(u.extend(e,{},n)),l.bind.call(this,a,s))};l.bind=function(n,t){return this.each(function(i){function p(n){function t(){s.render("object"==typeof n||h.show.ready);y.show.add(y.hide).unbind(v)}return s.disabled?f:(s.cache.event=u.extend({},n),s.cache.target=n?u(n.target):[r],h.show.delay>0?(clearTimeout(s.timers.show),s.timers.show=setTimeout(t,h.show.delay),a.show!==a.hide&&y.hide.bind(a.hide,function(){clearTimeout(s.timers.show)})):t(),r)}var h,y,a,v,s,c;return c=u.isArray(n.id)?n.id[i]:n.id,c=!c||c===f||1>c.length||l.api[c]?l.nextid++:c,v=".qtip-"+c+"-create",s=sr(u(this),c,n),s===f?e:(l.api[c]=s,h=s.options,u.each(o,function(){"initialize"===this.initialize&&this(s)}),y={show:h.show.target,hide:h.hide.target},a={show:u.trim(""+h.show.event).replace(/ /g,v+" ")+v,hide:u.trim(""+h.hide.event).replace(/ /g,v+" ")+v},/mouse(over|enter)/i.test(a.show)&&!/mouse(out|leave)/i.test(a.hide)&&(a.hide+=" mouseleave"+v),y.show.bind("mousemove"+v,function(n){s._storeMouse(n);s.cache.onTarget=e}),y.show.bind(a.show,p),(h.show.ready||h.prerender)&&p(t),r)})};l.api={};u.each({attr:function(n,t){if(this.length){var r=this[0],f="title",i=u.data(r,"qtip");if(n===f&&i&&"object"==typeof i&&i.options.suppress)return 2>arguments.length?u.attr(r,ut):(i&&i.options.content.attr===f&&i.cache.attr&&i.set("content.text",t),this.attr(ut,t))}return u.fn["attr"+ht].apply(this,arguments)},clone:function(n){var t=(u([]),u.fn["clone"+ht].apply(this,arguments));return n||t.filter("["+ut+"]").attr("title",function(){return u.attr(this,ut)}).removeAttr(ut),t}},function(n,t){if(!t||u.fn[n+ht])return e;var i=u.fn[n+ht]=u.fn[n];u.fn[n]=function(){return t.apply(this,arguments)||i.apply(this,arguments)}});u.ui||(u["cleanData"+ht]=u.cleanData,u.cleanData=function(n){for(var t,i=0;(t=u(n[i])).length;i++)if(t.attr(di))try{t.triggerHandler("removeqtip")}catch(r){}u["cleanData"+ht].apply(this,arguments)});l.version="2.1.1";l.nextid=0;l.inactiveEvents=gi;l.zindex=15e3;l.defaults={prerender:f,id:f,overwrite:e,suppress:e,content:{text:e,attr:"title",title:f,button:f},position:{my:"top left",at:"bottom right",target:f,container:f,viewport:f,adjust:{x:0,y:0,mouse:e,scroll:e,resize:e,method:"flipinvert flipinvert"},effect:function(n,t){u(this).animate(t,{duration:200,queue:f})}},show:{target:f,event:"mouseenter",effect:e,delay:90,solo:f,ready:f,autofocus:f},hide:{target:f,event:"mouseleave",effect:e,delay:0,fixed:f,inactive:f,leave:"window",distance:f},style:{classes:"",widget:f,width:f,height:f,def:e},events:{render:c,move:c,show:c,hide:c,toggle:c,visible:c,hidden:c,focus:c,blur:c}};var oi,vt="margin",ni="border",yt="color",ct="background-color",rr="transparent",ur=" !important",ti=!!t.createElement("canvas").getContext,vr=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,si={},yr=["Webkit","O","Moz","ms"];ti||(createVML=function(n,t,i){return"<qtipvml:"+n+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(t||"")+' style="behavior: url(#default#VML); '+(i||"")+'" />'});u.extend(wi.prototype,{init:function(n){var t,i;i=this.element=n.elements.tip=u("<div />",{"class":h+"-tip"}).prependTo(n.tooltip);ti?(t=u("<canvas />").appendTo(this.element)[0].getContext("2d"),t.lineJoin="miter",t.miterLimit=100,t.save()):(t=createVML("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(t+t),n._bind(u("*",i).add(i),["click","mousedown"],function(n){n.stopPropagation()},this._ns));n._bind(n.tooltip,"tooltipmove",this.reposition,this._ns,this);this.create()},_swapDimensions:function(){this.size[0]=this.options.height;this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width;this.size[1]=this.options.height},_useTitle:function(n){var t=this.qtip.elements.titlebar;return t&&(n.y===y||n.y===a&&this.element.position().top+this.size[1]/2+this.options.offset<t.outerHeight(e))},_parseCorner:function(n){var t=this.qtip.options.position.my;return n===f||t===f?n=f:n===e?n=new it(t.string()):n.string||(n=new it(n),n.fixed=e),n},_parseWidth:function(n,t,i){var u=this.qtip.elements,r=ni+lt(t)+"Width";return(i?et(i,r):et(u.content,r)||et(this._useTitle(n)&&u.titlebar||u.content,r)||et(tooltip,r))||0},_parseRadius:function(n){var t=this.qtip.elements,i=ni+lt(n.y)+lt(n.x)+"Radius";return 9>BROWSER.ie?0:et(this._useTitle(n)&&t.titlebar||t.content,i)||et(t.tooltip,i)||0},_invalidColour:function(n,t,i){var r=n.css(t);return!r||i&&r===n.css(i)||vr.test(r)?f:r},_parseColours:function(n){var f=this.qtip.elements,i=this.element.css("cssText",""),r=ni+lt(n[n.precedance])+lt(yt),o=this._useTitle(n)&&f.titlebar||f.content,t=this._invalidColour,e=[];return e[0]=t(i,ct)||t(o,ct)||t(f.content,ct)||t(tooltip,ct)||i.css(ct),e[1]=t(i,r,yt)||t(o,r,yt)||t(f.content,r,yt)||t(tooltip,r,yt)||tooltip.css(r),u("*",i).add(i).css("cssText",ct+":"+rr+ur+";"+ni+":0"+ur+";"),e},_calculateSize:function(n){var s,u,f,e=n.precedance===w,h=this.options[e?"height":"width"],o=this.options[e?"width":"height"],c="c"===n.abbrev(),l=h*(c?.5:1),i=Math.pow,a=Math.round,r=Math.sqrt(i(l,2)+i(o,2)),t=[this.border/l*r,this.border/o*r];return t[2]=Math.sqrt(i(t[0],2)-i(this.border,2)),t[3]=Math.sqrt(i(t[1],2)-i(this.border,2)),s=r+t[2]+t[3]+(c?0:t[0]),u=s/r,f=[a(u*h),a(u*o)],e?f:f.reverse()},_calculateTip:function(n){var t=this.size[0],i=this.size[1],u=Math.ceil(t/2),f=Math.ceil(i/2),r={br:[0,0,t,i,t,0],bl:[0,0,t,0,0,i],tr:[0,i,t,0,t,i],tl:[0,0,0,i,t,i],tc:[0,i,u,0,t,i],bc:[0,0,t,0,u,i],rc:[0,0,t,f,0,i],lc:[t,0,t,i,0,f]};return r.lt=r.br,r.rt=r.bl,r.lb=r.tr,r.rb=r.tl,r[n.abbrev()]},create:function(){var n=this.corner=(ti||BROWSER.ie)&&this._parseCorner(this.options.corner);return(this.enabled=!!this.corner&&"c"!==this.corner.abbrev())&&(this.qtip.cache.corner=n.clone(),this.update()),this.element.toggle(this.enabled),this.corner},update:function(n,t){if(!this.enabled)return this;var l,tt,o,s,p,h,r,ut=(this.qtip.elements,this.element),rt=ut.children(),d=this.options,c=this.size,i=d.mimic,nt=Math.round;n||(n=this.qtip.cache.corner||this.corner);i===f?i=n:(i=new it(i),i.precedance=n.precedance,"inherit"===i.x?i.x=n.x:"inherit"===i.y?i.y=n.y:i.x===i.y&&(i[n.precedance]=n[n.precedance]));tt=i.precedance;n.precedance===b?this._swapDimensions():this._resetDimensions();l=this.color=this._parseColours(n);l[1]!==rr?(r=this.border=this._parseWidth(n,n[n.precedance]),d.border&&1>r&&(l[0]=l[1]),this.border=r=d.border!==e?d.border:r):this.border=r=0;s=this._calculateTip(i);h=this.size=this._calculateSize(n);ut.css({width:h[0],height:h[1],lineHeight:h[1]+"px"});p=n.precedance===w?[nt(i.x===v?r:i.x===k?h[0]-c[0]-r:(h[0]-c[0])/2),nt(i.y===y?h[1]-c[1]:0)]:[nt(i.x===v?h[0]-c[0]:0),nt(i.y===y?r:i.y===g?h[1]-c[1]-r:(h[1]-c[1])/2)];ti?(rt.attr(ot,h[0]).attr(dt,h[1]),o=rt[0].getContext("2d"),o.restore(),o.save(),o.clearRect(0,0,3e3,3e3),o.fillStyle=l[0],o.strokeStyle=l[1],o.lineWidth=2*r,o.translate(p[0],p[1]),o.beginPath(),o.moveTo(s[0],s[1]),o.lineTo(s[2],s[3]),o.lineTo(s[4],s[5]),o.closePath(),r&&("border-box"===tooltip.css("background-clip")&&(o.strokeStyle=l[0],o.stroke()),o.strokeStyle=l[1],o.stroke()),o.fill()):(s="m"+s[0]+","+s[1]+" l"+s[2]+","+s[3]+" "+s[4]+","+s[5]+" xe",p[2]=r&&/^(r|b)/i.test(n.string())?8===BROWSER.ie?2:1:0,rt.css({coordsize:c[0]+r+" "+(c[1]+r),antialias:""+(i.string().indexOf(a)>-1),left:p[0]-p[2]*Number(tt===b),top:p[1]-p[2]*Number(tt===w),width:c[0]+r,height:c[1]+r}).each(function(n){var t=u(this);t[t.prop?"prop":"attr"]({coordsize:c[0]+r+" "+(c[1]+r),path:s,fillcolor:l[0],filled:!!n,stroked:!n}).toggle(!(!r&&!n));n||t.html(createVML("stroke",'weight="'+2*r+'px" color="'+l[1]+'" miterlimit="1000" joinstyle="miter"'))}));t!==f&&this.calculate(n)},calculate:function(n){if(!this.enabled)return f;var t,e,o,r=this,s=this.qtip.elements,c=this.element,h=this.options.offset,i=(this.qtip.tooltip.hasClass("ui-widget"),{});return n=n||this.corner,t=n.precedance,e=this._calculateSize(n),o=[n.x,n.y],t===b&&o.reverse(),u.each(o,function(u,f){var o,l,c;f===a?(o=t===w?v:y,i[o]="50%",i[vt+"-"+o]=-Math.round(e[t===w?0:1]/2)+h):(o=r._parseWidth(n,f,s.tooltip),l=r._parseWidth(n,f,s.content),c=r._parseRadius(n),i[f]=Math.max(-r.border,u?l:h+(c>o?c:-o)))}),i[n[t]]-=e[t===b?0:1],c.css({margin:"",top:"",bottom:"",left:"",right:""}).css(i),i},reposition:function(n,t,i){if(this.enabled){var u,c,l=t.cache,o=this.corner.clone(),s=i.adjusted,it=t.options.position.adjust.method.split(" "),d=it[0],tt=it[1]||it[0],h={left:f,top:f,x:0,y:0},p={};this.corner.fixed!==e&&(d===nt&&o.precedance===b&&s.left&&o.y!==a?o.precedance=o.precedance===b?w:b:d!==nt&&s.left&&(o.x=o.x===a?s.left>0?v:k:o.x===v?k:v),tt===nt&&o.precedance===w&&s.top&&o.x!==a?o.precedance=o.precedance===w?b:w:tt!==nt&&s.top&&(o.y=o.y===a?s.top>0?y:g:o.y===y?g:y),o.string()===l.corner.string()||l.cornerTop===s.top&&l.cornerLeft===s.left||this.update(o,f));u=this.calculate(o,s);u.right!==r&&(u.left=-u.right);u.bottom!==r&&(u.top=-u.bottom);u.user=this.offset;(h.left=d===nt&&!!s.left)&&(o.x===a?p[vt+"-left"]=h.x=u[vt+"-left"]-s.left:(c=u.right!==r?[s.left,-u.left]:[-s.left,u.left],(h.x=Math.max(c[0],c[1]))>c[0]&&(i.left-=s.left,h.left=f),p[u.right!==r?k:v]=h.x));(h.top=tt===nt&&!!s.top)&&(o.y===a?p[vt+"-top"]=h.y=u[vt+"-top"]-s.top:(c=u.bottom!==r?[s.top,-u.top]:[-s.top,u.top],(h.y=Math.max(c[0],c[1]))>c[0]&&(i.top-=s.top,h.top=f),p[u.bottom!==r?g:y]=h.y));this.element.css(p).toggle(!(h.x&&h.y||o.x===a&&h.y||o.y===a&&h.x));i.left-=u.left.charAt?u.user:d!==nt||h.top||!h.left&&!h.top?u.left:0;i.top-=u.top.charAt?u.user:tt!==nt||h.left||!h.left&&!h.top?u.top:0;l.cornerLeft=s.left;l.cornerTop=s.top;l.corner=o.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns);this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}});oi=o.tip=function(n){return new wi(n,n.options.style.tip)};oi.initialize="render";oi.sanitize=function(n){n.style&&"tip"in n.style&&(opts=n.style.tip,"object"!=typeof opts&&(opts=n.style.tip={corner:opts}),/string|boolean/i.test(typeof opts.corner)||(opts.corner=e))};bt.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create();this.qtip.reposition()},"^style.tip.(height|width)$":function(n){this.size=size=[n.width,n.height];this.update();this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}};u.extend(e,l.defaults,{style:{tip:{corner:e,mimic:f,width:6,height:6,border:e,offset:0}}});ri="qtip-modal";d="."+ri;ft=function(){function a(n){if(u.expr[":"].focusable)return u.expr[":"].focusable;var t,i,r,e=!isNaN(u.attr(n,"tabindex")),f=n.nodeName&&n.nodeName.toLowerCase();return"area"===f?(t=n.parentNode,i=t.name,n.href&&i&&"map"===t.nodeName.toLowerCase()?(r=u("img[usemap=#"+i+"]")[0],!!r&&r.is(":visible")):!1):/input|select|textarea|button|object/.test(f)?!n.disabled:"a"===f?n.href||e:e}function h(n){1>s.length&&n.length?n.not("body").blur():s.first().focus()}function v(n){if(i.is(":visible")){var e,t=u(n.target),o=r.tooltip,c=t.closest(rt);e=1>c.length?f:parseInt(c[0].style.zIndex,10)>parseInt(o[0].style.zIndex,10);e||t.closest(rt)[0]===o[0]||h(t);y=n.target===s[s.length-1]}}var r,y,l,i,o=this,s={};u.extend(o,{init:function(){function e(){var n=u(this);i.css({height:n.height(),width:n.width()})}return i=o.elem=u("<div />",{id:"qtip-overlay",html:"<div><\/div>",mousedown:function(){return f}}).hide(),u(n).bind("resize"+d,e),e(),u(t.body).bind("focusin"+d,v),u(t).bind("keydown"+d,function(n){r&&r.options.show.modal.escape&&27===n.keyCode&&r.hide(n)}),i.bind("click"+d,function(n){r&&r.options.show.modal.blur&&r.hide(n)}),o},update:function(n){r=n;s=n.options.show.modal.stealfocus!==f?n.tooltip.find("*").filter(function(){return a(this)}):[]},toggle:function(n,s,a){var p=(u(t.body),n.tooltip),v=n.options.show.modal,y=v.effect,w=s?"show":"hide",b=i.is(":visible"),k=u(d).filter(":visible:not(:animated)").not(p);return o.update(n),s&&v.stealfocus!==f&&h(u(":focus")),i.toggleClass("blurs",v.blur),s&&i.css({left:0,top:0}).appendTo(t.body),i.is(":animated")&&b===s&&l!==f||!s&&k.length?o:(i.stop(e,f),u.isFunction(y)?y.call(i,s):y===f?i[w]():i.fadeTo(parseInt(a,10)||90,s?1:0,function(){s||i.hide()}),s||i.queue(function(n){i.css({left:"",top:""});u(d).length||i.detach();n()}),l=s,r.destroyed&&(r=c),o)}});o.init()};ft=new ft;u.extend(bi.prototype,{init:function(n){var t=n.tooltip;return this.options.on?(n.elements.overlay=ft.elem,t.addClass(ri).css("z-index",o.modal.zindex+u(d).length),n._bind(t,["tooltipshow","tooltiphide"],function(n,i,r){var f=n.originalEvent;if(n.target===t[0])if(f&&"tooltiphide"===n.type&&/mouse(leave|enter)/.test(f.type)&&u(f.relatedTarget).closest(overlay[0]).length)try{n.preventDefault()}catch(e){}else f&&(!f||f.solo)||this.toggle(n,"tooltipshow"===n.type,r)},this._ns,this),n._bind(t,"tooltipfocus",function(n,i){if(!n.isDefaultPrevented()&&n.target===t[0]){var r=u(d),f=o.modal.zindex+r.length,e=parseInt(t[0].style.zIndex,10);ft.elem[0].style.zIndex=f-1;r.each(function(){this.style.zIndex>e&&(this.style.zIndex-=1)});r.filter("."+st).qtip("blur",n.originalEvent);t.addClass(st)[0].style.zIndex=f;ft.update(i);try{n.preventDefault()}catch(s){}}},this._ns,this),n._bind(t,"tooltiphide",function(n){n.target===t[0]&&u(d).filter(":visible").not(t).last().qtip("focus",n)},this._ns,this),r):this},toggle:function(n,t,i){return n&&n.isDefaultPrevented()?this:(ft.toggle(this.qtip,!!t,i),r)},destroy:function(){this.qtip.tooltip.removeClass(ri);this.qtip._unbind(this.qtip.tooltip,this._ns);ft.toggle(this.qtip,f);delete this.qtip.elements.overlay}});ii=o.modal=function(n){return new bi(n,n.options.show.modal)};ii.sanitize=function(n){n.show&&("object"!=typeof n.show.modal?n.show.modal={on:!!n.show.modal}:n.show.modal.on===r&&(n.show.modal.on=e))};ii.zindex=l.zindex-200;ii.initialize="render";bt.modal={"^show.modal.(on|blur)$":function(){this.destroy();this.init();this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}};u.extend(e,l.defaults,{show:{modal:{on:f,effect:e,blur:e,stealfocus:e,escape:e}}});o.viewport=function(i,r,u,e,o,s,c){function ct(n,t,i,u,f,e,o,s,h){var v=r[f],c=it[n],g=yt[n],ut=i===nt,rt=-d.offset[f]+l.offset[f]+l["scroll"+f],ft=c===f?h:c===e?-h:-h/2,ot=g===f?s:g===e?-s:-s/2,et=p&&p.size?p.size[o]||0:0,w=p&&p.corner&&p.corner.precedance===n&&!ut?et:0,k=rt-v+w,b=v+h-l[o]-rt+w,y=ft-(it.precedance===n||c===it[t]?ot:0)-(g===a?s/2:0);return ut?(w=p&&p.corner&&p.corner.precedance===t?et:0,y=(c===f?1:-1)*ft-w,r[f]+=k>0?k:b>0?-b:0,r[f]=Math.max(-d.offset[f]+l.offset[f]+(w&&p.corner[n]===a?p.offset:0),v-y,Math.min(Math.max(-d.offset[f]+l.offset[f]+l[o],v+y),r[f]))):(u*=i===cr?2:0,k>0&&(c!==f||b>0)?(r[f]-=y+u,tt.invert(n,f)):b>0&&(c!==e||k>0)&&(r[f]-=(c===a?-y:y)+u,tt.invert(n,e)),rt>r[f]&&-r[f]>b&&(r[f]=v,tt=it.clone())),r[f]-v}var ut,tt,lt,at=u.target,vt=i.elements.tooltip,it=u.my,yt=u.at,rt=u.adjust,ft=rt.method.split(" "),et=ft[0],st=ft[1]||ft[0],l=u.viewport,d=u.container,pt=i.cache,p=i.plugins.tip,ht={left:0,top:0};return l.jquery&&at[0]!==n&&at[0]!==t.body&&"none"!==rt.method?(ut="fixed"===vt.css("position"),l={elem:l,width:l[0]===n?l.width():l.outerWidth(f),height:l[0]===n?l.height():l.outerHeight(f),scrollleft:ut?0:l.scrollLeft(),scrolltop:ut?0:l.scrollTop(),offset:l.offset()||{left:0,top:0}},d={elem:d,scrollLeft:d.scrollLeft(),scrollTop:d.scrollTop(),offset:d.offset()||{left:0,top:0}},("shift"!==et||"shift"!==st)&&(tt=it.clone()),ht={left:"none"!==et?ct(b,w,et,rt.x,v,k,ot,e,s):0,top:"none"!==st?ct(w,b,st,rt.y,y,g,dt,o,c):0},tt&&pt.lastClass!==(lt=h+"-pos-"+tt.abbrev())&&vt.removeClass(i.cache.lastClass).addClass(i.cache.lastClass=lt),ht):ht};o.polys={polygon:function(n,t){for(var r,h,c,i={width:0,height:0,position:{top:1e10,right:0,bottom:0,left:1e10},adjustable:f},u=0,e=[],o=1,s=1,l=0,p=0,u=n.length;u--;)r=[parseInt(n[--u],10),parseInt(n[u+1],10)],r[0]>i.position.right&&(i.position.right=r[0]),r[0]<i.position.left&&(i.position.left=r[0]),r[1]>i.position.bottom&&(i.position.bottom=r[1]),r[1]<i.position.top&&(i.position.top=r[1]),e.push(r);if(h=i.width=Math.abs(i.position.right-i.position.left),c=i.height=Math.abs(i.position.bottom-i.position.top),"c"===t.abbrev())i.position={left:i.position.left+i.width/2,top:i.position.top+i.height/2};else{for(;h>0&&c>0&&o>0&&s>0;)for(h=Math.floor(h/2),c=Math.floor(c/2),t.x===v?o=h:t.x===k?o=i.width-h:o+=Math.floor(h/2),t.y===y?s=c:t.y===g?s=i.height-c:s+=Math.floor(c/2),u=e.length;u--&&!(2>e.length);)l=e[u][0]-i.position.left,p=e[u][1]-i.position.top,(t.x===v&&l>=o||t.x===k&&o>=l||t.x===a&&(o>l||l>i.width-o)||t.y===y&&p>=s||t.y===g&&s>=p||t.y===a&&(s>p||p>i.height-s))&&e.splice(u,1);i.position={left:e[0][0],top:e[0][1]}}return i},rect:function(n,t,i,r){return{width:Math.abs(i-n),height:Math.abs(r-t),position:{left:Math.min(n,i),top:Math.min(t,r)}}},_angles:{tc:1.5,tr:7/4,tl:5/4,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(n,t,i,r,u){var e=o.polys._angles[u.abbrev()],s=i*Math.cos(e*Math.PI),h=r*Math.sin(e*Math.PI);return{width:2*i-Math.abs(s),height:2*r-Math.abs(h),position:{left:n+s,top:t+h},adjustable:f}},circle:function(n,t,i,r){return o.polys.ellipse(n,t,i,i,r)}};o.svg=function(n,r,e){for(var l,c,a,v=u(t),s=r[0],h={};!s.getBBox;)s=s.parentNode;if(!s.getBBox||!s.parentNode)return f;switch(s.nodeName){case"rect":c=o.svg.toPixel(s,s.x.baseVal.value,s.y.baseVal.value);a=o.svg.toPixel(s,s.x.baseVal.value+s.width.baseVal.value,s.y.baseVal.value+s.height.baseVal.value);h=o.polys.rect(c[0],c[1],a[0],a[1],e);break;case"ellipse":case"circle":c=o.svg.toPixel(s,s.cx.baseVal.value,s.cy.baseVal.value);h=o.polys.ellipse(c[0],c[1],(s.rx||s.r).baseVal.value,(s.ry||s.r).baseVal.value,e);break;case"line":case"polygon":case"polyline":for(points=s.points||[{x:s.x1.baseVal.value,y:s.y1.baseVal.value},{x:s.x2.baseVal.value,y:s.y2.baseVal.value}],h=[],i=-1,len=points.numberOfItems||points.length;len>++i;)next=points.getItem?points.getItem(i):points[i],h.push.apply(h,o.svg.toPixel(s,next.x,next.y));h=o.polys.polygon(h,e);break;default:if(l=s.getBBox(),mtx=s.getScreenCTM(),root=s.farthestViewportElement||s,!root.createSVGPoint)return f;point=root.createSVGPoint();point.x=l.x;point.y=l.y;tPoint=point.matrixTransform(mtx);h.position={left:tPoint.x,top:tPoint.y};point.x+=l.width;point.y+=l.height;tPoint=point.matrixTransform(mtx);h.width=tPoint.x-h.position.left;h.height=tPoint.y-h.position.top}return h.position.left+=v.scrollLeft(),h.position.top+=v.scrollTop(),h};o.svg.toPixel=function(n,t,i){var u,r,o=n.getScreenCTM(),e=n.farthestViewportElement||n;return e.createSVGPoint?(r=e.createSVGPoint(),r.x=t,r.y=i,u=r.matrixTransform(o),[u.x,u.y]):f};o.imagemap=function(n,t,i){t.jquery||(t=u(t));var e,s,h,c=t.attr("shape").toLowerCase().replace("poly","polygon"),r=u('img[usemap="#'+t.parent("map").attr("name")+'"]'),a=t.attr("coords"),l=a.split(",");if(!r.length)return f;if("polygon"===c)result=o.polys.polygon(l,i);else{if(!o.polys[c])return f;for(h=-1,len=l.length,s=[];len>++h;)s.push(parseInt(l[h],10));result=o.polys[c].apply(this,s.concat(i))}return e=r.offset(),e.left+=Math.ceil((r.outerWidth(f)-r.width())/2),e.top+=Math.ceil((r.outerHeight(f)-r.height())/2),result.position.left+=e.left,result.position.top+=e.top,result};er='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';"  style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"><\/iframe>';u.extend(ki.prototype,{_scroll:function(){var t=this.qtip.elements.overlay;t&&(t[0].style.top=u(n).scrollTop()+"px")},init:function(i){var r=i.tooltip;1>u("select, object").length&&(this.bgiframe=i.elements.bgiframe=u(er).appendTo(r),i._bind(r,"tooltipmove",this.adjustBGIFrame,this._ns,this));this.redrawContainer=u("<div/>",{id:h+"-rcontainer"}).appendTo(t.body);i.elements.overlay&&i.elements.overlay.addClass("qtipmodal-ie6fix")&&(i._bind(n,["scroll","resize"],this._scroll,this._ns,this),i._bind(r,["tooltipshow"],this._scroll,this._ns,this));this.redraw()},adjustBGIFrame:function(){var t,n,i=this.qtip.tooltip,e={height:i.outerHeight(f),width:i.outerWidth(f)},r=this.qtip.plugins.tip,u=this.qtip.elements.tip;n=parseInt(i.css("borderLeftWidth"),10)||0;n={left:-n,top:-n};r&&u&&(t="x"===r.corner.precedance?[ot,v]:[dt,y],n[t[1]]-=u[t[0]]());this.bgiframe.css(n).css(e)},redraw:function(){if(1>this.qtip.rendered||this.drawing)return self;var f,n,t,i,r=this.qtip.tooltip,u=this.qtip.options.style,e=this.qtip.options.position.container;return this.qtip.drawing=1,u.height&&r.css(dt,u.height),u.width?r.css(ot,u.width):(r.css(ot,"").appendTo(this.redrawContainer),n=r.width(),1>n%2&&(n+=1),t=r.css("maxWidth")||"",i=r.css("minWidth")||"",f=(t+i).indexOf("%")>-1?e.width()/100:0,t=(t.indexOf("%")>-1?f:1)*parseInt(t,10)||n,i=(i.indexOf("%")>-1?f:1)*parseInt(i,10)||0,n=t+i?Math.min(Math.max(n,i),t):n,r.css(ot,Math.round(n)).appendTo(e)),this.drawing=0,self},destroy:function(){this.bgiframe&&this.bgiframe.remove();this.qtip._unbind([n,this.qtip.tooltip],this._ns)}});fr=o.ie6=function(n){return 6===BROWSER.ie?new ki(n):f};fr.initialize="render";bt.ie6={"^content|style$":function(){this.redraw()}}})}(window,document);!function(n){"undefined"==typeof n.fn.each2&&n.extend(n.fn,{each2:function(t){for(var i=n([0]),r=-1,u=this.length;++r<u&&(i.context=i[0]=this[r])&&t.call(i[0],r,i)!==!1;);return this}})}(jQuery),function(n,t){"use strict";function h(n){var i,t,u,r;if(!n||n.length<1)return n;for(i="",t=0,u=n.length;u>t;t++)r=n.charAt(t),i+=kt[r]||r;return i}function f(n,t){for(var i=0,r=t.length;r>i;i+=1)if(u(n,t[i]))return i;return-1}function st(){var t=n(bt),i;return t.appendTo("body"),i={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight},t.remove(),i}function u(n,i){return n===i?!0:n===t||i===t?!1:null===n||null===i?!1:n.constructor===String?n+""==i+"":i.constructor===String?i+""==n+"":!1}function v(t,i){var r,u,f;if(null===t||t.length<1)return[];for(r=t.split(i),u=0,f=r.length;f>u;u+=1)r[u]=n.trim(r[u]);return r}function d(n){return n.outerWidth(!1)-n.width()}function g(i){var r="keyup-change-value";i.on("keydown",function(){n.data(i,r)===t&&n.data(i,r,i.val())});i.on("keyup",function(){var u=n.data(i,r);u!==t&&i.val()!==u&&(n.removeData(i,r),i.trigger("keyup-change"))})}function ht(i){i.on("mousemove",function(i){var r=k;(r===t||r.x!==i.pageX||r.y!==i.pageY)&&n(i.target).trigger("mousemove-filtered",i)})}function nt(n,i,r){r=r||t;var u;return function(){var t=arguments;window.clearTimeout(u);u=window.setTimeout(function(){i.apply(r,t)},n)}}function ct(n){var t,i=!1;return function(){return i===!1&&(t=n(),i=!0),t}}function lt(n,t){var i=nt(n,function(n){t.trigger("scroll-debounced",n)});t.on("scroll",function(n){f(n.target,t.get())>=0&&i(n)})}function at(n){n[0]!==document.activeElement&&window.setTimeout(function(){var i,t=n[0],r=n.val().length;n.focus();n.is(":visible")&&t===document.activeElement&&(t.setSelectionRange?t.setSelectionRange(r,r):t.createTextRange&&(i=t.createTextRange(),i.collapse(!1),i.select()))},0)}function vt(t){var i,r,u;return t=n(t)[0],i=0,r=0,"selectionStart"in t?(i=t.selectionStart,r=t.selectionEnd-i):"selection"in document&&(t.focus(),u=document.selection.createRange(),r=document.selection.createRange().text.length,u.moveStart("character",-t.value.length),i=u.text.length-r),{offset:i,length:r}}function r(n){n.preventDefault();n.stopPropagation()}function yt(n){n.preventDefault();n.stopImmediatePropagation()}function pt(t){if(!s){var i=t[0].currentStyle||window.getComputedStyle(t[0],null);s=n(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:i.fontSize,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,letterSpacing:i.letterSpacing,textTransform:i.textTransform,whiteSpace:"nowrap"});s.attr("class","select2-sizer");n("body").append(s)}return s.text(t.val()),s.width()}function c(t,i,r){var u,e,f=[];u=t.attr("class");u&&(u=""+u,n(u.split(" ")).each2(function(){0===this.indexOf("select2-")&&f.push(this)}));u=i.attr("class");u&&(u=""+u,n(u.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(e=r(this),e&&f.push(this))}));t.attr("class",f.join(" "))}function tt(n,t,i,r){var u=h(n.toUpperCase()).indexOf(h(t.toUpperCase())),f=t.length;return 0>u?(i.push(r(n)),void 0):(i.push(r(n.substring(0,u))),i.push("<span class='select2-match'>"),i.push(r(n.substring(u,u+f))),i.push("<\/span>"),i.push(r(n.substring(u+f,n.length))),void 0)}function it(n){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(n).replace(/[&<>"'\/\\]/g,function(n){return t[n]})}function rt(i){var f,u=null,e=i.quietMillis||100,o=i.url,r=this;return function(s){window.clearTimeout(f);f=window.setTimeout(function(){var e=i.data,f=o,c=i.transport||n.fn.select2.ajaxDefaults.transport,l={type:i.type||"GET",cache:i.cache||!1,jsonpCallback:i.jsonpCallback||t,dataType:i.dataType||"json"},h=n.extend({},n.fn.select2.ajaxDefaults.params,l);e=e?e.call(r,s.term,s.page,s.context):null;f="function"==typeof f?f.call(r,s.term,s.page,s.context):f;u&&u.abort();i.params&&(n.isFunction(i.params)?n.extend(h,i.params.call(r)):n.extend(h,i.params));n.extend(h,{url:f,dataType:i.dataType,data:e,success:function(n){var t=i.results(n,s.page);s.callback(t)}});u=c.call(r,h)},e)}}function ut(t){var e,u,i=t,r=function(n){return""+n.text},f;return n.isArray(i)&&(u=i,i={results:u}),n.isFunction(i)===!1&&(u=i,i=function(){return u}),f=i(),f.text&&(r=f.text,n.isFunction(r)||(e=f.text,r=function(n){return n[e]})),function(t){var u,f=t.term,e={results:[]};return""===f?(t.callback(i()),void 0):(u=function(i,e){var o,s;if(i=i[0],i.children){o={};for(s in i)i.hasOwnProperty(s)&&(o[s]=i[s]);o.children=[];n(i.children).each2(function(n,t){u(t,o.children)});(o.children.length||t.matcher(f,r(o),i))&&e.push(o)}else t.matcher(f,r(i),i)&&e.push(i)},n(i().results).each2(function(n,t){u(t,e.results)}),t.callback(e),void 0)}}function ft(i){var r=n.isFunction(i);return function(u){var f=u.term,e={results:[]};n(r?i():i).each(function(){var n=this.text!==t,i=n?this.text:this;(""===f||u.matcher(f,i))&&e.results.push(n?this:{id:this,text:this})});u.callback(e)}}function o(t,i){if(n.isFunction(t))return!0;if(!t)return!1;throw new Error(i+" must be a function or a falsy value");}function e(t){return n.isFunction(t)?t():t}function et(t){var i=0;return n.each(t,function(n,t){t.children?i+=et(t.children):i++}),i}function wt(n,i,r,f){var e,s,o,h,c,a=n,l=!1;if(!f.createSearchChoice||!f.tokenSeparators||f.tokenSeparators.length<1)return t;for(;;){for(s=-1,o=0,h=f.tokenSeparators.length;h>o&&(c=f.tokenSeparators[o],s=n.indexOf(c),!(s>=0));o++);if(0>s)break;if(e=n.substring(0,s),n=n.substring(s+c.length),e.length>0&&(e=f.createSearchChoice.call(this,e,i),e!==t&&null!==e&&f.id(e)!==t&&null!==f.id(e))){for(l=!1,o=0,h=i.length;h>o;o++)if(u(f.id(e),f.id(i[o]))){l=!0;break}l||r(e)}}if(a!==n)return n}function y(t,i){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=n.extend(r.prototype,i),r}if(window.Select2===t){var l,p,w,a,s,ot,b,k={x:0,y:0},i={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(n){switch(n=n.which?n.which:n){case i.LEFT:case i.RIGHT:case i.UP:case i.DOWN:return!0}return!1},isControl:function(n){var t=n.which;switch(t){case i.SHIFT:case i.CTRL:case i.ALT:return!0}return n.metaKey?!0:!1},isFunctionKey:function(n){return n=n.which?n.which:n,n>=112&&123>=n}},bt="<div class='select2-measure-scrollbar'><\/div>",kt={"Ⓐ":"A","Ａ":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","Ｂ":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","Ｃ":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","Ｄ":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","Ǳ":"DZ","Ǆ":"DZ","ǲ":"Dz","ǅ":"Dz","Ⓔ":"E","Ｅ":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","Ｆ":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","Ｇ":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","Ｈ":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","Ｉ":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","Ｊ":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","Ｋ":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","Ｌ":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","Ǉ":"LJ","ǈ":"Lj","Ⓜ":"M","Ｍ":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","Ｎ":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","Ǌ":"NJ","ǋ":"Nj","Ⓞ":"O","Ｏ":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","Ｐ":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Ｑ":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","Ｒ":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","Ｓ":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","Ｔ":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","Ｕ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","Ｖ":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","Ｗ":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","Ｘ":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Ｙ":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Ｚ":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","ａ":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","ｂ":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","ｃ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","ｄ":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","ǳ":"dz","ǆ":"dz","ⓔ":"e","ｅ":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","ｆ":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","ｇ":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","ｈ":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","ｉ":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","ｊ":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","ｋ":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","ｌ":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ǉ":"lj","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","ｎ":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ŉ":"n","ꞑ":"n","ꞥ":"n","ǌ":"nj","ⓞ":"o","ｏ":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","ｐ":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","ｑ":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","ｒ":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","ｓ":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","ｔ":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","ｕ":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","ｖ":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","ｗ":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","ｘ":"x","ẋ":"x","ẍ":"x","ⓨ":"y","ｙ":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","ｚ":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z"};ot=n(document);a=function(){var n=1;return function(){return n++}}();ot.on("mousemove",function(n){k.x=n.pageX;k.y=n.pageY});l=y(Object,{bind:function(n){var t=this;return function(){n.apply(t,arguments)}},init:function(i){var u,f,h=".select2-results",o,s;this.opts=i=this.prepareOpts(i);this.id=i.id;i.element.data("select2")!==t&&null!==i.element.data("select2")&&i.element.data("select2").destroy();this.container=this.createContainer();this.containerId="s2id_"+(i.element.attr("id")||"autogen"+a());this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1");this.container.attr("id",this.containerId);this.body=ct(function(){return i.element.closest("body")});c(this.container,this.opts.element,this.opts.adaptContainerCssClass);this.container.attr("style",i.element.attr("style"));this.container.css(e(i.containerCss));this.container.addClass(e(i.containerCssClass));this.elementTabIndex=this.opts.element.attr("tabindex");this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",r);this.container.data("select2",this);this.dropdown=this.container.find(".select2-drop");c(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass);this.dropdown.addClass(e(i.dropdownCssClass));this.dropdown.data("select2",this);this.dropdown.on("click",r);this.results=u=this.container.find(h);this.search=f=this.container.find("input.select2-input");this.queryCount=0;this.resultsPage=0;this.context=null;this.initContainer();this.container.on("click",r);ht(this.results);this.dropdown.on("mousemove-filtered touchstart touchmove touchend",h,this.bind(this.highlightUnderEvent));lt(80,this.results);this.dropdown.on("scroll-debounced",h,this.bind(this.loadMoreIfNeeded));n(this.container).on("change",".select2-input",function(n){n.stopPropagation()});n(this.dropdown).on("change",".select2-input",function(n){n.stopPropagation()});n.fn.mousewheel&&u.mousewheel(function(n,t,i,f){var e=u.scrollTop();f>0&&0>=e-f?(u.scrollTop(0),r(n)):0>f&&u.get(0).scrollHeight-u.scrollTop()+f<=u.height()&&(u.scrollTop(u.get(0).scrollHeight-u.height()),r(n))});g(f);f.on("keyup-change input paste",this.bind(this.updateResults));f.on("focus",function(){f.addClass("select2-focused")});f.on("blur",function(){f.removeClass("select2-focused")});this.dropdown.on("mouseup",h,this.bind(function(t){n(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))}));this.dropdown.on("click mouseup mousedown",function(n){n.stopPropagation()});n.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource());null!==i.maximumInputLength&&this.search.attr("maxlength",i.maximumInputLength);o=i.element.prop("disabled");o===t&&(o=!1);this.enable(!o);s=i.element.prop("readonly");s===t&&(s=!1);this.readonly(s);b=b||st();this.autofocus=i.element.prop("autofocus");i.element.prop("autofocus",!1);this.autofocus&&this.focus();this.nextSearchTerm=t},destroy:function(){var n=this.opts.element,i=n.data("select2");this.close();this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null);i!==t&&(i.container.remove(),i.dropdown.remove(),n.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?n.attr({tabindex:this.elementTabIndex}):n.removeAttr("tabindex"),n.show())},optionToData:function(n){return n.is("option")?{id:n.prop("value"),text:n.text(),element:n.get(),css:n.attr("class"),disabled:n.prop("disabled"),locked:u(n.attr("locked"),"locked")||u(n.data("locked"),!0)}:n.is("optgroup")?{text:n.attr("label"),children:[],element:n.get(),css:n.attr("class")}:void 0},prepareOpts:function(i){var e,o,s,r,f=this;if(e=i.element,"select"===e.get(0).tagName.toLowerCase()&&(this.select=o=i.element),o&&n.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in i)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.");}),i=n.extend({},{populateResults:function(r,u,e){var o,s=this.opts.id;o=function(r,u,h){var v,k,l,d,p,w,c,a,y,b;for(r=i.sortResults(r,u,e),v=0,k=r.length;k>v;v+=1)l=r[v],p=l.disabled===!0,d=!p&&s(l)!==t,w=l.children&&l.children.length>0,c=n("<li><\/li>"),c.addClass("select2-results-dept-"+h),c.addClass("select2-result"),c.addClass(d?"select2-result-selectable":"select2-result-unselectable"),p&&c.addClass("select2-disabled"),w&&c.addClass("select2-result-with-children"),c.addClass(f.opts.formatResultCssClass(l)),a=n(document.createElement("div")),a.addClass("select2-result-label"),b=i.formatResult(l,a,e,f.opts.escapeMarkup),b!==t&&a.html(b),c.append(a),w&&(y=n("<ul><\/ul>"),y.addClass("select2-result-sub"),o(l.children,y,h+1),c.append(y)),c.data("select2-data",l),u.append(c)};o(u,r,0)}},n.fn.select2.defaults,i),"function"!=typeof i.id&&(s=i.id,i.id=function(n){return n[s]}),n.isArray(i.element.data("select2Tags"))){if("tags"in i)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+i.element.attr("id");i.tags=i.element.data("select2Tags")}if(o?(i.query=this.bind(function(n){var i,r,u,o={results:[],more:!1},s=n.term;u=function(t,i){var r;t.is("option")?n.matcher(s,t.text(),t)&&i.push(f.optionToData(t)):t.is("optgroup")&&(r=f.optionToData(t),t.children().each2(function(n,t){u(t,r.children)}),r.children.length>0&&i.push(r))};i=e.children();this.getPlaceholder()!==t&&i.length>0&&(r=this.getPlaceholderOption(),r&&(i=i.not(r)));i.each2(function(n,t){u(t,o.results)});n.callback(o)}),i.id=function(n){return n.id},i.formatResultCssClass=function(n){return n.css}):"query"in i||("ajax"in i?(r=i.element.data("ajax-url"),r&&r.length>0&&(i.ajax.url=r),i.query=rt.call(i.element,i.ajax)):"data"in i?i.query=ut(i.data):"tags"in i&&(i.query=ft(i.tags),i.createSearchChoice===t&&(i.createSearchChoice=function(t){return{id:n.trim(t),text:n.trim(t)}}),i.initSelection===t&&(i.initSelection=function(t,r){var f=[];n(v(t.val(),i.separator)).each(function(){var r={id:this,text:this},t=i.tags;n.isFunction(t)&&(t=t());n(t).each(function(){if(u(this.id,r.id))return(r=this,!1)});f.push(r)});r(f)}))),"function"!=typeof i.query)throw"query function not defined for Select2 "+i.element.attr("id");return i},monitorSource:function(){var i,n=this.opts.element;n.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()}));i=this.bind(function(){var r=n.prop("disabled"),i;r===t&&(r=!1);this.enable(!r);i=n.prop("readonly");i===t&&(i=!1);this.readonly(i);c(this.container,this.opts.element,this.opts.adaptContainerCssClass);this.container.addClass(e(this.opts.containerCssClass));c(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass);this.dropdown.addClass(e(this.opts.dropdownCssClass))});n.on("propertychange.select2 DOMAttrModified.select2",i);this.mutationCallback===t&&(this.mutationCallback=function(n){n.forEach(i)});"undefined"!=typeof WebKitMutationObserver&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(this.mutationCallback),this.propertyObserver.observe(n.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(t){var i=n.Event("select2-selecting",{val:this.id(t),object:t});return this.opts.element.trigger(i),!i.isDefaultPrevented()},triggerChange:function(t){t=t||{};t=n.extend({},t,{type:"change",val:this.val()});this.opts.element.data("select2-change-triggered",!0);this.opts.element.trigger(t);this.opts.element.data("select2-change-triggered",!1);this.opts.element.click();this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var n=this._enabled&&!this._readonly,t=!n;return n===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",t),this.close(),this.enabledInterface=n,!0)},enable:function(n){n===t&&(n=!0);this._enabled!==n&&(this._enabled=n,this.opts.element.prop("disabled",!n),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(n){return n===t&&(n=!1),this._readonly===n?!1:(this._readonly=n,this.opts.element.prop("readonly",n),this.enableInterface(),!0)},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var h,r,a,c,t=this.dropdown,u=this.container.offset(),k=this.container.outerHeight(!1),f=this.container.outerWidth(!1),l=t.outerHeight(!1),v=n(window).scrollLeft()+n(window).width(),d=n(window).scrollTop()+n(window).height(),s=u.top+k,o=u.left,y=d>=s+l,p=u.top-l>=this.body().scrollTop(),i=t.outerWidth(!1),w=v>=o+i,g=t.hasClass("select2-drop-above");this.opts.dropdownAutoWidth?(c=n(".select2-results",t)[0],t.addClass("select2-drop-auto-width"),t.css("width",""),i=t.outerWidth(!1)+(c.scrollHeight===c.clientHeight?0:b.width),i>f?f=i:i=f,w=v>=o+i):this.container.removeClass("select2-drop-auto-width");"static"!==this.body().css("position")&&(h=this.body().offset(),s-=h.top,o-=h.left);g?(r=!0,!p&&y&&(r=!1)):(r=!1,!y&&p&&(r=!0));w||(o=u.left+f-i);r?(s=u.top-l,this.container.addClass("select2-drop-above"),t.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),t.removeClass("select2-drop-above"));a=n.extend({top:s,left:o,width:f},e(this.opts.dropdownCss));t.css(a)},shouldOpen:function(){var t;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(t=n.Event("select2-opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above");this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),!0):!1},opening:function(){var t,i=this.containerId,u="scroll."+i,f="resize."+i,e="orientationchange."+i,r;this.container.addClass("select2-dropdown-open").addClass("select2-container-active");this.clearDropdownAlignmentPreference();this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body());t=n("#select2-drop-mask");0==t.length&&(t=n(document.createElement("div")),t.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),t.hide(),t.appendTo(this.body()),t.on("mousedown touchstart click",function(t){var i,r=n("#select2-drop");r.length>0&&(i=r.data("select2"),i.opts.selectOnBlur&&i.selectHighlighted({noFocus:!0}),i.close({focus:!1}),t.preventDefault(),t.stopPropagation())}));this.dropdown.prev()[0]!==t[0]&&this.dropdown.before(t);n("#select2-drop").removeAttr("id");this.dropdown.attr("id","select2-drop");t.show();this.positionDropdown();this.dropdown.show();this.positionDropdown();this.dropdown.addClass("select2-drop-active");r=this;this.container.parents().add(window).each(function(){n(this).on(f+" "+u+" "+e,function(){r.positionDropdown()})})},close:function(){if(this.opened()){var t=this.containerId,i="scroll."+t,r="resize."+t,u="orientationchange."+t;this.container.parents().add(window).each(function(){n(this).off(i).off(r).off(u)});this.clearDropdownAlignmentPreference();n("#select2-drop-mask").hide();this.dropdown.removeAttr("id");this.dropdown.hide();this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active");this.results.empty();this.clearSearch();this.search.removeClass("select2-active");this.opts.element.trigger(n.Event("select2-close"))}},externalSearch:function(n){this.open();this.search.val(n);this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return e(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var e,i,r,u,o,s,f,t=this.results;if(i=this.highlight(),!(0>i)){if(0==i)return t.scrollTop(0),void 0;e=this.findHighlightableChoices().find(".select2-result-label");r=n(e[i]);u=r.offset().top+r.outerHeight(!0);i===e.length-1&&(f=t.find("li.select2-more-results"),f.length>0&&(u=f.offset().top+f.outerHeight(!0)));o=t.offset().top+t.outerHeight(!0);u>o&&t.scrollTop(t.scrollTop()+(u-o));s=r.offset().top-t.offset().top;0>s&&"none"!=r.css("display")&&t.scrollTop(t.scrollTop()+s)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled)")},moveHighlight:function(t){for(var r,u=this.findHighlightableChoices(),i=this.highlight();i>-1&&i<u.length;)if(i+=t,r=n(u[i]),r.hasClass("select2-result-selectable")&&!r.hasClass("select2-disabled")&&!r.hasClass("select2-selected")){this.highlight(i);break}},highlight:function(t){var u,r,i=this.findHighlightableChoices();return 0===arguments.length?f(i.filter(".select2-highlighted")[0],i.get()):(t>=i.length&&(t=i.length-1),0>t&&(t=0),this.removeHighlight(),u=n(i[t]),u.addClass("select2-highlighted"),this.ensureHighlightVisible(),r=u.data("select2-data"),r&&this.opts.element.trigger({type:"select2-highlight",val:this.id(r),choice:r}),void 0)},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var i=n(t.target).closest(".select2-result-selectable"),r;i.length>0&&!i.is(".select2-highlighted")?(r=this.findHighlightableChoices(),this.highlight(r.index(i))):0==i.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var u,t=this.results,i=t.find("li.select2-more-results"),r=this.resultsPage+1,n=this,f=this.search.val(),e=this.context;0!==i.length&&(u=i.offset().top-t.offset().top-t.height(),u<=this.opts.loadMorePadding&&(i.addClass("select2-active"),this.opts.query({element:this.opts.element,term:f,page:r,context:e,matcher:this.opts.matcher,callback:this.bind(function(u){n.opened()&&(n.opts.populateResults.call(this,t,u.results,{term:f,page:r,context:e}),n.postprocessResults(u,!1,!1),u.more===!0?(i.detach().appendTo(t).text(n.opts.formatLoadMore(r+1)),window.setTimeout(function(){n.loadMoreIfNeeded()},10)):i.remove(),n.positionDropdown(),n.resultsPage=r,n.context=u.context,this.opts.element.trigger({type:"select2-loaded",items:u}))})})))},tokenize:function(){},updateResults:function(i){function v(){f.removeClass("select2-active");e.positionDropdown()}function s(n){c.html(n);v()}var a,h,y,f=this.search,c=this.results,r=this.opts,e=this,p=f.val(),w=n.data(this.container,"select2-last-term"),l;if((i===!0||!w||!u(p,w))&&(n.data(this.container,"select2-last-term",p),i===!0||this.showSearchInput!==!1&&this.opened())){if(y=++this.queryCount,l=this.getMaximumSelectionSize(),l>=1&&(a=this.data(),n.isArray(a)&&a.length>=l&&o(r.formatSelectionTooBig,"formatSelectionTooBig")))return s("<li class='select2-selection-limit'>"+r.formatSelectionTooBig(l)+"<\/li>"),void 0;if(f.val().length<r.minimumInputLength)return o(r.formatInputTooShort,"formatInputTooShort")?s("<li class='select2-no-results'>"+r.formatInputTooShort(f.val(),r.minimumInputLength)+"<\/li>"):s(""),i&&this.showSearch&&this.showSearch(!0),void 0;if(r.maximumInputLength&&f.val().length>r.maximumInputLength)return o(r.formatInputTooLong,"formatInputTooLong")?s("<li class='select2-no-results'>"+r.formatInputTooLong(f.val(),r.maximumInputLength)+"<\/li>"):s(""),void 0;r.formatSearching&&0===this.findHighlightableChoices().length&&s("<li class='select2-searching'>"+r.formatSearching()+"<\/li>");f.addClass("select2-active");this.removeHighlight();h=this.tokenize();h!=t&&null!=h&&f.val(h);this.resultsPage=1;r.query({element:r.element,term:f.val(),page:this.resultsPage,context:null,matcher:r.matcher,callback:this.bind(function(h){var l;if(y==this.queryCount){if(!this.opened())return this.search.removeClass("select2-active"),void 0;if(this.context=h.context===t?null:h.context,this.opts.createSearchChoice&&""!==f.val()&&(l=this.opts.createSearchChoice.call(e,f.val(),h.results),l!==t&&null!==l&&e.id(l)!==t&&null!==e.id(l)&&0===n(h.results).filter(function(){return u(e.id(this),e.id(l))}).length&&h.results.unshift(l)),0===h.results.length&&o(r.formatNoMatches,"formatNoMatches"))return s("<li class='select2-no-results'>"+r.formatNoMatches(f.val())+"<\/li>"),void 0;c.empty();e.opts.populateResults.call(this,c,h.results,{term:f.val(),page:this.resultsPage,context:null});h.more===!0&&o(r.formatLoadMore,"formatLoadMore")&&(c.append("<li class='select2-more-results'>"+e.opts.escapeMarkup(r.formatLoadMore(this.resultsPage))+"<\/li>"),window.setTimeout(function(){e.loadMoreIfNeeded()},10));this.postprocessResults(h,i);v();this.opts.element.trigger({type:"select2-loaded",items:h})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0});this.close();this.container.removeClass("select2-container-active");this.search[0]===document.activeElement&&this.search.blur();this.clearSearch();this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){at(this.search)},selectHighlighted:function(n){var i=this.highlight(),r=this.results.find(".select2-highlighted"),t=r.closest(".select2-result").data("select2-data");t?(this.highlight(i),this.onSelect(t,n)):n&&n.noFocus&&this.close()},getPlaceholder:function(){var n;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((n=this.getPlaceholderOption())!==t?n.text():t)},getPlaceholderOption:function(){if(this.select){var n=this.select.children().first();if(this.opts.placeholderOption!==t)return"first"===this.opts.placeholderOption&&n||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===n.text()&&""===n.val())return n}},initContainerWidth:function(){function r(){var i,f,r,u,e;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(i=this.opts.element.attr("style"),i!==t)for(f=i.split(";"),u=0,e=f.length;e>u;u+=1)if(r=f[u].replace(/\s/g,"").match(/[^-]width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==r&&r.length>=1)return r[1];return"resolve"===this.opts.width?(i=this.opts.element.css("width"),i.indexOf("%")>0?i:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return n.isFunction(this.opts.width)?this.opts.width():this.opts.width}var i=r.call(this);null!==i&&this.container.css("width",i)}});p=y(l,{createContainer:function(){return n(document.createElement("div")).attr({"class":"select2-container"}).html("<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>   <span class='select2-chosen'>&nbsp;<\/span><abbr class='select2-search-choice-close'><\/abbr>   <span class='select2-arrow'><b><\/b><\/span><\/a><input class='select2-focusser select2-offscreen' type='text'/><div class='select2-drop select2-display-none'>   <div class='select2-search'>       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'/>   <\/div>   <ul class='select2-results'>   <\/ul><\/div>")},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var i,r,u;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0);this.parent.opening.apply(this,arguments);this.showSearchInput!==!1&&this.search.val(this.focusser.val());this.search.focus();i=this.search.get(0);i.createTextRange?(r=i.createTextRange(),r.collapse(!1),r.select()):i.setSelectionRange&&(u=this.search.val().length,i.setSelectionRange(u,u));""===this.search.val()&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select());this.focusser.prop("disabled",!0).val("");this.updateResults(!0);this.opts.element.trigger(n.Event("select2-open"))},close:function(n){this.opened()&&(this.parent.close.apply(this,arguments),n=n||{focus:!0},this.focusser.removeAttr("disabled"),n.focus&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments);this.focusser.removeAttr("disabled");this.focusser.focus()},destroy:function(){n("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id"));this.parent.destroy.apply(this,arguments)},initContainer:function(){var t,u=this.container,f=this.dropdown;this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0);this.selection=t=u.find(".select2-choice");this.focusser=u.find(".select2-focusser");this.focusser.attr("id","s2id_autogen"+a());n("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.focusser.attr("id"));this.focusser.attr("tabindex",this.elementTabIndex);this.search.on("keydown",this.bind(function(n){if(this.isInterfaceEnabled()){if(n.which===i.PAGE_UP||n.which===i.PAGE_DOWN)return r(n),void 0;switch(n.which){case i.UP:case i.DOWN:return this.moveHighlight(n.which===i.UP?-1:1),r(n),void 0;case i.ENTER:return this.selectHighlighted(),r(n),void 0;case i.TAB:return this.selectHighlighted({noFocus:!0}),void 0;case i.ESC:return this.cancel(n),r(n),void 0}}}));this.search.on("blur",this.bind(function(){document.activeElement===this.body().get(0)&&window.setTimeout(this.bind(function(){this.search.focus()}),0)}));this.focusser.on("keydown",this.bind(function(n){if(this.isInterfaceEnabled()&&n.which!==i.TAB&&!i.isControl(n)&&!i.isFunctionKey(n)&&n.which!==i.ESC)return this.opts.openOnEnter===!1&&n.which===i.ENTER?(r(n),void 0):n.which==i.DOWN||n.which==i.UP||n.which==i.ENTER&&this.opts.openOnEnter?n.altKey||n.ctrlKey||n.shiftKey||n.metaKey?void 0:(this.open(),r(n),void 0):n.which==i.DELETE||n.which==i.BACKSPACE?(this.opts.allowClear&&this.clear(),r(n),void 0):void 0}));g(this.focusser);this.focusser.on("keyup-change input",this.bind(function(n){if(this.opts.minimumResultsForSearch>=0){if(n.stopPropagation(),this.opened())return;this.open()}}));t.on("mousedown","abbr",this.bind(function(n){this.isInterfaceEnabled()&&(this.clear(),yt(n),this.close(),this.selection.focus())}));t.on("mousedown",this.bind(function(t){this.container.hasClass("select2-container-active")||this.opts.element.trigger(n.Event("select2-focus"));this.opened()?this.close():this.isInterfaceEnabled()&&this.open();r(t)}));f.on("mousedown",this.bind(function(){this.search.focus()}));t.on("focus",this.bind(function(n){r(n)}));this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(n.Event("select2-focus"));this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(n.Event("select2-blur")))}));this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(n.Event("select2-focus"));this.container.addClass("select2-container-active")}));this.initContainerWidth();this.opts.element.addClass("select2-offscreen");this.setPlaceholder()},clear:function(t){var i=this.selection.data("select2-data"),r,u;if(i){if(r=n.Event("select2-clearing"),this.opts.element.trigger(r),r.isDefaultPrevented())return;u=this.getPlaceholderOption();this.opts.element.val(u?u.val():"");this.selection.find(".select2-chosen").empty();this.selection.removeData("select2-data");this.setPlaceholder();t!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(i),choice:i}),this.triggerChange({removed:i}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(i){i!==t&&null!==i&&(n.updateSelection(i),n.close(),n.setPlaceholder())})}},isPlaceholderOptionSelected:function(){var n;return this.getPlaceholder()?(n=this.getPlaceholderOption())!==t&&n.is(":selected")||""===this.opts.element.val()||this.opts.element.val()===t||null===this.opts.element.val():!1},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===t.element.get(0).tagName.toLowerCase()?t.initSelection=function(n,t){var r=n.find(":selected");t(i.optionToData(r))}:"data"in t&&(t.initSelection=t.initSelection||function(i,r){var e=i.val(),f=null;t.query({matcher:function(n,i,r){var o=u(e,t.id(r));return o&&(f=r),o},callback:n.isFunction(r)?function(){r(f)}:n.noop})}),t},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===t?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var n=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&n!==t){if(this.select&&this.getPlaceholderOption()===t)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(n));this.selection.addClass("select2-default");this.container.removeClass("select2-allowclear")}},postprocessResults:function(n,t,i){var r=0,e=this,f;(this.findHighlightableChoices().each2(function(n,t){if(u(e.id(t.data("select2-data")),e.opts.element.val()))return(r=n,!1)}),i!==!1&&(t===!0&&r>=0?this.highlight(r):this.highlight(0)),t===!0)&&(f=this.opts.minimumResultsForSearch,f>=0&&this.showSearch(et(n.results)>=f))},showSearch:function(t){this.showSearchInput!==t&&(this.showSearchInput=t,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!t),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!t),n(this.dropdown,this.container).toggleClass("select2-with-searchbox",t))},onSelect:function(n,t){if(this.triggerSelect(n)){var i=this.opts.element.val(),r=this.data();this.opts.element.val(this.id(n));this.updateSelection(n);this.opts.element.trigger({type:"select2-selected",val:this.id(n),choice:n});this.nextSearchTerm=this.opts.nextSearchTerm(n,this.search.val());this.close();t&&t.noFocus||this.focusser.focus();u(i,this.id(n))||this.triggerChange({added:n,removed:r})}},updateSelection:function(n){var r,u,i=this.selection.find(".select2-chosen");this.selection.data("select2-data",n);i.empty();null!==n&&(r=this.opts.formatSelection(n,i,this.opts.escapeMarkup));r!==t&&i.append(r);u=this.opts.formatSelectionCssClass(n,i);u!==t&&i.addClass(u);this.selection.removeClass("select2-default");this.opts.allowClear&&this.getPlaceholder()!==t&&this.container.addClass("select2-allowclear")},val:function(){var i,r=!1,u=null,n=this,f=this.data();if(0===arguments.length)return this.opts.element.val();if(i=arguments[0],arguments.length>1&&(r=arguments[1]),this.select)this.select.val(i).find(":selected").each2(function(t,i){return u=n.optionToData(i),!1}),this.updateSelection(u),this.setPlaceholder(),r&&this.triggerChange({added:u,removed:f});else{if(!i&&0!==i)return this.clear(r),void 0;if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(i);this.opts.initSelection(this.opts.element,function(t){n.opts.element.val(t?n.id(t):"");n.updateSelection(t);n.setPlaceholder();r&&n.triggerChange({added:t,removed:f})})}},clearSearch:function(){this.search.val("");this.focusser.val("")},data:function(n){var i,r=!1;return 0===arguments.length?(i=this.selection.data("select2-data"),i==t&&(i=null),i):(arguments.length>1&&(r=arguments[1]),n?(i=this.data(),this.opts.element.val(n?this.id(n):""),this.updateSelection(n),r&&this.triggerChange({added:n,removed:i})):this.clear(r),void 0)}});w=y(l,{createContainer:function(){return n(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html("<ul class='select2-choices'>  <li class='select2-search-field'>    <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>  <\/li><\/ul><div class='select2-drop select2-drop-multi select2-display-none'>   <ul class='select2-results'>   <\/ul><\/div>")},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),i=this;return"select"===t.element.get(0).tagName.toLowerCase()?t.initSelection=function(n,t){var r=[];n.find(":selected").each2(function(n,t){r.push(i.optionToData(t))});t(r)}:"data"in t&&(t.initSelection=t.initSelection||function(i,r){var e=v(i.val(),t.separator),f=[];t.query({matcher:function(i,r,o){var s=n.grep(e,function(n){return u(n,t.id(o))}).length;return s&&f.push(o),s},callback:n.isFunction(r)?function(){for(var h,n,s,o=[],i=0;i<e.length;i++)for(h=e[i],n=0;n<f.length;n++)if(s=f[n],u(h,t.id(s))){o.push(s);f.splice(n,1);break}r(o)}:n.noop})}),t},selectChoice:function(n){var t=this.container.find(".select2-search-choice-focus");t.length&&n&&n[0]==t[0]||(t.length&&this.opts.element.trigger("choice-deselected",t),t.removeClass("select2-search-choice-focus"),n&&n.length&&(this.close(),n.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",n)))},destroy:function(){n("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id"));this.parent.destroy.apply(this,arguments)},initContainer:function(){var t,u=".select2-choices",f;this.searchContainer=this.container.find(".select2-search-field");this.selection=t=this.container.find(u);f=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(){f.search[0].focus();f.selectChoice(n(this))});this.search.attr("id","s2id_autogen"+a());n("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.search.attr("id"));this.search.on("input paste",this.bind(function(){this.isInterfaceEnabled()&&(this.opened()||this.open())}));this.search.attr("tabindex",this.elementTabIndex);this.keydowns=0;this.search.on("keydown",this.bind(function(n){var u;if(this.isInterfaceEnabled()){++this.keydowns;var f=t.find(".select2-search-choice-focus"),o=f.prev(".select2-search-choice:not(.select2-locked)"),e=f.next(".select2-search-choice:not(.select2-locked)"),s=vt(this.search);if(f.length&&(n.which==i.LEFT||n.which==i.RIGHT||n.which==i.BACKSPACE||n.which==i.DELETE||n.which==i.ENTER))return u=f,n.which==i.LEFT&&o.length?u=o:n.which==i.RIGHT?u=e.length?e:null:n.which===i.BACKSPACE?(this.unselect(f.first()),this.search.width(10),u=o.length?o:e):n.which==i.DELETE?(this.unselect(f.first()),this.search.width(10),u=e.length?e:null):n.which==i.ENTER&&(u=null),this.selectChoice(u),r(n),u&&u.length||this.open(),void 0;if((n.which===i.BACKSPACE&&1==this.keydowns||n.which==i.LEFT)&&0==s.offset&&!s.length)return this.selectChoice(t.find(".select2-search-choice:not(.select2-locked)").last()),r(n),void 0;if(this.selectChoice(null),this.opened())switch(n.which){case i.UP:case i.DOWN:return this.moveHighlight(n.which===i.UP?-1:1),r(n),void 0;case i.ENTER:return this.selectHighlighted(),r(n),void 0;case i.TAB:return this.selectHighlighted({noFocus:!0}),this.close(),void 0;case i.ESC:return this.cancel(n),r(n),void 0}if(n.which!==i.TAB&&!i.isControl(n)&&!i.isFunctionKey(n)&&n.which!==i.BACKSPACE&&n.which!==i.ESC){if(n.which===i.ENTER){if(this.opts.openOnEnter===!1)return;if(n.altKey||n.ctrlKey||n.shiftKey||n.metaKey)return}this.open();(n.which===i.PAGE_UP||n.which===i.PAGE_DOWN)&&r(n);n.which===i.ENTER&&r(n)}}}));this.search.on("keyup",this.bind(function(){this.keydowns=0;this.resizeSearch()}));this.search.on("blur",this.bind(function(t){this.container.removeClass("select2-container-active");this.search.removeClass("select2-focused");this.selectChoice(null);this.opened()||this.clearSearch();t.stopImmediatePropagation();this.opts.element.trigger(n.Event("select2-blur"))}));this.container.on("click",u,this.bind(function(t){this.isInterfaceEnabled()&&(n(t.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(n.Event("select2-focus")),this.open(),this.focusSearch(),t.preventDefault()))}));this.container.on("focus",u,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(n.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())}));this.initContainerWidth();this.opts.element.addClass("select2-offscreen");this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var n=this;this.opts.initSelection.call(null,this.opts.element,function(i){i!==t&&null!==i&&(n.updateSelection(i),n.close(),n.clearSearch())})}},clearSearch:function(){var n=this.getPlaceholder(),i=this.getMaxSearchWidth();n!==t&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(n).addClass("select2-default"),this.search.width(i>0?i:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder();this.resizeSearch();this.parent.opening.apply(this,arguments);this.focusSearch();this.updateResults(!0);this.search.focus();this.opts.element.trigger(n.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close();this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var r=[],u=[],i=this;n(t).each(function(){f(i.id(this),r)<0&&(r.push(i.id(this)),u.push(this))});t=u;this.selection.find(".select2-search-choice").remove();n(t).each(function(){i.addSelectedChoice(this)});i.postprocessResults()},tokenize:function(){var n=this.search.val();n=this.opts.tokenizer.call(this,n,this.data(),this.bind(this.onSelect),this.opts);null!=n&&n!=t&&(this.search.val(n),n.length>0&&this.open())},onSelect:function(n,t){this.triggerSelect(n)&&(this.addSelectedChoice(n),this.opts.element.trigger({type:"selected",val:this.id(n),choice:n}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(n,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:n}),t&&t.noFocus||this.focusSearch())},cancel:function(){this.close();this.focusSearch()},addSelectedChoice:function(i){var f,e,o=!i.locked,h=n("<li class='select2-search-choice'>    <div><\/div>    <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'><\/a><\/li>"),c=n("<li class='select2-search-choice select2-locked'><div><\/div><\/li>"),u=o?h:c,l=this.id(i),s=this.getVal();f=this.opts.formatSelection(i,u.find("div"),this.opts.escapeMarkup);f!=t&&u.find("div").replaceWith("<div>"+f+"<\/div>");e=this.opts.formatSelectionCssClass(i,u.find("div"));e!=t&&u.addClass(e);o&&u.find(".select2-search-choice-close").on("mousedown",r).on("click dblclick",this.bind(function(t){this.isInterfaceEnabled()&&(n(t.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(n(t.target));this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");this.close();this.focusSearch()})).dequeue(),r(t))})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))}));u.data("select2-data",i);u.insertBefore(this.searchContainer);s.push(l);this.setVal(s)},unselect:function(n){var t,r,i=this.getVal();if(n=n.closest(".select2-search-choice"),0===n.length)throw"Invalid argument: "+n+". Must be .select2-search-choice";if(t=n.data("select2-data")){for(;(r=f(this.id(t),i))>=0;)i.splice(r,1),this.setVal(i),this.select&&this.postprocessResults();n.remove();this.opts.element.trigger({type:"removed",val:this.id(t),choice:t});this.triggerChange({removed:t})}},postprocessResults:function(n,t,i){var e=this.getVal(),u=this.results.find(".select2-result"),s=this.results.find(".select2-result-with-children"),r=this;u.each2(function(n,t){var i=r.id(t.data("select2-data"));f(i,e)>=0&&(t.addClass("select2-selected"),t.find(".select2-result-selectable").addClass("select2-selected"))});s.each2(function(n,t){t.is(".select2-result-selectable")||0!==t.find(".select2-result-selectable:not(.select2-selected)").length||t.addClass("select2-selected")});-1==this.highlight()&&i!==!1&&r.highlight(0);!this.opts.createSearchChoice&&!u.filter(".select2-result:not(.select2-selected)").length>0&&(!n||n&&!n.more&&0===this.results.find(".select2-no-results").length)&&o(r.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+r.opts.formatNoMatches(r.search.val())+"<\/li>")},getMaxSearchWidth:function(){return this.selection.width()-d(this.search)},resizeSearch:function(){var i,u,t,f,n,r=d(this.search);i=pt(this.search)+10;u=this.search.offset().left;t=this.selection.width();f=this.selection.offset().left;n=t-(u-f)-r;i>n&&(n=t-r);40>n&&(n=t-r);0>=n&&(n=i);this.search.width(Math.floor(n))},getVal:function(){var n;return this.select?(n=this.select.val(),null===n?[]:n):(n=this.opts.element.val(),v(n,this.opts.separator))},setVal:function(t){var i;this.select?this.select.val(t):(i=[],n(t).each(function(){f(this,i)<0&&i.push(this)}),this.opts.element.val(0===i.length?"":i.join(this.opts.separator)))},buildChangeDetails:function(n,t){for(var i,t=t.slice(0),n=n.slice(0),r=0;r<t.length;r++)for(i=0;i<n.length;i++)u(this.opts.id(t[r]),this.opts.id(n[i]))&&(t.splice(r,1),r--,n.splice(i,1),i--);return{added:t,removed:n}},val:function(i,r){var u,f=this;if(0===arguments.length)return this.getVal();if(u=this.data(),u.length||(u=[]),!i&&0!==i)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange({added:this.data(),removed:u}),void 0;if(this.setVal(i),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange(this.buildChangeDetails(u,this.data()));else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var i=n.map(t,f.id);f.setVal(i);f.updateSelection(t);f.clearSearch();r&&f.triggerChange(f.buildChangeDetails(u,this.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0);this.searchContainer.hide()},onSortEnd:function(){var t=[],i=this;this.searchContainer.show();this.searchContainer.appendTo(this.searchContainer.parent());this.resizeSearch();this.selection.find(".select2-search-choice").each(function(){t.push(i.opts.id(n(this).data("select2-data")))});this.setVal(t);this.triggerChange()},data:function(t,i){var r,u,f=this;return 0===arguments.length?this.selection.find(".select2-search-choice").map(function(){return n(this).data("select2-data")}).get():(u=this.data(),t||(t=[]),r=n.map(t,function(n){return f.opts.id(n)}),this.setVal(r),this.updateSelection(t),this.clearSearch(),i&&this.triggerChange(this.buildChangeDetails(u,this.data())),void 0)}});n.fn.select2=function(){var r,u,e,o,s,i=Array.prototype.slice.call(arguments,0),c=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],l=["opened","isFocused","container","dropdown"],a=["val","data"],h={search:"externalSearch"};return this.each(function(){if(0===i.length||"object"==typeof i[0])r=0===i.length?{}:n.extend({},i[0]),r.element=n(this),"select"===r.element.get(0).tagName.toLowerCase()?s=r.element.prop("multiple"):(s=r.multiple||!1,"tags"in r&&(r.multiple=s=!0)),u=s?new w:new p,u.init(r);else{if("string"!=typeof i[0])throw"Invalid arguments to select2 plugin: "+i;if(f(i[0],c)<0)throw"Unknown method: "+i[0];if(o=t,u=n(this).data("select2"),u===t)return;if(e=i[0],"container"===e?o=u.container:"dropdown"===e?o=u.dropdown:(h[e]&&(e=h[e]),o=u[e].apply(u,i.slice(1))),f(i[0],l)>=0||f(i[0],a)&&1==i.length)return!1}}),o===t?this:o};n.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(n,t,i,r){var u=[];return tt(n.text,i.term,u,r),u.join("")},formatSelection:function(n,i,r){return n?r(n.text):t},sortResults:function(n){return n},formatResultCssClass:function(){return t},formatSelectionCssClass:function(){return t},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(n,t){var i=t-n.length;return"Please enter "+i+" more character"+(1==i?"":"s")},formatInputTooLong:function(n,t){var i=n.length-t;return"Please delete "+i+" character"+(1==i?"":"s")},formatSelectionTooBig:function(n){return"You can only select "+n+" item"+(1==n?"":"s")},formatLoadMore:function(){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(n){return n.id},matcher:function(n,t){return h(""+t).toUpperCase().indexOf(h(""+n).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:wt,escapeMarkup:it,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(n){return n},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return t}};n.fn.select2.ajaxDefaults={transport:n.ajax,params:{type:"GET",cache:!1,dataType:"json"}};window.Select2={query:{ajax:rt,local:ut,tags:ft},util:{debounce:nt,markMatch:tt,escapeMarkup:it,stripDiacritics:h},"class":{abstract:l,single:p,multi:w}}}}(jQuery);!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.moment=t()}(this,function(){"use strict";function t(){return ae.apply(null,arguments)}function vo(n){ae=n}function pt(n){return n instanceof Array||"[object Array]"===Object.prototype.toString.call(n)}function ai(n){return n instanceof Date||"[object Date]"===Object.prototype.toString.call(n)}function bu(n,t){for(var r=[],i=0;i<n.length;++i)r.push(t(n[i],i));return r}function w(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function wt(n,t){for(var i in t)w(t,i)&&(n[i]=t[i]);return w(t,"toString")&&(n.toString=t.toString),w(t,"valueOf")&&(n.valueOf=t.valueOf),n}function it(n,t,i,r){return pf(n,t,i,r,!0).utc()}function yo(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function f(n){return null==n._pf&&(n._pf=yo()),n._pf}function sr(n){if(null==n._isValid){var t=f(n),i=ve.call(t.parsedDateParts,function(n){return null!=n});n._isValid=!isNaN(n._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);n._strict&&(n._isValid=n._isValid&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)}return n._isValid}function vi(n){var t=it(NaN);return null!=n?wt(f(t),n):f(t).userInvalidated=!0,t}function p(n){return void 0===n}function hr(n,t){var u,i,r;if(p(t._isAMomentObject)||(n._isAMomentObject=t._isAMomentObject),p(t._i)||(n._i=t._i),p(t._f)||(n._f=t._f),p(t._l)||(n._l=t._l),p(t._strict)||(n._strict=t._strict),p(t._tzm)||(n._tzm=t._tzm),p(t._isUTC)||(n._isUTC=t._isUTC),p(t._offset)||(n._offset=t._offset),p(t._pf)||(n._pf=f(t)),p(t._locale)||(n._locale=t._locale),fu.length>0)for(u in fu)i=fu[u],r=t[i],p(r)||(n[i]=r);return n}function ei(n){hr(this,n);this._d=new Date(null!=n._d?n._d.getTime():NaN);eu===!1&&(eu=!0,t.updateOffset(this),eu=!1)}function st(n){return n instanceof ei||null!=n&&null!=n._isAMomentObject}function b(n){return 0>n?Math.ceil(n):Math.floor(n)}function e(n){var t=+n,i=0;return 0!==t&&isFinite(t)&&(i=b(t)),i}function ku(n,t,i){for(var f=Math.min(n.length,t.length),o=Math.abs(n.length-t.length),u=0,r=0;f>r;r++)(i&&n[r]!==t[r]||!i&&e(n[r])!==e(t[r]))&&u++;return u+o}function du(n){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+n)}function d(n,i){var r=!0;return wt(function(){return null!=t.deprecationHandler&&t.deprecationHandler(null,n),r&&(du(n+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),r=!1),i.apply(this,arguments)},i)}function cr(n,i){null!=t.deprecationHandler&&t.deprecationHandler(n,i);ye[n]||(du(i),ye[n]=!0)}function ht(n){return n instanceof Function||"[object Function]"===Object.prototype.toString.call(n)}function gu(n){return"[object Object]"===Object.prototype.toString.call(n)}function po(n){var t,i;for(i in n)t=n[i],ht(t)?this[i]=t:this["_"+i]=t;this._config=n;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function lr(n,t){var i,r=wt({},n);for(i in t)w(t,i)&&(gu(n[i])&&gu(t[i])?(r[i]={},wt(r[i],n[i]),wt(r[i],t[i])):null!=t[i]?r[i]=t[i]:delete r[i]);return r}function ar(n){null!=n&&this.set(n)}function nf(n){return n?n.toLowerCase().replace("_","-"):n}function wo(n){for(var i,t,f,r,u=0;u<n.length;){for(r=nf(n[u]).split("-"),i=r.length,t=nf(n[u+1]),t=t?t.split("-"):null;i>0;){if(f=tf(r.slice(0,i).join("-")))return f;if(t&&t.length>=i&&ku(r,t,!0)>=i-1)break;i--}u++}return null}function tf(n){var t=null;if(!l[n]&&"undefined"!=typeof module&&module&&module.exports)try{t=nr._abbr;require("./locale/"+n);ti(t)}catch(i){}return l[n]}function ti(n,t){var i;return n&&(i=p(t)?ct(n):rf(n,t),i&&(nr=i)),nr._abbr}function rf(n,t){return null!==t?(t.abbr=n,null!=l[n]?(cr("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),t=lr(l[n]._config,t)):null!=t.parentLocale&&(null!=l[t.parentLocale]?t=lr(l[t.parentLocale]._config,t):cr("parentLocaleUndefined","specified parentLocale is not defined yet")),l[n]=new ar(t),ti(n),l[n]):(delete l[n],null)}function bo(n,t){if(null!=t){var i;null!=l[n]&&(t=lr(l[n]._config,t));i=new ar(t);i.parentLocale=l[n];l[n]=i;ti(n)}else null!=l[n]&&(null!=l[n].parentLocale?l[n]=l[n].parentLocale:null!=l[n]&&delete l[n]);return l[n]}function ct(n){var t;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return nr;if(!pt(n)){if(t=tf(n))return t;n=[n]}return wo(n)}function ko(){return pe(l)}function y(n,t){var i=n.toLowerCase();ci[i]=ci[i+"s"]=ci[t]=n}function g(n){if("string"==typeof n)return ci[n]||ci[n.toLowerCase()]}function uf(n){var i,t,r={};for(t in n)w(n,t)&&(i=g(t),i&&(r[i]=n[t]));return r}function ii(n,i){return function(r){return null!=r?(ff(this,n,r),t.updateOffset(this,i),this):yi(this,n)}}function yi(n,t){return n.isValid()?n._d["get"+(n._isUTC?"UTC":"")+t]():NaN}function ff(n,t,i){n.isValid()&&n._d["set"+(n._isUTC?"UTC":"")+t](i)}function ef(n,t){var i;if("object"==typeof n)for(i in n)this.set(i,n[i]);else if(n=g(n),ht(this[n]))return this[n](t);return this}function ut(n,t,i){var r=""+Math.abs(n),u=t-r.length,f=n>=0;return(f?i?"+":"":"-")+Math.pow(10,Math.max(0,u)).toString().substr(1)+r}function r(n,t,i,r){var u=r;"string"==typeof r&&(u=function(){return this[r]()});n&&(ui[n]=u);t&&(ui[t[0]]=function(){return ut(u.apply(this,arguments),t[1],t[2])});i&&(ui[i]=function(){return this.localeData().ordinal(u.apply(this,arguments),n)})}function go(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function ns(n){for(var t=n.match(we),i=0,r=t.length;r>i;i++)t[i]=ui[t[i]]?ui[t[i]]:go(t[i]);return function(i){for(var f="",u=0;r>u;u++)f+=t[u]instanceof Function?t[u].call(i,n):t[u];return f}}function vr(n,t){return n.isValid()?(t=of(t,n.localeData()),ou[t]=ou[t]||ns(t),ou[t](n)):n.localeData().invalidDate()}function of(n,t){function r(n){return t.longDateFormat(n)||n}var i=5;for(tr.lastIndex=0;i>=0&&tr.test(n);)n=n.replace(tr,r),tr.lastIndex=0,i-=1;return n}function i(n,t,i){cu[n]=ht(t)?t:function(n){return n&&i?i:t}}function ts(n,t){return w(cu,n)?cu[n](t._strict,t._locale):new RegExp(is(n))}function is(n){return bt(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,t,i,r,u){return t||i||r||u}))}function bt(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function s(n,t){var i,r=t;for("string"==typeof n&&(n=[n]),"number"==typeof t&&(r=function(n,i){i[t]=e(n)}),i=0;i<n.length;i++)lu[n[i]]=r}function oi(n,t){s(n,function(n,i,r,u){r._w=r._w||{};t(n,r._w,r,u)})}function rs(n,t,i){null!=t&&w(lu,n)&&lu[n](t,i._a,i,n)}function yr(n,t){return new Date(Date.UTC(n,t+1,0)).getUTCDate()}function us(n,t){return pt(this._months)?this._months[n.month()]:this._months[no.test(t)?"format":"standalone"][n.month()]}function fs(n,t){return pt(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[no.test(t)?"format":"standalone"][n.month()]}function es(n,t,i){var u,r,e,f=n.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],u=0;12>u;++u)e=it([2e3,u]),this._shortMonthsParse[u]=this.monthsShort(e,"").toLocaleLowerCase(),this._longMonthsParse[u]=this.months(e,"").toLocaleLowerCase();return i?"MMM"===t?(r=a.call(this._shortMonthsParse,f),-1!==r?r:null):(r=a.call(this._longMonthsParse,f),-1!==r?r:null):"MMM"===t?(r=a.call(this._shortMonthsParse,f),-1!==r?r:(r=a.call(this._longMonthsParse,f),-1!==r?r:null)):(r=a.call(this._longMonthsParse,f),-1!==r?r:(r=a.call(this._shortMonthsParse,f),-1!==r?r:null))}function os(n,t,i){var r,u,f;if(this._monthsParseExact)return es.call(this,n,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++)if((u=it([2e3,r]),i&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(u,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(u,"").replace(".","")+"$","i")),i||this._monthsParse[r]||(f="^"+this.months(u,"")+"|^"+this.monthsShort(u,""),this._monthsParse[r]=new RegExp(f.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[r].test(n))||i&&"MMM"===t&&this._shortMonthsParse[r].test(n)||!i&&this._monthsParse[r].test(n))return r}function sf(n,t){var i;if(!n.isValid())return n;if("string"==typeof t)if(/^\d+$/.test(t))t=e(t);else if(t=n.localeData().monthsParse(t),"number"!=typeof t)return n;return i=Math.min(n.date(),yr(n.year(),t)),n._d["set"+(n._isUTC?"UTC":"")+"Month"](t,i),n}function hf(n){return null!=n?(sf(this,n),t.updateOffset(this,!0),this):yi(this,"Month")}function ss(){return yr(this.year(),this.month())}function hs(n){return this._monthsParseExact?(w(this,"_monthsRegex")||cf.call(this),n?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex}function cs(n){return this._monthsParseExact?(w(this,"_monthsRegex")||cf.call(this),n?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex}function cf(){function f(n,t){return t.length-n.length}for(var i,r=[],u=[],t=[],n=0;12>n;n++)i=it([2e3,n]),r.push(this.monthsShort(i,"")),u.push(this.months(i,"")),t.push(this.months(i,"")),t.push(this.monthsShort(i,""));for(r.sort(f),u.sort(f),t.sort(f),n=0;12>n;n++)r[n]=bt(r[n]),u[n]=bt(u[n]),t[n]=bt(t[n]);this._monthsRegex=new RegExp("^("+t.join("|")+")","i");this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp("^("+u.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function pr(n){var i,t=n._a;return t&&-2===f(n).overflow&&(i=t[ft]<0||t[ft]>11?ft:t[rt]<1||t[rt]>yr(t[nt],t[ft])?rt:t[v]<0||t[v]>24||24===t[v]&&(0!==t[tt]||0!==t[et]||0!==t[ni])?v:t[tt]<0||t[tt]>59?tt:t[et]<0||t[et]>59?et:t[ni]<0||t[ni]>999?ni:-1,f(n)._overflowDayOfYear&&(nt>i||i>rt)&&(i=rt),f(n)._overflowWeeks&&-1===i&&(i=yv),f(n)._overflowWeekday&&-1===i&&(i=pv),f(n).overflow=i),n}function lf(n){var t,r,o,e,u,s,h=n._i,i=gv.exec(h)||ny.exec(h);if(i){for(f(n).iso=!0,t=0,r=or.length;r>t;t++)if(or[t][1].exec(i[1])){e=or[t][0];o=or[t][2]!==!1;break}if(null==e)return void(n._isValid=!1);if(i[3]){for(t=0,r=au.length;r>t;t++)if(au[t][1].exec(i[3])){u=(i[2]||" ")+au[t][0];break}if(null==u)return void(n._isValid=!1)}if(!o&&null!=u)return void(n._isValid=!1);if(i[4]){if(!ty.exec(i[4]))return void(n._isValid=!1);s="Z"}n._f=e+(u||"")+(s||"");br(n)}else n._isValid=!1}function ls(n){var i=iy.exec(n._i);return null!==i?void(n._d=new Date(+i[1])):(lf(n),void(n._isValid===!1&&(delete n._isValid,t.createFromInputFallback(n))))}function as(n,t,i,r,u,f,e){var o=new Date(n,t,i,r,u,f,e);return 100>n&&n>=0&&isFinite(o.getFullYear())&&o.setFullYear(n),o}function pi(n){var t=new Date(Date.UTC.apply(null,arguments));return 100>n&&n>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(n),t}function si(n){return af(n)?366:365}function af(n){return n%4==0&&n%100!=0||n%400==0}function vs(){return af(this.year())}function wi(n,t,i){var r=7+t-i,u=(7+pi(n,0,r).getUTCDay()-t)%7;return-u+r-1}function vf(n,t,i,r,u){var f,o,s=(7+i-r)%7,h=wi(n,r,u),e=1+7*(t-1)+s+h;return 0>=e?(f=n-1,o=si(f)+e):e>si(n)?(f=n+1,o=e-si(n)):(f=n,o=e),{year:f,dayOfYear:o}}function hi(n,t,i){var f,r,e=wi(n.year(),t,i),u=Math.floor((n.dayOfYear()-e-1)/7)+1;return 1>u?(r=n.year()-1,f=u+kt(r,t,i)):u>kt(n.year(),t,i)?(f=u-kt(n.year(),t,i),r=n.year()+1):(r=n.year(),f=u),{week:f,year:r}}function kt(n,t,i){var r=wi(n,t,i),u=wi(n+1,t,i);return(si(n)-r+u)/7}function ri(n,t,i){return null!=n?n:null!=t?t:i}function ys(n){var i=new Date(t.now());return n._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function wr(n){var t,i,r,u,e=[];if(!n._d){for(r=ys(n),n._w&&null==n._a[rt]&&null==n._a[ft]&&ps(n),n._dayOfYear&&(u=ri(n._a[nt],r[nt]),n._dayOfYear>si(u)&&(f(n)._overflowDayOfYear=!0),i=pi(u,0,n._dayOfYear),n._a[ft]=i.getUTCMonth(),n._a[rt]=i.getUTCDate()),t=0;3>t&&null==n._a[t];++t)n._a[t]=e[t]=r[t];for(;7>t;t++)n._a[t]=e[t]=null==n._a[t]?2===t?1:0:n._a[t];24===n._a[v]&&0===n._a[tt]&&0===n._a[et]&&0===n._a[ni]&&(n._nextDay=!0,n._a[v]=0);n._d=(n._useUTC?pi:as).apply(null,e);null!=n._tzm&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);n._nextDay&&(n._a[v]=24)}}function ps(n){var t,o,u,i,r,e,c,s;t=n._w;null!=t.GG||null!=t.W||null!=t.E?(r=1,e=4,o=ri(t.GG,n._a[nt],hi(h(),1,4).year),u=ri(t.W,1),i=ri(t.E,1),(1>i||i>7)&&(s=!0)):(r=n._locale._week.dow,e=n._locale._week.doy,o=ri(t.gg,n._a[nt],hi(h(),r,e).year),u=ri(t.w,1),null!=t.d?(i=t.d,(0>i||i>6)&&(s=!0)):null!=t.e?(i=t.e+r,(t.e<0||t.e>6)&&(s=!0)):i=r);1>u||u>kt(o,r,e)?f(n)._overflowWeeks=!0:null!=s?f(n)._overflowWeekday=!0:(c=vf(o,u,i,r,e),n._a[nt]=c.year,n._dayOfYear=c.dayOfYear)}function br(n){if(n._f===t.ISO_8601)return void lf(n);n._a=[];f(n).empty=!0;for(var i,u,s,r=""+n._i,c=r.length,h=0,o=of(n._f,n._locale).match(we)||[],e=0;e<o.length;e++)u=o[e],i=(r.match(ts(u,n))||[])[0],i&&(s=r.substr(0,r.indexOf(i)),s.length>0&&f(n).unusedInput.push(s),r=r.slice(r.indexOf(i)+i.length),h+=i.length),ui[u]?(i?f(n).empty=!1:f(n).unusedTokens.push(u),rs(u,i,n)):n._strict&&!i&&f(n).unusedTokens.push(u);f(n).charsLeftOver=c-h;r.length>0&&f(n).unusedInput.push(r);f(n).bigHour===!0&&n._a[v]<=12&&n._a[v]>0&&(f(n).bigHour=void 0);f(n).parsedDateParts=n._a.slice(0);f(n).meridiem=n._meridiem;n._a[v]=ws(n._locale,n._a[v],n._meridiem);wr(n);pr(n)}function ws(n,t,i){var r;return null==i?t:null!=n.meridiemHour?n.meridiemHour(t,i):null!=n.isPM?(r=n.isPM(i),r&&12>t&&(t+=12),r||12!==t||(t=0),t):t}function bs(n){var t,e,u,r,i;if(0===n._f.length)return f(n).invalidFormat=!0,void(n._d=new Date(NaN));for(r=0;r<n._f.length;r++)i=0,t=hr({},n),null!=n._useUTC&&(t._useUTC=n._useUTC),t._f=n._f[r],br(t),sr(t)&&(i+=f(t).charsLeftOver,i+=10*f(t).unusedTokens.length,f(t).score=i,(null==u||u>i)&&(u=i,e=t));wt(n,e||t)}function ks(n){if(!n._d){var t=uf(n._i);n._a=bu([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)});wr(n)}}function ds(n){var t=new ei(pr(yf(n)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function yf(n){var t=n._i,i=n._f;return n._locale=n._locale||ct(n._l),null===t||void 0===i&&""===t?vi({nullInput:!0}):("string"==typeof t&&(n._i=t=n._locale.preparse(t)),st(t)?new ei(pr(t)):(pt(i)?bs(n):i?br(n):ai(t)?n._d=t:gs(n),sr(n)||(n._d=null),n))}function gs(n){var i=n._i;void 0===i?n._d=new Date(t.now()):ai(i)?n._d=new Date(i.valueOf()):"string"==typeof i?ls(n):pt(i)?(n._a=bu(i.slice(0),function(n){return parseInt(n,10)}),wr(n)):"object"==typeof i?ks(n):"number"==typeof i?n._d=new Date(i):t.createFromInputFallback(n)}function pf(n,t,i,r,u){var f={};return"boolean"==typeof i&&(r=i,i=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=u,f._l=i,f._i=n,f._f=t,f._strict=r,ds(f)}function h(n,t,i,r){return pf(n,t,i,r,!1)}function wf(n,t){var r,i;if(1===t.length&&pt(t[0])&&(t=t[0]),!t.length)return h();for(r=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][n](r))&&(r=t[i]);return r}function nh(){var n=[].slice.call(arguments,0);return wf("isBefore",n)}function th(){var n=[].slice.call(arguments,0);return wf("isAfter",n)}function bi(n){var t=uf(n),i=t.year||0,r=t.quarter||0,u=t.month||0,f=t.week||0,e=t.day||0,o=t.hour||0,s=t.minute||0,h=t.second||0,c=t.millisecond||0;this._milliseconds=+c+1e3*h+6e4*s+36e5*o;this._days=+e+7*f;this._months=+u+3*r+12*i;this._data={};this._locale=ct();this._bubble()}function kr(n){return n instanceof bi}function bf(n,t){r(n,0,0,function(){var n=this.utcOffset(),i="+";return 0>n&&(n=-n,i="-"),i+ut(~~(n/60),2)+t+ut(~~n%60,2)})}function dr(n,t){var r=(t||"").match(n)||[],f=r[r.length-1]||[],i=(f+"").match(to)||["-",0,0],u=+(60*i[1])+e(i[2]);return"+"===i[0]?u:-u}function gr(n,i){var r,u;return i._isUTC?(r=i.clone(),u=(st(n)||ai(n)?n.valueOf():h(n).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+u),t.updateOffset(r,!1),r):h(n).local()}function nu(n){return 15*-Math.round(n._d.getTimezoneOffset()/15)}function ih(n,i){var r,u=this._offset||0;return this.isValid()?null!=n?("string"==typeof n?n=dr(er,n):Math.abs(n)<16&&(n=60*n),!this._isUTC&&i&&(r=nu(this)),this._offset=n,this._isUTC=!0,null!=r&&this.add(r,"m"),u!==n&&(!i||this._changeInProgress?te(this,lt(n-u,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?u:nu(this):null!=n?this:NaN}function rh(n,t){return null!=n?("string"!=typeof n&&(n=-n),this.utcOffset(n,t),this):-this.utcOffset()}function uh(n){return this.utcOffset(0,n)}function fh(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(nu(this),"m")),this}function eh(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(dr(vv,this._i)),this}function oh(n){return this.isValid()?(n=n?h(n).utcOffset():0,(this.utcOffset()-n)%60==0):!1}function sh(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function hh(){var n,t;return p(this._isDSTShifted)?(n={},(hr(n,this),n=yf(n),n._a)?(t=n._isUTC?it(n._a):h(n._a),this._isDSTShifted=this.isValid()&&ku(n._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted):this._isDSTShifted}function ch(){return this.isValid()?!this._isUTC:!1}function lh(){return this.isValid()?this._isUTC:!1}function kf(){return this.isValid()?this._isUTC&&0===this._offset:!1}function lt(n,t){var u,f,o,i=n,r=null;return kr(n)?i={ms:n._milliseconds,d:n._days,M:n._months}:"number"==typeof n?(i={},t?i[t]=n:i.milliseconds=n):(r=io.exec(n))?(u="-"===r[1]?-1:1,i={y:0,d:e(r[rt])*u,h:e(r[v])*u,m:e(r[tt])*u,s:e(r[et])*u,ms:e(r[ni])*u}):(r=ro.exec(n))?(u="-"===r[1]?-1:1,i={y:dt(r[2],u),M:dt(r[3],u),w:dt(r[4],u),d:dt(r[5],u),h:dt(r[6],u),m:dt(r[7],u),s:dt(r[8],u)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=ah(h(i.from),h(i.to)),i={},i.ms=o.milliseconds,i.M=o.months),f=new bi(i),kr(n)&&w(n,"_locale")&&(f._locale=n._locale),f}function dt(n,t){var i=n&&parseFloat(n.replace(",","."));return(isNaN(i)?0:i)*t}function df(n,t){var i={milliseconds:0,months:0};return i.months=t.month()-n.month()+12*(t.year()-n.year()),n.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+n.clone().add(i.months,"M"),i}function ah(n,t){var i;return n.isValid()&&t.isValid()?(t=gr(t,n),n.isBefore(t)?i=df(n,t):(i=df(t,n),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function gf(n){return 0>n?-1*Math.round(-1*n):Math.round(n)}function ne(n,t){return function(i,r){var u,f;return null===r||isNaN(+r)||(cr(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),f=i,i=r,r=f),i="string"==typeof i?+i:i,u=lt(i,r),te(this,u,n),this}}function te(n,i,r,u){var o=i._milliseconds,f=gf(i._days),e=gf(i._months);n.isValid()&&(u=null==u?!0:u,o&&n._d.setTime(n._d.valueOf()+o*r),f&&ff(n,"Date",yi(n,"Date")+f*r),e&&sf(n,yi(n,"Month")+e*r),u&&t.updateOffset(n,f||e))}function vh(n,t){var u=n||h(),f=gr(u,this).startOf("day"),i=this.diff(f,"days",!0),r=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse",e=t&&(ht(t[r])?t[r]():t[r]);return this.format(e||this.localeData().calendar(r,this,h(u)))}function yh(){return new ei(this)}function ph(n,t){var i=st(n)?n:h(n);return this.isValid()&&i.isValid()?(t=g(p(t)?"millisecond":t),"millisecond"===t?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf()):!1}function wh(n,t){var i=st(n)?n:h(n);return this.isValid()&&i.isValid()?(t=g(p(t)?"millisecond":t),"millisecond"===t?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf()):!1}function bh(n,t,i,r){return r=r||"()",("("===r[0]?this.isAfter(n,i):!this.isBefore(n,i))&&(")"===r[1]?this.isBefore(t,i):!this.isAfter(t,i))}function kh(n,t){var i,r=st(n)?n:h(n);return this.isValid()&&r.isValid()?(t=g(t||"millisecond"),"millisecond"===t?this.valueOf()===r.valueOf():(i=r.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf())):!1}function dh(n,t){return this.isSame(n,t)||this.isAfter(n,t)}function gh(n,t){return this.isSame(n,t)||this.isBefore(n,t)}function nc(n,t,i){var f,e,r,u;return this.isValid()?(f=gr(n,this),f.isValid()?(e=6e4*(f.utcOffset()-this.utcOffset()),t=g(t),"year"===t||"month"===t||"quarter"===t?(u=tc(this,f),"quarter"===t?u/=3:"year"===t&&(u/=12)):(r=this-f,u="second"===t?r/1e3:"minute"===t?r/6e4:"hour"===t?r/36e5:"day"===t?(r-e)/864e5:"week"===t?(r-e)/6048e5:r),i?u:b(u)):NaN):NaN}function tc(n,t){var r,f,u=12*(t.year()-n.year())+(t.month()-n.month()),i=n.clone().add(u,"months");return 0>t-i?(r=n.clone().add(u-1,"months"),f=(t-i)/(i-r)):(r=n.clone().add(u+1,"months"),f=(t-i)/(r-i)),-(u+f)||0}function ic(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function rc(){var n=this.clone().utc();return 0<n.year()&&n.year()<=9999?ht(Date.prototype.toISOString)?this.toDate().toISOString():vr(n,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):vr(n,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function uc(n){n||(n=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var i=vr(this,n);return this.localeData().postformat(i)}function fc(n,t){return this.isValid()&&(st(n)&&n.isValid()||h(n).isValid())?lt({to:this,from:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ec(n){return this.from(h(),n)}function oc(n,t){return this.isValid()&&(st(n)&&n.isValid()||h(n).isValid())?lt({from:this,to:n}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function sc(n){return this.to(h(),n)}function ie(n){var t;return void 0===n?this._locale._abbr:(t=ct(n),null!=t&&(this._locale=t),this)}function re(){return this._locale}function hc(n){switch(n=g(n)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===n&&this.weekday(0),"isoWeek"===n&&this.isoWeekday(1),"quarter"===n&&this.month(3*Math.floor(this.month()/3)),this}function cc(n){return n=g(n),void 0===n||"millisecond"===n?this:("date"===n&&(n="day"),this.startOf(n).add(1,"isoWeek"===n?"week":n).subtract(1,"ms"))}function lc(){return this._d.valueOf()-6e4*(this._offset||0)}function ac(){return Math.floor(this.valueOf()/1e3)}function vc(){return this._offset?new Date(this.valueOf()):this._d}function yc(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function pc(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function wc(){return this.isValid()?this.toISOString():null}function bc(){return sr(this)}function kc(){return wt({},f(this))}function dc(){return f(this).overflow}function gc(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function ki(n,t){r(0,[n,n.length],0,t)}function nl(n){return ue.call(this,n,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function tl(n){return ue.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)}function il(){return kt(this.year(),1,4)}function rl(){var n=this.localeData()._week;return kt(this.year(),n.dow,n.doy)}function ue(n,t,i,r,u){var f;return null==n?hi(this,r,u).year:(f=kt(n,r,u),t>f&&(t=f),ul.call(this,n,t,i,r,u))}function ul(n,t,i,r,u){var e=vf(n,t,i,r,u),f=pi(e.year,0,e.dayOfYear);return this.year(f.getUTCFullYear()),this.month(f.getUTCMonth()),this.date(f.getUTCDate()),this}function fl(n){return null==n?Math.ceil((this.month()+1)/3):this.month(3*(n-1)+this.month()%3)}function el(n){return hi(n,this._week.dow,this._week.doy).week}function ol(){return this._week.dow}function sl(){return this._week.doy}function hl(n){var t=this.localeData().week(this);return null==n?t:this.add(7*(n-t),"d")}function cl(n){var t=hi(this,1,4).week;return null==n?t:this.add(7*(n-t),"d")}function ll(n,t){return"string"!=typeof n?n:isNaN(n)?(n=t.weekdaysParse(n),"number"==typeof n?n:null):parseInt(n,10)}function al(n,t){return pt(this._weekdays)?this._weekdays[n.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][n.day()]}function vl(n){return this._weekdaysShort[n.day()]}function yl(n){return this._weekdaysMin[n.day()]}function pl(n,t,i){var f,r,e,u=n.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;7>f;++f)e=it([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(e,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(e,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(e,"").toLocaleLowerCase();return i?"dddd"===t?(r=a.call(this._weekdaysParse,u),-1!==r?r:null):"ddd"===t?(r=a.call(this._shortWeekdaysParse,u),-1!==r?r:null):(r=a.call(this._minWeekdaysParse,u),-1!==r?r:null):"dddd"===t?(r=a.call(this._weekdaysParse,u),-1!==r?r:(r=a.call(this._shortWeekdaysParse,u),-1!==r?r:(r=a.call(this._minWeekdaysParse,u),-1!==r?r:null))):"ddd"===t?(r=a.call(this._shortWeekdaysParse,u),-1!==r?r:(r=a.call(this._weekdaysParse,u),-1!==r?r:(r=a.call(this._minWeekdaysParse,u),-1!==r?r:null))):(r=a.call(this._minWeekdaysParse,u),-1!==r?r:(r=a.call(this._weekdaysParse,u),-1!==r?r:(r=a.call(this._shortWeekdaysParse,u),-1!==r?r:null)))}function wl(n,t,i){var r,u,f;if(this._weekdaysParseExact)return pl.call(this,n,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;7>r;r++)if((u=it([2e3,1]).day(r),i&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(u,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(u,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(u,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(f="^"+this.weekdays(u,"")+"|^"+this.weekdaysShort(u,"")+"|^"+this.weekdaysMin(u,""),this._weekdaysParse[r]=new RegExp(f.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[r].test(n))||i&&"ddd"===t&&this._shortWeekdaysParse[r].test(n)||i&&"dd"===t&&this._minWeekdaysParse[r].test(n)||!i&&this._weekdaysParse[r].test(n))return r}function bl(n){if(!this.isValid())return null!=n?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=n?(n=ll(n,this.localeData()),this.add(n-t,"d")):t}function kl(n){if(!this.isValid())return null!=n?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==n?t:this.add(n-t,"d")}function dl(n){return this.isValid()?null==n?this.day()||7:this.day(this.day()%7?n:n-7):null!=n?this:NaN}function gl(n){return this._weekdaysParseExact?(w(this,"_weekdaysRegex")||tu.call(this),n?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex}function na(n){return this._weekdaysParseExact?(w(this,"_weekdaysRegex")||tu.call(this),n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}function ta(n){return this._weekdaysParseExact?(w(this,"_weekdaysRegex")||tu.call(this),n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}function tu(){function u(n,t){return t.length-n.length}for(var f,e,o,s,h=[],i=[],r=[],t=[],n=0;7>n;n++)f=it([2e3,1]).day(n),e=this.weekdaysMin(f,""),o=this.weekdaysShort(f,""),s=this.weekdays(f,""),h.push(e),i.push(o),r.push(s),t.push(e),t.push(o),t.push(s);for(h.sort(u),i.sort(u),r.sort(u),t.sort(u),n=0;7>n;n++)i[n]=bt(i[n]),r[n]=bt(r[n]),t[n]=bt(t[n]);this._weekdaysRegex=new RegExp("^("+t.join("|")+")","i");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+h.join("|")+")","i")}function ia(n){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==n?t:this.add(n-t,"d")}function iu(){return this.hours()%12||12}function ra(){return this.hours()||24}function fe(n,t){r(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function ee(n,t){return t._meridiemParse}function ua(n){return"p"===(n+"").toLowerCase().charAt(0)}function fa(n,t,i){return n>11?i?"pm":"PM":i?"am":"AM"}function ea(n,t){t[ni]=e(1e3*("0."+n))}function oa(){return this._isUTC?"UTC":""}function sa(){return this._isUTC?"Coordinated Universal Time":""}function ha(n){return h(1e3*n)}function ca(){return h.apply(null,arguments).parseZone()}function la(n,t,i){var r=this._calendar[n];return ht(r)?r.call(t,i):r}function aa(n){var t=this._longDateFormat[n],i=this._longDateFormat[n.toUpperCase()];return t||!i?t:(this._longDateFormat[n]=i.replace(/MMMM|MM|DD|dddd/g,function(n){return n.slice(1)}),this._longDateFormat[n])}function va(){return this._invalidDate}function ya(n){return this._ordinal.replace("%d",n)}function oe(n){return n}function pa(n,t,i,r){var u=this._relativeTime[i];return ht(u)?u(n,t,i,r):u.replace(/%d/i,n)}function wa(n,t){var i=this._relativeTime[n>0?"future":"past"];return ht(i)?i(t):i.replace(/%s/i,t)}function di(n,t,i,r){var u=ct(),f=it().set(r,t);return u[i](f,n)}function se(n,t,i){if("number"==typeof n&&(t=n,n=void 0),n=n||"",null!=t)return di(n,t,i,"month");for(var u=[],r=0;12>r;r++)u[r]=di(n,r,i,"month");return u}function ru(n,t,i,r){var o,f,u,e;if("boolean"==typeof n?("number"==typeof t&&(i=t,t=void 0),t=t||""):(t=n,i=t,n=!1,"number"==typeof t&&(i=t,t=void 0),t=t||""),o=ct(),f=n?o._week.dow:0,null!=i)return di(t,(i+f)%7,r,"day");for(e=[],u=0;7>u;u++)e[u]=di(t,(u+f)%7,r,"day");return e}function ba(n,t){return se(n,t,"months")}function ka(n,t){return se(n,t,"monthsShort")}function da(n,t,i){return ru(n,t,i,"weekdays")}function ga(n,t,i){return ru(n,t,i,"weekdaysShort")}function nv(n,t,i){return ru(n,t,i,"weekdaysMin")}function tv(){var n=this._data;return this._milliseconds=ot(this._milliseconds),this._days=ot(this._days),this._months=ot(this._months),n.milliseconds=ot(n.milliseconds),n.seconds=ot(n.seconds),n.minutes=ot(n.minutes),n.hours=ot(n.hours),n.months=ot(n.months),n.years=ot(n.years),this}function he(n,t,i,r){var u=lt(t,i);return n._milliseconds+=r*u._milliseconds,n._days+=r*u._days,n._months+=r*u._months,n._bubble()}function iv(n,t){return he(this,n,t,1)}function rv(n,t){return he(this,n,t,-1)}function ce(n){return 0>n?Math.floor(n):Math.ceil(n)}function uv(){var u,f,e,s,o,r=this._milliseconds,n=this._days,t=this._months,i=this._data;return r>=0&&n>=0&&t>=0||0>=r&&0>=n&&0>=t||(r+=864e5*ce(uu(t)+n),n=0,t=0),i.milliseconds=r%1e3,u=b(r/1e3),i.seconds=u%60,f=b(u/60),i.minutes=f%60,e=b(f/60),i.hours=e%24,n+=b(e/24),o=b(le(n)),t+=o,n-=ce(uu(o)),s=b(t/12),t%=12,i.days=n,i.months=t,i.years=s,this}function le(n){return 4800*n/146097}function uu(n){return 146097*n/4800}function fv(n){var t,r,i=this._milliseconds;if(n=g(n),"month"===n||"year"===n)return t=this._days+i/864e5,r=this._months+le(t),"month"===n?r:r/12;switch(t=this._days+Math.round(uu(this._months)),n){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+n);}}function ev(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*e(this._months/12)}function at(n){return function(){return this.as(n)}}function ov(n){return n=g(n),this[n+"s"]()}function gt(n){return function(){return this._data[n]}}function sv(){return b(this.days()/7)}function hv(n,t,i,r,u){return u.relativeTime(t||1,!!i,n,r)}function cv(n,t,i){var r=lt(n).abs(),h=fi(r.as("s")),f=fi(r.as("m")),e=fi(r.as("h")),o=fi(r.as("d")),s=fi(r.as("M")),c=fi(r.as("y")),u=h<yt.s&&["s",h]||1>=f&&["m"]||f<yt.m&&["mm",f]||1>=e&&["h"]||e<yt.h&&["hh",e]||1>=o&&["d"]||o<yt.d&&["dd",o]||1>=s&&["M"]||s<yt.M&&["MM",s]||1>=c&&["y"]||["yy",c];return u[2]=t,u[3]=+n>0,u[4]=i,hv.apply(null,u)}function lv(n,t){return void 0===yt[n]?!1:void 0===t?yt[n]:(yt[n]=t,!0)}function av(n){var t=this.localeData(),i=cv(this,!n,t);return n&&(i=t.pastFuture(+this,i)),t.postformat(i)}function gi(){var n,e,o,t=wu(this._milliseconds)/1e3,a=wu(this._days),i=wu(this._months);n=b(t/60);e=b(n/60);t%=60;n%=60;o=b(i/12);i%=12;var s=o,h=i,c=a,r=e,u=n,f=t,l=this.asSeconds();return l?(0>l?"-":"")+"P"+(s?s+"Y":"")+(h?h+"M":"")+(c?c+"D":"")+(r||u||f?"T":"")+(r?r+"H":"")+(u?u+"M":"")+(f?f+"S":""):"P0D"}var ae,ve,pe,vu,to,io,ro,uo,fo,yu,eo,pu,oo,so,ho,co,vt,lo,n;ve=Array.prototype.some?Array.prototype.some:function(n){for(var i=Object(this),r=i.length>>>0,t=0;r>t;t++)if(t in i&&n.call(this,i[t],t,i))return!0;return!1};var fu=t.momentProperties=[],eu=!1,ye={};t.suppressDeprecationWarnings=!1;t.deprecationHandler=null;pe=Object.keys?Object.keys:function(n){var t,i=[];for(t in n)w(n,t)&&i.push(t);return i};var nr,a,l={},ci={},we=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,tr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ou={},ui={},be=/\d/,k=/\d\d/,ke=/\d{3}/,su=/\d{4}/,ir=/[+-]?\d{6}/,c=/\d\d?/,de=/\d\d\d\d?/,ge=/\d\d\d\d\d\d?/,rr=/\d{1,3}/,hu=/\d{1,4}/,ur=/[+-]?\d{1,6}/,fr=/[+-]?\d+/,vv=/Z|[+-]\d\d:?\d\d/gi,er=/Z|[+-]\d\d(?::?\d\d)?/gi,li=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,cu={},lu={},nt=0,ft=1,rt=2,v=3,tt=4,et=5,ni=6,yv=7,pv=8;a=Array.prototype.indexOf?Array.prototype.indexOf:function(n){for(var t=0;t<this.length;++t)if(this[t]===n)return t;return-1};r("M",["MM",2],"Mo",function(){return this.month()+1});r("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)});r("MMMM",0,0,function(n){return this.localeData().months(this,n)});y("month","M");i("M",c);i("MM",c,k);i("MMM",function(n,t){return t.monthsShortRegex(n)});i("MMMM",function(n,t){return t.monthsRegex(n)});s(["M","MM"],function(n,t){t[ft]=e(n)-1});s(["MMM","MMMM"],function(n,t,i,r){var u=i._locale.monthsParse(n,r,i._strict);null!=u?t[ft]=u:f(i).invalidMonth=n});var no=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,wv="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),bv="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),kv=li,dv=li,gv=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ny=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ty=/Z|[+-]\d\d(?::?\d\d)?/,or=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],au=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],iy=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=d("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))});r("Y",0,0,function(){var n=this.year();return 9999>=n?""+n:"+"+n});r(0,["YY",2],0,function(){return this.year()%100});r(0,["YYYY",4],0,"year");r(0,["YYYYY",5],0,"year");r(0,["YYYYYY",6,!0],0,"year");y("year","y");i("Y",fr);i("YY",c,k);i("YYYY",hu,su);i("YYYYY",ur,ir);i("YYYYYY",ur,ir);s(["YYYYY","YYYYYY"],nt);s("YYYY",function(n,i){i[nt]=2===n.length?t.parseTwoDigitYear(n):e(n)});s("YY",function(n,i){i[nt]=t.parseTwoDigitYear(n)});s("Y",function(n,t){t[nt]=parseInt(n,10)});t.parseTwoDigitYear=function(n){return e(n)+(e(n)>68?1900:2e3)};vu=ii("FullYear",!0);t.ISO_8601=function(){};var ry=d("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var n=h.apply(null,arguments);return this.isValid()&&n.isValid()?this>n?this:n:vi()}),uy=d("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var n=h.apply(null,arguments);return this.isValid()&&n.isValid()?n>this?this:n:vi()}),fy=function(){return Date.now?Date.now():+new Date};bf("Z",":");bf("ZZ","");i("Z",er);i("ZZ",er);s(["Z","ZZ"],function(n,t,i){i._useUTC=!0;i._tzm=dr(er,n)});to=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};io=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/;ro=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;lt.fn=bi.prototype;uo=ne(1,"add");fo=ne(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";yu=d("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return void 0===n?this.localeData():this.locale(n)});r(0,["gg",2],0,function(){return this.weekYear()%100});r(0,["GG",2],0,function(){return this.isoWeekYear()%100});ki("gggg","weekYear");ki("ggggg","weekYear");ki("GGGG","isoWeekYear");ki("GGGGG","isoWeekYear");y("weekYear","gg");y("isoWeekYear","GG");i("G",fr);i("g",fr);i("GG",c,k);i("gg",c,k);i("GGGG",hu,su);i("gggg",hu,su);i("GGGGG",ur,ir);i("ggggg",ur,ir);oi(["gggg","ggggg","GGGG","GGGGG"],function(n,t,i,r){t[r.substr(0,2)]=e(n)});oi(["gg","GG"],function(n,i,r,u){i[u]=t.parseTwoDigitYear(n)});r("Q",0,"Qo","quarter");y("quarter","Q");i("Q",be);s("Q",function(n,t){t[ft]=3*(e(n)-1)});r("w",["ww",2],"wo","week");r("W",["WW",2],"Wo","isoWeek");y("week","w");y("isoWeek","W");i("w",c);i("ww",c,k);i("W",c);i("WW",c,k);oi(["w","ww","W","WW"],function(n,t,i,r){t[r.substr(0,1)]=e(n)});eo={dow:0,doy:6};r("D",["DD",2],"Do","date");y("date","D");i("D",c);i("DD",c,k);i("Do",function(n,t){return n?t._ordinalParse:t._ordinalParseLenient});s(["D","DD"],rt);s("Do",function(n,t){t[rt]=e(n.match(c)[0],10)});pu=ii("Date",!0);r("d",0,"do","day");r("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)});r("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)});r("dddd",0,0,function(n){return this.localeData().weekdays(this,n)});r("e",0,0,"weekday");r("E",0,0,"isoWeekday");y("day","d");y("weekday","e");y("isoWeekday","E");i("d",c);i("e",c);i("E",c);i("dd",function(n,t){return t.weekdaysMinRegex(n)});i("ddd",function(n,t){return t.weekdaysShortRegex(n)});i("dddd",function(n,t){return t.weekdaysRegex(n)});oi(["dd","ddd","dddd"],function(n,t,i,r){var u=i._locale.weekdaysParse(n,r,i._strict);null!=u?t.d=u:f(i).invalidWeekday=n});oi(["d","e","E"],function(n,t,i,r){t[r]=e(n)});var ey="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),oy="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),sy="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),hy=li,cy=li,ly=li;for(r("DDD",["DDDD",3],"DDDo","dayOfYear"),y("dayOfYear","DDD"),i("DDD",rr),i("DDDD",ke),s(["DDD","DDDD"],function(n,t,i){i._dayOfYear=e(n)}),r("H",["HH",2],0,"hour"),r("h",["hh",2],0,iu),r("k",["kk",2],0,ra),r("hmm",0,0,function(){return""+iu.apply(this)+ut(this.minutes(),2)}),r("hmmss",0,0,function(){return""+iu.apply(this)+ut(this.minutes(),2)+ut(this.seconds(),2)}),r("Hmm",0,0,function(){return""+this.hours()+ut(this.minutes(),2)}),r("Hmmss",0,0,function(){return""+this.hours()+ut(this.minutes(),2)+ut(this.seconds(),2)}),fe("a",!0),fe("A",!1),y("hour","h"),i("a",ee),i("A",ee),i("H",c),i("h",c),i("HH",c,k),i("hh",c,k),i("hmm",de),i("hmmss",ge),i("Hmm",de),i("Hmmss",ge),s(["H","HH"],v),s(["a","A"],function(n,t,i){i._isPm=i._locale.isPM(n);i._meridiem=n}),s(["h","hh"],function(n,t,i){t[v]=e(n);f(i).bigHour=!0}),s("hmm",function(n,t,i){var r=n.length-2;t[v]=e(n.substr(0,r));t[tt]=e(n.substr(r));f(i).bigHour=!0}),s("hmmss",function(n,t,i){var r=n.length-4,u=n.length-2;t[v]=e(n.substr(0,r));t[tt]=e(n.substr(r,2));t[et]=e(n.substr(u));f(i).bigHour=!0}),s("Hmm",function(n,t){var i=n.length-2;t[v]=e(n.substr(0,i));t[tt]=e(n.substr(i))}),s("Hmmss",function(n,t){var i=n.length-4,r=n.length-2;t[v]=e(n.substr(0,i));t[tt]=e(n.substr(i,2));t[et]=e(n.substr(r))}),oo=/[ap]\.?m?\.?/i,so=ii("Hours",!0),r("m",["mm",2],0,"minute"),y("minute","m"),i("m",c),i("mm",c,k),s(["m","mm"],tt),ho=ii("Minutes",!1),r("s",["ss",2],0,"second"),y("second","s"),i("s",c),i("ss",c,k),s(["s","ss"],et),co=ii("Seconds",!1),r("S",0,0,function(){return~~(this.millisecond()/100)}),r(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),r(0,["SSS",3],0,"millisecond"),r(0,["SSSS",4],0,function(){return 10*this.millisecond()}),r(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),r(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),r(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),r(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),r(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),y("millisecond","ms"),i("S",rr,be),i("SS",rr,k),i("SSS",rr,ke),vt="SSSS";vt.length<=9;vt+="S")i(vt,/\d+/);for(vt="S";vt.length<=9;vt+="S")s(vt,ea);lo=ii("Milliseconds",!1);r("z",0,0,"zoneAbbr");r("zz",0,0,"zoneName");n=ei.prototype;n.add=uo;n.calendar=vh;n.clone=yh;n.diff=nc;n.endOf=cc;n.format=uc;n.from=fc;n.fromNow=ec;n.to=oc;n.toNow=sc;n.get=ef;n.invalidAt=dc;n.isAfter=ph;n.isBefore=wh;n.isBetween=bh;n.isSame=kh;n.isSameOrAfter=dh;n.isSameOrBefore=gh;n.isValid=bc;n.lang=yu;n.locale=ie;n.localeData=re;n.max=uy;n.min=ry;n.parsingFlags=kc;n.set=ef;n.startOf=hc;n.subtract=fo;n.toArray=yc;n.toObject=pc;n.toDate=vc;n.toISOString=rc;n.toJSON=wc;n.toString=ic;n.unix=ac;n.valueOf=lc;n.creationData=gc;n.year=vu;n.isLeapYear=vs;n.weekYear=nl;n.isoWeekYear=tl;n.quarter=n.quarters=fl;n.month=hf;n.daysInMonth=ss;n.week=n.weeks=hl;n.isoWeek=n.isoWeeks=cl;n.weeksInYear=rl;n.isoWeeksInYear=il;n.date=pu;n.day=n.days=bl;n.weekday=kl;n.isoWeekday=dl;n.dayOfYear=ia;n.hour=n.hours=so;n.minute=n.minutes=ho;n.second=n.seconds=co;n.millisecond=n.milliseconds=lo;n.utcOffset=ih;n.utc=uh;n.local=fh;n.parseZone=eh;n.hasAlignedHourOffset=oh;n.isDST=sh;n.isDSTShifted=hh;n.isLocal=ch;n.isUtcOffset=lh;n.isUtc=kf;n.isUTC=kf;n.zoneAbbr=oa;n.zoneName=sa;n.dates=d("dates accessor is deprecated. Use date instead.",pu);n.months=d("months accessor is deprecated. Use month instead",hf);n.years=d("years accessor is deprecated. Use year instead",vu);n.zone=d("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",rh);var ao=n,u=ar.prototype;u._calendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};u.calendar=la;u._longDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};u.longDateFormat=aa;u._invalidDate="Invalid date";u.invalidDate=va;u._ordinal="%d";u.ordinal=ya;u._ordinalParse=/\d{1,2}/;u.preparse=oe;u.postformat=oe;u._relativeTime={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};u.relativeTime=pa;u.pastFuture=wa;u.set=po;u.months=us;u._months=wv;u.monthsShort=fs;u._monthsShort=bv;u.monthsParse=os;u._monthsRegex=dv;u.monthsRegex=cs;u._monthsShortRegex=kv;u.monthsShortRegex=hs;u.week=el;u._week=eo;u.firstDayOfYear=sl;u.firstDayOfWeek=ol;u.weekdays=al;u._weekdays=ey;u.weekdaysMin=yl;u._weekdaysMin=sy;u.weekdaysShort=vl;u._weekdaysShort=oy;u.weekdaysParse=wl;u._weekdaysRegex=hy;u.weekdaysRegex=gl;u._weekdaysShortRegex=cy;u.weekdaysShortRegex=na;u._weekdaysMinRegex=ly;u.weekdaysMinRegex=ta;u.isPM=ua;u._meridiemParse=oo;u.meridiem=fa;ti("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var t=n%10,i=1===e(n%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return n+i}});t.lang=d("moment.lang is deprecated. Use moment.locale instead.",ti);t.langData=d("moment.langData is deprecated. Use moment.localeData instead.",ct);var ot=Math.abs,ay=at("ms"),vy=at("s"),yy=at("m"),py=at("h"),wy=at("d"),by=at("w"),ky=at("M"),dy=at("y"),gy=gt("milliseconds"),np=gt("seconds"),tp=gt("minutes"),ip=gt("hours"),rp=gt("days"),up=gt("months"),fp=gt("years"),fi=Math.round,yt={s:45,m:45,h:22,d:26,M:11},wu=Math.abs,o=bi.prototype;return o.abs=tv,o.add=iv,o.subtract=rv,o.as=fv,o.asMilliseconds=ay,o.asSeconds=vy,o.asMinutes=yy,o.asHours=py,o.asDays=wy,o.asWeeks=by,o.asMonths=ky,o.asYears=dy,o.valueOf=ev,o._bubble=uv,o.get=ov,o.milliseconds=gy,o.seconds=np,o.minutes=tp,o.hours=ip,o.days=rp,o.weeks=sv,o.months=up,o.years=fp,o.humanize=av,o.toISOString=gi,o.toString=gi,o.toJSON=gi,o.locale=ie,o.localeData=re,o.toIsoString=d("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",gi),o.lang=yu,r("X",0,0,"unix"),r("x",0,0,"valueOf"),i("x",fr),i("X",/[+-]?\d+(\.\d{1,3})?/),s("X",function(n,t,i){i._d=new Date(1e3*parseFloat(n,10))}),s("x",function(n,t,i){i._d=new Date(e(n))}),t.version="2.13.0",vo(h),t.fn=ao,t.min=nh,t.max=th,t.now=fy,t.utc=it,t.unix=ha,t.months=ba,t.isDate=ai,t.locale=ti,t.invalid=vi,t.duration=lt,t.isMoment=st,t.weekdays=da,t.parseZone=ca,t.localeData=ct,t.isDuration=kr,t.monthsShort=ka,t.weekdaysMin=nv,t.defineLocale=rf,t.updateLocale=bo,t.locales=ko,t.weekdaysShort=ga,t.normalizeUnits=g,t.relativeTimeThreshold=lv,t.prototype=ao,t}),function(n,t){var i,r;typeof define=="function"&&define.amd?define(["moment","jquery"],function(i,r){return r.fn||(r.fn={}),n.daterangepicker=t(i,r)}):typeof module=="object"&&module.exports?(i=typeof window!="undefined"?window.jQuery:undefined,i||(i=require("jquery"),i.fn||(i.fn={})),r=typeof window!="undefined"&&typeof window.moment!="undefined"?window.moment:require("moment"),module.exports=t(r,i)):n.daterangepicker=t(n.moment,n.jQuery)}(this,function(n,t){var i=function(i,r,u){var y,f,o,e,l,v,s,h,c,a;if(this.parentEl="body",this.element=t(i),this.startDate=n().startOf("day"),this.endDate=n().endOf("day"),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.showCustomRangeLabel=!0,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyClass="btn-success",this.cancelClass="btn-default",this.locale={direction:"ltr",format:n.localeData().longDateFormat("L"),separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:n.weekdaysMin(),monthNames:n.monthsShort(),firstDay:n.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},(typeof r!="object"||r===null)&&(r={}),r=t.extend(this.element.data(),r),typeof r.template=="string"||r.template instanceof t||(r.template='<div class="daterangepicker dropdown-menu"><div class="calendar left"><div class="daterangepicker_input"><input class="input-mini form-control" type="text" name="daterangepicker_start" value="" /><i class="fa fa-calendar glyphicon glyphicon-calendar"><\/i><div class="calendar-time"><div><\/div><i class="fa fa-clock-o glyphicon glyphicon-time"><\/i><\/div><\/div><div class="calendar-table"><\/div><\/div><div class="calendar right"><div class="daterangepicker_input"><input class="input-mini form-control" type="text" name="daterangepicker_end" value="" /><i class="fa fa-calendar glyphicon glyphicon-calendar"><\/i><div class="calendar-time"><div><\/div><i class="fa fa-clock-o glyphicon glyphicon-time"><\/i><\/div><\/div><div class="calendar-table"><\/div><\/div><div class="ranges"><div class="range_inputs"><button class="applyBtn" disabled="disabled" type="button"><\/button> <button class="cancelBtn" type="button"><\/button><\/div><\/div><\/div>'),this.parentEl=r.parentEl&&t(r.parentEl).length?t(r.parentEl):t(this.parentEl),this.container=t(r.template).appendTo(this.parentEl),typeof r.locale=="object"&&(typeof r.locale.direction=="string"&&(this.locale.direction=r.locale.direction),typeof r.locale.format=="string"&&(this.locale.format=r.locale.format),typeof r.locale.separator=="string"&&(this.locale.separator=r.locale.separator),typeof r.locale.daysOfWeek=="object"&&(this.locale.daysOfWeek=r.locale.daysOfWeek.slice()),typeof r.locale.monthNames=="object"&&(this.locale.monthNames=r.locale.monthNames.slice()),typeof r.locale.firstDay=="number"&&(this.locale.firstDay=r.locale.firstDay),typeof r.locale.applyLabel=="string"&&(this.locale.applyLabel=r.locale.applyLabel),typeof r.locale.cancelLabel=="string"&&(this.locale.cancelLabel=r.locale.cancelLabel),typeof r.locale.weekLabel=="string"&&(this.locale.weekLabel=r.locale.weekLabel),typeof r.locale.customRangeLabel=="string"&&(h=document.createElement("textarea"),h.innerHTML=r.locale.customRangeLabel,c=h.value,this.locale.customRangeLabel=c)),this.container.addClass(this.locale.direction),typeof r.startDate=="string"&&(this.startDate=n(r.startDate,this.locale.format)),typeof r.endDate=="string"&&(this.endDate=n(r.endDate,this.locale.format)),typeof r.minDate=="string"&&(this.minDate=n(r.minDate,this.locale.format)),typeof r.maxDate=="string"&&(this.maxDate=n(r.maxDate,this.locale.format)),typeof r.startDate=="object"&&(this.startDate=n(r.startDate)),typeof r.endDate=="object"&&(this.endDate=n(r.endDate)),typeof r.minDate=="object"&&(this.minDate=n(r.minDate)),typeof r.maxDate=="object"&&(this.maxDate=n(r.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),typeof r.applyClass=="string"&&(this.applyClass=r.applyClass),typeof r.cancelClass=="string"&&(this.cancelClass=r.cancelClass),typeof r.dateLimit=="object"&&(this.dateLimit=r.dateLimit),typeof r.opens=="string"&&(this.opens=r.opens),typeof r.drops=="string"&&(this.drops=r.drops),typeof r.showWeekNumbers=="boolean"&&(this.showWeekNumbers=r.showWeekNumbers),typeof r.showISOWeekNumbers=="boolean"&&(this.showISOWeekNumbers=r.showISOWeekNumbers),typeof r.buttonClasses=="string"&&(this.buttonClasses=r.buttonClasses),typeof r.buttonClasses=="object"&&(this.buttonClasses=r.buttonClasses.join(" ")),typeof r.showDropdowns=="boolean"&&(this.showDropdowns=r.showDropdowns),typeof r.showCustomRangeLabel=="boolean"&&(this.showCustomRangeLabel=r.showCustomRangeLabel),typeof r.singleDatePicker=="boolean"&&(this.singleDatePicker=r.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),typeof r.timePicker=="boolean"&&(this.timePicker=r.timePicker),typeof r.timePickerSeconds=="boolean"&&(this.timePickerSeconds=r.timePickerSeconds),typeof r.timePickerIncrement=="number"&&(this.timePickerIncrement=r.timePickerIncrement),typeof r.timePicker24Hour=="boolean"&&(this.timePicker24Hour=r.timePicker24Hour),typeof r.autoApply=="boolean"&&(this.autoApply=r.autoApply),typeof r.autoUpdateInput=="boolean"&&(this.autoUpdateInput=r.autoUpdateInput),typeof r.linkedCalendars=="boolean"&&(this.linkedCalendars=r.linkedCalendars),typeof r.isInvalidDate=="function"&&(this.isInvalidDate=r.isInvalidDate),typeof r.isCustomDate=="function"&&(this.isCustomDate=r.isCustomDate),typeof r.alwaysShowCalendars=="boolean"&&(this.alwaysShowCalendars=r.alwaysShowCalendars),this.locale.firstDay!=0)for(y=this.locale.firstDay;y>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),y--;if(typeof r.startDate=="undefined"&&typeof r.endDate=="undefined"&&t(this.element).is("input[type=text]")&&(l=t(this.element).val(),v=l.split(this.locale.separator),f=o=null,v.length==2?(f=n(v[0],this.locale.format),o=n(v[1],this.locale.format)):this.singleDatePicker&&l!==""&&(f=n(l,this.locale.format),o=n(l,this.locale.format)),f!==null&&o!==null&&(this.setStartDate(f),this.setEndDate(o))),typeof r.ranges=="object"){for(e in r.ranges)(f=typeof r.ranges[e][0]=="string"?n(r.ranges[e][0],this.locale.format):n(r.ranges[e][0]),o=typeof r.ranges[e][1]=="string"?n(r.ranges[e][1],this.locale.format):n(r.ranges[e][1]),this.minDate&&f.isBefore(this.minDate)&&(f=this.minDate.clone()),s=this.maxDate,this.dateLimit&&s&&f.clone().add(this.dateLimit).isAfter(s)&&(s=f.clone().add(this.dateLimit)),s&&o.isAfter(s)&&(o=s.clone()),this.minDate&&o.isBefore(this.minDate,this.timepicker?"minute":"day")||s&&f.isAfter(s,this.timepicker?"minute":"day"))||(h=document.createElement("textarea"),h.innerHTML=e,c=h.value,this.ranges[c]=[f,o]);a="<ul>";for(e in this.ranges)a+='<li data-range-key="'+e+'">'+e+"<\/li>";this.showCustomRangeLabel&&(a+='<li data-range-key="'+this.locale.customRangeLabel+'">'+this.locale.customRangeLabel+"<\/li>");a+="<\/ul>";this.container.find(".ranges").prepend(a)}typeof u=="function"&&(this.callback=u);this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide());this.timePicker&&this.autoApply&&(this.autoApply=!1);this.autoApply&&typeof r.ranges!="object"?this.container.find(".ranges").hide():this.autoApply&&this.container.find(".applyBtn, .cancelBtn").addClass("hide");this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".calendar.left").addClass("single"),this.container.find(".calendar.left").show(),this.container.find(".calendar.right").hide(),this.container.find(".daterangepicker_input input, .daterangepicker_input > i").hide(),this.timePicker?this.container.find(".ranges ul").hide():this.container.find(".ranges").hide());(typeof r.ranges=="undefined"&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar");this.container.addClass("opens"+this.opens);typeof r.ranges!="undefined"&&this.opens=="right"&&this.container.find(".ranges").prependTo(this.container.find(".calendar.left").parent());this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses);this.applyClass.length&&this.container.find(".applyBtn").addClass(this.applyClass);this.cancelClass.length&&this.container.find(".cancelBtn").addClass(this.cancelClass);this.container.find(".applyBtn").html(this.locale.applyLabel);this.container.find(".cancelBtn").html(this.locale.cancelLabel);this.container.find(".calendar").on("click.daterangepicker",".prev",t.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",t.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",t.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",t.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",t.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",t.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",t.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",t.proxy(this.timeChanged,this)).on("click.daterangepicker",".daterangepicker_input input",t.proxy(this.showCalendars,this)).on("focus.daterangepicker",".daterangepicker_input input",t.proxy(this.formInputsFocused,this)).on("blur.daterangepicker",".daterangepicker_input input",t.proxy(this.formInputsBlurred,this)).on("change.daterangepicker",".daterangepicker_input input",t.proxy(this.formInputsChanged,this));this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",t.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",t.proxy(this.clickCancel,this)).on("click.daterangepicker","li",t.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",t.proxy(this.hoverRange,this)).on("mouseleave.daterangepicker","li",t.proxy(this.updateFormInputs,this));if(this.element.is("input")||this.element.is("button"))this.element.on({"click.daterangepicker":t.proxy(this.show,this),"focus.daterangepicker":t.proxy(this.show,this),"keyup.daterangepicker":t.proxy(this.elementChanged,this),"keydown.daterangepicker":t.proxy(this.keydown,this)});else this.element.on("click.daterangepicker",t.proxy(this.toggle,this));this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))};return i.prototype={constructor:i,setStartDate:function(t){typeof t=="string"&&(this.startDate=n(t,this.locale.format));typeof t=="object"&&(this.startDate=n(t));this.timePicker||(this.startDate=this.startDate.startOf("day"));this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement);this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement));this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement));this.isShowing||this.updateElement();this.updateMonthsInView()},setEndDate:function(t){typeof t=="string"&&(this.endDate=n(t,this.locale.format));typeof t=="object"&&(this.endDate=n(t));this.timePicker||(this.endDate=this.endDate.endOf("day"));this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement);this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone());this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone());this.dateLimit&&this.startDate.clone().add(this.dateLimit).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.dateLimit));this.previousRightTime=this.endDate.clone();this.isShowing||this.updateElement();this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").removeAttr("disabled").removeClass("disabled"):this.container.find(".right .calendar-time select").attr("disabled","disabled").addClass("disabled"));this.endDate?(this.container.find('input[name="daterangepicker_end"]').removeClass("active"),this.container.find('input[name="daterangepicker_start"]').addClass("active")):(this.container.find('input[name="daterangepicker_end"]').addClass("active"),this.container.find('input[name="daterangepicker_start"]').removeClass("active"));this.updateMonthsInView();this.updateCalendars();this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2);this.rightCalendar.month=this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.startDate.clone().date(2).add(1,"month"):this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){var n,i,r,t;(this.timePicker&&(this.endDate?(n=parseInt(this.container.find(".left .hourselect").val(),10),i=parseInt(this.container.find(".left .minuteselect").val(),10),r=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,this.timePicker24Hour||(t=this.container.find(".left .ampmselect").val(),t==="PM"&&n<12&&(n+=12),t==="AM"&&n===12&&(n=0))):(n=parseInt(this.container.find(".right .hourselect").val(),10),i=parseInt(this.container.find(".right .minuteselect").val(),10),r=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,this.timePicker24Hour||(t=this.container.find(".right .ampmselect").val(),t==="PM"&&n<12&&(n+=12),t==="AM"&&n===12&&(n=0))),this.leftCalendar.month.hour(n).minute(i).second(r),this.rightCalendar.month.hour(n).minute(i).second(r)),this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),this.endDate!=null)&&this.calculateChosenLabel()},renderCalendar:function(i){var r=i=="left"?this.leftCalendar:this.rightCalendar,nt=r.month.month(),tt=r.month.year(),pt=r.month.hour(),ot=r.month.minute(),st=r.month.second(),wt=n([tt,nt]).daysInMonth(),b=n([tt,nt,1]),bt=n([tt,nt,wt]),ht=n(b).subtract(1,"month").month(),ct=n(b).subtract(1,"month").year(),it=n([ct,ht]).daysInMonth(),lt=b.day(),r=[],a,v,rt,h,d,l,ft,f,u,o,w,g,et,s;for(r.firstDay=b,r.lastDay=bt,s=0;s<6;s++)r[s]=[];a=it-lt+this.locale.firstDay+1;a>it&&(a-=7);lt==this.locale.firstDay&&(a=it-6);v=n([ct,ht,a,12,ot,st]);for(var s=0,u=0,f=0;s<42;s++,u++,v=n(v).add(24,"hour"))s>0&&u%7==0&&(u=0,f++),r[f][u]=v.clone().hour(pt).minute(ot).second(st),v.hour(12),this.minDate&&r[f][u].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&r[f][u].isBefore(this.minDate)&&i=="left"&&(r[f][u]=this.minDate.clone()),this.maxDate&&r[f][u].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&r[f][u].isAfter(this.maxDate)&&i=="right"&&(r[f][u]=this.maxDate.clone());i=="left"?this.leftCalendar.calendar=r:this.rightCalendar.calendar=r;var y=i=="left"?this.minDate:this.startDate,c=this.maxDate,gt=i=="left"?this.startDate:this.endDate,k=this.locale.direction=="ltr"?{left:"chevron-left",right:"chevron-right"}:{left:"chevron-right",right:"chevron-left"},e='<table class="table-condensed">';if(e+="<thead>",e+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(e+="<th><\/th>"),e+=y&&!y.isBefore(r.firstDay)||this.linkedCalendars&&i!="left"?"<th><\/th>":'<th class="prev available"><i class="fa fa-'+k.left+" glyphicon glyphicon-"+k.left+'"><\/i><\/th>',rt=this.locale.monthNames[r[1][1].month()]+r[1][1].format(" YYYY"),this.showDropdowns){var at=r[1][1].month(),p=r[1][1].year(),vt=c&&c.year()||p+5,yt=y&&y.year()||p-50,kt=p==yt,dt=p==vt,ut='<select class="monthselect">';for(h=0;h<12;h++)ut+=(!kt||h>=y.month())&&(!dt||h<=c.month())?"<option value='"+h+"'"+(h===at?" selected='selected'":"")+">"+this.locale.monthNames[h]+"<\/option>":"<option value='"+h+"'"+(h===at?" selected='selected'":"")+" disabled='disabled'>"+this.locale.monthNames[h]+"<\/option>";for(ut+="<\/select>",d='<select class="yearselect">',l=yt;l<=vt;l++)d+='<option value="'+l+'"'+(l===p?' selected="selected"':"")+">"+l+"<\/option>";d+="<\/select>";rt=ut+d}for(e+='<th colspan="5" class="month">'+rt+"<\/th>",e+=(!c||c.isAfter(r.lastDay))&&(!this.linkedCalendars||i=="right"||this.singleDatePicker)?'<th class="next available"><i class="fa fa-'+k.right+" glyphicon glyphicon-"+k.right+'"><\/i><\/th>':"<th><\/th>",e+="<\/tr>",e+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(e+='<th class="week">'+this.locale.weekLabel+"<\/th>"),t.each(this.locale.daysOfWeek,function(n,t){e+="<th>"+t+"<\/th>"}),e+="<\/tr>",e+="<\/thead>",e+="<tbody>",this.endDate==null&&this.dateLimit&&(ft=this.startDate.clone().add(this.dateLimit).endOf("day"),(!c||ft.isBefore(c))&&(c=ft)),f=0;f<6;f++){for(e+="<tr>",this.showWeekNumbers?e+='<td class="week">'+r[f][0].week()+"<\/td>":this.showISOWeekNumbers&&(e+='<td class="week">'+r[f][0].isoWeek()+"<\/td>"),u=0;u<7;u++){for(o=[],r[f][u].isSame(new Date,"day")&&o.push("today"),r[f][u].isoWeekday()>5&&o.push("weekend"),r[f][u].month()!=r[1][1].month()&&o.push("off"),this.minDate&&r[f][u].isBefore(this.minDate,"day")&&o.push("off","disabled"),c&&r[f][u].isAfter(c,"day")&&o.push("off","disabled"),this.isInvalidDate(r[f][u])&&o.push("off","disabled"),r[f][u].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&o.push("active","start-date"),this.endDate!=null&&r[f][u].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&o.push("active","end-date"),this.endDate!=null&&r[f][u]>this.startDate&&r[f][u]<this.endDate&&o.push("in-range"),w=this.isCustomDate(r[f][u]),w!==!1&&(typeof w=="string"?o.push(w):Array.prototype.push.apply(o,w)),g="",et=!1,s=0;s<o.length;s++)g+=o[s]+" ",o[s]=="disabled"&&(et=!0);et||(g+="available");e+='<td class="'+g.replace(/^\s+|\s+$/g,"")+'" data-title="r'+f+"c"+u+'">'+r[f][u].date()+"<\/td>"}e+="<\/tr>"}e+="<\/tbody>";e+="<\/table>";this.container.find(".calendar."+i+" .calendar-table").html(e)},renderTimePicker:function(n){var u,i,e,f,h,v,y,p,c,o,r,t,l,a;if(n!="right"||this.endDate){for(f=this.maxDate,this.dateLimit&&(!this.maxDate||this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate))&&(f=this.startDate.clone().add(this.dateLimit)),n=="left"?(i=this.startDate.clone(),e=this.minDate):n=="right"&&(i=this.endDate.clone(),e=this.startDate,h=this.container.find(".calendar.right .calendar-time div"),h.html()!=""&&(i.hour(h.find(".hourselect option:selected").val()||i.hour()),i.minute(h.find(".minuteselect option:selected").val()||i.minute()),i.second(h.find(".secondselect option:selected").val()||i.second()),this.timePicker24Hour||(v=h.find(".ampmselect option:selected").val(),v==="PM"&&i.hour()<12&&i.hour(i.hour()+12),v==="AM"&&i.hour()===12&&i.hour(0))),i.isBefore(this.startDate)&&(i=this.startDate.clone()),f&&i.isAfter(f)&&(i=f.clone())),u='<select class="hourselect">',y=this.timePicker24Hour?0:1,p=this.timePicker24Hour?23:12,t=y;t<=p;t++)c=t,this.timePicker24Hour||(c=i.hour()>=12?t==12?12:t+12:t==12?0:t),o=i.clone().hour(c),r=!1,e&&o.minute(59).isBefore(e)&&(r=!0),f&&o.minute(0).isAfter(f)&&(r=!0),u+=c!=i.hour()||r?r?'<option value="'+t+'" disabled="disabled" class="disabled">'+t+"<\/option>":'<option value="'+t+'">'+t+"<\/option>":'<option value="'+t+'" selected="selected">'+t+"<\/option>";for(u+="<\/select> ",u+=': <select class="minuteselect">',t=0;t<60;t+=this.timePickerIncrement){var s=t<10?"0"+t:t,o=i.clone().minute(t),r=!1;e&&o.second(59).isBefore(e)&&(r=!0);f&&o.second(0).isAfter(f)&&(r=!0);u+=i.minute()!=t||r?r?'<option value="'+t+'" disabled="disabled" class="disabled">'+s+"<\/option>":'<option value="'+t+'">'+s+"<\/option>":'<option value="'+t+'" selected="selected">'+s+"<\/option>"}if(u+="<\/select> ",this.timePickerSeconds){for(u+=': <select class="secondselect">',t=0;t<60;t++){var s=t<10?"0"+t:t,o=i.clone().second(t),r=!1;e&&o.isBefore(e)&&(r=!0);f&&o.isAfter(f)&&(r=!0);u+=i.second()!=t||r?r?'<option value="'+t+'" disabled="disabled" class="disabled">'+s+"<\/option>":'<option value="'+t+'">'+s+"<\/option>":'<option value="'+t+'" selected="selected">'+s+"<\/option>"}u+="<\/select> "}this.timePicker24Hour||(u+='<select class="ampmselect">',l="",a="",e&&i.clone().hour(12).minute(0).second(0).isBefore(e)&&(l=' disabled="disabled" class="disabled"'),f&&i.clone().hour(0).minute(0).second(0).isAfter(f)&&(a=' disabled="disabled" class="disabled"'),u+=i.hour()>=12?'<option value="AM"'+l+'>AM<\/option><option value="PM" selected="selected"'+a+">PM<\/option>":'<option value="AM" selected="selected"'+l+'>AM<\/option><option value="PM"'+a+">PM<\/option>",u+="<\/select>");this.container.find(".calendar."+n+" .calendar-time div").html(u)}},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").is(":focus")||this.container.find("input[name=daterangepicker_end]").is(":focus")||(this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.locale.format)),this.endDate&&this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.locale.format)),this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled"))},move:function(){var n={top:0,left:0},i,r=t(window).width();this.parentEl.is("body")||(n={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},r=this.parentEl[0].clientWidth+this.parentEl.offset().left);i=this.drops=="up"?this.element.offset().top-this.container.outerHeight()-n.top:this.element.offset().top+this.element.outerHeight()-n.top;this.container[this.drops=="up"?"addClass":"removeClass"]("dropup");this.opens=="left"?(this.container.css({top:i,right:r-this.element.offset().left-this.element.outerWidth(),left:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):this.opens=="center"?(this.container.css({top:i,left:this.element.offset().left-n.left+this.element.outerWidth()/2-this.container.outerWidth()/2,right:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:i,left:this.element.offset().left-n.left,right:"auto"}),this.container.offset().left+this.container.outerWidth()>t(window).width()&&this.container.css({left:"auto",right:0}))},show:function(){if(!this.isShowing){this._outsideClickProxy=t.proxy(function(n){this.outsideClick(n)},this);t(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy);t(window).on("resize.daterangepicker",t.proxy(function(n){this.move(n)},this));this.oldStartDate=this.startDate.clone();this.oldEndDate=this.endDate.clone();this.previousRightTime=this.endDate.clone();this.updateView();this.container.show();this.move();this.element.trigger("show.daterangepicker",this);this.isShowing=!0}},hide:function(){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate,this.endDate,this.chosenLabel),this.updateElement(),t(document).off(".daterangepicker"),t(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(){this.isShowing?this.hide():this.show()},outsideClick:function(n){var i=t(n.target);n.type=="focusin"||i.closest(this.element).length||i.closest(this.container).length||i.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar");this.move();this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar");this.element.trigger("hideCalendar.daterangepicker",this)},hoverRange:function(n){var t,i;this.container.find("input[name=daterangepicker_start]").is(":focus")||this.container.find("input[name=daterangepicker_end]").is(":focus")||(t=n.target.getAttribute("data-range-key"),t==this.locale.customRangeLabel?this.updateView():(i=this.ranges[t],this.container.find("input[name=daterangepicker_start]").val(i[0].format(this.locale.format)),this.container.find("input[name=daterangepicker_end]").val(i[1].format(this.locale.format))))},clickRange:function(n){var t=n.target.getAttribute("data-range-key"),i;this.chosenLabel=t;t==this.locale.customRangeLabel?this.showCalendars():(i=this.ranges[t],this.startDate=i[0],this.endDate=i[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply())},clickPrev:function(n){var i=t(n.target).parents(".calendar");i.hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month");this.updateCalendars()},clickNext:function(n){var i=t(n.target).parents(".calendar");i.hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month"));this.updateCalendars()},hoverDate:function(n){if(t(n.target).hasClass("available")){var r=t(n.target).attr("data-title"),u=r.substr(1,1),f=r.substr(3,1),e=t(n.target).parents(".calendar"),i=e.hasClass("left")?this.leftCalendar.calendar[u][f]:this.rightCalendar.calendar[u][f];this.endDate&&!this.container.find("input[name=daterangepicker_start]").is(":focus")?this.container.find("input[name=daterangepicker_start]").val(i.format(this.locale.format)):this.endDate||this.container.find("input[name=daterangepicker_end]").is(":focus")||this.container.find("input[name=daterangepicker_end]").val(i.format(this.locale.format));var o=this.leftCalendar,s=this.rightCalendar,h=this.startDate;this.endDate||this.container.find(".calendar tbody td").each(function(n,r){if(!t(r).hasClass("week")){var f=t(r).attr("data-title"),e=f.substr(1,1),c=f.substr(3,1),l=t(r).parents(".calendar"),u=l.hasClass("left")?o.calendar[e][c]:s.calendar[e][c];u.isAfter(h)&&u.isBefore(i)||u.isSame(i,"day")?t(r).addClass("in-range"):t(r).removeClass("in-range")}})}},clickDate:function(n){var i,u,f,e;if(t(n.target).hasClass("available")){var o=t(n.target).attr("data-title"),s=o.substr(1,1),h=o.substr(3,1),c=t(n.target).parents(".calendar"),r=c.hasClass("left")?this.leftCalendar.calendar[s][h]:this.rightCalendar.calendar[s][h];this.endDate||r.isBefore(this.startDate,"day")?(this.timePicker&&(i=parseInt(this.container.find(".left .hourselect").val(),10),this.timePicker24Hour||(u=this.container.find(".left .ampmselect").val(),u==="PM"&&i<12&&(i+=12),u==="AM"&&i===12&&(i=0)),f=parseInt(this.container.find(".left .minuteselect").val(),10),e=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,r=r.clone().hour(i).minute(f).second(e)),this.endDate=null,this.setStartDate(r.clone())):!this.endDate&&r.isBefore(this.startDate)?this.setEndDate(this.startDate.clone()):(this.timePicker&&(i=parseInt(this.container.find(".right .hourselect").val(),10),this.timePicker24Hour||(u=this.container.find(".right .ampmselect").val(),u==="PM"&&i<12&&(i+=12),u==="AM"&&i===12&&(i=0)),f=parseInt(this.container.find(".right .minuteselect").val(),10),e=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,r=r.clone().hour(i).minute(f).second(e)),this.setEndDate(r.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply()));this.singleDatePicker&&(this.setEndDate(this.startDate),this.timePicker||this.clickApply());this.updateView();n.stopPropagation()}},calculateChosenLabel:function(){var t=!0,i=0,n;for(n in this.ranges){if(this.timePicker){if(this.startDate.isSame(this.ranges[n][0])&&this.endDate.isSame(this.ranges[n][1])){t=!1;this.chosenLabel=this.container.find(".ranges li:eq("+i+")").addClass("active").html();break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[n][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[n][1].format("YYYY-MM-DD")){t=!1;this.chosenLabel=this.container.find(".ranges li:eq("+i+")").addClass("active").html();break}i++}t&&(this.chosenLabel=this.showCustomRangeLabel?this.container.find(".ranges li:last").addClass("active").html():null,this.showCalendars())},clickApply:function(){this.hide();this.element.trigger("apply.daterangepicker",this)},clickCancel:function(){this.startDate=this.oldStartDate;this.endDate=this.oldEndDate;this.hide();this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(n){var u=t(n.target).closest(".calendar").hasClass("left"),e=u?"left":"right",f=this.container.find(".calendar."+e),r=parseInt(f.find(".monthselect").val(),10),i=f.find(".yearselect").val();u||(i<this.startDate.year()||i==this.startDate.year()&&r<this.startDate.month())&&(r=this.startDate.month(),i=this.startDate.year());this.minDate&&(i<this.minDate.year()||i==this.minDate.year()&&r<this.minDate.month())&&(r=this.minDate.month(),i=this.minDate.year());this.maxDate&&(i>this.maxDate.year()||i==this.maxDate.year()&&r>this.maxDate.month())&&(r=this.maxDate.month(),i=this.maxDate.year());u?(this.leftCalendar.month.month(r).year(i),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(r).year(i),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month")));this.updateCalendars()},timeChanged:function(n){var u=t(n.target).closest(".calendar"),h=u.hasClass("left"),r=parseInt(u.find(".hourselect").val(),10),o=parseInt(u.find(".minuteselect").val(),10),s=this.timePickerSeconds?parseInt(u.find(".secondselect").val(),10):0,e,i,f;this.timePicker24Hour||(e=u.find(".ampmselect").val(),e==="PM"&&r<12&&(r+=12),e==="AM"&&r===12&&(r=0));h?(i=this.startDate.clone(),i.hour(r),i.minute(o),i.second(s),this.setStartDate(i),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==i.format("YYYY-MM-DD")&&this.endDate.isBefore(i)&&this.setEndDate(i.clone())):this.endDate&&(f=this.endDate.clone(),f.hour(r),f.minute(o),f.second(s),this.setEndDate(f));this.updateCalendars();this.updateFormInputs();this.renderTimePicker("left");this.renderTimePicker("right")},formInputsChanged:function(i){var f=t(i.target).closest(".calendar").hasClass("right"),r=n(this.container.find('input[name="daterangepicker_start"]').val(),this.locale.format),u=n(this.container.find('input[name="daterangepicker_end"]').val(),this.locale.format);r.isValid()&&u.isValid()&&(f&&u.isBefore(r)&&(r=u.clone()),this.setStartDate(r),this.setEndDate(u),f?this.container.find('input[name="daterangepicker_start"]').val(this.startDate.format(this.locale.format)):this.container.find('input[name="daterangepicker_end"]').val(this.endDate.format(this.locale.format)));this.updateView()},formInputsFocused:function(n){this.container.find('input[name="daterangepicker_start"], input[name="daterangepicker_end"]').removeClass("active");t(n.target).addClass("active");var i=t(n.target).closest(".calendar").hasClass("right");i&&(this.endDate=null,this.setStartDate(this.startDate.clone()),this.updateView())},formInputsBlurred:function(){if(!this.endDate){var i=this.container.find('input[name="daterangepicker_end"]').val(),t=n(i,this.locale.format);t.isValid()&&(this.setEndDate(t),this.updateView())}},elementChanged:function(){if(this.element.is("input")&&this.element.val().length&&!(this.element.val().length<this.locale.format.length)){var r=this.element.val().split(this.locale.separator),t=null,i=null;(r.length===2&&(t=n(r[0],this.locale.format),i=n(r[1],this.locale.format)),(this.singleDatePicker||t===null||i===null)&&(t=n(this.element.val(),this.locale.format),i=t),t.isValid()&&i.isValid())&&(this.setStartDate(t),this.setEndDate(i),this.updateView())}},keydown:function(n){(n.keyCode===9||n.keyCode===13)&&this.hide()},updateElement:function(){this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))},remove:function(){this.container.remove();this.element.off(".daterangepicker");this.element.removeData()}},t.fn.daterangepicker=function(n,r){return this.each(function(){var u=t(this);u.data("daterangepicker")&&u.data("daterangepicker").remove();u.data("daterangepicker",new i(u,n,r))}),this},i}),function(n){n.fn.quickPagination=function(t){var t=n.extend({pageSize:10,currentPage:1,holder:null,pagerLocation:"after"},t);return this.each(function(){var r=n(this),f=1,u;if(r.wrap("<div class='col-xs-12 col-sm-7 col-md-7 col-lg-7 vthumb simplePagerContainer'><\/div>"),r.parents(".simplePagerContainer").find("ul.simplePagerNav").remove(),r.children().each(function(i){i<f*t.pageSize&&i>=(f-1)*t.pageSize?n(this).addClass("simplePagerPage"+f):(n(this).addClass("simplePagerPage"+(f+1)),f++)}),r.children().hide(),r.children(".simplePagerPage"+t.currentPage).show(),!(f<=1)){for(u="<ul class='pagination text-center simplePagerNav'>",i=1;i<=f;i++)u+=i==t.currentPage?"<li class='active currentPage simplePageNav"+i+"'><a rel='"+i+"' href='#'>"+i+"<\/a><\/li>":"<li class='simplePageNav"+i+"'><a rel='"+i+"' href='#'>"+i+"<\/a><\/li>";if(u+="<\/ul>",t.holder)n(t.holder).append(u);else switch(t.pagerLocation){case"before":r.before(u);break;case"both":r.before(u);r.after(u);break;default:r.after(u)}r.parent().find(".simplePagerNav a").click(function(){var i=n(this).attr("rel");return t.currentPage=i,t.holder?(n(this).parent("li").parent("ul").parent(t.holder).find("li.currentPage").removeClass("currentPage"),n(this).parent("li").parent("ul").parent(t.holder).find("a[rel='"+i+"']").parent("li").addClass("currentPage"),n(this).parent("li").parent("ul").parent(t.holder).find("li.active").removeClass("active"),n(this).parent("li").parent("ul").parent(t.holder).find("a[rel='"+i+"']").parent("li").addClass("active")):(n(this).parent("li").parent("ul").parent(".simplePagerContainer").find("li.currentPage").removeClass("currentPage"),n(this).parent("li").parent("ul").parent(".simplePagerContainer").find("a[rel='"+i+"']").parent("li").addClass("currentPage"),n(this).parent("li").parent("ul").parent(".simplePagerContainer").find("li.active").removeClass("active"),n(this).parent("li").parent("ul").parent(".simplePagerContainer").find("a[rel='"+i+"']").parent("li").addClass("active")),r.children().hide(),r.find(".simplePagerPage"+i).show(),!1})}})}}(jQuery);$.fn.hasAttr=function(){return typeof this.attr!="undefined"&&this.attr!==!1};PreChat=function(){};PreChat.blurb=function(n,t,i){$("#livechat-compact-view").contents().find(".icon-agentonline").parents("#operator_avatar").length==1&&$('<div class="invitation_message-badge"><div id="floating_alert" class="alert alert-'+t+' fade in" onclick="badgeclick();">'+n+"&nbsp;&nbsp;<\/div><\/div>").appendTo("body");setTimeout(function(){i>0&&$(".alert").alert("close")},i)};experimentURL="";divolte_session_ids="";var pages=0,pageno=1,scroll=!1;var oBooking,aSpecials,sPreviousSpecials="none",bFirstLoad=!0,specials="",version="",StandardPackageParameter="",AllInclusivePackageParameter="";var winH=$(window).height(),winW=$(window).width(),browserie=!1;$(document).ready(function(){if(Calculator_Init(),footerFix(),DriveNowChat(),Verisign(),$("body").attr("id"))switch($("body").attr("id")){case"body_home_index":Home_Index_Init();break;case"body_depot_operator":case"body_depot_operatorspecials":case"body_depot_landingtest":Depot_Operator_Init();break;case"body_search_index":case"body_search2_index":case"body_search3_index":case"body_search4_index":case"body_search5_index":case"body_search6_index":Search_Init();CheckAvailability_Init();break;case"body_quote_pricedetails":case"body_quote_extrasandspecials":case"body_quote_pricedetails_singlepage":PriceDetails_Init();CheckAvailability_Init();break;case"body_quote_pricedetailssearch3":PriceDetails_Init();CheckAvailability_Init();break;case"body_quote_availability":case"body_quote_availabilitymobile":case"body_quote_availability3":case"body_quote_availabilitymobile3":case"body_quote_availabilitymobilesearch3":CheckAvailability_Init();break;case"body_vehicle_index":case"body_vehicle_specs":VehicleDetails_Init();CheckAvailability_Init();break;case"body_vehicle_index2":VehicleDetails_Init();CheckAvailability_Init();break;case"body_quote_pricedetails2":case"body_quote_onlinebooknow":PriceDetails_Init();CheckAvailability_Init_AB()}$.support.leadingWhitespace||$("select.wide").bind("focus mouseover",function(){$(this).addClass("expand").removeClass("clicked")}).bind("click",function(){$(this).toggleClass("clicked")}).bind("mouseout",function(){$(this).hasClass("clicked")||$(this).removeClass("expand")}).bind("blur",function(){$(this).removeClass("expand clicked")});$(".jsCheckAvailability:not(.v-tile)").on("click",function(){CheckAvailabilityQuote($(this).attr("data-href"),$(this).attr("data-title"))});$(".jsBookNow").on("click",function(){$(this).hasClass("jsLink")?location.href=$(this).attr("data-href"):BookNowQuote($(this).attr("data-href"),$(this).attr("data-title"))})})