function showProgress(){spinnerVisible||($("div#spinner").fadeIn("fast"),spinnerVisible=!0)}function hideProgress(){if(spinnerVisible){var n=$("div#spinner");n.stop();n.fadeOut("fast");spinnerVisible=!1}}function switchCountry(){createCookie("changeculture",1)}function createCookie(n,t,i){var r,u;i?(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toGMTString()):u="";document.cookie=n+"="+t+u+"; path=/"}function readCookie(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,t.length);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return""}function eraseCookie(n){createCookie(n,"",-1)}function post(n,t,i){var r,f,u;i=i||"post";r=document.createElement("form");r.setAttribute("method",i);r.setAttribute("action",n);for(f in t)t.hasOwnProperty(f)&&(u=document.createElement("input"),u.setAttribute("type","hidden"),u.setAttribute("name",f),u.setAttribute("value",t[f]),r.appendChild(u));document.body.appendChild(r);r.submit()}function setupDepartReturnDatePicker(n,t){n.datepicker({language:readCookie(_lang).split("-")[0]}).on("changeDate",function(n){var i=new Date(n.date.valueOf());i.setDate(i.getDate()+1);t.datepicker("setStartDate",i);t.datepicker("setDate",i)}).on("clearDate",function(){t.datepicker("setStartDate",null)})}function Utils(){}function OnlyNumeric(n){if(n.which<48||n.which>57)return n.which==8||n.which==46||n.which==0?!0:!1}function ArticleIsmobileExpandCollapse(){$("button#read-more").show();$("#more-seo-content").addClass("collapse").removeClass("in");$("#more-seo-content").css("height","0px")}function ArticleIsdesktopExpandCollapse(){$("button#read-more").hide();$("#more-seo-content").addClass("in").removeClass("collapse");$("#more-seo-content").css("height","auto")}function ExpandAndCollapse(){$("button i").hasClass("fa-angle-up")&&$("#read-more").html(JsCommonMsg.SeoArticleShowMore+' <i class="fa fa-angle-down"><\/i>')}function FormatValue(n){return typeof n=="undefined"?"":n}function getUrlParameter(n){for(var u=window.location.search.substring(1),r=u.split("&"),t,i=0;i<r.length;i++)if(t=r[i].split("="),t[0]===n)return t[1]===undefined?!0:decodeURIComponent(t[1])}function debounce(n,t,i){var r;return function(){var u=this,f=arguments,e=function(){r=null;i||n.apply(u,f)},o=i&&!r;clearTimeout(r);r=setTimeout(e,t);o&&n.apply(u,f)}}function getCookie(){for(var i="gaCountry",r=document.cookie.split(";"),n,t=0;t<r.length;t++){for(n=r[t];n.charAt(0)==" ";)n=n.substring(1);if(n.indexOf(i)==0)return n.substring(i.length,n.length)}return""}function scrollToTop(){verticalOffset=typeof verticalOffset!="undefined"?verticalOffset:0;element=$("body");offset=element.offset();offsetTop=offset.top;$("html, body").animate({scrollTop:offsetTop},500,"linear")}function getCookie(){for(var i="gaCountry",r=document.cookie.split(";"),n,t=0;t<r.length;t++){for(n=r[t];n.charAt(0)==" ";)n=n.substring(1);if(n.indexOf(i)==0)return n.substring(i.length,n.length)}return""}function getQueryStringValueByName(n){n=n.replace(/[\[\]]/g,"\\$&");var i=window.location.href,r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),t=r.exec(i);return t?t[2]?decodeURIComponent(t[2].replace(/\+/g," ")):"":null}function bemobSetCookie(n,t,i){var r=new Date,u;r.setTime(r.getTime()+i*864e5);u="expires="+r.toUTCString();document.cookie=n+"="+t+";"+u+";path=/"}function bemobGetCookie(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 bemobDeleteCookie(n){bemobGetCookie(n)!=""&&(document.cookie=n+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/")}function makeItConfetti(){var t=document.querySelectorAll(".confetti"),n,i,u,r,f;if(!t.length||!t[0].animate)return!1;for(n=0,i=t.length;n<i;++n)u=t[n],u.innerHTML='<div class="rotate"><div class="askew"><\/div><\/div>',r=Math.random()*.8+.2,f=u.animate([{transform:"translate3d("+n/i*100+"vw,0,0) scale("+r+")",opacity:r},{transform:"translate3d("+(n/i*100+10)+"vw,100vh,0) scale("+r+")",opacity:1}],{duration:Math.random()*3e3+3e3,iterations:Infinity,delay:-(Math.random()*5e3)}),confettiPlayers.push(f)}var _currency,_lang,spinnerVisible,gaCode,x,cookieresult,url,gtrack,bemob,confettiPlayers;!function(n,t){function nt(t){var i=e(),g=i.querySelector("h2"),p=i.querySelector("p"),s=i.querySelector("button.cancel"),o=i.querySelector("button.confirm"),b,l,u,f,k,d,v,y,nt;if(g.innerHTML=h(t.title).split("\n").join("<br>"),p.innerHTML=h(t.text||"").split("\n").join("<br>"),t.text&&c(p),a(i.querySelectorAll(".icon")),t.type){for(b=!1,l=0;l<w.length;l++)if(t.type===w[l]){b=!0;break}if(!b)return n.console.error("Unknown alert type: "+t.type),!1;u=i.querySelector(".icon."+t.type);switch(c(u),t.type){case"success":r(u,"animate");r(u.querySelector(".tip"),"animateSuccessTip");r(u.querySelector(".long"),"animateSuccessLong");break;case"error":r(u,"animateErrorIcon");r(u.querySelector(".x-mark"),"animateXMark");break;case"warning":r(u,"pulseWarning");r(u.querySelector(".body"),"pulseWarningIns");r(u.querySelector(".dot"),"pulseWarningIns")}}t.imageUrl&&(f=i.querySelector(".icon.custom"),f.style.backgroundImage="url("+t.imageUrl+")",c(f),k=80,d=80,t.imageSize&&(v=t.imageSize.split("x")[0],y=t.imageSize.split("x")[1],v&&y?(k=v,d=y,f.css({width:v+"px",height:y+"px"})):n.console.error("Parameter imageSize expects value with format WIDTHxHEIGHT, got "+t.imageSize)),f.setAttribute("style",f.getAttribute("style")+"width:"+k+"px; height:"+d+"px"));i.setAttribute("data-has-cancel-button",t.showCancelButton);t.showCancelButton?s.style.display="inline-block":a(s);i.setAttribute("data-has-confirm-button",t.showConfirmButton);t.showConfirmButton?o.style.display="inline-block":a(o);t.cancelButtonText&&(s.innerHTML=h(t.cancelButtonText));t.confirmButtonText&&(o.innerHTML=h(t.confirmButtonText));o.className="confirm btn btn-lg";r(i,t.containerClass);r(o,t.confirmButtonClass);r(s,t.cancelButtonClass);r(g,t.titleClass);r(p,t.textClass);i.setAttribute("data-allow-ouside-click",t.allowOutsideClick);nt=t.doneFunction?!0:!1;i.setAttribute("data-has-done-function",nt);i.setAttribute("data-timer",t.timer)}function v(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n}function tt(){var n=e(),o,i;ot(b(),10);c(n);r(n,"showSweetAlert");u(n,"hideSweetAlert");l=t.activeElement;o=n.querySelector("button.confirm");o.focus();setTimeout(function(){r(n,"visible")},500);i=n.getAttribute("data-timer");"null"!==i&&""!==i&&setTimeout(function(){f()},i)}function f(){var i=e(),f,h,s;g(b(),5);g(i,5);u(i,"showSweetAlert");r(i,"hideSweetAlert");u(i,"visible");f=i.querySelector(".icon.success");u(f,"animate");u(f.querySelector(".tip"),"animateSuccessTip");u(f.querySelector(".long"),"animateSuccessLong");h=i.querySelector(".icon.error");u(h,"animateErrorIcon");u(h.querySelector(".x-mark"),"animateXMark");s=i.querySelector(".icon.warning");u(s,"pulseWarning");u(s.querySelector(".body"),"pulseWarningIns");u(s.querySelector(".dot"),"pulseWarningIns");n.onkeydown=p;t.onclick=y;l&&l.focus();o=void 0}function it(){var n=e();n.style.marginTop=et(e())}var l,y,p,o,rt=".sweet-alert",ut=".sweet-overlay",w=["error","warning","info","success"],i={title:"",text:"",type:null,allowOutsideClick:!1,showCancelButton:!1,showConfirmButton:!0,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonClass:"btn-primary",cancelButtonText:"Cancel",cancelButtonClass:"btn-default",containerClass:"",titleClass:"",textClass:"",imageUrl:null,imageSize:null,timer:null},e=function(){return t.querySelector(rt)},b=function(){return t.querySelector(ut)},s=function(n,t){return new RegExp(" "+t+" ").test(" "+n.className+" ")},r=function(n,t){t&&!s(n,t)&&(n.className+=" "+t)},u=function(n,t){var i=" "+n.className.replace(/[\t\r\n]/g," ")+" ";if(s(n,t)){for(;i.indexOf(" "+t+" ")>=0;)i=i.replace(" "+t+" "," ");n.className=i.replace(/^\s+|\s+$/g,"")}},h=function(n){var i=t.createElement("div");return i.appendChild(t.createTextNode(n)),i.innerHTML},k=function(n){n.style.opacity="";n.style.display="block"},c=function(n){if(n&&!n.length)return k(n);for(var t=0;t<n.length;++t)k(n[t])},d=function(n){n.style.opacity="";n.style.display="none"},a=function(n){if(n&&!n.length)return d(n);for(var t=0;t<n.length;++t)d(n[t])},ft=function(n,t){for(var i=t.parentNode;null!==i;){if(i===n)return!0;i=i.parentNode}return!1},et=function(n){n.style.left="-9999px";n.style.display="block";var t=n.clientHeight,i=parseInt(getComputedStyle(n).getPropertyValue("padding"),10);return n.style.left="",n.style.display="none","-"+parseInt(t/2+i)+"px"},ot=function(n,t){if(+n.style.opacity<1){t=t||16;n.style.opacity=0;n.style.display="block";var i=+new Date,r=function(){n.style.opacity=+n.style.opacity+(new Date-i)/100;i=+new Date;+n.style.opacity<1&&setTimeout(r,t)};r()}},g=function(n,t){t=t||16;n.style.opacity=1;var i=+new Date,r=function(){n.style.opacity=+n.style.opacity-(new Date-i)/100;i=+new Date;+n.style.opacity>0?setTimeout(r,t):n.style.display="none"};r()},st=function(i){var u,r;MouseEvent?(u=new MouseEvent("click",{view:n,bubbles:!1,cancelable:!0}),i.dispatchEvent(u)):t.createEvent?(r=t.createEvent("MouseEvents"),r.initEvent("click",!1,!1),i.dispatchEvent(r)):t.createEventObject?i.fireEvent("onclick"):"function"==typeof i.onclick&&i.onclick()},ht=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):n.event&&n.event.hasOwnProperty("cancelBubble")&&(n.event.cancelBubble=!0)};n.sweetAlertInitialize=function(){var n=t.createElement("div");n.innerHTML='<div class="sweet-overlay" tabIndex="-1"><\/div><div class="sweet-alert" tabIndex="-1"><div class="icon error"><span class="x-mark"><span class="line left"><\/span><span class="line right"><\/span><\/span><\/div><div class="icon warning"> <span class="body"><\/span> <span class="dot"><\/span> <\/div> <div class="icon info"><\/div> <div class="icon success"> <span class="line tip"><\/span> <span class="line long"><\/span> <div class="placeholder"><\/div> <div class="fix"><\/div> <\/div> <div class="icon custom"><\/div> <h2>Title<\/h2><p class="lead text-muted">Text<\/p><p><button class="cancel btn btn-lg" tabIndex="2">Cancel<\/button> <button class="confirm btn btn-lg" tabIndex="1">OK<\/button><\/p><\/div>';t.body.appendChild(n)};n.sweetAlert=n.swal=function(){function k(n){var i=n.keyCode||n.which;if(-1!==[9,13,32,27].indexOf(i)){for(var t=n.target||n.srcElement,r=-1,u=0;u<h.length;u++)if(t===h[u]){r=u;break}9===i?(t=-1===r?a:r===h.length-1?h[0]:h[r+1],ht(n),t.focus()):(t=13===i||32===i?-1===r?a:void 0:27!==i||c.hidden||"none"===c.style.display?void 0:c,void 0!==t&&st(t,n))}}function w(n){var r=n.target||n.srcElement,f=n.relatedTarget,e=s(u,"visible"),i,t;if(e)if(i=-1,null!==f){for(t=0;t<h.length;t++)if(f===h[t]){i=t;break}-1===i&&r.focus()}else o=r}var r;if(void 0===arguments[0])return n.console.error("sweetAlert expects at least 1 attribute!"),!1;r=v({},i);switch(typeof arguments[0]){case"string":r.title=arguments[0];r.text=arguments[1]||"";r.type=arguments[2]||"";break;case"object":if(void 0===arguments[0].title)return n.console.error('Missing "title" argument!'),!1;r.title=arguments[0].title;r.text=arguments[0].text||i.text;r.type=arguments[0].type||i.type;r.allowOutsideClick=arguments[0].allowOutsideClick||i.allowOutsideClick;r.showCancelButton=void 0!==arguments[0].showCancelButton?arguments[0].showCancelButton:i.showCancelButton;r.showConfirmButton=void 0!==arguments[0].showConfirmButton?arguments[0].showConfirmButton:i.showConfirmButton;r.closeOnConfirm=void 0!==arguments[0].closeOnConfirm?arguments[0].closeOnConfirm:i.closeOnConfirm;r.closeOnCancel=void 0!==arguments[0].closeOnCancel?arguments[0].closeOnCancel:i.closeOnCancel;r.timer=arguments[0].timer||i.timer;r.confirmButtonText=i.showCancelButton?"Confirm":i.confirmButtonText;r.confirmButtonText=arguments[0].confirmButtonText||i.confirmButtonText;r.confirmButtonClass=arguments[0].confirmButtonClass||(arguments[0].type?"btn-"+arguments[0].type:null)||i.confirmButtonClass;r.cancelButtonText=arguments[0].cancelButtonText||i.cancelButtonText;r.cancelButtonClass=arguments[0].cancelButtonClass||i.cancelButtonClass;r.containerClass=arguments[0].containerClass||i.containerClass;r.titleClass=arguments[0].titleClass||i.titleClass;r.textClass=arguments[0].textClass||i.textClass;r.imageUrl=arguments[0].imageUrl||i.imageUrl;r.imageSize=arguments[0].imageSize||i.imageSize;r.doneFunction=arguments[1]||null;break;default:return n.console.error('Unexpected type of argument! Expected "string" or "object", got '+typeof arguments[0]),!1}nt(r);it();tt();for(var u=e(),d=function(n){var h=n.target||n.srcElement,c=h.className.indexOf("confirm")>-1,i=s(u,"visible"),e=r.doneFunction&&"true"===u.getAttribute("data-has-done-function"),t,o;switch(n.type){case"click":c&&e&&i?(r.doneFunction(!0),r.closeOnConfirm&&f()):e&&i?(t=String(r.doneFunction).replace(/\s/g,""),o="function("===t.substring(0,9)&&")"!==t.substring(9,10),o&&r.doneFunction(!1),r.closeOnCancel&&f()):f()}},b=u.querySelectorAll("button"),l=0;l<b.length;l++)b[l].onclick=d;y=t.onclick;t.onclick=function(n){var t=n.target||n.srcElement,i=u===t,r=ft(u,n.target),e=s(u,"visible"),o="true"===u.getAttribute("data-allow-ouside-click");!i&&!r&&e&&o&&f()};var a=u.querySelector("button.confirm"),c=u.querySelector("button.cancel"),h=u.querySelectorAll("button:not([type=hidden])");p=n.onkeydown;n.onkeydown=k;a.onblur=w;c.onblur=w;n.onfocus=function(){n.setTimeout(function(){void 0!==o&&(o.focus(),o=void 0)},0)}};n.swal.setDefaults=function(n){if(!n)throw new Error("userParams is required");if("object"!=typeof n)throw new Error("userParams has to be a object");v(i,n)};n.swal.close=function(){f()},function(){"complete"===t.readyState||"interactive"===t.readyState&&t.body?sweetAlertInitialize():t.addEventListener?t.addEventListener("DOMContentLoaded",function n(){t.removeEventListener("DOMContentLoaded",n,!1);sweetAlertInitialize()},!1):t.attachEvent&&t.attachEvent("onreadystatechange",function i(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",i),sweetAlertInitialize())})}()}(window,document),function(n,t){typeof define=="function"&&define.amd?define("bloodhound",["jquery"],function(i){return n.Bloodhound=t(i)}):typeof exports=="object"?module.exports=t(require("jquery")):n.Bloodhound=t(jQuery)}(this,function(n){var t=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(n){return!n||/^\s*$/.test(n)},escapeRegExChars:function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(n){return typeof n=="string"},isNumber:function(n){return typeof n=="number"},isArray:n.isArray,isFunction:n.isFunction,isObject:n.isPlainObject,isUndefined:function(n){return typeof n=="undefined"},isElement:function(n){return!!(n&&n.nodeType===1)},isJQuery:function(t){return t instanceof n},toStr:function(n){return t.isUndefined(n)||n===null?"":n+""},bind:n.proxy,each:function(t,i){function r(n,t){return i(t,n)}n.each(t,r)},map:n.map,filter:n.grep,every:function(t,i){var r=!0;return t?(n.each(t,function(n,u){if(!(r=i.call(null,u,n,t)))return!1}),!!r):r},some:function(t,i){var r=!1;return t?(n.each(t,function(n,u){if(r=i.call(null,u,n,t))return!1}),!!r):r},mixin:n.extend,identity:function(n){return n},clone:function(t){return n.extend(!0,{},t)},getIdGenerator:function(){var n=0;return function(){return n++}},templatify:function(t){function i(){return String(t)}return n.isFunction(t)?t:i},defer:function(n){setTimeout(n,0)},debounce:function(n,t,i){var r,u;return function(){var f=this,e=arguments,o,s;return o=function(){r=null;i||(u=n.apply(f,e))},s=i&&!r,clearTimeout(r),r=setTimeout(o,t),s&&(u=n.apply(f,e)),u}},throttle:function(n,t){var u,f,i,e,r,o;return r=0,o=function(){r=new Date;i=null;e=n.apply(u,f)},function(){var s=new Date,h=t-(s-r);return u=this,f=arguments,h<=0?(clearTimeout(i),i=null,r=s,e=n.apply(u,f)):i||(i=setTimeout(o,h)),e}},stringify:function(n){return t.isString(n)?n:JSON.stringify(n)},noop:function(){}}}(),u="0.11.1",f=function(){"use strict";function n(n){return n=t.toStr(n),n?n.split(/\s+/):[]}function i(n){return n=t.toStr(n),n?n.split(/\W+/):[]}function r(n){return function(i){return i=t.isArray(i)?i:[].slice.call(arguments,0),function(r){var u=[];return t.each(i,function(i){u=u.concat(n(t.toStr(r[i])))}),u}}}return{nonword:i,whitespace:n,obj:{nonword:r(i),whitespace:r(n)}}}(),i=function(){"use strict";function i(i){this.maxSize=t.isNumber(i)?i:100;this.reset();this.maxSize<=0&&(this.set=this.get=n.noop)}function r(){this.head=this.tail=null}function u(n,t){this.key=n;this.val=t;this.prev=this.next=null}return t.mixin(i.prototype,{set:function(n,t){var r=this.list.tail,i;this.size>=this.maxSize&&(this.list.remove(r),delete this.hash[r.key],this.size--);(i=this.hash[n])?(i.val=t,this.list.moveToFront(i)):(i=new u(n,t),this.list.add(i),this.hash[n]=i,this.size++)},get:function(n){var t=this.hash[n];if(t)return this.list.moveToFront(t),t.val},reset:function(){this.size=0;this.hash={};this.list=new r}}),t.mixin(r.prototype,{add:function(n){this.head&&(n.next=this.head,this.head.prev=n);this.head=n;this.tail=this.tail||n},remove:function(n){n.prev?n.prev.next=n.next:this.head=n.next;n.next?n.next.prev=n.prev:this.tail=n.prev},moveToFront:function(n){this.remove(n);this.add(n)}}),i}(),e=function(){"use strict";function r(n,r){this.prefix=["__",n,"__"].join("");this.ttlKey="__ttl__";this.keyMatcher=new RegExp("^"+t.escapeRegExChars(this.prefix));this.ls=r||i;this.ls||this._noop()}function u(){return(new Date).getTime()}function f(n){return JSON.stringify(t.isUndefined(n)?null:n)}function e(t){return n.parseJSON(t)}function o(n){for(var r,u=[],f=i.length,t=0;t<f;t++)(r=i.key(t)).match(n)&&u.push(r.replace(n,""));return u}var i;try{i=window.localStorage;i.setItem("~~~","!");i.removeItem("~~~")}catch(s){i=null}return t.mixin(r.prototype,{_prefix:function(n){return this.prefix+n},_ttlKey:function(n){return this._prefix(n)+this.ttlKey},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=t.noop},_safeSet:function(n,t){try{this.ls.setItem(n,t)}catch(i){i.name==="QuotaExceededError"&&(this.clear(),this._noop())}},get:function(n){return this.isExpired(n)&&this.remove(n),e(this.ls.getItem(this._prefix(n)))},set:function(n,i,r){return t.isNumber(r)?this._safeSet(this._ttlKey(n),f(u()+r)):this.ls.removeItem(this._ttlKey(n)),this._safeSet(this._prefix(n),f(i))},remove:function(n){return this.ls.removeItem(this._ttlKey(n)),this.ls.removeItem(this._prefix(n)),this},clear:function(){for(var t=o(this.keyMatcher),n=t.length;n--;)this.remove(t[n]);return this},isExpired:function(n){var i=e(this.ls.getItem(this._ttlKey(n)));return t.isNumber(i)&&u()>i?!0:!1}}),r}(),r=function(){"use strict";function r(n){n=n||{};this.cancelled=!1;this.lastReq=null;this._send=n.transport;this._get=n.limiter?n.limiter(this._get):this._get;this._cache=n.cache===!1?new i(0):o}var u=0,f={},e=6,o=new i(10);return r.setMaxPendingRequests=function(n){e=n},r.resetCache=function(){o.reset()},t.mixin(r.prototype,{_fingerprint:function(t){return t=t||{},t.url+t.type+n.param(t.data||{})},_get:function(n,t){function s(n){t(null,n);i._cache.set(r,n)}function h(){t(!0)}function c(){u--;delete f[r];i.onDeckRequestArgs&&(i._get.apply(i,i.onDeckRequestArgs),i.onDeckRequestArgs=null)}var i=this,r,o;(r=this._fingerprint(n),this.cancelled||r!==this.lastReq)||((o=f[r])?o.done(s).fail(h):u<e?(u++,f[r]=this._send(n).done(s).fail(h).always(c)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(i,r){var f,u;r=r||n.noop;i=t.isString(i)?{url:i}:i||{};u=this._fingerprint(i);this.cancelled=!1;this.lastReq=u;(f=this._cache.get(u))?r(null,f):this._get(i,r)},cancel:function(){this.cancelled=!0}}),r}(),o=window.SearchIndex=function(){"use strict";function u(i){i=i||{};i.datumTokenizer&&i.queryTokenizer||n.error("datumTokenizer and queryTokenizer are both required");this.identify=i.identify||t.stringify;this.datumTokenizer=i.datumTokenizer;this.queryTokenizer=i.queryTokenizer;this.reset()}function f(n){return n=t.filter(n,function(n){return!!n}),t.map(n,function(n){return n.toLowerCase()})}function e(){var n={};return n[r]=[],n[i]={},n}function o(n){for(var i={},r=[],t=0,u=n.length;t<u;t++)i[n[t]]||(i[n[t]]=!0,r.push(n[t]));return r}function s(n,t){var i=0,r=0,u=[],f,e;for(n=n.sort(),t=t.sort(),f=n.length,e=t.length;i<f&&r<e;)n[i]<t[r]?i++:n[i]>t[r]?r++:(u.push(n[i]),i++,r++);return u}var i="c",r="i";return t.mixin(u.prototype,{bootstrap:function(n){this.datums=n.datums;this.trie=n.trie},add:function(n){var u=this;n=t.isArray(n)?n:[n];t.each(n,function(n){var o,s;u.datums[o=u.identify(n)]=n;s=f(u.datumTokenizer(n));t.each(s,function(n){for(var f,t=u.trie,s=n.split("");f=s.shift();)t=t[i][f]||(t[i][f]=e()),t[r].push(o)})})},get:function(n){var i=this;return t.map(n,function(n){return i.datums[n]})},search:function(n){var e=this,h,u;return h=f(this.queryTokenizer(n)),t.each(h,function(n){var t,f,h,o;if(u&&u.length===0)return!1;for(t=e.trie,f=n.split("");t&&(h=f.shift());)t=t[i][h];if(t&&f.length===0)o=t[r].slice(0),u=u?s(u,o):o;else return u=[],!1}),u?t.map(o(u),function(n){return e.datums[n]}):[]},all:function(){var n=[],t;for(t in this.datums)n.push(this.datums[t]);return n},reset:function(){this.datums={};this.trie=e()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),u}(),s=function(){"use strict";function i(n){this.url=n.url;this.ttl=n.ttl;this.cache=n.cache;this.prepare=n.prepare;this.transform=n.transform;this.transport=n.transport;this.thumbprint=n.thumbprint;this.storage=new e(n.cacheKey)}var n;return n={data:"data",protocol:"protocol",thumbprint:"thumbprint"},t.mixin(i.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(t){this.cache&&(this.storage.set(n.data,t,this.ttl),this.storage.set(n.protocol,location.protocol,this.ttl),this.storage.set(n.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var t={},i;return this.cache?(t.data=this.storage.get(n.data),t.protocol=this.storage.get(n.protocol),t.thumbprint=this.storage.get(n.thumbprint),i=t.thumbprint!==this.thumbprint||t.protocol!==location.protocol,t.data&&!i?t.data:null):null},fromNetwork:function(n){function r(){n(!0)}function u(t){n(null,i.transform(t))}var i=this,t;n&&(t=this.prepare(this._settings()),this.transport(t).fail(r).done(u))},clear:function(){return this.storage.clear(),this}}),i}(),h=function(){"use strict";function n(n){this.url=n.url;this.prepare=n.prepare;this.transform=n.transform;this.transport=new r({cache:n.cache,limiter:n.limiter,transport:n.transport})}return t.mixin(n.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(n,t){function u(n,i){n?t([]):t(r.transform(i))}var r=this,i;if(t)return n=n||"",i=this.prepare(n,this._settings()),this.transport.get(i,u)},cancelLastRequest:function(){this.transport.cancel()}}),n}(),c=function(){"use strict";function r(r){var f;return r?(f={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:t.identity,transform:t.identity,transport:null},r=t.isString(r)?{url:r}:r,r=t.mixin(f,r),r.url||n.error("prefetch requires url to be set"),r.transform=r.filter||r.transform,r.cacheKey=r.cacheKey||r.url,r.thumbprint=u+r.thumbprint,r.transport=r.transport?i(r.transport):n.ajax,r):null}function f(r){var u;if(r)return u={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:t.identity,transport:null},r=t.isString(r)?{url:r}:r,r=t.mixin(u,r),r.url||n.error("remote requires url to be set"),r.transform=r.filter||r.transform,r.prepare=e(r),r.limiter=o(r),r.transport=r.transport?i(r.transport):n.ajax,delete r.replace,delete r.wildcard,delete r.rateLimitBy,delete r.rateLimitWait,r}function e(n){function u(n,t){return t.url=i(t.url,n),t}function f(n,t){return t.url=t.url.replace(r,encodeURIComponent(n)),t}function e(n,t){return t}var t,i,r;return(t=n.prepare,i=n.replace,r=n.wildcard,t)?t:i?u:n.wildcard?f:e}function o(n){function f(n){return function(i){return t.debounce(i,n)}}function e(n){return function(i){return t.throttle(i,n)}}var i,u,r;return i=n.limiter,u=n.rateLimitBy,r=n.rateLimitWait,i||(i=/^throttle$/i.test(u)?e(r):f(r)),i}function i(i){return function(r){function f(n){t.defer(function(){u.resolve(n)})}function e(n){t.defer(function(){u.reject(n)})}var u=n.Deferred();return i(r,f,e),u}}return function(i){var e,u;return e={initialize:!0,identify:t.stringify,datumTokenizer:null,queryTokenizer:null,sufficient:5,sorter:null,local:[],prefetch:null,remote:null},i=t.mixin(e,i||{}),i.datumTokenizer||n.error("datumTokenizer is required"),i.queryTokenizer||n.error("queryTokenizer is required"),u=i.sorter,i.sorter=u?function(n){return n.sort(u)}:t.identity,i.local=t.isFunction(i.local)?i.local():i.local,i.prefetch=r(i.prefetch),i.remote=f(i.remote),i}}();return function(){"use strict";function i(n){n=c(n);this.sorter=n.sorter;this.identify=n.identify;this.sufficient=n.sufficient;this.local=n.local;this.remote=n.remote?new h(n.remote):null;this.prefetch=n.prefetch?new s(n.prefetch):null;this.index=new o({identify:this.identify,datumTokenizer:n.datumTokenizer,queryTokenizer:n.queryTokenizer});n.initialize!==!1&&this.initialize()}var u;return u=window&&window.Bloodhound,i.noConflict=function(){return window&&(window.Bloodhound=u),i},i.tokenizers=f,t.mixin(i.prototype,{__ttAdapter:function(){function t(t,i,r){return n.search(t,i,r)}function i(t,i){return n.search(t,i)}var n=this;return this.remote?t:i},_loadPrefetch:function(){function u(n,r){if(n)return t.reject();i.add(r);i.prefetch.store(i.index.serialize());t.resolve()}var i=this,t,r;return t=n.Deferred(),this.prefetch?(r=this.prefetch.fromCache())?(this.index.bootstrap(r),t.resolve()):this.prefetch.fromNetwork(u):t.resolve(),t.promise()},_initialize:function(){function t(){n.add(n.local)}var n=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(t),this.initPromise},initialize:function(n){return!this.initPromise||n?this._initialize():this.initPromise},add:function(n){return this.index.add(n),this},get:function(n){return n=t.isArray(n)?n:[].slice.call(arguments),this.index.get(n)},search:function(n,i,r){function e(n){var i=[];t.each(n,function(n){t.some(u,function(t){return f.identify(n)===f.identify(t)})||i.push(n)});r&&r(i)}var f=this,u;return u=this.sorter(this.index.search(n)),i(this.remote?u.slice():u),this.remote&&u.length<this.sufficient?this.remote.get(n,e):this.remote&&this.remote.cancelLastRequest(),this},all:function(){return this.index.all()},clear:function(){return this.index.reset(),this},clearPrefetchCache:function(){return this.prefetch&&this.prefetch.clear(),this},clearRemoteCache:function(){return r.resetCache(),this},ttAdapter:function(){return this.__ttAdapter()}}),i}()}),function(n,t){typeof define=="function"&&define.amd?define("typeahead.js",["jquery"],function(n){return t(n)}):typeof exports=="object"?module.exports=t(require("jquery")):t(jQuery)}(this,function(n){var t=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(n){return!n||/^\s*$/.test(n)},escapeRegExChars:function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(n){return typeof n=="string"},isNumber:function(n){return typeof n=="number"},isArray:n.isArray,isFunction:n.isFunction,isObject:n.isPlainObject,isUndefined:function(n){return typeof n=="undefined"},isElement:function(n){return!!(n&&n.nodeType===1)},isJQuery:function(t){return t instanceof n},toStr:function(n){return t.isUndefined(n)||n===null?"":n+""},bind:n.proxy,each:function(t,i){function r(n,t){return i(t,n)}n.each(t,r)},map:n.map,filter:n.grep,every:function(t,i){var r=!0;return t?(n.each(t,function(n,u){if(!(r=i.call(null,u,n,t)))return!1}),!!r):r},some:function(t,i){var r=!1;return t?(n.each(t,function(n,u){if(r=i.call(null,u,n,t))return!1}),!!r):r},mixin:n.extend,identity:function(n){return n},clone:function(t){return n.extend(!0,{},t)},getIdGenerator:function(){var n=0;return function(){return n++}},templatify:function(t){function i(){return String(t)}return n.isFunction(t)?t:i},defer:function(n){setTimeout(n,0)},debounce:function(n,t,i){var r,u;return function(){var f=this,e=arguments,o,s;return o=function(){r=null;i||(u=n.apply(f,e))},s=i&&!r,clearTimeout(r),r=setTimeout(o,t),s&&(u=n.apply(f,e)),u}},throttle:function(n,t){var u,f,i,e,r,o;return r=0,o=function(){r=new Date;i=null;e=n.apply(u,f)},function(){var s=new Date,h=t-(s-r);return u=this,f=arguments,h<=0?(clearTimeout(i),i=null,r=s,e=n.apply(u,f)):i||(i=setTimeout(o,h)),e}},stringify:function(n){return t.isString(n)?n:JSON.stringify(n)},noop:function(){}}}(),e=function(){"use strict";function i(i){var e,o;return o=t.mixin({},n,i),e={css:f(),classes:o,html:r(o),selectors:u(o)},{css:e.css,html:e.html,classes:e.classes,selectors:e.selectors,mixin:function(n){t.mixin(n,e)}}}function r(n){return{wrapper:'<span class="'+n.wrapper+'"><\/span>',menu:'<div class="'+n.menu+'"><\/div>'}}function u(n){var i={};return t.each(n,function(n,t){i[t]="."+n}),i}function f(){var n={wrapper:{},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{},inputWithNoHint:{},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(n.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),n}var n={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return i}(),o=function(){"use strict";function u(t){t&&t.el||n.error("EventBus initialized without el");this.$el=n(t.el)}var i,r;return i="typeahead:",r={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},t.mixin(u.prototype,{_trigger:function(t,r){var u;return u=n.Event(i+t),(r=r||[]).unshift(u),this.$el.trigger.apply(this.$el,r),u},before:function(n){var t,i;return t=[].slice.call(arguments,1),i=this._trigger("before"+n,t),i.isDefaultPrevented()},trigger:function(n){var t;this._trigger(n,[].slice.call(arguments,1));(t=r[n])&&this._trigger(t,[].slice.call(arguments,1))}}),u}(),r=function(){"use strict";function t(t,i,r,u){var f;if(!r)return this;for(i=i.split(n),r=u?h(r,u):r,this._callbacks=this._callbacks||{};f=i.shift();)this._callbacks[f]=this._callbacks[f]||{sync:[],async:[]},this._callbacks[f][t].push(r);return this}function u(n,i,r){return t.call(this,"async",n,i,r)}function f(n,i,r){return t.call(this,"sync",n,i,r)}function e(t){var i;if(!this._callbacks)return this;for(t=t.split(n);i=t.shift();)delete this._callbacks[i];return this}function o(t){var u,f,e,o,s;if(!this._callbacks)return this;for(t=t.split(n),e=[].slice.call(arguments,1);(u=t.shift())&&(f=this._callbacks[u]);)o=i(f.sync,this,[u].concat(e)),s=i(f.async,this,[u].concat(e)),o()&&r(s);return this}function i(n,t,i){function r(){for(var u,r=0,f=n.length;!u&&r<f;r+=1)u=n[r].apply(t,i)===!1;return!u}return r}function s(){return window.setImmediate?function(n){setImmediate(function(){n()})}:function(n){setTimeout(function(){n()},0)}}function h(n,t){return n.bind?n.bind(t):function(){n.apply(t,[].slice.call(arguments,0))}}var n=/\s+/,r=s();return{onSync:f,onAsync:u,off:e,trigger:o}}(),s=function(n){"use strict";function r(n,i,r){for(var f=[],e,u=0,o=n.length;u<o;u++)f.push(t.escapeRegExChars(n[u]));return e=r?"\\b("+f.join("|")+")\\b":"("+f.join("|")+")",i?new RegExp(e):new RegExp(e,"i")}var i={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(u){function o(t){var i,r,e;return(i=f.exec(t.data))&&(e=n.createElement(u.tagName),u.className&&(e.className=u.className),r=t.splitText(i.index),r.splitText(i[0].length),e.appendChild(r.cloneNode(!0)),t.parentNode.replaceChild(e,r)),!!i}function e(n,t){for(var r,i=0;i<n.childNodes.length;i++)r=n.childNodes[i],r.nodeType===3?i+=t(r)?1:0:e(r,t)}var f;(u=t.mixin({},i,u),u.node&&u.pattern)&&(u.pattern=t.isArray(u.pattern)?u.pattern:[u.pattern],f=r(u.pattern,u.caseSensitive,u.wordsOnly),e(u.node,o))}}(window.document),u=function(){"use strict";function i(i,r){i=i||{};i.input||n.error("input is missing");r.mixin(this);this.$hint=n(i.hint);this.$input=n(i.input);this.query=this.$input.val();this.queryWhenFocused=this.hasFocus()?this.query:null;this.$overflowHelper=e(this.$input);this._checkLanguageDirection();this.$hint.length===0&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=t.noop)}function e(t){return n('<pre aria-hidden="true"><\/pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function o(n,t){return i.normalizeQuery(n)===i.normalizeQuery(t)}function f(n){return n.altKey||n.ctrlKey||n.metaKey||n.shiftKey}var u;return u={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},i.normalizeQuery=function(n){return t.toStr(n).replace(/^\s*/g,"").replace(/\s{2,}/g," ")},t.mixin(i.prototype,r,{_onBlur:function(){this.resetInputValue();this.trigger("blurred")},_onFocus:function(){this.queryWhenFocused=this.query;this.trigger("focused")},_onKeydown:function(n){var t=u[n.which||n.keyCode];this._managePreventDefault(t,n);t&&this._shouldTrigger(t,n)&&this.trigger(t+"Keyed",n)},_onInput:function(){this._setQuery(this.getInputValue());this.clearHintIfInvalid();this._checkLanguageDirection()},_managePreventDefault:function(n,t){var i;switch(n){case"up":case"down":i=!f(t);break;default:i=!1}i&&t.preventDefault()},_shouldTrigger:function(n,t){var i;switch(n){case"tab":i=!f(t);break;default:i=!0}return i},_checkLanguageDirection:function(){var n=(this.$input.css("direction")||"ltr").toLowerCase();this.dir!==n&&(this.dir=n,this.$hint.attr("dir",n),this.trigger("langDirChanged",n))},_setQuery:function(n,t){var i,r;i=o(n,this.query);r=i?this.query.length!==n.length:!1;this.query=n;t||i?!t&&r&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},bind:function(){var n=this,i,r,f,e;i=t.bind(this._onBlur,this);r=t.bind(this._onFocus,this);f=t.bind(this._onKeydown,this);e=t.bind(this._onInput,this);this.$input.on("blur.tt",i).on("focus.tt",r).on("keydown.tt",f);if(!t.isMsie()||t.isMsie()>9)this.$input.on("input.tt",e);else this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(i){u[i.which||i.keyCode]||t.defer(t.bind(n._onInput,n,i))});return this},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getLangDir:function(){return this.dir},getQuery:function(){return this.query||""},setQuery:function(n,t){this.setInputValue(n);this._setQuery(n,t)},hasQueryChangedSinceLastFocus:function(){return this.query!==this.queryWhenFocused},getInputValue:function(){return this.$input.val()},setInputValue:function(n){this.$input.val(n);this.clearHintIfInvalid();this._checkLanguageDirection()},resetInputValue:function(){this.setInputValue(this.query)},getHint:function(){return this.$hint.val()},setHint:function(n){this.$hint.val(n)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var n,t,i,r;n=this.getInputValue();t=this.getHint();i=n!==t&&t.indexOf(n)===0;r=n!==""&&i&&!this.hasOverflow();r||this.clearHint()},hasFocus:function(){return this.$input.is(":focus")},hasOverflow:function(){var n=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=n},isCursorAtEnd:function(){var n,i,r;return(n=this.$input.val().length,i=this.$input[0].selectionStart,t.isNumber(i))?i===n:document.selection?(r=document.selection.createRange(),r.moveStart("character",-n),n===r.text.length):!0},destroy:function(){this.$hint.off(".tt");this.$input.off(".tt");this.$overflowHelper.remove();this.$hint=this.$input=this.$overflowHelper=n("<div>")}}),i}(),f=function(){"use strict";function u(i,r){i=i||{};i.templates=i.templates||{};i.templates.notFound=i.templates.notFound||i.templates.empty;i.source||n.error("missing source");i.node||n.error("missing node");i.name&&!h(i.name)&&n.error("invalid dataset name: "+i.name);r.mixin(this);this.highlight=!!i.highlight;this.name=i.name||f();this.limit=i.limit||5;this.displayFn=e(i.display||i.displayKey);this.templates=o(i.templates,this.displayFn);this.source=i.source.__ttAdapter?i.source.__ttAdapter():i.source;this.async=t.isUndefined(i.async)?this.source.length>2:!!i.async;this._resetLastSuggestion();this.$el=n(i.node).addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}function e(n){function i(t){return t[n]}return n=n||t.stringify,t.isFunction(n)?n:i}function o(i,r){function u(t){return n("<div>").text(r(t))}return{notFound:i.notFound&&t.templatify(i.notFound),pending:i.pending&&t.templatify(i.pending),header:i.header&&t.templatify(i.header),footer:i.footer&&t.templatify(i.footer),suggestion:i.suggestion||u}}function h(n){return/^[_a-zA-Z0-9-]+$/.test(n)}var i,f;return i={val:"tt-selectable-display",obj:"tt-selectable-object"},f=t.getIdGenerator(),u.extractData=function(t){var r=n(t);return r.data(i.obj)?{val:r.data(i.val)||"",obj:r.data(i.obj)||null}:null},t.mixin(u.prototype,r,{_overwrite:function(n,t){t=t||[];t.length?this._renderSuggestions(n,t):this.async&&this.templates.pending?this._renderPending(n):!this.async&&this.templates.notFound?this._renderNotFound(n):this._empty();this.trigger("rendered",this.name,t,!1)},_append:function(n,t){t=t||[];t.length&&this.$lastSuggestion.length?this._appendSuggestions(n,t):t.length?this._renderSuggestions(n,t):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(n);this.trigger("rendered",this.name,t,!0)},_renderSuggestions:function(n,t){var i;i=this._getSuggestionsFragment(n,t);this.$lastSuggestion=i.children().last();this.$el.html(i).prepend(this._getHeader(n,t)).append(this._getFooter(n,t))},_appendSuggestions:function(n,t){var i,r;i=this._getSuggestionsFragment(n,t);r=i.children().last();this.$lastSuggestion.after(i);this.$lastSuggestion=r},_renderPending:function(n){var t=this.templates.pending;this._resetLastSuggestion();t&&this.$el.html(t({query:n,dataset:this.name}))},_renderNotFound:function(n){var t=this.templates.notFound;this._resetLastSuggestion();t&&this.$el.html(t({query:n,dataset:this.name}))},_empty:function(){this.$el.empty();this._resetLastSuggestion()},_getSuggestionsFragment:function(r,u){var f=this,e;return e=document.createDocumentFragment(),t.each(u,function(t){var u,o;o=f._injectQuery(r,t);u=n(f.templates.suggestion(o)).data(i.obj,t).data(i.val,f.displayFn(t)).addClass(f.classes.suggestion+" "+f.classes.selectable);e.appendChild(u[0])}),this.highlight&&s({className:this.classes.highlight,node:e,pattern:r}),n(e)},_getFooter:function(n,t){return this.templates.footer?this.templates.footer({query:n,suggestions:t,dataset:this.name}):null},_getHeader:function(n,t){return this.templates.header?this.templates.header({query:n,suggestions:t,dataset:this.name}):null},_resetLastSuggestion:function(){this.$lastSuggestion=n()},_injectQuery:function(n,i){return t.isObject(i)?t.mixin({_query:n},i):i},update:function(t){function e(n){u||(u=!0,n=(n||[]).slice(0,i.limit),r=n.length,i._overwrite(t,n),r<i.limit&&i.async&&i.trigger("asyncRequested",t))}function o(u){u=u||[];!f&&r<i.limit&&(i.cancel=n.noop,r+=u.length,i._append(t,u.slice(0,i.limit-r)),i.async&&i.trigger("asyncReceived",t))}var i=this,f=!1,u=!1,r=0;this.cancel();this.cancel=function(){f=!0;i.cancel=n.noop;i.async&&i.trigger("asyncCanceled",t)};this.source(t,e,o);u||e([])},cancel:n.noop,clear:function(){this._empty();this.cancel();this.trigger("cleared")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=n("<div>")}}),u}(),i=function(){"use strict";function i(i,r){function e(t){var i=u.$node.find(t.node).first();return t.node=i.length?i:n("<div>").appendTo(u.$node),new f(t,r)}var u=this;i=i||{};i.node||n.error("node is required");r.mixin(this);this.$node=n(i.node);this.query=null;this.datasets=t.map(i.datasets,e)}return t.mixin(i.prototype,r,{_onSelectableClick:function(t){this.trigger("selectableClicked",n(t.currentTarget))},_onRendered:function(n,t,i,r){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty());this.trigger("datasetRendered",t,i,r)},_onCleared:function(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty());this.trigger("datasetCleared")},_propagate:function(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function(){function n(n){return n.isEmpty()}return t.every(this.datasets,n)},_getSelectables:function(){return this.$node.find(this.selectors.selectable)},_removeCursor:function(){var n=this.getActiveSelectable();n&&n.removeClass(this.classes.cursor)},_ensureVisible:function(n){var t,i,r,u;t=n.position().top;i=t+n.outerHeight(!0);r=this.$node.scrollTop();u=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10);t<0?this.$node.scrollTop(r+t):u<i&&this.$node.scrollTop(r+(i-u))},bind:function(){var n=this,i=t.bind(this._onSelectableClick,this);this.$node.on("click.tt",this.selectors.selectable,i);return t.each(this.datasets,function(t){t.onSync("asyncRequested",n._propagate,n).onSync("asyncCanceled",n._propagate,n).onSync("asyncReceived",n._propagate,n).onSync("rendered",n._onRendered,n).onSync("cleared",n._onCleared,n)}),this},isOpen:function(){return this.$node.hasClass(this.classes.open)},open:function(){this.$node.addClass(this.classes.open)},close:function(){this.$node.removeClass(this.classes.open);this._removeCursor()},setLanguageDirection:function(n){this.$node.attr("dir",n)},selectableRelativeToCursor:function(n){var i,r,u,t;return r=this.getActiveSelectable(),i=this._getSelectables(),u=r?i.index(r):-1,t=u+n,t=(t+1)%(i.length+1)-1,t=t<-1?i.length-1:t,t===-1?null:i.eq(t)},setCursor:function(n){this._removeCursor();(n=n&&n.first())&&(n.addClass(this.classes.cursor),this._ensureVisible(n))},getSelectableData:function(n){return n&&n.length?f.extractData(n):null},getActiveSelectable:function(){var n=this._getSelectables().filter(this.selectors.cursor).first();return n.length?n:null},getTopSelectable:function(){var n=this._getSelectables().first();return n.length?n:null},update:function(n){function r(t){t.update(n)}var i=n!==this.query;return i&&(this.query=n,t.each(this.datasets,r)),i},empty:function(){function n(n){n.clear()}t.each(this.datasets,n);this.query=null;this.$node.addClass(this.classes.empty)},destroy:function(){function i(n){n.destroy()}this.$node.off(".tt");this.$node=n("<div>");t.each(this.datasets,i)}}),i}(),h=function(){"use strict";function r(){i.apply(this,[].slice.call(arguments,0))}var n=i.prototype;return t.mixin(r.prototype,i.prototype,{open:function(){return this._allDatasetsEmpty()||this._show(),n.open.apply(this,[].slice.call(arguments,0))},close:function(){return this._hide(),n.close.apply(this,[].slice.call(arguments,0))},_onRendered:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),n._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),n._onCleared.apply(this,[].slice.call(arguments,0))},setLanguageDirection:function(t){return this.$node.css(t==="ltr"?this.css.ltr:this.css.rtl),n.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function(){this.$node.hide()},_show:function(){this.$node.css("display","block")}}),r}(),c=function(){"use strict";function r(r,u){var f,e,o,s,h,c,l,a,v,y,p;r=r||{};r.input||n.error("missing input");r.menu||n.error("missing menu");r.eventBus||n.error("missing event bus");u.mixin(this);this.eventBus=r.eventBus;this.minLength=t.isNumber(r.minLength)?r.minLength:1;this.input=r.input;this.menu=r.menu;this.enabled=!0;this.active=!1;this.input.hasFocus()&&this.activate();this.dir=this.input.getLangDir();this._hacks();this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this);f=i(this,"activate","open","_onFocused");e=i(this,"deactivate","_onBlurred");o=i(this,"isActive","isOpen","_onEnterKeyed");s=i(this,"isActive","isOpen","_onTabKeyed");h=i(this,"isActive","_onEscKeyed");c=i(this,"isActive","open","_onUpKeyed");l=i(this,"isActive","open","_onDownKeyed");a=i(this,"isActive","isOpen","_onLeftKeyed");v=i(this,"isActive","isOpen","_onRightKeyed");y=i(this,"_openIfActive","_onQueryChanged");p=i(this,"_openIfActive","_onWhitespaceChanged");this.input.bind().onSync("focused",f,this).onSync("blurred",e,this).onSync("enterKeyed",o,this).onSync("tabKeyed",s,this).onSync("escKeyed",h,this).onSync("upKeyed",c,this).onSync("downKeyed",l,this).onSync("leftKeyed",a,this).onSync("rightKeyed",v,this).onSync("queryChanged",y,this).onSync("whitespaceChanged",p,this).onSync("langDirChanged",this._onLangDirChanged,this)}function i(n){var i=[].slice.call(arguments,1);return function(){var r=[].slice.call(arguments);t.each(i,function(t){return n[t].apply(n,r)})}}return t.mixin(r.prototype,{_hacks:function(){var r,i;r=this.input.$input||n("<div>");i=this.menu.$node||n("<div>");r.on("blur.tt",function(n){var u,f,e;u=document.activeElement;f=i.is(u);e=i.has(u).length>0;t.isMsie()&&(f||e)&&(n.preventDefault(),n.stopImmediatePropagation(),t.defer(function(){r.focus()}))});i.on("mousedown.tt",function(n){n.preventDefault()})},_onSelectableClicked:function(n,t){this.select(t)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(n,t,i,r){this._updateHint();this.eventBus.trigger("render",i,r,t)},_onAsyncRequested:function(n,t,i){this.eventBus.trigger("asyncrequest",i,t)},_onAsyncCanceled:function(n,t,i){this.eventBus.trigger("asynccancel",i,t)},_onAsyncReceived:function(n,t,i){this.eventBus.trigger("asyncreceive",i,t)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(n,t){var i;(i=this.menu.getActiveSelectable())&&this.select(i)&&t.preventDefault()},_onTabKeyed:function(n,t){var i;(i=this.menu.getActiveSelectable())?this.select(i)&&t.preventDefault():(i=this.menu.getTopSelectable())&&this.autocomplete(i)&&t.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){this.dir==="rtl"&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onRightKeyed:function(){this.dir==="ltr"&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onQueryChanged:function(n,t){this._minLengthMet(t)?this.menu.update(t):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(n,t){this.dir!==t&&(this.dir=t,this.menu.setLanguageDirection(t))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(n){return n=t.isString(n)?n:this.input.getQuery()||"",n.length>=this.minLength},_updateHint:function(){var f,i,n,e,o,s,r;f=this.menu.getTopSelectable();i=this.menu.getSelectableData(f);n=this.input.getInputValue();!i||t.isBlankString(n)||this.input.hasOverflow()?this.input.clearHint():(e=u.normalizeQuery(n),o=t.escapeRegExChars(e),s=new RegExp("^(?:"+o+")(.+$)","i"),r=s.exec(i.val),r&&this.input.setHint(n+r[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return this.isActive()?!0:!this.isEnabled()||this.eventBus.before("active")?!1:(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return this.isActive()?this.eventBus.before("idle")?!1:(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0):!0},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(n){this.input.setQuery(t.toStr(n))},getVal:function(){return this.input.getQuery()},select:function(n){var t=this.menu.getSelectableData(n);return t&&!this.eventBus.before("select",t.obj)?(this.input.setQuery(t.val,!0),this.eventBus.trigger("select",t.obj),this.close(),!0):!1},autocomplete:function(n){var i,t,r;return(i=this.input.getQuery(),t=this.menu.getSelectableData(n),r=t&&i!==t.val,r&&!this.eventBus.before("autocomplete",t.obj))?(this.input.setQuery(t.val),this.eventBus.trigger("autocomplete",t.obj),!0):!1},moveCursor:function(n){var u,i,t,r,f;return(u=this.input.getQuery(),i=this.menu.selectableRelativeToCursor(n),t=this.menu.getSelectableData(i),r=t?t.obj:null,f=this._minLengthMet()&&this.menu.update(u),!f&&!this.eventBus.before("cursorchange",r))?(this.menu.setCursor(i),t?this.input.setInputValue(t.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",r),!0):!1},destroy:function(){this.input.destroy();this.menu.destroy()}}),r}();(function(){"use strict";function r(t,i){t.each(function(){var t=n(this),r;(r=t.data(f.typeahead))&&i(r,t)})}function v(n,t){return n.clone().addClass(t.classes.hint).removeData().css(t.css.hint).css(p(n)).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1})}function y(n,t){n.data(f.attrs,{dir:n.attr("dir"),autocomplete:n.attr("autocomplete"),spellcheck:n.attr("spellcheck"),style:n.attr("style")});n.addClass(t.classes.input).attr({autocomplete:"off",spellcheck:!1});try{n.attr("dir")||n.attr("dir","auto")}catch(i){}return n}function p(n){return{backgroundAttachment:n.css("background-attachment"),backgroundClip:n.css("background-clip"),backgroundColor:n.css("background-color"),backgroundImage:n.css("background-image"),backgroundOrigin:n.css("background-origin"),backgroundPosition:n.css("background-position"),backgroundRepeat:n.css("background-repeat"),backgroundSize:n.css("background-size")}}function w(n){var r,i;r=n.data(f.www);i=n.parent().filter(r.selectors.wrapper);t.each(n.data(f.attrs),function(i,r){t.isUndefined(i)?n.removeAttr(r):n.attr(r,i)});n.removeData(f.typeahead).removeData(f.www).removeData(f.attr).removeClass(r.classes.input);i.length&&(n.detach().insertAfter(i),i.remove())}function a(i){var u,r;return u=t.isJQuery(i)||t.isElement(i),r=u?n(i).first():[],r.length?r:null}var l,f,s;l=n.fn.typeahead;f={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"};s={initialize:function(r,s){function p(){var e,d,p,w,b,k,g,nt,tt,it,rt;t.each(s,function(n){n.highlight=!!r.highlight});e=n(this);d=n(l.html.wrapper);p=a(r.hint);w=a(r.menu);b=r.hint!==!1&&!p;k=r.menu!==!1&&!w;b&&(p=v(e,l));k&&(w=n(l.html.menu).css(l.css.menu));p&&p.val("");e=y(e,l);(b||k)&&(d.css(l.css.wrapper),e.css(b?l.css.input:l.css.inputWithNoHint),e.wrap(d).parent().prepend(b?p:null).append(k?w:null));rt=k?h:i;g=new o({el:e});nt=new u({hint:p,input:e},l);tt=new rt({node:w,datasets:s},l);it=new c({input:nt,menu:tt,eventBus:g,minLength:r.minLength},l);e.data(f.www,l);e.data(f.typeahead,it)}var l;return s=t.isArray(s)?s:[].slice.call(arguments,1),r=r||{},l=e(r.classNames),this.each(p)},isEnabled:function(){var n;return r(this.first(),function(t){n=t.isEnabled()}),n},enable:function(){return r(this,function(n){n.enable()}),this},disable:function(){return r(this,function(n){n.disable()}),this},isActive:function(){var n;return r(this.first(),function(t){n=t.isActive()}),n},activate:function(){return r(this,function(n){n.activate()}),this},deactivate:function(){return r(this,function(n){n.deactivate()}),this},isOpen:function(){var n;return r(this.first(),function(t){n=t.isOpen()}),n},open:function(){return r(this,function(n){n.open()}),this},close:function(){return r(this,function(n){n.close()}),this},select:function(t){var i=!1,u=n(t);return r(this.first(),function(n){i=n.select(u)}),i},autocomplete:function(t){var i=!1,u=n(t);return r(this.first(),function(n){i=n.autocomplete(u)}),i},moveCursor:function(n){var t=!1;return r(this.first(),function(i){t=i.moveCursor(n)}),t},val:function(n){var t;return arguments.length?(r(this,function(t){t.setVal(n)}),this):(r(this.first(),function(n){t=n.getVal()}),t)},destroy:function(){return r(this,function(n,t){w(t);n.destroy()}),this}};n.fn.typeahead=function(n){return s[n]?s[n].apply(this,[].slice.call(arguments,1)):s.initialize.apply(this,arguments)};n.fn.typeahead.noConflict=function(){return n.fn.typeahead=l,this}})()});_currency="currency";_lang="culture";$(document).ready(function(){var n,i,r,t;$("[data-toggle=popover]").popover({html:!0,content:function(){var n=$(this).attr("data-popover-content");return $(n).children(".popover-body").html()},title:function(){var n=$(this).attr("data-popover-content");return $(n).children(".popover-heading").html()}});$('[data-toggle="tooltip"]').tooltip({animated:"fade",html:!0});n=readCookie(_currency);i=readCookie(_lang);$(".payment-new li").each(function(){if($(this).find("span").text()==n){var t=$(this);t.insertAfter(t.siblings(":eq(0)"))}});try{langInnerHtml=$('a[name="language"][data-defaultculture^="'+i+'"]')[0].innerHTML;$('a[name="language"][data-defaultculture^="'+i+'"]')[0].innerHTML=langInnerHtml+" ✔"}catch(u){}(window.location.pathname.indexOf("/passengerdetails")!=-1||window.location.pathname.indexOf("/paymentdetail")!=-1)&&($("#country-list").parent().hide(),$("#language").parent().hide());n&&$("#currency").text((n=="MYR"?"RM":n)+" ").append($("<span><\/span>").addClass("caret"));$("body").tooltip({selector:'[data-toggle="tooltip"]'});$(".datepicker").datepicker({format:"yyyy-mm-dd",startDate:"+0d",autoclose:!0,language:readCookie(_lang).split("-")[0]});$(".dob-datepicker").datepicker({format:"yyyy-mm-dd",endDate:"+0d",autoclose:!0,startView:2,language:readCookie(_lang).split("-")[0]});$(".passport-datepicker").datepicker({format:"yyyy-mm-dd",startDate:"+0d",autoclose:!0,startView:2,language:readCookie(_lang).split("-")[0]});$(".passport-issue-datepicker").datepicker({format:"yyyy-mm-dd",endDate:"+0d",autoclose:!0,startView:2,language:readCookie(_lang).split("-")[0]});$("#static-ad").on("show.bs.modal",function(){var n=$('[name="CountryCode"]').val(),t=$("ul#eb-discount").find("li.active");n=="my"?$("ul#eb-discount li a").eq(1).click():n=="id"?$("ul#eb-discount li a").eq(2).click():n=="th"?$("ul#eb-discount li a").eq(3).click():n=="vn"?$("ul#eb-discount li a").eq(4).click():n=="mm"?$("ul#eb-discount li a").eq(5).click():n=="kh"?$("ul#eb-discount li a").eq(6).click():n=="la"?$("ul#eb-discount li a").eq(7).click():n=="ph"?$("ul#eb-discount li a").eq(8).click():$("ul#eb-discount li a").eq(0).click()});r=$.validator.methods.range;$.validator.methods.range=function(n,t,i){return t.type==="checkbox"?t.checked:r.call(this,n,t,i)};subscription.initialise();suggestionRoute.initialise();$("#hdnFC_Train").val()==90&&(t=new Date,t.setDate(t.getDate()+90),$("#dpDepartureDate_Train").datepicker("setEndDate",t),$("#dpReturnDate_Train").datepicker("setEndDate",t));$("div.search-result-new div.modify-search-icon").length&&$("div.brief-search div.modify-link").hide();!0&&$("#prompt-dialog").modal("show")});$(document).ready(function(){$(".collapse").on("show.bs.collapse",function(){$("button i").hasClass("fa-angle-down")&&$("#read-more").html(JsCommonMsg.SeoArticleShowLess+' <i class="fa fa-angle-up"><\/i>')}).on("hide.bs.collapse",function(){$("button i").hasClass("fa-angle-up")&&$("#read-more").html(JsCommonMsg.SeoArticleShowMore+' <i class="fa fa-angle-down"><\/i>')})});$(document).on("change","#txtSearchOrigin_Train",function(){var t=$("#hdnFC_Train").val(),n=new Date;n.setDate(n.getDate()+90);t=="90"?($("#dpDepartureDate_Train").datepicker("setEndDate",n),$("#dpReturnDate_Train").datepicker("setEndDate",n)):($("#dpDepartureDate_Train").datepicker("setEndDate",null),$("#dpReturnDate_Train").datepicker("setEndDate",null))});$(document).on("click","a[name='currency']",function(n){var t;n.preventDefault();t=$(this).attr("href");createCookie(_currency,t);$("#currency").text((t=="MYR"?"RM":t)+" ").append($("<span><\/span>").addClass("caret"));t=readCookie(_currency);$(".payment-new li").each(function(){if($(this).find("span").text()==t){var n=$(this);n.insertAfter(n.siblings(":eq(0)"))}})});Array.prototype.contains=function(n){return this.indexOf(n)>-1};Array.prototype.contains=function(n){return this.indexOf(n)>-1};$(document).on("click","a[name='country']",function(n){var t=$(n.currentTarget).attr("data-defaultcurrency"),i=$(n.currentTarget).attr("data-defaultculture");createCookie(_currency,t);createCookie("culture",i);createCookie("changeculture",1)});$(document).on("click","a[name='language']",function(n){var t=$(n.currentTarget).attr("data-defaultculture");createCookie("culture",t);createCookie("changeculture",1)});$(document).on("click","a[name='country']",function(n){var t=$(n.currentTarget).attr("data-defaultcurrency"),i=$(n.currentTarget).attr("data-defaultculture");createCookie(_currency,t);createCookie("culture",i);createCookie("changeculture",1)});spinnerVisible=!1;Utils.prototype={constructor:Utils,isElementInView:function(n,t){var i=$(window).scrollTop(),u=i+$(window).height(),r=$(n).offset().top,f=r+$(n).height();return t===!0?i<r&&u>f:r<=u&&f>=i}};var Utils=new Utils,subscription={initialise:function(){$("#subscribeBtn").on("click",$.proxy(function(n){var u,f;n.preventDefault();var i=$("#CaptchaCode").val(),e=i.length===0,t=$("#CaptchaCode").get(0).Captcha,r=!1;e||(u={CaptchaId:t.Id,InstanceId:t.InstanceId,UserInput:i},$.ajax({url:"home/checkcaptcha",dataType:"json",async:!1,data:u,success:function(n){r=n}}));f=$("#subscriptionForm");f.valid()&&r?this.updateSubscriptionView():t.ReloadImage()},this))},updateSubscriptionView:function(){$.ajax({url:"home/subscribe?emailAddress="+$("#subscribersEmailAddress").val(),type:"POST",beforeSend:function(){},success:function(n){setTimeout(function(){$("#subscribeDealsNews").html(n.subscriptionPartialView)},500)},error:function(n){console.log(n)}})}},suggestionRoute={initialise:function(){$("#suggestUsBtn").on("click",$.proxy(function(n){var u,f;n.preventDefault();$("#suggestUsBtn").attr("disabled","disabled");var i=$("#CaptchaCode1").val(),e=i.length===0,t=$("#CaptchaCode1").get(0).Captcha,r=!1;e||(u={CaptchaId:t.Id,InstanceId:t.InstanceId,UserInput:i},$.ajax({url:"home/checkcaptcha",dataType:"json",async:!1,data:u,success:function(n){r=n}}));f=$("#suggestionRouteForm");f.valid()&&r?this.updateSuggestionView():(t.ReloadImage(),$("#suggestUsBtn").removeAttr("disabled"))},this))},updateSuggestionView:function(){$.ajax({url:"home/routesuggestion?Country1st="+$("#Country1st").val()+"&Pickup="+encodeURIComponent($("#routeRequestPickup").val())+"&DropOff="+encodeURIComponent($("#routeRequestDropOff").val())+"&Remarks="+encodeURIComponent($("#routeRequestRemarks").val())+"&Country2nd="+$("#Country2nd").val()+"&Pickup1="+encodeURIComponent($("#routeRequestPickup1").val())+"&DropOff1="+encodeURIComponent($("#routeRequestDropOff1").val())+"&Remarks1="+encodeURIComponent($("#routeRequestRemarks1").val())+"&Product="+$("div[id$='-search-box']:visible")[0].id.split("-")[0],type:"POST",beforeSend:function(){},success:function(n){setTimeout(function(){$("#suggestNewRoute").html(n.subscriptionPartialView)},500)},error:function(n){console.log(n)}})}};skel.breakpoints({xlarge:"(max-width: 1680px)",large:"(max-width: 1280px)",medium:"(max-width: 980px)",small:"(max-width: 736px)",xsmall:"(max-width: 480px)"});skel.on("ready",function(){skel.breakpoint("small").active?$("body").addClass("is-mobile"):$("body").removeClass("is-mobile")}).on("resize",function(){skel.breakpoint("small").active?$("body").addClass("is-mobile"):$("body").removeClass("is-mobile")});String.prototype.format=function(){for(var t=this,i,n=0;n<arguments.length;n++)i="{"+n+"}",t=t.replace(i,arguments[n]);return t};x=document.cookie;cookieresult=getCookie(x);cookieresult!="=CN"&&(function(n,t,i,r,u,f,e){n.GoogleAnalyticsObject=u;n[u]=n[u]||function(){(n[u].q=n[u].q||[]).push(arguments)};n[u].l=1*new Date;f=t.createElement(i);e=t.getElementsByTagName(i)[0];f.async=1;f.src=r;e.parentNode.insertBefore(f,e)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),url=window.location.href,gaCode=url.toLowerCase().indexOf("www.easybook.com")>-1?"UA-1515708-1":"UA-120356181-1",ga("create",gaCode,"auto"),ga("send","pageview")),function(n,t,i,r){"use strict";var e=0,u=function(){var i=r.userAgent,u=/msie\s\d+/i,t;return i.search(u)>0&&(t=u.exec(i).toString(),t=t.split(" ")[1],t<9)?(n("html").addClass("lt-ie9"),!0):!1}();Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,i=[].slice,r,u;if(typeof t!="function")throw new TypeError;return r=i.call(arguments,1),u=function(){var e,o,f;return this instanceof u?(e=function(){},e.prototype=t.prototype,o=new e,f=t.apply(o,r.concat(i.call(arguments))),Object(f)===f)?f:o:t.apply(n,r.concat(i.call(arguments)))},u});Array.prototype.indexOf||(Array.prototype.indexOf=function(n,t){var r,f,u,i;if(this==null)throw new TypeError('"this" is null or not defined');if((f=Object(this),u=f.length>>>0,u===0)||(i=+t||0,Math.abs(i)===Infinity&&(i=0),i>=u))return-1;for(r=Math.max(i>=0?i:u-Math.abs(i),0);r<u;){if(r in f&&f[r]===n)return r;r++}return-1});var o='<span class="irs"><span class="irs-line" tabindex="-1"><span class="irs-line-left"><\/span><span class="irs-line-mid"><\/span><span class="irs-line-right"><\/span><\/span><span class="irs-min">0<\/span><span class="irs-max">1<\/span><span class="irs-from">0<\/span><span class="irs-to">0<\/span><span class="irs-single">0<\/span><\/span><span class="irs-grid"><\/span><span class="irs-bar"><\/span>',s='<span class="irs-bar-edge"><\/span><span class="irs-shadow shadow-single"><\/span><span class="irs-slider single"><\/span>',h='<span class="irs-shadow shadow-from"><\/span><span class="irs-shadow shadow-to"><\/span><span class="irs-slider from"><\/span><span class="irs-slider to"><\/span>',c='<span class="irs-disable-mask"><\/span>',f=function(r,u,f){this.VERSION="2.1.2";this.input=r;this.plugin_count=f;this.current_plugin=0;this.calc_count=0;this.update_tm=0;this.old_from=0;this.old_to=0;this.old_min_interval=null;this.raf_id=null;this.dragging=!1;this.force_redraw=!1;this.no_diapason=!1;this.is_key=!1;this.is_update=!1;this.is_start=!0;this.is_finish=!1;this.is_active=!1;this.is_resize=!1;this.is_click=!1;this.$cache={win:n(i),body:n(t.body),input:n(r),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]};this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]};this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var e=this.$cache.input,o=e.prop("value"),h,s,c;h={type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!1,keyboard_step:5,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,onStart:null,onChange:null,onFinish:null,onUpdate:null};s={type:e.data("type"),min:e.data("min"),max:e.data("max"),from:e.data("from"),to:e.data("to"),step:e.data("step"),min_interval:e.data("minInterval"),max_interval:e.data("maxInterval"),drag_interval:e.data("dragInterval"),values:e.data("values"),from_fixed:e.data("fromFixed"),from_min:e.data("fromMin"),from_max:e.data("fromMax"),from_shadow:e.data("fromShadow"),to_fixed:e.data("toFixed"),to_min:e.data("toMin"),to_max:e.data("toMax"),to_shadow:e.data("toShadow"),prettify_enabled:e.data("prettifyEnabled"),prettify_separator:e.data("prettifySeparator"),force_edges:e.data("forceEdges"),keyboard:e.data("keyboard"),keyboard_step:e.data("keyboardStep"),grid:e.data("grid"),grid_margin:e.data("gridMargin"),grid_num:e.data("gridNum"),grid_snap:e.data("gridSnap"),hide_min_max:e.data("hideMinMax"),hide_from_to:e.data("hideFromTo"),prefix:e.data("prefix"),postfix:e.data("postfix"),max_postfix:e.data("maxPostfix"),decorate_both:e.data("decorateBoth"),values_separator:e.data("valuesSeparator"),input_values_separator:e.data("inputValuesSeparator"),disable:e.data("disable")};s.values=s.values&&s.values.split(",");for(c in s)s.hasOwnProperty(c)&&(s[c]||s[c]===0||delete s[c]);o&&(o=o.split(s.input_values_separator||u.input_values_separator||";"),o[0]&&o[0]==+o[0]&&(o[0]=+o[0]),o[1]&&o[1]==+o[1]&&(o[1]=+o[1]),u&&u.values&&u.values.length?(h.from=o[0]&&u.values.indexOf(o[0]),h.to=o[1]&&u.values.indexOf(o[1])):(h.from=o[0]&&+o[0],h.to=o[1]&&+o[1]));n.extend(h,u);n.extend(h,s);this.options=h;this.validate();this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null};this.init()};f.prototype={init:function(n){this.no_diapason=!1;this.coords.p_step=this.convertToPercent(this.options.step,!0);this.target="base";this.toggleInput();this.append();this.setMinMax();n?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart());this.updateScene()},append:function(){var n='<span class="irs js-irs-'+this.plugin_count+'"><\/span>';this.$cache.input.before(n);this.$cache.input.prop("readonly",!0);this.$cache.cont=this.$cache.input.prev();this.result.slider=this.$cache.cont;this.$cache.cont.html(o);this.$cache.rs=this.$cache.cont.find(".irs");this.$cache.min=this.$cache.cont.find(".irs-min");this.$cache.max=this.$cache.cont.find(".irs-max");this.$cache.from=this.$cache.cont.find(".irs-from");this.$cache.to=this.$cache.cont.find(".irs-to");this.$cache.single=this.$cache.cont.find(".irs-single");this.$cache.bar=this.$cache.cont.find(".irs-bar");this.$cache.line=this.$cache.cont.find(".irs-line");this.$cache.grid=this.$cache.cont.find(".irs-grid");this.options.type==="single"?(this.$cache.cont.append(s),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(h),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler());this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none");this.appendGrid();this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.cont.removeClass("irs-disabled"),this.$cache.input[0].disabled=!1,this.bindEvents());this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var i=this.options.min,n=this.options.max,r=this.options.from,t=this.options.to;r>i&&t===n?this.$cache.s_from.addClass("type_last"):t<n&&this.$cache.s_to.addClass("type_last")},changeLevel:function(n){switch(n){case"single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake);break;case"from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake);this.$cache.s_from.addClass("state_hover");this.$cache.s_from.addClass("type_last");this.$cache.s_to.removeClass("type_last");break;case"to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake);this.$cache.s_to.addClass("state_hover");this.$cache.s_to.addClass("type_last");this.$cache.s_from.removeClass("type_last");break;case"both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake);this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-this.coords.p_pointer);this.$cache.s_to.removeClass("type_last");this.$cache.s_from.removeClass("type_last")}},appendDisableMask:function(){this.$cache.cont.append(c);this.$cache.cont.addClass("irs-disabled")},remove:function(){this.$cache.cont.remove();this.$cache.cont=null;this.$cache.line.off("keydown.irs_"+this.plugin_count);this.$cache.body.off("touchmove.irs_"+this.plugin_count);this.$cache.body.off("mousemove.irs_"+this.plugin_count);this.$cache.win.off("touchend.irs_"+this.plugin_count);this.$cache.win.off("mouseup.irs_"+this.plugin_count);u&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count));this.$cache.grid_labels=[];this.coords.big=[];this.coords.big_w=[];this.coords.big_p=[];this.coords.big_x=[];cancelAnimationFrame(this.raf_id)},bindEvents:function(){if(!this.no_diapason){this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this));this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this));this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));if(this.options.drag_interval&&this.options.type==="double"){this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"));this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))}else{this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))}if(this.options.type==="single"){this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single"));this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single"));this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single"));this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single"));this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))}else{this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null));this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null));this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from"));this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from"));this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to"));this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to"));this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from"));this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from"));this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to"));this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to"));this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))}if(this.options.keyboard)this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard"));if(u){this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))}}},pointerMove:function(n){if(this.dragging){var t=n.pageX||n.originalEvent.touches&&n.originalEvent.touches[0].pageX;this.coords.x_pointer=t-this.coords.x_gap;this.calc()}},pointerUp:function(t){if(this.current_plugin===this.plugin_count){if(this.is_active)this.is_active=!1;else return;this.$cache.cont.find(".state_hover").removeClass("state_hover");this.force_redraw=!0;u&&n("*").prop("unselectable",!1);this.updateScene();this.restoreOriginalMinInterval();(n.contains(this.$cache.cont[0],t.target)||this.dragging)&&(this.is_finish=!0,this.callOnFinish());this.dragging=!1}},pointerDown:function(t,i){i.preventDefault();var r=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;i.button!==2&&(t==="both"&&this.setTempMinInterval(),t||(t=this.target),this.current_plugin=this.plugin_count,this.target=t,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=r-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(t),u&&n("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(n,t){t.preventDefault();var i=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;t.button!==2&&(this.current_plugin=this.plugin_count,this.target=n,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(i-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(n,t){if(this.current_plugin===this.plugin_count&&!t.altKey&&!t.ctrlKey&&!t.shiftKey&&!t.metaKey){switch(t.which){case 83:case 65:case 40:case 37:t.preventDefault();this.moveByKey(!1);break;case 87:case 68:case 38:case 39:t.preventDefault();this.moveByKey(!0)}return!0}},moveByKey:function(n){var t=this.coords.p_pointer;n?t+=this.options.keyboard_step:t-=this.options.keyboard_step;this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*t);this.is_key=!0;this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max){this.$cache.min[0].style.display="none";this.$cache.max[0].style.display="none";return}this.options.values.length?(this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]))):(this.$cache.min.html(this.decorate(this._prettify(this.options.min),this.options.min)),this.$cache.max.html(this.decorate(this._prettify(this.options.max),this.options.max)));this.labels.w_min=this.$cache.min.outerWidth(!1);this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var n=this.result.to-this.result.from;this.old_min_interval===null&&(this.old_min_interval=this.options.min_interval);this.options.min_interval=n},restoreOriginalMinInterval:function(){this.old_min_interval!==null&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(n){var t;if(this.options&&(this.calc_count++,(this.calc_count===10||n)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();t=this.getHandleX();this.target==="click"&&(this.coords.p_gap=this.coords.p_handle/2,t=this.getHandleX(),this.target=this.options.drag_interval?"both_one":this.chooseHandle(t));switch(this.target){case"base":var f=(this.options.max-this.options.min)/100,e=(this.result.from-this.options.min)/f,h=(this.result.to-this.options.min)/f;this.coords.p_single_real=this.toFixed(e);this.coords.p_from_real=this.toFixed(e);this.coords.p_to_real=this.toFixed(h);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(t);this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(t);this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real);this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(t);this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real);this.coords.p_to_real<this.coords.p_from_real&&(this.coords.p_to_real=this.coords.p_from_real);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to");this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,"to");this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both":if(this.options.from_fixed||this.options.to_fixed)break;t=this.toFixed(t+this.coords.p_handle*.1);this.coords.p_from_real=this.convertToRealPercent(t)-this.coords.p_gap_left;this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_real=this.convertToRealPercent(t)+this.coords.p_gap_right;this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to");this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both_one":if(this.options.from_fixed||this.options.to_fixed)break;var o=this.convertToRealPercent(t),c=this.result.from_percent,l=this.result.to_percent,u=l-c,s=u/2,i=o-s,r=o+s;i<0&&(i=0,r=i+u);r>100&&(r=100,i=r-u);this.coords.p_from_real=this.calcWithStep(i);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_real=this.calcWithStep(r);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}this.options.type==="single"?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to]));this.calcMinMax();this.calcLabels()}},calcPointerPercent:function(){if(!this.coords.w_rs){this.coords.p_pointer=0;return}this.coords.x_pointer<0||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs);this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)},convertToRealPercent:function(n){var t=100-this.coords.p_handle;return n/t*100},convertToFakePercent:function(n){var t=100-this.coords.p_handle;return n/100*t},getHandleX:function(){var t=100-this.coords.p_handle,n=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return n<0?n=0:n>t&&(n=t),n},calcHandlePercent:function(){this.coords.w_handle=this.options.type==="single"?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1);this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(n){if(this.options.type==="single")return"single";var t=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2;return n>=t?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&(this.options.type==="single"?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)))},updateScene:function(){(this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options)&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs)&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)&&(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs)&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%",this.options.type==="single"?(this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%",this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",(this.old_from!==this.result.from||this.force_redraw)&&(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),(this.old_to!==this.result.to||this.force_redraw)&&(this.$cache.to[0].style.left=this.labels.p_to_left+"%"),this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to)),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||this.$cache.input.trigger("change"),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_key=!1,this.is_click=!1,this.callOnFinish()),this.is_update=!1,this.is_resize=!1,this.is_finish=!1),this.is_start=!1,this.is_key=!1,this.is_click=!1,this.force_redraw=!1)},drawLabels:function(){var u,t,n,i,r;if(this.options&&(u=this.options.values.length,t=this.options.p_values,!this.options.hide_from_to))if(this.options.type==="single")u?(n=this.decorate(t[this.result.from]),this.$cache.single.html(n)):(n=this.decorate(this._prettify(this.result.from),this.result.from),this.$cache.single.html(n)),this.calcLabels(),this.$cache.min[0].style.visibility=this.labels.p_single_left<this.labels.p_min+1?"hidden":"visible",this.$cache.max[0].style.visibility=this.labels.p_single_left+this.labels.p_single_fake>99-this.labels.p_max?"hidden":"visible";else{u?(this.options.decorate_both?(n=this.decorate(t[this.result.from]),n+=this.options.values_separator,n+=this.decorate(t[this.result.to])):n=this.decorate(t[this.result.from]+this.options.values_separator+t[this.result.to]),i=this.decorate(t[this.result.from]),r=this.decorate(t[this.result.to]),this.$cache.single.html(n),this.$cache.from.html(i),this.$cache.to.html(r)):(this.options.decorate_both?(n=this.decorate(this._prettify(this.result.from),this.result.from),n+=this.options.values_separator,n+=this.decorate(this._prettify(this.result.to),this.result.to)):n=this.decorate(this._prettify(this.result.from)+this.options.values_separator+this._prettify(this.result.to),this.result.to),i=this.decorate(this._prettify(this.result.from),this.result.from),r=this.decorate(this._prettify(this.result.to),this.result.to),this.$cache.single.html(n),this.$cache.from.html(i),this.$cache.to.html(r));this.calcLabels();var s=Math.min(this.labels.p_single_left,this.labels.p_from_left),o=this.labels.p_single_left+this.labels.p_single_fake,f=this.labels.p_to_left+this.labels.p_to_fake,e=Math.max(o,f);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",this.result.from===this.result.to?(this.target==="from"?this.$cache.from[0].style.visibility="visible":this.target==="to"&&(this.$cache.to[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",e=f):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",e=Math.max(o,f))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden");this.$cache.min[0].style.visibility=s<this.labels.p_min+1?"hidden":"visible";this.$cache.max[0].style.visibility=e>99-this.labels.p_max?"hidden":"visible"}},drawShadow:function(){var n=this.options,i=this.$cache,e=typeof n.from_min=="number"&&!isNaN(n.from_min),o=typeof n.from_max=="number"&&!isNaN(n.from_max),s=typeof n.to_min=="number"&&!isNaN(n.to_min),h=typeof n.to_max=="number"&&!isNaN(n.to_max),t,r,u,f;n.type==="single"?n.from_shadow&&(e||o)?(t=this.convertToPercent(e?n.from_min:n.min),r=this.convertToPercent(o?n.from_max:n.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),r=this.toFixed(r-this.coords.p_handle/100*r),t=t+this.coords.p_handle/2,i.shad_single[0].style.display="block",i.shad_single[0].style.left=t+"%",i.shad_single[0].style.width=r+"%"):i.shad_single[0].style.display="none":(n.from_shadow&&(e||o)?(t=this.convertToPercent(e?n.from_min:n.min),r=this.convertToPercent(o?n.from_max:n.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),r=this.toFixed(r-this.coords.p_handle/100*r),t=t+this.coords.p_handle/2,i.shad_from[0].style.display="block",i.shad_from[0].style.left=t+"%",i.shad_from[0].style.width=r+"%"):i.shad_from[0].style.display="none",n.to_shadow&&(s||h)?(u=this.convertToPercent(s?n.to_min:n.min),f=this.convertToPercent(h?n.to_max:n.max)-u,u=this.toFixed(u-this.coords.p_handle/100*u),f=this.toFixed(f-this.coords.p_handle/100*f),u=u+this.coords.p_handle/2,i.shad_to[0].style.display="block",i.shad_to[0].style.left=u+"%",i.shad_to[0].style.width=f+"%"):i.shad_to[0].style.display="none")},callOnStart:function(){if(this.options.onStart&&typeof this.options.onStart=="function")this.options.onStart(this.result)},callOnChange:function(){if(this.options.onChange&&typeof this.options.onChange=="function")this.options.onChange(this.result)},callOnFinish:function(){if(this.options.onFinish&&typeof this.options.onFinish=="function")this.options.onFinish(this.result)},callOnUpdate:function(){if(this.options.onUpdate&&typeof this.options.onUpdate=="function")this.options.onUpdate(this.result)},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input")},convertToPercent:function(n,t){var i=this.options.max-this.options.min,f=i/100,r,u;return i?(r=t?n:n-this.options.min,u=r/f,this.toFixed(u)):(this.no_diapason=!0,0)},convertToValue:function(n){var i=this.options.min,h=this.options.max,c=i.toString().split(".")[1],l=h.toString().split(".")[1],u,f,e=0,o=0,t,s,r;return n===0?this.options.min:n===100?this.options.max:(c&&(u=c.length,e=u),l&&(f=l.length,e=f),u&&f&&(e=u>=f?u:f),i<0&&(o=Math.abs(i),i=+(i+o).toFixed(e),h=+(h+o).toFixed(e)),t=(h-i)/100*n+i,s=this.options.step.toString().split(".")[1],s?t=+t.toFixed(s.length):(t=t/this.options.step,t=t*this.options.step,t=+t.toFixed(0)),o&&(t-=o),r=s?+t.toFixed(s.length):this.toFixed(t),r<this.options.min?r=this.options.min:r>this.options.max&&(r=this.options.max),r)},calcWithStep:function(n){var t=Math.round(n/this.coords.p_step)*this.coords.p_step;return t>100&&(t=100),n===100&&(t=100),this.toFixed(t)},checkMinInterval:function(n,t,i){var u=this.options,r,f;return u.min_interval?(r=this.convertToValue(n),f=this.convertToValue(t),i==="from"?f-r<u.min_interval&&(r=f-u.min_interval):r-f<u.min_interval&&(r=f+u.min_interval),this.convertToPercent(r)):n},checkMaxInterval:function(n,t,i){var u=this.options,r,f;return u.max_interval?(r=this.convertToValue(n),f=this.convertToValue(t),i==="from"?f-r>u.max_interval&&(r=f-u.max_interval):r-f>u.max_interval&&(r=f+u.max_interval),this.convertToPercent(r)):n},checkDiapason:function(n,t,i){var r=this.convertToValue(n),u=this.options;return typeof t!="number"&&(t=u.min),typeof i!="number"&&(i=u.max),r<t&&(r=t),r>i&&(r=i),this.convertToPercent(r)},toFixed:function(n){return n=n.toFixed(9),+n},_prettify:function(n){return this.options.prettify_enabled?this.options.prettify&&typeof this.options.prettify=="function"?this.options.prettify(n):this.prettify(n):n},prettify:function(n){var t=n.toString();return t.replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(n,t){return this.options.force_edges?(n<0?n=0:n>100-t&&(n=100-t),this.toFixed(n)):this.toFixed(n)},validate:function(){var n=this.options,t=this.result,u=n.values,f=u.length,i,r;if(typeof n.min=="string"&&(n.min=+n.min),typeof n.max=="string"&&(n.max=+n.max),typeof n.from=="string"&&(n.from=+n.from),typeof n.to=="string"&&(n.to=+n.to),typeof n.step=="string"&&(n.step=+n.step),typeof n.from_min=="string"&&(n.from_min=+n.from_min),typeof n.from_max=="string"&&(n.from_max=+n.from_max),typeof n.to_min=="string"&&(n.to_min=+n.to_min),typeof n.to_max=="string"&&(n.to_max=+n.to_max),typeof n.keyboard_step=="string"&&(n.keyboard_step=+n.keyboard_step),typeof n.grid_num=="string"&&(n.grid_num=+n.grid_num),n.max<n.min&&(n.max=n.min),f)for(n.p_values=[],n.min=0,n.max=f-1,n.step=1,n.grid_num=n.max,n.grid_snap=!0,r=0;r<f;r++)i=+u[r],isNaN(i)?i=u[r]:(u[r]=i,i=this._prettify(i)),n.p_values.push(i);(typeof n.from!="number"||isNaN(n.from))&&(n.from=n.min);(typeof n.to!="number"||isNaN(n.from))&&(n.to=n.max);n.type==="single"?(n.from<n.min&&(n.from=n.min),n.from>n.max&&(n.from=n.max)):((n.from<n.min||n.from>n.max)&&(n.from=n.min),(n.to>n.max||n.to<n.min)&&(n.to=n.max),n.from>n.to&&(n.from=n.to));(typeof n.step!="number"||isNaN(n.step)||!n.step||n.step<0)&&(n.step=1);(typeof n.keyboard_step!="number"||isNaN(n.keyboard_step)||!n.keyboard_step||n.keyboard_step<0)&&(n.keyboard_step=5);typeof n.from_min=="number"&&n.from<n.from_min&&(n.from=n.from_min);typeof n.from_max=="number"&&n.from>n.from_max&&(n.from=n.from_max);typeof n.to_min=="number"&&n.to<n.to_min&&(n.to=n.to_min);typeof n.to_max=="number"&&n.from>n.to_max&&(n.to=n.to_max);t&&(t.min!==n.min&&(t.min=n.min),t.max!==n.max&&(t.max=n.max),(t.from<t.min||t.from>t.max)&&(t.from=n.from),(t.to<t.min||t.to>t.max)&&(t.to=n.to));(typeof n.min_interval!="number"||isNaN(n.min_interval)||!n.min_interval||n.min_interval<0)&&(n.min_interval=0);(typeof n.max_interval!="number"||isNaN(n.max_interval)||!n.max_interval||n.max_interval<0)&&(n.max_interval=0);n.min_interval&&n.min_interval>n.max-n.min&&(n.min_interval=n.max-n.min);n.max_interval&&n.max_interval>n.max-n.min&&(n.max_interval=n.max-n.min)},decorate:function(n,t){var r="",i=this.options;return i.prefix&&(r+=i.prefix),r+=n,i.max_postfix&&(i.values.length&&n===i.p_values[i.max]?(r+=i.max_postfix,i.postfix&&(r+=" ")):t===i.max&&(r+=i.max_postfix,i.postfix&&(r+=" "))),i.postfix&&(r+=i.postfix),r},updateFrom:function(){this.result.from=this.options.from;this.result.from_percent=this.convertToPercent(this.result.from);this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to;this.result.to_percent=this.convertToPercent(this.result.to);this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min;this.result.max=this.options.max;this.updateFrom();this.updateTo()},appendGrid:function(){if(this.options.grid){var t=this.options,r,o,c=t.max-t.min,i=t.grid_num,s=0,n=0,f=4,u,l,a=0,e,h="";for(this.calcGridMargin(),t.grid_snap?(i=c/t.step,s=this.toFixed(t.step/(c/100))):s=this.toFixed(100/i),i>4&&(f=3),i>7&&(f=2),i>14&&(f=1),i>28&&(f=0),r=0;r<i+1;r++){for(u=f,n=this.toFixed(s*r),n>100&&(n=100,u-=2,u<0&&(u=0)),this.coords.big[r]=n,l=(n-s*(r-1))/(u+1),o=1;o<=u;o++){if(n===0)break;a=this.toFixed(n-l*o);h+='<span class="irs-grid-pol small" style="left: '+a+'%"><\/span>'}h+='<span class="irs-grid-pol" style="left: '+n+'%"><\/span>';e=this.convertToValue(n);e=t.values.length?t.p_values[e]:this._prettify(e);h+='<span class="irs-grid-text js-grid-text-'+r+'" style="left: '+n+'%">'+e+"<\/span>"}this.coords.big_num=Math.ceil(i+1);this.$cache.cont.addClass("irs-with-grid");this.$cache.grid.html(h);this.cacheGridLabels()}},cacheGridLabels:function(){for(var t,i=this.coords.big_num,n=0;n<i;n++)t=this.$cache.grid.find(".js-grid-text-"+n),this.$cache.grid_labels.push(t);this.calcGridLabels()},calcGridLabels:function(){for(var u,i=[],r=[],t=this.coords.big_num,n=0;n<t;n++)this.coords.big_w[n]=this.$cache.grid_labels[n].outerWidth(!1),this.coords.big_p[n]=this.toFixed(this.coords.big_w[n]/this.coords.w_rs*100),this.coords.big_x[n]=this.toFixed(this.coords.big_p[n]/2),i[n]=this.toFixed(this.coords.big[n]-this.coords.big_x[n]),r[n]=this.toFixed(i[n]+this.coords.big_p[n]);for(this.options.force_edges&&(i[0]<-this.coords.grid_gap&&(i[0]=-this.coords.grid_gap,r[0]=this.toFixed(i[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),r[t-1]>100+this.coords.grid_gap&&(r[t-1]=100+this.coords.grid_gap,i[t-1]=this.toFixed(r[t-1]-this.coords.big_p[t-1]),this.coords.big_x[t-1]=this.toFixed(this.coords.big_p[t-1]-this.coords.grid_gap))),this.calcGridCollision(2,i,r),this.calcGridCollision(4,i,r),n=0;n<t;n++)u=this.$cache.grid_labels[n][0],u.style.marginLeft=-this.coords.big_x[n]+"%"},calcGridCollision:function(n,t,i){for(var u,f,e=this.coords.big_num,r=0;r<e;r+=n){if(u=r+n/2,u>=e)break;f=this.$cache.grid_labels[u][0];f.style.visibility=i[r]<=t[u]?"visible":"hidden"}},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs)&&(this.coords.w_handle=this.options.type==="single"?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%")},update:function(t){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.options=n.extend(this.options,t),this.validate(),this.updateResult(t),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),n.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}};n.fn.ionRangeSlider=function(t){return this.each(function(){n.data(this,"ionRangeSlider")||n.data(this,"ionRangeSlider",new f(this,t,e++))})},function(){for(var r=0,t=["ms","moz","webkit","o"],n=0;n<t.length&&!i.requestAnimationFrame;++n)i.requestAnimationFrame=i[t[n]+"RequestAnimationFrame"],i.cancelAnimationFrame=i[t[n]+"CancelAnimationFrame"]||i[t[n]+"CancelRequestAnimationFrame"];i.requestAnimationFrame||(i.requestAnimationFrame=function(n){var t=(new Date).getTime(),u=Math.max(0,16-(t-r)),f=i.setTimeout(function(){n(t+u)},u);return r=t+u,f});i.cancelAnimationFrame||(i.cancelAnimationFrame=function(n){clearTimeout(n)})}()}(jQuery,document,window,navigator);$(window).scroll(function(){$(".navbar").offset().top>50?$(".navbar-fixed-top").addClass("top-nav-collapse"):$(".navbar-fixed-top").removeClass("top-nav-collapse")});$(function(){$("a.page-scroll").bind("click",function(n){var t=$(this);$("html, body").stop().animate({scrollTop:$(t.attr("href")).offset().top},1500,"easeInOutExpo");n.preventDefault()})});$(function(){$(document).on("scroll",function(){$(window).scrollTop()>100?$(".scroll-top-wrapper").addClass("show"):$(".scroll-top-wrapper").removeClass("show")});$(".scroll-top-wrapper").on("click",scrollToTop)}),function(){var i,n,t=function(n,t){return function(){return n.apply(t,arguments)}};i=function(){function n(){}return n.prototype.extend=function(n,t){var i,r;for(i in n)r=n[i],null!=r&&(t[i]=r);return t},n.prototype.isMobile=function(n){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(n)},n}();n=this.WeakMap||(n=function(){function n(){this.keys=[];this.values=[]}return n.prototype.get=function(n){var t,u,i,f,r;for(r=this.keys,t=i=0,f=r.length;f>i;t=++i)if(u=r[t],u===n)return this.values[t]},n.prototype.set=function(n,t){var i,f,r,e,u;for(u=this.keys,i=r=0,e=u.length;e>r;i=++r)if(f=u[i],f===n)return void(this.values[i]=t);return this.keys.push(n),this.values.push(t)},n}());this.WOW=function(){function r(i){null==i&&(i={});this.scrollCallback=t(this.scrollCallback,this);this.scrollHandler=t(this.scrollHandler,this);this.start=t(this.start,this);this.scrolled=!0;this.config=this.util().extend(i,this.defaults);this.animationNameCache=new n}return r.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0},r.prototype.init=function(){var n;return this.element=window.document.documentElement,"interactive"===(n=document.readyState)||"complete"===n?this.start():document.addEventListener("DOMContentLoaded",this.start)},r.prototype.start=function(){var i,n,r,t;if(this.boxes=this.element.getElementsByClassName(this.config.boxClass),this.boxes.length){if(this.disabled())return this.resetStyle();for(t=this.boxes,n=0,r=t.length;r>n;n++)i=t[n],this.applyStyle(i,!0);return window.addEventListener("scroll",this.scrollHandler,!1),window.addEventListener("resize",this.scrollHandler,!1),this.interval=setInterval(this.scrollCallback,50)}},r.prototype.stop=function(){return window.removeEventListener("scroll",this.scrollHandler,!1),window.removeEventListener("resize",this.scrollHandler,!1),null!=this.interval?clearInterval(this.interval):void 0},r.prototype.show=function(n){return this.applyStyle(n),n.className=""+n.className+" "+this.config.animateClass},r.prototype.applyStyle=function(n,t){var i,r,u;return r=n.getAttribute("data-wow-duration"),i=n.getAttribute("data-wow-delay"),u=n.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(n,t,r,i,u)}}(this))},r.prototype.animate=function(){return"requestAnimationFrame"in window?function(n){return window.requestAnimationFrame(n)}:function(n){return n()}}(),r.prototype.resetStyle=function(){var r,n,u,t,i;for(t=this.boxes,i=[],n=0,u=t.length;u>n;n++)r=t[n],i.push(r.setAttribute("style","visibility: visible;"));return i},r.prototype.customStyle=function(n,t,i,r,u){return t&&this.cacheAnimationName(n),n.style.visibility=t?"hidden":"visible",i&&this.vendorSet(n.style,{animationDuration:i}),r&&this.vendorSet(n.style,{animationDelay:r}),u&&this.vendorSet(n.style,{animationIterationCount:u}),this.vendorSet(n.style,{animationName:t?"none":this.cachedAnimationName(n)}),n},r.prototype.vendors=["moz","webkit"],r.prototype.vendorSet=function(n,t){var i,r,u,f=[];for(i in t)r=t[i],n[""+i]=r,f.push(function(){var t,o,f,e;for(f=this.vendors,e=[],t=0,o=f.length;o>t;t++)u=f[t],e.push(n[""+u+i.charAt(0).toUpperCase()+i.substr(1)]=r);return e}.call(this));return f},r.prototype.vendorCSS=function(n,t){var i,u,e,r,o,f;for(u=window.getComputedStyle(n),i=u.getPropertyCSSValue(t),f=this.vendors,r=0,o=f.length;o>r;r++)e=f[r],i=i||u.getPropertyCSSValue("-"+e+"-"+t);return i},r.prototype.animationName=function(n){var t;try{t=this.vendorCSS(n,"animation-name").cssText}catch(i){t=window.getComputedStyle(n).getPropertyValue("animation-name")}return"none"===t?"":t},r.prototype.cacheAnimationName=function(n){return this.animationNameCache.set(n,this.animationName(n))},r.prototype.cachedAnimationName=function(n){return this.animationNameCache.get(n)},r.prototype.scrollHandler=function(){return this.scrolled=!0},r.prototype.scrollCallback=function(){var n;if(this.scrolled&&(this.scrolled=!1,this.boxes=function(){var t,u,i,r;for(i=this.boxes,r=[],t=0,u=i.length;u>t;t++)n=i[t],n&&(this.isVisible(n)?this.show(n):r.push(n));return r}.call(this),!this.boxes.length))return this.stop()},r.prototype.offsetTop=function(n){for(var t;void 0===n.offsetTop;)n=n.parentNode;for(t=n.offsetTop;n=n.offsetParent;)t+=n.offsetTop;return t},r.prototype.isVisible=function(n){var r,u,t,f,i;return u=n.getAttribute("data-wow-offset")||this.config.offset,i=window.pageYOffset,f=i+this.element.clientHeight-u,t=this.offsetTop(n),r=t+n.clientHeight,f>=t&&r>=i},r.prototype.util=function(){return this._util||(this._util=new i)},r.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},r}()}.call(this);(new WOW).init(),function(n,t,i,r){"use strict";function f(t,i){this.elem=t;this.options=n.extend(!0,{},e,i);this._defaults=e;this._name=u;this._namespace=u.toLowerCase();this.props={thumbs:[],effect:{provider:null,name:null,list:{animate:{css:"animated",bounce:{"in":"bounceInLeft",out:"bounceOutRight"},fade:{"in":"fadeIn",out:"fadeOut"},flipX:{"in":"flipInX",out:"flipOutX"},flipY:{"in":"flipInY",out:"flipOutY"},fun:{"in":"rubberBand",out:"hinge"},light:{"in":"lightSpeedIn",out:"lightSpeedOut"},roll:{"in":"rollIn",out:"rollOut"},rotate:{"in":"rotateIn",out:"rotateOut"},rotateBig:{"in":"rotateInDownLeft",out:"rotateOutUpRight"},sideFade:{"in":"fadeInLeft",out:"fadeOutRight"},sideFadeBig:{"in":"fadeInLeftBig",out:"fadeOutRightBig"},slide:{"in":"slideInLeft",out:"slideOutRight"}},magic:{css:"magictime",foolish:{"in":"foolishIn",out:"foolishOut"},perspective:{"in":"perspectiveLeftRetourn",out:"perspectiveLeft"},puff:{"in":"puffIn",out:"puffOut"},swap:{"in":"swap",out:"magic"},swash:{"in":"swashIn",out:"swashOut"},tin:{"in":"tinLeftIn",out:"tinRightOut"},twister:{"in":"twisterInDown",out:"holeOut"}}}},img:{$elem:null,$overlay:null,to_show:this.options.first,timer:null},controls:{$wrapper:null},is_transition_supported:!1,plugin_status:null};this._init()}var u="desoSlide",e={thumbs:null,imageClass:"img-responsive",auto:{load:!0,start:!1},first:0,interval:1e3,effect:{provider:"animate",name:"fade"},overlay:"always",controls:{show:!0,keys:!1},events:{onThumbClick:null,onImageShow:null,onImageShown:null,onImageHide:null,onImageHidden:null,onImageClick:null,onPrev:null,onPause:null,onPlay:null,onNext:null,onError:null,onWarning:null,onSuccess:null}};f.prototype={_init:function(){var t=this,i;this.options.thumbs===null?this._errorHandler("error","The `thumbs` option doesn't exist."):n(this.options.thumbs).length===0&&this._errorHandler("error","The `thumbs` selector ("+n(this.options.thumbs).selector+") doesn't exist.");i=["always","hover","none"];i.indexOf(this.options.overlay)===-1&&(this._errorHandler("error","Incorrect value for the `overlay` option. Default value is used."),this.options.overlay=this._defaults.overlay);n(this.options.thumbs).each(function(i,u){n(u).attr("href")!==r?n(u).find("img").length?(t.props.thumbs.push({src:n(u).attr("href"),alt:n(u).find("img").attr("alt")||null,caption_title:n(u).find("img").data(t._namespace+"-caption-title")||null,caption_link:n(u).find("img").data(t._namespace+"-caption-link")||null}),n(u).find("img").attr("alt")===r&&t._errorHandler("warning","The `alt` attribute is missing on the "+i+"-indexed thumb, it's mandatory on <img> tags."),n(u).attr("data-"+t._namespace+"-index",i)):t._errorHandler("error","Your link on the "+i+"-indexed thumb must have an `<img>` tag as a child."):t._errorHandler("error","The `href` attribute is missing on the "+i+"-indexed thumb, it's mandatory on `<a>` tags.")});this.options.first>=this.props.thumbs.length&&(this._errorHandler("error","The `first` option must be between 0 and "+(this.props.thumbs.length-1)+". Default value is used."),this.options.first=this._defaults.first,this.props.img.to_show=this._defaults.first);t.props.is_transition_supported=t._supportsTransitions();t._preloading();t._wrapper();t.props.is_transition_supported===!0&&t.setEffect(t.options.effect);this.props.thumbs[this.props.img.to_show]!==r&&t._showImage();t._events()},rebuild:function(){return this._init(),n(this.elem)},getThumbs:function(n){return n!==r?this._isThumbExists(n)===!0?this.props.thumbs[n]:null:this.props.thumbs},setEffect:function(n){var t={provider:null,name:null};return n!==r&&n.provider!==null&&n.name!==null?this.props.effect.list.hasOwnProperty(n.provider)?n.name==="random"?(t.provider=n.provider,t.name=this._getRandomEffect(n.provider)):this.props.effect.list[n.provider].hasOwnProperty(n.name)?(t.provider=n.provider,t.name=n.name):(t.provider=this._defaults.effect.provider,t.name=this._defaults.effect.name,this._errorHandler("error","Incorrect value for the `effect.name` option. Default value is used.")):n==="none"?t.name="none":(t.provider=this._defaults.effect.provider,t.name=this._defaults.effect.name,this._errorHandler("error","Incorrect value for the `effect.provider` option. Default value is used.")):(t.provider=this._defaults.effect.provider,t.name=this._defaults.effect.name,this._errorHandler("error","Incorrect values for `effect.provider` and `effect.name` option. Default value is used.")),this.props.effect.provider=t.provider,this.props.effect.name=t.name,t},isPlaying:function(){return this.options.auto.start},pause:function(){return n(this.options.thumbs).length>1&&this.options.auto.start===!0&&this.props.img.timer&&(this.options.auto.start=!1,this._stopAnimation(),clearTimeout(this.props.img.timer),this.props.controls.$wrapper&&this.props.controls.$wrapper.find('a[href="#pause"]').hide().parent().find('a[href="#play"]').show(),this._triggerEvent("pause")),n(this.elem)},play:function(){return n(this.options.thumbs).length>1&&(this.options.auto.start===!1&&(this.options.auto.start=!0,this.goNext(!0),this.props.controls.$wrapper&&this.props.controls.$wrapper.find('a[href="#play"]').hide().parent().find('a[href="#pause"]').show()),this._triggerEvent("play")),n(this.elem)},goPrev:function(t){if(n(this.options.thumbs).length>1){var i=this;t||this.options.auto.start!==!0||this.pause();this._hideOverlay();this.props.img.to_show--;this.props.img.to_show<0&&(this.props.img.to_show=n(this.options.thumbs).length-1);this._hideImage(function(){i._showImage()});this._triggerEvent("prev")}return n(this.elem)},goNext:function(t){if(n(this.options.thumbs).length>1){var i=this;t||this.options.auto.start!==!0||this.pause();this._hideOverlay();this.props.img.to_show++;this.props.img.to_show>=n(this.options.thumbs).length&&(this.props.img.to_show=0);this._hideImage(function(){i._showImage()});this._triggerEvent("next")}return n(this.elem)},goTo:function(t){if(n(this.options.thumbs).length>1&&this._isThumbExists(t)===!0){var i=this;this.options.auto.start===!0&&this.pause();t!==this.props.img.to_show&&(this._stopAnimation(),this._hideOverlay(),i.props.img.to_show=t,this._hideImage(function(){i._showImage()}))}return n(this.elem)},_supportsTransitions:function(){var f=i.body||i.documentElement,r=f.style,n="transition",u=["Moz","webkit","Webkit","Khtml","O","ms"],t=0;if(typeof r[n]=="string")return!0;for(n=n.charAt(0).toUpperCase()+n.substr(1),t;t<u.length;t++)if(typeof r[u[t]+n]=="string")return!0;return!1},_isThumbExists:function(n){var t;return typeof n=="number"&&(this.props.thumbs[n]!==r?t=!0:(this._errorHandler("error","The "+n+"-indexed thumb doesn't exist."),t=!1)),t},_preloading:function(){this.options.auto.load===!0&&n.each(this.props.thumbs,function(t,i){n("<img>",{src:i.src,alt:i.alt}).hide().appendTo("body")})},_wrapper:function(){var t=n("<img>").attr("alt",this._name).addClass(this.options.imageClass);n(this.elem).html(t).wrapInner(n("<div>",{"class":this._namespace+"-wrapper"}));this.props.img.$elem=n(this.elem).find("img:first")},_clearEffectClass:function(){var n=this,t,i,u;if(this.props.img.$elem.attr("class")!==r){u=this.props.img.$elem.attr("class").split(/\s+/);for(t in n.props.effect.list)if(n.props.effect.list.hasOwnProperty(t))for(i in n.props.effect.list[t])n.props.effect.list[t].hasOwnProperty(i)&&(u.indexOf(n.props.effect.list[t][i])!==-1&&this.props.img.$elem.removeClass(n.props.effect.list[t][i]),n.props.effect.list[t][i].in&&u.indexOf(n.props.effect.list[t][i].in)!==-1&&this.props.img.$elem.removeClass(n.props.effect.list[t][i].in),n.props.effect.list[t][i].out&&u.indexOf(n.props.effect.list[t][i].out)!==-1&&this.props.img.$elem.removeClass(n.props.effect.list[t][i].out))}},_getRandomEffect:function(n){var i,r=0,t;for(t in this.props.effect.list[n])this.props.effect.list[n].hasOwnProperty(t)&&t!=="css"&&Math.random()<1/++r&&(i=t);return i},_hasEffect:function(){return this.props.effect.provider===null&&this.props.effect.name==="none"?!1:!0},_showImage:function(){var t=this;this.props.plugin_status===null&&this._errorHandler();this._triggerEvent("imageShow");this.props.img.$elem.attr("src",this.props.thumbs[this.props.img.to_show].src).attr("alt",this.props.thumbs[this.props.img.to_show].alt).one("load",function(){if(t._hasEffect()===!1)n(this).css("opacity",1),t._overlay(),t._triggerEvent("imageShown");else if(t.props.is_transition_supported===!0)n(this).removeClass(t.props.effect.list[t.props.effect.provider].css+" "+t.props.effect.list[t.props.effect.provider][t.props.effect.name].out).addClass(t.props.effect.list[t.props.effect.provider].css+" "+t.props.effect.list[t.props.effect.provider][t.props.effect.name].in).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){t._overlay();t._triggerEvent("imageShown")});else n(this).css("opacity",0).animate({opacity:1},1e3,function(){t._overlay();t._triggerEvent("imageShown")});t.options.auto.start===!0&&(t.props.img.timer=setTimeout(function(){t.goNext(!0)},t.options.interval<1500?1500:t.options.interval))})},_hideImage:function(n){var t=this;if(this._triggerEvent("imageHide"),this._hasEffect()===!1)this.props.img.$elem.css("opacity",0),t._triggerEvent("imageHidden"),n&&n();else if(t.props.is_transition_supported===!0){this._clearEffectClass();this.props.img.$elem.removeClass(this.props.effect.list[this.props.effect.provider].css+" "+this.props.effect.list[this.props.effect.provider][this.props.effect.name].in).addClass(this.props.effect.list[this.props.effect.provider].css+" "+this.props.effect.list[this.props.effect.provider][this.props.effect.name].out).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){t._triggerEvent("imageHidden");n&&n()})}else this.props.img.$elem.animate({opacity:0},1e3,function(){t._triggerEvent("imageHidden");n&&n()})},_overlay:function(){if(this.options.overlay!=="none"){var i,u,f,r,e,o,s,h,c,l,t;i=this.props.img.$elem.position();r=parseInt(this.props.img.$elem.css("border-left-width"),10);e=this.props.img.$elem.width()+r*2;o=this.props.img.$elem.height();n(this.elem).find("."+this._namespace+"-overlay").length===0&&n("<div>",{"class":this._namespace+"-overlay"}).appendTo(n(this.elem).find("."+this._namespace+"-wrapper"));this.props.img.$overlay=n(this.elem).find("."+this._namespace+"-overlay");s=parseInt(this.props.img.$overlay.css("padding-top"),10);h=parseInt(this.props.img.$overlay.css("padding-bottom"),10);c=parseInt(this.props.img.$overlay.css("padding-left"),10);l=parseInt(this.props.img.$overlay.css("padding-right"),10);t=parseInt(this.props.img.$overlay.css("height"),10)-(c+l);t=parseInt(o,10)-t-(s+h);u=i.top+t+r*2;f=i.left;this.props.img.$overlay.css({left:f+"px",top:u+"px",width:e+"px","border-bottom-left-radius":this.props.img.$elem.css("border-radius"),"border-bottom-right-radius":this.props.img.$elem.css("border-radius")});this.options.overlay==="always"&&this.props.img.$overlay.animate({opacity:.7},this._hasEffect()===!0?500:0);this._caption();this.options.controls.show===!0&&this.props.thumbs.length>1&&this._controls()}},_hideOverlay:function(){this.props.img.$overlay!==null&&this.props.img.$overlay.animate({opacity:0},this._hasEffect()===!0?500:0)},_controls:function(){var i,r,u,f,t;n(this.elem).find("."+this._namespace+"-controls-wrapper").remove();i='<a class="'+this._namespace+'-controls prev" href="#prev"><\/a>';r='<a class="'+this._namespace+'-controls pause" href="#pause"><\/a>';u='<a class="'+this._namespace+'-controls play" href="#play"><\/a>';f='<a class="'+this._namespace+'-controls next" href="#next"><\/a>';t=n("<div>",{"class":this._namespace+"-controls-wrapper"}).append(i+r+u+f);this.props.img.$overlay.find("a:first").length>0?t.appendTo(this.props.img.$overlay.find("a:first")):t.appendTo(this.props.img.$overlay);this.props.controls.$wrapper=n(this.elem).find("."+this._namespace+"-controls-wrapper");this.props.controls.$wrapper.length&&(this.options.auto.start===!0?this.props.controls.$wrapper.find('a[href="#play"]').hide().parent().find('a[href="#pause"]').show():this.props.controls.$wrapper.find('a[href="#pause"]').hide().parent().find('a[href="#play"]').show())},_caption:function(){if(this.props.thumbs[this.props.img.to_show].caption_title!==null){var u,t,i,r,f,e;this.props.img.$overlay.html('<span class="'+this._namespace+'-caption-title">'+this.props.thumbs[this.props.img.to_show].caption_title+"<\/span>");t=this.props.img.$overlay.find("a:first").length>0?!0:!1;i=this.props.thumbs[this.props.img.to_show].caption_link!==null?!0:!1;u='<a href="'+this.props.thumbs[this.props.img.to_show].caption_link+'" target="_blank"><\/a>';t===!0&&i===!0?this.props.img.$overlay.find("a:first").attr("href",this.props.thumbs[this.props.img.to_show].caption_link):t===!0&&i===!1?(r=this.props.img.$overlay.find("a:first"),f=r.children().clone(),e=r.parent(),r.remove(),f.appendTo(e),this.props.img.$overlay.find("span:first").empty()):t===!1&&i===!0&&n(this.elem).find("."+this._namespace+"-overlay span:first").wrap(u)}},_stopAnimation:function(){n(this.elem).stop()},_triggerEvent:function(t){n(this.elem).triggerHandler(t+"."+this._namespace);var i=t.charAt(0).toUpperCase()+t.slice(1);this.options.events["on"+i]&&this.options.events["on"+i](this.props.img.$elem)},_events:function(){var r=this,u;n(this.options.thumbs).on("click",function(t){t.preventDefault();r.goTo(n(this).data(r._namespace+"-index"));r._triggerEvent("thumbClick")});this.props.img.$elem.on("click",function(n){n.preventDefault();r._triggerEvent("imageClick")});n(this.elem).on("click","."+this._namespace+"-controls-wrapper a",n(this.elem),function(t){t.preventDefault();switch(n(this).attr("href")){case"#prev":r.goPrev();break;case"#pause":r.pause();break;case"#play":r.play();break;case"#next":r.goNext()}});n(this.elem).find("."+this._namespace+"-wrapper").on({mouseover:function(){r.options.overlay==="hover"&&r.props.img.$overlay!==null&&r.props.img.$overlay.stop().animate({opacity:.7},400)},mouseleave:function(){r.options.overlay==="hover"&&r.props.img.$overlay!==null&&r.props.img.$overlay.stop().animate({opacity:0},400)}});if(this.options.controls.keys===!0)n(i).on("keydown",function(n){switch(n.which){case 37:r.goPrev();break;case 39:r.goNext();break;case 32:n.preventDefault();r.options.auto.start===!0?r.pause():r.play()}});u=function(){var n=0;return function(t,i){clearTimeout(n);n=setTimeout(t,i)}}();this.options.overlay!=="none"&&n(t).bind("resize",function(){u(function(){r._overlay()},100)})},_errorHandler:function(n,t){switch(n){case"error":console!==r&&console.error(this._name+": "+t+" Check out the documentation.");this._triggerEvent("error");this.props.plugin_status=n;break;case"warning":console!==r&&console.warn(this._name+": "+t);this._triggerEvent("warning");this.props.plugin_status=n;break;default:this._triggerEvent("success");this.props.plugin_status=n}}};n.fn[u]=function(t){var o=arguments,i,e;return t===r||typeof t=="object"?e=this.each(function(){n.data(this,"plugin_"+u)||n.data(this,"plugin_"+u,new f(this,t))}):typeof t=="string"&&t[0]!=="_"?(i=n.data(this[0],"plugin_"+u),i[t]!==r&&(e=i[t].apply(i,Array.prototype.slice.call(o,1)))):e=this.each(function(){i=n.data(this,"plugin_"+u);i instanceof f&&typeof i[t]=="function"&&i[t].apply(i,Array.prototype.slice.call(o,1))}),e}}(jQuery,window,document);$(function(){$("#tour-gallery").desoSlide({thumbs:$("#tour-gallery_thumbs li > a"),overlay:"hover",controls:{show:!1,keys:!1}})});x=document.cookie;cookieresult=getCookie(x);cookieresult!="=CN"&&(url=window.location.href,gtrack=url.toLowerCase().indexOf("www.easybook.com")>-1?"GTM-TTWB4B7":"GTM-N7STKCF",function(n,t,i,r,u){n[r]=n[r]||[];n[r].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var e=t.getElementsByTagName(i)[0],f=t.createElement(i),o=r!="dataLayer"?"&l="+r:"";f.async=!0;f.src="https://www.googletagmanager.com/gtm.js?id="+u+o;e.parentNode.insertBefore(f,e)}(window,document,"script","dataLayer",gtrack));bemob=bemobGetCookie("bemob");let temp=getQueryStringValueByName("cid");temp!=null&&temp!=""&&bemob!=temp&&bemobSetCookie("bemob",temp,1);confettiPlayers=[];$(document).ready(function(){makeItConfetti()})