PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/hotebooking.site/wp-content/themes/traveler/dist/mobile/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/hotebooking.site/wp-content/themes/traveler/dist/mobile/traveler.min-copy.js

if(window.Modernizr=function(t,h,s){function a(t,e){return typeof t===e}function r(t,e){for(var i in t){var o=t[i];if(!~(""+o).indexOf("-")&&d[o]!==s)return"pfx"!=e||o}return!1}function o(t,e,i){var o=t.charAt(0).toUpperCase()+t.slice(1),n=(t+" "+g.join(o+" ")+o).split(" ");return a(e,"string")||a(e,"undefined")?r(n,e):function(t,e,i){for(var o in t){var n=e[t[o]];if(n!==s)return!1===i?t[o]:a(n,"function")?n.bind(i||e):n}return!1}(n=(t+" "+v.join(o+" ")+o).split(" "),e,i)}var e,n,i,l={},p=h.documentElement,u="modernizr",c=h.createElement(u),d=c.style,f=" -webkit- -moz- -o- -ms- ".split(" "),m="Webkit Moz O ms",g=m.split(" "),v=m.toLowerCase().split(" "),_={},y=[],b=y.slice,w=function(t,e,i,o){var n,s,a,r,l=h.createElement("div"),c=h.body,d=c||h.createElement("body");if(parseInt(i,10))for(;i--;)(a=h.createElement("div")).id=o?o[i]:u+(i+1),l.appendChild(a);return n=["&#173;",'<style id="s',u,'">',t,"</style>"].join(""),l.id=u,(c?l:d).innerHTML+=n,d.appendChild(l),c||(d.style.background="",d.style.overflow="hidden",r=p.style.overflow,p.style.overflow="hidden",p.appendChild(d)),s=e(l,t),c?l.parentNode.removeChild(l):(d.parentNode.removeChild(d),p.style.overflow=r),!!s},k={}.hasOwnProperty;for(var x in n=a(k,"undefined")||a(k.call,"undefined")?function(t,e){return e in t&&a(t.constructor.prototype[e],"undefined")}:function(t,e){return k.call(t,e)},Function.prototype.bind||(Function.prototype.bind=function(o){var n=this;if("function"!=typeof n)throw new TypeError;var s=b.call(arguments,1),a=function(){if(this instanceof a){var t=function(){};t.prototype=n.prototype;var e=new t,i=n.apply(e,s.concat(b.call(arguments)));return Object(i)===i?i:e}return n.apply(o,s.concat(b.call(arguments)))};return a}),_.touch=function(){var e;return"ontouchstart"in t||t.DocumentTouch&&h instanceof DocumentTouch?e=!0:w(["@media (",f.join("touch-enabled),("),u,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(t){e=9===t.offsetTop}),e},_.backgroundsize=function(){return o("backgroundSize")},_.csstransforms3d=function(){var i=!!o("perspective");return i&&"webkitPerspective"in p.style&&w("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t,e){i=9===t.offsetLeft&&3===t.offsetHeight}),i},_.csstransitions=function(){return o("transition")},_)n(_,x)&&(e=x.toLowerCase(),l[e]=_[x](),y.push((l[e]?"":"no-")+e));return l.addTest=function(t,e){if("object"==typeof t)for(var i in t)n(t,i)&&l.addTest(i,t[i]);else{if(t=t.toLowerCase(),l[t]!==s)return l;e="function"==typeof e?e():e,p.className+=" "+(e?"":"no-")+t,l[t]=e}return l},i="",d.cssText=i,c=null,function(t,l){function c(){var t=f.elements;return"string"==typeof t?t.split(" "):t}function d(t){var e=r[t[o]];return e||(e={},a++,t[o]=a,r[a]=e),e}function h(t,e,i){return e||(e=l),u?e.createElement(t):(i||(i=d(e)),(o=i.cache[t]?i.cache[t].cloneNode():s.test(t)?(i.cache[t]=i.createElem(t)).cloneNode():i.createElem(t)).canHaveChildren&&!n.test(t)?i.frag.appendChild(o):o);var o}function e(t){t||(t=l);var e,i,o,n,s,a,r=d(t);return f.shivCSS&&!p&&!r.hasCSS&&(r.hasCSS=(n="article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}",s=(o=t).createElement("p"),a=o.getElementsByTagName("head")[0]||o.documentElement,s.innerHTML="x<style>"+n+"</style>",!!a.insertBefore(s.lastChild,a.firstChild))),u||(e=t,(i=r).cache||(i.cache={},i.createElem=e.createElement,i.createFrag=e.createDocumentFragment,i.frag=i.createFrag()),e.createElement=function(t){return f.shivMethods?h(t,e,i):i.createElem(t)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+c().join().replace(/\w+/g,function(t){return i.createElem(t),i.frag.createElement(t),'c("'+t+'")'})+");return n}")(f,i.frag)),t}var p,u,i=t.html5||{},n=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,s=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,o="_html5shiv",a=0,r={};!function(){try{var t=l.createElement("a");t.innerHTML="<xyz></xyz>",p="hidden"in t,u=1==t.childNodes.length||function(){l.createElement("a");var t=l.createDocumentFragment();return void 0===t.cloneNode||void 0===t.createDocumentFragment||void 0===t.createElement}()}catch(t){u=p=!0}}();var f={elements:i.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!1!==i.shivCSS,supportsUnknownElements:u,shivMethods:!1!==i.shivMethods,type:"default",shivDocument:e,createElement:h,createDocumentFragment:function(t,e){if(t||(t=l),u)return t.createDocumentFragment();for(var i=(e=e||d(t)).frag.cloneNode(),o=0,n=c(),s=n.length;o<s;o++)i.createElement(n[o]);return i}};t.html5=f,e(l)}(this,h),l._version="2.6.2",l._prefixes=f,l._domPrefixes=v,l._cssomPrefixes=g,l.testProp=function(t){return r([t])},l.testAllProps=o,l.testStyles=w,l.prefixed=function(t,e,i){return e?o(t,e,i):o(t,"pfx")},p.className=p.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+" js "+y.join(" "),l}(this,this.document),function(t,p,r){function h(t){return"[object Function]"==n.call(t)}function u(t){return"string"==typeof t}function f(){}function m(t){return!t||"loaded"==t||"complete"==t||"uninitialized"==t}function g(){var t=b.shift();w=1,t?t.t?_(function(){("c"==t.t?v.injectCss:v.injectJs)(t.s,0,t.a,t.x,t.e,1)},0):(t(),g()):w=0}function e(t,e,i,o,n){return w=0,e=e||"j",u(t)?function(i,o,t,e,n,s,a){function r(t){if(!c&&m(l.readyState)&&(h.r=c=1,!w&&g(),l.onload=l.onreadystatechange=null,t))for(var e in"img"!=i&&_(function(){x.removeChild(l)},50),S[o])S[o].hasOwnProperty(e)&&S[o][e].onload()}a=a||v.errorTimeout;var l=p.createElement(i),c=0,d=0,h={t:t,s:o,e:n,a:s,x:a};1===S[o]&&(d=1,S[o]=[]),"object"==i?l.data=o:(l.src=o,l.type=i),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){r.call(this,d)},b.splice(e,0,h),"img"!=i&&(d||2===S[o]?(x.insertBefore(l,k?null:y),_(r,a)):S[o].push(l))}("c"==e?c:a,t,e,this.i++,i,o,n):(b.splice(this.i++,0,t),1==b.length&&g()),this}function l(){var t=v;return t.loader={load:e,i:0},t}var i,v,o=p.documentElement,_=t.setTimeout,y=p.getElementsByTagName("script")[0],n={}.toString,b=[],w=0,s="MozAppearance"in o.style,k=s&&!!p.createRange().compareNode,x=k?o:y.parentNode,a=(o=t.opera&&"[object Opera]"==n.call(t.opera),o=!!p.attachEvent&&!o,s?"object":o?"script":"img"),c=o?"script":a,C=Array.isArray||function(t){return"[object Array]"==n.call(t)},T=[],S={},D={timeout:function(t,e){return e.length&&(t.timeout=e[0]),t}};(v=function(t){function d(t,e,i,o,n){var s=function(t){t=t.split("!");var e,i,o,n=T.length,s=t.pop(),a=t.length;for(s={url:s,origUrl:s,prefixes:t},i=0;i<a;i++)o=t[i].split("="),(e=D[o.shift()])&&(s=e(s,o));for(i=0;i<n;i++)s=T[i](s);return s}(t),a=s.autoCallback;s.url.split(".").pop().split("?").shift(),s.bypass||(e&&(e=h(e)?e:e[t]||e[o]||e[t.split("/").pop().split("?")[0]]),s.instead?s.instead(t,e,i,o,n):(S[s.url]?s.noexec=!0:S[s.url]=1,i.load(s.url,s.forceCSS||!s.forceJS&&"css"==s.url.split(".").pop().split("?").shift()?"c":r,s.noexec,s.attrs,s.timeout),(h(e)||h(a))&&i.load(function(){l(),e&&e(s.origUrl,n,o),a&&a(s.origUrl,n,o),S[s.url]=2})))}function e(t,e){function i(i,t){if(i){if(u(i))t||(r=function(){var t=[].slice.call(arguments);l.apply(this,t),c()}),d(i,r,e,0,s);else if(Object(i)===i)for(n in o=function(){var t,e=0;for(t in i)i.hasOwnProperty(t)&&e++;return e}(),i)i.hasOwnProperty(n)&&(!t&&!--o&&(h(r)?r=function(){var t=[].slice.call(arguments);l.apply(this,t),c()}:r[n]=function(e){return function(){var t=[].slice.call(arguments);e&&e.apply(this,t),c()}}(l[n])),d(i[n],r,e,n,s))}else!t&&c()}var o,n,s=!!t.test,a=t.load||t.both,r=t.callback||f,l=r,c=t.complete||f;i(s?t.yep:t.nope,!!a),a&&i(a)}var i,o,n=this.yepnope.loader;if(u(t))d(t,0,n,0);else if(C(t))for(i=0;i<t.length;i++)u(o=t[i])?d(o,0,n,0):C(o)?v(o):Object(o)===o&&e(o,n);else Object(t)===t&&e(t,n)}).addPrefix=function(t,e){D[t]=e},v.addFilter=function(t){T.push(t)},v.errorTimeout=1e4,null==p.readyState&&p.addEventListener&&(p.readyState="loading",p.addEventListener("DOMContentLoaded",i=function(){p.removeEventListener("DOMContentLoaded",i,0),p.readyState="complete"},0)),t.yepnope=l(),t.yepnope.executeStack=g,t.yepnope.injectJs=function(t,e,i,o,n,s){var a,r,l=p.createElement("script");o=o||v.errorTimeout;for(r in l.src=t,i)l.setAttribute(r,i[r]);e=s?g:e||f,l.onreadystatechange=l.onload=function(){!a&&m(l.readyState)&&(a=1,e(),l.onload=l.onreadystatechange=null)},_(function(){a||e(a=1)},o),n?l.onload():y.parentNode.insertBefore(l,y)},t.yepnope.injectCss=function(t,e,i,o,n,s){var a;o=p.createElement("link"),e=s?g:e||f;for(a in o.href=t,o.rel="stylesheet",o.type="text/css",i)o.setAttribute(a,i[a]);n||(y.parentNode.insertBefore(o,y),_(e,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");function MarkerClusterer(t,e,i){this.extend(MarkerClusterer,google.maps.OverlayView),this.map_=t,this.markers_=[],this.clusters_=[],this.sizes=[53,56,66,78,90],this.styles_=[],this.ready_=!1;var o=i||{};this.gridSize_=o.gridSize||60,this.minClusterSize_=o.minimumClusterSize||2,this.maxZoom_=o.maxZoom||null,this.styles_=o.styles||[],this.imagePath_=o.imagePath||this.MARKER_CLUSTER_IMAGE_PATH_,this.imageExtension_=o.imageExtension||this.MARKER_CLUSTER_IMAGE_EXTENSION_,this.zoomOnClick_=!0,null!=o.zoomOnClick&&(this.zoomOnClick_=o.zoomOnClick),this.averageCenter_=!1,null!=o.averageCenter&&(this.averageCenter_=o.averageCenter),this.setupStyles_(),this.setMap(t),this.prevZoom_=this.map_.getZoom();var n=this;google.maps.event.addListener(this.map_,"zoom_changed",function(){var t=n.map_.getZoom();n.prevZoom_!=t&&(n.prevZoom_=t,n.resetViewport())}),google.maps.event.addListener(this.map_,"idle",function(){n.redraw()}),e&&e.length&&this.addMarkers(e,!1)}function Cluster(t){this.markerClusterer_=t,this.map_=t.getMap(),this.gridSize_=t.getGridSize(),this.minClusterSize_=t.getMinClusterSize(),this.averageCenter_=t.isAverageCenter(),this.center_=null,this.markers_=[],this.bounds_=null,this.clusterIcon_=new ClusterIcon(this,t.getStyles(),t.getGridSize())}function ClusterIcon(t,e,i){t.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView),this.styles_=e,this.padding_=i||0,this.cluster_=t,this.center_=null,this.map_=t.getMap(),this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(this.map_)}if(function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||2<e[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(),function(o){"use strict";o.fn.emulateTransitionEnd=function(t){var e=!1,i=this;o(this).one("bsTransitionEnd",function(){e=!0});return setTimeout(function(){e||o(i).trigger(o.support.transition.end)},t),this},o(function(){o.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}(),o.support.transition&&(o.event.special.bsTransitionEnd={bindType:o.support.transition.end,delegateType:o.support.transition.end,handle:function(t){return o(t.target).is(this)?t.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),function(s){"use strict";var e='[data-dismiss="alert"]',a=function(t){s(t).on("click",e,this.close)};a.VERSION="3.3.6",a.TRANSITION_DURATION=150,a.prototype.close=function(t){function e(){n.detach().trigger("closed.bs.alert").remove()}var i=s(this),o=i.attr("data-target");o||(o=(o=i.attr("href"))&&o.replace(/.*(?=#[^\s]*$)/,""));var n=s(o);t&&t.preventDefault(),n.length||(n=i.closest(".alert")),n.trigger(t=s.Event("close.bs.alert")),t.isDefaultPrevented()||(n.removeClass("in"),s.support.transition&&n.hasClass("fade")?n.one("bsTransitionEnd",e).emulateTransitionEnd(a.TRANSITION_DURATION):e())};var t=s.fn.alert;s.fn.alert=function(i){return this.each(function(){var t=s(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new a(this)),"string"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=a,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on("click.bs.alert.data-api",e,a.prototype.close)}(jQuery),function(s){"use strict";function i(o){return this.each(function(){var t=s(this),e=t.data("bs.button"),i="object"==typeof o&&o;e||t.data("bs.button",e=new n(this,i)),"toggle"==o?e.toggle():o&&e.setState(o)})}var n=function(t,e){this.$element=s(t),this.options=s.extend({},n.DEFAULTS,e),this.isLoading=!1};n.VERSION="3.3.6",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var e="disabled",i=this.$element,o=i.is("input")?"val":"html",n=i.data();t+="Text",null==n.resetText&&i.data("resetText",i[o]()),setTimeout(s.proxy(function(){i[o](null==n[t]?this.options[t]:n[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(e).attr(e,e)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var t=s.fn.button;s.fn.button=i,s.fn.button.Constructor=n,s.fn.button.noConflict=function(){return s.fn.button=t,this},s(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=s(t.target);e.hasClass("btn")||(e=e.closest(".btn")),i.call(e,"toggle"),s(t.target).is('input[type="radio"]')||s(t.target).is('input[type="checkbox"]')||t.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){s(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(h){"use strict";function a(n){return this.each(function(){var t=h(this),e=t.data("bs.carousel"),i=h.extend({},p.DEFAULTS,t.data(),"object"==typeof n&&n),o="string"==typeof n?n:i.slide;e||t.data("bs.carousel",e=new p(this,i)),"number"==typeof n?e.to(n):o?e[o]():i.interval&&e.pause().cycle()})}var p=function(t,e){this.$element=h(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",h.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",h.proxy(this.pause,this)).on("mouseleave.bs.carousel",h.proxy(this.cycle,this))};p.VERSION="3.3.6",p.TRANSITION_DURATION=600,p.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},p.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},p.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(h.proxy(this.next,this),this.options.interval)),this},p.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},p.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var o=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(o)},p.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||t<0?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",this.$items.eq(t))},p.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&h.support.transition&&(this.$element.trigger(h.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},p.prototype.next=function(){return this.sliding?void 0:this.slide("next")},p.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},p.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),o=e||this.getItemForDirection(t,i),n=this.interval,s="next"==t?"left":"right",a=this;if(o.hasClass("active"))return this.sliding=!1;var r=o[0],l=h.Event("slide.bs.carousel",{relatedTarget:r,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,n&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var c=h(this.$indicators.children()[this.getItemIndex(o)]);c&&c.addClass("active")}var d=h.Event("slid.bs.carousel",{relatedTarget:r,direction:s});return h.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",function(){o.removeClass([t,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger(d)},0)}).emulateTransitionEnd(p.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),n&&this.cycle(),this}};var t=h.fn.carousel;h.fn.carousel=a,h.fn.carousel.Constructor=p,h.fn.carousel.noConflict=function(){return h.fn.carousel=t,this};var e=function(t){var e,i=h(this),o=h(i.attr("data-target")||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var n=h.extend({},o.data(),i.data()),s=i.attr("data-slide-to");s&&(n.interval=!1),a.call(o,n),s&&o.data("bs.carousel").to(s),t.preventDefault()}};h(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),h(window).on("load",function(){h('[data-ride="carousel"]').each(function(){var t=h(this);a.call(t,t.data())})})}(jQuery),function(a){"use strict";function n(t){var e,i=t.attr("data-target")||(e=t.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"");return a(i)}function r(o){return this.each(function(){var t=a(this),e=t.data("bs.collapse"),i=a.extend({},l.DEFAULTS,t.data(),"object"==typeof o&&o);!e&&i.toggle&&/show|hide/.test(o)&&(i.toggle=!1),e||t.data("bs.collapse",e=new l(this,i)),"string"==typeof o&&e[o]()})}var l=function(t,e){this.$element=a(t),this.options=a.extend({},l.DEFAULTS,e),this.$trigger=a('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};l.VERSION="3.3.6",l.TRANSITION_DURATION=350,l.DEFAULTS={toggle:!0},l.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},l.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&((t=e.data("bs.collapse"))&&t.transitioning))){var i=a.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){e&&e.length&&(r.call(e,"hide"),t||e.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var n=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return n.call(this);var s=a.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",a.proxy(n,this)).emulateTransitionEnd(l.TRANSITION_DURATION)[o](this.$element[0][s])}}}},l.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=a.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[e](0).one("bsTransitionEnd",a.proxy(i,this)).emulateTransitionEnd(l.TRANSITION_DURATION):i.call(this)}}},l.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},l.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(t,e){var i=a(e);this.addAriaAndCollapsedClass(n(i),i)},this)).end()},l.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var t=a.fn.collapse;a.fn.collapse=r,a.fn.collapse.Constructor=l,a.fn.collapse.noConflict=function(){return a.fn.collapse=t,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e=a(this);e.attr("data-target")||t.preventDefault();var i=n(e),o=i.data("bs.collapse")?"toggle":e.data();r.call(i,o)})}(jQuery),function(a){"use strict";function r(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i=e&&a(e);return i&&i.length?i:t.parent()}function s(o){o&&3===o.which||(a(t).remove(),a(l).each(function(){var t=a(this),e=r(t),i={relatedTarget:this};e.hasClass("open")&&(o&&"click"==o.type&&/input|textarea/i.test(o.target.tagName)&&a.contains(e[0],o.target)||(e.trigger(o=a.Event("hide.bs.dropdown",i)),o.isDefaultPrevented()||(t.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",i)))))}))}var t=".dropdown-backdrop",l='[data-toggle="dropdown"]',o=function(t){a(t).on("click.bs.dropdown",this.toggle)};o.VERSION="3.3.6",o.prototype.toggle=function(t){var e=a(this);if(!e.is(".disabled, :disabled")){var i=r(e),o=i.hasClass("open");if(s(),!o){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",s);var n={relatedTarget:this};if(i.trigger(t=a.Event("show.bs.dropdown",n)),t.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(a.Event("shown.bs.dropdown",n))}return!1}},o.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var e=a(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=r(e),o=i.hasClass("open");if(!o&&27!=t.which||o&&27==t.which)return 27==t.which&&i.find(l).trigger("focus"),e.trigger("click");var n=i.find(".dropdown-menu li:not(.disabled):visible a");if(n.length){var s=n.index(t.target);38==t.which&&0<s&&s--,40==t.which&&s<n.length-1&&s++,~s||(s=0),n.eq(s).trigger("focus")}}}};var e=a.fn.dropdown;a.fn.dropdown=function(i){return this.each(function(){var t=a(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new o(this)),"string"==typeof i&&e[i].call(t)})},a.fn.dropdown.Constructor=o,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=e,this},a(document).on("click.bs.dropdown.data-api",s).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",l,o.prototype.toggle).on("keydown.bs.dropdown.data-api",l,o.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",o.prototype.keydown)}(jQuery),function(s){"use strict";function a(o,n){return this.each(function(){var t=s(this),e=t.data("bs.modal"),i=s.extend({},r.DEFAULTS,t.data(),"object"==typeof o&&o);e||t.data("bs.modal",e=new r(this,i)),"string"==typeof o?e[o](n):i.show&&e.show(n)})}var r=function(t,e){this.options=e,this.$body=s(document.body),this.$element=s(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,s.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};r.VERSION="3.3.6",r.TRANSITION_DURATION=300,r.BACKDROP_TRANSITION_DURATION=150,r.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},r.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},r.prototype.show=function(i){var o=this,t=s.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',s.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(t){s(t.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var t=s.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),t&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var e=s.Event("shown.bs.modal",{relatedTarget:i});t?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(r.TRANSITION_DURATION):o.$element.trigger("focus").trigger(e)}))},r.prototype.hide=function(t){t&&t.preventDefault(),t=s.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),s(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),s.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",s.proxy(this.hideModal,this)).emulateTransitionEnd(r.TRANSITION_DURATION):this.hideModal())},r.prototype.enforceFocus=function(){s(document).off("focusin.bs.modal").on("focusin.bs.modal",s.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},r.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",s.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},r.prototype.resize=function(){this.isShown?s(window).on("resize.bs.modal",s.proxy(this.handleUpdate,this)):s(window).off("resize.bs.modal")},r.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},r.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},r.prototype.backdrop=function(t){var e=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=s.support.transition&&i;if(this.$backdrop=s(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",s.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(r.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var n=function(){e.removeBackdrop(),t&&t()};s.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(r.BACKDROP_TRANSITION_DURATION):n()}else t&&t()},r.prototype.handleUpdate=function(){this.adjustDialog()},r.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},r.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},r.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},r.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},r.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},r.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=s.fn.modal;s.fn.modal=a,s.fn.modal.Constructor=r,s.fn.modal.noConflict=function(){return s.fn.modal=t,this},s(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=s(this),i=e.attr("href"),o=s(e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),n=o.data("bs.modal")?"toggle":s.extend({remote:!/#/.test(i)&&i},o.data(),e.data());e.is("a")&&t.preventDefault(),o.one("show.bs.modal",function(t){t.isDefaultPrevented()||o.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),a.call(o,n,this)})}(jQuery),function(m){"use strict";var g=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};g.VERSION="3.3.6",g.TRANSITION_DURATION=150,g.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},g.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=m(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&m(m.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,m.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,m.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,m.proxy(this.leave,this))}}this.options.selector?this._options=m.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},g.prototype.getDefaults=function(){return g.DEFAULTS},g.prototype.getOptions=function(t){return(t=m.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},g.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&m.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},g.prototype.enter=function(t){var e=t instanceof this.constructor?t:m(t.currentTarget).data("bs."+this.type);return e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),m(t.currentTarget).data("bs."+this.type,e)),t instanceof m.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState?void(e.hoverState="in"):(clearTimeout(e.timeout),e.hoverState="in",e.options.delay&&e.options.delay.show?void(e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)):e.show())},g.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},g.prototype.leave=function(t){var e=t instanceof this.constructor?t:m(t.currentTarget).data("bs."+this.type);return e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),m(t.currentTarget).data("bs."+this.type,e)),t instanceof m.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),e.isInStateTrue()?void 0:(clearTimeout(e.timeout),e.hoverState="out",e.options.delay&&e.options.delay.hide?void(e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)):e.hide())},g.prototype.show=function(){var t=m.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=m.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),c=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var h=s,p=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>p.bottom?"top":"top"==s&&l.top-d<p.top?"bottom":"right"==s&&l.right+c>p.width?"left":"left"==s&&l.left-c<p.left?"right":s,o.removeClass(h).addClass(s)}var u=this.getCalculatedOffset(s,l,c,d);this.applyPlacement(u,s);var f=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};m.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",f).emulateTransitionEnd(g.TRANSITION_DURATION):f()}},g.prototype.applyPlacement=function(t,e){var i=this.tip(),o=i[0].offsetWidth,n=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,m.offset.setOffset(i[0],m.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),i.addClass("in");var r=i[0].offsetWidth,l=i[0].offsetHeight;"top"==e&&l!=n&&(t.top=t.top+n-l);var c=this.getViewportAdjustedDelta(e,t,r,l);c.left?t.left+=c.left:t.top+=c.top;var d=/top|bottom/.test(e),h=d?2*c.left-o+r:2*c.top-n+l,p=d?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(h,i[0][p],d)},g.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},g.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},g.prototype.hide=function(t){function e(){"in"!=i.hoverState&&o.detach(),i.$element.removeAttr("aria-describedby").trigger("hidden.bs."+i.type),t&&t()}var i=this,o=m(this.$tip),n=m.Event("hide.bs."+this.type);return this.$element.trigger(n),n.isDefaultPrevented()?void 0:(o.removeClass("in"),m.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",e).emulateTransitionEnd(g.TRANSITION_DURATION):e(),this.hoverState=null,this)},g.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},g.prototype.hasContent=function(){return this.getTitle()},g.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],i="BODY"==e.tagName,o=e.getBoundingClientRect();null==o.width&&(o=m.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var n=i?{top:0,left:0}:t.offset(),s={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},a=i?{width:m(window).width(),height:m(window).height()}:null;return m.extend({},o,s,a,n)},g.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},g.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var c=e.left-s,d=e.left+s+i;c<a.left?n.left=a.left-c:d>a.right&&(n.left=a.left+a.width-d)}return n},g.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},g.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},g.prototype.tip=function(){if(!this.$tip&&(this.$tip=m(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},g.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},g.prototype.enable=function(){this.enabled=!0},g.prototype.disable=function(){this.enabled=!1},g.prototype.toggleEnabled=function(){this.enabled=!this.enabled},g.prototype.toggle=function(t){var e=this;t&&((e=m(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),m(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},g.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null})};var t=m.fn.tooltip;m.fn.tooltip=function(o){return this.each(function(){var t=m(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;(e||!/destroy|hide/.test(o))&&(e||t.data("bs.tooltip",e=new g(this,i)),"string"==typeof o&&e[o]())})},m.fn.tooltip.Constructor=g,m.fn.tooltip.noConflict=function(){return m.fn.tooltip=t,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.3.6",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype),(s.prototype.constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;(e||!/destroy|hide/.test(o))&&(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(s(t).is(document.body)?window:t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.3.6",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<n[0])return this.activeTarget=null,this.clear();for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(void 0===n[t+1]||e<n[t+1])&&this.activate(s[t])},n.prototype.activate=function(t){this.activeTarget=t,this.clear();var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=s(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},n.prototype.clear=function(){s(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var t=s.fn.scrollspy;s.fn.scrollspy=e,s.fn.scrollspy.Constructor=n,s.fn.scrollspy.noConflict=function(){return s.fn.scrollspy=t,this},s(window).on("load.bs.scrollspy.data-api",function(){s('[data-spy="scroll"]').each(function(){var t=s(this);e.call(t,t.data())})})}(jQuery),function(r){"use strict";function e(i){return this.each(function(){var t=r(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new a(this)),"string"==typeof i&&e[i]()})}var a=function(t){this.element=r(t)};a.VERSION="3.3.6",a.TRANSITION_DURATION=150,a.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var o=e.find(".active:last a"),n=r.Event("hide.bs.tab",{relatedTarget:t[0]}),s=r.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(n),t.trigger(s),!s.isDefaultPrevented()&&!n.isDefaultPrevented()){var a=r(i);this.activate(t.closest("li"),e),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},a.prototype.activate=function(t,e,i){function o(){n.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}var n=e.find("> .active"),s=i&&r.support.transition&&(n.length&&n.hasClass("fade")||!!e.find("> .fade").length);n.length&&s?n.one("bsTransitionEnd",o).emulateTransitionEnd(a.TRANSITION_DURATION):o(),n.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new c(this,i)),"string"==typeof o&&e[o]()})}var c=function(t,e){this.options=l.extend({},c.DEFAULTS,e),this.$target=l(this.options.target).on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n<i&&"top";if("bottom"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&"bottom":!(n+a<=t-o)&&"bottom";var r=null==this.affixed,l=r?n:s.top;return null!=i&&n<=i?"top":null!=o&&t-o<=l+(r?a:e)&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},c.prototype.checkPositionWithEventLoop=function(){setTimeout(l.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),e=this.options.offset,i=e.top,o=e.bottom,n=Math.max(l(document).height(),l(document.body).height());"object"!=typeof e&&(o=i=e),"function"==typeof i&&(i=e.top(this.$element)),"function"==typeof o&&(o=e.bottom(this.$element));var s=this.getState(n,t,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var a="affix"+(s?"-"+s:""),r=l.Event(a+".bs.affix");if(this.$element.trigger(r),r.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(a).trigger(a.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:n-t-o})}};var t=l.fn.affix;l.fn.affix=i,l.fn.affix.Constructor=c,l.fn.affix.noConflict=function(){return l.fn.affix=t,this},l(window).on("load",function(){l('[data-spy="affix"]').each(function(){var t=l(this),e=t.data();e.offset=e.offset||{},null!=e.offsetBottom&&(e.offset.bottom=e.offsetBottom),null!=e.offsetTop&&(e.offset.top=e.offsetTop),i.call(t,e)})})}(jQuery),function(){"use strict";function e(t){if(!t)throw new Error("No options passed to Waypoint constructor");if(!t.element)throw new Error("No element option passed to Waypoint constructor");if(!t.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+i,this.options=e.Adapter.extend({},e.defaults,t),this.element=this.options.element,this.adapter=new e.Adapter(this.element),this.callback=t.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=e.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=e.Context.findOrCreateByElement(this.options.context),e.offsetAliases[this.options.offset]&&(this.options.offset=e.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),s[this.key]=this,i+=1}var i=0,s={};e.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},e.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},e.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete s[this.key]},e.prototype.disable=function(){return this.enabled=!1,this},e.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},e.prototype.next=function(){return this.group.next(this)},e.prototype.previous=function(){return this.group.previous(this)},e.invokeAll=function(t){var e=[];for(var i in s)e.push(s[i]);for(var o=0,n=e.length;o<n;o++)e[o][t]()},e.destroyAll=function(){e.invokeAll("destroy")},e.disableAll=function(){e.invokeAll("disable")},e.enableAll=function(){for(var t in e.Context.refreshAll(),s)s[t].enabled=!0;return this},e.refreshAll=function(){e.Context.refreshAll()},e.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},e.viewportWidth=function(){return document.documentElement.clientWidth},e.adapters=[],e.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},e.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=e}(),function(){"use strict";function e(t){window.setTimeout(t,1e3/60)}function i(t){this.element=t,this.Adapter=g.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+o,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,n[t.waypointContextKey]=this,o+=1,g.windowContext||(g.windowContext=!0,g.windowContext=new i(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var o=0,n={},g=window.Waypoint,t=window.onload;i.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},i.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete n[this.key])},i.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,g.requestAnimationFrame(t))})},i.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||g.isTouch)&&(e.didScroll=!0,g.requestAnimationFrame(t))})},i.prototype.handleResize=function(){g.Context.refreshAll()},i.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s];if(null!==a.triggerPoint){var r=o.oldScroll<a.triggerPoint,l=o.newScroll>=a.triggerPoint;(r&&l||!r&&!l)&&(a.queueTrigger(n),t[a.group.id]=a.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},i.prototype.innerHeight=function(){return this.element==this.element.window?g.viewportHeight():this.adapter.innerHeight()},i.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},i.prototype.innerWidth=function(){return this.element==this.element.window?g.viewportWidth():this.adapter.innerWidth()},i.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;o<n;o++)t[o].destroy()},i.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};for(var n in this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}}){var s=t[n];for(var a in this.waypoints[n]){var r,l,c,d,h=this.waypoints[n][a],p=h.options.offset,u=h.triggerPoint,f=0,m=null==u;h.element!==h.element.window&&(f=h.adapter.offset()[s.offsetProp]),"function"==typeof p?p=p.apply(h):"string"==typeof p&&(p=parseFloat(p),-1<h.options.offset.indexOf("%")&&(p=Math.ceil(s.contextDimension*p/100))),r=s.contextScroll-s.contextOffset,h.triggerPoint=Math.floor(f+r-p),l=u<s.oldScroll,c=h.triggerPoint>=s.oldScroll,d=!l&&!c,!m&&(l&&c)?(h.queueTrigger(s.backward),o[h.group.id]=h.group):!m&&d?(h.queueTrigger(s.forward),o[h.group.id]=h.group):m&&s.oldScroll>=h.triggerPoint&&(h.queueTrigger(s.forward),o[h.group.id]=h.group)}}return g.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},i.findOrCreateByElement=function(t){return i.findByElement(t)||new i(t)},i.refreshAll=function(){for(var t in n)n[t].refresh()},i.findByElement=function(t){return n[t.waypointContextKey]},window.onload=function(){t&&t(),i.refreshAll()},g.requestAnimationFrame=function(t){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||e).call(window,t)},g.Context=i}(),function(){"use strict";function a(t,e){return t.triggerPoint-e.triggerPoint}function r(t,e){return e.triggerPoint-t.triggerPoint}function e(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),i[this.axis][this.name]=this}var i={vertical:{},horizontal:{}},o=window.Waypoint;e.prototype.add=function(t){this.waypoints.push(t)},e.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},e.prototype.flushTriggers=function(){for(var t in this.triggerQueues){var e=this.triggerQueues[t],i="up"===t||"left"===t;e.sort(i?r:a);for(var o=0,n=e.length;o<n;o+=1){var s=e[o];(s.options.continuous||o===e.length-1)&&s.trigger([t])}}this.clearTriggerQueues()},e.prototype.next=function(t){this.waypoints.sort(a);var e=o.Adapter.inArray(t,this.waypoints);return e===this.waypoints.length-1?null:this.waypoints[e+1]},e.prototype.previous=function(t){this.waypoints.sort(a);var e=o.Adapter.inArray(t,this.waypoints);return e?this.waypoints[e-1]:null},e.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},e.prototype.remove=function(t){var e=o.Adapter.inArray(t,this.waypoints);-1<e&&this.waypoints.splice(e,1)},e.prototype.first=function(){return this.waypoints[0]},e.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},e.findOrCreate=function(t){return i[t.axis][t.name]||new e(t)},o.Group=e}(),function(){"use strict";function i(t){this.$element=o(t)}var o=window.jQuery,t=window.Waypoint;o.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(t,e){i.prototype[e]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[e].apply(this.$element,t)}}),o.each(["extend","inArray","isEmptyObject"],function(t,e){i[e]=o[e]}),t.adapters.push({name:"jquery",Adapter:i}),t.Adapter=i}(),function(){"use strict";function t(o){return function(){var e=[],i=arguments[0];return o.isFunction(arguments[0])&&((i=o.extend({},arguments[1])).handler=arguments[0]),this.each(function(){var t=o.extend({},i,{element:this});"string"==typeof t.context&&(t.context=o(this).closest(t.context)[0]),e.push(new n(t))}),e}}var n=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}(),function(c){var l,o,i,d,n,h,e,r="Close",p="BeforeClose",u="MarkupParse",f="Open",m=".mfp",g="mfp-ready",s="mfp-removing",v="mfp-prevent-close",t=function(){},a=!!window.jQuery,_=c(window),y=function(t,e){l.ev.on("mfp"+t+m,e)},b=function(t,e,i,o){var n=document.createElement("div");return n.className="mfp-"+t,i&&(n.innerHTML=i),o?e&&e.appendChild(n):(n=c(n),e&&n.appendTo(e)),n},w=function(t,e){l.ev.triggerHandler("mfp"+t,e),l.st.callbacks&&(t=t.charAt(0).toLowerCase()+t.slice(1),l.st.callbacks[t]&&l.st.callbacks[t].apply(l,c.isArray(e)?e:[e]))},k=function(){(l.st.focus?l.content.find(l.st.focus).eq(0):l.wrap).trigger("focus")},x=function(t){return t===e&&l.currTemplate.closeBtn||(l.currTemplate.closeBtn=c(l.st.closeMarkup.replace("%title%",l.st.tClose)),e=t),l.currTemplate.closeBtn},C=function(){c.magnificPopup.instance||((l=new t).init(),c.magnificPopup.instance=l)};t.prototype={constructor:t,init:function(){var t=navigator.appVersion;l.isIE7=-1!==t.indexOf("MSIE 7."),l.isIE8=-1!==t.indexOf("MSIE 8."),l.isLowIE=l.isIE7||l.isIE8,l.isAndroid=/android/gi.test(t),l.isIOS=/iphone|ipad|ipod/gi.test(t),l.supportsTransition=function(){var t=document.createElement("p").style,e=["ms","O","Moz","Webkit"];if(void 0!==t.transition)return!0;for(;e.length;)if(e.pop()+"Transition"in t)return!0;return!1}(),l.probablyMobile=l.isAndroid||l.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),i=c(document.body),d=c(document),l.popupsCache={}},open:function(t){var e;if(!1===t.isObj){l.items=t.items.toArray(),l.index=0;var i,o=t.items;for(e=0;e<o.length;e++)if((i=o[e]).parsed&&(i=i.el[0]),i===t.el[0]){l.index=e;break}}else l.items=c.isArray(t.items)?t.items:[t.items],l.index=t.index||0;if(l.isOpen)l.updateItemHTML();else{l.types=[],h="",t.mainEl&&t.mainEl.length?l.ev=t.mainEl.eq(0):l.ev=d,t.key?(l.popupsCache[t.key]||(l.popupsCache[t.key]={}),l.currTemplate=l.popupsCache[t.key]):l.currTemplate={},l.st=c.extend(!0,{},c.magnificPopup.defaults,t),l.fixedContentPos="auto"===l.st.fixedContentPos?!l.probablyMobile:l.st.fixedContentPos,l.st.modal&&(l.st.closeOnContentClick=!1,l.st.closeOnBgClick=!1,l.st.showCloseBtn=!1,l.st.enableEscapeKey=!1),l.bgOverlay||(l.bgOverlay=b("bg").on("click"+m,function(){l.close()}),l.wrap=b("wrap").attr("tabindex",-1).on("click"+m,function(t){(function(t){if(!c(t).hasClass(v)){var e=l.st.closeOnContentClick,i=l.st.closeOnBgClick;if(e&&i)return!0;if(!l.content||c(t).hasClass("mfp-close")||l.preloader&&t===l.preloader[0])return!0;if(t===l.content[0]||c.contains(l.content[0],t)){if(e)return!0}else if(i&&c.contains(document,t))return!0;return!1}})(t.target)&&l.close()}),l.container=b("container",l.wrap)),l.contentContainer=b("content"),l.st.preloader&&(l.preloader=b("preloader",l.container,l.st.tLoading));var n=c.magnificPopup.modules;for(e=0;e<n.length;e++){var s=n[e];s=s.charAt(0).toUpperCase()+s.slice(1),l["init"+s].call(l)}w("BeforeOpen"),l.st.showCloseBtn&&(l.st.closeBtnInside?(y(u,function(t,e,i,o){i.close_replaceWith=x(o.type)}),h+=" mfp-close-btn-in"):l.wrap.append(x())),l.st.alignTop&&(h+=" mfp-align-top"),l.fixedContentPos?l.wrap.css({overflow:l.st.overflowY,overflowX:"hidden",overflowY:l.st.overflowY}):l.wrap.css({top:_.scrollTop(),position:"absolute"}),(!1===l.st.fixedBgPos||"auto"===l.st.fixedBgPos&&!l.fixedContentPos)&&l.bgOverlay.css({height:d.height(),position:"absolute"}),l.st.enableEscapeKey&&d.on("keyup"+m,function(t){27===t.keyCode&&l.close()}),_.on("resize"+m,function(){l.updateSize()}),l.st.closeOnContentClick||(h+=" mfp-auto-cursor"),h&&l.wrap.addClass(h);var a=l.wH=_.height(),r=l.st.mainClass;l.isIE7&&(r+=" mfp-ie7"),r&&l._addClassToMFP(r),l.updateItemHTML(),w("BuildControls"),c("html").css({}),l.bgOverlay.add(l.wrap).prependTo(document.body),l._lastFocusedEl=document.activeElement,setTimeout(function(){l.content?(l._addClassToMFP(g),k()):l.bgOverlay.addClass(g),d.on("focusin"+m,function(t){return t.target===l.wrap[0]||c.contains(l.wrap[0],t.target)?void 0:(k(),!1)})},16),l.isOpen=!0,l.updateSize(a),w(f)}},close:function(){l.isOpen&&(w(p),l.isOpen=!1,l.st.removalDelay&&!l.isLowIE&&l.supportsTransition?(l._addClassToMFP(s),setTimeout(function(){l._close()},l.st.removalDelay)):l._close())},_close:function(){w(r);var t=s+" "+g+" ";if(l.bgOverlay.detach(),l.wrap.detach(),l.container.empty(),l.st.mainClass&&(t+=l.st.mainClass+" "),l._removeClassFromMFP(t),l.fixedContentPos){c("html").css({paddingRight:""})}d.off("keyup.mfp focusin"+m),l.ev.off(m),l.wrap.attr("class","mfp-wrap").removeAttr("style"),l.bgOverlay.attr("class","mfp-bg"),l.container.attr("class","mfp-container"),!l.st.showCloseBtn||l.st.closeBtnInside&&!0!==l.currTemplate[l.currItem.type]||l.currTemplate.closeBtn&&l.currTemplate.closeBtn.detach(),l._lastFocusedEl&&c(l._lastFocusedEl).trigger("focus"),l.currItem=null,l.content=null,l.currTemplate=null,l.prevHeight=0,w("AfterClose")},updateSize:function(t){if(l.isIOS){var e=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*e;l.wrap.css("height",i),l.wH=i}else l.wH=t||_.height();l.fixedContentPos||l.wrap.css("height",l.wH),w("Resize")},updateItemHTML:function(){var t=l.items[l.index];l.contentContainer.detach(),l.content&&l.content.detach(),t.parsed||(t=l.parseEl(l.index));var e=t.type;if(w("BeforeChange",[l.currItem?l.currItem.type:"",e]),l.currItem=t,!l.currTemplate[e]){var i=!!l.st[e]&&l.st[e].markup;w("FirstMarkupParse",i),l.currTemplate[e]=!i||c(i)}n&&n!==t.type&&l.container.removeClass("mfp-"+n+"-holder");var o=l["get"+e.charAt(0).toUpperCase()+e.slice(1)](t,l.currTemplate[e]);l.appendContent(o,e),t.preloaded=!0,w("Change",t),n=t.type,l.container.prepend(l.contentContainer),w("AfterChange")},appendContent:function(t,e){(l.content=t)?l.st.showCloseBtn&&l.st.closeBtnInside&&!0===l.currTemplate[e]?l.content.find(".mfp-close").length||l.content.append(x()):l.content=t:l.content="",w("BeforeAppend"),l.container.addClass("mfp-"+e+"-holder"),l.contentContainer.append(l.content)},parseEl:function(t){var e=l.items[t],i=e.type;if((e=e.tagName?{el:c(e)}:{data:e,src:e.src}).el){for(var o=l.types,n=0;n<o.length;n++)if(e.el.hasClass("mfp-"+o[n])){i=o[n];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=i||l.st.type||"inline",e.index=t,e.parsed=!0,l.items[t]=e,w("ElementParse",e),l.items[t]},addGroup:function(e,i){var t=function(t){t.mfpEl=this,l._openClick(t,e,i)};i||(i={});var o="click.magnificPopup";i.mainEl=e,i.items?(i.isObj=!0,e.off(o).on(o,t)):(i.isObj=!1,i.delegate?e.off(o).on(o,i.delegate,t):(i.items=e).off(o).on(o,t))},_openClick:function(t,e,i){if((void 0!==i.midClick?i.midClick:c.magnificPopup.defaults.midClick)||2!==t.which&&!t.ctrlKey&&!t.metaKey){var o=void 0!==i.disableOn?i.disableOn:c.magnificPopup.defaults.disableOn;if(o)if(c.isFunction(o)){if(!o.call(l))return!0}else if(_.width()<o)return!0;t.type&&(t.preventDefault(),l.isOpen&&t.stopPropagation()),i.el=c(t.mfpEl),i.delegate&&(i.items=e.find(i.delegate)),l.open(i)}},updateStatus:function(t,e){if(l.preloader){o!==t&&l.container.removeClass("mfp-s-"+o),e||"loading"!==t||(e=l.st.tLoading);var i={status:t,text:e};w("UpdateStatus",i),t=i.status,e=i.text,l.preloader.html(e),l.preloader.find("a").on("click",function(t){t.stopImmediatePropagation()}),l.container.addClass("mfp-s-"+t),o=t}},_addClassToMFP:function(t){l.bgOverlay.addClass(t),l.wrap.addClass(t)},_removeClassFromMFP:function(t){this.bgOverlay.removeClass(t),l.wrap.removeClass(t)},_hasScrollBar:function(t){return(l.isIE7?d.height():document.body.scrollHeight)>(t||_.height())},_parseMarkup:function(n,t,e){var s;e.data&&(t=c.extend(e.data,t)),w(u,[n,t,e]),c.each(t,function(t,e){if(void 0===e||!1===e)return!0;if(1<(s=t.split("_")).length){var i=n.find(m+"-"+s[0]);if(0<i.length){var o=s[1];"replaceWith"===o?i[0]!==e[0]&&i.replaceWith(e):"img"===o?i.is("img")?i.attr("src",e):i.replaceWith('<img src="'+e+'" class="'+i.attr("class")+'" />'):i.attr(s[1],e)}}else n.find(m+"-"+t).html(e)})},_getScrollbarSize:function(){if(void 0===l.scrollbarSize){var t=document.createElement("div");t.id="mfp-sbm",t.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(t),l.scrollbarSize=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return l.scrollbarSize}},c.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(t,e){return C(),t||(t={}),t.isObj=!0,t.index=e||0,this.instance.open(t)},close:function(){return c.magnificPopup.instance.close()},registerModule:function(t,e){e.options&&(c.magnificPopup.defaults[t]=e.options),c.extend(this.proto,e.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!0,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!1,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:300,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading...",callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim"),void 0!==this.st&&void 0!==this.st.el&&(this.st.mainClass=this.st.el.attr("data-effect"))}}}},c.fn.magnificPopup=function(t){C();var e=c(this);if("string"==typeof t)if("open"===t){var i,o=a?e.data("magnificPopup"):e[0].magnificPopup,n=parseInt(arguments[1],10)||0;o.items?i=o.items[n]:(i=e,o.delegate&&(i=i.find(o.delegate)),i=i.eq(n)),l._openClick({mfpEl:i},e,o)}else l.isOpen&&l[t].apply(l,Array.prototype.slice.call(arguments,1));else a?e.data("magnificPopup",t):e[0].magnificPopup=t,l.addGroup(e,t);return e};var T,S,D,I="inline",M=function(){D&&(S.after(D.addClass(T)).detach(),D=null)};c.magnificPopup.registerModule(I,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){l.types.push(I),y(r+"."+I,function(){M()})},getInline:function(t,e){if(M(),t.src){var i=l.st.inline,o=c(t.src);if(o.length){var n=o[0].parentNode;n&&n.tagName&&(S||(T=i.hiddenClass,S=b(T),T="mfp-"+T),D=o.after(S).detach().removeClass(T)),l.updateStatus("ready")}else l.updateStatus("error",i.tNotFound),o=c("<div>");return t.inlineElement=o}return l.updateStatus("ready"),l._parseMarkup(e,{},t),e}}});var $,E="ajax",A=function(){$&&i.removeClass($)};c.magnificPopup.registerModule(E,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){l.types.push(E),$=l.st.ajax.cursor,y(r+"."+E,function(){A(),l.req&&l.req.abort()})},getAjax:function(n){$&&i.addClass($),l.updateStatus("loading");var t=c.extend({url:n.src,success:function(t,e,i){var o={data:t,xhr:i};w("ParseAjax",o),l.appendContent(c(o.data),E),n.finished=!0,A(),k(),setTimeout(function(){l.wrap.addClass(g)},16),l.updateStatus("ready"),w("AjaxContentAdded")},error:function(){A(),n.finished=n.loadError=!0,l.updateStatus("error",l.st.ajax.tError.replace("%url%",n.src))}},l.st.ajax.settings);return l.req=c.ajax(t),""}}});var O;c.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><div class="mfp-img"></div><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var t=l.st.image,e=".image";l.types.push("image"),y(f+e,function(){"image"===l.currItem.type&&t.cursor&&i.addClass(t.cursor)}),y(r+e,function(){t.cursor&&i.removeClass(t.cursor),_.off("resize"+m)}),y("Resize"+e,l.resizeImage),l.isLowIE&&y("AfterChange",l.resizeImage)},resizeImage:function(){var t=l.currItem;if(t.img&&l.st.image.verticalFit){var e=0;l.isLowIE&&(e=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",l.wH-e)}},_onImageHasSize:function(t){t.img&&(t.hasSize=!0,O&&clearInterval(O),t.isCheckingImgSize=!1,w("ImageHasSize",t),t.imgHidden&&(l.content&&l.content.removeClass("mfp-loading"),t.imgHidden=!1))},findImageSize:function(e){var i=0,o=e.img[0],n=function(t){O&&clearInterval(O),O=setInterval(function(){return 0<o.naturalWidth?void l._onImageHasSize(e):(200<i&&clearInterval(O),void(3===++i?n(10):40===i?n(50):100===i&&n(500)))},t)};n(1)},getImage:function(t,e){var i=0,o=function(){t&&(t.img[0].complete?(t.img.off(".mfploader"),t===l.currItem&&(l._onImageHasSize(t),l.updateStatus("ready")),t.hasSize=!0,t.loaded=!0,w("ImageLoadComplete")):++i<200?setTimeout(o,100):n())},n=function(){t&&(t.img.off(".mfploader"),t===l.currItem&&(l._onImageHasSize(t),l.updateStatus("error",s.tError.replace("%url%",t.src))),t.hasSize=!0,t.loaded=!0,t.loadError=!0)},s=l.st.image,a=e.find(".mfp-img");if(a.length){var r=new Image;r.className="mfp-img",t.img=c(r).on("load.mfploader",o).on("error.mfploader",n),r.src=t.src,a.is("img")&&(t.img=t.img.clone()),0<t.img[0].naturalWidth&&(t.hasSize=!0)}return l._parseMarkup(e,{title:function(t){if(t.data&&void 0!==t.data.title)return t.data.title;var e=l.st.image.titleSrc;if(e){if(c.isFunction(e))return e.call(l,t);if(t.el)return t.el.attr(e)||""}return""}(t),img_replaceWith:t.img},t),l.resizeImage(),t.hasSize?(O&&clearInterval(O),t.loadError?(e.addClass("mfp-loading"),l.updateStatus("error",s.tError.replace("%url%",t.src))):(e.removeClass("mfp-loading"),l.updateStatus("ready"))):(l.updateStatus("loading"),t.loading=!0,t.hasSize||(t.imgHidden=!0,e.addClass("mfp-loading"),l.findImageSize(t))),e}}});var P;c.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(t){return t.is("img")?t:t.find("img")}},proto:{initZoom:function(){var s=l.st.zoom,t=".zoom";if(s.enabled&&l.supportsTransition){var e,i,o=s.duration,n=function(t){var e=t.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+s.duration/1e3+"s "+s.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},n="transition";return o["-webkit-"+n]=o["-moz-"+n]=o["-o-"+n]=o[n]=i,e.css(o),e},a=function(){l.content.css("visibility","visible")};y("BuildControls"+t,function(){if(l._allowZoom()){if(clearTimeout(e),l.content.css("visibility","hidden"),image=l._getItemToZoom(),!image)return void a();(i=n(image)).css(l._getOffset()),l.wrap.append(i),e=setTimeout(function(){i.css(l._getOffset(!0)),e=setTimeout(function(){a(),setTimeout(function(){i.remove(),image=i=null,w("ZoomAnimationEnded")},16)},o)},16)}}),y(p+t,function(){if(l._allowZoom()){if(clearTimeout(e),l.st.removalDelay=o,!image){if(image=l._getItemToZoom(),!image)return;i=n(image)}i.css(l._getOffset(!0)),l.wrap.append(i),l.content.css("visibility","hidden"),setTimeout(function(){i.css(l._getOffset())},16)}}),y(r+t,function(){l._allowZoom()&&(a(),i&&i.remove())})}},_allowZoom:function(){return"image"===l.currItem.type},_getItemToZoom:function(){return!!l.currItem.hasSize&&l.currItem.img},_getOffset:function(t){var e,i=(e=t?l.currItem.img:l.st.zoom.opener(l.currItem.el||l.currItem)).offset(),o=parseInt(e.css("padding-top"),10),n=parseInt(e.css("padding-bottom"),10);i.top-=c(window).scrollTop()-o;var s={width:e.width(),height:(a?e.innerHeight():e[0].offsetHeight)-n-o};return void 0===P&&(P=void 0!==document.createElement("p").style.MozTransform),P?s["-moz-transform"]=s.transform="translate("+i.left+"px,"+i.top+"px)":(s.left=i.left,s.top=i.top),s}}});var j="iframe",L=function(t){if(l.currTemplate[j]){var e=l.currTemplate[j].find("iframe");e.length&&(t||(e[0].src="//about:blank"),l.isIE8&&e.css("display",t?"block":"none"))}};c.magnificPopup.registerModule(j,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){l.types.push(j),y("BeforeChange",function(t,e,i){e!==i&&(e===j?L():i===j&&L(!0))}),y(r+"."+j,function(){L()})},getIframe:function(t,e){var i=t.src,o=l.st.iframe;c.each(o.patterns,function(){return-1<i.indexOf(this.index)?(this.id&&(i="string"==typeof this.id?i.substr(i.lastIndexOf(this.id)+this.id.length,i.length):this.id.call(this,i)),i=this.src.replace("%id%",i),!1):void 0});var n={};return o.srcAction&&(n[o.srcAction]=i),l._parseMarkup(e,n,t),l.updateStatus("ready"),e}}});var R=function(t){var e=l.items.length;return e-1<t?t-e:t<0?e+t:t},F=function(t,e,i){return t.replace("%curr%",e+1).replace("%total%",i)};c.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var s=l.st.gallery,t=".mfp-gallery",n=Boolean(c.fn.mfpFastClick);return l.direction=!0,!(!s||!s.enabled)&&(h+=" mfp-gallery",y(f+t,function(){s.navigateByImgClick&&l.wrap.on("click"+t,".mfp-img",function(){return 1<l.items.length?(l.next(),!1):void 0}),d.on("keydown"+t,function(t){37===t.keyCode?l.prev():39===t.keyCode&&l.next()})}),y("UpdateStatus"+t,function(t,e){e.text&&(e.text=F(e.text,l.currItem.index,l.items.length))}),y(u+t,function(t,e,i,o){var n=l.items.length;i.counter=1<n?F(s.tCounter,o.index,n):""}),y("BuildControls"+t,function(){if(1<l.items.length&&s.arrows&&!l.arrowLeft){var t=s.arrowMarkup,e=l.arrowLeft=c(t.replace("%title%",s.tPrev).replace("%dir%","left")).addClass(v),i=l.arrowRight=c(t.replace("%title%",s.tNext).replace("%dir%","right")).addClass(v),o=n?"mfpFastClick":"click";e[o](function(){l.prev()}),i[o](function(){l.next()}),l.isIE7&&(b("b",e[0],!1,!0),b("a",e[0],!1,!0),b("b",i[0],!1,!0),b("a",i[0],!1,!0)),l.container.append(e.add(i))}}),y("Change"+t,function(){l._preloadTimeout&&clearTimeout(l._preloadTimeout),l._preloadTimeout=setTimeout(function(){l.preloadNearbyImages(),l._preloadTimeout=null},16)}),void y(r+t,function(){d.off(t),l.wrap.off("click"+t),l.arrowLeft&&n&&l.arrowLeft.add(l.arrowRight).destroyMfpFastClick(),l.arrowRight=l.arrowLeft=null}))},next:function(){l.direction=!0,l.index=R(l.index+1),l.updateItemHTML()},prev:function(){l.direction=!1,l.index=R(l.index-1),l.updateItemHTML()},goTo:function(t){l.direction=t>=l.index,l.index=t,l.updateItemHTML()},preloadNearbyImages:function(){var t,e=l.st.gallery.preload,i=Math.min(e[0],l.items.length),o=Math.min(e[1],l.items.length);for(t=1;t<=(l.direction?o:i);t++)l._preloadItem(l.index+t);for(t=1;t<=(l.direction?i:o);t++)l._preloadItem(l.index-t)},_preloadItem:function(t){if(t=R(t),!l.items[t].preloaded){var e=l.items[t];e.parsed||(e=l.parseEl(t)),w("LazyLoad",e),"image"===e.type&&(e.img=c('<img class="mfp-img" />').on("load.mfploader",function(){e.hasSize=!0}).on("error.mfploader",function(){e.hasSize=!0,e.loadError=!0}).attr("src",e.src)),e.preloaded=!0}}}});var q,z,N,W="retina";c.magnificPopup.registerModule(W,{options:{replaceSrc:function(t){return t.src.replace(/\.\w+$/,function(t){return"@2x"+t})},ratio:1},proto:{initRetina:function(){if(1<window.devicePixelRatio){var i=l.st.retina,o=i.ratio;1<(o=isNaN(o)?o():o)&&(y("ImageHasSize."+W,function(t,e){e.img.css({"max-width":e.img[0].naturalWidth/o,width:"100%"})}),y("ElementParse."+W,function(t,e){e.src=i.replaceSrc(e,o)}))}}}}),q="ontouchstart"in window,z=function(){_.off("touchmove"+N+" touchend"+N)},N=".mfpFastClick",c.fn.mfpFastClick=function(l){return c(this).each(function(){var e,i,o,n,s,a,r,t=c(this);q&&t.on("touchstart"+N,function(t){s=!1,r=1,a=t.originalEvent?t.originalEvent.touches[0]:t.touches[0],o=a.clientX,n=a.clientY,_.on("touchmove"+N,function(t){a=t.originalEvent?t.originalEvent.touches:t.touches,r=a.length,a=a[0],(10<Math.abs(a.clientX-o)||10<Math.abs(a.clientY-n))&&(s=!0,z())}).on("touchend"+N,function(t){z(),s||1<r||(e=!0,t.preventDefault(),clearTimeout(i),i=setTimeout(function(){e=!1},1e3),l())})}),t.on("click"+N,function(){e||l()})})},c.fn.destroyMfpFastClick=function(){c(this).off("touchstart"+N+" click"+N),q&&_.off("touchmove"+N+" touchend"+N)}}(window.jQuery||window.Zepto),function(S,D){function I(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var t=new Date;return I(t.getFullYear(),t.getMonth(),t.getDate())}function t(t){return function(){return this[t].apply(this,arguments)}}var e,i=(e={get:function(t){return this.slice(t)[0]},contains:function(t){for(var e=t&&t.valueOf(),i=0,o=this.length;i<o;i++)if(this[i].valueOf()===e)return i;return-1},remove:function(t){this.splice(t,1)},replace:function(t){t&&(S.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t))},clear:function(){this.length=0},copy:function(){var t=new i;return t.replace(this),t}},function(){var t=[];return t.push.apply(t,arguments),S.extend(t,e),t}),_=function(t,e){this._process_options(e),this.dates=new i,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=S(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=S($.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot .today, tfoot .clear").attr("colspan",function(t,e){return parseInt(e)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.setDatesDisabled(this.o.datesDisabled),this.setRefresh(this.o.refresh),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};_.prototype={constructor:_,_process_options:function(t){this._o=S.extend({},this._o,t);var e=this.o=S.extend({},this._o),i=e.language;switch(M[i]||(i=i.split("-")[0],M[i]||(i=p.language)),e.language=i,e.startView){case 2:case"decade":e.startView=2;break;case 1:case"year":e.startView=1;break;default:e.startView=0}switch(e.minViewMode){case 1:case"months":e.minViewMode=1;break;case 2:case"years":e.minViewMode=2;break;default:e.minViewMode=0}e.startView=Math.max(e.startView,e.minViewMode),!0!==e.multidate&&(e.multidate=Number(e.multidate)||!1,!1!==e.multidate&&(e.multidate=Math.max(0,e.multidate))),e.multidateSeparator=String(e.multidateSeparator),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;var o=$.parseFormat(e.format);if(e.startDate!==-1/0&&(e.startDate?e.startDate instanceof Date?e.startDate=this._local_to_utc(this._zero_time(e.startDate)):e.startDate=$.parseDate(e.startDate,o,e.language):e.startDate=-1/0),e.endDate!==1/0&&(e.endDate?e.endDate instanceof Date?e.endDate=this._local_to_utc(this._zero_time(e.endDate)):e.endDate=$.parseDate(e.endDate,o,e.language):e.endDate=1/0),e.daysOfWeekDisabled=e.daysOfWeekDisabled||[],S.isArray(e.daysOfWeekDisabled)||(e.daysOfWeekDisabled=e.daysOfWeekDisabled.split(/[,\s]*/)),e.daysOfWeekDisabled=S.map(e.daysOfWeekDisabled,function(t){return parseInt(t,10)}),e.datesDisabled=e.datesDisabled||[],!S.isArray(e.datesDisabled)){var n=[];n.push($.parseDate(e.datesDisabled,o,e.language)),e.datesDisabled=n}e.datesDisabled=S.map(e.datesDisabled,function(t){return $.parseDate(t,o,e.language)});var s=String(e.orientation).toLowerCase().split(/\s+/g),a=e.orientation.toLowerCase();if(s=S.grep(s,function(t){return/^auto|left|right|top|bottom$/.test(t)}),e.orientation={x:"auto",y:"auto"},a&&"auto"!==a)if(1===s.length)switch(s[0]){case"top":case"bottom":e.orientation.y=s[0];break;case"left":case"right":e.orientation.x=s[0]}else a=S.grep(s,function(t){return/^left|right$/.test(t)}),e.orientation.x=a[0]||"auto",a=S.grep(s,function(t){return/^top|bottom$/.test(t)}),e.orientation.y=a[0]||"auto";if(e.defaultViewDate){var r=e.defaultViewDate.year||(new Date).getFullYear(),l=e.defaultViewDate.month||0,c=e.defaultViewDate.day||1;e.defaultViewDate=I(r,l,c)}else e.defaultViewDate=d();e.showOnFocus=e.showOnFocus===D||e.showOnFocus},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var e,i,o,n=0;n<t.length;n++)e=t[n][0],2===t[n].length?(i=D,o=t[n][1]):3===t[n].length&&(i=t[n][1],o=t[n][2]),e.on(o,i)},_unapplyEvents:function(t){for(var e,i,o,n=0;n<t.length;n++)e=t[n][0],2===t[n].length?(o=D,i=t[n][1]):3===t[n].length&&(o=t[n][1],i=t[n][2]),e.off(i,o)},_buildEvents:function(){var t={keyup:S.proxy(function(t){-1===S.inArray(t.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:S.proxy(this.keydown,this)};!0===this.o.showOnFocus&&(t.focus=S.proxy(this.show,this)),this.isInput?this._events=[[this.element,t]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),t],[this.component,{click:S.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:S.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:S.proxy(function(t){this._focused_from=t.target},this)}],[this.element,{blur:S.proxy(function(t){this._focused_from=t.target},this)}]),this._secondaryEvents=[[this.picker,{click:S.proxy(this.click,this)}],[S(window),{resize:S.proxy(this.place,this)}],[S(document),{"mousedown touchstart":S.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).length||this.picker.is(t.target)||this.picker.find(t.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,e){var i=e||this.dates.get(-1),o=this._utc_to_local(i);this.element.trigger({type:t,date:o,dates:S.map(this.dates,this._utc_to_local),format:S.proxy(function(t,e){0===arguments.length?(t=this.dates.length-1,e=this.o.format):"string"==typeof t&&(e=t,t=this.dates.length-1),e=e||this.o.format;var i=this.dates.get(t);return $.formatDate(i,e,this.o.language)},this)})},show:function(){return this.element.attr("readonly")&&!1===this.o.enableOnReadonly?void 0:(this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&S(this.element).blur(),this)},hide:function(){return this.isInline||this.picker.is(":visible")&&(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide")),this},remove:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},_utc_to_local:function(t){return t&&new Date(t.getTime()+6e4*t.getTimezoneOffset())},_local_to_utc:function(t){return t&&new Date(t.getTime()-6e4*t.getTimezoneOffset())},_zero_time:function(t){return t&&new Date(t.getFullYear(),t.getMonth(),t.getDate())},_zero_utc_time:function(t){return t&&new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))},getDates:function(){return S.map(this.dates,this._utc_to_local)},getUTCDates:function(){return S.map(this.dates,function(t){return new Date(t)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var t=this.dates.get(-1);return void 0!==t?new Date(t):null},clearDates:function(){var t;this.isInput?t=this.element:this.component&&(t=this.element.find("input")),t&&t.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var t=S.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,t),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var t=S.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,S.map(t,this._utc_to_local)),this._trigger("changeDate"),this.setValue(),this},setDate:t("setDates"),setUTCDate:t("setUTCDates"),setValue:function(){var t=this.getFormattedDate();return this.isInput?this.element.val(t).change():this.component&&this.element.find("input").val(t).change(),this},getFormattedDate:function(e){e===D&&(e=this.o.format);var i=this.o.language;return S.map(this.dates,function(t){return $.formatDate(t,e,i)}).join(this.o.multidateSeparator)},setStartDate:function(t){return this._process_options({startDate:t}),this.update(),this.updateNavArrows(),this},setEndDate:function(t){return this._process_options({endDate:t}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(t){return this._process_options({daysOfWeekDisabled:t}),this.update(),this.updateNavArrows(),this},setDatesDisabled:function(t){this._process_options({datesDisabled:t}),this.update(),this.updateNavArrows()},setRefresh:function(t){this._process_options({refresh:t})},place:function(){if(this.isInline)return this;var t=this.picker.outerWidth(),e=this.picker.outerHeight(),i=S(this.o.container).width(),o=S(this.o.container).height(),n=S(this.o.container).scrollTop(),s=S(this.o.container).offset(),a=[];this.element.parents().each(function(){var t=S(this).css("z-index");"auto"!==t&&0!==t&&a.push(parseInt(t))});var r=Math.max.apply(Math,a)+10,l=this.component?this.component.parent().offset():this.element.offset(),c=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),d=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=l.left-s.left,p=l.top-s.top+30;this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(h-=t-d)):l.left<0?(this.picker.addClass("datepicker-orient-left"),h-=l.left-10):i<h+t?(this.picker.addClass("datepicker-orient-right"),h=l.left+d-t):this.picker.addClass("datepicker-orient-left");var u,f,m=this.o.orientation.y;if("auto"===m&&(u=-n+p-e,f=n+o-(p+c+e),m=Math.max(u,f)===f?"top":"bottom"),this.picker.addClass("datepicker-orient-"+m),"top"===m?p+=c:p-=e+parseInt(this.picker.css("padding-top")),this.o.rtl){var g=i-(h+d);this.picker.css({top:p,right:g,zIndex:r})}else this.picker.css({top:p,left:h,zIndex:r});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var t=this.dates.copy(),i=[],e=!1;return arguments.length?(S.each(arguments,S.proxy(function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),i.push(e)},this)),e=!0):(i=(i=this.o.refresh?"":this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val())&&this.o.multidate?i.split(this.o.multidateSeparator):[i],delete this.element.data().date),i=S.map(i,S.proxy(function(t){return $.parseDate(t,this.o.format,this.o.language)},this)),i=S.grep(i,S.proxy(function(t){return t<this.o.startDate||t>this.o.endDate||!t},this),!0),this.dates.replace(i),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),e?this.setValue():i.length&&String(t)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&t.length&&this._trigger("clearDate"),this.fill(),this},fillDow:function(){var t=this.o.weekStart,e="<tr>";if(this.o.calendarWeeks){this.picker.find(".datepicker-days thead tr:first-child .datepicker-switch").attr("colspan",function(t,e){return parseInt(e)+1});e+='<th class="cw">&#160;</th>'}for(;t<this.o.weekStart+7;)e+='<th class="dow">'+M[this.o.language].daysMin[t++%7]+"</th>";e+="</tr>",this.picker.find(".datepicker-days thead").append(e)},fillMonths:function(){for(var t="",e=0;e<12;)t+='<span class="month">'+M[this.o.language].monthsShort[e++]+"</span>";this.picker.find(".datepicker-months td").html(t)},setRange:function(t){t&&t.length?this.range=S.map(t,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(o){var t=[],e=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),n=new Date;return o.getUTCFullYear()<e||o.getUTCFullYear()===e&&o.getUTCMonth()<i?t.push("old"):(o.getUTCFullYear()>e||o.getUTCFullYear()===e&&o.getUTCMonth()>i)&&t.push("new"),this.focusDate&&o.valueOf()===this.focusDate.valueOf()&&t.push("focused"),this.o.todayHighlight&&o.getUTCFullYear()===n.getFullYear()&&o.getUTCMonth()===n.getMonth()&&o.getUTCDate()===n.getDate()&&t.push("today"),-1!==this.dates.contains(o)&&t.push("active"),(o.valueOf()<this.o.startDate||o.valueOf()>this.o.endDate||-1!==S.inArray(o.getUTCDay(),this.o.daysOfWeekDisabled))&&t.push("disabled"),0<this.o.datesDisabled.length&&0<S.grep(this.o.datesDisabled,function(t){return i=t,(e=o).getUTCFullYear()===i.getUTCFullYear()&&e.getUTCMonth()===i.getUTCMonth()&&e.getUTCDate()===i.getUTCDate();var e,i}).length&&(t.push("disabled","disabled-date"),0<this.o.datesDisabled.length&&t.push(this.o.classBooked)),this.range&&(o>this.range[0]&&o<this.range[this.range.length-1]&&t.push("range"),-1!==S.inArray(o.valueOf(),this.range)&&t.push("selected")),t},fill:function(){var t,e=new Date(this.viewDate),o=e.getUTCFullYear(),i=e.getUTCMonth(),n=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,s=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,a=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,r=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,l=M[this.o.language].today||M.en.today||"",c=M[this.o.language].clear||M.en.clear||"";if(!isNaN(o)&&!isNaN(i)){this.picker.find(".datepicker-days thead .datepicker-switch").text(M[this.o.language].months[i]+" "+o),this.picker.find("tfoot .today").text(l).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot .clear").text(c).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths();var d=I(o,i-1,28),h=$.getDaysInMonth(d.getUTCFullYear(),d.getUTCMonth());d.setUTCDate(h),d.setUTCDate(h-(d.getUTCDay()-this.o.weekStart+7)%7);var p=new Date(d);p.setUTCDate(p.getUTCDate()+42),p=p.valueOf();for(var u,f=[];d.valueOf()<p;){if(d.getUTCDay()===this.o.weekStart&&(f.push("<tr>"),this.o.calendarWeeks)){var m=new Date(+d+(this.o.weekStart-d.getUTCDay()-7)%7*864e5),g=new Date(Number(m)+(11-m.getUTCDay())%7*864e5),v=new Date(Number(v=I(g.getUTCFullYear(),0,1))+(11-v.getUTCDay())%7*864e5),_=(g-v)/864e5/7+1;f.push('<td class="cw">'+_+"</td>")}if((u=this.getClassNames(d)).push("day"),this.o.beforeShowDay!==S.noop){var y=this.o.beforeShowDay(this._utc_to_local(d));y===D?y={}:"boolean"==typeof y?y={enabled:y}:"string"==typeof y&&(y={classes:y}),!1===y.enabled&&u.push("disabled"),y.classes&&(u=u.concat(y.classes.split(/\s+/))),y.tooltip&&(t=y.tooltip)}u=S.unique(u),f.push('<td class="'+u.join(" ")+'"'+(t?' title="'+t+'"':"")+">"+d.getUTCDate()+"</td>"),t=null,d.getUTCDay()===this.o.weekEnd&&f.push("</tr>"),d.setUTCDate(d.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(f.join(""));var b=this.picker.find(".datepicker-months").find("th:eq(1)").text(o).end().find("span").removeClass("active");if(S.each(this.dates,function(t,e){e.getUTCFullYear()===o&&b.eq(e.getUTCMonth()).addClass("active")}),(o<n||a<o)&&b.addClass("disabled"),o===n&&b.slice(0,s).addClass("disabled"),o===a&&b.slice(r+1).addClass("disabled"),this.o.beforeShowMonth!==S.noop){var w=this;S.each(b,function(t,e){if(!S(e).hasClass("disabled")){var i=new Date(o,t,1);!1===w.o.beforeShowMonth(i)&&S(e).addClass("disabled")}})}f="",o=10*parseInt(o/10,10);var k=this.picker.find(".datepicker-years").find("th:eq(1)").text(o+"-"+(o+9)).end().find("td");o-=1;for(var x,C=S.map(this.dates,function(t){return t.getUTCFullYear()}),T=-1;T<11;T++)x=["year"],-1===T?x.push("old"):10===T&&x.push("new"),-1!==S.inArray(o,C)&&x.push("active"),(o<n||a<o)&&x.push("disabled"),f+='<span class="'+x.join(" ")+'">'+o+"</span>",o+=1;k.html(f)}},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()&&i<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()&&i>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(t){t.preventDefault();var e,i,o,n=S(t.target).closest("span, td, th");if(1===n.length)switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var s=$.modes[this.viewMode].navStep*("prev"===n[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,s),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,s),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var a=new Date;a=I(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),this.showMode(-2);var r="linked"===this.o.todayBtn?null:"view";this._setDate(a,r);break;case"clear":this.clearDates()}break;case"span":n.hasClass("disabled")||(this.viewDate.setUTCDate(1),n.hasClass("month")?(o=1,i=n.parent().find("span").index(n),e=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(i),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(I(e,i,o))):(o=1,i=0,e=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(e),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(I(e,i,o))),this.showMode(-1),this.fill());break;case"td":n.hasClass("day")&&!n.hasClass("disabled")&&(o=parseInt(n.text(),10)||1,e=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),n.hasClass("old")?0===i?(i=11,e-=1):i-=1:n.hasClass("new")&&(11===i?(i=0,e+=1):i+=1),this._setDate(I(e,i,o)))}this.picker.is(":visible")&&this._focused_from&&S(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(t){var e=this.dates.contains(t);if(t||this.dates.clear(),-1!==e?(!0===this.o.multidate||1<this.o.multidate||this.o.toggleActive)&&this.dates.remove(e):(!1===this.o.multidate&&this.dates.clear(),this.dates.push(t)),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(t,e){var i;e&&"date"!==e||this._toggle_multidate(t&&new Date(t)),e&&"view"!==e||(this.viewDate=t&&new Date(t)),this.fill(),this.setValue(),e&&"view"===e||this._trigger("changeDate"),this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&i.change(),!this.o.autoclose||e&&"date"!==e||this.hide()},moveMonth:function(t,e){if(!t)return D;if(!e)return t;var i,o,n=new Date(t.valueOf()),s=n.getUTCDate(),a=n.getUTCMonth(),r=Math.abs(e);if(e=0<e?1:-1,1===r)o=-1===e?function(){return n.getUTCMonth()===a}:function(){return n.getUTCMonth()!==i},i=a+e,n.setUTCMonth(i),(i<0||11<i)&&(i=(i+12)%12);else{for(var l=0;l<r;l++)n=this.moveMonth(n,e);i=n.getUTCMonth(),n.setUTCDate(s),o=function(){return i!==n.getUTCMonth()}}for(;o();)n.setUTCDate(--s),n.setUTCMonth(i);return n},moveYear:function(t,e){return this.moveMonth(t,12*e)},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":visible")){var e,i,o,n,s=!1,a=this.focusDate||this.viewDate;switch(t.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),t.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;e=37===t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.dates.get(-1)||d(),e),o=this.moveYear(a,e),this._trigger("changeYear",this.viewDate)):t.shiftKey?(i=this.moveMonth(this.dates.get(-1)||d(),e),o=this.moveMonth(a,e),this._trigger("changeMonth",this.viewDate)):((i=new Date(this.dates.get(-1)||d())).setUTCDate(i.getUTCDate()+e),(o=new Date(a)).setUTCDate(a.getUTCDate()+e)),this.dateWithinRange(o)&&(this.focusDate=this.viewDate=o,this.setValue(),this.fill(),t.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;e=38===t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.dates.get(-1)||d(),e),o=this.moveYear(a,e),this._trigger("changeYear",this.viewDate)):t.shiftKey?(i=this.moveMonth(this.dates.get(-1)||d(),e),o=this.moveMonth(a,e),this._trigger("changeMonth",this.viewDate)):((i=new Date(this.dates.get(-1)||d())).setUTCDate(i.getUTCDate()+7*e),(o=new Date(a)).setUTCDate(a.getUTCDate()+7*e)),this.dateWithinRange(o)&&(this.focusDate=this.viewDate=o,this.setValue(),this.fill(),t.preventDefault());break;case 32:break;case 13:a=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(a),s=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(t.preventDefault(),"function"==typeof t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(s)this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change()}else 27===t.keyCode&&this.show()},showMode:function(t){t&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+t))),this.picker.children("div").hide().filter(".datepicker-"+$.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var h=function(t,e){this.element=S(t),this.inputs=S.map(e.inputs,function(t){return t.jquery?t[0]:t}),delete e.inputs,n.call(S(this.inputs),e).bind("changeDate",S.proxy(this.dateUpdated,this)),this.pickers=S.map(this.inputs,function(t){return S(t).data("datepicker")}),this.updateDates()};h.prototype={updateDates:function(){this.dates=S.map(this.pickers,function(t){return t.getUTCDate()}),this.updateRanges()},updateRanges:function(){var i=S.map(this.dates,function(t){return t.valueOf()});S.each(this.pickers,function(t,e){e.setRange(i)})},dateUpdated:function(t){if(!this.updating){this.updating=!0;var i=S(t.target).data("datepicker").getUTCDate(),e=S.inArray(t.target,this.inputs),o=e-1,n=e+1,s=this.inputs.length;if(-1!==e){if(S.each(this.pickers,function(t,e){e.getUTCDate()||e.setUTCDate(i)}),i<this.dates[o])for(;0<=o&&i<this.dates[o];)this.pickers[o--].setUTCDate(i);else if(i>this.dates[n])for(;n<s&&i>this.dates[n];)this.pickers[n++].setUTCDate(i);this.updateDates(),delete this.updating}}},remove:function(){S.map(this.pickers,function(t){t.remove()}),delete this.element.data().datepicker}};var o=S.fn.datepicker,n=function(r){var l,c=Array.apply(null,arguments);return c.shift(),this.each(function(){var t=S(this),e=t.data("datepicker"),i="object"==typeof r&&r;if(!e){var o=function(t,e){function i(t,e){return e.toLowerCase()}var o=S(t).data(),n={},s=new RegExp("^"+e.toLowerCase()+"([A-Z])");for(var a in e=new RegExp("^"+e.toLowerCase()),o)e.test(a)&&(n[a.replace(s,i)]=o[a]);return n}(this,"date"),n=function(t){var i={};if(M[t]||(t=t.split("-")[0],M[t])){var o=M[t];return S.each(u,function(t,e){e in o&&(i[e]=o[e])}),i}}(S.extend({},p,o,i).language),s=S.extend({},p,n,o,i);if(t.hasClass("input-daterange")||s.inputs){var a={inputs:s.inputs||t.find("input").toArray()};t.data("datepicker",e=new h(this,S.extend(s,a)))}else t.data("datepicker",e=new _(this,s))}return("string"!=typeof r||"function"!=typeof e[r]||(l=e[r].apply(e,c))===D)&&void 0}),l!==D?l:this};S.fn.datepicker=n;var p=S.fn.datepicker.defaults={autoclose:!1,beforeShowDay:S.noop,beforeShowMonth:S.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,container:"body",refresh:!1,classBooked:"booked"},u=S.fn.datepicker.locale_opts=["format","rtl","weekStart"];S.fn.datepicker.Constructor=_;var M=S.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},$={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,$.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(t){var e=t.replace(this.validParts,"\0").split("\0"),i=t.match(this.validParts);if(!e||!e.length||!i||0===i.length)throw new Error("Invalid date format.");return{separators:e,parts:i}},parseDate:function(t,e,i){function o(){var t=this.slice(0,l[a].length),e=l[a].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(!t)return D;if(t instanceof Date)return t;"string"==typeof e&&(e=$.parseFormat(e));var n,s,a,r=/([\-+]\d+)([dmwy])/,l=t.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){for(t=new Date,a=0;a<l.length;a++)switch(n=r.exec(l[a]),s=parseInt(n[1]),n[2]){case"d":t.setUTCDate(t.getUTCDate()+s);break;case"m":t=_.prototype.moveMonth.call(_.prototype,t,s);break;case"w":t.setUTCDate(t.getUTCDate()+7*s);break;case"y":t=_.prototype.moveYear.call(_.prototype,t,s)}return I(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}l=t&&t.match(this.nonpunctuation)||[],t=new Date;var c,d,h={},p=["yyyy","yy","M","MM","m","mm","d","dd"],u={yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){if(isNaN(t))return t;for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}};u.M=u.MM=u.mm=u.m,u.dd=u.d,t=I(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0);var f=e.parts.slice();if(l.length!==f.length&&(f=S(f).filter(function(t,e){return-1!==S.inArray(e,p)}).toArray()),l.length===f.length){var m,g,v;for(a=0,m=f.length;a<m;a++){if(c=parseInt(l[a],10),n=f[a],isNaN(c))switch(n){case"MM":d=S(M[i].months).filter(o),c=S.inArray(d[0],M[i].months)+1;break;case"M":d=S(M[i].monthsShort).filter(o),c=S.inArray(d[0],M[i].monthsShort)+1}h[n]=c}for(a=0;a<p.length;a++)(v=p[a])in h&&!isNaN(h[v])&&(g=new Date(t),u[v](g,h[v]),isNaN(g)||(t=g))}return t},formatDate:function(t,e,i){if(!t)return"";"string"==typeof e&&(e=$.parseFormat(e));var o={d:t.getUTCDate(),D:M[i].daysShort[t.getUTCDay()],DD:M[i].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:M[i].monthsShort[t.getUTCMonth()],MM:M[i].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};o.dd=(o.d<10?"0":"")+o.d,o.mm=(o.m<10?"0":"")+o.m,t=[];for(var n=S.extend([],e.separators),s=0,a=e.parts.length;s<=a;s++)n.length&&t.push(n.shift()),t.push(o[e.parts[s]]);return t.join("")},headTemplate:'<thead><tr><th class="prev"></th><th colspan="5" class="datepicker-switch"></th><th class="next"></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};$.template='<div class="datepicker"><div class="date-overlay"></div><div class="datepicker-days"><table class=" table-condensed">'+$.headTemplate+"<tbody></tbody>"+$.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+$.headTemplate+$.contTemplate+$.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+$.headTemplate+$.contTemplate+$.footTemplate+"</table></div></div>",S.fn.datepicker.DPGlobal=$,S.fn.datepicker.noConflict=function(){return S.fn.datepicker=o,this},S.fn.datepicker.version="1.4.0",S(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var e=S(this);e.data("datepicker")||(t.preventDefault(),n.call(e,"show"))}),S(function(){n.call(S('[data-provide="datepicker-inline"]'))})}(window.jQuery),function(f,m,o,t){"use strict";var s=function(t,e){this.widget="",this.$element=f(t),this.defaultTime=e.defaultTime,this.disableFocus=e.disableFocus,this.disableMousewheel=e.disableMousewheel,this.isOpen=e.isOpen,this.minuteStep=e.minuteStep,this.modalBackdrop=e.modalBackdrop,this.orientation=e.orientation,this.secondStep=e.secondStep,this.showInputs=e.showInputs,this.showMeridian=e.showMeridian,this.showSeconds=e.showSeconds,this.template=e.template,this.appendWidgetTo=e.appendWidgetTo,this.showWidgetOnAddonClick=e.showWidgetOnAddonClick,this._init()};s.prototype={constructor:s,_init:function(){var t=this;this.showWidgetOnAddonClick&&(this.$element.parent().hasClass("input-append")||this.$element.parent().hasClass("input-prepend"))?(this.$element.parent(".input-append, .input-prepend").find(".add-on").on({"click.timepicker":f.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":f.proxy(this.highlightUnit,this),"click.timepicker":f.proxy(this.highlightUnit,this),"keydown.timepicker":f.proxy(this.elementKeydown,this),"blur.timepicker":f.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":f.proxy(this.mousewheel,this)})):this.template?this.$element.on({"focus.timepicker":f.proxy(this.showWidget,this),"click.timepicker":f.proxy(this.showWidget,this),"blur.timepicker":f.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":f.proxy(this.mousewheel,this)}):this.$element.on({"focus.timepicker":f.proxy(this.highlightUnit,this),"click.timepicker":f.proxy(this.highlightUnit,this),"keydown.timepicker":f.proxy(this.elementKeydown,this),"blur.timepicker":f.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":f.proxy(this.mousewheel,this)}),!1!==this.template?this.$widget=f(this.getTemplate()).on("click",f.proxy(this.widgetClick,this)):this.$widget=!1,this.showInputs&&!1!==this.$widget&&this.$widget.find("input").each(function(){f(this).on({"click.timepicker":function(){f(this).select()},"keydown.timepicker":f.proxy(t.widgetKeydown,t),"keyup.timepicker":f.proxy(t.widgetKeyup,t)})}),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=null,this.updateFromElementVal()},clear:function(){this.hour="",this.minute="",this.second="",this.meridian="",this.$element.val("")},decrementHour:function(){if(this.showMeridian)if(1===this.hour)this.hour=12;else{if(12===this.hour)return this.hour--,this.toggleMeridian();if(0===this.hour)return this.hour=11,this.toggleMeridian();this.hour--}else this.hour<=0?this.hour=23:this.hour--},decrementMinute:function(t){var e;(e=t?this.minute-t:this.minute-this.minuteStep)<0?(this.decrementHour(),this.minute=e+60):this.minute=e},decrementSecond:function(){var t=this.second-this.secondStep;t<0?(this.decrementMinute(!0),this.second=t+60):this.second=t},elementKeydown:function(t){switch(t.keyCode){case 9:case 27:this.updateFromElementVal();break;case 37:t.preventDefault(),this.highlightPrevUnit();break;case 38:switch(t.preventDefault(),this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update();break;case 39:t.preventDefault(),this.highlightNextUnit();break;case 40:switch(t.preventDefault(),this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update()}},getCursorPosition:function(){var t=this.$element.get(0);if("selectionStart"in t)return t.selectionStart;if(o.selection){t.focus();var e=o.selection.createRange(),i=o.selection.createRange().text.length;return e.moveStart("character",-t.value.length),e.text.length-i}},getTemplate:function(){var t,e,i,o,n,s;switch(this.showInputs?(e='<input type="text" class="bootstrap-timepicker-hour" maxlength="2"/>',i='<input type="text" class="bootstrap-timepicker-minute" maxlength="2"/>',o='<input type="text" class="bootstrap-timepicker-second" maxlength="2"/>',n='<input type="text" class="bootstrap-timepicker-meridian" maxlength="2"/>'):(e='<span class="bootstrap-timepicker-hour"></span>',i='<span class="bootstrap-timepicker-minute"></span>',o='<span class="bootstrap-timepicker-second"></span>',n='<span class="bootstrap-timepicker-meridian"></span>'),s='<table><tr><td><a href="#" data-action="incrementHour"><i class="fa fa-angle-up"></i></a></td><td class="separator">&nbsp;</td><td><a href="#" data-action="incrementMinute"><i class="fa fa-angle-up"></i></a></td>'+(this.showSeconds?'<td class="separator">&nbsp;</td><td><a href="#" data-action="incrementSecond"><i class="fa fa-angle-up"></i></a></td>':"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><i class="fa fa-angle-up"></i></a></td>':"")+"</tr><tr><td>"+e+'</td> <td class="separator">:</td><td>'+i+"</td> "+(this.showSeconds?'<td class="separator">:</td><td>'+o+"</td>":"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td>'+n+"</td>":"")+'</tr><tr><td><a href="#" data-action="decrementHour"><i class="fa fa-angle-down"></i></a></td><td class="separator"></td><td><a href="#" data-action="decrementMinute"><i class="fa fa-angle-down"></i></a></td>'+(this.showSeconds?'<td class="separator">&nbsp;</td><td><a href="#" data-action="decrementSecond"><i class="fa fa-angle-down"></i></a></td>':"")+(this.showMeridian?'<td class="separator">&nbsp;</td><td><a href="#" data-action="toggleMeridian"><i class="fa fa-angle-down"></i></a></td>':"")+"</tr></table>",this.template){case"modal":t='<div class="bootstrap-timepicker-widget modal hide fade in" data-backdrop="'+(this.modalBackdrop?"true":"false")+'"><div class="modal-header"><a href="#" class="close" data-dismiss="modal">×</a><h3>Pick a Time</h3></div><div class="modal-content">'+s+'</div><div class="modal-footer"><a href="#" class="btn btn-primary" data-dismiss="modal">OK</a></div></div>';break;case"dropdown":t='<div class="bootstrap-timepicker-widget dropdown-menu">'+s+"</div>"}return t},getTime:function(){return""===this.hour?"":this.hour+":"+(1===this.minute.toString().length?"0"+this.minute:this.minute)+(this.showSeconds?":"+(1===this.second.toString().length?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:"")},hideWidget:function(){!1!==this.isOpen&&(this.$element.trigger({type:"hide.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),"modal"===this.template&&this.$widget.modal?this.$widget.modal("hide"):this.$widget.removeClass("open"),f(o).off("mousedown.timepicker, touchend.timepicker"),this.isOpen=!1,this.$widget.detach())},highlightUnit:function(){this.position=this.getCursorPosition(),0<=this.position&&this.position<=2?this.highlightHour():3<=this.position&&this.position<=5?this.highlightMinute():6<=this.position&&this.position<=8?this.showSeconds?this.highlightSecond():this.highlightMeridian():9<=this.position&&this.position<=11&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"second":this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.showMeridian?this.highlightMeridian():this.showSeconds?this.highlightSecond():this.highlightMinute();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="hour",t.setSelectionRange&&setTimeout(function(){e.hour<10?t.setSelectionRange(0,1):t.setSelectionRange(0,2)},0)},highlightMinute:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="minute",t.setSelectionRange&&setTimeout(function(){e.hour<10?t.setSelectionRange(2,4):t.setSelectionRange(3,5)},0)},highlightSecond:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="second",t.setSelectionRange&&setTimeout(function(){e.hour<10?t.setSelectionRange(5,7):t.setSelectionRange(6,8)},0)},highlightMeridian:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="meridian",t.setSelectionRange&&(this.showSeconds?setTimeout(function(){e.hour<10?t.setSelectionRange(8,10):t.setSelectionRange(9,11)},0):setTimeout(function(){e.hour<10?t.setSelectionRange(5,7):t.setSelectionRange(6,8)},0))},incrementHour:function(){if(this.showMeridian){if(11===this.hour)return this.hour++,this.toggleMeridian();12===this.hour&&(this.hour=0)}return 23===this.hour?void(this.hour=0):void this.hour++},incrementMinute:function(t){var e;59<(e=t?this.minute+t:this.minute+this.minuteStep-this.minute%this.minuteStep)?(this.incrementHour(),this.minute=e-60):this.minute=e},incrementSecond:function(){var t=this.second+this.secondStep-this.second%this.secondStep;59<t?(this.incrementMinute(!0),this.second=t-60):this.second=t},mousewheel:function(t){if(!this.disableMousewheel){t.preventDefault(),t.stopPropagation();var e=t.originalEvent.wheelDelta||-t.originalEvent.detail,i=null;switch("mousewheel"===t.type?i=-1*t.originalEvent.wheelDelta:"DOMMouseScroll"===t.type&&(i=40*t.originalEvent.detail),i&&(t.preventDefault(),f(this).scrollTop(i+f(this).scrollTop())),this.highlightedUnit){case"minute":0<e?this.incrementMinute():this.decrementMinute(),this.highlightMinute();break;case"second":0<e?this.incrementSecond():this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian();break;default:0<e?this.incrementHour():this.decrementHour(),this.highlightHour()}return!1}},place:function(){if(!this.isInline){var t=this.$widget.outerWidth(),e=this.$widget.outerHeight(),i=f(m).width(),o=f(m).height(),n=f(m).scrollTop(),s=parseInt(this.$element.parents().filter(function(){}).first().css("z-index"),10)+10,a=this.component?this.component.parent().offset():this.$element.offset(),r=this.component?this.component.outerHeight(!0):this.$element.outerHeight(!1),l=this.component?this.component.outerWidth(!0):this.$element.outerWidth(!1),c=a.left,d=a.top;this.$widget.removeClass("timepicker-orient-top timepicker-orient-bottom timepicker-orient-right timepicker-orient-left"),"auto"!==this.orientation.x?(this.picker.addClass("datepicker-orient-"+this.orientation.x),"right"===this.orientation.x&&(c-=t-l)):(this.$widget.addClass("timepicker-orient-left"),a.left<0?c-=a.left-10:a.left+t>i&&(c=i-t-10));var h,p,u=this.orientation.y;"auto"===u&&(h=-n+a.top-e,p=n+o-(a.top+r+e),u=Math.max(h,p)===p?"top":"bottom"),this.$widget.addClass("timepicker-orient-"+u),"top"===u?d+=r:d-=e+parseInt(this.$widget.css("padding-top"),10),this.$widget.css({top:d,left:c,zIndex:s})}},remove:function(){f("document").off(".timepicker"),this.$widget&&this.$widget.remove(),delete this.$element.data().timepicker},setDefaultTime:function(t){if(this.$element.val())this.updateFromElementVal();else if("current"===t){var e=new Date,i=e.getHours(),o=e.getMinutes(),n=e.getSeconds(),s="AM";0!==n&&(60===(n=Math.ceil(e.getSeconds()/this.secondStep)*this.secondStep)&&(o+=1,n=0)),0!==o&&(60===(o=Math.ceil(e.getMinutes()/this.minuteStep)*this.minuteStep)&&(i+=1,o=0)),this.showMeridian&&(0===i?i=12:12<=i?(12<i&&(i-=12),s="PM"):s="AM"),this.hour=i,this.minute=o,this.second=n,this.meridian=s,this.update()}else!1===t?(this.hour=0,this.minute=0,this.second=0,this.meridian="AM"):this.setTime(t)},setTime:function(t,e){var i,o,n,s,a;t?("object"==typeof t&&t.getMonth?(o=t.getHours(),n=t.getMinutes(),s=t.getSeconds(),this.showMeridian&&(a="AM",12<o&&(a="PM",o%=12),12===o&&(a="PM"))):(a=null!==t.match(/p/i)?"PM":"AM",o=(i=(t=t.replace(/[^0-9\:]/g,"")).split(":"))[0]?i[0].toString():i.toString(),n=i[1]?i[1].toString():"",s=i[2]?i[2].toString():"",4<o.length&&(s=o.substr(4,2)),2<o.length&&(n=o.substr(2,2),o=o.substr(0,2)),2<n.length&&(s=n.substr(2,2),n=n.substr(0,2)),2<s.length&&(s=s.substr(2,2)),o=parseInt(o,10),n=parseInt(n,10),s=parseInt(s,10),isNaN(o)&&(o=0),isNaN(n)&&(n=0),isNaN(s)&&(s=0),this.showMeridian?o<1?o=1:12<o&&(o=12):(24<=o?o=23:o<0&&(o=0),o<13&&"PM"===a&&(o+=12)),n<0?n=0:60<=n&&(n=59),this.showSeconds&&(isNaN(s)?s=0:s<0?s=0:60<=s&&(s=59))),this.hour=o,this.minute=n,this.second=s,this.meridian=a,this.update(e)):this.clear()},showWidget:function(){if(!this.isOpen&&!this.$element.is(":disabled")){this.$widget.appendTo(this.appendWidgetTo);var e=this;f(o).on("mousedown.timepicker, touchend.timepicker",function(t){e.$element.parent().find(t.target).length||e.$widget.is(t.target)||e.$widget.find(t.target).length||e.hideWidget()}),this.$element.trigger({type:"show.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.place(),this.disableFocus&&this.$element.blur(),""===this.hour&&(this.defaultTime?this.setDefaultTime(this.defaultTime):this.setTime("0:0:0")),"modal"===this.template&&this.$widget.modal?this.$widget.modal("show").on("hidden",f.proxy(this.hideWidget,this)):!1===this.isOpen&&this.$widget.addClass("open"),this.isOpen=!0}},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM"},update:function(t){this.updateElement(),t||this.updateWidget(),this.$element.trigger({type:"changeTime.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}})},updateElement:function(){this.$element.val(this.getTime()).change()},updateFromElementVal:function(){this.setTime(this.$element.val())},updateWidget:function(){if(!1!==this.$widget){var t=this.hour,e=1===this.minute.toString().length?"0"+this.minute:this.minute,i=1===this.second.toString().length?"0"+this.second:this.second;this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(t),this.$widget.find("input.bootstrap-timepicker-minute").val(e),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(i),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(t),this.$widget.find("span.bootstrap-timepicker-minute").text(e),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(i),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))}},updateFromWidgetInputs:function(){if(!1!==this.$widget){var t=this.$widget.find("input.bootstrap-timepicker-hour").val()+":"+this.$widget.find("input.bootstrap-timepicker-minute").val()+(this.showSeconds?":"+this.$widget.find("input.bootstrap-timepicker-second").val():"")+(this.showMeridian?this.$widget.find("input.bootstrap-timepicker-meridian").val():"");this.setTime(t,!0)}},widgetClick:function(t){t.stopPropagation(),t.preventDefault();var e=f(t.target),i=e.closest("a").data("action");i&&this[i](),this.update(),e.is("input")&&e.get(0).setSelectionRange(0,2)},widgetKeydown:function(t){var e=f(t.target),i=e.attr("class").replace("bootstrap-timepicker-","");switch(t.keyCode){case 9:if(this.showMeridian&&"meridian"===i||this.showSeconds&&"second"===i||!this.showMeridian&&!this.showSeconds&&"minute"===i)return this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(t.preventDefault(),i){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),e.get(0).setSelectionRange(0,2);break;case 40:switch(t.preventDefault(),i){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),e.get(0).setSelectionRange(0,2)}},widgetKeyup:function(t){(65===t.keyCode||77===t.keyCode||80===t.keyCode||46===t.keyCode||8===t.keyCode||46<=t.keyCode&&t.keyCode<=57)&&this.updateFromWidgetInputs()}},f.fn.timepicker=function(o){var n=Array.apply(null,arguments);return n.shift(),this.each(function(){var t=f(this),e=t.data("timepicker"),i="object"==typeof o&&o;e||t.data("timepicker",e=new s(this,f.extend({},f.fn.timepicker.defaults,i,f(this).data()))),"string"==typeof o&&e[o].apply(e,n)})},f.fn.timepicker.defaults={defaultTime:"current",disableFocus:!1,disableMousewheel:!1,isOpen:!1,minuteStep:15,modalBackdrop:!1,orientation:{x:"auto",y:"auto"},secondStep:15,showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",appendWidgetTo:"body",showWidgetOnAddonClick:!0},f.fn.timepicker.Constructor=s}(jQuery,window,document),function(L,v){function c(t){return"object"==typeof t}function d(t){return"string"==typeof t}function o(t){return"number"==typeof t}function _(t){return t===v}function y(t,e){return _(t)?"gmap3_"+(e?i+1:++i):t}function b(s,t,a,e,r){function i(t,n){t&&L.each(t,function(t,e){var i=s,o=e;E(e)&&(i=e[0],o=e[1]),n(a,t,function(t){o.apply(i,[r||a,t,l])})})}var o=t.td||{},l={id:e,data:o.data,tag:o.tag};i(o.events,F.event.addListener),i(o.onces,F.event.addListenerOnce)}function l(t){var e,i=[];for(e in t)t.hasOwnProperty(e)&&i.push(e);return i}function a(t,e){var i,o=arguments;for(i=2;i<o.length;i++)if(e in o[i]&&o[i].hasOwnProperty(e))return void(t[e]=o[i][e])}function w(t,e){var i,o,n=["data","tag","id","events","onces"],s={};if(t.td)for(i in t.td)t.td.hasOwnProperty(i)&&"options"!==i&&"values"!==i&&(s[i]=t.td[i]);for(o=0;o<n.length;o++)a(s,n[o],e,t.td);return s.options=L.extend({},t.opts||{},e.options||{}),s}function k(){if(R.verbose){var t,e=[];if(window.console&&q(console.error)){for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}else{for(e="",t=0;t<arguments.length;t++)e+=arguments[t].toString()+" ";alert(e)}}}function n(t){return(o(t)||d(t))&&""!==t&&!isNaN(t)}function x(t){var e,i=[];if(!_(t))if(c(t))if(o(t.length))i=t;else for(e in t)i.push(t[e]);else i.push(t);return i}function p(i){return i?q(i)?i:(i=x(i),function(t){var e;if(_(t))return!1;if(c(t)){for(e=0;e<t.length;e++)if(0<=L.inArray(t[e],i))return!0;return!1}return 0<=L.inArray(t,i)}):void 0}function C(t,e,i){var o=e?t:null;return!t||d(t)?o:t.latLng?C(t.latLng):t instanceof F.LatLng?t:n(t.lat)?new F.LatLng(t.lat,t.lng):!i&&E(t)&&n(t[0])&&n(t[1])?new F.LatLng(t[0],t[1]):o}function T(t){var e,i;return!t||t instanceof F.LatLngBounds?t||null:(E(t)?2===t.length?(e=C(t[0]),i=C(t[1])):4===t.length&&(e=C([t[0],t[1]]),i=C([t[2],t[3]])):"ne"in t&&"sw"in t?(e=C(t.ne),i=C(t.sw)):"n"in t&&"e"in t&&"s"in t&&"w"in t&&(e=C([t.n,t.e]),i=C([t.s,t.w])),e&&i?new F.LatLngBounds(i,e):null)}function h(i,o,n,s,a){var t=!!n&&C(s.td,!1,!0),r=t?{latLng:t}:!!s.td.address&&(d(s.td.address)?{address:s.td.address}:s.td.address),e=!!r&&m.get(r),l=this;r?(a=a||0,e?(s.latLng=e.results[0].geometry.location,s.results=e.results,s.status=e.status,o.apply(i,[s])):(r.location&&(r.location=C(r.location)),r.bounds&&(r.bounds=T(r.bounds)),(A.geocoder||(A.geocoder=new F.Geocoder),A.geocoder).geocode(r,function(t,e){e===F.GeocoderStatus.OK?(m.store(r,{results:t,status:e}),s.latLng=t[0].geometry.location,s.results=t,s.status=e,o.apply(i,[s])):e===F.GeocoderStatus.OVER_QUERY_LIMIT&&a<R.queryLimit.attempt?setTimeout(function(){h.apply(l,[i,o,n,s,a+1])},R.queryLimit.delay+Math.floor(Math.random()*R.queryLimit.random)):(k("geocode failed",e,r),s.latLng=s.results=!1,s.status=e,o.apply(i,[s]))}))):(s.latLng=C(s.td,!1,!0),o.apply(i,[s]))}function u(i,t,o,n){var s=this,a=-1;!function e(){for(;++a<i.length&&!("address"in i[a]););return a>=i.length?void o.apply(t,[n]):void h(s,function(t){delete t.td,L.extend(i[a],t),e.apply(s,[])},!0,{td:i[a]})}()}function f(e,i,o){var n=!1;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition(function(t){n||(n=!0,o.latLng=new F.LatLng(t.coords.latitude,t.coords.longitude),i.apply(e,[o]))},function(){n||(n=!0,o.latLng=!1,i.apply(e,[o]))},o.opts.getCurrentPosition):(o.latLng=!1,i.apply(e,[o]))}function t(){var e=[];this.empty=function(){return!e.length},this.add=function(t){e.push(t)},this.get=function(){return!!e.length&&e[0]},this.ack=function(){e.shift()}}function r(){function r(t){return{id:t.id,name:t.name,object:t.obj,tag:t.tag,data:t.data}}function n(t){q(t.setMap)&&t.setMap(null),q(t.remove)&&t.remove(),q(t.free)&&t.free(),t=null}var l={},c={},d=this;d.add=function(t,e,i,o){var n=t.td||{},s=y(n.id);return l[e]||(l[e]=[]),s in c&&d.clearById(s),c[s]={obj:i,sub:o,name:e,id:s,tag:n.tag,data:n.data},l[e].push(s),s},d.getById=function(t,e,i){var o=!1;return t in c&&(o=e?c[t].sub:i?r(c[t]):c[t].obj),o},d.get=function(t,e,i,o){var n,s,a=p(i);if(!l[t]||!l[t].length)return null;for(n=l[t].length;n;)if(n--,(s=l[t][e?n:l[t].length-n-1])&&c[s]){if(a&&!a(c[s].tag))continue;return o?r(c[s]):c[s].obj}return null},d.all=function(t,e,o){var n=[],s=p(e),i=function(t){var e,i;for(e=0;e<l[t].length;e++)if((i=l[t][e])&&c[i]){if(s&&!s(c[i].tag))continue;n.push(o?r(c[i]):c[i].obj)}};if(t in l)i(t);else if(_(t))for(t in l)i(t);return n},d.rm=function(t,e,i){var o,n;if(!l[t])return!1;if(e)if(i)for(o=l[t].length-1;0<=o&&(n=l[t][o],!e(c[n].tag));o--);else for(o=0;o<l[t].length&&(n=l[t][o],!e(c[n].tag));o++);else o=i?l[t].length-1:0;return o in l[t]&&d.clearById(l[t][o],o)},d.clearById=function(t,e){if(t in c){var i,o=c[t].name;for(i=0;_(e)&&i<l[o].length;i++)t===l[o][i]&&(e=i);return n(c[t].obj),c[t].sub&&n(c[t].sub),delete c[t],l[o].splice(e,1),!0}return!1},d.objGetById=function(t){var e,i;if(l.clusterer)for(i in l.clusterer)if(!1!==(e=c[l.clusterer[i]].obj.getById(t)))return e;return!1},d.objClearById=function(t){var e;if(l.clusterer)for(e in l.clusterer)if(c[l.clusterer[e]].obj.clearById(t))return!0;return null},d.clear=function(t,e,i,o){var n,s,a,r=p(o);if(t&&t.length)t=x(t);else for(n in t=[],l)t.push(n);for(s=0;s<t.length;s++)if(a=t[s],e)d.rm(a,r,!0);else if(i)d.rm(a,r,!1);else for(;d.rm(a,r,!1););},d.objClear=function(t,e,i,o){var n;if(l.clusterer&&(0<=L.inArray("marker",t)||!t.length))for(n in l.clusterer)c[l.clusterer[n]].obj.clear(e,i,o)}}function S(i,o,n){function s(){var t;for(t in n)if(n.hasOwnProperty(t)&&!r.hasOwnProperty(t))return t}var a,t,r={},e=this,l={latLng:{map:!1,marker:!1,infowindow:!1,circle:!1,overlay:!1,getlatlng:!1,getmaxzoom:!1,getelevation:!1,streetviewpanorama:!1,getaddress:!0},geoloc:{getgeoloc:!0}};d(n)&&((t={})[n]={},n=t),e.run=function(){for(var t,e;t=s();){if(q(i[t]))return a=t,e=L.extend(!0,{},R[t]||{},n[t].options||{}),void(t in l.latLng?n[t].values?u(n[t].values,i,i[t],{td:n[t],opts:e,session:r}):h(i,i[t],l.latLng[t],{td:n[t],opts:e,session:r}):t in l.geoloc?f(i,i[t],{td:n[t],opts:e,session:r}):i[t].apply(i,[{td:n[t],opts:e,session:r}]));r[t]=null}o.apply(i,[n,r])},e.ack=function(t){r[a]=t,e.run.apply(e,[])}}function D(){return A.es||(A.es=new F.ElevationService),A.es}function I(i,w,k){function e(t){r[t]||(delete P[t].options.map,r[t]=new R.classes.Marker(P[t].options),b(i,{td:P[t]},r[t],P[t].id))}function x(t){c(O[t])?(q(O[t].obj.setMap)&&O[t].obj.setMap(null),q(O[t].obj.remove)&&O[t].obj.remove(),q(O[t].shadow.remove)&&O[t].obj.remove(),q(O[t].shadow.setMap)&&O[t].shadow.setMap(null),delete O[t].obj,delete O[t].shadow):r[t]&&r[t].setMap(null),delete O[t]}function C(){var t=function(){var t,e,i,o,n,s,a,r,l=Math.cos,c=Math.sin,d=arguments;return d[0]instanceof F.LatLng?(t=d[0].lat(),i=d[0].lng(),d[1]instanceof F.LatLng?(e=d[1].lat(),o=d[1].lng()):(e=d[1],o=d[2])):(t=d[0],i=d[1],d[2]instanceof F.LatLng?(e=d[2].lat(),o=d[2].lng()):(e=d[2],o=d[3])),n=Math.PI*t/180,s=Math.PI*i/180,a=Math.PI*e/180,r=Math.PI*o/180,6371e3*Math.acos(Math.min(l(n)*l(a)*l(s)*l(r)+l(n)*c(s)*l(a)*c(r)+c(n)*c(a),1))}(w.getCenter(),w.getBounds().getNorthEast());return new F.Circle({center:w.getCenter(),radius:1.25*t}).getBounds()}function o(){clearTimeout(t),t=setTimeout(n,25)}function n(){if(!I&&!$&&E){var t,e,i,o,n,s,a,r,l,c,d,h=!1,p=[],u={},f=w.getZoom(),m="maxZoom"in k&&f>k.maxZoom,g=function(){var t,e={};for(t in O)e[t]=!0;return e}();for(M=!1,3<f&&(h=(n=C()).getSouthWest().lng()<n.getNorthEast().lng()),t=0;t<P.length;t++)!P[t]||h&&!n.contains(P[t].options.position)||S&&!S(j[t])||p.push(t);for(;;){for(t=0;u[t]&&t<p.length;)t++;if(t===p.length)break;if(o=[],A&&!m){d=10;do{for(r=o,o=[],d--,a=r.length?n.getCenter():P[p[t]].options.position,v=a,void 0,_=T.fromLatLngToDivPixel(v),y=T.fromDivPixelToLatLng(new F.Point(_.x+k.radius,_.y-k.radius)),b=T.fromDivPixelToLatLng(new F.Point(_.x-k.radius,_.y+k.radius)),n=new F.LatLngBounds(b,y),e=t;e<p.length;e++)u[e]||n.contains(P[p[e]].options.position)&&o.push(e)}while(r.length<o.length&&1<o.length&&d)}else for(e=t;e<p.length;e++)if(!u[e]){o.push(e);break}for(s={indexes:[],ref:[]},l=c=0,i=0;i<o.length;i++)u[o[i]]=!0,s.indexes.push(p[o[i]]),s.ref.push(p[o[i]]),l+=P[p[o[i]]].options.position.lat(),c+=P[p[o[i]]].options.position.lng();l/=o.length,c/=o.length,s.latLng=new F.LatLng(l,c),s.ref=s.ref.join("-"),s.ref in g?delete g[s.ref]:(1===o.length&&(O[s.ref]=!0),D(s))}L.each(g,function(t){x(t)}),$=!1}var v,_,y,b}var t,T,S,D,I=!1,M=!1,$=!1,E=!1,A=!0,d=this,s=[],O={},a={},h={},r=[],P=[],j=[],l=function(t){function e(){return this.onAdd=function(){},this.onRemove=function(){},this.draw=function(){},R.classes.OverlayView.apply(this,[])}e.prototype=R.classes.OverlayView.prototype;var i=new e;return i.setMap(t),i}(w,k.radius);(function t(){return(T=l.getProjection())?(E=!0,s.push(F.event.addListener(w,"zoom_changed",o)),s.push(F.event.addListener(w,"bounds_changed",o)),void n()):void setTimeout(function(){t.apply(d,[])},25)})(),d.getById=function(t){return t in a&&(e(a[t]),r[a[t]])},d.rm=function(t){var e=a[t];r[e]&&r[e].setMap(null),delete r[e],r[e]=!1,delete P[e],P[e]=!1,delete j[e],j[e]=!1,delete a[t],delete h[e],M=!0},d.clearById=function(t){return t in a?(d.rm(t),!0):void 0},d.clear=function(t,e,i){var o,n,s,a,r,l=[],c=p(i);for(t?(o=P.length-1,s=n=-1):(o=0,n=P.length,s=1),a=o;a!==n&&(!P[a]||c&&!c(P[a].tag)||(l.push(h[a]),!e&&!t));a+=s);for(r=0;r<l.length;r++)d.rm(l[r])},d.add=function(t,e){t.id=y(t.id),d.clearById(t.id),a[t.id]=r.length,h[r.length]=t.id,r.push(null),P.push(t),j.push(e),M=!0},d.addMarker=function(t,e){(e=e||{}).id=y(e.id),d.clearById(e.id),e.options||(e.options={}),e.options.position=t.getPosition(),b(i,{td:e},t,e.id),a[e.id]=r.length,h[r.length]=e.id,r.push(t),P.push(e),j.push(e.data||{}),M=!0},d.td=function(t){return P[t]},d.value=function(t){return j[t]},d.marker=function(t){return t in r&&(e(t),r[t])},d.markerIsSet=function(t){return Boolean(r[t])},d.setMarker=function(t,e){r[t]=e},d.store=function(t,e,i){O[t.ref]={obj:e,shadow:i}},d.free=function(){var t;for(t=0;t<s.length;t++)F.event.removeListener(s[t]);s=[],L.each(O,function(t){x(t)}),O={},L.each(P,function(t){P[t]=null}),P=[],L.each(r,function(t){r[t]&&(r[t].setMap(null),delete r[t])}),r=[],L.each(j,function(t){delete j[t]}),j=[],a={},h={}},d.filter=function(t){S=t,n()},d.enable=function(t){A!==t&&(A=t,n())},d.display=function(t){D=t},d.error=function(t){t},d.beginUpdate=function(){I=!0},d.endUpdate=function(){I=!1,M&&n()},d.autofit=function(t){var e;for(e=0;e<P.length;e++)P[e]&&t.extend(P[e].options.position)}}function M(t,n){var e=this;e.id=function(){return t},e.filter=function(t){n.filter(t)},e.enable=function(){n.enable(!0)},e.disable=function(){n.enable(!1)},e.add=function(t,e,i){i||n.beginUpdate(),n.addMarker(t,e),i||n.endUpdate()},e.getById=function(t){return n.getById(t)},e.clearById=function(t,e){var i;return e||n.beginUpdate(),i=n.clearById(t),e||n.endUpdate(),i},e.clear=function(t,e,i,o){o||n.beginUpdate(),n.clear(t,e,i),o||n.endUpdate()}}function $(t,e,i,o){var n=this,s=[];R.classes.OverlayView.call(n),n.setMap(t),n.onAdd=function(){var t=n.getPanes();e.pane in t&&L(t[e.pane]).append(o),L.each("dblclick click mouseover mousemove mouseout mouseup mousedown".split(" "),function(t,e){s.push(F.event.addDomListener(o[0],e,function(t){L.Event(t).stopPropagation(),F.event.trigger(n,e,[t]),n.draw()}))}),s.push(F.event.addDomListener(o[0],"contextmenu",function(t){L.Event(t).stopPropagation(),F.event.trigger(n,"rightclick",[t]),n.draw()}))},n.getPosition=function(){return i},n.setPosition=function(t){i=t,n.draw()},n.draw=function(){var t=n.getProjection().fromLatLngToDivPixel(i);o.css("left",t.x+e.offset.x+"px").css("top",t.y+e.offset.y+"px")},n.onRemove=function(){var t;for(t=0;t<s.length;t++)F.event.removeListener(s[t]);o.remove()},n.hide=function(){o.hide()},n.show=function(){o.show()},n.toggle=function(){o&&(o.is(":visible")?n.show():n.hide())},n.toggleDOM=function(){n.setMap(n.getMap()?null:t)},n.getDOMElement=function(){return o[0]}}function s(f){function i(){!s&&(s=a.get())&&s.run()}function o(){s=null,a.ack(),i.call(m)}function n(t){var e,i=t.td.callback;i&&(e=Array.prototype.slice.call(arguments,1),q(i)?i.apply(f,e):E(i)&&q(i[1])&&i[1].apply(i[0],e))}function h(t,e,i){i&&b(f,t,e,i),n(t,e),s.ack(e)}function p(t,e){var i=(e=e||{}).td&&e.td.options?e.td.options:0;g?i&&(i.center&&(i.center=C(i.center)),g.setOptions(i)):((i=e.opts||L.extend(!0,{},R.map,i||{})).center=t||C(i.center),g=new R.classes.Map(f.get(0),i))}function e(r,l,c){var d=[],t="values"in r.td;return t||(r.td.values=[{options:r.opts}]),r.td.values.length?(p(),L.each(r.td.values,function(t,e){var i,o,n,s,a=w(r,e);if(a.options[c])if(a.options[c][0][0]&&E(a.options[c][0][0]))for(o=0;o<a.options[c].length;o++)for(n=0;n<a.options[c][o].length;n++)a.options[c][o][n]=C(a.options[c][o][n]);else for(o=0;o<a.options[c].length;o++)a.options[c][o]=C(a.options[c][o]);a.options.map=g,s=new F[l](a.options),d.push(s),i=u.add({td:a},l.toLowerCase(),s),b(f,{td:a},s,i)}),void h(r,t?d:d[0])):void h(r,!1)}var s,m=this,a=new t,u=new r,g=null;m._plan=function(t){var e;for(e=0;e<t.length;e++)a.add(new S(m,o,t[e]));i()},m.map=function(t){p(t.latLng,t),b(f,t,g),h(t,g)},m.destroy=function(t){u.clear(),f.empty(),g&&(g=null),h(t,!0)},m.overlay=function(a,r){var l=[],t="values"in a.td;return t||(a.td.values=[{latLng:a.latLng,options:a.opts}]),a.td.values.length?($.__initialised||($.prototype=new R.classes.OverlayView,$.__initialised=!0),L.each(a.td.values,function(t,e){var i,o,n=w(a,e),s=L(document.createElement("div")).css({border:"none",borderWidth:0,position:"absolute"});s.append(n.options.content),o=new $(g,n.options,C(n)||C(e),s),l.push(o),s=null,r||(i=u.add(a,"overlay",o),b(f,{td:n},o,i))}),r?l[0]:void h(a,t?l:l[0])):void h(a,!1)},m.marker=function(s){var a,t,o,e="values"in s.td,r=!g;return e||(s.opts.position=s.latLng||C(s.opts.position),s.td.values=[{options:s.opts}]),s.td.values.length?(r&&p(),s.td.cluster&&!g.getBounds()?void F.event.addListenerOnce(g,"bounds_changed",function(){m.marker.apply(m,[s])}):void(s.td.cluster?(s.td.cluster instanceof M?(t=s.td.cluster,o=u.getById(t.id(),!0)):(o=function(l){var c,t,d=new I(f,g,l),h={},p={},u=[],e=/^[0-9]+$/;for(t in l)e.test(t)?(u.push(1*t),p[t]=l[t],p[t].width=p[t].width||0,p[t].height=p[t].height||0):h[t]=l[t];return u.sort(function(t,e){return e<t}),c=h.calculator?function(t){var i=[];return L.each(t,function(t,e){i.push(d.value(e))}),h.calculator.apply(f,[i])}:function(t){return t.length},d.error(function(){k.apply(m,arguments)}),d.display(function(t){var e,i,o,n,s,a,r=c(t.indexes);if(l.force||1<r)for(e=0;e<u.length;e++)u[e]<=r&&(i=p[u[e]]);i?(s=i.offset||[-i.width/2,-i.height/2],(o=L.extend({},h)).options=L.extend({pane:"overlayLayer",content:i.content?i.content.replace("CLUSTER_COUNT",r):"",offset:{x:("x"in s?s.x:s[0])||0,y:("y"in s?s.y:s[1])||0}},h.options||{}),n=m.overlay({td:o,opts:o.options,latLng:C(t)},!0),o.options.pane="floatShadow",o.options.content=L(document.createElement("div")).width(i.width+"px").height(i.height+"px").css({cursor:"pointer"}),a=m.overlay({td:o,opts:o.options,latLng:C(t)},!0),h.data={latLng:C(t),markers:[]},L.each(t.indexes,function(t,e){h.data.markers.push(d.value(e)),d.markerIsSet(e)&&d.marker(e).setMap(null)}),b(f,{td:h},a,v,{main:n,shadow:a}),d.store(t,n,a)):L.each(t.indexes,function(t,e){d.marker(e).setMap(g)})}),d}(s.td.cluster),t=new M(y(s.td.id,!0),o),u.add(s,"clusterer",t,o)),o.beginUpdate(),L.each(s.td.values,function(t,e){var i=w(s,e);i.options.position=C(i.options.position?i.options.position:e),i.options.position&&(i.options.map=g,r&&(g.setCenter(i.options.position),r=!1),o.add(i,e))}),o.endUpdate(),h(s,t)):(a=[],L.each(s.td.values,function(t,e){var i,o,n=w(s,e);n.options.position=C(n.options.position?n.options.position:e),n.options.position&&(n.options.map=g,r&&(g.setCenter(n.options.position),r=!1),o=new R.classes.Marker(n.options),a.push(o),i=u.add({td:n},"marker",o),b(f,{td:n},o,i))}),h(s,e?a:a[0])))):void h(s,!1)},m.getroute=function(i){i.opts.origin=C(i.opts.origin,!0),i.opts.destination=C(i.opts.destination,!0),(A.ds||(A.ds=new F.DirectionsService),A.ds).route(i.opts,function(t,e){n(i,e===F.DirectionsStatus.OK&&t,e),s.ack()})},m.getdistance=function(i){var t;for(i.opts.origins=x(i.opts.origins),t=0;t<i.opts.origins.length;t++)i.opts.origins[t]=C(i.opts.origins[t],!0);for(i.opts.destinations=x(i.opts.destinations),t=0;t<i.opts.destinations.length;t++)i.opts.destinations[t]=C(i.opts.destinations[t],!0);(A.dms||(A.dms=new F.DistanceMatrixService),A.dms).getDistanceMatrix(i.opts,function(t,e){n(i,e===F.DistanceMatrixStatus.OK&&t,e),s.ack()})},m.infowindow=function(s){var a=[],r="values"in s.td;r||(s.latLng&&(s.opts.position=s.latLng),s.td.values=[{options:s.opts}]),L.each(s.td.values,function(t,e){var i,o,n=w(s,e);n.options.position=C(n.options.position?n.options.position:e.latLng),g||p(n.options.position),(o=new R.classes.InfoWindow(n.options))&&(_(n.open)||n.open)&&(r?o.open(g,n.anchor||v):o.open(g,n.anchor||(s.latLng?v:s.session.marker?s.session.marker:v))),a.push(o),i=u.add({td:n},"infowindow",o),b(f,{td:n},o,i)}),h(s,r?a:a[0])},m.circle=function(s){var a=[],t="values"in s.td;return t||(s.opts.center=s.latLng||C(s.opts.center),s.td.values=[{options:s.opts}]),s.td.values.length?(L.each(s.td.values,function(t,e){var i,o,n=w(s,e);n.options.center=C(n.options.center?n.options.center:e),g||p(n.options.center),n.options.map=g,o=new R.classes.Circle(n.options),a.push(o),i=u.add({td:n},"circle",o),b(f,{td:n},o,i)}),void h(s,t?a:a[0])):void h(s,!1)},m.getaddress=function(t){n(t,t.results,t.status),s.ack()},m.getlatlng=function(t){n(t,t.results,t.status),s.ack()},m.getmaxzoom=function(e){(A.mzs||(A.mzs=new F.MaxZoomService),A.mzs).getMaxZoomAtLatLng(e.latLng,function(t){n(e,t.status===F.MaxZoomStatus.OK&&t.zoom,status),s.ack()})},m.getelevation=function(i){var t,e=[],o=function(t,e){n(i,e===F.ElevationStatus.OK&&t,e),s.ack()};if(i.latLng)e.push(i.latLng);else for(e=x(i.td.locations||[]),t=0;t<e.length;t++)e[t]=C(e[t]);if(e.length)D().getElevationForLocations({locations:e},o);else{if(i.td.path&&i.td.path.length)for(t=0;t<i.td.path.length;t++)e.push(C(i.td.path[t]));e.length?D().getElevationAlongPath({path:e,samples:i.td.samples},o):s.ack()}},m.defaults=function(t){L.each(t.td,function(t,e){R[t]=c(R[t])?L.extend({},R[t],e):e}),s.ack(!0)},m.rectangle=function(s){var a=[],t="values"in s.td;return t||(s.td.values=[{options:s.opts}]),s.td.values.length?(L.each(s.td.values,function(t,e){var i,o,n=w(s,e);n.options.bounds=T(n.options.bounds?n.options.bounds:e),g||p(n.options.bounds.getCenter()),n.options.map=g,o=new R.classes.Rectangle(n.options),a.push(o),i=u.add({td:n},"rectangle",o),b(f,{td:n},o,i)}),void h(s,t?a:a[0])):void h(s,!1)},m.polyline=function(t){e(t,"Polyline","path")},m.polygon=function(t){e(t,"Polygon","paths")},m.trafficlayer=function(t){p();var e=u.get("trafficlayer");e||((e=new R.classes.TrafficLayer).setMap(g),u.add(t,"trafficlayer",e)),h(t,e)},m.bicyclinglayer=function(t){p();var e=u.get("bicyclinglayer");e||((e=new R.classes.BicyclingLayer).setMap(g),u.add(t,"bicyclinglayer",e)),h(t,e)},m.groundoverlay=function(t){t.opts.bounds=T(t.opts.bounds),t.opts.bounds&&p(t.opts.bounds.getCenter());var e=new R.classes.GroundOverlay(t.opts.url,t.opts.bounds,t.opts.opts);e.setMap(g),h(t,e,u.add(t,"groundoverlay",e))},m.streetviewpanorama=function(t){t.opts.opts||(t.opts.opts={}),t.latLng?t.opts.opts.position=t.latLng:t.opts.opts.position&&(t.opts.opts.position=C(t.opts.opts.position)),t.td.divId?t.opts.container=document.getElementById(t.td.divId):t.opts.container&&(t.opts.container=L(t.opts.container).get(0));var e=new R.classes.StreetViewPanorama(t.opts.container,t.opts.opts);e&&g.setStreetView(e),h(t,e,u.add(t,"streetviewpanorama",e))},m.kmllayer=function(a){var r=[],t="values"in a.td;return t||(a.td.values=[{options:a.opts}]),a.td.values.length?(L.each(a.td.values,function(t,e){var i,o,n,s=w(a,e);g||p(),n=s.options,s.options.opts&&(n=s.options.opts,s.options.url&&(n.url=s.options.url)),n.map=g,o=function(t){var e,i=F.version.split(".");for(t=t.split("."),e=0;e<i.length;e++)i[e]=parseInt(i[e],10);for(e=0;e<t.length;e++){if(t[e]=parseInt(t[e],10),!i.hasOwnProperty(e))return!1;if(i[e]<t[e])return!1}return!0}("3.10")?new R.classes.KmlLayer(n):new R.classes.KmlLayer(n.url,n),r.push(o),i=u.add({td:s},"kmllayer",o),b(f,{td:s},o,i)}),void h(a,t?r:r[0])):void h(a,!1)},m.panel=function(t){p();var e,i=0,o=0,n=L(document.createElement("div"));n.css({position:"absolute",zIndex:1e3,visibility:"hidden"}),t.opts.content&&(e=L(t.opts.content),n.append(e),f.first().prepend(n),_(t.opts.left)?_(t.opts.right)?t.opts.center&&(i=(f.width()-e.width())/2):i=f.width()-e.width()-t.opts.right:i=t.opts.left,_(t.opts.top)?_(t.opts.bottom)?t.opts.middle&&(o=(f.height()-e.height())/2):o=f.height()-e.height()-t.opts.bottom:o=t.opts.top,n.css({top:o,left:i,visibility:"visible"})),h(t,n,u.add(t,"panel",n)),n=null},m.directionsrenderer=function(t){t.opts.map=g;var e=new F.DirectionsRenderer(t.opts);t.td.divId?e.setPanel(document.getElementById(t.td.divId)):t.td.container&&e.setPanel(L(t.td.container).get(0)),h(t,e,u.add(t,"directionsrenderer",e))},m.getgeoloc=function(t){h(t,t.latLng)},m.styledmaptype=function(t){p();var e=new R.classes.StyledMapType(t.td.styles,t.opts);g.mapTypes.set(t.td.id,e),h(t,e)},m.imagemaptype=function(t){p();var e=new R.classes.ImageMapType(t.opts);g.mapTypes.set(t.td.id,e),h(t,e)},m.autofit=function(t){var i=new F.LatLngBounds;L.each(u.all(),function(t,e){e.getPosition?i.extend(e.getPosition()):e.getBounds?(i.extend(e.getBounds().getNorthEast()),i.extend(e.getBounds().getSouthWest())):e.getPaths?e.getPaths().forEach(function(t){t.forEach(function(t){i.extend(t)})}):e.getPath?e.getPath().forEach(function(t){i.extend(t)}):e.getCenter?i.extend(e.getCenter()):e instanceof M&&((e=u.getById(e.id(),!0))&&e.autofit(i))}),i.isEmpty()||g.getBounds()&&g.getBounds().equals(i)||("maxZoom"in t.td&&F.event.addListenerOnce(g,"bounds_changed",function(){this.getZoom()>t.td.maxZoom&&this.setZoom(t.td.maxZoom)}),g.fitBounds(i)),h(t,!0)},m.clear=function(t){if(d(t.td)){if(u.clearById(t.td)||u.objClearById(t.td))return void h(t,!0);t.td={name:t.td}}t.td.id?L.each(x(t.td.id),function(t,e){u.clearById(e)||u.objClearById(e)}):(u.clear(x(t.td.name),t.td.last,t.td.first,t.td.tag),u.objClear(x(t.td.name),t.td.last,t.td.first,t.td.tag)),h(t,!0)},m.get=function(t,e,o){var i,n,s=e?t:t.td;return e||(o=s.full),d(s)?!1===(n=u.getById(s,!1,o)||u.objGetById(s))&&(i=s,s={}):i=s.name,"map"===i&&(n=g),n||(n=[],s.id?(L.each(x(s.id),function(t,e){n.push(u.getById(e,!1,o)||u.objGetById(e))}),E(s.id)||(n=n[0])):(L.each(i?x(i):[v],function(t,e){var i;s.first?(i=u.get(e,!1,s.tag,o))&&n.push(i):s.all?L.each(u.all(e,s.tag,o),function(t,e){n.push(e)}):(i=u.get(e,!0,s.tag,o))&&n.push(i)}),s.all||E(i)||(n=n[0]))),n=E(n)||!s.all?n:[n],e?n:void h(t,n)},m.exec=function(e){L.each(x(e.td.func),function(t,i){L.each(m.get(e.td,!0,!e.td.hasOwnProperty("full")||e.td.full),function(t,e){i.call(f,e)})}),h(e,!0)},m.trigger=function(t){if(d(t.td))F.event.trigger(g,t.td);else{var i=[g,t.td.eventName];t.td.var_args&&L.each(t.td.var_args,function(t,e){i.push(e)}),F.event.trigger.apply(F.event,i)}n(t),s.ack()}}var R,F,i=0,q=L.isFunction,E=L.isArray,A={},m=new function(){var r=[];this.get=function(t){if(r.length){var e,i,o,n,s,a=l(t);for(e=0;e<r.length;e++){for(n=r[e],s=a.length===n.keys.length,i=0;i<a.length&&s;i++)(s=(o=a[i])in n.request)&&(s=c(t[o])&&"equals"in t[o]&&q(t[o])?t[o].equals(n.request[o]):t[o]===n.request[o]);if(s)return n.results}}},this.store=function(t,e){r.push({request:t,keys:l(t),results:e})}};L.fn.gmap3=function(){var t,i=[],o=[];for(function(){var i;F=google.maps,R||(R={verbose:!1,queryLimit:{attempt:5,delay:250,random:250},classes:(i={},L.each("Map Marker InfoWindow Circle Rectangle OverlayView StreetViewPanorama KmlLayer TrafficLayer BicyclingLayer GroundOverlay StyledMapType ImageMapType".split(" "),function(t,e){i[e]=F[e]}),i),map:{mapTypeId:F.MapTypeId.ROADMAP,center:[46.578498,2.457275],zoom:2},overlay:{pane:"floatPane",content:"",offset:{x:0,y:0}},geoloc:{getCurrentPosition:{maximumAge:6e4,timeout:5e3}}})}(),t=0;t<arguments.length;t++)arguments[t]&&i.push(arguments[t]);return i.length||i.push("map"),L.each(this,function(){var t=L(this),e=t.data("gmap3");!1,e||(e=new s(t),t.data("gmap3",e)),1!==i.length||"get"!==i[0]&&!function(t){var e,i=!1;if(c(t)&&t.hasOwnProperty("get")){for(e in t)if("get"!==e)return!1;i=!t.get.hasOwnProperty("callback")}return i}(i[0])?e._plan(i):o.push("get"===i[0]?e.get("map",!0):e.get(i[0].get,!0,i[0].get.full))}),o.length?1===o.length?o[0]:o:this}}(jQuery),MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m",MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_="png",MarkerClusterer.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},MarkerClusterer.prototype.onAdd=function(){this.setReady_(!0)},MarkerClusterer.prototype.draw=function(){},MarkerClusterer.prototype.setupStyles_=function(){if(!this.styles_.length)for(var t,e=0;t=this.sizes[e];e++)this.styles_.push({url:this.imagePath_+(e+1)+"."+this.imageExtension_,height:t,width:t})},MarkerClusterer.prototype.fitMapToMarkers=function(){for(var t,e=this.getMarkers(),i=new google.maps.LatLngBounds,o=0;t=e[o];o++)i.extend(t.getPosition());this.map_.fitBounds(i)},MarkerClusterer.prototype.setStyles=function(t){this.styles_=t},MarkerClusterer.prototype.getStyles=function(){return this.styles_},MarkerClusterer.prototype.isZoomOnClick=function(){return this.zoomOnClick_},MarkerClusterer.prototype.isAverageCenter=function(){return this.averageCenter_},MarkerClusterer.prototype.getMarkers=function(){return this.markers_},MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers_.length},MarkerClusterer.prototype.setMaxZoom=function(t){this.maxZoom_=t},MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_},MarkerClusterer.prototype.calculator_=function(t,e){for(var i=0,o=t.length,n=o;0!==n;)n=parseInt(n/10,10),i++;return{text:o,index:i=Math.min(i,e)}},MarkerClusterer.prototype.setCalculator=function(t){this.calculator_=t},MarkerClusterer.prototype.getCalculator=function(){return this.calculator_},MarkerClusterer.prototype.addMarkers=function(t,e){for(var i,o=0;i=t[o];o++)this.pushMarkerTo_(i);e||this.redraw()},MarkerClusterer.prototype.pushMarkerTo_=function(t){if(t.isAdded=!1,t.draggable){var e=this;google.maps.event.addListener(t,"dragend",function(){t.isAdded=!1,e.repaint()})}this.markers_.push(t)},MarkerClusterer.prototype.addMarker=function(t,e){this.pushMarkerTo_(t),e||this.redraw()},MarkerClusterer.prototype.removeMarker_=function(t){var e=-1;if(this.markers_.indexOf)e=this.markers_.indexOf(t);else for(var i,o=0;i=this.markers_[o];o++)if(i==t){e=o;break}return-1!=e&&(t.setMap(null),this.markers_.splice(e,1),!0)},MarkerClusterer.prototype.removeMarker=function(t,e){var i=this.removeMarker_(t);return!(e||!i)&&(this.resetViewport(),this.redraw(),!0)},MarkerClusterer.prototype.removeMarkers=function(t,e){for(var i,o=!1,n=0;i=t[n];n++){var s=this.removeMarker_(i);o=o||s}return!e&&o?(this.resetViewport(),this.redraw(),!0):void 0},MarkerClusterer.prototype.setReady_=function(t){this.ready_||(this.ready_=t,this.createClusters_())},MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length},MarkerClusterer.prototype.getMap=function(){return this.map_},MarkerClusterer.prototype.setMap=function(t){this.map_=t},MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_},MarkerClusterer.prototype.setGridSize=function(t){this.gridSize_=t},MarkerClusterer.prototype.getMinClusterSize=function(){return this.minClusterSize_},MarkerClusterer.prototype.setMinClusterSize=function(t){this.minClusterSize_=t},MarkerClusterer.prototype.getExtendedBounds=function(t){var e=this.getProjection(),i=new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()),o=new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()),n=e.fromLatLngToDivPixel(i);n.x+=this.gridSize_,n.y-=this.gridSize_;var s=e.fromLatLngToDivPixel(o);s.x-=this.gridSize_,s.y+=this.gridSize_;var a=e.fromDivPixelToLatLng(n),r=e.fromDivPixelToLatLng(s);return t.extend(a),t.extend(r),t},MarkerClusterer.prototype.isMarkerInBounds_=function(t,e){return e.contains(t.getPosition())},MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers_=[]},MarkerClusterer.prototype.resetViewport=function(t){for(var e,i=0;e=this.clusters_[i];i++)e.remove();var o;for(i=0;o=this.markers_[i];i++)o.isAdded=!1,t&&o.setMap(null);this.clusters_=[]},MarkerClusterer.prototype.repaint=function(){var i=this.clusters_.slice();this.clusters_.length=0,this.resetViewport(),this.redraw(),window.setTimeout(function(){for(var t,e=0;t=i[e];e++)t.remove()},0)},MarkerClusterer.prototype.redraw=function(){this.createClusters_()},MarkerClusterer.prototype.distanceBetweenPoints_=function(t,e){if(!t||!e)return 0;var i=(e.lat()-t.lat())*Math.PI/180,o=(e.lng()-t.lng())*Math.PI/180,n=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return 6371*(2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n)))},MarkerClusterer.prototype.addToClosestCluster_=function(t){for(var e=4e4,i=null,o=(t.getPosition(),0);a=this.clusters_[o];o++){var n=a.getCenter();if(n){var s=this.distanceBetweenPoints_(n,t.getPosition());s<e&&(e=s,i=a)}}var a;i&&i.isMarkerInClusterBounds(t)?i.addMarker(t):((a=new Cluster(this)).addMarker(t),this.clusters_.push(a))},MarkerClusterer.prototype.createClusters_=function(){if(this.ready_)for(var t,e=new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),this.map_.getBounds().getNorthEast()),i=this.getExtendedBounds(e),o=0;t=this.markers_[o];o++)!t.isAdded&&this.isMarkerInBounds_(t,i)&&this.addToClosestCluster_(t)},Cluster.prototype.isMarkerAlreadyAdded=function(t){if(this.markers_.indexOf)return-1!=this.markers_.indexOf(t);for(var e,i=0;e=this.markers_[i];i++)if(e==t)return!0;return!1},Cluster.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;if(this.center_){if(this.averageCenter_){var e=this.markers_.length+1,i=(this.center_.lat()*(e-1)+t.getPosition().lat())/e,o=(this.center_.lng()*(e-1)+t.getPosition().lng())/e;this.center_=new google.maps.LatLng(i,o),this.calculateBounds_()}}else this.center_=t.getPosition(),this.calculateBounds_();t.isAdded=!0,this.markers_.push(t);var n=this.markers_.length;if(n<this.minClusterSize_&&t.getMap()!=this.map_&&t.setMap(this.map_),n==this.minClusterSize_)for(var s=0;s<n;s++)this.markers_[s].setMap(null);return n>=this.minClusterSize_&&t.setMap(null),this.updateIcon(),!0},Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_},Cluster.prototype.getBounds=function(){for(var t,e=new google.maps.LatLngBounds(this.center_,this.center_),i=this.getMarkers(),o=0;t=i[o];o++)e.extend(t.getPosition());return e},Cluster.prototype.remove=function(){this.clusterIcon_.remove(),this.markers_.length=0,delete this.markers_},Cluster.prototype.getSize=function(){return this.markers_.length},Cluster.prototype.getMarkers=function(){return this.markers_},Cluster.prototype.getCenter=function(){return this.center_},Cluster.prototype.calculateBounds_=function(){var t=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(t)},Cluster.prototype.isMarkerInClusterBounds=function(t){return this.bounds_.contains(t.getPosition())},Cluster.prototype.getMap=function(){return this.map_},Cluster.prototype.updateIcon=function(){var t=this.map_.getZoom(),e=this.markerClusterer_.getMaxZoom();if(e&&e<t)for(var i,o=0;i=this.markers_[o];o++)i.setMap(this.map_);else{if(this.markers_.length<this.minClusterSize_)return void this.clusterIcon_.hide();var n=this.markerClusterer_.getStyles().length,s=this.markerClusterer_.getCalculator()(this.markers_,n);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.setSums(s),this.clusterIcon_.show()}},ClusterIcon.prototype.triggerClusterClick=function(){var t=this.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"clusterclick",this.cluster_),t.isZoomOnClick()&&this.map_.fitBounds(this.cluster_.getBounds())},ClusterIcon.prototype.onAdd=function(){if(this.div_=document.createElement("DIV"),this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.innerHTML=this.sums_.text}this.getPanes().overlayMouseTarget.appendChild(this.div_);var e=this;google.maps.event.addDomListener(this.div_,"click",function(){e.triggerClusterClick()})},ClusterIcon.prototype.getPosFromLatLng_=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return"object"==typeof this.iconAnchor_&&2===this.iconAnchor_.length?(e.x-=this.iconAnchor_[0],e.y-=this.iconAnchor_[1]):(e.x-=parseInt(this.width_/2,10),e.y-=parseInt(this.height_/2,10)),e},ClusterIcon.prototype.draw=function(){if(this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.top=t.y+"px",this.div_.style.left=t.x+"px"}},ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},ClusterIcon.prototype.show=function(){if(this.div_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.style.display=""}this.visible_=!0},ClusterIcon.prototype.remove=function(){this.setMap(null)},ClusterIcon.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),this.div_.parentNode.removeChild(this.div_),this.div_=null)},ClusterIcon.prototype.setSums=function(t){this.sums_=t,this.text_=t.text,this.index_=t.index,this.div_&&(this.div_.innerHTML=t.text),this.useStyle()},ClusterIcon.prototype.useStyle=function(){var t=Math.max(0,this.sums_.index-1);t=Math.min(this.styles_.length-1,t);var e=this.styles_[t];this.url_=e.url,this.height_=e.height,this.width_=e.width,this.textColor_=e.textColor,this.anchor_=e.anchor,this.textSize_=e.textSize,this.backgroundPosition_=e.backgroundPosition,this.iconAnchor_=e.iconAnchor},ClusterIcon.prototype.setCenter=function(t){this.center_=t},ClusterIcon.prototype.createCss=function(t){var e=[];e.push("background-image:url("+this.url_+");");var i=this.backgroundPosition_?this.backgroundPosition_:"0 0";e.push("background-position:"+i+";"),"object"==typeof this.anchor_?("number"==typeof this.anchor_[0]&&0<this.anchor_[0]&&this.anchor_[0]<this.height_?e.push("height:"+(this.height_-this.anchor_[0])+"px; padding-top:"+this.anchor_[0]+"px;"):"number"==typeof this.anchor_[0]&&this.anchor_[0]<0&&-this.anchor_[0]<this.height_?e.push("height:"+this.height_+"px; line-height:"+(this.height_+this.anchor_[0])+"px;"):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px;"),"number"==typeof this.anchor_[1]&&0<this.anchor_[1]&&this.anchor_[1]<this.width_?e.push("width:"+(this.width_-this.anchor_[1])+"px; padding-left:"+this.anchor_[1]+"px;"):e.push("width:"+this.width_+"px; text-align:center;")):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px; width:"+this.width_+"px; text-align:center;");var o=this.textColor_?this.textColor_:"black",n=this.textSize_?this.textSize_:11;return e.push("cursor:pointer; top:"+t.y+"px; left:"+t.x+"px; color:"+o+"; position:absolute; font-size:"+n+"px; font-family:Arial,sans-serif; font-weight:bold"),e.join("")},window.MarkerClusterer=MarkerClusterer,MarkerClusterer.prototype.addMarker=MarkerClusterer.prototype.addMarker,MarkerClusterer.prototype.addMarkers=MarkerClusterer.prototype.addMarkers,MarkerClusterer.prototype.clearMarkers=MarkerClusterer.prototype.clearMarkers,MarkerClusterer.prototype.fitMapToMarkers=MarkerClusterer.prototype.fitMapToMarkers,MarkerClusterer.prototype.getCalculator=MarkerClusterer.prototype.getCalculator,MarkerClusterer.prototype.getGridSize=MarkerClusterer.prototype.getGridSize,MarkerClusterer.prototype.getExtendedBounds=MarkerClusterer.prototype.getExtendedBounds,MarkerClusterer.prototype.getMap=MarkerClusterer.prototype.getMap,MarkerClusterer.prototype.getMarkers=MarkerClusterer.prototype.getMarkers,MarkerClusterer.prototype.getMaxZoom=MarkerClusterer.prototype.getMaxZoom,MarkerClusterer.prototype.getStyles=MarkerClusterer.prototype.getStyles,MarkerClusterer.prototype.getTotalClusters=MarkerClusterer.prototype.getTotalClusters,MarkerClusterer.prototype.getTotalMarkers=MarkerClusterer.prototype.getTotalMarkers,MarkerClusterer.prototype.redraw=MarkerClusterer.prototype.redraw,MarkerClusterer.prototype.removeMarker=MarkerClusterer.prototype.removeMarker,MarkerClusterer.prototype.removeMarkers=MarkerClusterer.prototype.removeMarkers,MarkerClusterer.prototype.resetViewport=MarkerClusterer.prototype.resetViewport,MarkerClusterer.prototype.repaint=MarkerClusterer.prototype.repaint,MarkerClusterer.prototype.setCalculator=MarkerClusterer.prototype.setCalculator,MarkerClusterer.prototype.setGridSize=MarkerClusterer.prototype.setGridSize,MarkerClusterer.prototype.setMaxZoom=MarkerClusterer.prototype.setMaxZoom,MarkerClusterer.prototype.onAdd=MarkerClusterer.prototype.onAdd,MarkerClusterer.prototype.draw=MarkerClusterer.prototype.draw,Cluster.prototype.getCenter=Cluster.prototype.getCenter,Cluster.prototype.getSize=Cluster.prototype.getSize,Cluster.prototype.getMarkers=Cluster.prototype.getMarkers,ClusterIcon.prototype.onAdd=ClusterIcon.prototype.onAdd,ClusterIcon.prototype.draw=ClusterIcon.prototype.draw,ClusterIcon.prototype.onRemove=ClusterIcon.prototype.onRemove,function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(O){"use strict";function i(t){var e=t.data;t.isDefaultPrevented()||(t.preventDefault(),O(t.target).ajaxSubmit(e))}function o(t){var e=t.target,i=O(e);if(!i.is("[type=submit],[type=image]")){var o=i.closest("[type=submit]");if(0===o.length)return;e=o[0]}var n=this;if("image"==(n.clk=e).type)if(void 0!==t.offsetX)n.clk_x=t.offsetX,n.clk_y=t.offsetY;else if("function"==typeof O.fn.offset){var s=i.offset();n.clk_x=t.pageX-s.left,n.clk_y=t.pageY-s.top}else n.clk_x=t.pageX-e.offsetLeft,n.clk_y=t.pageY-e.offsetTop;setTimeout(function(){n.clk=n.clk_x=n.clk_y=null},100)}function P(){if(O.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var y={};y.fileapi=void 0!==O("<input type='file'/>").get(0).files,y.formdata=void 0!==window.FormData;var j=!!O.fn.prop;O.fn.attr2=function(){if(!j)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},O.fn.ajaxSubmit=function(M){function t(t){function d(e){var i=null;try{e.contentWindow&&(i=e.contentWindow.document)}catch(t){P("cannot get iframe.contentWindow document: "+t)}if(i)return i;try{i=e.contentDocument?e.contentDocument:e.document}catch(t){P("cannot get iframe.contentDocument: "+t),i=e.document}return i}function e(){var t=E.attr2("target"),e=E.attr2("action"),i=E.attr("enctype")||E.attr("encoding")||"multipart/form-data";r.setAttribute("target",s),(!$||/post/i.test($))&&r.setAttribute("method","POST"),e!=p.url&&r.setAttribute("action",p.url),p.skipEncodingOverride||$&&!/post/i.test($)||E.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),p.timeout&&(_=setTimeout(function(){v=!0,h(b)},p.timeout));var o=[];try{if(p.extraData)for(var n in p.extraData)p.extraData.hasOwnProperty(n)&&(O.isPlainObject(p.extraData[n])&&p.extraData[n].hasOwnProperty("name")&&p.extraData[n].hasOwnProperty("value")?o.push(O('<input type="hidden" name="'+p.extraData[n].name+'">').val(p.extraData[n].value).appendTo(r)[0]):o.push(O('<input type="hidden" name="'+n+'">').val(p.extraData[n]).appendTo(r)[0]));p.iframeTarget||f.appendTo("body"),m.attachEvent?m.attachEvent("onload",h):m.addEventListener("load",h,!1),setTimeout(function t(){try{var e=d(m).readyState;P("state = "+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(t){P("Server abort: ",t," (",t.name,")"),h(w),_&&clearTimeout(_),_=void 0}},15);try{r.submit()}catch(t){document.createElement("form").submit.apply(r)}}finally{r.setAttribute("action",e),r.setAttribute("enctype",i),t?r.setAttribute("target",t):E.removeAttr("target"),O(o).remove()}}function h(t){if(!g.aborted&&!C){if((x=d(m))||(P("cannot access response document"),t=w),t===b&&g)return g.abort("timeout"),void y.reject(g,"timeout");if(t==w&&g)return g.abort("server abort"),void y.reject(g,"error","server abort");if(x&&x.location.href!=p.iframeSrc||v){m.detachEvent?m.detachEvent("onload",h):m.removeEventListener("load",h,!1);var e,i="success";try{if(v)throw"timeout";var o="xml"==p.dataType||x.XMLDocument||O.isXMLDoc(x);if(P("isXml="+o),!o&&window.opera&&(null===x.body||!x.body.innerHTML)&&--T)return P("requeing onLoad callback, DOM not available"),void setTimeout(h,250);var n=x.body?x.body:x.documentElement;g.responseText=n?n.innerHTML:null,g.responseXML=x.XMLDocument?x.XMLDocument:x,o&&(p.dataType="xml"),g.getResponseHeader=function(t){return{"content-type":p.dataType}[t.toLowerCase()]},n&&(g.status=Number(n.getAttribute("status"))||g.status,g.statusText=n.getAttribute("statusText")||g.statusText);var s=(p.dataType||"").toLowerCase(),a=/(json|script|text)/.test(s);if(a||p.textarea){var r=x.getElementsByTagName("textarea")[0];if(r)g.responseText=r.value,g.status=Number(r.getAttribute("status"))||g.status,g.statusText=r.getAttribute("statusText")||g.statusText;else if(a){var l=x.getElementsByTagName("pre")[0],c=x.getElementsByTagName("body")[0];l?g.responseText=l.textContent?l.textContent:l.innerText:c&&(g.responseText=c.textContent?c.textContent:c.innerText)}}else"xml"==s&&!g.responseXML&&g.responseText&&(g.responseXML=S(g.responseText));try{k=I(g,s,p)}catch(t){i="parsererror",g.error=e=t||i}}catch(t){P("error caught: ",t),i="error",g.error=e=t||i}g.aborted&&(P("upload aborted"),i=null),g.status&&(i=200<=g.status&&g.status<300||304===g.status?"success":"error"),"success"===i?(p.success&&p.success.call(p.context,k,"success",g),y.resolve(g.responseText,"success",g),u&&O.event.trigger("ajaxSuccess",[g,p])):i&&(void 0===e&&(e=g.statusText),p.error&&p.error.call(p.context,g,i,e),y.reject(g,"error",e),u&&O.event.trigger("ajaxError",[g,p,e])),u&&O.event.trigger("ajaxComplete",[g,p]),u&&!--O.active&&O.event.trigger("ajaxStop"),p.complete&&p.complete.call(p.context,g,i),C=!0,p.timeout&&clearTimeout(_),setTimeout(function(){p.iframeTarget?f.attr("src",p.iframeSrc):f.remove(),g.responseXML=null},100)}}}var i,o,p,u,s,f,m,g,n,a,v,_,r=E[0],y=O.Deferred();if(y.abort=function(t){g.abort(t)},t)for(o=0;o<A.length;o++)i=O(A[o]),j?i.prop("disabled",!1):i.removeAttr("disabled");if((p=O.extend(!0,{},O.ajaxSettings,M)).context=p.context||p,s="jqFormIO"+(new Date).getTime(),p.iframeTarget?(a=(f=O(p.iframeTarget)).attr2("name"))?s=a:f.attr2("name",s):(f=O('<iframe name="'+s+'" src="'+p.iframeSrc+'" />')).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=f[0],g={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var e="timeout"===t?"timeout":"aborted";P("aborting upload... "+e),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(t){}f.attr("src",p.iframeSrc),g.error=e,p.error&&p.error.call(p.context,g,e,t),u&&O.event.trigger("ajaxError",[g,p,e]),p.complete&&p.complete.call(p.context,g,e)}},(u=p.global)&&0==O.active++&&O.event.trigger("ajaxStart"),u&&O.event.trigger("ajaxSend",[g,p]),p.beforeSend&&!1===p.beforeSend.call(p.context,g,p))return p.global&&O.active--,y.reject(),y;if(g.aborted)return y.reject(),y;(n=r.clk)&&((a=n.name)&&!n.disabled&&(p.extraData=p.extraData||{},p.extraData[a]=n.value,"image"==n.type&&(p.extraData[a+".x"]=r.clk_x,p.extraData[a+".y"]=r.clk_y)));var b=1,w=2,l=O("meta[name=csrf-token]").attr("content"),c=O("meta[name=csrf-param]").attr("content");c&&l&&(p.extraData=p.extraData||{},p.extraData[c]=l),p.forceSync?e():setTimeout(e,10);var k,x,C,T=50,S=O.parseXML||function(t,e){return window.ActiveXObject?((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!=e.documentElement.nodeName?e:null},D=O.parseJSON||function(t){return window.eval("("+t+")")},I=function(t,e,i){var o=t.getResponseHeader("content-type")||"",n="xml"===e||!e&&0<=o.indexOf("xml"),s=n?t.responseXML:t.responseText;return n&&"parsererror"===s.documentElement.nodeName&&O.error&&O.error("parsererror"),i&&i.dataFilter&&(s=i.dataFilter(s,e)),"string"==typeof s&&("json"===e||!e&&0<=o.indexOf("json")?s=D(s):("script"===e||!e&&0<=o.indexOf("javascript"))&&O.globalEval(s)),s};return y}if(!this.length)return P("ajaxSubmit: skipping submit process - no element selected"),this;var $,e,i,E=this;"function"==typeof M?M={success:M}:void 0===M&&(M={}),$=M.type||this.attr2("method"),(i=(i="string"==typeof(e=M.url||this.attr2("action"))?O.trim(e):"")||window.location.href||"")&&(i=(i.match(/^([^#]+)/)||[])[1]),M=O.extend(!0,{url:i,success:O.ajaxSettings.success,type:$||O.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},M);var o={};if(this.trigger("form-pre-serialize",[this,M,o]),o.veto)return P("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(M.beforeSerialize&&!1===M.beforeSerialize(this,M))return P("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var n=M.traditional;void 0===n&&(n=O.ajaxSettings.traditional);var s,A=[],a=this.formToArray(M.semantic,A);if(M.data&&(M.extraData=M.data,s=O.param(M.data,n)),M.beforeSubmit&&!1===M.beforeSubmit(a,this,M))return P("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[a,this,M,o]),o.veto)return P("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var r=O.param(a,n);s&&(r=r?r+"&"+s:s),"GET"==M.type.toUpperCase()?(M.url+=(0<=M.url.indexOf("?")?"&":"?")+r,M.data=null):M.data=r;var l=[];if(M.resetForm&&l.push(function(){E.resetForm()}),M.clearForm&&l.push(function(){E.clearForm(M.includeHidden)}),!M.dataType&&M.target){var c=M.success||function(){};l.push(function(t){var e=M.replaceTarget?"replaceWith":"html";O(M.target)[e](t).each(c,arguments)})}else M.success&&l.push(M.success);if(M.success=function(t,e,i){for(var o=M.context||this,n=0,s=l.length;n<s;n++)l[n].apply(o,[t,e,i||E,E])},M.error){var d=M.error;M.error=function(t,e,i){var o=M.context||this;d.apply(o,[t,e,i,E])}}if(M.complete){var h=M.complete;M.complete=function(t,e){var i=M.context||this;h.apply(i,[t,e,E])}}var p=0<O("input[type=file]:enabled",this).filter(function(){return""!==O(this).val()}).length,u="multipart/form-data",f=E.attr("enctype")==u||E.attr("encoding")==u,m=y.fileapi&&y.formdata;P("fileAPI :"+m);var g,v=(p||f)&&!m;!1!==M.iframe&&(M.iframe||v)?M.closeKeepAlive?O.get(M.closeKeepAlive,function(){g=t(a)}):g=t(a):g=(p||f)&&m?function(t){for(var i=new FormData,e=0;e<t.length;e++)i.append(t[e].name,t[e].value);if(M.extraData){var o=function(t){var e,i,o=O.param(t,M.traditional).split("&"),n=o.length,s=[];for(e=0;e<n;e++)o[e]=o[e].replace(/\+/g," "),i=o[e].split("="),s.push([decodeURIComponent(i[0]),decodeURIComponent(i[1])]);return s}(M.extraData);for(e=0;e<o.length;e++)o[e]&&i.append(o[e][0],o[e][1])}M.data=null;var n=O.extend(!0,{},O.ajaxSettings,M,{contentType:!1,processData:!1,cache:!1,type:$||"POST"});M.uploadProgress&&(n.xhr=function(){var t=O.ajaxSettings.xhr();return t.upload&&t.upload.addEventListener("progress",function(t){var e=0,i=t.loaded||t.position,o=t.total;t.lengthComputable&&(e=Math.ceil(i/o*100)),M.uploadProgress(t,i,o,e)},!1),t}),n.data=null;var s=n.beforeSend;return n.beforeSend=function(t,e){M.formData?e.data=M.formData:e.data=i,s&&s.call(this,t,e)},O.ajax(n)}(a):O.ajax(M),E.removeData("jqxhr").data("jqxhr",g);for(var _=0;_<A.length;_++)A[_]=null;return this.trigger("form-submit-notify",[this,M]),this},O.fn.ajaxForm=function(t){if((t=t||{}).delegation=t.delegation&&O.isFunction(O.fn.on),!t.delegation&&0===this.length){var e={s:this.selector,c:this.context};return!O.isReady&&e.s?(P("DOM not ready, queuing ajaxForm"),O(function(){O(e.s,e.c).ajaxForm(t)})):P("terminating; zero elements found by selector"+(O.isReady?"":" (DOM not ready)")),this}return t.delegation?(O(document).off("submit.form-plugin",this.selector,i).off("click.form-plugin",this.selector,o).on("submit.form-plugin",this.selector,t,i).on("click.form-plugin",this.selector,t,o),this):this.ajaxFormUnbind().bind("submit.form-plugin",t,i).bind("click.form-plugin",t,o)},O.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},O.fn.formToArray=function(t,e){var i=[];if(0===this.length)return i;var o,n,s,a,r,l,c,d,h=this[0],p=this.attr("id"),u=t?h.getElementsByTagName("*"):h.elements;if(u&&!/MSIE [678]/.test(navigator.userAgent)&&(u=O(u).get()),p&&((o=O(':input[form="'+p+'"]').get()).length&&(u=(u||[]).concat(o))),!u||!u.length)return i;for(n=0,c=u.length;n<c;n++)if((a=(l=u[n]).name)&&!l.disabled)if(t&&h.clk&&"image"==l.type)h.clk==l&&(i.push({name:a,value:O(l).val(),type:l.type}),i.push({name:a+".x",value:h.clk_x},{name:a+".y",value:h.clk_y}));else if((r=O.fieldValue(l,!0))&&r.constructor==Array)for(e&&e.push(l),s=0,d=r.length;s<d;s++)i.push({name:a,value:r[s]});else if(y.fileapi&&"file"==l.type){e&&e.push(l);var f=l.files;if(f.length)for(s=0;s<f.length;s++)i.push({name:a,value:f[s],type:l.type});else i.push({name:a,value:"",type:l.type})}else null!=r&&(e&&e.push(l),i.push({name:a,value:r,type:l.type,required:l.required}));if(!t&&h.clk){var m=O(h.clk),g=m[0];(a=g.name)&&!g.disabled&&"image"==g.type&&(i.push({name:a,value:m.val()}),i.push({name:a+".x",value:h.clk_x},{name:a+".y",value:h.clk_y}))}return i},O.fn.formSerialize=function(t){return O.param(this.formToArray(t))},O.fn.fieldSerialize=function(n){var s=[];return this.each(function(){var t=this.name;if(t){var e=O.fieldValue(this,n);if(e&&e.constructor==Array)for(var i=0,o=e.length;i<o;i++)s.push({name:t,value:e[i]});else null!=e&&s.push({name:this.name,value:e})}}),O.param(s)},O.fn.fieldValue=function(t){for(var e=[],i=0,o=this.length;i<o;i++){var n=this[i],s=O.fieldValue(n,t);null==s||s.constructor==Array&&!s.length||(s.constructor==Array?O.merge(e,s):e.push(s))}return e},O.fieldValue=function(t,e){var i=t.name,o=t.type,n=t.tagName.toLowerCase();if(void 0===e&&(e=!0),e&&(!i||t.disabled||"reset"==o||"button"==o||("checkbox"==o||"radio"==o)&&!t.checked||("submit"==o||"image"==o)&&t.form&&t.form.clk!=t||"select"==n&&-1==t.selectedIndex))return null;if("select"==n){var s=t.selectedIndex;if(s<0)return null;for(var a=[],r=t.options,l="select-one"==o,c=l?s+1:r.length,d=l?s:0;d<c;d++){var h=r[d];if(h.selected){var p=h.value;if(p||(p=h.attributes&&h.attributes.value&&!h.attributes.value.specified?h.text:h.value),l)return p;a.push(p)}}return a}return O(t).val()},O.fn.clearForm=function(t){return this.each(function(){O("input,select,textarea",this).clearFields(t)})},O.fn.clearFields=O.fn.clearInputs=function(i){var o=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,e=this.tagName.toLowerCase();o.test(t)||"textarea"==e?this.value="":"checkbox"==t||"radio"==t?this.checked=!1:"select"==e?this.selectedIndex=-1:"file"==t?/MSIE/.test(navigator.userAgent)?O(this).replaceWith(O(this).clone(!0)):O(this).val(""):i&&(!0===i&&/hidden/.test(t)||"string"==typeof i&&O(this).is(i))&&(this.value="")})},O.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},O.fn.enable=function(t){return void 0===t&&(t=!0),this.each(function(){this.disabled=!t})},O.fn.selected=function(i){return void 0===i&&(i=!0),this.each(function(){var t=this.type;if("checkbox"==t||"radio"==t)this.checked=i;else if("option"==this.tagName.toLowerCase()){var e=O(this).parent("select");i&&e[0]&&"select-one"==e[0].type&&e.find("option").selected(!1),this.selected=i}})},O.fn.ajaxSubmit.debug=!1}),function(b){function w(t,e,i){var o=t[0],n=/er/.test(i)?_indeterminate:/bl/.test(i)?$:M,s=i==_update?{checked:o[M],disabled:o[$],indeterminate:"true"==t.attr(_indeterminate)||"false"==t.attr(_determinate)}:o[n];if(/^(ch|di|in)/.test(i)&&!s)k(t,n);else if(/^(un|en|de)/.test(i)&&s)x(t,n);else if(i==_update)for(var a in s)s[a]?k(t,a,!0):x(t,a,!0);else e&&"toggle"!=i||(e||t[_callback]("ifClicked"),s?o[_type]!==I&&x(t,n):k(t,n))}function k(t,e,i){var o=t[0],n=t.parent(),s=e==M,a=e==_indeterminate,r=e==$,l=a?_determinate:s?g:"enabled",c=u(t,l+f(o[_type])),d=u(t,e+f(o[_type]));if(!0!==o[e]){if(!i&&e==M&&o[_type]==I&&o.name){var h=t.closest("form"),p='input[name="'+o.name+'"]';(p=h.length?h.find(p):b(p)).each(function(){this!==o&&b(this).data(T)&&x(b(this),e)})}a?(o[e]=!0,o[M]&&x(t,M,"force")):(i||(o[e]=!0),s&&o[_indeterminate]&&x(t,_indeterminate,!1)),m(t,s,e,i)}o[$]&&u(t,_cursor,!0)&&n.find("."+S).css(_cursor,"default"),n[_add](d||u(t,e)||""),n.attr("role")&&!a&&n.attr("aria-"+(r?$:M),"true"),n[_remove](c||u(t,l)||"")}function x(t,e,i){var o=t[0],n=t.parent(),s=e==M,a=e==_indeterminate,r=e==$,l=a?_determinate:s?g:"enabled",c=u(t,l+f(o[_type])),d=u(t,e+f(o[_type]));!1!==o[e]&&((a||!i||"force"==i)&&(o[e]=!1),m(t,s,l,i)),!o[$]&&u(t,_cursor,!0)&&n.find("."+S).css(_cursor,"pointer"),n[_remove](d||u(t,e)||""),n.attr("role")&&!a&&n.attr("aria-"+(r?$:M),"false"),n[_add](c||u(t,l)||"")}function C(t,e){t.data(T)&&(t.parent().html(t.attr("style",t.data(T).s||"")),e&&t[_callback](e),t.off(".i").unwrap(),b(_label+'[for="'+t[0].id+'"]').add(t.closest(_label)).off(".i"))}function u(t,e,i){return t.data(T)?t.data(T).o[e+(i?"":"Class")]:void 0}function f(t){return t.charAt(0).toUpperCase()+t.slice(1)}function m(t,e,i,o){o||(e&&t[_callback]("ifToggled"),t[_callback]("ifChanged")[_callback]("if"+f(i)))}var T="iCheck",S=T+"-helper",D="checkbox",I="radio",M="checked",g="un"+M,$="disabled";_determinate="determinate",_indeterminate="in"+_determinate,_update="update",_type="type",_click="click",_touch="touchbegin.i touchend.i",_add="addClass",_remove="removeClass",_callback="trigger",_label="label",_cursor="cursor",_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent),b.fn[T]=function(e,i){var o='input[type="'+D+'"], input[type="'+I+'"]',n=b(),t=function(t){t.each(function(){var t=b(this);n=t.is(o)?n.add(t):n.add(t.find(o))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(e))return e=e.toLowerCase(),t(this),n.each(function(){var t=b(this);"destroy"==e?C(t,"ifDestroyed"):w(t,!0,e),b.isFunction(i)&&i()});if("object"!=typeof e&&e)return this;var u=b.extend({checkedClass:M,disabledClass:$,indeterminateClass:_indeterminate,labelHover:!0},e),s=u.handle,f=u.hoverClass||"hover",m=u.focusClass||"focus",g=u.activeClass||"active",v=!!u.labelHover,_=u.labelHoverClass||"hover",y=0|(""+u.increaseArea).replace("%","");return(s==D||s==I)&&(o='input[type="'+s+'"]'),y<-50&&(y=-50),t(this),n.each(function(){var o=b(this);C(o);var t,n=this,e=n.id,i=-y+"%",s=100+2*y+"%",a={position:"absolute",top:i,left:i,display:"block",width:s,height:s,margin:0,padding:0,background:"#fff",border:0,opacity:0},r=_mobile?{position:"absolute",visibility:"hidden"}:y?a:{position:"absolute",opacity:0},l=n[_type]==D?u.checkboxClass||"i"+D:u.radioClass||"i"+I,c=b(_label+'[for="'+e+'"]').add(o.closest(_label)),d=!!u.aria,h=T+"-"+Math.random().toString(36).substr(2,6),p='<div class="'+l+'" '+(d?'role="'+n[_type]+'" ':"");d&&c.each(function(){p+='aria-labelledby="',this.id?p+=this.id:(this.id=h,p+=h),p+='"'}),p=o.wrap(p+"/>")[_callback]("ifCreated").parent().append(u.insert),t=b('<ins class="'+S+'"/>').css(a).appendTo(p),o.data(T,{o:u,s:o.attr("style")}).css(r),!!u.inheritClass&&p[_add](n.className||""),!!u.inheritID&&e&&p.attr("id",T+"-"+e),"static"==p.css("position")&&p.css("position","relative"),w(o,!0,_update),c.length&&c.on(_click+".i mouseover.i mouseout.i "+_touch,function(t){var e=t[_type],i=b(this);if(!n[$]){if(e==_click){if(b(t.target).is("a"))return;w(o,!1,!0)}else v&&(/ut|nd/.test(e)?(p[_remove](f),i[_remove](_)):(p[_add](f),i[_add](_)));if(!_mobile)return!1;t.stopPropagation()}}),o.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(t){var e=t[_type],i=t.keyCode;return e!=_click&&("keydown"==e&&32==i?(n[_type]==I&&n[M]||(n[M]?x(o,M):k(o,M)),!1):void("keyup"==e&&n[_type]==I?!n[M]&&k(o,M):/us|ur/.test(e)&&p["blur"==e?_remove:_add](m)))}),t.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(t){var e=t[_type],i=/wn|up/.test(e)?g:f;if(!n[$]){if(e==_click?w(o,!1,!0):(/wn|er|in/.test(e)?p[_add](i):p[_remove](i+" "+g),c.length&&v&&i==f&&c[/ut|nd/.test(e)?_remove:_add](_)),!_mobile)return!1;t.stopPropagation()}})})}}(window.jQuery||window.Zepto),function(p){p(document).ready(function(){var t=p(window);function e(){p("#hotel-room-box").length&&(t.width()<992&&p(window).scroll(function(){p(this).scrollTop()>p("#hotel-room-box").offset().top-p("#hotel-room-box").height()?p("#btn-booking-now").fadeOut():p("#btn-booking-now").fadeIn()}))}p("#btn-booking-now").click(function(){p("html, body").animate({scrollTop:p("#hotel-room-box").offset().top},1e3)}),e(),p(window).resize(e),0<p(".mega-menu").length&&p(".mega-menu").each(function(t){0!==p(this).find(".current-menu-item").length&&p(this).parent().addClass("current-menu-ancestor")}),p(".author-contact-form").submit(function(t){t.preventDefault();var e=p(this),i=!0,o=e.serializeArray();e.find('input[type="text"], textarea').removeClass("error"),e.find('input[type="text"], textarea').each(function(){""==p(this).val()&&(i=!1,p(this).addClass("error"))});var n=function(t){if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(t))return!0;return!1}(o[2].value);i&&n?(e.find("#author-message").empty(),e.find('input[type="submit"]').attr("disabled","disabled"),e.find("i.fa-spin").show(),p.ajax({url:st_params.ajax_url,dataType:"json",type:"post",data:{action:"st_author_contact",data:o},success:function(t){1==t.status?e.find("#author-message").html('<div class="alert alert-success">'+t.message+"</div>"):e.find("#author-message").html('<div class="alert alert-danger">'+t.message+"</div>"),e.find("i.fa-spin").hide(),e.find('input[type="submit"]').removeAttr("disabled","disabled")},complete:function(){}})):n||""==o[2].value?e.find("#author-message").html('<div class="alert alert-danger">'+st_checkout_text.validate_form+"</div>"):(e.find('input[name="au_email"]').addClass("error"),""==o[0].value||""==o[3].value?e.find("#author-message").html('<div class="alert alert-danger">'+st_checkout_text.validate_form+"<br />"+st_checkout_text.email_validate+"</div>"):e.find("#author-message").html('<div class="alert alert-danger">'+st_checkout_text.email_validate+"</div>"))}),p("#author-write-review-form").submit(function(t){t.preventDefault();var e=p(this);e.find('input[type="text"], textarea').removeClass("error");var i=!0;if(e.find('input[type="text"], textarea').each(function(){""==p(this).val()&&(i=!1,p(this).addClass("error"))}),i){var o=p("input[name='au_review_star[]']").map(function(){return p(this).data("title")+"|"+p(this).val()}).get();e.find("#author-wreview-message").empty(),e.find("i.fa-spin").show(),p.ajax({url:st_params.ajax_url,dataType:"json",type:"post",data:{action:"st_author_write_review",title:e.find('input[name="au_review_title"]').val(),content:e.find('textarea[name="au_review_content"]').val(),user_id:e.find('input[name="user_id"]').val(),partner_id:e.find('input[name="partner_id"]').val(),star:JSON.stringify(o)},success:function(t){1==t.status&&e.find("#author-wreview-message").html('<div class="alert alert-success">'+t.message+"</div>"),e.find("i.fa-spin").hide(),e.find('input[type="submit"]').removeAttr("disabled","disabled")},complete:function(){}})}else e.find("#author-wreview-message").html('<div class="alert alert-danger">'+st_checkout_text.validate_form+"</div>")})}),p(document).on("show",".accordion",function(t){alert("OK"),p(t.target).prev(".accordion-heading").addClass("accordion-opened")}),p(document).on("hide",".accordion",function(t){p(this).find(".accordion-heading").not(p(t.target)).removeClass("accordion-opened")});var t=p("body"),s=!1;t.on("click","#save_ical",function(t){t.preventDefault();var e=p(this).parent(),i=(p(this),p(".spinner-import",e)),o=p(".form-message",e);if(s)return!1;s=!0,i.show();var n={action:"st_import_ical",url:p("input.ical_input",e).val(),post_id:p('input[name="post_id"]',e).val()};p.post(st_params.ajax_url,n,function(t){"object"==typeof t&&o.html(t.message),s=!1,i.hide()},"json")}),p(document).on("click",'a[href="#package_tab"]',function(){p(this);var t=p(this).closest(".tabs_partner"),e=p(".stour-package"),i=[];p(".list-location-wrapper .item",t).each(function(){var t=p(this);t.find("input").is(":checked")&&i.push(t.find("input").val())});var o=p('input[name="address"]',t).val();0==i.length&&""==o?p(".form-message",e).html('<div class="alert alert-danger">'+p("#stour-no-location").val()+"</div>"):p(".form-message",e).html("")}),p(document).on("click",".tour-package-load-hotel",function(t){t.preventDefault();var e=p(this),i=e.closest(".tabs_partner"),o=e.closest(".stour-tab-content"),n=e.closest(".stour-package"),s=[];p(".list-location-wrapper .item",i).each(function(){var t=p(this);t.find("input").is(":checked")&&s.push(t.find("input").val())});var a=p('input[name="address"]',i).val();n.find(".overlay-form").show(),p(".form-message",n).html(""),p.ajax({url:st_params.ajax_url,dataType:"json",type:"post",data:{action:"st_load_hotel_tour_package",locations:s.toString(),address:a,post_id:e.data("post-id"),post_type:e.data("type")},success:function(t){0==t.status?p(".form-message",n).html('<div class="alert alert-danger">'+t.message+"</div>"):(p(".form-message",n).html('<div class="alert alert-success">'+t.message+"</div>"),p(".list-content",o).html(t.content)),n.find(".overlay-form").hide()},error:function(t){console.log("Can not get the availability slot. Lost connect with your sever")}})}),p(".stour-list-hotel").length&&(p(document).on("click","#cb-select-all-1",function(t){p(this);p(this).closest(".stour-list-hotel").find("input:checkbox").not(this).prop("checked",this.checked)}),p(document).on("click",".stour-list-hotel .cb-select-child1",function(t){p(this);var e=p(this).closest(".stour-list-hotel");e.find("input#cb-select-all-1").prop("checked",!1);var i=0;p(".stour-list-hotel .cb-select-child1").each(function(t){p(this).is(":checked")||i++}),0==i&&e.find("input#cb-select-all-1").prop("checked",!0)})),p(document).on("click","#tour-package-save-hotel",function(t){t.preventDefault();var e=p(this),i=p(".stour-list-hotel"),n={},s={},a={};i.each(function(t){var e=0,i=p(this),o=i.data("type");"hotel"==o&&i.find(".the-list tr").each(function(){var t=p(this);p('input[type="checkbox"]',t).is(":checked")&&(n[e]={hotel_id:p('input[type="checkbox"]',t).data("id"),hotel_price:p('input[type="text"]',t).val()},e++)}),"activity"==o&&i.find(".the-list tr").each(function(){var t=p(this);p('input[type="checkbox"]',t).is(":checked")&&(s[e]={activity_id:p('input[type="checkbox"]',t).data("id"),activity_price:p('input[type="text"]',t).val()},e++)}),"car"==o&&i.find(".the-list tr").each(function(){var t=p(this);p('input[type="checkbox"]',t).is(":checked")&&(a[e]={car_id:p('input[type="checkbox"]',t).data("id"),car_price:p('input[type="text"]',t).val(),car_quantity:p('input[type="number"]',t).val()},e++)})});var o=p(".stour-list-custom-hotel"),r={},l={},c={};o.each(function(t){var e=p(this),i=e.data("type");if("hotel"==i){var o=0;e.find("tbody tr").not(".parent-row").each(function(){var t=p(this);r[o]={hotel_name:p("input.hotel-name",t).val(),hotel_star:p("input.hotel-star",t).val(),hotel_price:p("input.hotel-price",t).val()},o++})}if("activity"==i){o=0;e.find("tbody tr").not(".parent-row").each(function(){var t=p(this);c[o]={activity_name:p("input.activity-name",t).val(),activity_price:p("input.activity-price",t).val()},o++})}if("car"==i){o=0;e.find("tbody tr").not(".parent-row").each(function(){var t=p(this);l[o]={car_name:p("input.car-name",t).val(),car_price:p("input.car-price",t).val(),car_quantity:p("input.car-quantity",t).val()},o++})}});var d=p(".stour-package"),h=p("#stour-list-hotel",d);h.find(".overlay-form").show(),p(".form-message",d).html(""),p.ajax({url:st_params.ajax_url,dataType:"json",type:"post",data:{action:"st_save_hotel_tour_package",tour_package:JSON.stringify(n),tour_package_car:JSON.stringify(a),tour_package_activity:JSON.stringify(s),tour_package_custom:JSON.stringify(r),tour_package_custom_car:JSON.stringify(l),tour_package_custom_activity:JSON.stringify(c),post_id:e.data("post-id")},success:function(t){0==t.status?p(".form-message",d).html('<div class="alert alert-danger">'+t.message+"</div>"):p(".form-message",d).html('<div class="alert alert-success">'+t.message+"</div>"),h.find(".overlay-form").hide()},error:function(t){console.log("Can not get the availability slot. Lost connect with your sever")}})}),p(document).on("click",".hotel-price",function(t){var e=p(this).closest("tr");e.find('input[type="checkbox"]').is(":checked")||(console.log(e.find('input[type="checkbox"]')),e.find('input[type="checkbox"]').prop("checked",!0))}),p(document).on("click",".btn-add-custom-package",function(t){t.preventDefault();var e=p(this).closest(".custom-hotel-data-item").find("table.stour-list-custom-hotel tbody");e.find("tr.parent-row").clone().removeClass("parent-row").show().insertAfter(e.find("tr:last"))}),p(document).on("click",".hotel-del",function(t){t.preventDefault(),p(this).closest("tr").remove()});var i=!0;p(document).on("click",".suser-approve",function(t){t.preventDefault();var e=p(this);i&&(e.css({visibility:"visible"}),e.closest("td").find(".suser-message").show(),p.ajax({url:st_params.ajax_url,dataType:"json",type:"post",data:{action:"st_partner_approve_booking",post_id:e.data("id"),order_id:e.data("order-id")},beforeSend:function(){i=!1},success:function(t){1==t.status?(e.closest("td").find(".suser-status").html('<div class="text-success"><b>'+t.message+"</b></div>"),e.closest("td").find(".suser-message").hide(),e.remove()):alert(t.message),i=!0}}))})}(jQuery),"undefined"!=typeof google){function InfoBox(t){t=t||{},google.maps.OverlayView.apply(this,arguments),this.content_=t.content||"",this.disableAutoPan_=t.disableAutoPan||!1,this.maxWidth_=t.maxWidth||0,this.pixelOffset_=t.pixelOffset||new google.maps.Size(0,0),this.position_=t.position||new google.maps.LatLng(0,0),this.zIndex_=t.zIndex||null,this.boxClass_=t.boxClass||"infoBox",this.boxStyle_=t.boxStyle||{},this.closeBoxMargin_=t.closeBoxMargin||"2px",this.closeBoxURL_=t.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===t.closeBoxURL&&(this.closeBoxURL_=""),this.infoBoxClearance_=t.infoBoxClearance||new google.maps.Size(1,1),void 0===t.visible&&(void 0===t.isHidden?t.visible=!0:t.visible=!t.isHidden),this.isHidden_=!t.visible,this.alignBottom_=t.alignBottom||!1,this.pane_=t.pane||"floatPane",this.enableEventPropagation_=t.enableEventPropagation||!1,this.div_=null,this.closeListener_=null,this.moveListener_=null,this.contextListener_=null,this.eventListeners_=null,this.fixedWidthSet_=null}InfoBox.prototype=new google.maps.OverlayView,InfoBox.prototype.createInfoBoxDiv_=function(){var t,e,i,o=this,n=function(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()};if(!this.div_){if(this.div_=document.createElement("div"),this.setBoxStyle_(),void 0===this.content_.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+this.content_:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(this.content_)),this.getPanes()[this.pane_].appendChild(this.div_),this.addClickHandler_(),this.div_.style.width?this.fixedWidthSet_=!0:0!==this.maxWidth_&&this.div_.offsetWidth>this.maxWidth_?(this.div_.style.width=this.maxWidth_,this.div_.style.overflow="auto",this.fixedWidthSet_=!0):(i=this.getBoxWidths_(),this.div_.style.width=this.div_.offsetWidth-i.left-i.right+"px",this.fixedWidthSet_=!1),this.panBox_(this.disableAutoPan_),!this.enableEventPropagation_){for(this.eventListeners_=[],e=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],t=0;t<e.length;t++)this.eventListeners_.push(google.maps.event.addDomListener(this.div_,e[t],n));this.eventListeners_.push(google.maps.event.addDomListener(this.div_,"mouseover",function(t){this.style.cursor="default"}))}this.contextListener_=google.maps.event.addDomListener(this.div_,"contextmenu",function(t){t.returnValue=!1,t.preventDefault&&t.preventDefault(),o.enableEventPropagation_||n(t)}),google.maps.event.trigger(this,"domready")}},InfoBox.prototype.getCloseBoxImg_=function(){var t="";return""!==this.closeBoxURL_&&(t="<img",t+=" src='"+this.closeBoxURL_+"'",t+=" align=right",t+=" style='",t+=" position: relative;",t+=" cursor: pointer;",t+=" margin: "+this.closeBoxMargin_+";",t+="'>"),t},InfoBox.prototype.addClickHandler_=function(){var t;""!==this.closeBoxURL_?(t=this.div_.firstChild,this.closeListener_=google.maps.event.addDomListener(t,"click",this.getCloseClickHandler_())):this.closeListener_=null},InfoBox.prototype.getCloseClickHandler_=function(){var e=this;return function(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),google.maps.event.trigger(e,"closeclick"),e.close()}},InfoBox.prototype.panBox_=function(t){var e,i=0,o=0;if(!t&&(e=this.getMap())instanceof google.maps.Map){e.getBounds().contains(this.position_)||e.setCenter(this.position_),e.getBounds();var n=e.getDiv(),s=n.offsetWidth,a=n.offsetHeight,r=this.pixelOffset_.width,l=this.pixelOffset_.height,c=this.div_.offsetWidth,d=this.div_.offsetHeight,h=this.infoBoxClearance_.width,p=this.infoBoxClearance_.height,u=this.getProjection().fromLatLngToContainerPixel(this.position_);u.x<-r+h?i=u.x+r-h:u.x+c+r+h>s&&(i=u.x+c+r+h-s),this.alignBottom_?u.y<-l+p+d?o=u.y+l-p-d:u.y+l+p>a&&(o=u.y+l+p-a):u.y<-l+p?o=u.y+l-p:u.y+d+l+p>a&&(o=u.y+d+l+p-a),(0!==i||0!==o)&&(e.getCenter(),o-=100,e.panBy(i,o))}},InfoBox.prototype.setBoxStyle_=function(){var t,e;if(this.div_){for(t in this.div_.className=this.boxClass_,this.div_.style.cssText="",e=this.boxStyle_)e.hasOwnProperty(t)&&(this.div_.style[t]=e[t]);this.div_.style.WebkitTransform="translateZ(0)",void 0!==this.div_.style.opacity&&""!==this.div_.style.opacity&&(this.div_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*this.div_.style.opacity+')"',this.div_.style.filter="alpha(opacity="+100*this.div_.style.opacity+")"),this.div_.style.position="absolute",this.div_.style.visibility="hidden",null!==this.zIndex_&&(this.div_.style.zIndex=this.zIndex_)}},InfoBox.prototype.getBoxWidths_=function(){var t,e={top:0,bottom:0,left:0,right:0},i=this.div_;return document.defaultView&&document.defaultView.getComputedStyle?(t=i.ownerDocument.defaultView.getComputedStyle(i,""))&&(e.top=parseInt(t.borderTopWidth,10)||0,e.bottom=parseInt(t.borderBottomWidth,10)||0,e.left=parseInt(t.borderLeftWidth,10)||0,e.right=parseInt(t.borderRightWidth,10)||0):document.documentElement.currentStyle&&i.currentStyle&&(e.top=parseInt(i.currentStyle.borderTopWidth,10)||0,e.bottom=parseInt(i.currentStyle.borderBottomWidth,10)||0,e.left=parseInt(i.currentStyle.borderLeftWidth,10)||0,e.right=parseInt(i.currentStyle.borderRightWidth,10)||0),e},InfoBox.prototype.onRemove=function(){this.div_&&(this.div_.parentNode.removeChild(this.div_),this.div_=null)},InfoBox.prototype.draw=function(){this.createInfoBoxDiv_();var t=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.style.left=t.x+this.pixelOffset_.width+"px",this.alignBottom_?this.div_.style.bottom=-(t.y+this.pixelOffset_.height)+"px":this.div_.style.top=t.y+this.pixelOffset_.height+"px",this.isHidden_?this.div_.style.visibility="hidden":this.div_.style.visibility="visible"},InfoBox.prototype.setOptions=function(t){void 0!==t.boxClass&&(this.boxClass_=t.boxClass,this.setBoxStyle_()),void 0!==t.boxStyle&&(this.boxStyle_=t.boxStyle,this.setBoxStyle_()),void 0!==t.content&&this.setContent(t.content),void 0!==t.disableAutoPan&&(this.disableAutoPan_=t.disableAutoPan),void 0!==t.maxWidth&&(this.maxWidth_=t.maxWidth),void 0!==t.pixelOffset&&(this.pixelOffset_=t.pixelOffset),void 0!==t.alignBottom&&(this.alignBottom_=t.alignBottom),void 0!==t.position&&this.setPosition(t.position),void 0!==t.zIndex&&this.setZIndex(t.zIndex),void 0!==t.closeBoxMargin&&(this.closeBoxMargin_=t.closeBoxMargin),void 0!==t.closeBoxURL&&(this.closeBoxURL_=t.closeBoxURL),void 0!==t.infoBoxClearance&&(this.infoBoxClearance_=t.infoBoxClearance),void 0!==t.isHidden&&(this.isHidden_=t.isHidden),void 0!==t.visible&&(this.isHidden_=!t.visible),void 0!==t.enableEventPropagation&&(this.enableEventPropagation_=t.enableEventPropagation),this.div_&&this.draw()},InfoBox.prototype.setContent=function(t){this.content_=t,this.div_&&(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.fixedWidthSet_||(this.div_.style.width=""),void 0===t.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+t:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(t)),this.fixedWidthSet_||(this.div_.style.width=this.div_.offsetWidth+"px",void 0===t.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+t:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(t))),this.addClickHandler_()),google.maps.event.trigger(this,"content_changed")},InfoBox.prototype.setPosition=function(t){this.position_=t,this.div_&&this.draw(),google.maps.event.trigger(this,"position_changed")},InfoBox.prototype.setZIndex=function(t){this.zIndex_=t,this.div_&&(this.div_.style.zIndex=t),google.maps.event.trigger(this,"zindex_changed")},InfoBox.prototype.setVisible=function(t){this.isHidden_=!t,this.div_&&(this.div_.style.visibility=this.isHidden_?"hidden":"visible")},InfoBox.prototype.getContent=function(){return this.content_},InfoBox.prototype.getPosition=function(){return this.position_},InfoBox.prototype.getZIndex=function(){return this.zIndex_},InfoBox.prototype.getVisible=function(){return void 0!==this.getMap()&&null!==this.getMap()&&!this.isHidden_},InfoBox.prototype.show=function(){this.isHidden_=!1,this.div_&&(this.div_.style.visibility="visible")},InfoBox.prototype.hide=function(){this.isHidden_=!0,this.div_&&(this.div_.style.visibility="hidden")},InfoBox.prototype.open=function(t,e){var i=this;e&&(this.position_=e.getPosition(),this.moveListener_=google.maps.event.addListener(e,"position_changed",function(){i.setPosition(this.getPosition())})),this.setMap(t),this.div_&&this.panBox_()},InfoBox.prototype.close=function(){var t;if(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.eventListeners_){for(t=0;t<this.eventListeners_.length;t++)google.maps.event.removeListener(this.eventListeners_[t]);this.eventListeners_=null}this.moveListener_&&(google.maps.event.removeListener(this.moveListener_),this.moveListener_=null),this.contextListener_&&(google.maps.event.removeListener(this.contextListener_),this.contextListener_=null),this.setMap(null)}}function RichMarker(t){var e=t||{};this.ready_=!1,this.dragging_=!1,null==t.visible&&(t.visible=!0),null==t.shadow&&(t.shadow="7px -3px 5px rgba(88,88,88,0.7)"),null==t.anchor&&(t.anchor=RichMarkerPosition.BOTTOM),this.setValues(e)}!function(t,e){"function"==typeof define&&define.amd?define(["jquery"],e):e(t.jQuery)}(this,function(n){"function"!=typeof Object.create&&(Object.create=function(t){function e(){}return e.prototype=t,new e});var i={init:function(t){return this.options=n.extend({},n.noty.defaults,t),this.options.layout=this.options.custom?n.noty.layouts.inline:n.noty.layouts[this.options.layout],n.noty.themes[this.options.theme]?this.options.theme=n.noty.themes[this.options.theme]:t.themeClassName=this.options.theme,delete t.layout,delete t.theme,this.options=n.extend({},this.options,this.options.layout.options),this.options.id="noty_"+(new Date).getTime()*Math.floor(1e6*Math.random()),this.options=n.extend({},this.options,t),this._build(),this},_build:function(){var t=n('<div class="noty_bar noty_type_'+this.options.type+'"></div>').attr("id",this.options.id);if(t.append(this.options.template).find(".noty_text").html(this.options.text),this.$bar=null!==this.options.layout.parent.object?n(this.options.layout.parent.object).css(this.options.layout.parent.css).append(t):t,this.options.themeClassName&&this.$bar.addClass(this.options.themeClassName).addClass("noty_container_type_"+this.options.type),this.options.buttons){this.options.closeWith=[],this.options.timeout=!1;var e=n("<div/>").addClass("noty_buttons");null!==this.options.layout.parent.object?this.$bar.find(".noty_bar").append(e):this.$bar.append(e);var o=this;n.each(this.options.buttons,function(t,e){var i=n("<button/>").addClass(e.addClass?e.addClass:"gray").html(e.text).attr("id",e.id?e.id:"button-"+t).appendTo(o.$bar.find(".noty_buttons")).on("click",function(t){n.isFunction(e.onClick)&&e.onClick.call(i,o,t)})})}this.$message=this.$bar.find(".noty_message"),this.$closeButton=this.$bar.find(".noty_close"),this.$buttons=this.$bar.find(".noty_buttons"),n.noty.store[this.options.id]=this},show:function(){var e=this;return e.options.custom?e.options.custom.find(e.options.layout.container.selector).append(e.$bar):n(e.options.layout.container.selector).append(e.$bar),e.options.theme&&e.options.theme.style&&e.options.theme.style.apply(e),"function"===n.type(e.options.layout.css)?this.options.layout.css.apply(e.$bar):e.$bar.css(this.options.layout.css||{}),e.$bar.addClass(e.options.layout.addClass),e.options.layout.container.style.apply(n(e.options.layout.container.selector)),e.showing=!0,e.options.theme&&e.options.theme.style&&e.options.theme.callback.onShow.apply(this),-1<n.inArray("click",e.options.closeWith)&&e.$bar.css("cursor","pointer").one("click",function(t){e.stopPropagation(t),e.options.callback.onCloseClick&&e.options.callback.onCloseClick.apply(e),e.close()}),-1<n.inArray("hover",e.options.closeWith)&&e.$bar.one("mouseenter",function(){e.close()}),-1<n.inArray("button",e.options.closeWith)&&e.$closeButton.one("click",function(t){e.stopPropagation(t),e.close()}),-1==n.inArray("button",e.options.closeWith)&&e.$closeButton.remove(),e.options.callback.onShow&&e.options.callback.onShow.apply(e),"string"==typeof e.options.animation.open?(e.$bar.css("height",e.$bar.innerHeight()),e.$bar.show().addClass(e.options.animation.open).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){e.options.callback.afterShow&&e.options.callback.afterShow.apply(e),e.showing=!1,e.shown=!0})):e.$bar.animate(e.options.animation.open,e.options.animation.speed,e.options.animation.easing,function(){e.options.callback.afterShow&&e.options.callback.afterShow.apply(e),e.showing=!1,e.shown=!0}),e.options.timeout&&e.$bar.delay(e.options.timeout).promise().done(function(){e.close()}),this},close:function(){if(!(this.closed||this.$bar&&this.$bar.hasClass("i-am-closing-now"))){var i=this;if(this.showing)return void i.$bar.queue(function(){i.close.apply(i)});if(!this.shown&&!this.showing){var o=[];return n.each(n.noty.queue,function(t,e){e.options.id!=i.options.id&&o.push(e)}),void(n.noty.queue=o)}i.$bar.addClass("i-am-closing-now"),i.options.callback.onClose&&i.options.callback.onClose.apply(i),"string"==typeof i.options.animation.close?i.$bar.addClass(i.options.animation.close).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i.options.callback.afterClose&&i.options.callback.afterClose.apply(i),i.closeCleanUp()}):i.$bar.clearQueue().stop().animate(i.options.animation.close,i.options.animation.speed,i.options.animation.easing,function(){i.options.callback.afterClose&&i.options.callback.afterClose.apply(i)}).promise().done(function(){i.closeCleanUp()})}},closeCleanUp:function(){var t=this;t.options.modal&&(n.notyRenderer.setModalCount(-1),0==n.notyRenderer.getModalCount()&&n(".noty_modal").fadeOut("fast",function(){n(this).remove()})),n.notyRenderer.setLayoutCountFor(t,-1),0==n.notyRenderer.getLayoutCountFor(t)&&n(t.options.layout.container.selector).remove(),void 0!==t.$bar&&null!==t.$bar&&("string"==typeof t.options.animation.close?(t.$bar.css("transition","all 100ms ease").css("border",0).css("margin",0).height(0),t.$bar.one("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){t.$bar.remove(),t.$bar=null,t.closed=!0,t.options.theme.callback&&t.options.theme.callback.onClose&&t.options.theme.callback.onClose.apply(t)})):(t.$bar.remove(),t.$bar=null,t.closed=!0)),delete n.noty.store[t.options.id],t.options.theme.callback&&t.options.theme.callback.onClose&&t.options.theme.callback.onClose.apply(t),t.options.dismissQueue||(n.noty.ontap=!0,n.notyRenderer.render()),0<t.options.maxVisible&&t.options.dismissQueue&&n.notyRenderer.render()},setText:function(t){return this.closed||(this.options.text=t,this.$bar.find(".noty_text").html(t)),this},setType:function(t){return this.closed||(this.options.type=t,this.options.theme.style.apply(this),this.options.theme.callback.onShow.apply(this)),this},setTimeout:function(t){if(!this.closed){var e=this;this.options.timeout=t,e.$bar.delay(e.options.timeout).promise().done(function(){e.close()})}return this},stopPropagation:function(t){void 0!==(t=t||window.event).stopPropagation?t.stopPropagation():t.cancelBubble=!0},closed:!1,showing:!1,shown:!1};n.notyRenderer={},n.notyRenderer.init=function(t){var e=Object.create(i).init(t);return e.options.killer&&n.noty.closeAll(),e.options.force?n.noty.queue.unshift(e):n.noty.queue.push(e),n.notyRenderer.render(),"object"==n.noty.returns?e:e.options.id},n.notyRenderer.render=function(){var t=n.noty.queue[0];"object"===n.type(t)?t.options.dismissQueue?0<t.options.maxVisible?n(t.options.layout.container.selector+" li").length<t.options.maxVisible&&n.notyRenderer.show(n.noty.queue.shift()):n.notyRenderer.show(n.noty.queue.shift()):n.noty.ontap&&(n.notyRenderer.show(n.noty.queue.shift()),n.noty.ontap=!1):n.noty.ontap=!0},n.notyRenderer.show=function(t){t.options.modal&&(n.notyRenderer.createModalFor(t),n.notyRenderer.setModalCount(1)),t.options.custom?0==t.options.custom.find(t.options.layout.container.selector).length?t.options.custom.append(n(t.options.layout.container.object).addClass("i-am-new")):t.options.custom.find(t.options.layout.container.selector).removeClass("i-am-new"):0==n(t.options.layout.container.selector).length?n("body").append(n(t.options.layout.container.object).addClass("i-am-new")):n(t.options.layout.container.selector).removeClass("i-am-new"),n.notyRenderer.setLayoutCountFor(t,1),t.show()},n.notyRenderer.createModalFor=function(t){if(0==n(".noty_modal").length){var e=n("<div/>").addClass("noty_modal").addClass(t.options.theme).data("noty_modal_count",0);t.options.theme.modal&&t.options.theme.modal.css&&e.css(t.options.theme.modal.css),e.prependTo(n("body")).fadeIn("fast"),-1<n.inArray("backdrop",t.options.closeWith)&&e.on("click",function(){n.noty.closeAll()})}},n.notyRenderer.getLayoutCountFor=function(t){return n(t.options.layout.container.selector).data("noty_layout_count")||0},n.notyRenderer.setLayoutCountFor=function(t,e){return n(t.options.layout.container.selector).data("noty_layout_count",n.notyRenderer.getLayoutCountFor(t)+e)},n.notyRenderer.getModalCount=function(){return n(".noty_modal").data("noty_modal_count")||0},n.notyRenderer.setModalCount=function(t){return n(".noty_modal").data("noty_modal_count",n.notyRenderer.getModalCount()+t)},n.fn.noty=function(t){return t.custom=n(this),n.notyRenderer.init(t)},n.noty={},n.noty.queue=[],n.noty.ontap=!0,n.noty.layouts={},n.noty.themes={},n.noty.returns="object",n.noty.store={},n.noty.get=function(t){return!!n.noty.store.hasOwnProperty(t)&&n.noty.store[t]},n.noty.close=function(t){return!!n.noty.get(t)&&n.noty.get(t).close()},n.noty.setText=function(t,e){return!!n.noty.get(t)&&n.noty.get(t).setText(e)},n.noty.setType=function(t,e){return!!n.noty.get(t)&&n.noty.get(t).setType(e)},n.noty.clearQueue=function(){n.noty.queue=[]},n.noty.closeAll=function(){n.noty.clearQueue(),n.each(n.noty.store,function(t,e){e.close()})};var t=window.alert;n.noty.consumeAlert=function(e){window.alert=function(t){e?e.text=t:e={text:t},n.notyRenderer.init(e)}},n.noty.stopConsumeAlert=function(){window.alert=t},n.noty.defaults={layout:"top",theme:"defaultTheme",type:"alert",text:"",dismissQueue:!0,template:'<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div>',animation:{open:{height:"toggle"},close:{height:"toggle"},easing:"swing",speed:500},timeout:!1,force:!1,modal:!1,maxVisible:5,killer:!1,closeWith:["click"],callback:{onShow:function(){},afterShow:function(){},onClose:function(){},afterClose:function(){},onCloseClick:function(){}},buttons:!1},n(window).on("resize",function(){n.each(n.noty.layouts,function(t,e){e.container.style.apply(n(e.container.selector))})}),window.noty=function(t){return jQuery.notyRenderer.init(t)},n.noty.layouts.bottom={name:"bottom",options:{},container:{object:'<ul id="noty_bottom_layout_container" />',selector:"ul#noty_bottom_layout_container",style:function(){n(this).css({bottom:0,left:"5%",position:"fixed",width:"90%",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:9999999})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none"},addClass:""},n.noty.layouts.bottomCenter={name:"bottomCenter",options:{},container:{object:'<ul id="noty_bottomCenter_layout_container" />',selector:"ul#noty_bottomCenter_layout_container",style:function(){n(this).css({bottom:20,left:0,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7}),n(this).css({left:(n(window).width()-n(this).outerWidth(!1))/2+"px"})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""},n.noty.layouts.bottomLeft={name:"bottomLeft",options:{},container:{object:'<ul id="noty_bottomLeft_layout_container" />',selector:"ul#noty_bottomLeft_layout_container",style:function(){n(this).css({bottom:20,left:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7}),window.innerWidth<600&&n(this).css({left:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""},n.noty.layouts.bottomRight={name:"bottomRight",options:{},container:{object:'<ul id="noty_bottomRight_layout_container" />',selector:"ul#noty_bottomRight_layout_container",style:function(){n(this).css({bottom:20,right:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7}),window.innerWidth<600&&n(this).css({right:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""},n.noty.layouts.center={name:"center",options:{},container:{object:'<ul id="noty_center_layout_container" />',selector:"ul#noty_center_layout_container",style:function(){n(this).css({position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});var t=n(this).clone().css({visibility:"hidden",display:"block",position:"absolute",top:0,left:0}).attr("id","dupe");n("body").append(t),t.find(".i-am-closing-now").remove(),t.find("li").css("display","block");var e=t.height();t.remove(),n(this).hasClass("i-am-new")?n(this).css({left:(n(window).width()-n(this).outerWidth(!1))/2+"px",top:(n(window).height()-e)/2+"px"}):n(this).animate({left:(n(window).width()-n(this).outerWidth(!1))/2+"px",top:(n(window).height()-e)/2+"px"},500)}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""},n.noty.layouts.centerLeft={name:"centerLeft",options:{},container:{object:'<ul id="noty_centerLeft_layout_container" />',selector:"ul#noty_centerLeft_layout_container",style:function(){n(this).css({left:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});var t=n(this).clone().css({visibility:"hidden",display:"block",position:"absolute",top:0,left:0}).attr("id","dupe");n("body").append(t),t.find(".i-am-closing-now").remove(),t.find("li").css("display","block");var e=t.height();t.remove(),n(this).hasClass("i-am-new")?n(this).css({top:(n(window).height()-e)/2+"px"}):n(this).animate({top:(n(window).height()-e)/2+"px"},500),window.innerWidth<600&&n(this).css({left:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""},n.noty.layouts.centerRight={name:"centerRight",options:{},container:{object:'<ul id="noty_centerRight_layout_container" />',selector:"ul#noty_centerRight_layout_container",style:function(){n(this).css({right:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7});var t=n(this).clone().css({visibility:"hidden",display:"block",position:"absolute",top:0,left:0}).attr("id","dupe");n("body").append(t),t.find(".i-am-closing-now").remove(),t.find("li").css("display","block");var e=t.height();t.remove(),n(this).hasClass("i-am-new")?n(this).css({top:(n(window).height()-e)/2+"px"}):n(this).animate({top:(n(window).height()-e)/2+"px"},500),window.innerWidth<600&&n(this).css({right:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""},n.noty.layouts.inline={name:"inline",options:{},container:{object:'<ul class="noty_inline_layout_container" />',selector:"ul.noty_inline_layout_container",style:function(){n(this).css({width:"100%",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:9999999})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none"},addClass:""},n.noty.layouts.top={name:"top",options:{},container:{object:'<ul id="noty_top_layout_container" />',selector:"ul#noty_top_layout_container",style:function(){n(this).css({top:0,left:"5%",position:"fixed",width:"90%",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:9999999})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none"},addClass:""},n.noty.layouts.topCenter={name:"topCenter",options:{},container:{object:'<ul id="noty_topCenter_layout_container" />',selector:"ul#noty_topCenter_layout_container",style:function(){n(this).css({top:20,left:0,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7}),n(this).css({left:(n(window).width()-n(this).outerWidth(!1))/2+"px"})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""},n.noty.layouts.topLeft={name:"topLeft",options:{},container:{object:'<ul id="noty_topLeft_layout_container" />',selector:"ul#noty_topLeft_layout_container",style:function(){n(this).css({top:20,left:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7}),window.innerWidth<600&&n(this).css({left:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""},n.noty.layouts.topRight={name:"topRight",options:{},container:{object:'<ul id="noty_topRight_layout_container" />',selector:"ul#noty_topRight_layout_container",style:function(){n(this).css({top:20,right:20,position:"fixed",width:"310px",height:"auto",margin:0,padding:0,listStyleType:"none",zIndex:1e7}),window.innerWidth<600&&n(this).css({right:5})}},parent:{object:"<li />",selector:"li",css:{}},css:{display:"none",width:"310px"},addClass:""},n.noty.themes.bootstrapTheme={name:"bootstrapTheme",modal:{css:{position:"fixed",width:"100%",height:"100%",backgroundColor:"#000",zIndex:1e4,opacity:.6,display:"none",left:0,top:0}},style:function(){var t=this.options.layout.container.selector;switch(n(t).addClass("list-group"),this.$closeButton.append('<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>'),this.$closeButton.addClass("close"),this.$bar.addClass("list-group-item").css("padding","0px"),this.options.type){case"alert":case"notification":this.$bar.addClass("list-group-item-info");break;case"warning":this.$bar.addClass("list-group-item-warning");break;case"error":this.$bar.addClass("list-group-item-danger");break;case"information":this.$bar.addClass("list-group-item-info");break;case"success":this.$bar.addClass("list-group-item-success")}this.$message.css({fontSize:"13px",lineHeight:"16px",textAlign:"center",padding:"8px 10px 9px",width:"auto",position:"relative"})},callback:{onShow:function(){},onClose:function(){}}},n.noty.themes.defaultTheme={name:"defaultTheme",helpers:{borderFix:function(){if(this.options.dismissQueue){var t=this.options.layout.container.selector+" "+this.options.layout.parent.selector;switch(this.options.layout.name){case"top":n(t).css({borderRadius:"0px 0px 0px 0px"}),n(t).last().css({borderRadius:"0px 0px 5px 5px"});break;case"topCenter":case"topLeft":case"topRight":case"bottomCenter":case"bottomLeft":case"bottomRight":case"center":case"centerLeft":case"centerRight":case"inline":n(t).css({borderRadius:"0px 0px 0px 0px"}),n(t).first().css({"border-top-left-radius":"5px","border-top-right-radius":"5px"}),n(t).last().css({"border-bottom-left-radius":"5px","border-bottom-right-radius":"5px"});break;case"bottom":n(t).css({borderRadius:"0px 0px 0px 0px"}),n(t).first().css({borderRadius:"5px 5px 0px 0px"})}}}},modal:{css:{position:"fixed",width:"100%",height:"100%",backgroundColor:"#000",zIndex:1e4,opacity:.6,display:"none",left:0,top:0}},style:function(){switch(this.$bar.css({overflow:"hidden",background:"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAQAAAClM0ndAAAAhklEQVR4AdXO0QrCMBBE0bttkk38/w8WRERpdyjzVOc+HxhIHqJGMQcFFkpYRQotLLSw0IJ5aBdovruMYDA/kT8plF9ZKLFQcgF18hDj1SbQOMlCA4kao0iiXmah7qBWPdxpohsgVZyj7e5I9KcID+EhiDI5gxBYKLBQYKHAQoGFAoEks/YEGHYKB7hFxf0AAAAASUVORK5CYII=') repeat-x scroll left top #fff"}),this.$message.css({fontSize:"13px",lineHeight:"16px",textAlign:"center",padding:"8px 10px 9px",width:"auto",position:"relative"}),this.$closeButton.css({position:"absolute",top:4,right:4,width:10,height:10,background:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAxUlEQVR4AR3MPUoDURSA0e++uSkkOxC3IAOWNtaCIDaChfgXBMEZbQRByxCwk+BasgQRZLSYoLgDQbARxry8nyumPcVRKDfd0Aa8AsgDv1zp6pYd5jWOwhvebRTbzNNEw5BSsIpsj/kurQBnmk7sIFcCF5yyZPDRG6trQhujXYosaFoc+2f1MJ89uc76IND6F9BvlXUdpb6xwD2+4q3me3bysiHvtLYrUJto7PD/ve7LNHxSg/woN2kSz4txasBdhyiz3ugPGetTjm3XRokAAAAASUVORK5CYII=)",display:"none",cursor:"pointer"}),this.$buttons.css({padding:5,textAlign:"right",borderTop:"1px solid #ccc",backgroundColor:"#fff"}),this.$buttons.find("button").css({marginLeft:5}),this.$buttons.find("button:first").css({marginLeft:0}),this.$bar.on({mouseenter:function(){n(this).find(".noty_close").stop().fadeTo("normal",1)},mouseleave:function(){n(this).find(".noty_close").stop().fadeTo("normal",0)}}),this.options.layout.name){case"top":this.$bar.css({borderRadius:"0px 0px 5px 5px",borderBottom:"2px solid #eee",borderLeft:"2px solid #eee",borderRight:"2px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"});break;case"topCenter":case"center":case"bottomCenter":case"inline":this.$bar.css({borderRadius:"5px",border:"1px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"}),this.$message.css({fontSize:"13px",textAlign:"center"});break;case"topLeft":case"topRight":case"bottomLeft":case"bottomRight":case"centerLeft":case"centerRight":this.$bar.css({borderRadius:"5px",border:"1px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"}),this.$message.css({fontSize:"13px",textAlign:"left"});break;case"bottom":this.$bar.css({borderRadius:"5px 5px 0px 0px",borderTop:"2px solid #eee",borderLeft:"2px solid #eee",borderRight:"2px solid #eee",boxShadow:"0 -2px 4px rgba(0, 0, 0, 0.1)"});break;default:this.$bar.css({border:"2px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"})}switch(this.options.type){case"alert":case"notification":this.$bar.css({backgroundColor:"#FFF",borderColor:"#CCC",color:"#444"});break;case"warning":this.$bar.css({backgroundColor:"#FFEAA8",borderColor:"#FFC237",color:"#826200"}),this.$buttons.css({borderTop:"1px solid #FFC237"});break;case"error":this.$bar.css({backgroundColor:"red",borderColor:"darkred",color:"#FFF"}),this.$message.css({fontWeight:"bold"}),this.$buttons.css({borderTop:"1px solid darkred"});break;case"information":this.$bar.css({backgroundColor:"#57B7E2",borderColor:"#0B90C4",color:"#FFF"}),this.$buttons.css({borderTop:"1px solid #0B90C4"});break;case"success":this.$bar.css({backgroundColor:"lightgreen",borderColor:"#50C24E",color:"darkgreen"}),this.$buttons.css({borderTop:"1px solid #50C24E"});break;default:this.$bar.css({backgroundColor:"#FFF",borderColor:"#CCC",color:"#444"})}},callback:{onShow:function(){n.noty.themes.defaultTheme.helpers.borderFix.apply(this)},onClose:function(){n.noty.themes.defaultTheme.helpers.borderFix.apply(this)}}},n.noty.themes.relax={name:"relax",helpers:{},modal:{css:{position:"fixed",width:"100%",height:"100%",backgroundColor:"#000",zIndex:1e4,opacity:.6,display:"none",left:0,top:0}},style:function(){switch(this.$bar.css({overflow:"hidden",margin:"4px 0",borderRadius:"2px"}),this.$message.css({fontSize:"14px",lineHeight:"16px",textAlign:"center",padding:"10px",width:"auto",position:"relative"}),this.$closeButton.css({position:"absolute",top:4,right:4,width:10,height:10,background:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAxUlEQVR4AR3MPUoDURSA0e++uSkkOxC3IAOWNtaCIDaChfgXBMEZbQRByxCwk+BasgQRZLSYoLgDQbARxry8nyumPcVRKDfd0Aa8AsgDv1zp6pYd5jWOwhvebRTbzNNEw5BSsIpsj/kurQBnmk7sIFcCF5yyZPDRG6trQhujXYosaFoc+2f1MJ89uc76IND6F9BvlXUdpb6xwD2+4q3me3bysiHvtLYrUJto7PD/ve7LNHxSg/woN2kSz4txasBdhyiz3ugPGetTjm3XRokAAAAASUVORK5CYII=)",display:"none",cursor:"pointer"}),this.$buttons.css({padding:5,textAlign:"right",borderTop:"1px solid #ccc",backgroundColor:"#fff"}),this.$buttons.find("button").css({marginLeft:5}),this.$buttons.find("button:first").css({marginLeft:0}),this.$bar.on({mouseenter:function(){n(this).find(".noty_close").stop().fadeTo("normal",1)},mouseleave:function(){n(this).find(".noty_close").stop().fadeTo("normal",0)}}),this.options.layout.name){case"top":this.$bar.css({borderBottom:"2px solid #eee",borderLeft:"2px solid #eee",borderRight:"2px solid #eee",borderTop:"2px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"});break;case"topCenter":case"center":case"bottomCenter":case"inline":this.$bar.css({border:"1px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"}),this.$message.css({fontSize:"13px",textAlign:"center"});break;case"topLeft":case"topRight":case"bottomLeft":case"bottomRight":case"centerLeft":case"centerRight":this.$bar.css({border:"1px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"}),this.$message.css({fontSize:"13px",textAlign:"left"});break;case"bottom":this.$bar.css({borderTop:"2px solid #eee",borderLeft:"2px solid #eee",borderRight:"2px solid #eee",borderBottom:"2px solid #eee",boxShadow:"0 -2px 4px rgba(0, 0, 0, 0.1)"});break;default:this.$bar.css({border:"2px solid #eee",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"})}switch(this.options.type){case"alert":case"notification":this.$bar.css({backgroundColor:"#FFF",borderColor:"#dedede",color:"#444"});break;case"warning":this.$bar.css({backgroundColor:"#FFEAA8",borderColor:"#FFC237",color:"#826200"}),this.$buttons.css({borderTop:"1px solid #FFC237"});break;case"error":this.$bar.css({backgroundColor:"#FF8181",borderColor:"#e25353",color:"#FFF"}),this.$message.css({fontWeight:"bold"}),this.$buttons.css({borderTop:"1px solid darkred"});break;case"information":this.$bar.css({backgroundColor:"#78C5E7",borderColor:"#3badd6",color:"#FFF"}),this.$buttons.css({borderTop:"1px solid #0B90C4"});break;case"success":this.$bar.css({backgroundColor:"#BCF5BC",borderColor:"#7cdd77",color:"darkgreen"}),this.$buttons.css({borderTop:"1px solid #50C24E"});break;default:this.$bar.css({backgroundColor:"#FFF",borderColor:"#CCC",color:"#444"})}},callback:{onShow:function(){},onClose:function(){}}}}),function(t){var n;n=new(n=function(){this.make=function(t,e,i){void 0===e&&(e="infomation"),void 0===i&&(i="topRight"),noty({text:t,layout:i,type:e,animation:{open:"animated bounceInRight",close:"animated bounceOutRight",easing:"swing",speed:500},theme:"relax",timeout:6e3})},this.template=function(t,e){return void 0!==t&&(t="<i class='fa fa-"+t+"'></i>"),"<div class='st_notice_template'>"+t+" <div class='display_table'>"+e+"</div>  </div>"}}),window.STNotice=n;"undefined"!=typeof stanalytics&&function i(o){return void 0!==stanalytics.noty&&!(o>=stanalytics.noty.length)&&void window.setTimeout(function(){var t=stanalytics.noty[o],e=stanalytics.noti_position;n.make(n.template(t.icon,t.message),t.type,e),i(++o)},500*o)}(0)}(jQuery),function(a){function e(t){var e=t||window.event,i=[].slice.call(arguments,1),o=0,n=0,s=0;return(t=a.event.fix(e)).type="mousewheel",e.wheelDelta&&(o=e.wheelDelta/120),e.detail&&(o=-e.detail/3),s=o,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(s=0,n=-1*o),void 0!==e.wheelDeltaY&&(s=e.wheelDeltaY/120),void 0!==e.wheelDeltaX&&(n=-1*e.wheelDeltaX/120),i.unshift(t,o,n,s),(a.event.dispatch||a.event.handle).apply(this,i)}var i=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var t=i.length;t;)a.event.fixHooks[i[--t]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var t=i.length;t;)this.addEventListener(i[--t],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var t=i.length;t;)this.removeEventListener(i[--t],e,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}(jQuery),jQuery(function(i){i(".btn_add_price").click(function(){var t=i(".data_price_html").html(),e=Math.floor(1e4*Math.random()+1);t=(t=t.replace('id="start"','id="start_'+e+'"').replace('id="end"','id="end_'+e+'"')).replace("hasDatepicker","").replace("hasDatepicker",""),i(".data_price").append(t),i(".st_datepicker_price").each(function(){i(this).datepicker(),i(this).datepicker("option","dateFormat","yy-mm-dd")})}),i(document).on("click",".btn_del_price",function(){i(this).parent().parent().remove()}),i(".st_datepicker_price").each(function(){i(this).datepicker({dateFormat:"yy-mm-dd",firstDay:1})})}),function(r){var e={topSpacing:0,bottomSpacing:0,className:"is-sticky",wrapperClassName:"sticky-wrapper",center:!1,getWidthFrom:""},l=r(window),c=r(document),d=[],h=l.height(),t=function(){for(var t=l.scrollTop(),e=c.height(),i=e-h,o=i<t?i-t:0,n=0;n<d.length;n++){var s=d[n];if(t<=s.stickyWrapper.offset().top-s.topSpacing-o)null!==s.currentTop&&(s.stickyElement.css("position","").css("top",""),s.stickyElement.parent().removeClass(s.className),s.currentTop=null);else{var a=e-s.stickyElement.outerHeight()-s.topSpacing-s.bottomSpacing-t-o;a<0?a+=s.topSpacing:a=s.topSpacing,s.currentTop!=a&&(s.stickyElement.css("position","fixed").css("top",a),void 0!==s.getWidthFrom&&s.stickyElement.css("width",r(s.getWidthFrom).width()),s.stickyElement.parent().addClass(s.className),s.currentTop=a)}}},i=function(){h=l.height()},o={init:function(t){var n=r.extend(e,t);return this.each(function(){var t=r(this),e=t.attr("id"),i=r("<div></div>").attr("id",e+"-sticky-wrapper").addClass(n.wrapperClassName);t.wrapAll(i),n.center&&t.parent().css({width:t.outerWidth(),marginLeft:"auto",marginRight:"auto"}),"right"==t.css("float")&&t.css({float:"none"}).parent().css({float:"right"});var o=t.parent();o.css("height",t.outerHeight()),d.push({topSpacing:n.topSpacing,bottomSpacing:n.bottomSpacing,stickyElement:t,currentTop:null,stickyWrapper:o,className:n.className,getWidthFrom:n.getWidthFrom})})},update:t};window.addEventListener?(window.addEventListener("scroll",t,!1),window.addEventListener("resize",i,!1)):window.attachEvent&&(window.attachEvent("onscroll",t),window.attachEvent("onresize",i)),r.fn.sticky=function(t){return o[t]?o[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void r.error("Method "+t+" does not exist on jQuery.sticky"):o.init.apply(this,arguments)},r(function(){setTimeout(t,0)})}(jQuery),function(k,t){function x(t,e,i){return[parseFloat(t[0])*(l.test(t[0])?e/100:1),parseFloat(t[1])*(l.test(t[1])?i/100:1)]}function C(t,e){return parseInt(k.css(t,e),10)||0}k.ui=k.ui||{};var n,T=Math.max,S=Math.abs,D=Math.round,o=/left|center|right/,s=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,r=/^\w+/,l=/%$/,c=k.fn.pos;k.pos={scrollbarWidth:function(){if(void 0!==n)return n;var t,e,i=k("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=i.children()[0];return k("body").append(i),t=o.offsetWidth,i.css("overflow","scroll"),t===(e=o.offsetWidth)&&(e=i[0].clientWidth),i.remove(),n=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),o="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?k.pos.scrollbarWidth():0,height:o?k.pos.scrollbarWidth():0}},getWithinInfo:function(t){var e=k(t||window),i=k.isWindow(e[0]);return{element:e,isWindow:i,isDocument:!!e[0]&&9===e[0].nodeType,offset:e.offset()||{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:i?e.width():e.outerWidth(),height:i?e.height():e.outerHeight()}}},k.fn.pos=function(h){if(!h||!h.of)return c.apply(this,arguments);h=k.extend({},h);var p,u,f,m,g,t,e,i,v=k(h.of),_=k.pos.getWithinInfo(h.within),y=k.pos.getScrollInfo(_),b=(h.collision||"flip").split(" "),w={};return t=9===(i=(e=v)[0]).nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:k.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()},v[0].preventDefault&&(h.at="left top"),u=t.width,f=t.height,m=t.offset,g=k.extend({},m),k.each(["my","at"],function(){var t,e,i=(h[this]||"").split(" ");1===i.length&&(i=o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]),i[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=a.exec(i[0]),e=a.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],h[this]=[r.exec(i[0])[0],r.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===h.at[0]?g.left+=u:"center"===h.at[0]&&(g.left+=u/2),"bottom"===h.at[1]?g.top+=f:"center"===h.at[1]&&(g.top+=f/2),p=x(w.at,u,f),g.left+=p[0],g.top+=p[1],this.each(function(){var i,t,a=k(this),r=a.outerWidth(),l=a.outerHeight(),e=C(this,"marginLeft"),o=C(this,"marginTop"),n=r+e+C(this,"marginRight")+y.width,s=l+o+C(this,"marginBottom")+y.height,c=k.extend({},g),d=x(w.my,a.outerWidth(),a.outerHeight());"right"===h.my[0]?c.left-=r:"center"===h.my[0]&&(c.left-=r/2),"bottom"===h.my[1]?c.top-=l:"center"===h.my[1]&&(c.top-=l/2),c.left+=d[0],c.top+=d[1],k.support.offsetFractions||(c.left=D(c.left),c.top=D(c.top)),i={marginLeft:e,marginTop:o},k.each(["left","top"],function(t,e){k.ui.pos[b[t]]&&k.ui.pos[b[t]][e](c,{targetWidth:u,targetHeight:f,elemWidth:r,elemHeight:l,collisionPosition:i,collisionWidth:n,collisionHeight:s,offset:[p[0]+d[0],p[1]+d[1]],my:h.my,at:h.at,within:_,elem:a})}),h.using&&(t=function(t){var e=m.left-c.left,i=e+u-r,o=m.top-c.top,n=o+f-l,s={target:{element:v,left:m.left,top:m.top,width:u,height:f},element:{element:a,left:c.left,top:c.top,width:r,height:l},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<o?"bottom":"middle"};u<r&&S(e+i)<u&&(s.horizontal="center"),f<l&&S(o+n)<f&&(s.vertical="middle"),s.important=T(S(e),S(i))>T(S(o),S(n))?"horizontal":"vertical",h.using.call(this,t,s)}),a.offset(k.extend(c,{using:t}))})},k.ui.pos={_trigger:function(t,e,i,o){e.elem&&e.elem.trigger({type:i,position:t,positionData:e,triggered:o})},fit:{left:function(t,e){k.ui.pos._trigger(t,e,"posCollide","fitLeft");var i,o=e.within,n=o.isWindow?o.scrollLeft:o.offset.left,s=o.width,a=t.left-e.collisionPosition.marginLeft,r=n-a,l=a+e.collisionWidth-s-n;e.collisionWidth>s?0<r&&l<=0?(i=t.left+r+e.collisionWidth-s-n,t.left+=r-i):t.left=0<l&&r<=0?n:l<r?n+s-e.collisionWidth:n:0<r?t.left+=r:0<l?t.left-=l:t.left=T(t.left-a,t.left),k.ui.pos._trigger(t,e,"posCollided","fitLeft")},top:function(t,e){k.ui.pos._trigger(t,e,"posCollide","fitTop");var i,o=e.within,n=o.isWindow?o.scrollTop:o.offset.top,s=e.within.height,a=t.top-e.collisionPosition.marginTop,r=n-a,l=a+e.collisionHeight-s-n;e.collisionHeight>s?0<r&&l<=0?(i=t.top+r+e.collisionHeight-s-n,t.top+=r-i):t.top=0<l&&r<=0?n:l<r?n+s-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=T(t.top-a,t.top),k.ui.pos._trigger(t,e,"posCollided","fitTop")}},flip:{left:function(t,e){k.ui.pos._trigger(t,e,"posCollide","flipLeft");var i,o,n=e.within,s=n.offset.left+n.scrollLeft,a=n.width,r=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-r,d=l+e.collisionWidth-a-r,h="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,u=-2*e.offset[0];c<0?((i=t.left+h+p+u+e.collisionWidth-a-s)<0||i<S(c))&&(t.left+=h+p+u):0<d&&((0<(o=t.left-e.collisionPosition.marginLeft+h+p+u-r)||S(o)<d)&&(t.left+=h+p+u)),k.ui.pos._trigger(t,e,"posCollided","flipLeft")},top:function(t,e){k.ui.pos._trigger(t,e,"posCollide","flipTop");var i,o,n=e.within,s=n.offset.top+n.scrollTop,a=n.height,r=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-r,d=l+e.collisionHeight-a-r,h="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,p="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,u=-2*e.offset[1];c<0?(o=t.top+h+p+u+e.collisionHeight-a-s,t.top+h+p+u>c&&(o<0||o<S(c))&&(t.top+=h+p+u)):0<d&&(i=t.top-e.collisionPosition.marginTop+h+p+u-r,t.top+h+p+u>d&&(0<i||S(i)<d)&&(t.top+=h+p+u)),k.ui.pos._trigger(t,e,"posCollided","flipTop")}},flipfit:{left:function(){k.ui.pos.flip.left.apply(this,arguments),k.ui.pos.fit.left.apply(this,arguments)},top:function(){k.ui.pos.flip.top.apply(this,arguments),k.ui.pos.fit.top.apply(this,arguments)}}},function(){var t,e,i,o,n,s=document.getElementsByTagName("body")[0],a=document.createElement("div");for(n in t=document.createElement(s?"div":"body"),i={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},s&&k.extend(i,{position:"absolute",left:"-1000px",top:"-1000px"}),i)t.style[n]=i[n];t.appendChild(a),(e=s||document.documentElement).insertBefore(t,e.firstChild),a.style.cssText="position: absolute; left: 10.7432222px;",o=k(a).offset().left,k.support.offsetFractions=10<o&&o<11,t.innerHTML="",e.removeChild(t)}()}(jQuery),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):window.jQuery&&!window.jQuery.fn.iconpicker&&t(window.jQuery)}(function(s){"use strict";var i=function(t){return!1===t||""===t||null==t},o=function(t){return 0<s(t).length},n=function(t){return"string"==typeof t||t instanceof String},a=function(t,e){return-1!==s.inArray(t,e)},r=function(t,e){this._id=r._idCounter++,this.element=s(t).addClass("iconpicker-element"),this._trigger("iconpickerCreate"),this.options=s.extend({},r.defaultOptions,this.element.data(),e),this.options.templates=s.extend({},r.defaultOptions.templates,this.options.templates),this.options.originalPlacement=this.options.placement,this.container=!!o(this.options.container)&&s(this.options.container),!1===this.container&&(this.container=this.element.is("input")?this.element.parent():this.element),this.container.addClass("iconpicker-container").is(".dropdown-menu")&&(this.options.placement="inline"),this.input=!!this.element.is("input")&&this.element.addClass("iconpicker-input"),!1===this.input&&(this.input=this.container.find(this.options.input)),this.component=this.container.find(this.options.component).addClass("iconpicker-component"),0===this.component.length?this.component=!1:this.component.find("i").addClass(this.options.iconComponentBaseClass),this._createPopover(),this._createIconpicker(),0===this.getAcceptButton().length&&(this.options.mustAccept=!1),this.container.is(".input-group")?this.container.parent().append(this.popover):this.container.append(this.popover),this._bindElementEvents(),this._bindWindowEvents(),this.update(this.options.selected),this.isInline()&&this.show(),this._trigger("iconpickerCreated")};r._idCounter=0,r.defaultOptions={title:!1,selected:!1,defaultValue:!1,placement:"bottom",collision:"none",animation:!0,hideOnSelect:!1,showFooter:!1,searchInFooter:!1,mustAccept:!1,selectedCustomClass:"bg-primary",icons:[],iconBaseClass:"fa",iconComponentBaseClass:"fa fa-fw",iconClassPrefix:"fa-",input:"input",component:".input-group-addon",container:!1,templates:{popover:'<div class="iconpicker-popover popover"><div class="arrow"></div><div class="popover-title"></div><div class="popover-content"></div></div>',footer:'<div class="popover-footer"></div>',buttons:'<button class="iconpicker-btn iconpicker-btn-cancel btn btn-default btn-sm">Cancel</button> <button class="iconpicker-btn iconpicker-btn-accept btn btn-primary btn-sm">Accept</button>',search:'<input type="search" class="form-control iconpicker-search" placeholder="Type to filter" />',iconpicker:'<div class="iconpicker"><div class="iconpicker-items"></div></div>',iconpickerItem:'<div class="iconpicker-item"><i></i></div>'}},r.batch=function(t,e){var i=Array.prototype.slice.call(arguments,2);return s(t).each(function(){var t=s(this).data("iconpicker");t&&t[e].apply(t,i)})},r.prototype={constructor:r,options:{},_id:0,_trigger:function(t,e){e=e||{},this.element.trigger(s.extend({type:t,iconpickerInstance:this},e))},_createPopover:function(){this.popover=s(this.options.templates.popover);var t=this.popover.find(".popover-title");if(this.options.title&&t.append(s('<div class="popover-title-text">'+this.options.title+"</div>")),this.options.searchInFooter||i(this.options.templates.buttons)?this.options.title||t.remove():t.append(this.options.templates.search),this.options.showFooter&&!i(this.options.templates.footer)){var e=s(this.options.templates.footer);!i(this.options.templates.search)&&this.options.searchInFooter&&e.append(s(this.options.templates.search)),i(this.options.templates.buttons)||e.append(s(this.options.templates.buttons)),this.popover.append(e)}return!0===this.options.animation&&this.popover.addClass("fade"),this.popover},_createIconpicker:function(){var e=this;this.iconpicker=s(this.options.templates.iconpicker);var t=function(){var t=s(this);t.is("."+e.options.iconBaseClass)&&(t=t.parent()),e._trigger("iconpickerSelect",{iconpickerItem:t,iconpickerValue:e.iconpickerValue}),!1===e.options.mustAccept?(e.update(t.data("iconpickerValue")),e._trigger("iconpickerSelected",{iconpickerItem:this,iconpickerValue:e.iconpickerValue})):e.update(t.data("iconpickerValue"),!0),e.options.hideOnSelect&&!1===e.options.mustAccept&&e.hide()};for(var i in this.options.icons){var o=s(this.options.templates.iconpickerItem);o.find("i").addClass(e.options.iconBaseClass+" "+this.options.iconClassPrefix+this.options.icons[i]),o.data("iconpickerValue",this.options.icons[i]).on("click.iconpicker",t),this.iconpicker.find(".iconpicker-items").append(o.attr("title","."+this.getValue(this.options.icons[i])))}return this.popover.find(".popover-content").append(this.iconpicker),this.iconpicker},_isEventInsideIconpicker:function(t){var e=s(t.target);return!((!e.hasClass("iconpicker-element")||e.hasClass("iconpicker-element")&&!e.is(this.element))&&0===e.parents(".iconpicker-popover").length)},_bindElementEvents:function(){var e=this;this.getSearchInput().on("keyup",function(){e.filter(s(this).val().toLowerCase())}),this.getAcceptButton().on("click.iconpicker",function(){var t=e.iconpicker.find(".iconpicker-selected").get(0);e.update(e.iconpickerValue),e._trigger("iconpickerSelected",{iconpickerItem:t,iconpickerValue:e.iconpickerValue}),e.isInline()||e.hide()}),this.getCancelButton().on("click.iconpicker",function(){e.isInline()||e.hide()}),this.element.on("focus.iconpicker",function(t){e.show(),t.stopPropagation()}),this.hasComponent()&&this.component.on("click.iconpicker",function(){e.toggle()}),this.hasInput()&&this.input.on("keyup.iconpicker",function(t){a(t.keyCode,[38,40,37,39,16,17,18,9,8,91,93,20,46,186,190,46,78,188,44,86])?e._updateFormGroupStatus(!1!==e.getValid(this.value)):e.update()})},_bindWindowEvents:function(){var t=s(window.document),e=this,i=".iconpicker.inst"+this._id;return s(window).on("resize.iconpicker"+i+" orientationchange.iconpicker"+i,function(){e.popover.hasClass("in")&&e.updatePlacement()}),e.isInline()||t.on("mouseup"+i,function(t){return e._isEventInsideIconpicker(t)||e.isInline()||e.hide(),t.stopPropagation(),t.preventDefault(),!1}),!1},_unbindElementEvents:function(){this.popover.off(".iconpicker"),this.element.off(".iconpicker"),this.hasInput()&&this.input.off(".iconpicker"),this.hasComponent()&&this.component.off(".iconpicker"),this.hasContainer()&&this.container.off(".iconpicker")},_unbindWindowEvents:function(){s(window).off(".iconpicker.inst"+this._id),s(window.document).off(".iconpicker.inst"+this._id)},updatePlacement:function(t,e){t=t||this.options.placement,this.options.placement=t,e=!0===(e=e||this.options.collision)?"flip":e;var i={at:"right bottom",my:"right top",of:this.hasInput()?this.input:this.container,collision:!0===e?"flip":e,within:window};if(this.popover.removeClass("inline topLeftCorner topLeft top topRight topRightCorner rightTop right rightBottom bottomRight bottomRightCorner bottom bottomLeft bottomLeftCorner leftBottom left leftTop"),"object"==typeof t)return this.popover.pos(s.extend({},i,t));switch(t){case"inline":i=!1;break;case"topLeftCorner":i.my="right bottom",i.at="left top";break;case"topLeft":i.my="left bottom",i.at="left top";break;case"top":i.my="center bottom",i.at="center top";break;case"topRight":i.my="right bottom",i.at="right top";break;case"topRightCorner":i.my="left bottom",i.at="right top";break;case"rightTop":i.my="left bottom",i.at="right center";break;case"right":i.my="left center",i.at="right center";break;case"rightBottom":i.my="left top",i.at="right center";break;case"bottomRightCorner":i.my="left top",i.at="right bottom";break;case"bottomRight":i.my="right top",i.at="right bottom";break;case"bottom":i.my="center top",i.at="center bottom";break;case"bottomLeft":i.my="left top",i.at="left bottom";break;case"bottomLeftCorner":i.my="right top",i.at="left bottom";break;case"leftBottom":i.my="right top",i.at="left center";break;case"left":i.my="right center",i.at="left center";break;case"leftTop":i.my="right bottom",i.at="left center";break;default:return!1}return this.popover.css({display:"inline"===this.options.placement?"":"block"}),!1!==i?this.popover.pos(i).css("maxWidth",s(window).width()-this.container.offset().left-5):this.popover.css({top:"auto",right:"auto",bottom:"auto",left:"auto",maxWidth:"none"}),this.popover.addClass(this.options.placement),!0},_updateComponents:function(){if(this.iconpicker.find(".iconpicker-item.iconpicker-selected").removeClass("iconpicker-selected "+this.options.selectedCustomClass),this.iconpicker.find("."+this.options.iconBaseClass+"."+this.options.iconClassPrefix+this.iconpickerValue).parent().addClass("iconpicker-selected "+this.options.selectedCustomClass),this.hasComponent()){var t=this.component.find("i");0<t.length?t.attr("class",this.options.iconComponentBaseClass+" "+this.getValue()):this.component.html(this.getValueHtml())}},_updateFormGroupStatus:function(t){return!!this.hasInput()&&(!1!==t?this.input.parents(".form-group:first").removeClass("has-error"):this.input.parents(".form-group:first").addClass("has-error"),!0)},getValid:function(t){n(t)||(t="");var e=""===t;return t=s.trim(t.replace(this.options.iconClassPrefix,"")),!(!a(t,this.options.icons)&&!e)&&t},setValue:function(t){var e=this.getValid(t);return!1!==e?(this.iconpickerValue=e,this._trigger("iconpickerSetValue",{iconpickerValue:e}),this.iconpickerValue):(this._trigger("iconpickerInvalid",{iconpickerValue:t}),!1)},getValue:function(t){return this.options.iconClassPrefix+(t||this.iconpickerValue)},getValueHtml:function(){return'<i class="'+this.options.iconBaseClass+" "+this.getValue()+'"></i>'},setSourceValue:function(t){return!1!==(t=this.setValue(t))&&""!==t&&(this.hasInput()?this.input.val(this.getValue()):this.element.data("iconpickerValue",this.getValue()),this._trigger("iconpickerSetSourceValue",{iconpickerValue:t})),t},getSourceValue:function(t){var e=t=t||this.options.defaultValue;return(void 0===(e=this.hasInput()?this.input.val():this.element.data("iconpickerValue"))||""===e||null===e||!1===e)&&(e=t),e},hasInput:function(){return!1!==this.input},hasComponent:function(){return!1!==this.component},hasContainer:function(){return!1!==this.container},getAcceptButton:function(){return this.popover.find(".iconpicker-btn-accept")},getCancelButton:function(){return this.popover.find(".iconpicker-btn-cancel")},getSearchInput:function(){return this.popover.find(".iconpicker-search")},filter:function(o){if(i(o))return this.iconpicker.find(".iconpicker-item").show(),s(!1);var n=[];return this.iconpicker.find(".iconpicker-item").each(function(){var t=s(this),e=t.attr("title").toLowerCase(),i=!1;try{i=new RegExp(o,"g")}catch(t){i=!1}!1!==i&&e.match(i)?(n.push(t),t.show()):t.hide()}),n},show:function(){return!this.popover.hasClass("in")&&(s.iconpicker.batch(s(".iconpicker-popover.in:not(.inline)").not(this.popover),"hide"),this._trigger("iconpickerShow"),this.updatePlacement(),this.popover.addClass("in"),void setTimeout(s.proxy(function(){this.popover.css("display",this.isInline()?"":"block"),this._trigger("iconpickerShown")},this),this.options.animation?300:1))},hide:function(){return!!this.popover.hasClass("in")&&(this._trigger("iconpickerHide"),this.popover.removeClass("in"),void setTimeout(s.proxy(function(){this.popover.css("display","none"),this.getSearchInput().val(""),this.filter(""),this._trigger("iconpickerHidden")},this),this.options.animation?300:1))},toggle:function(){this.popover.is(":visible")?this.hide():this.show(!0)},update:function(t,e){return t=t||this.getSourceValue(this.iconpickerValue),this._trigger("iconpickerUpdate"),!0===e?t=this.setValue(t):(t=this.setSourceValue(t),this._updateFormGroupStatus(!1!==t)),!1!==t&&this._updateComponents(),this._trigger("iconpickerUpdated"),t},destroy:function(){this._trigger("iconpickerDestroy"),this.element.removeData("iconpicker").removeData("iconpickerValue").removeClass("iconpicker-element"),this._unbindElementEvents(),this._unbindWindowEvents(),s(this.popover).remove(),this._trigger("iconpickerDestroyed")},disable:function(){return!!this.hasInput()&&(this.input.prop("disabled",!0),!0)},enable:function(){return!!this.hasInput()&&(this.input.prop("disabled",!1),!0)},isDisabled:function(){return!!this.hasInput()&&!0===this.input.prop("disabled")},isInline:function(){return"inline"===this.options.placement||this.popover.hasClass("inline")}},s.iconpicker=r,s.fn.iconpicker=function(e){return this.each(function(){var t=s(this);t.data("iconpicker")||t.data("iconpicker",new r(this,"object"==typeof e?e:{}))})},r.defaultOptions.icons=["adjust","adn","align-center","align-justify","align-left","align-right","ambulance","anchor","android","angle-double-down","angle-double-left","angle-double-right","angle-double-up","angle-down","angle-left","angle-right","angle-up","apple","archive","arrow-circle-down","arrow-circle-left","arrow-circle-o-down","arrow-circle-o-left","arrow-circle-o-right","arrow-circle-o-up","arrow-circle-right","arrow-circle-up","arrow-down","arrow-left","arrow-right","arrow-up","arrows","arrows-alt","arrows-h","arrows-v","asterisk","automobile","backward","ban","bank","bar-chart-o","barcode","bars","beer","behance","behance-square","bell","bell-o","bitbucket","bitbucket-square","bitcoin","bold","bolt","bomb","book","bookmark","bookmark-o","briefcase","btc","bug","building","building-o","bullhorn","bullseye","cab","calendar","calendar-o","camera","camera-retro","car","caret-down","caret-left","caret-right","caret-square-o-down","caret-square-o-left","caret-square-o-right","caret-square-o-up","caret-up","certificate","chain","chain-broken","check","check-circle","check-circle-o","check-square","check-square-o","chevron-circle-down","chevron-circle-left","chevron-circle-right","chevron-circle-up","chevron-down","chevron-left","chevron-right","chevron-up","child","circle","circle-o","circle-o-notch","circle-thin","clipboard","clock-o","cloud","cloud-download","cloud-upload","cny","code","code-fork","codepen","coffee","cog","cogs","columns","comment","comment-o","comments","comments-o","compass","compress","copy","credit-card","crop","crosshairs","css3","cube","cubes","cut","cutlery","dashboard","database","dedent","delicious","desktop","deviantart","digg","dollar","dot-circle-o","download","dribbble","dropbox","drupal","edit","eject","ellipsis-h","ellipsis-v","empire","envelope","envelope-o","envelope-square","eraser","eur","euro","exchange","exclamation","exclamation-circle","exclamation-triangle","expand","external-link","external-link-square","eye","eye-slash","facebook","facebook-square","fast-backward","fast-forward","fax","female","fighter-jet","file","file-archive-o","file-audio-o","file-code-o","file-excel-o","file-image-o","file-movie-o","file-o","file-pdf-o","file-photo-o","file-picture-o","file-powerpoint-o","file-sound-o","file-text","file-text-o","file-video-o","file-word-o","file-zip-o","files-o","film","filter","fire","fire-extinguisher","flag","flag-checkered","flag-o","flash","flask","flickr","floppy-o","folder","folder-o","folder-open","folder-open-o","font","forward","foursquare","frown-o","gamepad","gavel","gbp","ge","gear","gears","gift","git","git-square","github","github-alt","github-square","gittip","glass","globe","google","google-plus","google-plus-square","graduation-cap","group","h-square","hacker-news","hand-o-down","hand-o-left","hand-o-right","hand-o-up","hdd-o","header","headphones","heart","heart-o","history","home","hospital-o","html5","image","inbox","indent","info","info-circle","inr","instagram","institution","italic","joomla","jpy","jsfiddle","key","keyboard-o","krw","language","laptop","leaf","legal","lemon-o","level-down","level-up","life-bouy","life-ring","life-saver","lightbulb-o","link","linkedin","linkedin-square","linux","list","list-alt","list-ol","list-ul","location-arrow","lock","long-arrow-down","long-arrow-left","long-arrow-right","long-arrow-up","magic","magnet","mail-forward","mail-reply","mail-reply-all","male","map-marker","maxcdn","medkit","meh-o","microphone","microphone-slash","minus","minus-circle","minus-square","minus-square-o","mobile","mobile-phone","money","moon-o","mortar-board","music","navicon","openid","outdent","pagelines","paper-plane","paper-plane-o","paperclip","paragraph","paste","pause","paw","pencil","pencil-square","pencil-square-o","phone","phone-square","photo","picture-o","pied-piper","pied-piper-alt","pied-piper-square","pinterest","pinterest-square","plane","play","play-circle","play-circle-o","plus","plus-circle","plus-square","plus-square-o","power-off","print","puzzle-piece","qq","qrcode","question","question-circle","quote-left","quote-right","ra","random","rebel","recycle","reddit","reddit-square","refresh","renren","reorder","repeat","reply","reply-all","retweet","rmb","road","rocket","rotate-left","rotate-right","rouble","rss","rss-square","rub","ruble","rupee","save","scissors","search","search-minus","search-plus","send","send-o","share","share-alt","share-alt-square","share-square","share-square-o","shield","shopping-cart","sign-in","sign-out","signal","sitemap","skype","slack","sliders","smile-o","sort","sort-alpha-asc","sort-alpha-desc","sort-amount-asc","sort-amount-desc","sort-asc","sort-desc","sort-down","sort-numeric-asc","sort-numeric-desc","sort-up","soundcloud","space-shuttle","spinner","spoon","spotify","square","square-o","stack-exchange","stack-overflow","star","star-half","star-half-empty","star-half-full","star-half-o","star-o","steam","steam-square","step-backward","step-forward","stethoscope","stop","strikethrough","stumbleupon","stumbleupon-circle","subscript","suitcase","sun-o","superscript","support","table","tablet","tachometer","tag","tags","tasks","taxi","tencent-weibo","terminal","text-height","text-width","th","th-large","th-list","thumb-tack","thumbs-down","thumbs-o-down","thumbs-o-up","thumbs-up","ticket","times","times-circle","times-circle-o","tint","toggle-down","toggle-left","toggle-right","toggle-up","trash-o","tree","trello","trophy","truck","try","tumblr","tumblr-square","turkish-lira","twitter","twitter-square","umbrella","underline","undo","university","unlink","unlock","unlock-alt","unsorted","upload","usd","user","user-md","users","video-camera","vimeo-square","vine","vk","volume-down","volume-off","volume-up","warning","wechat","weibo","weixin","wheelchair","windows","won","wordpress","wrench","xing","xing-square","yahoo","yen","youtube","youtube-play","youtube-square"]}),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(a){"use strict";function v(t){return!t.nodeName||-1!==a.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])}function e(t){return a.isFunction(t)||a.isPlainObject(t)?t:{top:t,left:t}}var _=a.scrollTo=function(t,e,i){return a(window).scrollTo(t,e,i)};return _.defaults={axis:"xy",duration:0,limit:!0},a.fn.scrollTo=function(t,i,m){"object"==typeof i&&(m=i,i=0),"function"==typeof m&&(m={onAfter:m}),"max"===t&&(t=9e9),m=a.extend({},_.defaults,m),i=i||m.duration;var g=m.queue&&1<m.axis.length;return g&&(i/=2),m.offset=e(m.offset),m.over=e(m.over),this.each(function(){function r(t){var e=a.extend({},m,{queue:!0,duration:i,complete:t&&function(){t.call(d,p,m)}});h.animate(u,e)}if(null!==t){var l,c=v(this),d=c?this.contentWindow||window:this,h=a(d),p=t,u={};switch(typeof p){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(p)){p=e(p);break}p=c?a(p):a(p,d);case"object":if(0===p.length)return;(p.is||p.style)&&(l=(p=a(p)).offset())}var f=a.isFunction(m.offset)&&m.offset(d,p)||m.offset;a.each(m.axis.split(""),function(t,e){var i="x"===e?"Left":"Top",o=i.toLowerCase(),n="scroll"+i,s=h[n](),a=_.max(d,e);l?(u[n]=l[o]+(c?0:s-h.offset()[o]),m.margin&&(u[n]-=parseInt(p.css("margin"+i),10)||0,u[n]-=parseInt(p.css("border"+i+"Width"),10)||0),u[n]+=f[o]||0,m.over[o]&&(u[n]+=p["x"===e?"width":"height"]()*m.over[o])):(i=p[o],u[n]=i.slice&&"%"===i.slice(-1)?parseFloat(i)/100*a:i),m.limit&&/^\d+$/.test(u[n])&&(u[n]=u[n]<=0?0:Math.min(u[n],a)),!t&&1<m.axis.length&&(s===u[n]?u={}:g&&(r(m.onAfterFirst),u={}))}),r(m.onAfter)}})},_.max=function(t,e){var i="scroll"+(o="x"===e?"Width":"Height");if(!v(t))return t[i]-a(t)[o.toLowerCase()]();var o="client"+o,n=(s=t.ownerDocument||t.document).documentElement,s=s.body;return Math.max(n[i],s[i])-Math.min(n[o],s[o])},a.Tween.propHooks.scrollLeft=a.Tween.propHooks.scrollTop={get:function(t){return a(t.elem)[t.prop]()},set:function(t){var e=this.get(t);if(t.options.interrupt&&t._last&&t._last!==e)return a(t.elem).stop();var i=Math.round(t.now);e!==i&&(a(t.elem)[t.prop](i),t._last=this.get(t))}},_}),jQuery(function(u){u(document).ready(function(){if(0<u(".st-flight-search").length){var t=u(".st-flight-search");t.find(".nav li").click(function(){u(this).hasClass("one_way")?(t.addClass("one_way"),u('input[name="flight_type"]').val("one_way")):(t.removeClass("one_way"),u('input[name="flight_type"]').val("return"))})}var d={price_depart:0,price_depart_html:"",total_price_depart:0,total_price_depart_html:"",tax_price_depart:"",enable_tax_depart:"no",price_return:0,price_return_html:"",total_price_return:0,total_price_return_html:"",tax_price_return:"",enable_tax_return:"no",total_price:0,total_price_html:"",flight_type:u(".st-booking-list-flight").data("flight_type")};function h(){var t=u('input[name="passenger"]').val();parseInt(t)<1&&(t=1),"on_way"==d.flight_type?(d.total_price=d.total_price_depart*parseInt(t),d.total_price_html=p(d.total_price)):0<parseFloat(d.total_price_depart)&&0<parseFloat(d.total_price_return)&&(d.total_price=(parseFloat(d.total_price_depart)+parseFloat(d.total_price_return))*parseInt(t),d.total_price_html=p(d.total_price)),0<parseFloat(d.total_price)&&u(".st-flight-booking .st-flight-total-price .price").html(d.total_price_html)}function p(t){if(!t)return st_params.free_text;t=function(t,e,i,o){t=(t+"").replace(/[^0-9+\-Ee.]/g,"");var n=isFinite(+t)?+t:0,s=isFinite(+e)?Math.abs(e):0,a=void 0===o?",":o,r=void 0===i?".":i,l="";3<(l=(s?(c=n,d=s,h=Math.pow(10,d),""+(Math.round(c*h)/h).toFixed(d)):""+Math.round(n)).split("."))[0].length&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a));var c,d,h;(l[1]||"").length<s&&(l[1]=l[1]||"",l[1]+=new Array(s-l[1].length+1).join("0"));return l.join(r)}(t,st_params.booking_currency_precision,st_params.decimal_separator,st_params.thousand_separator);var e=st_params.currency_symbol,i="";switch(st_params.currency_position){case"right":i=t+e;break;case"left_space":i=e+" "+t;break;case"right_space":i=t+" "+e;break;case"left":default:i=e+t}return i}u('input[name="flight1"]').iCheck("uncheck"),u('input[name="flight2"]').iCheck("uncheck"),u(".st-cal-flight-depart").each(function(){var c=u(this);u('input[name="flight1"]').on("ifChecked",function(t){u(".st-cal-flight-depart").removeClass("active"),c.addClass("active");var e=u(this).closest("li").data("external-link");if("on"==u(this).closest("li").data("external")){u(".flight-book-now").hide();var i=u(".flight-message");0==u(".e-external-alter").length?(u(".st-booking-select-depart, .st-booking-select-return, .st-flight-total-price").hide(),i.after('<p class="e-external-alter"><b>'+u(this).closest("li").data("external-text")+"</b></p>"),u(".e-external-alter").after('<a href="'+e+'" class="btn btn-primary btn-external-link">'+u(".flight-book-now").text()+"</a>")):u(".btn-external-link").attr("href",e)}else{"on_way";var o=u(".st-booking-list-flight").data("flight_type");if("on_way"==o)u(".flight-book-now").show(),u(".st-booking-select-depart, .st-booking-select-return, .st-flight-total-price").show(),0<u(".e-external-alter").length&&u(".e-external-alter, .btn-external-link").remove();else{var n=0,s="#";if(u('input[name="flight2"]:checked').each(function(t){"on"==u(this).data("external")?(n=1,s=u(this).closest("li").data("external-link")):n=2}),0==n||2==n)u(".flight-book-now").show(),u(".st-booking-select-depart, .st-booking-select-return, .st-flight-total-price").show(),0<u(".e-external-alter").length&&u(".e-external-alter, .btn-external-link").remove();else{u(".flight-book-now").hide();i=u(".flight-message");0==u(".e-external-alter").length?(u(".st-booking-select-depart, .st-booking-select-return, .st-flight-total-price").hide(),i.after('<p class="e-external-alter"><b>'+u(this).closest("li").data("external-text")+"</b></p>"),u(".e-external-alter").after('<a href="'+s+'" class="btn btn-primary btn-external-link">'+u(".flight-book-now").text()+"</a>")):u(".btn-external-link").attr("href",s),n=0}}}var a=u(this).data("price");if(a){d.price_depart=a,d.total_price_depart=d.price_depart,u(".st-booking-select-depart").removeClass("hidden"),u(".st-booking-select-depart").find(".fare .price").html(p(d.price_depart));var r=u(this).data("tax"),l=u(this).data("tax_amount");"no"!=r?(console.log(parseFloat(l)),tax_price=parseFloat(l)*parseFloat(d.price_depart)/100,0<tax_price?(d.total_price_depart=d.price_depart+tax_price,u(".st-booking-select-depart").find(".tax").removeClass("hidden"),u(".st-booking-select-depart").find(".tax .price").html(p(tax_price))):u(".st-booking-select-depart").find(".tax").addClass("hidden")):u(".st-booking-select-depart").find(".tax").addClass("hidden"),u(".st-booking-select-depart").find(".total .price").html(p(d.total_price_depart)),u('.booking-flight-form input[name="depart_id"]').val(u(this).data("post_id")),1==u(this).data("business")?u('.booking-flight-form input[name="price_class_depart"]').val("business_price"):u('.booking-flight-form input[name="price_class_depart"]').val("eco_price")}h()})}),u(".st-cal-flight-return").each(function(){var l=u(this);l.find('input[name="flight2"]').on("ifChecked",function(t){u(".st-select-item-flight-return").removeClass("active"),l.addClass("active");var e=u(this).closest("li").data("external-link");if("on"==u(this).closest("li").data("external")){u(".flight-book-now").hide();var i=u(".flight-message");0==u(".e-external-alter").length&&(u(".st-booking-select-depart, .st-booking-select-return, .st-flight-total-price").hide(),i.after('<p class="e-external-alter"><b>'+u(this).closest("li").data("external-text")+"</b></p>"),u(".e-external-alter").after('<a href="'+e+'" class="btn btn-primary btn-external-link">'+u(".flight-book-now").text()+"</a>"))}else{var o=0,n="#";if(u('input[name="flight1"]:checked').each(function(t){"on"==u(this).data("external")?(o=1,n=u(this).closest("li").data("external-link")):o=2}),0==o||2==o)u(".flight-book-now").show(),u(".st-booking-select-depart, .st-booking-select-return, .st-flight-total-price").show(),0<u(".e-external-alter").length&&u(".e-external-alter, .btn-external-link").remove();else{u(".flight-book-now").hide();i=u(".flight-message");0==u(".e-external-alter").length?(u(".st-booking-select-depart, .st-booking-select-return, .st-flight-total-price").hide(),i.after('<p class="e-external-alter"><b>'+u(this).closest("li").data("external-text")+"</b></p>"),u(".e-external-alter").after('<a href="'+n+'" class="btn btn-primary btn-external-link">'+u(".flight-book-now").text()+"</a>")):u(".btn-external-link").attr("href",n),o=0}}var s=u(this).data("price");if(s){d.price_return=s,d.total_price_return=s,u(".st-booking-select-return").removeClass("hidden"),u(".st-booking-select-return").find(".fare .price").html(p(d.price_return));var a=u(this).data("tax"),r=u(this).data("tax_amount");"no"!=a?(tax_price=parseFloat(r)*d.price_return/100,0<tax_price?(d.total_price_return=d.price_return+tax_price,u(".st-booking-select-return").find(".tax").removeClass("hidden"),u(".st-booking-select-return").find(".tax .price").html(p(tax_price))):u(".st-booking-select-return").find(".tax").addClass("hidden")):u(".st-booking-select-return").find(".tax").addClass("hidden"),u(".st-booking-select-return").find(".total .price").html(p(d.total_price_return)),u('.booking-flight-form input[name="return_id"]').val(u(this).data("post_id")),1==u(this).data("business")?u('.booking-flight-form input[name="price_class_return"]').val("business_price"):u('.booking-flight-form input[name="price_class_return"]').val("eco_price")}h()})});var e=u(window).width();if(0<u(".st-sticky").length&&991<e){var n=u(".st-sticky").offset();u(window).scroll(function(){var t=u(".sticky-wrapper.is-sticky").height();0==t&&(t=u("#top_toolbar").height()+50);var e=u("#wpadminbar").height(),i=u(".st-booking-list").height(),o=u(".st-flight-booking").height();parseInt(u(window).scrollTop())>parseInt(n.top)-e-t-15?parseInt(u(window).scrollTop())<i-o&&u(".st-sticky").stop().animate({marginTop:u(window).scrollTop()-n.top+e+t+15}):u(".st-sticky").stop().animate({marginTop:0})})}u(".flight-book-now").on("click",function(t){var e=u(this),i=u(this).closest(".booking-flight-form"),o=i.serialize();return e.addClass("loading"),i.find(".flight-message").empty(),u.ajax({dataType:"json",type:"post",data:o,url:st_params.ajax_url,success:function(t){e.removeClass("loading"),void 0!==t.message&&i.find(".flight-message").append(t.message),void 0!==t.redirect&&(window.location=t.redirect)},error:function(t){e.removeClass("loading"),console.log(t.responseText)}}),!1}),u(".st-flight-search-form").submit(function(){var t=!1;u(this).find(".required").removeClass("input-error"),u(this).find(".required").each(function(){0==u(this).val()&&(u(this).addClass("input-error"),t=!0)});var e=u(this).find("input[name=destination_name]");if(u(this).find("input[name=origin_name]").val()==e.val()&&(t=!0,e.addClass("input-error")),t)return!1})})}),function(n){void 0===n.fn.each2&&n.extend(n.fn,{each2:function(t){for(var e=n([0]),i=-1,o=this.length;++i<o&&(e.context=e[0]=this[i])&&!1!==t.call(e[0],i,e););return this}})}(jQuery),function(w,b){"use strict";function a(t){var e=w(document.createTextNode(""));t.before(e),e.before(t),e.remove()}function r(t){return t.replace(/[^\u0000-\u007E]/g,function(t){return E[t]||t})}function d(t,e){for(var i=0,o=e.length;i<o;i+=1)if(u(t,e[i]))return i;return-1}function u(t,e){return t===e||t!==b&&e!==b&&(null!==t&&null!==e&&(t.constructor===String?t+""==e+"":e.constructor===String&&e+""==t+""))}function n(t,e,i){var o,n,s;if(null===t||t.length<1)return[];for(n=0,s=(o=t.split(e)).length;n<s;n+=1)o[n]=i(o[n]);return o}function s(t){return t.outerWidth(!1)-t.width()}function c(e){var i="keyup-change-value";e.on("keydown",function(){w.data(e,i)===b&&w.data(e,i,e.val())}),e.on("keyup",function(){var t=w.data(e,i);t!==b&&e.val()!==t&&(w.removeData(e,i),e.trigger("keyup-change"))})}function h(e,i,o){var n;return o=o||b,function(){var t=arguments;window.clearTimeout(n),n=window.setTimeout(function(){i.apply(o,t)},e)}}function p(t){t.preventDefault(),t.stopPropagation()}function f(t,e,i){var o,n,s=[];(o=w.trim(t.attr("class")))&&w((o=""+o).split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&s.push(this)}),(o=w.trim(e.attr("class")))&&w((o=""+o).split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&((n=i(this))&&s.push(n))}),t.attr("class",s.join(" "))}function l(t,e,i,o){var n=r(t.toUpperCase()).indexOf(r(e.toUpperCase())),s=e.length;return n<0?void i.push(o(t)):(i.push(o(t.substring(0,n))),i.push("<span class='select2-match'>"),i.push(o(t.substring(n,n+s))),i.push("</span>"),void i.push(o(t.substring(n+s,t.length))))}function t(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})}function o(a){var t,r=null,e=a.quietMillis||100,l=a.url,c=this;return function(s){window.clearTimeout(t),t=window.setTimeout(function(){var t=a.data,e=l,i=a.transport||w.fn.select2.ajaxDefaults.transport,o={type:a.type||"GET",cache:a.cache||!1,jsonpCallback:a.jsonpCallback||b,dataType:a.dataType||"json"},n=w.extend({},w.fn.select2.ajaxDefaults.params,o);t=t?t.call(c,s.term,s.page,s.context):null,e="function"==typeof e?e.call(c,s.term,s.page,s.context):e,r&&"function"==typeof r.abort&&r.abort(),a.params&&(w.isFunction(a.params)?w.extend(n,a.params.call(c)):w.extend(n,a.params)),w.extend(n,{url:e,dataType:a.dataType,data:t,success:function(t){var e=a.results(t,s.page,s);s.callback(e)},error:function(t,e,i){var o={hasError:!0,jqXHR:t,textStatus:e,errorThrown:i};s.callback(o)}}),r=i.call(c,n)},e)}}function m(t){var e,i,o=t,r=function(t){return""+t.text};w.isArray(o)&&(o={results:i=o}),!1===w.isFunction(o)&&(i=o,o=function(){return i});var n=o();return n.text&&(r=n.text,w.isFunction(r)||(e=n.text,r=function(t){return t[e]})),function(n){var s,a=n.term,i={results:[]};return""===a?void n.callback(o()):(s=function(t,e){var i,o;if((t=t[0]).children){for(o in i={},t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.children=[],w(t.children).each2(function(t,e){s(e,i.children)}),(i.children.length||n.matcher(a,r(i),t))&&e.push(i)}else n.matcher(a,r(t),t)&&e.push(t)},w(o().results).each2(function(t,e){s(e,i.results)}),void n.callback(i))}}function g(e){var s=w.isFunction(e);return function(i){var o=i.term,n={results:[]},t=s?e(i):e;w.isArray(t)&&(w(t).each(function(){var t=this.text!==b,e=t?this.text:this;(""===o||i.matcher(o,e))&&n.results.push(t?this:{id:this,text:this})}),i.callback(n))}}function v(t,e){if(w.isFunction(t))return!0;if(!t)return!1;if("string"==typeof t)return!0;throw new Error(e+" must be a string, function, or falsy value")}function k(t,e){if(w.isFunction(t)){var i=Array.prototype.slice.call(arguments,2);return t.apply(e,i)}return t}function _(){var i=this;w.each(arguments,function(t,e){i[e].remove(),i[e]=null})}function e(t,e){var i=function(){};return((i.prototype=new t).constructor=i).prototype.parent=t.prototype,i.prototype=w.extend(i.prototype,e),i}if(window.Select2===b){var i,y,x,C,T,S,D,I={x:0,y:0},M={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(t){switch(t=t.which?t.which:t){case M.LEFT:case M.RIGHT:case M.UP:case M.DOWN:return!0}return!1},isControl:function(t){switch(t.which){case M.SHIFT:case M.CTRL:case M.ALT:return!0}return!!t.metaKey},isFunctionKey:function(t){return 112<=(t=t.which?t.which:t)&&t<=123}},$="<div class='select2-measure-scrollbar'></div>",E={"â’¶":"A","A":"A","À":"A","Ã":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ä€":"A","Ä‚":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ç ":"A","Ä":"A","Çž":"A","Ả":"A","Ã…":"A","Ǻ":"A","Ç":"A","È€":"A","È‚":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ä„":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ç¢":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","â’·":"B","ï¼¢":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Æ‚":"B","Æ":"B","â’¸":"C","ï¼£":"C","Ć":"C","Ĉ":"C","ÄŠ":"C","ÄŒ":"C","Ç":"C","Ḉ":"C","Ƈ":"C","È»":"C","Ꜿ":"C","â’¹":"D","D":"D","Ḋ":"D","ÄŽ":"D","Ḍ":"D","á¸":"D","Ḓ":"D","Ḏ":"D","Ä":"D","Æ‹":"D","ÆŠ":"D","Ɖ":"D","ê¹":"D","DZ":"DZ","Ç„":"DZ","Dz":"Dz","Ç…":"Dz","â’º":"E","ï¼¥":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ä’":"E","Ḕ":"E","Ḗ":"E","Ä”":"E","Ä–":"E","Ë":"E","Ẻ":"E","Äš":"E","È„":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Æ":"E","ÆŽ":"E","â’»":"F","F":"F","Ḟ":"F","Æ‘":"F","ê»":"F","â’¼":"G","G":"G","Ç´":"G","Äœ":"G","Ḡ":"G","Äž":"G","Ä ":"G","Ǧ":"G","Ä¢":"G","Ǥ":"G","Æ“":"G","êž ":"G","ê½":"G","ê¾":"G","â’½":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Èž":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","â±µ":"H","êž":"H","â’¾":"I","I":"I","ÃŒ":"I","Ã":"I","ÃŽ":"I","Ĩ":"I","Ī":"I","Ĭ":"I","Ä°":"I","Ã":"I","Ḯ":"I","Ỉ":"I","Ç":"I","Ȉ":"I","ÈŠ":"I","Ị":"I","Ä®":"I","Ḭ":"I","Æ—":"I","â’¿":"J","J":"J","Ä´":"J","Ɉ":"J","â“€":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","ê€":"K","ê‚":"K","ê„":"K","Ꞣ":"K","â“":"L","L":"L","Ä¿":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ä»":"L","Ḽ":"L","Ḻ":"L","Å":"L","Ƚ":"L","â±¢":"L","â± ":"L","êˆ":"L","ê†":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","â“‚":"M","ï¼­":"M","Ḿ":"M","á¹€":"M","Ṃ":"M","â±®":"M","Æœ":"M","Ⓝ":"N","ï¼®":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Å…":"N","Ṋ":"N","Ṉ":"N","È ":"N","Æ":"N","êž":"N","Ꞥ":"N","ÇŠ":"NJ","Ç‹":"Nj","â“„":"O","O":"O","Ã’":"O","Ó":"O","Ô":"O","á»’":"O","á»":"O","á»–":"O","á»”":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","ÅŒ":"O","á¹":"O","á¹’":"O","ÅŽ":"O","È®":"O","È°":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Å":"O","Ç‘":"O","ÈŒ":"O","ÈŽ":"O","Æ ":"O","Ờ":"O","Ớ":"O","á» ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","ÆŸ":"O","êŠ":"O","êŒ":"O","Æ¢":"OI","êŽ":"OO","È¢":"OU","â“…":"P","ï¼°":"P","á¹”":"P","á¹–":"P","Ƥ":"P","â±£":"P","ê":"P","ê’":"P","ê”":"P","Ⓠ":"Q","ï¼±":"Q","ê–":"Q","ê˜":"Q","ÉŠ":"Q","Ⓡ":"R","ï¼²":"R","Å”":"R","Ṙ":"R","Ř":"R","È":"R","È’":"R","Ṛ":"R","Ṝ":"R","Å–":"R","Ṟ":"R","ÉŒ":"R","Ɽ":"R","êš":"R","Ꞧ":"R","êž‚":"R","Ⓢ":"S","ï¼³":"S","ẞ":"S","Åš":"S","Ṥ":"S","Åœ":"S","á¹ ":"S","Å ":"S","Ṧ":"S","á¹¢":"S","Ṩ":"S","Ș":"S","Åž":"S","â±¾":"S","Ꞩ":"S","êž„":"S","Ⓣ":"T","ï¼´":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Èš":"T","Å¢":"T","á¹°":"T","á¹®":"T","Ŧ":"T","Ƭ":"T","Æ®":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","â“Š":"U","ï¼µ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ãœ":"U","Ç›":"U","Ç—":"U","Ç•":"U","Ç™":"U","Ủ":"U","Å®":"U","Å°":"U","Ç“":"U","È”":"U","È–":"U","Ư":"U","Ừ":"U","Ứ":"U","á»®":"U","Ử":"U","á»°":"U","Ụ":"U","á¹²":"U","Ų":"U","Ṷ":"U","á¹´":"U","É„":"U","â“‹":"V","V":"V","á¹¼":"V","á¹¾":"V","Ʋ":"V","êž":"V","É…":"V","ê ":"VY","â“Œ":"W","ï¼·":"W","Ẁ":"W","Ẃ":"W","Å´":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","â±²":"W","â“":"X","X":"X","Ẋ":"X","Ẍ":"X","â“Ž":"Y","ï¼¹":"Y","Ỳ":"Y","Ã":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","á»´":"Y","Ƴ":"Y","ÉŽ":"Y","Ỿ":"Y","â“":"Z","Z":"Z","Ź":"Z","áº":"Z","Å»":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","ê¢":"Z","â“":"a","ï½":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","Ä":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","Ç¡":"a","ä":"a","ÇŸ":"a","ả":"a","Ã¥":"a","Ç»":"a","ÇŽ":"a","È":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","á¸":"a","Ä…":"a","â±¥":"a","É":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","Ç£":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","â“‘":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","Æ€":"b","ƃ":"b","É“":"b","â“’":"c","c":"c","ć":"c","ĉ":"c","Ä‹":"c","Ä":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","â““":"d","d":"d","ḋ":"d","Ä":"d","á¸":"d","ḑ":"d","ḓ":"d","á¸":"d","Ä‘":"d","ÆŒ":"d","É–":"d","É—":"d","êº":"d","dz":"dz","dž":"dz","â“”":"e","ï½…":"e","è":"e","é":"e","ê":"e","á»":"e","ế":"e","á»…":"e","ể":"e","ẽ":"e","Ä“":"e","ḕ":"e","ḗ":"e","Ä•":"e","Ä—":"e","ë":"e","ẻ":"e","Ä›":"e","È…":"e","ȇ":"e","ẹ":"e","ệ":"e","È©":"e","á¸":"e","Ä™":"e","ḙ":"e","ḛ":"e","ɇ":"e","É›":"e","Ç":"e","â“•":"f","f":"f","ḟ":"f","Æ’":"f","ê¼":"f","â“–":"g","g":"g","ǵ":"g","Ä":"g","ḡ":"g","ÄŸ":"g","Ä¡":"g","ǧ":"g","Ä£":"g","Ç¥":"g","É ":"g","êž¡":"g","áµ¹":"g","ê¿":"g","â“—":"h","h":"h","Ä¥":"h","ḣ":"h","ḧ":"h","ÈŸ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","É¥":"h","Æ•":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","Ä©":"i","Ä«":"i","Ä­":"i","ï":"i","ḯ":"i","ỉ":"i","Ç":"i","ȉ":"i","È‹":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","â“™":"j","j":"j","ĵ":"j","Ç°":"j","ɉ":"j","â“š":"k","k":"k","ḱ":"k","Ç©":"k","ḳ":"k","Ä·":"k","ḵ":"k","Æ™":"k","ⱪ":"k","ê":"k","êƒ":"k","ê…":"k","ꞣ":"k","â“›":"l","l":"l","Å€":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","Å¿":"l","Å‚":"l","Æš":"l","É«":"l","ⱡ":"l","ê‰":"l","êž":"l","ê‡":"l","lj":"lj","â“œ":"m","ï½":"m","ḿ":"m","á¹":"m","ṃ":"m","ɱ":"m","ɯ":"m","â“":"n","n":"n","ǹ":"n","Å„":"n","ñ":"n","á¹…":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","Æž":"n","ɲ":"n","ʼn":"n","êž‘":"n","ꞥ":"n","ÇŒ":"nj","â“ž":"o","ï½":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","á»—":"o","ổ":"o","õ":"o","á¹":"o","È­":"o","á¹":"o","Å":"o","ṑ":"o","ṓ":"o","Å":"o","ȯ":"o","ȱ":"o","ö":"o","È«":"o","á»":"o","Å‘":"o","Ç’":"o","È":"o","È":"o","Æ¡":"o","á»":"o","á»›":"o","ỡ":"o","ở":"o","ợ":"o","á»":"o","á»™":"o","Ç«":"o","Ç­":"o","ø":"o","Ç¿":"o","É”":"o","ê‹":"o","ê":"o","ɵ":"o","Æ£":"oi","È£":"ou","ê":"oo","â“Ÿ":"p","ï½":"p","ṕ":"p","á¹—":"p","Æ¥":"p","áµ½":"p","ê‘":"p","ê“":"p","ê•":"p","â“ ":"q","q":"q","É‹":"q","ê—":"q","ê™":"q","â“¡":"r","ï½’":"r","Å•":"r","á¹™":"r","Å™":"r","È‘":"r","È“":"r","á¹›":"r","á¹":"r","Å—":"r","ṟ":"r","É":"r","ɽ":"r","ê›":"r","ꞧ":"r","ꞃ":"r","â“¢":"s","s":"s","ß":"s","Å›":"s","á¹¥":"s","Å":"s","ṡ":"s","Å¡":"s","ṧ":"s","á¹£":"s","ṩ":"s","È™":"s","ÅŸ":"s","È¿":"s","êž©":"s","êž…":"s","ẛ":"s","â“£":"t","ï½”":"t","ṫ":"t","ẗ":"t","Å¥":"t","á¹­":"t","È›":"t","Å£":"t","á¹±":"t","ṯ":"t","ŧ":"t","Æ­":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","Å©":"u","á¹¹":"u","Å«":"u","á¹»":"u","Å­":"u","ü":"u","Çœ":"u","ǘ":"u","Ç–":"u","Çš":"u","ủ":"u","ů":"u","ű":"u","Ç”":"u","È•":"u","È—":"u","Æ°":"u","ừ":"u","ứ":"u","ữ":"u","á»­":"u","á»±":"u","ụ":"u","á¹³":"u","ų":"u","á¹·":"u","á¹µ":"u","ʉ":"u","â“¥":"v","ï½–":"v","á¹½":"v","ṿ":"v","Ê‹":"v","êŸ":"v","ÊŒ":"v","ê¡":"vy","ⓦ":"w","ï½—":"w","áº":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","â±³":"w","ⓧ":"x","x":"x","ẋ":"x","áº":"x","ⓨ":"y","ï½™":"y","ỳ":"y","ý":"y","Å·":"y","ỹ":"y","ȳ":"y","áº":"y","ÿ":"y","á»·":"y","ẙ":"y","ỵ":"y","Æ´":"y","É":"y","ỿ":"y","â“©":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","È¥":"z","É€":"z","ⱬ":"z","ê£":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","ÎŒ":"Ο","ÎŽ":"Î¥","Ϋ":"Î¥","Î":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ÏŠ":"ι","Î":"ι","ÏŒ":"ο","Ï":"Ï…","Ï‹":"Ï…","ΰ":"Ï…","ω":"ω","Ï‚":"σ"};S=w(document),A=1,C=function(){return A++},y=e(i=e(Object,{bind:function(t){var e=this;return function(){t.apply(e,arguments)}},init:function(t){var s,e,i,o,n,a=".select2-results";this.opts=t=this.prepareOpts(t),this.id=t.id,t.element.data("select2")!==b&&null!==t.element.data("select2")&&t.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=w(".select2-hidden-accessible"),0==this.liveRegion.length&&(this.liveRegion=w("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body)),this.containerId="s2id_"+(t.element.attr("id")||"autogen"+C()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",t.element.attr("title")),this.body=w(document.body),f(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",t.element.attr("style")),this.container.css(k(t.containerCss,this.opts.element)),this.container.addClass(k(t.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",p),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),f(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(k(t.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",p),this.results=s=this.container.find(a),this.search=e=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",p),this.results.on("mousemove",function(t){var e=I;(e===b||e.x!==t.pageX||e.y!==t.pageY)&&w(t.target).trigger("mousemove-filtered",t)}),this.dropdown.on("mousemove-filtered",a,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",a,this.bind(function(t){this._touchEvent=!0,this.highlightUnderEvent(t)})),this.dropdown.on("touchmove",a,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",a,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),i=80,o=this.results,n=h(i,function(t){o.trigger("scroll-debounced",t)}),o.on("scroll",function(t){0<=d(t.target,o.get())&&n(t)}),this.dropdown.on("scroll-debounced",a,this.bind(this.loadMoreIfNeeded)),w(this.container).on("change",".select2-input",function(t){t.stopPropagation()}),w(this.dropdown).on("change",".select2-input",function(t){t.stopPropagation()}),w.fn.mousewheel&&s.mousewheel(function(t,e,i,o){var n=s.scrollTop();0<o&&n-o<=0?(s.scrollTop(0),p(t)):o<0&&s.get(0).scrollHeight-s.scrollTop()+o<=s.height()&&(s.scrollTop(s.get(0).scrollHeight-s.height()),p(t))}),c(e),e.on("keyup-change input paste",this.bind(this.updateResults)),e.on("focus",function(){e.addClass("select2-focused")}),e.on("blur",function(){e.removeClass("select2-focused")}),this.dropdown.on("mouseup",a,this.bind(function(t){0<w(t.target).closest(".select2-result-selectable").length&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(t){t.stopPropagation()}),this.nextSearchTerm=b,w.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==t.maximumInputLength&&this.search.attr("maxlength",t.maximumInputLength);var r=t.element.prop("disabled");r===b&&(r=!1),this.enable(!r);var l=t.element.prop("readonly");l===b&&(l=!1),this.readonly(l),D=D||function(){var t=w($);t.appendTo(document.body);var e={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight};return t.remove(),e}(),this.autofocus=t.element.prop("autofocus"),t.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",t.searchInputPlaceholder)},destroy:function(){var t=this.opts.element,e=t.data("select2"),i=this;this.close(),t.length&&t[0].detachEvent&&i._sync&&t.each(function(){i._sync&&this.detachEvent("onpropertychange",i._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,e!==b&&(e.container.remove(),e.liveRegion.remove(),e.dropdown.remove(),t.show().removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?t.attr({tabindex:this.elementTabIndex}):t.removeAttr("tabindex"),t.show()),_.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(t){return t.is("option")?{id:t.prop("value"),text:t.text(),element:t.get(),css:t.attr("class"),disabled:t.prop("disabled"),locked:u(t.attr("locked"),"locked")||u(t.data("locked"),!0)}:t.is("optgroup")?{text:t.attr("label"),children:[],element:t.get(),css:t.attr("class")}:void 0},prepareOpts:function(_){var a,t,e,i,y=this;if("select"===(a=_.element).get(0).tagName.toLowerCase()&&(this.select=t=_.element),t&&w.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in _)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),"function"!=typeof(_=w.extend({},{populateResults:function(t,e,f){var m,g=this.opts.id,v=this.liveRegion;(m=function(t,e,i){var o,n,s,a,r,l,c,d,h,p,u=[];for(o=0,n=(t=_.sortResults(t,e,f)).length;o<n;o+=1)a=!(r=!0===(s=t[o]).disabled)&&g(s)!==b,l=s.children&&0<s.children.length,(c=w("<li></li>")).addClass("select2-results-dept-"+i),c.addClass("select2-result"),c.addClass(a?"select2-result-selectable":"select2-result-unselectable"),r&&c.addClass("select2-disabled"),l&&c.addClass("select2-result-with-children"),c.addClass(y.opts.formatResultCssClass(s)),c.attr("role","presentation"),(d=w(document.createElement("div"))).addClass("select2-result-label"),d.attr("id","select2-result-label-"+C()),d.attr("role","option"),(p=_.formatResult(s,d,f,y.opts.escapeMarkup))!==b&&(d.html(p),c.append(d)),l&&((h=w("<ul></ul>")).addClass("select2-result-sub"),m(s.children,h,i+1),c.append(h)),c.data("select2-data",s),u.push(c[0]);e.append(u),v.text(_.formatMatches(t.length))})(e,t,0)}},w.fn.select2.defaults,_)).id&&(e=_.id,_.id=function(t){return t[e]}),w.isArray(_.element.data("select2Tags"))){if("tags"in _)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+_.element.attr("id");_.tags=_.element.data("select2Tags")}if(t?(_.query=this.bind(function(o){var t,e,n,i={results:[],more:!1},s=o.term;n=function(t,e){var i;t.is("option")?o.matcher(s,t.text(),t)&&e.push(y.optionToData(t)):t.is("optgroup")&&(i=y.optionToData(t),t.children().each2(function(t,e){n(e,i.children)}),0<i.children.length&&e.push(i))},t=a.children(),this.getPlaceholder()!==b&&0<t.length&&((e=this.getPlaceholderOption())&&(t=t.not(e))),t.each2(function(t,e){n(e,i.results)}),o.callback(i)}),_.id=function(t){return t.id}):"query"in _||("ajax"in _?((i=_.element.data("ajax-url"))&&0<i.length&&(_.ajax.url=i),_.query=o.call(_.element,_.ajax)):"data"in _?_.query=m(_.data):"tags"in _&&(_.query=g(_.tags),_.createSearchChoice===b&&(_.createSearchChoice=function(t){return{id:w.trim(t),text:w.trim(t)}}),_.initSelection===b&&(_.initSelection=function(t,e){var i=[];w(n(t.val(),_.separator,_.transformVal)).each(function(){var t={id:this,text:this},e=_.tags;w.isFunction(e)&&(e=e()),w(e).each(function(){return u(this.id,t.id)?(t=this,!1):void 0}),i.push(t)}),e(i)}))),"function"!=typeof _.query)throw"query function not defined for Select2 "+_.element.attr("id");if("top"===_.createSearchChoicePosition)_.createSearchChoicePosition=function(t,e){t.unshift(e)};else if("bottom"===_.createSearchChoicePosition)_.createSearchChoicePosition=function(t,e){t.push(e)};else if("function"!=typeof _.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return _},monitorSource:function(){var t,i=this.opts.element,e=this;i.on("change.select2",this.bind(function(){!0!==this.opts.element.data("select2-change-triggered")&&this.initSelection()})),this._sync=this.bind(function(){var t=i.prop("disabled");t===b&&(t=!1),this.enable(!t);var e=i.prop("readonly");e===b&&(e=!1),this.readonly(e),this.container&&(f(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(k(this.opts.containerCssClass,this.opts.element))),this.dropdown&&(f(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(k(this.opts.dropdownCssClass,this.opts.element)))}),i.length&&i[0].attachEvent&&i.each(function(){this.attachEvent("onpropertychange",e._sync)}),(t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver)!==b&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new t(function(t){w.each(t,e._sync)}),this.propertyObserver.observe(i.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(t){var e=w.Event("select2-selecting",{val:this.id(t),object:t,choice:t});return this.opts.element.trigger(e),!e.isDefaultPrevented()},triggerChange:function(t){t=t||{},t=w.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return!0===this.enabledInterface},enableInterface:function(){var t=this._enabled&&!this._readonly,e=!t;return t!==this.enabledInterface&&(this.container.toggleClass("select2-container-disabled",e),this.close(),this.enabledInterface=t,!0)},enable:function(t){t===b&&(t=!0),this._enabled!==t&&(this._enabled=t,this.opts.element.prop("disabled",!t),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(t){t===b&&(t=!1),this._readonly!==t&&(this._readonly=t,this.opts.element.prop("readonly",t),this.enableInterface())},opened:function(){return!!this.container&&this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t,e,i,o,n,s=this.dropdown,a=this.container,r=a.offset(),l=a.outerHeight(!1),c=a.outerWidth(!1),d=s.outerHeight(!1),h=w(window),p=h.width(),u=h.height(),f=h.scrollLeft()+p,m=h.scrollTop()+u,g=r.top+l,v=r.left,_=g+d<=m,y=r.top-d>=h.scrollTop(),b=s.outerWidth(!1);s.hasClass("select2-drop-above")?(e=!0,!y&&_&&(e=!(i=!0))):(e=!1,!_&&y&&(e=i=!0)),i&&(s.hide(),r=this.container.offset(),l=this.container.outerHeight(!1),c=this.container.outerWidth(!1),d=s.outerHeight(!1),f=h.scrollLeft()+p,m=h.scrollTop()+u,g=r.top+l,v=r.left,b=s.outerWidth(!1),s.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(n=w(".select2-results",s)[0],s.addClass("select2-drop-auto-width"),s.css("width",""),c<(b=s.outerWidth(!1)+(n.scrollHeight===n.clientHeight?0:D.width))?c=b:b=c,d=s.outerHeight(!1)):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(g-=(t=this.body.offset()).top,v-=t.left),!(v+b<=f)&&r.left+f+a.outerWidth(!1)>b&&(v=r.left+this.container.outerWidth(!1)-b),o={left:v,width:c},e?(o.top=r.top-d,o.bottom="auto",this.container.addClass("select2-drop-above"),s.addClass("select2-drop-above")):(o.top=g,o.bottom="auto",this.container.removeClass("select2-drop-above"),s.removeClass("select2-drop-above")),o=w.extend(o,k(this.opts.dropdownCss,this.opts.element)),s.css(o)},shouldOpen:function(){var t;return!this.opened()&&(!1!==this._enabled&&!0!==this._readonly&&(t=w.Event("select2-opening"),this.opts.element.trigger(t),!t.isDefaultPrevented()))},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return!!this.shouldOpen()&&(this.opening(),S.on("mousemove.select2Event",function(t){I.x=t.pageX,I.y=t.pageY}),!0)},opening:function(){var o,t=this.containerEventName,e="scroll."+t,i="resize."+t,n="orientationchange."+t;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),0===(o=w("#select2-drop-mask")).length&&((o=w(document.createElement("div"))).attr("id","select2-drop-mask").attr("class","select2-drop-mask"),o.hide(),o.appendTo(this.body),o.on("mousedown touchstart click",function(t){a(o);var e,i=w("#select2-drop");0<i.length&&((e=i.data("select2")).opts.selectOnBlur&&e.selectHighlighted({noFocus:!0}),e.close(),t.preventDefault(),t.stopPropagation())})),this.dropdown.prev()[0]!==o[0]&&this.dropdown.before(o),w("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),o.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var s=this;this.container.parents().add(window).each(function(){w(this).on(i+" "+e+" "+n,function(){s.opened()&&s.positionDropdown()})})},close:function(){if(this.opened()){var t=this.containerEventName,e="scroll."+t,i="resize."+t,o="orientationchange."+t;this.container.parents().add(window).each(function(){w(this).off(e).off(i).off(o)}),this.clearDropdownAlignmentPreference(),w("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),S.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(w.Event("select2-close"))}},externalSearch:function(t){this.open(),this.search.val(t),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return k(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var t,e,i,o,n,s,a,r,l=this.results;if(!((e=this.highlight())<0)){if(0==e)return void l.scrollTop(0);t=this.findHighlightableChoices().find(".select2-result-label"),o=(r=((i=w(t[e])).offset()||{}).top||0)+i.outerHeight(!0),e===t.length-1&&(0<(a=l.find("li.select2-more-results")).length&&(o=a.offset().top+a.outerHeight(!0))),(n=l.offset().top+l.outerHeight(!1))<o&&l.scrollTop(l.scrollTop()+(o-n)),(s=r-l.offset().top)<0&&"none"!=i.css("display")&&l.scrollTop(l.scrollTop()+s)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(t){for(var e=this.findHighlightableChoices(),i=this.highlight();-1<i&&i<e.length;){var o=w(e[i+=t]);if(o.hasClass("select2-result-selectable")&&!o.hasClass("select2-disabled")&&!o.hasClass("select2-selected")){this.highlight(i);break}}},highlight:function(t){var e,i,o=this.findHighlightableChoices();return 0===arguments.length?d(o.filter(".select2-highlighted")[0],o.get()):(t>=o.length&&(t=o.length-1),t<0&&(t=0),this.removeHighlight(),(e=w(o[t])).addClass("select2-highlighted"),this.search.attr("aria-activedescendant",e.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(e.text()),void((i=e.data("select2-data"))&&this.opts.element.trigger({type:"select2-highlight",val:this.id(i),choice:i})))},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var e=w(t.target).closest(".select2-result-selectable");if(0<e.length&&!e.is(".select2-highlighted")){var i=this.findHighlightableChoices();this.highlight(i.index(e))}else 0==e.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var e=this.results,i=e.find("li.select2-more-results"),o=this.resultsPage+1,n=this,s=this.search.val(),a=this.context;0!==i.length&&(i.offset().top-e.offset().top-e.height()<=this.opts.loadMorePadding&&(i.addClass("select2-active"),this.opts.query({element:this.opts.element,term:s,page:o,context:a,matcher:this.opts.matcher,callback:this.bind(function(t){n.opened()&&(n.opts.populateResults.call(this,e,t.results,{term:s,page:o,context:a}),n.postprocessResults(t,!1,!1),!0===t.more?(i.detach().appendTo(e).html(n.opts.escapeMarkup(k(n.opts.formatLoadMore,n.opts.element,o+1))),window.setTimeout(function(){n.loadMoreIfNeeded()},10)):i.remove(),n.positionDropdown(),n.resultsPage=o,n.context=t.context,this.opts.element.trigger({type:"select2-loaded",items:t}))})})))},tokenize:function(){},updateResults:function(i){function o(){a.removeClass("select2-active"),c.positionDropdown(),r.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?c.liveRegion.text(r.text()):c.liveRegion.text(c.opts.formatMatches(r.find('.select2-result-selectable:not(".select2-selected")').length))}function n(t){r.html(t),o()}var t,e,s,a=this.search,r=this.results,l=this.opts,c=this,d=a.val(),h=w.data(this.container,"select2-last-term");if((!0===i||!h||!u(d,h))&&(w.data(this.container,"select2-last-term",d),!0===i||!1!==this.showSearchInput&&this.opened())){s=++this.queryCount;var p=this.getMaximumSelectionSize();if(1<=p&&(t=this.data(),w.isArray(t)&&t.length>=p&&v(l.formatSelectionTooBig,"formatSelectionTooBig")))return void n("<li class='select2-selection-limit'>"+k(l.formatSelectionTooBig,l.element,p)+"</li>");if(a.val().length<l.minimumInputLength)return v(l.formatInputTooShort,"formatInputTooShort")?n("<li class='select2-no-results'>"+k(l.formatInputTooShort,l.element,a.val(),l.minimumInputLength)+"</li>"):n(""),void(i&&this.showSearch&&this.showSearch(!0));if(l.maximumInputLength&&a.val().length>l.maximumInputLength)return void(v(l.formatInputTooLong,"formatInputTooLong")?n("<li class='select2-no-results'>"+k(l.formatInputTooLong,l.element,a.val(),l.maximumInputLength)+"</li>"):n(""));l.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+k(l.formatSearching,l.element)+"</li>"),a.addClass("select2-active"),this.removeHighlight(),(e=this.tokenize())!=b&&null!=e&&a.val(e),this.resultsPage=1,l.query({element:l.element,term:a.val(),page:this.resultsPage,context:null,matcher:l.matcher,callback:this.bind(function(t){var e;if(s==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(t.hasError!==b&&v(l.formatAjaxError,"formatAjaxError"))return void n("<li class='select2-ajax-error'>"+k(l.formatAjaxError,l.element,t.jqXHR,t.textStatus,t.errorThrown)+"</li>");if(this.context=t.context===b?null:t.context,this.opts.createSearchChoice&&""!==a.val()&&((e=this.opts.createSearchChoice.call(c,a.val(),t.results))!==b&&null!==e&&c.id(e)!==b&&null!==c.id(e)&&0===w(t.results).filter(function(){return u(c.id(this),c.id(e))}).length&&this.opts.createSearchChoicePosition(t.results,e)),0===t.results.length&&v(l.formatNoMatches,"formatNoMatches"))return void n("<li class='select2-no-results'>"+k(l.formatNoMatches,l.element,a.val())+"</li>");r.empty(),c.opts.populateResults.call(this,r,t.results,{term:a.val(),page:this.resultsPage,context:null}),!0===t.more&&v(l.formatLoadMore,"formatLoadMore")&&(r.append("<li class='select2-more-results'>"+l.escapeMarkup(k(l.formatLoadMore,l.element,this.resultsPage))+"</li>"),window.setTimeout(function(){c.loadMoreIfNeeded()},10)),this.postprocessResults(t,i),o(),this.opts.element.trigger({type:"select2-loaded",items:t})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){var o;(o=this.search)[0]!==document.activeElement&&window.setTimeout(function(){var t,e=o[0],i=o.val().length;o.focus(),(0<e.offsetWidth||0<e.offsetHeight)&&e===document.activeElement&&(e.setSelectionRange?e.setSelectionRange(i,i):e.createTextRange&&((t=e.createTextRange()).collapse(!1),t.select()))},0)},selectHighlighted:function(t){if(this._touchMoved)this.clearTouchMoved();else{var e=this.highlight(),i=this.results.find(".select2-highlighted").closest(".select2-result").data("select2-data");i?(this.highlight(e),this.onSelect(i,t)):t&&t.noFocus&&this.close()}},getPlaceholder:function(){var t;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((t=this.getPlaceholderOption())!==b?t.text():b)},getPlaceholderOption:function(){if(this.select){var t=this.select.children("option").first();if(this.opts.placeholderOption!==b)return"first"===this.opts.placeholderOption&&t||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===w.trim(t.text())&&""===t.val())return t}},initContainerWidth:function(){var t=function(){var t,e,i,o,n;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if((t=this.opts.element.attr("style"))!==b)for(o=0,n=(e=t.split(";")).length;o<n;o+=1)if(null!==(i=e[o].replace(/\s/g,"").match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i))&&1<=i.length)return i[1];return"resolve"===this.opts.width?0<(t=this.opts.element.css("width")).indexOf("%")?t:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px":null}return w.isFunction(this.opts.width)?this.opts.width():this.opts.width}.call(this);null!==t&&this.container.css("width",t)}}),{createContainer:function(){return w(document.createElement("div")).attr({class:"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>","   <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>","   <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>","   <div class='select2-search'>","       <label for='' class='select2-offscreen'></label>","       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'","       aria-autocomplete='list' />","   </div>","   <ul class='select2-results' role='listbox'>","   </ul>","</div>"].join(""))},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var t,e,i;0<=this.opts.minimumResultsForSearch&&this.showSearch(!0),this.parent.opening.apply(this,arguments),!1!==this.showSearchInput&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),(t=this.search.get(0)).createTextRange?((e=t.createTextRange()).collapse(!1),e.select()):t.setSelectionRange&&(i=this.search.val().length,t.setSelectionRange(i,i))),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(w.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){w("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),_.call(this,"selection","focusser")},initContainer:function(){var e,t,i=this.container,o=this.dropdown,n=C();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=e=i.find(".select2-choice"),this.focusser=i.find(".select2-focusser"),e.find(".select2-chosen").attr("id","select2-chosen-"+n),this.focusser.attr("aria-labelledby","select2-chosen-"+n),this.results.attr("id","select2-results-"+n),this.search.attr("aria-owns","select2-results-"+n),this.focusser.attr("id","s2id_autogen"+n),t=w("label[for='"+this.opts.element.attr("id")+"']"),this.opts.element.focus(this.bind(function(){this.focus()})),this.focusser.prev().text(t.text()).attr("for",this.focusser.attr("id"));var s=this.opts.element.attr("title");this.opts.element.attr("title",s||t.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(w("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&229!=t.keyCode){if(t.which===M.PAGE_UP||t.which===M.PAGE_DOWN)return void p(t);switch(t.which){case M.UP:case M.DOWN:return this.moveHighlight(t.which===M.UP?-1:1),void p(t);case M.ENTER:return this.selectHighlighted(),void p(t);case M.TAB:return void this.selectHighlighted({noFocus:!0});case M.ESC:return this.cancel(t),void p(t)}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&t.which!==M.TAB&&!M.isControl(t)&&!M.isFunctionKey(t)&&t.which!==M.ESC){if(!1===this.opts.openOnEnter&&t.which===M.ENTER)return void p(t);if(t.which==M.DOWN||t.which==M.UP||t.which==M.ENTER&&this.opts.openOnEnter){if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return;return this.open(),void p(t)}return t.which==M.DELETE||t.which==M.BACKSPACE?(this.opts.allowClear&&this.clear(),void p(t)):void 0}})),c(this.focusser),this.focusser.on("keyup-change input",this.bind(function(t){if(0<=this.opts.minimumResultsForSearch){if(t.stopPropagation(),this.opened())return;this.open()}})),e.on("mousedown touchstart","abbr",this.bind(function(t){var e;this.isInterfaceEnabled()&&(this.clear(),(e=t).preventDefault(),e.stopImmediatePropagation(),this.close(),this.selection&&this.selection.focus())})),e.on("mousedown touchstart",this.bind(function(t){a(e),this.container.hasClass("select2-container-active")||this.opts.element.trigger(w.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),p(t)})),o.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),e.on("focus",this.bind(function(t){p(t)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(w.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(w.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(w.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.hide(),this.setPlaceholder()},clear:function(t){var e=this.selection.data("select2-data");if(e){var i=w.Event("select2-clearing");if(this.opts.element.trigger(i),i.isDefaultPrevented())return;var o=this.getPlaceholderOption();this.opts.element.val(o?o.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),!1!==t&&(this.opts.element.trigger({type:"select2-removed",val:this.id(e),choice:e}),this.triggerChange({removed:e}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var e=this;this.opts.initSelection.call(null,this.opts.element,function(t){t!==b&&null!==t&&(e.updateSelection(t),e.close(),e.setPlaceholder(),e.nextSearchTerm=e.opts.nextSearchTerm(t,e.search.val()))})}},isPlaceholderOptionSelected:function(){var t;return this.getPlaceholder()!==b&&((t=this.getPlaceholderOption())!==b&&t.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===b||null===this.opts.element.val())},prepareOpts:function(){var a=this.parent.prepareOpts.apply(this,arguments),o=this;return"select"===a.element.get(0).tagName.toLowerCase()?a.initSelection=function(t,e){var i=t.find("option").filter(function(){return this.selected&&!this.disabled});e(o.optionToData(i))}:"data"in a&&(a.initSelection=a.initSelection||function(t,e){var n=t.val(),s=null;a.query({matcher:function(t,e,i){var o=u(n,a.id(i));return o&&(s=i),o},callback:w.isFunction(e)?function(){e(s)}:w.noop})}),a},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===b?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var t=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&t!==b){if(this.select&&this.getPlaceholderOption()===b)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(t)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(t,e,i){var o=0,n=this;if(this.findHighlightableChoices().each2(function(t,e){return u(n.id(e.data("select2-data")),n.opts.element.val())?(o=t,!1):void 0}),!1!==i&&(!0===e&&0<=o?this.highlight(o):this.highlight(0)),!0===e){var s=this.opts.minimumResultsForSearch;0<=s&&this.showSearch(function i(t){var o=0;return w.each(t,function(t,e){e.children?o+=i(e.children):o++}),o}(t.results)>=s)}},showSearch:function(t){this.showSearchInput!==t&&(this.showSearchInput=t,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!t),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!t),w(this.dropdown,this.container).toggleClass("select2-with-searchbox",t))},onSelect:function(t,e){if(this.triggerSelect(t)){var i=this.opts.element.val(),o=this.data();this.opts.element.val(this.id(t)),this.updateSelection(t),this.opts.element.trigger({type:"select2-selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.close(),e&&e.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),u(i,this.id(t))||this.triggerChange({added:t,removed:o})}},updateSelection:function(t){var e,i,o=this.selection.find(".select2-chosen");this.selection.data("select2-data",t),o.empty(),null!==t&&(e=this.opts.formatSelection(t,o,this.opts.escapeMarkup)),e!==b&&o.append(e),(i=this.opts.formatSelectionCssClass(t,o))!==b&&o.addClass(i),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")},val:function(){var t,e=!1,i=null,o=this,n=this.data();if(0===arguments.length)return this.opts.element.val();if(t=arguments[0],1<arguments.length&&(e=arguments[1]),this.select)this.select.val(t).find("option").filter(function(){return this.selected}).each2(function(t,e){return i=o.optionToData(e),!1}),this.updateSelection(i),this.setPlaceholder(),e&&this.triggerChange({added:i,removed:n});else{if(!t&&0!==t)return void this.clear(e);if(this.opts.initSelection===b)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(t),this.opts.initSelection(this.opts.element,function(t){o.opts.element.val(t?o.id(t):""),o.updateSelection(t),o.setPlaceholder(),e&&o.triggerChange({added:t,removed:n})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(t){var e,i=!1;return 0===arguments.length?((e=this.selection.data("select2-data"))==b&&(e=null),e):(1<arguments.length&&(i=arguments[1]),void(t?(e=this.data(),this.opts.element.val(t?this.id(t):""),this.updateSelection(t),i&&this.triggerChange({added:t,removed:e})):this.clear(i)))}}),x=e(i,{createContainer:function(){return w(document.createElement("div")).attr({class:"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>","  <li class='select2-search-field'>","    <label for='' class='select2-offscreen'></label>","    <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>","  </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>","   <ul class='select2-results'>","   </ul>","</div>"].join(""))},prepareOpts:function(){var l=this.parent.prepareOpts.apply(this,arguments),o=this;return"select"===l.element.get(0).tagName.toLowerCase()?l.initSelection=function(t,e){var i=[];t.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(t,e){i.push(o.optionToData(e))}),e(i)}:"data"in l&&(l.initSelection=l.initSelection||function(t,s){var a=n(t.val(),l.separator,l.transformVal),r=[];l.query({matcher:function(t,e,i){var o=w.grep(a,function(t){return u(t,l.id(i))}).length;return o&&r.push(i),o},callback:w.isFunction(s)?function(){for(var t=[],e=0;e<a.length;e++)for(var i=a[e],o=0;o<r.length;o++){var n=r[o];if(u(i,l.id(n))){t.push(n),r.splice(o,1);break}}s(t)}:w.noop})}),l},selectChoice:function(t){var e=this.container.find(".select2-search-choice-focus");e.length&&t&&t[0]==e[0]||(e.length&&this.opts.element.trigger("choice-deselected",e),e.removeClass("select2-search-choice-focus"),t&&t.length&&(this.close(),t.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",t)))},destroy:function(){w("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),_.call(this,"searchContainer","selection")},initContainer:function(){var a,t=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=a=this.container.find(t);var e=this;this.selection.on("click",".select2-container:not(.select2-container-disabled) .select2-search-choice:not(.select2-locked)",function(){e.search[0].focus(),e.selectChoice(w(this))}),this.search.attr("id","s2id_autogen"+C()),this.search.prev().text(w("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.opts.element.focus(this.bind(function(){this.focus()})),this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&0==this.search.val().length||this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()){++this.keydowns;var e=a.find(".select2-search-choice-focus"),i=e.prev(".select2-search-choice:not(.select2-locked)"),o=e.next(".select2-search-choice:not(.select2-locked)"),n=function(t){var e=0,i=0;if("selectionStart"in(t=w(t)[0]))e=t.selectionStart,i=t.selectionEnd-e;else if("selection"in document){t.focus();var o=document.selection.createRange();i=document.selection.createRange().text.length,o.moveStart("character",-t.value.length),e=o.text.length-i}return{offset:e,length:i}}(this.search);if(e.length&&(t.which==M.LEFT||t.which==M.RIGHT||t.which==M.BACKSPACE||t.which==M.DELETE||t.which==M.ENTER)){var s=e;return t.which==M.LEFT&&i.length?s=i:t.which==M.RIGHT?s=o.length?o:null:t.which===M.BACKSPACE?this.unselect(e.first())&&(this.search.width(10),s=i.length?i:o):t.which==M.DELETE?this.unselect(e.first())&&(this.search.width(10),s=o.length?o:null):t.which==M.ENTER&&(s=null),this.selectChoice(s),p(t),void(s&&s.length||this.open())}if((t.which===M.BACKSPACE&&1==this.keydowns||t.which==M.LEFT)&&0==n.offset&&!n.length)return this.selectChoice(a.find(".select2-search-choice:not(.select2-locked)").last()),void p(t);if(this.selectChoice(null),this.opened())switch(t.which){case M.UP:case M.DOWN:return this.moveHighlight(t.which===M.UP?-1:1),void p(t);case M.ENTER:return this.selectHighlighted(),void p(t);case M.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case M.ESC:return this.cancel(t),void p(t)}if(t.which!==M.TAB&&!M.isControl(t)&&!M.isFunctionKey(t)&&t.which!==M.BACKSPACE&&t.which!==M.ESC){if(t.which===M.ENTER){if(!1===this.opts.openOnEnter)return;if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return}this.open(),(t.which===M.PAGE_UP||t.which===M.PAGE_DOWN)&&p(t),t.which===M.ENTER&&p(t)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(t){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),t.stopImmediatePropagation(),this.opts.element.trigger(w.Event("select2-blur"))})),this.container.on("click",t,this.bind(function(t){this.isInterfaceEnabled()&&(0<w(t.target).closest(".select2-search-choice").length||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(w.Event("select2-focus")),this.open(),this.focusSearch(),t.preventDefault()))})),this.container.on("focus",t,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(w.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.hide(),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var e=this;this.opts.initSelection.call(null,this.opts.element,function(t){t!==b&&null!==t&&(e.updateSelection(t),e.close(),e.clearSearch())})}},clearSearch:function(){var t=this.getPlaceholder(),e=this.getMaxSearchWidth();t!==b&&0===this.getVal().length&&!1===this.search.hasClass("select2-focused")?(this.search.val(t).addClass("select2-default"),this.search.width(0<e?e:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(w.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var e=[],i=[],o=this;w(t).each(function(){d(o.id(this),e)<0&&(e.push(o.id(this)),i.push(this))}),t=i,this.selection.find(".select2-search-choice").remove(),w(t).each(function(){o.addSelectedChoice(this)}),o.postprocessResults()},tokenize:function(){var t=this.search.val();null!=(t=this.opts.tokenizer.call(this,t,this.data(),this.bind(this.onSelect),this.opts))&&t!=b&&(this.search.val(t),0<t.length&&this.open())},onSelect:function(t,e){this.triggerSelect(t)&&""!==t.text&&(this.addSelectedChoice(t),this.opts.element.trigger({type:"selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(t,!1,!0===this.opts.closeOnSelect),this.opts.closeOnSelect?(this.close(),this.search.width(10)):0<this.countSelectableResults()?(this.search.width(10),this.resizeSearch(),0<this.getMaximumSelectionSize()&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:t}),e&&e.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(t){var e,i,o=!t.locked,n=w("<li class='select2-search-choice'>    <div></div>    <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=w("<li class='select2-search-choice select2-locked'><div></div></li>"),a=o?n:s,r=this.id(t),l=this.getVal();(e=this.opts.formatSelection(t,a.find("div"),this.opts.escapeMarkup))!=b&&a.find("div").replaceWith(w("<div></div>").html(e)),(i=this.opts.formatSelectionCssClass(t,a.find("div")))!=b&&a.addClass(i),o&&a.find(".select2-search-choice-close").on("mousedown",p).on("click dblclick",this.bind(function(t){this.isInterfaceEnabled()&&(this.unselect(w(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),p(t),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),a.data("select2-data",t),a.insertBefore(this.searchContainer),l.push(r),this.setVal(l)},unselect:function(t){var e,i,o=this.getVal();if(0===(t=t.closest(".select2-search-choice")).length)throw"Invalid argument: "+t+". Must be .select2-search-choice";if(e=t.data("select2-data")){var n=w.Event("select2-removing");if(n.val=this.id(e),n.choice=e,this.opts.element.trigger(n),n.isDefaultPrevented())return!1;for(;0<=(i=d(this.id(e),o));)o.splice(i,1),this.setVal(o),this.select&&this.postprocessResults();return t.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(e),choice:e}),this.triggerChange({removed:e}),!0}},postprocessResults:function(t,e,i){var o=this.getVal(),n=this.results.find(".select2-result"),s=this.results.find(".select2-result-with-children"),a=this;n.each2(function(t,e){0<=d(a.id(e.data("select2-data")),o)&&(e.addClass("select2-selected"),e.find(".select2-result-selectable").addClass("select2-selected"))}),s.each2(function(t,e){e.is(".select2-result-selectable")||0!==e.find(".select2-result-selectable:not(.select2-selected)").length||e.addClass("select2-selected")}),-1==this.highlight()&&!1!==i&&!0===this.opts.closeOnSelect&&a.highlight(0),!this.opts.createSearchChoice&&0<!n.filter(".select2-result:not(.select2-selected)").length&&(!t||t&&!t.more&&0===this.results.find(".select2-no-results").length)&&v(a.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+k(a.opts.formatNoMatches,a.opts.element,a.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-s(this.search)},resizeSearch:function(){var t,e,i,o,n=s(this.search);t=function(t){if(!T){var e=t[0].currentStyle||window.getComputedStyle(t[0],null);(T=w(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:e.fontSize,fontFamily:e.fontFamily,fontStyle:e.fontStyle,fontWeight:e.fontWeight,letterSpacing:e.letterSpacing,textTransform:e.textTransform,whiteSpace:"nowrap"})).attr("class","select2-sizer"),w(document.body).append(T)}return T.text(t.val()),T.width()}(this.search)+10,e=this.search.offset().left,(o=(i=this.selection.width())-(e-this.selection.offset().left)-n)<t&&(o=i-n),o<40&&(o=i-n),o<=0&&(o=t),this.search.width(Math.floor(o))},getVal:function(){var t;return this.select?null===(t=this.select.val())?[]:t:n(t=this.opts.element.val(),this.opts.separator,this.opts.transformVal)},setVal:function(t){var e;this.select?this.select.val(t):(e=[],w(t).each(function(){d(this,e)<0&&e.push(this)}),this.opts.element.val(0===e.length?"":e.join(this.opts.separator)))},buildChangeDetails:function(t,e){e=e.slice(0),t=t.slice(0);for(var i=0;i<e.length;i++)for(var o=0;o<t.length;o++)u(this.opts.id(e[i]),this.opts.id(t[o]))&&(e.splice(i,1),0<i&&i--,t.splice(o,1),o--);return{added:e,removed:t}},val:function(t,i){var o,n=this;if(0===arguments.length)return this.getVal();if((o=this.data()).length||(o=[]),!t&&0!==t)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(i&&this.triggerChange({added:this.data(),removed:o}));if(this.setVal(t),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),i&&this.triggerChange(this.buildChangeDetails(o,this.data()));else{if(this.opts.initSelection===b)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var e=w.map(t,n.id);n.setVal(e),n.updateSelection(t),n.clearSearch(),i&&n.triggerChange(n.buildChangeDetails(o,n.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],e=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(e.opts.id(w(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t,e){var i,o,n=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return w(this).data("select2-data")}).get():(o=this.data(),t||(t=[]),i=w.map(t,function(t){return n.opts.id(t)}),this.setVal(i),this.updateSelection(t),this.clearSearch(),void(e&&this.triggerChange(this.buildChangeDetails(o,this.data()))))}}),w.fn.select2=function(){var t,e,i,o,n,s=Array.prototype.slice.call(arguments,0),a=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],r=["opened","isFocused","container","dropdown"],l=["val","data"],c={search:"externalSearch"};return this.each(function(){if(0===s.length||"object"==typeof s[0])(t=0===s.length?{}:w.extend({},s[0])).element=w(this),"select"===t.element.get(0).tagName.toLowerCase()?n=t.element.prop("multiple"):(n=t.multiple||!1,"tags"in t&&(t.multiple=n=!0)),(e=n?new window.Select2.class.multi:new window.Select2.class.single).init(t);else{if("string"!=typeof s[0])throw"Invalid arguments to select2 plugin: "+s;if(d(s[0],a)<0)throw"Unknown method: "+s[0];if(o=b,(e=w(this).data("select2"))===b)return;if("container"===(i=s[0])?o=e.container:"dropdown"===i?o=e.dropdown:(c[i]&&(i=c[i]),o=e[i].apply(e,s.slice(1))),0<=d(s[0],r)||0<=d(s[0],l)&&1==s.length)return!1}}),o===b?this:o},w.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(t,e,i,o){var n=[];return l(this.text(t),i.term,n,o),n.join("")},transformVal:function(t){return w.trim(t)},formatSelection:function(t,e,i){return t?i(this.text(t)):b},sortResults:function(t){return t},formatResultCssClass:function(t){return t.css},formatSelectionCssClass:function(){return b},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(t){return t==b?null:t.id},text:function(t){return t&&this.data&&this.data.text?w.isFunction(this.data.text)?this.data.text(t):t[this.data.text]:t.text},matcher:function(t,e){return 0<=r(""+e).toUpperCase().indexOf(r(""+t).toUpperCase())},separator:",",tokenSeparators:[],tokenizer:function(t,e,i,o){var n,s,a,r,l,c=t,d=!1;if(!o.createSearchChoice||!o.tokenSeparators||o.tokenSeparators.length<1)return b;for(;;){for(s=-1,a=0,r=o.tokenSeparators.length;a<r&&(l=o.tokenSeparators[a],!(0<=(s=t.indexOf(l))));a++);if(s<0)break;if(n=t.substring(0,s),t=t.substring(s+l.length),0<n.length&&(n=o.createSearchChoice.call(this,n,e))!==b&&null!==n&&o.id(n)!==b&&null!==o.id(n)){for(d=!1,a=0,r=e.length;a<r;a++)if(u(o.id(n),o.id(e[a]))){d=!0;break}d||i(n)}}return c!==t?t:void 0},escapeMarkup:t,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(t){return t},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return b},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(t){return!("ontouchstart"in window||0<navigator.msMaxTouchPoints)||!(t.opts.minimumResultsForSearch<0)}},w.fn.select2.locales=[],w.fn.select2.locales.en={formatMatches:function(t){return 1===t?"One result is available, press enter to select it.":t+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(){return"Loading failed"},formatInputTooShort:function(t,e){var i=e-t.length;return"Please enter "+i+" or more character"+(1==i?"":"s")},formatInputTooLong:function(t,e){var i=t.length-e;return"Please delete "+i+" character"+(1==i?"":"s")},formatSelectionTooBig:function(t){return"You can only select "+t+" item"+(1==t?"":"s")},formatLoadMore:function(){return"Loading more results…"},formatSearching:function(){return"Searching…"}},w.extend(w.fn.select2.defaults,w.fn.select2.locales.en),w.fn.select2.ajaxDefaults={transport:w.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:o,local:m,tags:g},util:{debounce:h,markMatch:l,escapeMarkup:t,stripDiacritics:r},class:{abstract:i,single:y,multi:x}}}var A}(jQuery),jQuery(document).ready(function(d){var h=!1;d("body").append('<div class="option-wrapper st-option-wrapper"></div>'),d(".st-location-name").each(function(t,e){var a,o=d(this).parents("form"),c=d(this).parents(".st-select-wrapper"),r=d(this);d(".option-wrapper",c).remove(),r.keyup(function(t){h=r,40!=t.which&&38!=t.which&&9!=t.which&&(val=d(this).val(),13!=t.which&&(!1,""!=val?(html="",d("select option",c).prop("selected",!1),d("select option",c).each(function(t,e){var i,o=d(this).data("country"),n=d(this).text(),s=n.split("||");if(s=s[0],0<(i=val,n.replace(new RegExp(i+"(?!([^<]+)?>)","gi"),'<span class="highlight">$&</span>')).indexOf("</span>")){var a=d(this).parent("select").attr("data-current-country");void 0!==a&&""!=a?o==a&&(html+='<div style="'+d(this).data("style")+'" data-text="'+n+'" data-country="'+o+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+s+'<i class="fa fa-map-marker"></i></a></div>'):html+='<div style="'+d(this).data("style")+'" data-text="'+n+'" data-country="'+o+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+s+'<i class="fa fa-map-marker"></i></a></div>'}}),d(".option-wrapper").html(html).show(),r.caculatePosition(d(".option-wrapper"),r)):(html="",d("select option",c).prop("selected",!1),d("select option",c).each(function(t,e){var i=d(this).data("country"),o=d(this).text(),n=o.split("||");if(n=n[0],""!=o){var s=d(this).parent("select").attr("data-current-country");void 0!==s&&""!=s?i==s&&(html+='<div style="'+d(this).data("style")+'" data-text="'+o+'" data-country="'+i+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+n+'<i class="fa fa-map-marker"></i></a></div>'):html+='<div style="'+d(this).data("style")+'" data-text="'+o+'" data-country="'+i+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+n+'<i class="fa fa-map-marker"></i></a></div>'}}),d(".option-wrapper").html(html).show(),r.caculatePosition(d(".option-wrapper",c),r))),t.which,13==t.which&&val,void 0!==r.data("children")&&""!=r.data("children")&&(name=r.data("children"),d('select[name="'+name+'"]',o).attr("data-current-country",""),d('input[name="drop-off"]',o).val(""),d('select[name="'+name+'"] option',o).prop("selected",!1)))}),r.keydown(function(t){if(h=r,13==t.which){var e=h.closest("form");return d(".option-wrapper").html("").hide(),r.focusNextInputField(),!1}if(9==t.which){e=h.closest("form");return d(".option-wrapper").html("").hide(),!1}if(40==t.which||38==t.which||9==t.which){if(40===t.which){var i=d(".option-wrapper .option.active").index();a?(a.removeClass("active"),next=a.next(),0<next.length?a=next.addClass("active"):0<d(".option-wrapper .option.active").length?(d(".st-option-wrapper .option").eq(i).removeClass("active"),a=d(".option-wrapper .option").length-1==i?d(".st-option-wrapper .option").eq(0).addClass("active"):d(".st-option-wrapper .option").eq(i+1).addClass("active")):a=d(".st-option-wrapper .option").eq(0).addClass("active")):a=d(".st-option-wrapper .option").eq(0).addClass("active")}else if(38===t.which){i=d(".option-wrapper .option.active").index();a?(a.removeClass("active"),next=a.prev(),0<next.length?a=next.addClass("active"):0<d(".option-wrapper .option.active").length?(d(".st-option-wrapper .option").eq(i).removeClass("active"),a=d(".st-option-wrapper .option").eq(i-1).addClass("active")):a=d(".st-option-wrapper .option").last().addClass("active")):a=d(".st-option-wrapper .option").last().addClass("active")}d(".option-wrapper").scrollTo(d(".option-wrapper .option.active"),400),t.preventDefault(),!0;var o=d(".option-wrapper .option.active").data("value"),n=d(".option-wrapper .option.active").text(),s=d(".option-wrapper .option.active").data("country");r.val(n),d('select option[value="'+o+'"]',c).prop("selected",!0),void 0!==r.data("children")&&""!=r.data("children")&&(name=r.data("children"),d('select[name="'+name+'"]',e).attr("data-current-country",s))}}),r.blur(function(t){"clear"==r.data("clear")&&""==d("select option:selected",c).val()&&r.val("")}),r.on("focus",function(t){if("location_origin"!=r.data("id")&&"location_destination"!=r.data("id")&&(h=r),html="",d("select option",c).prop("selected",!1),d("select option",c).each(function(t,e){var i=d(this).data("country"),o=d(this).text(),n=o.split("||");n=n[0];if(""!=o){var s=d(this).parent("select").attr("data-current-country");void 0!==s&&""!=s?i==s&&(html+='<div style="'+d(this).data("style")+'" data-text="'+o+'" data-country="'+i+'" data-value="'+d(this).val()+'" class="option "><span class="label"><a href="#">'+n+'<i class="fa fa-map-marker"></i></a></div>'):html+='<div  style="'+d(this).data("style")+'" data-text="'+o+'" data-country="'+i+'" data-value="'+d(this).val()+'" class="option "><span class="label"><a href="#">'+n+'<i class="fa fa-map-marker"></i></a></div>'}}),void 0!==r.data("parent")&&""!=r.data("parent")){if(name=r.data("parent"),d('select[name="'+name+'"]',o).length){var e=d('select[name="'+name+'"]',o).parent().find("input.st-location-name").val();void 0===e||""==e?(r.val(""),d('select[name="'+name+'"]',o).parent().find("input.st-location-name").focus()):d(".option-wrapper").html(html).show()}}else d(".option-wrapper").html(html).show();r.caculatePosition()}),d(document).on("click",".option-wrapper .option",function(t){if(0<h.length){var e=h.closest("form"),i=h.closest(".st-select-wrapper");setTimeout(function(){void 0!==e.find('input[name="start"]').attr("value")&&(e.find('input[name="start"]').attr("value").length<=0&&e.find('input[name="start"]').datepicker("show"))},100),t.preventDefault(),!0;var o=d(this).data("value"),n=d(this).text(),s=d(this).data("country");""!=n&&(h.val(n),d('select option[value="'+o+'"]',i).prop("selected",!0),d(".option-wrapper").html("").hide(),void 0!==r.data("children")&&""!=r.data("children")&&(name=r.data("children"),d('select[name="'+name+'"]',e).attr("data-current-country",s)))}h.focusNextInputField()}),d(document).click(function(t){d(t.target).is(".st-location-name")||d(".option-wrapper").html("").hide()}),r.caculatePosition=function(){if(h&&h.length){var t=d(".option-wrapper"),e=h,i=c.offset(),o=i.top+c.height(),n=i.left,s=e.outerWidth(),a=0;a=d("#wpadminbar").length&&783<=d(window).width()?d("#wpadminbar").height():0,d("body").hasClass("boxed")&&(n-=d("body").offset().left),o-=a;var r=99999,l="absolute";d("#search-dialog").length&&(l="fixed",o=o+a-d(window).scrollTop(),r=99999),t.css({position:l,top:o,left:n,width:s,"z-index":r})}},d(window).resize(function(){r.caculatePosition()}),o.submit(function(t){if(""==r.val()&&r.hasClass("required"))return r.focus(),!1;if(d("input.required-field").length&&1==d("input.required-field").prop("checked")){var e=d('select[name="location_id_pick_up"] option:selected',o).val(),i=d('input[name="pick-up"]',o).val();d('select[name="location_id_drop_off"] option[value="'+e+'"]',o).prop("selected",!0),d('input[name="drop-off"]',o).val(i)}return d("input.required-field").length&&0==d("input.required-field").prop("checked")&&""==d('input[name="drop-off"]',o).val()?(d('input[name="drop-off"]',o).focus(),d('select[name="location_id_drop_off"] option',o).prop("selected",!1),!1):void 0})}),d.fn.focusNextInputField=function(){return this.each(function(){var t=d(this).parents("form:eq(0),body").find("button:visible,input:visible,textarea:visible,select:visible"),e=t.index(this);return-1<e&&e+1<t.length&&t.eq(e+1).focus(),!1})}}),function(a,r,l,t,e){"use strict";var i,o,n=0,s=(i=t.userAgent,o=/msie\s\d+/i,0<i.search(o)&&o.exec(i).toString().split(" ")[1]<9&&(a("html").addClass("lt-ie9"),!0));Function.prototype.bind||(Function.prototype.bind=function(o){var n=this,s=[].slice;if("function"!=typeof n)throw new TypeError;var a=s.call(arguments,1),r=function(){if(this instanceof r){var t=function(){};t.prototype=n.prototype;var e=new t,i=n.apply(e,a.concat(s.call(arguments)));return Object(i)===i?i:e}return n.apply(o,a.concat(s.call(arguments)))};return r}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var i;if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),n=o.length>>>0;if(0===n)return-1;var s=+e||0;if(Math.abs(s)===1/0&&(s=0),n<=s)return-1;for(i=Math.max(0<=s?s:n-Math.abs(s),0);i<n;){if(i in o&&o[i]===t)return i;i++}return-1});var c=function(t,e,i){this.VERSION="2.0.13",this.input=t,this.plugin_count=i,this.current_plugin=0,this.calc_count=0,this.update_tm=0,this.old_from=0,this.old_to=0,this.raf_id=null,this.dragging=!1,this.force_redraw=!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:a(l),body:a(r.body),input:a(t),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:[]};var o=this.$cache.input,n={type:o.data("type"),min:o.data("min"),max:o.data("max"),from:o.data("from"),to:o.data("to"),step:o.data("step"),min_interval:o.data("minInterval"),max_interval:o.data("maxInterval"),drag_interval:o.data("dragInterval"),values:o.data("values"),from_fixed:o.data("fromFixed"),from_min:o.data("fromMin"),from_max:o.data("fromMax"),from_shadow:o.data("fromShadow"),to_fixed:o.data("toFixed"),to_min:o.data("toMin"),to_max:o.data("toMax"),to_shadow:o.data("toShadow"),prettify_enabled:o.data("prettifyEnabled"),prettify_separator:o.data("prettifySeparator"),force_edges:o.data("forceEdges"),keyboard:o.data("keyboard"),keyboard_step:o.data("keyboardStep"),grid:o.data("grid"),grid_margin:o.data("gridMargin"),grid_num:o.data("gridNum"),grid_snap:o.data("gridSnap"),hide_min_max:o.data("hideMinMax"),hide_from_to:o.data("hideFromTo"),prefix:o.data("prefix"),postfix:o.data("postfix"),max_postfix:o.data("maxPostfix"),decorate_both:o.data("decorateBoth"),values_separator:o.data("valuesSeparator"),disable:o.data("disable")};n.values=n.values&&n.values.split(",");var s=o.prop("value");s&&((s=s.split(";"))[0]&&s[0]==+s[0]&&(s[0]=+s[0]),s[1]&&s[1]==+s[1]&&(s[1]=+s[1]),e&&e.values&&e.values.length?(n.from=s[0]&&e.values.indexOf(s[0]),n.to=s[1]&&e.values.indexOf(s[1])):(n.from=s[0]&&+s[0],n.to=s[1]&&+s[1])),e=a.extend(n,e),this.options=a.extend({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:" — ",disable:!1,onStart:null,onChange:null,onFinish:null,onUpdate:null},e),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.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:0,p_single_real:0,p_from:0,p_from_real:0,p_to: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:0,p_from_left:0,p_to:0,p_to_left:0,p_single:0,p_single_left:0},this.init()};c.prototype={init:function(t){this.coords.p_step=this.options.step/((this.options.max-this.options.min)/100),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),t?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var t='<span class="irs js-irs-'+this.plugin_count+'"></span>';this.$cache.input.before(t),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('<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>'),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"),"single"===this.options.type?(this.$cache.cont.append('<span class="irs-bar-edge"></span><span class="irs-shadow shadow-single"></span><span class="irs-slider single"></span>'),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('<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>'),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())},setTopHandler:function(){var t=this.options.min,e=this.options.max,i=this.options.from,o=this.options.to;t<i&&o===e?this.$cache.s_from.addClass("type_last"):o<e&&this.$cache.s_to.addClass("type_last")},appendDisableMask:function(){this.$cache.cont.append('<span class="irs-disable-mask"></span>'),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),s&&(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(){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")),this.options.drag_interval&&"double"===this.options.type?(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"))):(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"))),"single"===this.options.type?(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"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),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"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),s&&(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(t){if(this.dragging){var e=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;this.coords.x_pointer=e-this.coords.x_gap,this.calc()}},pointerUp:function(t){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,(a.contains(this.$cache.cont[0],t.target)||this.dragging)&&(this.is_finish=!0,this.callOnFinish()),this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,this.dragging=!1,s&&a("*").prop("unselectable",!1),this.updateScene())},changeLevel:function(t){switch(t){case"single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single);break;case"from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from),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),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),this.coords.p_gap_right=this.toFixed(this.coords.p_to-this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}},pointerDown:function(t,e){e.preventDefault();var i=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;2!==e.button&&(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=i-this.coords.x_gap,this.calcPointer(),this.changeLevel(t),s&&a("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(t,e){e.preventDefault();var i=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;2!==e.button&&(this.current_plugin=this.plugin_count,this.target=t,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(t,e){if(!(this.current_plugin!==this.plugin_count||e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)){switch(e.which){case 83:case 65:case 40:case 37:e.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:e.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(t){var e=this.coords.p_pointer;t?e+=this.options.keyboard_step:e-=this.options.keyboard_step,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*e),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");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)}},calc:function(t){if(this.options&&(this.calc_count++,(10===this.calc_count||t)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),"single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1)),this.coords.w_rs)){this.calcPointer(),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100);var e=100-this.coords.p_handle,i=this.toFixed(this.coords.p_pointer-this.coords.p_gap);switch("click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,i=this.toFixed(this.coords.p_pointer-this.coords.p_gap),this.target=this.chooseHandle(i)),i<0?i=0:e<i&&(i=e),this.target){case"base":var o=(this.options.max-this.options.min)/100,n=(this.result.from-this.options.min)/o,s=(this.result.to-this.options.min)/o;this.coords.p_single_real=this.toFixed(n),this.coords.p_from_real=this.toFixed(n),this.coords.p_to_real=this.toFixed(s),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=this.toFixed(n-this.coords.p_handle/100*n),this.coords.p_from=this.toFixed(n-this.coords.p_handle/100*n),this.coords.p_to=this.toFixed(s-this.coords.p_handle/100*s),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.calcWithStep(i/e*100),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single=this.toFixed(this.coords.p_single_real/100*e);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.calcWithStep(i/e*100),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=this.toFixed(this.coords.p_from_real/100*e);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.calcWithStep(i/e*100),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=this.toFixed(this.coords.p_to_real/100*e);break;case"both":if(this.options.from_fixed||this.options.to_fixed)break;i=this.toFixed(i+.1*this.coords.p_handle),this.coords.p_from_real=this.calcWithStep((i-this.coords.p_gap_left)/e*100),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=this.toFixed(this.coords.p_from_real/100*e),this.coords.p_to_real=this.calcWithStep((i+this.coords.p_gap_right)/e*100),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=this.toFixed(this.coords.p_to_real/100*e)}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single,this.result.from_percent=this.coords.p_single_real,this.result.from=this.calcReal(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+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to-this.coords.p_from),this.result.from_percent=this.coords.p_from_real,this.result.from=this.calcReal(this.coords.p_from_real),this.result.to_percent=this.coords.p_to_real,this.result.to=this.calcReal(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()}},calcPointer:function(){return this.coords.w_rs?(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),void(this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100))):void(this.coords.p_pointer=0)},chooseHandle:function(t){return"single"===this.options.type?"single":this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2<=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&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single+this.coords.p_handle/2-this.labels.p_single/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from+this.coords.p_handle/2-this.labels.p_from/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),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to+this.coords.p_handle/2-this.labels.p_to/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),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single=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)/2-this.labels.p_single/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))},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+"%","single"===this.options.type?(this.$cache.s_single[0].style.left=this.coords.p_single+"%",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.data("from",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+"%",this.$cache.s_to[0].style.left=this.coords.p_to+"%",(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.result.to_value),this.$cache.input.data("from",this.result.from_value),this.$cache.input.data("to",this.result.to_value)):(this.$cache.input.prop("value",this.result.from+";"+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.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))},callOnStart:function(){this.options.onStart&&"function"==typeof this.options.onStart&&this.options.onStart(this.result)},callOnChange:function(){this.options.onChange&&"function"==typeof this.options.onChange&&this.options.onChange(this.result)},callOnFinish:function(){this.options.onFinish&&"function"==typeof this.options.onFinish&&this.options.onFinish(this.result)},callOnUpdate:function(){this.options.onUpdate&&"function"==typeof this.options.onUpdate&&this.options.onUpdate(this.result)},drawLabels:function(){if(this.options){var t,e,i,o=this.options.values.length,n=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)t=o?this.decorate(n[this.result.from]):this.decorate(this._prettify(this.result.from),this.result.from),this.$cache.single.html(t),this.calcLabels(),this.labels.p_single_left<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",this.labels.p_single_left+this.labels.p_single>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{o?(this.options.decorate_both?(t=this.decorate(n[this.result.from]),t+=this.options.values_separator,t+=this.decorate(n[this.result.to])):t=this.decorate(n[this.result.from]+this.options.values_separator+n[this.result.to]),e=this.decorate(n[this.result.from]),i=this.decorate(n[this.result.to])):(this.options.decorate_both?(t=this.decorate(this._prettify(this.result.from),this.result.from),t+=this.options.values_separator,t+=this.decorate(this._prettify(this.result.to),this.result.to)):t=this.decorate(this._prettify(this.result.from)+this.options.values_separator+this._prettify(this.result.to),this.result.to),e=this.decorate(this._prettify(this.result.from),this.result.from),i=this.decorate(this._prettify(this.result.to),this.result.to)),this.$cache.single.html(t),this.$cache.from.html(e),this.$cache.to.html(i),this.calcLabels();var s=Math.min(this.labels.p_single_left,this.labels.p_from_left),a=this.labels.p_single_left+this.labels.p_single,r=this.labels.p_to_left+this.labels.p_to,l=Math.max(a,r);this.labels.p_from_left+this.labels.p_from>=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.$cache.from[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden",l=r):(this.$cache.from[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",l=Math.max(a,r))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),s<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",l>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var t,e,i,o,n=this.options,s=this.$cache,a="number"==typeof n.from_min&&!isNaN(n.from_min),r="number"==typeof n.from_max&&!isNaN(n.from_max),l="number"==typeof n.to_min&&!isNaN(n.to_min),c="number"==typeof n.to_max&&!isNaN(n.to_max);"single"===n.type?n.from_shadow&&(a||r)?(t=this.calcPercent(a?n.from_min:n.min),e=this.calcPercent(r?n.from_max:n.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),e=this.toFixed(e-this.coords.p_handle/100*e),t+=this.coords.p_handle/2,s.shad_single[0].style.display="block",s.shad_single[0].style.left=t+"%",s.shad_single[0].style.width=e+"%"):s.shad_single[0].style.display="none":(n.from_shadow&&(a||r)?(t=this.calcPercent(a?n.from_min:n.min),e=this.calcPercent(r?n.from_max:n.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),e=this.toFixed(e-this.coords.p_handle/100*e),t+=this.coords.p_handle/2,s.shad_from[0].style.display="block",s.shad_from[0].style.left=t+"%",s.shad_from[0].style.width=e+"%"):s.shad_from[0].style.display="none",n.to_shadow&&(l||c)?(i=this.calcPercent(l?n.to_min:n.min),o=this.calcPercent(c?n.to_max:n.max)-i,i=this.toFixed(i-this.coords.p_handle/100*i),o=this.toFixed(o-this.coords.p_handle/100*o),i+=this.coords.p_handle/2,s.shad_to[0].style.display="block",s.shad_to[0].style.left=i+"%",s.shad_to[0].style.width=o+"%"):s.shad_to[0].style.display="none")},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input")},calcPercent:function(t){var e=(this.options.max-this.options.min)/100,i=(t-this.options.min)/e;return this.toFixed(i)},calcReal:function(t){var e,i,o=this.options.min,n=this.options.max,s=o.toString().split(".")[1],a=n.toString().split(".")[1],r=0,l=0;if(0===t)return this.options.min;if(100===t)return this.options.max;s&&(r=e=s.length),a&&(r=i=a.length),e&&i&&(r=i<=e?e:i),o<0&&(o=+(o+(l=Math.abs(o))).toFixed(r),n=+(n+l).toFixed(r));var c,d=(n-o)/100*t+o,h=this.options.step.toString().split(".")[1];return h?d=+d.toFixed(h.length):(d/=this.options.step,d=+(d*=this.options.step).toFixed(0)),l&&(d-=l),(c=h?+d.toFixed(h.length):this.toFixed(d))<this.options.min?c=this.options.min:c>this.options.max&&(c=this.options.max),c},calcWithStep:function(t){var e=Math.round(t/this.coords.p_step)*this.coords.p_step;return 100<e&&(e=100),100===t&&(e=100),this.toFixed(e)},checkMinInterval:function(t,e,i){var o,n,s=this.options;return s.min_interval?(o=this.calcReal(t),n=this.calcReal(e),"from"===i?n-o<s.min_interval&&(o=n-s.min_interval):o-n<s.min_interval&&(o=n+s.min_interval),this.calcPercent(o)):t},checkMaxInterval:function(t,e,i){var o,n,s=this.options;return s.max_interval?(o=this.calcReal(t),n=this.calcReal(e),"from"===i?n-o>s.max_interval&&(o=n-s.max_interval):o-n>s.max_interval&&(o=n+s.max_interval),this.calcPercent(o)):t},checkDiapason:function(t,e,i){var o=this.calcReal(t),n=this.options;return"number"!=typeof e&&(e=n.min),"number"!=typeof i&&(i=n.max),o<e&&(o=e),i<o&&(o=i),this.calcPercent(o)},toFixed:function(t){return+(t=t.toFixed(9))},_prettify:function(t){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(t):this.prettify(t):t},prettify:function(t){return t.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(t,e){return this.options.force_edges&&(t<0?t=0:100-e<t&&(t=100-e)),this.toFixed(t)},validate:function(){var t,e,i=this.options,o=this.result,n=i.values,s=n.length;if("string"==typeof i.min&&(i.min=+i.min),"string"==typeof i.max&&(i.max=+i.max),"string"==typeof i.from&&(i.from=+i.from),"string"==typeof i.to&&(i.to=+i.to),"string"==typeof i.step&&(i.step=+i.step),"string"==typeof i.from_min&&(i.from_min=+i.from_min),"string"==typeof i.from_max&&(i.from_max=+i.from_max),"string"==typeof i.to_min&&(i.to_min=+i.to_min),"string"==typeof i.to_max&&(i.to_max=+i.to_max),"string"==typeof i.keyboard_step&&(i.keyboard_step=+i.keyboard_step),"string"==typeof i.grid_num&&(i.grid_num=+i.grid_num),i.max<=i.min&&(i.min?i.max=2*i.min:i.max=i.min+1,i.step=1),s)for(i.p_values=[],i.min=0,i.max=s-1,i.step=1,i.grid_num=i.max,i.grid_snap=!0,e=0;e<s;e++)t=+n[e],isNaN(t)?t=n[e]:(n[e]=t,t=this._prettify(t)),i.p_values.push(t);("number"!=typeof i.from||isNaN(i.from))&&(i.from=i.min),("number"!=typeof i.to||isNaN(i.from))&&(i.to=i.max),"single"===i.type?(i.from<i.min&&(i.from=i.min),i.from>i.max&&(i.from=i.max)):((i.from<i.min||i.from>i.max)&&(i.from=i.min),(i.to>i.max||i.to<i.min)&&(i.to=i.max),i.from>i.to&&(i.from=i.to)),("number"!=typeof i.step||isNaN(i.step)||!i.step||i.step<0)&&(i.step=1),("number"!=typeof i.keyboard_step||isNaN(i.keyboard_step)||!i.keyboard_step||i.keyboard_step<0)&&(i.keyboard_step=5),"number"==typeof i.from_min&&i.from<i.from_min&&(i.from=i.from_min),"number"==typeof i.from_max&&i.from>i.from_max&&(i.from=i.from_max),"number"==typeof i.to_min&&i.to<i.to_min&&(i.to=i.to_min),"number"==typeof i.to_max&&i.from>i.to_max&&(i.to=i.to_max),o&&(o.min!==i.min&&(o.min=i.min),o.max!==i.max&&(o.max=i.max),(o.from<o.min||o.from>o.max)&&(o.from=i.from),(o.to<o.min||o.to>o.max)&&(o.to=i.to)),("number"!=typeof i.min_interval||isNaN(i.min_interval)||!i.min_interval||i.min_interval<0)&&(i.min_interval=0),("number"!=typeof i.max_interval||isNaN(i.max_interval)||!i.max_interval||i.max_interval<0)&&(i.max_interval=0),i.min_interval&&i.min_interval>i.max-i.min&&(i.min_interval=i.max-i.min),i.max_interval&&i.max_interval>i.max-i.min&&(i.max_interval=i.max-i.min)},decorate:function(t,e){var i="",o=this.options;return o.prefix&&(i+=o.prefix),i+=t,o.max_postfix&&(o.values.length&&t===o.p_values[o.max]?(i+=o.max_postfix,o.postfix&&(i+=" ")):e===o.max&&(i+=o.max_postfix,o.postfix&&(i+=" "))),o.postfix&&(i+=o.postfix),i},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.calcPercent(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.calcPercent(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,e,i,o,n,s=this.options,a=s.max-s.min,r=s.grid_num,l=0,c=0,d=4,h="";for(this.calcGridMargin(),s.grid_snap?(r=a/s.step,l=this.toFixed(s.step/(a/100))):l=this.toFixed(100/r),4<r&&(d=3),7<r&&(d=2),14<r&&(d=1),28<r&&(d=0),t=0;t<r+1;t++){for(i=d,100<(c=this.toFixed(l*t))&&(c=100,(i-=2)<0&&(i=0)),o=((this.coords.big[t]=c)-l*(t-1))/(i+1),e=1;e<=i&&0!==c;e++)h+='<span class="irs-grid-pol small" style="left: '+this.toFixed(c-o*e)+'%"></span>';h+='<span class="irs-grid-pol" style="left: '+c+'%"></span>',n=this.calcReal(c),h+='<span class="irs-grid-text js-grid-text-'+t+'" style="left: '+c+'%">'+(n=s.values.length?s.p_values[n]:this._prettify(n))+"</span>"}this.coords.big_num=Math.ceil(r+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(h),this.cacheGridLabels()}},cacheGridLabels:function(){var t,e,i=this.coords.big_num;for(e=0;e<i;e++)t=this.$cache.grid.find(".js-grid-text-"+e),this.$cache.grid_labels.push(t);this.calcGridLabels()},calcGridLabels:function(){var t,e=[],i=[],o=this.coords.big_num;for(t=0;t<o;t++)this.coords.big_w[t]=this.$cache.grid_labels[t].outerWidth(!1),this.coords.big_p[t]=this.toFixed(this.coords.big_w[t]/this.coords.w_rs*100),this.coords.big_x[t]=this.toFixed(this.coords.big_p[t]/2),e[t]=this.toFixed(this.coords.big[t]-this.coords.big_x[t]),i[t]=this.toFixed(e[t]+this.coords.big_p[t]);for(this.options.force_edges&&(e[0]<-this.coords.grid_gap&&(e[0]=-this.coords.grid_gap,i[0]=this.toFixed(e[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),i[o-1]>100+this.coords.grid_gap&&(i[o-1]=100+this.coords.grid_gap,e[o-1]=this.toFixed(i[o-1]-this.coords.big_p[o-1]),this.coords.big_x[o-1]=this.toFixed(this.coords.big_p[o-1]-this.coords.grid_gap))),this.calcGridCollision(2,e,i),this.calcGridCollision(4,e,i),t=0;t<o;t++)this.$cache.grid_labels[t][0].style.marginLeft=-this.coords.big_x[t]+"%"},calcGridCollision:function(t,e,i){var o,n,s,a=this.coords.big_num;for(o=0;o<a&&!(a<=(n=o+t/2));o+=t)s=this.$cache.grid_labels[n][0],i[o]<=e[n]?s.style.visibility="visible":s.style.visibility="hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&("single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=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=a.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),a.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},a.fn.ionRangeSlider=function(t){return this.each(function(){a.data(this,"ionRangeSlider")||a.data(this,"ionRangeSlider",new c(this,t,n++))})},function(){for(var s=0,t=["ms","moz","webkit","o"],e=0;e<t.length&&!l.requestAnimationFrame;++e)l.requestAnimationFrame=l[t[e]+"RequestAnimationFrame"],l.cancelAnimationFrame=l[t[e]+"CancelAnimationFrame"]||l[t[e]+"CancelRequestAnimationFrame"];l.requestAnimationFrame||(l.requestAnimationFrame=function(t,e){var i=(new Date).getTime(),o=Math.max(0,16-(i-s)),n=l.setTimeout(function(){t(i+o)},o);return s=i+o,n}),l.cancelAnimationFrame||(l.cancelAnimationFrame=function(t){clearTimeout(t)})}()}(jQuery,document,window,navigator),jQuery(document).ready(function(d){var h=!1;d("body").append('<div class="option-wrapper1 st-option-wrapper1 st-flight-location"></div>');d(".st-flight-location-name").each(function(t,e){var a,o=d(this).parents("form"),c=d(this).parents(".st-select-wrapper"),r=d(this);d(".option-wrapper1",c).remove(),r.keyup(function(t){h=r,40!=t.which&&38!=t.which&&9!=t.which&&(val=d(this).val(),13!=t.which&&(!1,""!=val?(html="",d("select option",c).prop("selected",!1),d("select option",c).each(function(t,e){var i,o=d(this).data("country"),n=d(this).text(),s=n.split("||");if(s=s[0],0<(i=val,n.replace(new RegExp(i+"(?!([^<]+)?>)","gi"),'<span class="highlight">$&</span>')).indexOf("</span>")){var a=d(this).parent("select").attr("data-current-country");void 0!==a&&""!=a?o==a&&(html+='<div data-text="'+n+'" data-country="'+o+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+s+'<i class="fa fa-planer"></i></a></div>'):html+='<div data-text="'+n+'" data-country="'+o+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+s+'<i class="fa fa-plane"></i></a></div>'}}),d(".option-wrapper1").html(html).show(),r.caculatePosition(d(".option-wrapper1"),r)):(html="",d("select option",c).prop("selected",!1),d("select option",c).each(function(t,e){var i=d(this).data("country"),o=d(this).text(),n=o.split("||");if(n=n[0],""!=o){var s=d(this).parent("select").attr("data-current-country");void 0!==s&&""!=s?i==s&&(html+='<div data-text="'+o+'" data-country="'+i+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+n+'<i class="fa fa-plane"></i></a></div>'):html+='<div data-text="'+o+'" data-country="'+i+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+n+'<i class="fa fa-plane"></i></a></div>'}}),d(".option-wrapper1").html(html).show(),r.caculatePosition(d(".option-wrapper1",c),r))),13==t.which&&val,void 0!==r.data("children")&&""!=r.data("children")&&(name=r.data("children"),d('select[name="'+name+'"]',o).attr("data-current-country",""),d('input[name="drop-off"]',o).val(""),d('select[name="'+name+'"] option',o).prop("selected",!1)))}),r.keydown(function(t){if(h=r,13==t.which){var e=h.closest("form");return d(".option-wrapper1").html("").hide(),r.focusNextInputField(),!1}if(9==t.which){e=h.closest("form");return d(".option-wrapper1").html("").hide(),r.focusNextInputField(),!1}if(40==t.which||38==t.which){if(40===t.which){var i=d(".option-wrapper1 .option.active").index();a?(a.removeClass("active"),next=a.next(),0<next.length?a=next.addClass("active"):0<d(".option-wrapper1 .option.active").length?(d(".st-option-wrapper1 .option").eq(i).removeClass("active"),a=d(".option-wrapper1 .option").length-1==i?d(".st-option-wrapper1 .option").eq(0).addClass("active"):d(".st-option-wrapper1 .option").eq(i+1).addClass("active")):a=d(".st-option-wrapper1 .option").eq(0).addClass("active")):a=d(".st-option-wrapper1 .option").eq(0).addClass("active")}else if(38===t.which){i=d(".option-wrapper1 .option.active").index();a?(a.removeClass("active"),next=a.prev(),0<next.length?a=next.addClass("active"):0<d(".option-wrapper1 .option.active").length?(d(".st-option-wrapper1 .option").eq(i).removeClass("active"),a=d(".st-option-wrapper1 .option").eq(i-1).addClass("active")):a=d(".st-option-wrapper1 .option").last().addClass("active")):a=d(".st-option-wrapper1 .option").last().addClass("active")}d(".option-wrapper1").scrollTo(d(".option-wrapper1 .option.active"),400),t.preventDefault(),!0;var o=d(".option-wrapper1 .option.active").data("value"),n=d(".option-wrapper1 .option.active").text(),s=d(".option-wrapper1 .option.active").data("country");r.val(n),d('select option[value="'+o+'"]',c).prop("selected",!0),void 0!==r.data("children")&&""!=r.data("children")&&(name=r.data("children"),d('select[name="'+name+'"]',e).attr("data-current-country",s))}}),r.blur(function(t){"clear"==r.data("clear")&&""==d("select option:selected",c).val()&&r.val("")}),r.on("focus",function(t){if(""==(h=r).val())if(html="",d("select option",c).prop("selected",!1),d("select option",c).each(function(t,e){var i=d(this).data("country"),o=d(this).text(),n=o.split("||");if(n=n[0],""!=o){var s=d(this).parent("select").attr("data-current-country");void 0!==s&&""!=s?i==s&&(html+='<div data-text="'+o+'" data-country="'+i+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+n+'<i class="fa fa-plane"></i></a></div>'):html+='<div data-text="'+o+'" data-country="'+i+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+n+'<i class="fa fa-plane"></i></a></div>'}}),void 0!==r.data("parent")&&""!=r.data("parent")){if(name=r.data("parent"),d('select[name="'+name+'"]',o).length){var e=d('select[name="'+name+'"]',o).parent().find("input.st-flight-location-name").val();void 0===e||""==e?(r.val(""),d('select[name="'+name+'"]',o).parent().find("input.st-flight-location-name").focus()):d(".st-flight-location").html(html).show()}}else d(".st-flight-location").html(html).show();r.caculatePosition()}),d(document).on("click",".option-wrapper1 .option",function(t){if(0<h.length){var e=h.closest("form"),i=h.closest(".st-select-wrapper");h.hasClass("destination")&&setTimeout(function(){void 0!==e.find('input[name="start"]').attr("value")&&(e.find('input[name="start"]').attr("value").length<=0&&e.find('input[name="start"]').datepicker("show"))},100),t.preventDefault(),!0;var o=d(this).data("value"),n=d(this).text(),s=d(this).data("country");""!=n&&(h.val(n),d('select option[value="'+o+'"]',i).prop("selected",!0),d(".option-wrapper1").html("").hide(),void 0!==r.data("children")&&""!=r.data("children")&&(name=r.data("children"),d('select[name="'+name+'"]',e).attr("data-current-country",s)))}}),d(document).click(function(t){d(t.target).is(".st-flight-location-name")||d(".option-wrapper1").html("").hide()}),r.caculatePosition=function(){if(h&&h.length){var t=d(".option-wrapper1"),e=h,i=c.offset(),o=i.top+c.height(),n=i.left,s=e.outerWidth(),a=0;a=d("#wpadminbar").length&&783<=d(window).width()?d("#wpadminbar").height():0,d("body").hasClass("boxed")&&(n-=d("body").offset().left),o-=a;var r=99999,l="absolute";d("#search-dialog").length&&(l="fixed",o=o+a-d(window).scrollTop(),r=99999),t.css({position:l,top:o,left:n,width:s,"z-index":r})}},d(window).resize(function(){r.caculatePosition()}),o.submit(function(t){if(""==r.val()&&r.hasClass("required"))return r.focus(),!1;if(d("input.required-field").length&&1==d("input.required-field").prop("checked")){var e=d('select[name="location_id_pick_up"] option:selected',o).val(),i=d('input[name="pick-up"]',o).val();d('select[name="location_id_drop_off"] option[value="'+e+'"]',o).prop("selected",!0),d('input[name="drop-off"]',o).val(i)}return d("input.required-field").length&&0==d("input.required-field").prop("checked")&&""==d('input[name="drop-off"]',o).val()?(d('input[name="drop-off"]',o).focus(),d('select[name="location_id_drop_off"] option',o).prop("selected",!1),!1):void 0})}),d.fn.focusNextInputField=function(){return this.each(function(){var t=d(this).parents("form:eq(0),body").find("button:visible,input:visible,textarea:visible,select:visible"),e=t.index(this);return-1<e&&e+1<t.length&&t.eq(e+1).focus(),!1})}}),jQuery(document).ready(function(d){"use strict";var h=!1;function l(t,e){return t.replace(new RegExp(e+"(?!([^<]+)?>)","gi"),'<span class="highlight">$&</span>')}d(".tp-flight-location").each(function(){var o=d(this),c=o.closest(".tp-flight-wrapper");d(this).keyup(function(t){h=o,c.find(".st-location-id").remove();var e=o.attr("data-name"),i=o.attr("data-locale"),r=o.val();2<=r.length&&d.getJSON("https://autocomplete.travelpayouts.com/jravia?locale="+i+"&with_countries=false&q="+r,function(t){if("object"==typeof t){var a="";a+='<select name="'+e+'" class="st-location-id st-hidden" tabindex="-1">',d.each(t,function(t,e){var i="";null!=e.name&&(i="("+e.name+")"),a+='<option value="'+e.code+'">'+e.city_fullname+" "+i+" - "+e.code+"</option>"}),a+="</select>",c.find(".st-location-id").remove(),c.append(a),a="",d("select option",c).prop("selected",!1),d("select option",c).each(function(t,e){var i=d(this).data("country"),o=d(this).text(),n=o.split("||");if(n=n[0],0<=l(o,r).indexOf("</span>")){var s=d(this).parent("select").attr("data-current-country");void 0!==s&&""!=s?i==s&&(a+='<div data-text="'+o+'" data-country="'+i+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+n+' <i class="fa fa-plane"></i></a></div>'):a+='<div data-text="'+o+'" data-country="'+i+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+n+' <i class="fa fa-plane"></i></a></div>'}}),d(".option-wrapper").html(a).show(),o.caculatePosition(d(".option-wrapper"),o)}})}),o.caculatePosition=function(){if(h&&h.length){var t=d(".option-wrapper"),e=h,i=c.offset(),o=i.top+c.height(),n=i.left,s=e.outerWidth(),a=0;o-=a=d("#wpadminbar").length&&783<=d(window).width()?d("#wpadminbar").height():0;var r=99999,l="absolute";d("#search-dialog").length&&(l="fixed",o=o+a-d(window).scrollTop(),r=99999),t.css({position:l,top:o,left:n,width:s,"z-index":r})}},d(window).resize(function(){o.caculatePosition()})});var o="";d(".input-daterange .tp_depart_date").each(function(){var n=d(this).closest("form"),s=d(this).parent();d(this);d(this).datepicker({language:st_params.locale,autoclose:!0,todayHighlight:!0,startDate:"today",format:s.data("tp-date-format"),weekStart:1}).on("changeDate",function(t){var e=t.date.getMonth()+1;t.date.getMonth()+1<10&&(e="0"+e);var i=t.date.getDate();t.date.getDate()<10&&(i="0"+i),d(this).parent().find(".tp-date-from").val(t.date.getFullYear()+"-"+e+"-"+i);var o=t.date;o.setDate(o.getDate()+1),d(".input-daterange .tp_return_date",n).datepicker("remove"),d(".input-daterange .tp_return_date",n).datepicker({language:st_params.locale,startDate:"+1d",format:s.data("tp-date-format"),autoclose:!0,todayHighlight:!0,weekStart:1}),d(".input-daterange .tp_return_date",n).datepicker("setDates",o),d(".input-daterange .tp_return_date",n).datepicker("setStartDate",o),a()}),d(".input-daterange .tp_return_date",n).datepicker({language:st_params.locale,startDate:"+1d",format:s.data("tp-date-format"),autoclose:!0,todayHighlight:!0,weekStart:1}).on("changeDate",function(t){var e=t.date.getMonth()+1;t.date.getMonth()+1<10&&(e="0"+e);var i=t.date.getDate();t.date.getDate()<10&&(i="0"+i),o=t.date.getFullYear()+"-"+e+"-"+i,d(this).parent().find(".tp-date-to").val(o);d(".input-daterange-return").append('<i class="fa fa-times tp-icon-return-del"></i>'),a()})}),d(document).on("click",".tp-icon-return-del",function(){d(".input-daterange .tp_return_date").val(""),d("input.tp-date-to").val(""),d(this).remove(),a()}),d(".form-passengers-class .tp_group_display").click(function(){d(this).parent().find(".tp-form-passengers-class").toggleClass("none"),d(this).find(".fa").toggleClass("fa-chevron-up"),d(this).find(".fa").toggleClass("fa-chevron-down")}),d(".tp-checkbox-class .checkbox-class").on("ifChecked",function(t){d(".tp-checkbox-class input[name=trip_class]").val("1");var e=d(".form-passengers-class .display-class").data("business");d(".form-passengers-class .display-class").text(e)}),d(".tp-checkbox-class .checkbox-class").on("ifUnchecked",function(t){d(".tp-checkbox-class input[name=trip_class]").val("0");var e=d(".form-passengers-class .display-class").data("economy");d(".form-passengers-class .display-class").text(e)}),d(document).on("keyup mouseup",".passengers-class input[name=adults]",function(){if(""==d(this).val());else{var t=d(".twidget-age-group input[name=infants]").val();""==t&&(t=0);var e=d(".twidget-age-group input[name=children]").val();""==e&&(e=0);var i=parseInt(t)+parseInt(e)+parseInt(d(this).val());if(9<i){var o=9-(parseInt(t)+parseInt(e));d(this).val(o),d(".tp-form-passengers-class .notice").fadeIn()}else d(".tp_group_display .quantity-passengers").text(i),d(".tp-form-passengers-class .notice").fadeOut()}}),d(document).on("keyup mouseup",".passengers-class input[name=children]",function(){if(""==d(this).val());else{var t=d(".twidget-age-group input[name=infants]").val();""==t&&(t=0);var e=d(".twidget-age-group input[name=adults]").val();""==e&&(e=0);var i=parseInt(t)+parseInt(e)+parseInt(d(this).val());if(9<i){var o=9-(parseInt(t)+parseInt(e));d(this).val(o),d(".tp-form-passengers-class .notice").fadeIn()}else d(".tp_group_display .quantity-passengers").text(i),d(".tp-form-passengers-class .notice").fadeOut()}}),d(document).on("keyup mouseup",".passengers-class input[name=infants]",function(){if(""==d(this).val());else{var t=d(".twidget-age-group input[name=adults]").val();""==t&&(t=0);var e=d(".twidget-age-group input[name=children]").val();""==e&&(e=0);var i=parseInt(t)+parseInt(e)+parseInt(d(this).val());if(9<i){var o=9-(parseInt(e)+parseInt(t));d(this).val(o),d(".tp-form-passengers-class .notice").fadeIn()}else d(".tp_group_display .quantity-passengers").text(i),d(".tp-form-passengers-class .notice").fadeOut()}}),d(document).on("focusout",".passengers-class input[name=adults]",function(){""!=d(this).val()&&0!=d(this).val()||d(this).val(1)}),d(document).on("focusout",".passengers-class input[name=children], .passengers-class input[name=infants]",function(){""==d(this).val()&&d(this).val(0)});h=!1;d(".tp-hotel-destination").each(function(){var o=d(this),c=o.closest(".tp-hotel-wrapper");d(this).keyup(function(t){h=o,c.find(".st-location-id").remove();var e=o.attr("data-name"),i=o.attr("data-locale"),s=o.val();2<=s.length&&d.getJSON("https://engine.hotellook.com/api/v2/lookup.json?query="+s+"&lang="+i+"&limit=5",function(t){if("object"==typeof t){var n="";n+='<select name="'+e+'" class="st-location-id st-hidden" tabindex="-1">',d.each(t.results.locations,function(t,e){n+='<option data-type="location" value="'+e.id+'">'+e.fullName+" - "+e.hotelsCount+" "+o.attr("data-text")+"</option>"}),d.each(t.results.hotels,function(t,e){n+='<option data-type="hotel" value="'+e.id+'">'+e.fullName+"</option>"}),n+="</select>",c.find(".st-location-id").remove(),c.append(n),n="",d("select option",c).prop("selected",!1),d("select option",c).each(function(t,e){d(this).data("country");var i=d(this).text(),o=i.split("||");o=o[0],0<=l(i,s).indexOf("</span>")&&("location"==d(this).data("type")?n+='<div data-text="'+i+'" data-value="'+d(this).val()+'" class="option1"><span class="label"><a href="#">'+o+'<i class="fa fa-map-marker"></i></a></div>':n+='<div data-text="'+i+'" data-value="'+d(this).val()+'" class="option1"><span class="label"><a href="#">'+o+'<i class="fa fa-building"></i></a></div>')}),d(".option-wrapper").html(n).show(),o.caculatePosition(d(".option-wrapper"),o)}})}),d(document).on("click",".option-wrapper .option1",function(t){if(0<h.length){var e=h.closest(".st-select-wrapper");t.preventDefault();var i=d(this).data("value"),o=d(this).text();""!=o&&(h.val(o),d('select option[value="'+i+'"]',e).prop("selected",!0),d(".option-wrapper").html("").hide())}}),o.caculatePosition=function(){if(h&&h.length){var t=d(".option-wrapper"),e=h,i=c.offset(),o=i.top+c.height(),n=i.left,s=e.outerWidth(),a=0;o-=a=d("#wpadminbar").length&&783<=d(window).width()?d("#wpadminbar").height():0;var r=99999,l="absolute";d("#search-dialog").length&&(l="fixed",o=o+a-d(window).scrollTop(),r=99999),t.css({position:l,top:o,left:n,width:s,"z-index":r})}},d(window).resize(function(){o.caculatePosition()})}),d(document).on("keyup mouseup",".guests input[name=adults]",function(){if(""==d(this).val());else{var t=d(".guests .children").val();if(4<parseInt(d(this).val()))d(this).val(4),d(this).closest(".tp-form-passengers-class").find(".notice").fadeIn();else{var e=parseInt(d(this).val());"number"!=typeof e&&(e=1);var i=parseInt(t)+e;d(".tp_guests_field .quantity-guests").text(i),d(this).closest(".tp-form-passengers-class").find(".notice").fadeOut()}}});var n=0;d(document).on("keyup mouseup",".guests input.children",function(){if(""==d(this).val())n=0,d(".tp-children-group").empty();else{var t=d(".guests input[name=adults]").val();if(3<parseInt(d(this).val())){d(this).val(0),d(this).closest(".tp-form-passengers-class").find(".notice").fadeIn(),n=0,d(".tp-children-group").empty();var e=parseInt(t);d(".tp_guests_field .quantity-guests").text(e)}else{e=parseInt(t)+parseInt(d(this).val());if(d(".tp_guests_field .quantity-guests").text(e),d(this).closest(".tp-form-passengers-class").find(".notice").fadeOut(),n>parseInt(d(this).val()))for(var i=n;i>parseInt(d(this).val());i--)d(".tp-children-group").find(".children-input-"+(i-1)).remove();if(n<parseInt(d(this).val()))for(i=n;i<parseInt(d(this).val());i++){var o='<div class="children-input-'+i+'"><label>'+d(this).data("text")+" "+(i+1)+')</label><span><input type="number" class="" name="children['+i+']" value="7" max="17" min="0"></span></div>';d(".tp-children-group").append(o)}n=parseInt(d(this).val())}}});h=!1;function a(){var t=d(".skyscanner-search-flights-data").data("locale"),e="http://partners.api.skyscanner.net/apiservices/referral/v1.0/"+d(".skyscanner-search-flights-data").data("country")+"/"+d(".skyscanner-search-flights-data").data("currency")+"/"+t+"/",i=d("#ss_location_origin").attr("data-value"),o=d("#ss_location_destination").attr("data-value"),n=d(".tp-date-from.ss_depart").attr("value"),s="";null!=d(".tp-date-to.ss_return").attr("value")&&(s="/"+d(".tp-date-to.ss_return").attr("value"));d(".skyscanner-search-flights-data").data("api");var a=e+i+"/"+o+"/"+n+s;d(".ss-search-flights-link").attr("action",a)}d(".ss-flight-location").each(function(){var o=d(this),c=o.closest(".ss-flight-wrapper");d(this).keyup(function(t){h=o,c.find(".st-location-id").remove();var e=d(".skyscanner-search-flights-data").data("locale"),s=(o.attr("data-name"),o.val());if(2<=s.length){var i="https://autocomplete.travelpayouts.com/jravia?locale="+e.split("-")[0]+"&with_countries=false&q="+s;d.getJSON(i,function(t){if("object"==typeof t&&"object"==typeof t){var n="";n+='<select class="st-location-id st-hidden" tabindex="-1">',d.each(t,function(t,e){var i=e.name;null==e.name&&(i=e.title),n+='<option value="'+e.code+'">'+e.city_fullname+" ("+i+") - "+e.code+"</option>"}),n+="</select>",c.find(".st-location-id").remove(),c.append(n),n="",d("select option",c).prop("selected",!1),d("select option",c).each(function(t,e){d(this).data("country");var i=d(this).text(),o=i.split("||");o=o[0],0<=l(i,s).indexOf("</span>")&&(n+='<div data-text="'+i+'" data-value="'+d(this).val()+'" class="option2"><span class="label"><a href="#">'+o+"</a></div>")}),d(".option-wrapper").html(n).show(),o.caculatePosition(d(".option-wrapper"),o)}})}}),d(document).on("click",".option-wrapper .option2",function(t){if(0<h.length){var e=h.closest(".st-select-wrapper");t.preventDefault();var i=d(this).data("value"),o=d(this).text();""!=o&&(h.val(o),h.attr("data-value",d(this).data("value")),d('select option[value="'+i+'"]',e).prop("selected",!0),d(".option-wrapper").html("").hide(),a())}}),o.caculatePosition=function(){if(h&&h.length){var t=d(".option-wrapper"),e=h,i=c.offset(),o=i.top+c.height(),n=i.left,s=e.outerWidth(),a=0;o-=a=d("#wpadminbar").length&&783<=d(window).width()?d("#wpadminbar").height():0;var r=99999,l="absolute";d("#search-dialog").length&&(l="fixed",o=o+a-d(window).scrollTop(),r=99999),t.css({position:l,top:o,left:n,width:s,"z-index":r})}},d(window).resize(function(){o.caculatePosition()})}),jQuery(function(u){u(document).ready(function(){u(document).on("click",".btn-tp-search-flights",function(t){t.preventDefault();var e=u(this).closest("form"),i=!1;u("input",e).each(function(){u(this).prop("required")&&(""==u(this).val()?(i=!0,u(this).addClass("error")):u(this).removeClass("error"))});var o="marker="+e.find('input[name="marker"]').val()+"&origin_iata="+e.find('select[name="origin_iata"] option:selected').val()+"&destination_iata="+e.find('select[name="destination_iata"] option:selected').val()+"&depart_date="+e.find('input[name="depart_date"]').val()+"&return_date="+e.find('input[name="return_date"]').val()+"&adults="+e.find('input[name="adults"]').val()+"&children="+e.find('input[name="children"]').val()+"&infants="+e.find('input[name="infants"]').val()+"&trip_class="+e.find('input[name="trip_class"]').val()+"&with_request="+e.find('input[name="with_request"]').val(),n=u("#current_url").val();console.log(n+"?"+o),i||(window.location.href=n+"?"+o)}),u(document).on("click",".btn-tp-search-hotels",function(t){t.preventDefault();var e=u(this).closest("form"),i=!1;""==u("#location_destination_h").val()?(i=!0,u("#location_destination_h").addClass("error")):(i=!1,u("#location_destination_h").removeClass("error"));var o=e.find('input[name="marker"]').val(),n=e.find('select[name="destination"] option:selected').val(),s=e.find('input[name="checkIn"]').val(),a=e.find('input[name="checkOut"]').val(),r=e.find('input[name="adults"]').val();if(0<u('input[name="children[0]"]').length)var l=e.find('input[name="children[0]"]').val();if(0<u('input[name="children[1]"]').length)var c=e.find('input[name="children[1]"]').val();if(0<u('input[name="children[2]"]').length)var d=e.find('input[name="children[2]"]').val();var h="marker="+o+"&destination="+n+"&checkIn="+s+"&checkOut="+a+"&adults="+r;null!=l&&(h+="&children%5B0%5D="+l),null!=c&&(h+="&children%5B1%5D="+l),null!=d&&(h+="&children%5B2%5D="+l);var p=u("#current_url_hotel").val();i||(window.location.href=p+"/hotels/?"+h)})})})}),function(b){"use strict";b.expr[":"].icontains=function(t,e,i){return 0<=b(t).text().toUpperCase().indexOf(i[3].toUpperCase())};var c=function(t,e,i){i&&(i.stopPropagation(),i.preventDefault()),this.$element=b(t),this.$newElement=null,this.$button=null,this.$menu=null,this.$lis=null,this.options=b.extend({},b.fn.selectpicker.defaults,this.$element.data(),"object"==typeof e&&e),null===this.options.title&&(this.options.title=this.$element.attr("title")),this.val=c.prototype.val,this.render=c.prototype.render,this.refresh=c.prototype.refresh,this.setStyle=c.prototype.setStyle,this.selectAll=c.prototype.selectAll,this.deselectAll=c.prototype.deselectAll,this.init()};c.prototype={constructor:c,init:function(){var e=this,t=this.$element.attr("id");this.$element.hide(),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement),this.$menu=this.$newElement.find("> .dropdown-menu"),this.$button=this.$newElement.find("> button"),this.$searchbox=this.$newElement.find("input"),void 0!==t&&(this.$button.attr("data-id",t),b('label[for="'+t+'"]').click(function(t){t.preventDefault(),e.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.liHeight(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this)},createDropdown:function(){var t=this.multiple?" show-tick":"",e=this.$element.parent().hasClass("input-group")?" input-group-btn":"",i=this.autofocus?" autofocus":"",o=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;</button>'+this.options.header+"</div>":"",n=this.options.liveSearch?'<div class="bootstrap-select-searchbox"><input type="text" class="input-block-level form-control" /></div>':"",s=this.options.actionsBox?'<div class="bs-actionsbox"><div class="btn-group btn-block"><button class="actions-btn bs-select-all btn btn-sm btn-default">Select All</button><button class="actions-btn bs-deselect-all btn btn-sm btn-default">Deselect All</button></div></div>':"";return b('<div class="btn-group bootstrap-select'+t+e+'"><button type="button" class="btn dropdown-toggle selectpicker" data-toggle="dropdown"'+i+'><span class="filter-option pull-left"></span>&nbsp;<span class="caret"></span></button><div class="dropdown-menu open">'+o+n+s+'<ul class="dropdown-menu inner selectpicker" role="menu"></ul></div></div>')},createView:function(){var t=this.createDropdown(),e=this.createLi();return t.find("ul").append(e),t},reloadLi:function(){this.destroyLi();var t=this.createLi();this.$menu.find("ul").append(t)},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var l=this,c=[],i="";return this.$element.find("option").each(function(){var t=b(this),e=t.attr("class")||"",i=t.attr("style")||"",o=t.data("content")?t.data("content"):t.html(),n=void 0!==t.data("subtext")?'<small class="muted text-muted">'+t.data("subtext")+"</small>":"",s=void 0!==t.data("icon")?'<i class="'+l.options.iconBase+" "+t.data("icon")+'"></i> ':"";if(""!==s&&(t.is(":disabled")||t.parent().is(":disabled"))&&(s="<span>"+s+"</span>"),t.data("content")||(o=s+'<span class="text">'+o+n+"</span>"),l.options.hideDisabled&&(t.is(":disabled")||t.parent().is(":disabled")))c.push('<a style="min-height: 0; padding: 0"></a>');else if(t.parent().is("optgroup")&&!0!==t.data("divider"))if(0===t.index()){var a=t.parent().attr("label"),r=void 0!==t.parent().data("subtext")?'<small class="muted text-muted">'+t.parent().data("subtext")+"</small>":"";a=(t.parent().data("icon")?'<i class="'+t.parent().data("icon")+'"></i> ':"")+'<span class="text">'+a+r+"</span>",0!==t[0].index?c.push('<div class="div-contain"><div class="divider"></div></div><dt>'+a+"</dt>"+l.createA(o,"opt "+e,i)):c.push("<dt>"+a+"</dt>"+l.createA(o,"opt "+e,i))}else c.push(l.createA(o,"opt "+e,i));else!0===t.data("divider")?c.push('<div class="div-contain"><div class="divider"></div></div>'):!0===b(this).data("hidden")?c.push("<a></a>"):c.push(l.createA(o,e,i))}),b.each(c,function(t,e){i+='<li rel="'+t+'"'+("<a></a>"===e?'class="hide is-hidden"':"")+">"+e+"</li>"}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),b(i)},createA:function(t,e,i){return'<a tabindex="0" class="'+e+'" style="'+i+'">'+t+'<i class="'+this.options.iconBase+" "+this.options.tickIcon+' icon-ok check-mark"></i></a>'},render:function(t){var o=this;!1!==t&&this.$element.find("option").each(function(t){o.setDisabled(t,b(this).is(":disabled")||b(this).parent().is(":disabled")),o.setSelected(t,b(this).is(":selected"))}),this.tabIndex();var e=this.$element.find("option:selected").map(function(){var t,e=b(this),i=e.data("icon")&&o.options.showIcon?'<i class="'+o.options.iconBase+" "+e.data("icon")+'"></i> ':"";return t=o.options.showSubtext&&e.attr("data-subtext")&&!o.multiple?' <small class="muted text-muted">'+e.data("subtext")+"</small>":"",e.data("content")&&o.options.showContent?e.data("content"):void 0!==e.attr("title")?e.attr("title"):i+e.html()+t}).toArray(),i=this.multiple?e.join(this.options.multipleSeparator):e[0];if(this.multiple&&-1<this.options.selectedTextFormat.indexOf("count")){var n=this.options.selectedTextFormat.split(">"),s=this.options.hideDisabled?":not([disabled])":"";(1<n.length&&e.length>n[1]||1==n.length&&2<=e.length)&&(i=this.options.countSelectedText.replace("{0}",e.length).replace("{1}",this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+s).length))}this.options.title=this.$element.attr("title"),i||(i=void 0!==this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",b.trim(i)),this.$newElement.find(".filter-option").html(i)},setStyle:function(t,e){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device/gi,""));var i=t||this.options.style;"add"==e?this.$button.addClass(i):"remove"==e?this.$button.removeClass(i):(this.$button.removeClass(this.options.style),this.$button.addClass(i))},liHeight:function(){if(!1!==this.options.size){var t=this.$menu.parent().clone().find("> .dropdown-toggle").prop("autofocus",!1).end().appendTo("body"),e=t.addClass("open").find("> .dropdown-menu"),i=e.find("li > a").outerHeight(),o=this.options.header?e.find(".popover-title").outerHeight():0,n=this.options.liveSearch?e.find(".bootstrap-select-searchbox").outerHeight():0,s=this.options.actionsBox?e.find(".bs-actionsbox").outerHeight():0;t.remove(),this.$newElement.data("liHeight",i).data("headerHeight",o).data("searchHeight",n).data("actionsHeight",s)}},setSize:function(){var i,o,n,s=this,a=this.$menu,r=a.find(".inner"),t=this.$newElement.outerHeight(),l=this.$newElement.data("liHeight"),c=this.$newElement.data("headerHeight"),d=this.$newElement.data("searchHeight"),h=this.$newElement.data("actionsHeight"),e=a.find("li .divider").outerHeight(!0),p=parseInt(a.css("padding-top"))+parseInt(a.css("padding-bottom"))+parseInt(a.css("border-top-width"))+parseInt(a.css("border-bottom-width")),u=this.options.hideDisabled?":not(.disabled)":"",f=b(window),m=p+parseInt(a.css("margin-top"))+parseInt(a.css("margin-bottom"))+2,g=function(){o=s.$newElement.offset().top-f.scrollTop(),n=f.height()-o-t};if(g(),this.options.header&&a.css("padding-top",0),"auto"==this.options.size){var v=function(){var t,e=s.$lis.not(".hide");g(),i=n-m,s.options.dropupAuto&&s.$newElement.toggleClass("dropup",n<o&&i-m<a.height()),s.$newElement.hasClass("dropup")&&(i=o-m),t=3<e.length+e.find("dt").length?3*l+m-2:0,a.css({"max-height":i+"px",overflow:"hidden","min-height":t+c+d+h+"px"}),r.css({"max-height":i-c-d-h-p+"px","overflow-y":"auto","min-height":Math.max(t-p,0)+"px"})};v(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",v),b(window).off("resize.getSize").on("resize.getSize",v),b(window).off("scroll.getSize").on("scroll.getSize",v)}else if(this.options.size&&"auto"!=this.options.size&&a.find("li"+u).length>this.options.size){var _=a.find("li"+u+" > *").filter(":not(.div-contain)").slice(0,this.options.size).last().parent().index(),y=a.find("li").slice(0,_+1).find(".div-contain").length;i=l*this.options.size+y*e+p,s.options.dropupAuto&&this.$newElement.toggleClass("dropup",n<o&&i<a.height()),a.css({"max-height":i+c+d+h+"px",overflow:"hidden"}),r.css({"max-height":i-p+"px","overflow-y":"auto"})}},setWidth:function(){if("auto"==this.options.width){this.$menu.css("min-width","0");var t=this.$newElement.clone().appendTo("body"),e=t.find("> .dropdown-menu").css("width"),i=t.css("width","auto").find("> button").css("width");t.remove(),this.$newElement.css("width",Math.max(parseInt(e),parseInt(i))+"px")}else"fit"==this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){var e,i,o=this,n=b("<div />"),t=function(t){n.addClass(t.attr("class").replace(/form-control/gi,"")).toggleClass("dropup",t.hasClass("dropup")),e=t.offset(),i=t.hasClass("dropup")?0:t[0].offsetHeight,n.css({top:e.top+i,left:e.left,width:t[0].offsetWidth,position:"absolute"})};this.$newElement.on("click",function(){o.isDisabled()||(t(b(this)),n.appendTo(o.options.container),n.toggleClass("open",!b(this).hasClass("open")),n.append(o.$menu))}),b(window).resize(function(){t(o.$newElement)}),b(window).on("scroll",function(){t(o.$newElement)}),b("html").on("click",function(t){b(t.target).closest(o.$newElement).length<1&&n.removeClass("open")})},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement),this.options.container&&this.$menu.hide()},refresh:function(){this.$lis=null,this.reloadLi(),this.render(),this.setWidth(),this.setStyle(),this.checkDisabled(),this.liHeight()},update:function(){this.reloadLi(),this.setWidth(),this.setStyle(),this.checkDisabled(),this.liHeight()},setSelected:function(t,e){null==this.$lis&&(this.$lis=this.$menu.find("li")),b(this.$lis[t]).toggleClass("selected",e)},setDisabled:function(t,e){null==this.$lis&&(this.$lis=this.$menu.find("li")),e?b(this.$lis[t]).addClass("disabled").find("a").attr("href","#").attr("tabindex",-1):b(this.$lis[t]).removeClass("disabled").find("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return this.$element.is(":disabled")},checkDisabled:function(){var t=this;this.isDisabled()?this.$button.addClass("disabled").attr("tabindex",-1):(this.$button.hasClass("disabled")&&this.$button.removeClass("disabled"),-1==this.$button.attr("tabindex")&&(this.$element.data("tabindex")||this.$button.removeAttr("tabindex"))),this.$button.click(function(){return!t.isDisabled()})},tabIndex:function(){this.$element.is("[tabindex]")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")))},clickListener:function(){var g=this;b("body").on("touchstart.dropdown",".dropdown-menu",function(t){t.stopPropagation()}),this.$newElement.on("click",function(){g.setSize(),g.options.liveSearch||g.multiple||setTimeout(function(){g.$menu.find(".selected a").focus()},10)}),this.$menu.on("click","li a",function(t){var e=b(this).parent().index(),i=g.$element.val(),o=g.$element.prop("selectedIndex");if(g.multiple&&t.stopPropagation(),t.preventDefault(),!g.isDisabled()&&!b(this).parent().hasClass("disabled")){var n=g.$element.find("option"),s=n.eq(e),a=s.prop("selected"),r=s.parent("optgroup"),l=g.options.maxOptions,c=r.data("maxOptions")||!1;if(g.multiple){if(s.prop("selected",!a),g.setSelected(e,!a),!1!==l||!1!==c){var d=l<n.filter(":selected").length,h=c<r.find("option:selected").length,p=g.options.maxOptionsText,u=p[0].replace("{n}",l),f=p[1].replace("{n}",c),m=b('<div class="notify"></div>');(l&&d||c&&h)&&(p[2]&&(u=u.replace("{var}",p[2][1<l?0:1]),f=f.replace("{var}",p[2][1<c?0:1])),s.prop("selected",!1),g.$menu.append(m),l&&d&&(m.append(b("<div>"+u+"</div>")),g.$element.trigger("maxReached.bs.select")),c&&h&&(m.append(b("<div>"+f+"</div>")),g.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){g.setSelected(e,!1)},10),m.delay(750).fadeOut(300,function(){b(this).remove()}))}}else n.prop("selected",!1),s.prop("selected",!0),g.$menu.find(".selected").removeClass("selected"),g.setSelected(e,!0);g.multiple?g.options.liveSearch&&g.$searchbox.focus():g.$button.focus(),(i!=g.$element.val()&&g.multiple||o!=g.$element.prop("selectedIndex")&&!g.multiple)&&g.$element.change()}}),this.$menu.on("click","li.disabled a, li dt, li .div-contain, .popover-title, .popover-title :not(.close)",function(t){t.target==this&&(t.preventDefault(),t.stopPropagation(),g.options.liveSearch?g.$searchbox.focus():g.$button.focus())}),this.$menu.on("click",".popover-title .close",function(){g.$button.focus()}),this.$searchbox.on("click",function(t){t.stopPropagation()}),this.$menu.on("click",".actions-btn",function(t){g.options.liveSearch?g.$searchbox.focus():g.$button.focus(),t.preventDefault(),t.stopPropagation(),b(this).is(".bs-select-all")?g.selectAll():g.deselectAll(),g.$element.change()}),this.$element.change(function(){g.render(!1)})},liveSearchListener:function(){var e=this,t=b('<li class="no-results"></li>');this.$newElement.on("click.dropdown.data-api",function(){e.$menu.find(".active").removeClass("active"),e.$searchbox.val()&&(e.$searchbox.val(""),e.$lis.not(".is-hidden").removeClass("hide"),t.parent().length&&t.remove()),e.multiple||e.$menu.find(".selected").addClass("active"),setTimeout(function(){e.$searchbox.focus()},10)}),this.$searchbox.on("input propertychange",function(){e.$searchbox.val()?(e.$lis.not(".is-hidden").removeClass("hide").find("a").not(":icontains("+e.$searchbox.val()+")").parent().addClass("hide"),e.$menu.find("li").filter(":visible:not(.no-results)").length?t.parent().length&&t.remove():(t.parent().length&&t.remove(),t.html(e.options.noneResultsText+' "'+e.$searchbox.val()+'"').show(),e.$menu.find("li").last().after(t))):(e.$lis.not(".is-hidden").removeClass("hide"),t.parent().length&&t.remove()),e.$menu.find("li.active").removeClass("active"),e.$menu.find("li").filter(":visible:not(.divider)").eq(0).addClass("active").find("a").focus(),b(this).focus()}),this.$menu.on("mouseenter","a",function(t){e.$menu.find(".active").removeClass("active"),b(t.currentTarget).parent().not(".disabled").addClass("active")}),this.$menu.on("mouseleave","a",function(){e.$menu.find(".active").removeClass("active")})},val:function(t){return void 0!==t?(this.$element.val(t),this.$element.change(),this.$element):this.$element.val()},selectAll:function(){null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$element.find("option:enabled").prop("selected",!0),b(this.$lis).filter(":not(.disabled)").addClass("selected"),this.render(!1)},deselectAll:function(){null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$element.find("option:enabled").prop("selected",!1),b(this.$lis).filter(":not(.disabled)").removeClass("selected"),this.render(!1)},keydown:function(t){var e,i,o,n,s,a,r,l,c,d,h,p,u={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(o=(e=b(this)).parent(),e.is("input")&&(o=e.parent().parent()),(d=o.data("this")).options.liveSearch&&(o=e.parent().parent()),d.options.container&&(o=d.$menu),i=b("[role=menu] li:not(.divider) a",o),!(p=d.$menu.parent().hasClass("open"))&&/([0-9]|[A-z])/.test(String.fromCharCode(t.keyCode))&&(d.options.container?d.$newElement.trigger("click"):(d.setSize(),d.$menu.parent().addClass("open"),p=d.$menu.parent().hasClass("open")),d.$searchbox.focus()),d.options.liveSearch&&(/(^9$|27)/.test(t.keyCode)&&p&&0===d.$menu.find(".active").length&&(t.preventDefault(),d.$menu.parent().removeClass("open"),d.$button.focus()),i=b("[role=menu] li:not(.divider):visible",o),e.val()||/(38|40)/.test(t.keyCode)||0===i.filter(".active").length&&(i=d.$newElement.find("li").filter(":icontains("+u[t.keyCode]+")"))),i.length){if(/(38|40)/.test(t.keyCode))n=i.index(i.filter(":focus")),a=i.parent(":not(.disabled):visible").first().index(),r=i.parent(":not(.disabled):visible").last().index(),s=i.eq(n).parent().nextAll(":not(.disabled):visible").eq(0).index(),l=i.eq(n).parent().prevAll(":not(.disabled):visible").eq(0).index(),c=i.eq(s).parent().prevAll(":not(.disabled):visible").eq(0).index(),d.options.liveSearch&&(i.each(function(t){b(this).is(":not(.disabled)")&&b(this).data("index",t)}),n=i.index(i.filter(".active")),a=i.filter(":not(.disabled):visible").first().data("index"),r=i.filter(":not(.disabled):visible").last().data("index"),s=i.eq(n).nextAll(":not(.disabled):visible").eq(0).data("index"),l=i.eq(n).prevAll(":not(.disabled):visible").eq(0).data("index"),c=i.eq(s).prevAll(":not(.disabled):visible").eq(0).data("index")),h=e.data("prevIndex"),38==t.keyCode&&(d.options.liveSearch&&(n-=1),n!=c&&l<n&&(n=l),n<a&&(n=a),n==h&&(n=r)),40==t.keyCode&&(d.options.liveSearch&&(n+=1),-1==n&&(n=0),n!=c&&n<s&&(n=s),r<n&&(n=r),n==h&&(n=a)),e.data("prevIndex",n),d.options.liveSearch?(t.preventDefault(),e.is(".dropdown-toggle")||(i.removeClass("active"),i.eq(n).addClass("active").find("a").focus(),e.focus())):i.eq(n).focus();else if(!e.is("input")){var f,m=[];i.each(function(){b(this).parent().is(":not(.disabled)")&&b.trim(b(this).text().toLowerCase()).substring(0,1)==u[t.keyCode]&&m.push(b(this).parent().index())}),f=b(document).data("keycount"),f++,b(document).data("keycount",f),b.trim(b(":focus").text().toLowerCase()).substring(0,1)!=u[t.keyCode]?(f=1,b(document).data("keycount",f)):f>=m.length&&(b(document).data("keycount",0),f>m.length&&(f=1)),i.eq(m[f-1]).focus()}/(13|32|^9$)/.test(t.keyCode)&&p&&(/(32)/.test(t.keyCode)||t.preventDefault(),d.options.liveSearch?/(32)/.test(t.keyCode)||(d.$menu.find(".active a").click(),e.focus()):b(":focus").click(),b(document).data("keycount",0)),(/(^9$|27)/.test(t.keyCode)&&p&&(d.multiple||d.options.liveSearch)||/(27)/.test(t.keyCode)&&!p)&&(d.$menu.parent().removeClass("open"),d.$button.focus())}},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},destroy:function(){this.$newElement.remove(),this.$element.remove()}},b.fn.selectpicker=function(s,a){var r,l=arguments,t=this.each(function(){if(b(this).is("select")){var t=b(this),e=t.data("selectpicker"),i="object"==typeof s&&s;if(e){if(i)for(var o in i)e.options[o]=i[o]}else t.data("selectpicker",e=new c(this,i,a));if("string"==typeof s){var n=s;e[n]instanceof Function?([].shift.apply(l),r=e[n].apply(e,l)):r=e.options[n]}}});return void 0!==r?r:t},b.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Nothing selected",noneResultsText:"No results match",countSelectedText:"{0} of {1} selected",maxOptionsText:["Limit reached ({n} {var} max)","Group limit reached ({n} {var} max)",["items","item"]],width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,actionsBox:!1,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:!1},b(document).data("keycount",0).on("keydown",".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input",c.prototype.keydown).on("focusin.modal",".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input",function(t){t.stopPropagation()})}(window.jQuery),jQuery(document).ready(function(d){"use strict";var o="";d(".input-daterange .amd_depart_date").each(function(){var n=d(this).closest("form"),s=d(this).parent();d(this);d(this).datepicker({language:st_params.locale,autoclose:!0,todayHighlight:!0,startDate:"today",format:s.data("tp-date-format"),weekStart:1}).on("changeDate",function(t){var e=t.date.getMonth()+1;t.date.getMonth()+1<10&&(e="0"+e);var i=t.date.getDate();t.date.getDate()<10&&(i="0"+i),d(this).parent().find(".amd-date-from").val(t.date.getFullYear()+"-"+e+"-"+i);var o=t.date;o.setDate(o.getDate()+0),d(".input-daterange .amd_return_date",n).datepicker("remove"),d(".input-daterange .amd_return_date",n).datepicker({language:st_params.locale,startDate:"+0d",format:s.data("tp-date-format"),autoclose:!0,todayHighlight:!0,weekStart:1}),d(".input-daterange .amd_return_date",n).datepicker("setDates",o),d(".input-daterange .amd_return_date",n).datepicker("setStartDate",o)}),d(".input-daterange .amd_return_date",n).datepicker({language:st_params.locale,startDate:"+0d",format:s.data("tp-date-format"),autoclose:!0,todayHighlight:!0,weekStart:1}).on("changeDate",function(t){var e=t.date.getMonth()+1;t.date.getMonth()+1<10&&(e="0"+e);var i=t.date.getDate();t.date.getDate()<10&&(i="0"+i),o=t.date.getFullYear()+"-"+e+"-"+i,d(this).parent().find(".amd-date-to").val(o);d(".input-daterange-return .tp-icon-return-del").length&&d(".input-daterange-return .tp-icon-return-del").remove(),d(".input-daterange-return").append('<i class="fa fa-times tp-icon-return-del"></i>')})}),d(document).on("click",".tp-icon-return-del",function(){d(".input-daterange .amd_return_date").val(""),d("input.amd-date-to").val(""),d(this).remove()}),d(".amd-form-passengers .amd_group_display").click(function(){d(this).parent().find(".amd-form-passengers-class").toggleClass("none"),d(this).find(".fa").toggleClass("fa-chevron-up"),d(this).find(".fa").toggleClass("fa-chevron-down")}),d(document).on("keyup mouseup",".amd-passengers-class input[name=adults]",function(){var t=d(this).closest(".amd-passengers-class");if(""==d(this).val());else{var e=d("input[name=infants]",t).val();""==e&&(e=0);var i=d("input[name=children]",t).val();""==i&&(i=0);var o=parseInt(e)+parseInt(i)+parseInt(d(this).val());if(9<o){var n=9-(parseInt(e)+parseInt(i));d(this).val(n),d(".amd-form-passengers-class .notice").html(d(".amd-form-passengers-class .notice").data("maxup")).fadeIn()}else d(".amd_group_display .quantity-passengers").text(o),d(".amd-form-passengers-class .notice").html("").fadeOut()}}),d(document).on("keyup mouseup",".amd-passengers-class input[name=children]",function(){var t=d(this).closest(".amd-passengers-class");if(""==d(this).val());else{var e=d("input[name=infants]",t).val();""==e&&(e=0);var i=d("input[name=adults]",t).val();""==i&&(i=0);var o=parseInt(e)+parseInt(i)+parseInt(d(this).val());if(9<o){var n=9-(parseInt(e)+parseInt(i));d(this).val(n),d(".amd-form-passengers-class .notice").html(d(".amd-form-passengers-class .notice").data("maxup")).fadeIn()}else d(".amd_group_display .quantity-passengers").text(o),d(".amd-form-passengers-class .notice").html("").fadeOut()}}),d(document).on("keyup mouseup",".amd-passengers-class input[name=infants]",function(){var t=d(this).closest(".amd-passengers-class");if(""==d(this).val());else{var e=d("input[name=adults]",t).val();""==e&&(e=0);var i=d("input[name=children]",t).val();""==i&&(i=0);var o=parseInt(e)+parseInt(i)+parseInt(d(this).val());if(9<o){var n=9-(parseInt(i)+parseInt(e));d(this).val(n),d(".amd-form-passengers-class .notice").html(d(".amd-form-passengers-class .notice").data("maxup")).fadeIn()}else parseInt(d(this).val())>e?(d(this).val(e),d(".amd-form-passengers-class .notice").html(d(".amd-form-passengers-class .notice").data("maxinf")).fadeIn()):(d(".amd_group_display .quantity-passengers").text(o),d(".amd-form-passengers-class .notice").html("").fadeOut())}}),d(document).on("focusout",".amd-passengers-class input[name=adults]",function(){""!=d(this).val()&&0!=d(this).val()||d(this).val(1)}),d(document).on("focusout",".amd-passengers-class input[name=children], .amd-passengers-class input[name=infants]",function(){""==d(this).val()&&d(this).val(0)});var h=!1;d(".amd-flight-location").each(function(){var i=d(this),c=i.closest(".amd-flight-wrapper");d(this).keyup(function(t){h=i,c.find(".st-location-id").remove();var e=i.attr("data-name"),s=(i.attr("data-locale"),i.val());2<=s.length&&d.getJSON("https://api.sandbox.amadeus.com/v1.2/airports/autocomplete?apikey="+st_amadeus.apikey+"&term="+s,function(t){if("object"==typeof t){var n="";n+='<select name="'+e+'" class="st-location-id st-hidden" tabindex="-1">',d.each(t,function(t,e){var i="";null!=e.label&&(i=e.label),n+='<option value="'+e.value+'">'+i+"</option>"}),n+="</select>",c.find(".st-location-id").remove(),c.append(n),n="",d("select option",c).prop("selected",!1),d("select option",c).each(function(t,e){var i,o=d(this).text();0<=(i=s,o.replace(new RegExp(i+"(?!([^<]+)?>)","gi"),'<span class="highlight">$&</span>')).indexOf("</span>")&&(n+='<div data-text="'+o+'" data-value="'+d(this).val()+'" class="option"><span class="label"><a href="#">'+o+' <i class="fa fa-plane"></i></a></div>')}),d(".option-wrapper").html(n).show(),i.caculatePosition(d(".option-wrapper"),i)}})}),i.caculatePosition=function(){if(h&&h.length){var t=d(".option-wrapper"),e=h,i=c.offset(),o=i.top+c.height(),n=i.left,s=e.outerWidth(),a=0;o-=a=d("#wpadminbar").length&&783<=d(window).width()?d("#wpadminbar").height():0;var r=99999,l="absolute";d("#search-dialog").length&&(l="fixed",o=o+a-d(window).scrollTop(),r=99999),t.css({position:l,top:o,left:n,width:s,"z-index":r})}},d(window).resize(function(){i.caculatePosition()})}),jQuery(function(o){o(document).ready(function(){o(document).on("click","#tab-amadeus_aff_flight13 .btn-amd-search-flight",function(t){t.preventDefault();var e=o(this).closest("form"),i=!1;o("input",e).each(function(){o(this).prop("required")&&(""==o(this).val()?(i=!0,o(this).addClass("error")):o(this).removeClass("error"))}),0==o('.amd-passengers-class input[name="adults"]').val()&&0==o('.amd-passengers-class input[name="children"]').val()&&0==o('.amd-passengers-class input[name="infants"]').val()?(i=!0,o(".amd_group_display").addClass("error")):o(".amd_group_display").removeClass("error"),i||e.submit()})})})}),jQuery(document).ready(function(e){e(document).on("click",".wb-upload-fields .wb-upload-image",function(t){var i;t.preventDefault();var o=e(this).closest(".wb-upload-fields");(i=wp.media.frames.file_frame=wp.media({title:"Upload Image",button:{text:"Select"},multiple:!1})).on("select",function(){var t=i.state().get("selection").first().toJSON();if("string"==typeof t.url&&""!=t.url){o.find(".wb-load-image").empty();var e="";"image"==t.type?(o.find(".wb-load-image").removeClass("st-upload-media-type"),e='<img src="'+t.url+'" alt="" class="frontend-image img-responsive"><a class="delete" href="javascript:void(0);">&times;</a>'):"application"==t.type&&(e='<div class="st-media-upload">',e+='<span class="st-media-name">'+t.filename+" (<small>"+t.filesizeHumanReadable+"</small>)</span>",e+="</div>",e+='<a class="delete" href="javascript:void(0);">&times;</a>',o.find(".wb-load-image").addClass("st-upload-media-type")),o.find(".wb-load-image").append(e)}o.find(".wb-upload-image-save").val(t.id)}),i.open()}),e(document).on("click",".wb-load-image .delete",function(t){t.preventDefault(),e(this).closest(".wb-upload-fields").find(".wb-load-image").empty(),e(".wb-upload-fields .wb-upload-image-save").val("")})}),"function"!=typeof Object.create&&(Object.create=function(t){function e(){}return e.prototype=t,new e}),function(l,c,d){var i={init:function(t,e){this.$elem=l(e),this.options=l.extend({},l.fn.owlCarousel.options,this.$elem.data(),t),this.userOptions=t,this.loadContent()},loadContent:function(){var t,o=this;"function"==typeof o.options.beforeInit&&o.options.beforeInit.apply(this,[o.$elem]),"string"==typeof o.options.jsonPath?(t=o.options.jsonPath,l.getJSON(t,function(t){var e,i="";if("function"==typeof o.options.jsonSuccess)o.options.jsonSuccess.apply(this,[t]);else{for(e in t.owl)t.owl.hasOwnProperty(e)&&(i+=t.owl[e].item);o.$elem.html(i)}o.logIn()})):o.logIn()},logIn:function(){var t=this;t.$elem.data({"owl-originalStyles":t.$elem.attr("style"),"owl-originalClasses":t.$elem.attr("class")}),t.$elem.css({opacity:0}),t.orignalItems=t.options.items,t.checkBrowser(),t.wrapperWidth=0,t.checkVisible=null,t.setVars()},setVars:function(){var t=this;return 0!==t.$elem.children().length&&(t.baseClass(),t.eventTypes(),t.$userItems=t.$elem.children(),t.itemsAmount=t.$userItems.length,t.wrapItems(),t.$owlItems=t.$elem.find(".owl-item"),t.$owlWrapper=t.$elem.find(".owl-wrapper"),t.playDirection="next",t.prevItem=0,t.prevArr=[0],t.currentItem=0,t.customEvents(),void t.onStartup())},onStartup:function(){var t=this;t.updateItems(),t.calculateAll(),t.buildControls(),t.updateControls(),t.response(),t.moveEvents(),t.stopOnHover(),t.owlStatus(),!1!==t.options.transitionStyle&&t.transitionTypes(t.options.transitionStyle),!0===t.options.autoPlay&&(t.options.autoPlay=5e3),t.play(),t.$elem.find(".owl-wrapper").css("display","block"),t.$elem.is(":visible")?t.$elem.css("opacity",1):t.watchVisibility(),t.onstartup=!1,t.eachMoveUpdate(),"function"==typeof t.options.afterInit&&t.options.afterInit.apply(this,[t.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad(),!0===this.options.autoHeight&&this.autoHeight(),this.onVisibleItems(),"function"==typeof this.options.afterAction&&this.options.afterAction.apply(this,[this.$elem])},updateVars:function(){var t=this;"function"==typeof t.options.beforeUpdate&&t.options.beforeUpdate.apply(this,[t.$elem]),t.watchVisibility(),t.updateItems(),t.calculateAll(),t.updatePosition(),t.updateControls(),t.eachMoveUpdate(),"function"==typeof t.options.afterUpdate&&t.options.afterUpdate.apply(this,[t.$elem])},reload:function(){var t=this;c.setTimeout(function(){t.updateVars()},0)},watchVisibility:function(){var t=this;return!1===t.$elem.is(":visible")&&(t.$elem.css({opacity:0}),c.clearInterval(t.autoPlayInterval),c.clearInterval(t.checkVisible),void(t.checkVisible=c.setInterval(function(){t.$elem.is(":visible")&&(t.reload(),t.$elem.animate({opacity:1},200),c.clearInterval(t.checkVisible))},500)))},wrapItems:function(){this.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"></div>'),this.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">'),this.wrapperOuter=this.$elem.find(".owl-wrapper-outer"),this.$elem.css("display","block")},baseClass:function(){var t=this.$elem.hasClass(this.options.baseClass),e=this.$elem.hasClass(this.options.theme);t||this.$elem.addClass(this.options.baseClass),e||this.$elem.addClass(this.options.theme)},updateItems:function(){var t,e,i=this;if(!1===i.options.responsive)return!1;if(!0===i.options.singleItem)return i.options.items=i.orignalItems=1,i.options.itemsCustom=!1,i.options.itemsDesktop=!1,i.options.itemsDesktopSmall=!1,i.options.itemsTablet=!1,i.options.itemsTabletSmall=!1,i.options.itemsMobile=!1;if((t=l(i.options.responsiveBaseWidth).width())>(i.options.itemsDesktop[0]||i.orignalItems)&&(i.options.items=i.orignalItems),!1!==i.options.itemsCustom)for(i.options.itemsCustom.sort(function(t,e){return t[0]-e[0]}),e=0;e<i.options.itemsCustom.length;e+=1)i.options.itemsCustom[e][0]<=t&&(i.options.items=i.options.itemsCustom[e][1]);else t<=i.options.itemsDesktop[0]&&!1!==i.options.itemsDesktop&&(i.options.items=i.options.itemsDesktop[1]),t<=i.options.itemsDesktopSmall[0]&&!1!==i.options.itemsDesktopSmall&&(i.options.items=i.options.itemsDesktopSmall[1]),t<=i.options.itemsTablet[0]&&!1!==i.options.itemsTablet&&(i.options.items=i.options.itemsTablet[1]),t<=i.options.itemsTabletSmall[0]&&!1!==i.options.itemsTabletSmall&&(i.options.items=i.options.itemsTabletSmall[1]),t<=i.options.itemsMobile[0]&&!1!==i.options.itemsMobile&&(i.options.items=i.options.itemsMobile[1]);i.options.items>i.itemsAmount&&!0===i.options.itemsScaleUp&&(i.options.items=i.itemsAmount)},response:function(){var t,e,i=this;return!0===i.options.responsive&&(e=l(c).width(),i.resizer=function(){l(c).width()!==e&&(!1!==i.options.autoPlay&&c.clearInterval(i.autoPlayInterval),c.clearTimeout(t),t=c.setTimeout(function(){e=l(c).width(),i.updateVars()},i.options.responsiveRefreshRate))},void l(c).resize(i.resizer))},updatePosition:function(){this.jumpTo(this.currentItem),!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var i=this,o=0,n=i.itemsAmount-i.options.items;i.$owlItems.each(function(t){var e=l(this);e.css({width:i.itemWidth}).data("owl-item",Number(t)),(t%i.options.items==0||t===n)&&(n<t||(o+=1)),e.data("owl-roundPages",o)})},appendWrapperSizes:function(){var t=this.$owlItems.length*this.itemWidth;this.$owlWrapper.css({width:2*t,left:0}),this.appendItemsSizes()},calculateAll:function(){this.calculateWidth(),this.appendWrapperSizes(),this.loops(),this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/this.options.items)},max:function(){var t=this,e=-1*(t.itemsAmount*t.itemWidth-t.options.items*t.itemWidth);return t.options.items>t.itemsAmount?(e=t.maximumItem=0,t.maximumPixels=0):(t.maximumItem=t.itemsAmount-t.options.items,t.maximumPixels=e),e},min:function(){return 0},loops:function(){var t,e,i=0,o=0;for(this.positionsInArray=[0],this.pagesInArray=[],t=0;t<this.itemsAmount;t+=1)o+=this.itemWidth,this.positionsInArray.push(-o),!0===this.options.scrollPerPage&&((e=l(this.$owlItems[t]).data("owl-roundPages"))!==i&&(this.pagesInArray[i]=this.positionsInArray[t],i=e))},buildControls:function(){(!0===this.options.navigation||!0===this.options.pagination)&&(this.owlControls=l('<div class="owl-controls"/>').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem)),!0===this.options.pagination&&this.buildPagination(),!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var e=this,t=l('<div class="owl-buttons"/>');e.owlControls.append(t),e.buttonPrev=l("<div/>",{class:"owl-prev",html:e.options.navigationText[0]||""}),e.buttonNext=l("<div/>",{class:"owl-next",html:e.options.navigationText[1]||""}),t.append(e.buttonPrev).append(e.buttonNext),t.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(t){t.preventDefault()}),t.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(t){t.preventDefault(),l(this).hasClass("owl-next")?e.next():e.prev()})},buildPagination:function(){var e=this;e.paginationWrapper=l('<div class="owl-pagination"/>'),e.owlControls.append(e.paginationWrapper),e.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(t){t.preventDefault(),Number(l(this).data("owl-page"))!==e.currentItem&&e.goTo(Number(l(this).data("owl-page")),!0)})},updatePagination:function(){var t,e,i,o,n,s,a=this;if(!1===a.options.pagination)return!1;for(a.paginationWrapper.html(""),t=0,e=a.itemsAmount-a.itemsAmount%a.options.items,o=0;o<a.itemsAmount;o+=1)o%a.options.items==0&&(t+=1,e===o&&(i=a.itemsAmount-a.options.items),n=l("<div/>",{class:"owl-page"}),s=l("<span></span>",{text:!0===a.options.paginationNumbers?t:"",class:!0===a.options.paginationNumbers?"owl-numbers":""}),n.append(s),n.data("owl-page",e===o?i:o),n.data("owl-roundPages",t),a.paginationWrapper.append(n));a.checkPagination()},checkPagination:function(){var t=this;return!1!==t.options.pagination&&void t.paginationWrapper.find(".owl-page").each(function(){l(this).data("owl-roundPages")===l(t.$owlItems[t.currentItem]).data("owl-roundPages")&&(t.paginationWrapper.find(".owl-page").removeClass("active"),l(this).addClass("active"))})},checkNavigation:function(){var t=this;return!1!==t.options.navigation&&void(!1===t.options.rewindNav&&(0===t.currentItem&&0===t.maximumItem?(t.buttonPrev.addClass("disabled"),t.buttonNext.addClass("disabled")):0===t.currentItem&&0!==t.maximumItem?(t.buttonPrev.addClass("disabled"),t.buttonNext.removeClass("disabled")):t.currentItem===t.maximumItem?(t.buttonPrev.removeClass("disabled"),t.buttonNext.addClass("disabled")):0!==t.currentItem&&t.currentItem!==t.maximumItem&&(t.buttonPrev.removeClass("disabled"),t.buttonNext.removeClass("disabled"))))},updateControls:function(){this.updatePagination(),this.checkNavigation(),this.owlControls&&(this.options.items>=this.itemsAmount?this.owlControls.hide():this.owlControls.show())},destroyControls:function(){this.owlControls&&this.owlControls.remove()},next:function(t){var e=this;if(e.isTransition)return!1;if(e.currentItem+=!0===e.options.scrollPerPage?e.options.items:1,e.currentItem>e.maximumItem+(!0===e.options.scrollPerPage?e.options.items-1:0)){if(!0!==e.options.rewindNav)return e.currentItem=e.maximumItem,!1;e.currentItem=0,t="rewind"}e.goTo(e.currentItem,t)},prev:function(t){var e=this;if(e.isTransition)return!1;if(!0===e.options.scrollPerPage&&0<e.currentItem&&e.currentItem<e.options.items?e.currentItem=0:e.currentItem-=!0===e.options.scrollPerPage?e.options.items:1,e.currentItem<0){if(!0!==e.options.rewindNav)return e.currentItem=0,!1;e.currentItem=e.maximumItem,t="rewind"}e.goTo(e.currentItem,t)},goTo:function(t,e,i){var o,n=this;return!n.isTransition&&("function"==typeof n.options.beforeMove&&n.options.beforeMove.apply(this,[n.$elem]),t>=n.maximumItem?t=n.maximumItem:t<=0&&(t=0),n.currentItem=n.owl.currentItem=t,!1!==n.options.transitionStyle&&"drag"!==i&&1===n.options.items&&!0===n.browser.support3d?(n.swapSpeed(0),!0===n.browser.support3d?n.transition3d(n.positionsInArray[t]):n.css2slide(n.positionsInArray[t],1),n.afterGo(),n.singleItemTransition(),!1):(o=n.positionsInArray[t],!0===n.browser.support3d?(!(n.isCss3Finish=!1)===e?(n.swapSpeed("paginationSpeed"),c.setTimeout(function(){n.isCss3Finish=!0},n.options.paginationSpeed)):"rewind"===e?(n.swapSpeed(n.options.rewindSpeed),c.setTimeout(function(){n.isCss3Finish=!0},n.options.rewindSpeed)):(n.swapSpeed("slideSpeed"),c.setTimeout(function(){n.isCss3Finish=!0},n.options.slideSpeed)),n.transition3d(o)):!0===e?n.css2slide(o,n.options.paginationSpeed):"rewind"===e?n.css2slide(o,n.options.rewindSpeed):n.css2slide(o,n.options.slideSpeed),void n.afterGo()))},jumpTo:function(t){var e=this;"function"==typeof e.options.beforeMove&&e.options.beforeMove.apply(this,[e.$elem]),t>=e.maximumItem||-1===t?t=e.maximumItem:t<=0&&(t=0),e.swapSpeed(0),!0===e.browser.support3d?e.transition3d(e.positionsInArray[t]):e.css2slide(e.positionsInArray[t],1),e.currentItem=e.owl.currentItem=t,e.afterGo()},afterGo:function(){var t=this;t.prevArr.push(t.currentItem),t.prevItem=t.owl.prevItem=t.prevArr[t.prevArr.length-2],t.prevArr.shift(0),t.prevItem!==t.currentItem&&(t.checkPagination(),t.checkNavigation(),t.eachMoveUpdate(),!1!==t.options.autoPlay&&t.checkAp()),"function"==typeof t.options.afterMove&&t.prevItem!==t.currentItem&&t.options.afterMove.apply(this,[t.$elem])},stop:function(){this.apStatus="stop",c.clearInterval(this.autoPlayInterval)},checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var t=this;return!(t.apStatus="play")!==t.options.autoPlay&&(c.clearInterval(t.autoPlayInterval),void(t.autoPlayInterval=c.setInterval(function(){t.next(!0)},t.options.autoPlay)))},swapSpeed:function(t){"slideSpeed"===t?this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===t?this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!=typeof t&&this.$owlWrapper.css(this.addCssSpeed(t))},addCssSpeed:function(t){return{"-webkit-transition":"all "+t+"ms ease","-moz-transition":"all "+t+"ms ease","-o-transition":"all "+t+"ms ease",transition:"all "+t+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(t){return{"-webkit-transform":"translate3d("+t+"px, 0px, 0px)","-moz-transform":"translate3d("+t+"px, 0px, 0px)","-o-transform":"translate3d("+t+"px, 0px, 0px)","-ms-transform":"translate3d("+t+"px, 0px, 0px)",transform:"translate3d("+t+"px, 0px,0px)"}},transition3d:function(t){this.$owlWrapper.css(this.doTranslate(t))},css2move:function(t){this.$owlWrapper.css({left:t})},css2slide:function(t,e){var i=this;i.isCssFinish=!1,i.$owlWrapper.stop(!0,!0).animate({left:t},{duration:e||i.options.slideSpeed,complete:function(){i.isCssFinish=!0}})},checkBrowser:function(){var t,e,i,o,n="translate3d(0px, 0px, 0px)",s=d.createElement("div");s.style.cssText="  -moz-transform:"+n+"; -ms-transform:"+n+"; -o-transform:"+n+"; -webkit-transform:"+n+"; transform:"+n,t=/translate3d\(0px, 0px, 0px\)/g,i=null!==(e=s.style.cssText.match(t))&&1===e.length,o="ontouchstart"in c||c.navigator.msMaxTouchPoints,this.browser={support3d:i,isTouch:o}},moveEvents:function(){(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)&&(this.gestures(),this.disabledEvents())},eventTypes:function(){var t=this,e=["s","e","x"];t.ev_types={},!0===t.options.mouseDrag&&!0===t.options.touchDrag?e=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]:!1===t.options.mouseDrag&&!0===t.options.touchDrag?e=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:!0===t.options.mouseDrag&&!1===t.options.touchDrag&&(e=["mousedown.owl","mousemove.owl","mouseup.owl"]),t.ev_types.start=e[0],t.ev_types.move=e[1],t.ev_types.end=e[2]},disabledEvents:function(){this.$elem.on("dragstart.owl",function(t){t.preventDefault()}),this.$elem.on("mousedown.disableTextSelect",function(t){return l(t.target).is("input, textarea, select, option")})},gestures:function(){function n(t){if(void 0!==t.touches)return{x:t.touches[0].pageX,y:t.touches[0].pageY};if(void 0===t.touches){if(void 0!==t.pageX)return{x:t.pageX,y:t.pageY};if(void 0===t.pageX)return{x:t.clientX,y:t.clientY}}}function s(t){"on"===t?(l(d).on(a.ev_types.move,e),l(d).on(a.ev_types.end,i)):"off"===t&&(l(d).off(a.ev_types.move),l(d).off(a.ev_types.end))}function e(t){var e,i,o=t.originalEvent||t||c.event;a.newPosX=n(o).x-r.offsetX,a.newPosY=n(o).y-r.offsetY,a.newRelativeX=a.newPosX-r.relativePos,"function"==typeof a.options.startDragging&&!0!==r.dragging&&0!==a.newRelativeX&&(r.dragging=!0,a.options.startDragging.apply(a,[a.$elem])),(8<a.newRelativeX||a.newRelativeX<-8)&&!0===a.browser.isTouch&&(void 0!==o.preventDefault?o.preventDefault():o.returnValue=!1,r.sliding=!0),(10<a.newPosY||a.newPosY<-10)&&!1===r.sliding&&l(d).off("touchmove.owl"),e=function(){return a.newRelativeX/5},i=function(){return a.maximumPixels+a.newRelativeX/5},a.newPosX=Math.max(Math.min(a.newPosX,e()),i()),!0===a.browser.support3d?a.transition3d(a.newPosX):a.css2move(a.newPosX)}function i(t){var e,i,o,n=t.originalEvent||t||c.event;n.target=n.target||n.srcElement,!(r.dragging=!1)!==a.browser.isTouch&&a.$owlWrapper.removeClass("grabbing"),a.newRelativeX<0?a.dragDirection=a.owl.dragDirection="left":a.dragDirection=a.owl.dragDirection="right",0!==a.newRelativeX&&(e=a.getNewPosition(),a.goTo(e,!1,"drag"),r.targetElement===n.target&&!0!==a.browser.isTouch&&(l(n.target).on("click.disable",function(t){t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),l(t.target).off("click.disable")}),o=(i=l._data(n.target,"events").click).pop(),i.splice(0,0,o))),s("off")}var a=this,r={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};a.isCssFinish=!0,a.$elem.on(a.ev_types.start,".owl-wrapper",function(t){var e,i=t.originalEvent||t||c.event;if(3===i.which)return!1;if(!(a.itemsAmount<=a.options.items)){if(!1===a.isCssFinish&&!a.options.dragBeforeAnimFinish)return!1;if(!1===a.isCss3Finish&&!a.options.dragBeforeAnimFinish)return!1;!1!==a.options.autoPlay&&c.clearInterval(a.autoPlayInterval),!0===a.browser.isTouch||a.$owlWrapper.hasClass("grabbing")||a.$owlWrapper.addClass("grabbing"),a.newPosX=0,a.newRelativeX=0,l(this).css(a.removeTransition()),e=l(this).position(),r.relativePos=e.left,r.offsetX=n(i).x-e.left,r.offsetY=n(i).y-e.top,s("on"),r.sliding=!1,r.targetElement=i.target||i.srcElement}})},getNewPosition:function(){var t=this.closestItem();return t>this.maximumItem?(this.currentItem=this.maximumItem,t=this.maximumItem):0<=this.newPosX&&(t=0,this.currentItem=0),t},closestItem:function(){var i=this,o=!0===i.options.scrollPerPage?i.pagesInArray:i.positionsInArray,n=i.newPosX,s=null;return l.each(o,function(t,e){n-i.itemWidth/20>o[t+1]&&n-i.itemWidth/20<e&&"left"===i.moveDirection()?(s=e,!0===i.options.scrollPerPage?i.currentItem=l.inArray(s,i.positionsInArray):i.currentItem=t):n+i.itemWidth/20<e&&n+i.itemWidth/20>(o[t+1]||o[t]-i.itemWidth)&&"right"===i.moveDirection()&&(!0===i.options.scrollPerPage?(s=o[t+1]||o[o.length-1],i.currentItem=l.inArray(s,i.positionsInArray)):(s=o[t+1],i.currentItem=t+1))}),i.currentItem},moveDirection:function(){var t;return this.newRelativeX<0?(t="right",this.playDirection="next"):(t="left",this.playDirection="prev"),t},customEvents:function(){var i=this;i.$elem.on("owl.next",function(){i.next()}),i.$elem.on("owl.prev",function(){i.prev()}),i.$elem.on("owl.play",function(t,e){i.options.autoPlay=e,i.play(),i.hoverStatus="play"}),i.$elem.on("owl.stop",function(){i.stop(),i.hoverStatus="stop"}),i.$elem.on("owl.goTo",function(t,e){i.goTo(e)}),i.$elem.on("owl.jumpTo",function(t,e){i.jumpTo(e)})},stopOnHover:function(){var t=this;!0===t.options.stopOnHover&&!0!==t.browser.isTouch&&!1!==t.options.autoPlay&&(t.$elem.on("mouseover",function(){t.stop()}),t.$elem.on("mouseout",function(){"stop"!==t.hoverStatus&&t.play()}))},lazyLoad:function(){var t,e,i,o,n=this;if(!1===n.options.lazyLoad)return!1;for(t=0;t<n.itemsAmount;t+=1)"loaded"!==(e=l(n.$owlItems[t])).data("owl-loaded")&&(i=e.data("owl-item"),"string"==typeof(o=e.find(".lazyOwl")).data("src")?(void 0===e.data("owl-loaded")&&(o.hide(),e.addClass("loading").data("owl-loaded","checked")),(!0!==n.options.lazyFollow||i>=n.currentItem)&&i<n.currentItem+n.options.items&&o.length&&o.each(function(){n.lazyPreload(e,l(this))})):e.data("owl-loaded","loaded"))},lazyPreload:function(t,e){function i(){t.data("owl-loaded","loaded").removeClass("loading"),e.removeAttr("data-src"),"fade"===n.options.lazyEffect?e.fadeIn(400):e.show(),"function"==typeof n.options.afterLazyLoad&&n.options.afterLazyLoad.apply(this,[n.$elem])}var o,n=this,s=0;"DIV"===e.prop("tagName")?(e.css("background-image","url("+e.data("src")+")"),o=!0):e[0].src=e.data("src"),function t(){s+=1,n.completeImg(e.get(0))||!0===o?i():s<=100?c.setTimeout(t,100):i()}()},autoHeight:function(){function e(){var t=l(o.$owlItems[o.currentItem]).height();o.wrapperOuter.css("height",t+"px"),o.wrapperOuter.hasClass("autoHeight")||c.setTimeout(function(){o.wrapperOuter.addClass("autoHeight")},0)}var i,o=this,n=l(o.$owlItems[o.currentItem]).find("img");void 0!==n.get(0)?(i=0,function t(){i+=1,o.completeImg(n.get(0))?e():i<=100?c.setTimeout(t,100):o.wrapperOuter.css("height","")}()):e()},completeImg:function(t){return!!t.complete&&("undefined"===typeof t.naturalWidth||0!==t.naturalWidth)},onVisibleItems:function(){var t,e=this;for(!0===e.options.addClassActive&&e.$owlItems.removeClass("active"),e.visibleItems=[],t=e.currentItem;t<e.currentItem+e.options.items;t+=1)e.visibleItems.push(t),!0===e.options.addClassActive&&l(e.$owlItems[t]).addClass("active");e.owl.visibleItems=e.visibleItems},transitionTypes:function(t){this.outClass="owl-"+t+"-out",this.inClass="owl-"+t+"-in"},singleItemTransition:function(){var t,e=this,i=e.outClass,o=e.inClass,n=e.$owlItems.eq(e.currentItem),s=e.$owlItems.eq(e.prevItem),a=Math.abs(e.positionsInArray[e.currentItem])+e.positionsInArray[e.prevItem],r=Math.abs(e.positionsInArray[e.currentItem])+e.itemWidth/2,l="webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend";e.isTransition=!0,e.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":r+"px","-moz-perspective-origin":r+"px","perspective-origin":r+"px"}),s.css((t=a,{position:"relative",left:t+"px"})).addClass(i).on(l,function(){e.endPrev=!0,s.off(l),e.clearTransStyle(s,i)}),n.addClass(o).on(l,function(){e.endCurrent=!0,n.off(l),e.clearTransStyle(n,o)})},clearTransStyle:function(t,e){t.css({position:"",left:""}).removeClass(e),this.endPrev&&this.endCurrent&&(this.$owlWrapper.removeClass("owl-origin"),this.endPrev=!1,this.endCurrent=!1,this.isTransition=!1)},owlStatus:function(){var t=this;t.owl={userOptions:t.userOptions,baseElement:t.$elem,userItems:t.$userItems,owlItems:t.$owlItems,currentItem:t.currentItem,prevItem:t.prevItem,visibleItems:t.visibleItems,isTouch:t.browser.isTouch,browser:t.browser,dragDirection:t.dragDirection}},clearEvents:function(){this.$elem.off(".owl owl mousedown.disableTextSelect"),l(d).off(".owl owl"),l(c).off("resize",this.resizer)},unWrap:function(){0!==this.$elem.children().length&&(this.$owlWrapper.unwrap(),this.$userItems.unwrap().unwrap(),this.owlControls&&this.owlControls.remove()),this.clearEvents(),this.$elem.attr({style:this.$elem.data("owl-originalStyles")||"",class:this.$elem.data("owl-originalClasses")})},destroy:function(){this.stop(),c.clearInterval(this.checkVisible),this.unWrap(),this.$elem.removeData()},reinit:function(t){var e=l.extend({},this.userOptions,t);this.unWrap(),this.init(e,this.$elem)},addItem:function(t,e){var i;return!!t&&(0===this.$elem.children().length?(this.$elem.append(t),this.setVars(),!1):(this.unWrap(),(i=void 0===e||-1===e?-1:e)>=this.$userItems.length||-1===i?this.$userItems.eq(-1).after(t):this.$userItems.eq(i).before(t),void this.setVars()))},removeItem:function(t){var e;return 0!==this.$elem.children().length&&(e=void 0===t||-1===t?-1:t,this.unWrap(),this.$userItems.eq(e).remove(),void this.setVars())}};l.fn.owlCarousel=function(e){return this.each(function(){if(!0===l(this).data("owl-init"))return!1;l(this).data("owl-init",!0);var t=Object.create(i);t.init(e,this),l.data(this,"owlCarousel",t)})},l.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1e3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:c,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}}(jQuery,window,document),RichMarker.prototype=new google.maps.OverlayView,window.RichMarker=RichMarker,RichMarker.prototype.getVisible=function(){return this.get("visible")},RichMarker.prototype.getVisible=RichMarker.prototype.getVisible,RichMarker.prototype.setVisible=function(t){this.set("visible",t)},RichMarker.prototype.setVisible=RichMarker.prototype.setVisible,RichMarker.prototype.visible_changed=function(){this.ready_&&(this.markerWrapper_.style.display=this.getVisible()?"":"none",this.draw())},RichMarker.prototype.visible_changed=RichMarker.prototype.visible_changed,RichMarker.prototype.setFlat=function(t){this.set("flat",!!t)},RichMarker.prototype.setFlat=RichMarker.prototype.setFlat,RichMarker.prototype.getFlat=function(){return this.get("flat")},RichMarker.prototype.getFlat=RichMarker.prototype.getFlat,RichMarker.prototype.getWidth=function(){return this.get("width")},RichMarker.prototype.getWidth=RichMarker.prototype.getWidth,RichMarker.prototype.getHeight=function(){return this.get("height")},RichMarker.prototype.getHeight=RichMarker.prototype.getHeight,RichMarker.prototype.setShadow=function(t){this.set("shadow",t),this.flat_changed()},RichMarker.prototype.setShadow=RichMarker.prototype.setShadow,RichMarker.prototype.getShadow=function(){return this.get("shadow")},RichMarker.prototype.getShadow=RichMarker.prototype.getShadow,RichMarker.prototype.flat_changed=function(){this.ready_&&(this.markerWrapper_.style.boxShadow=this.markerWrapper_.style.webkitBoxShadow=this.markerWrapper_.style.MozBoxShadow=this.getFlat()?"":this.getShadow())},RichMarker.prototype.flat_changed=RichMarker.prototype.flat_changed,RichMarker.prototype.setZIndex=function(t){this.set("zIndex",t)},RichMarker.prototype.setZIndex=RichMarker.prototype.setZIndex,RichMarker.prototype.getZIndex=function(){return this.get("zIndex")},RichMarker.prototype.getZIndex=RichMarker.prototype.getZIndex,RichMarker.prototype.zIndex_changed=function(){this.getZIndex()&&this.ready_&&(this.markerWrapper_.style.zIndex=this.getZIndex())},RichMarker.prototype.zIndex_changed=RichMarker.prototype.zIndex_changed,RichMarker.prototype.getDraggable=function(){return this.get("draggable")},RichMarker.prototype.getDraggable=RichMarker.prototype.getDraggable,RichMarker.prototype.setDraggable=function(t){this.set("draggable",!!t)},RichMarker.prototype.setDraggable=RichMarker.prototype.setDraggable,RichMarker.prototype.draggable_changed=function(){this.ready_&&(this.getDraggable()?this.addDragging_(this.markerWrapper_):this.removeDragListeners_())},RichMarker.prototype.draggable_changed=RichMarker.prototype.draggable_changed,RichMarker.prototype.getPosition=function(){return this.get("position")},RichMarker.prototype.getPosition=RichMarker.prototype.getPosition,RichMarker.prototype.setPosition=function(t){this.set("position",t)},RichMarker.prototype.setPosition=RichMarker.prototype.setPosition,RichMarker.prototype.position_changed=function(){this.draw()},RichMarker.prototype.position_changed=RichMarker.prototype.position_changed,RichMarker.prototype.getAnchor=function(){return this.get("anchor")},RichMarker.prototype.getAnchor=RichMarker.prototype.getAnchor,RichMarker.prototype.setAnchor=function(t){this.set("anchor",t)},RichMarker.prototype.setAnchor=RichMarker.prototype.setAnchor,RichMarker.prototype.anchor_changed=function(){this.draw()},RichMarker.prototype.anchor_changed=RichMarker.prototype.anchor_changed,RichMarker.prototype.htmlToDocumentFragment_=function(t){var e=document.createElement("DIV");if(e.innerHTML=t,1==e.childNodes.length)return e.removeChild(e.firstChild);for(var i=document.createDocumentFragment();e.firstChild;)i.appendChild(e.firstChild);return i},RichMarker.prototype.removeChildren_=function(t){if(t)for(var e;e=t.firstChild;)t.removeChild(e)},RichMarker.prototype.setContent=function(t){this.set("content",t)},RichMarker.prototype.setContent=RichMarker.prototype.setContent,RichMarker.prototype.getContent=function(){return this.get("content")},RichMarker.prototype.getContent=RichMarker.prototype.getContent,RichMarker.prototype.content_changed=function(){if(this.markerContent_){this.removeChildren_(this.markerContent_);var t=this.getContent();if(t){"string"==typeof t&&(t=t.replace(/^\s*([\S\s]*)\b\s*$/,"$1"),t=this.htmlToDocumentFragment_(t)),this.markerContent_.appendChild(t);for(var e,i=this,o=this.markerContent_.getElementsByTagName("IMG"),n=0;e=o[n];n++)google.maps.event.addDomListener(e,"mousedown",function(t){i.getDraggable()&&(t.preventDefault&&t.preventDefault(),t.returnValue=!1)}),google.maps.event.addDomListener(e,"load",function(){i.draw()});google.maps.event.trigger(this,"domready")}this.ready_&&this.draw()}},RichMarker.prototype.content_changed=RichMarker.prototype.content_changed,RichMarker.prototype.setCursor_=function(t){if(this.ready_){var e="";-1!==navigator.userAgent.indexOf("Gecko/")?("dragging"==t&&(e="-moz-grabbing"),"dragready"==t&&(e="-moz-grab")):("dragging"==t||"dragready"==t)&&(e="move"),"draggable"==t&&(e="pointer"),this.markerWrapper_.style.cursor!=e&&(this.markerWrapper_.style.cursor=e)}},RichMarker.prototype.startDrag=function(t){if(this.getDraggable()&&!this.dragging_){this.dragging_=!0;var e=this.getMap();this.mapDraggable_=e.get("draggable"),e.set("draggable",!1),this.mouseX_=t.clientX,this.mouseY_=t.clientY,this.setCursor_("dragready"),this.markerWrapper_.style.MozUserSelect="none",this.markerWrapper_.style.KhtmlUserSelect="none",this.markerWrapper_.style.WebkitUserSelect="none",this.markerWrapper_.unselectable="on",this.markerWrapper_.onselectstart=function(){return!1},this.addDraggingListeners_(),google.maps.event.trigger(this,"dragstart")}},RichMarker.prototype.stopDrag=function(){this.getDraggable()&&this.dragging_&&(this.dragging_=!1,this.getMap().set("draggable",this.mapDraggable_),this.mouseX_=this.mouseY_=this.mapDraggable_=null,this.markerWrapper_.style.MozUserSelect="",this.markerWrapper_.style.KhtmlUserSelect="",this.markerWrapper_.style.WebkitUserSelect="",this.markerWrapper_.unselectable="off",this.markerWrapper_.onselectstart=function(){},this.removeDraggingListeners_(),this.setCursor_("draggable"),google.maps.event.trigger(this,"dragend"),this.draw())},RichMarker.prototype.drag=function(t){if(this.getDraggable()&&this.dragging_){var e=this.mouseX_-t.clientX,i=this.mouseY_-t.clientY;this.mouseX_=t.clientX,this.mouseY_=t.clientY;var o=parseInt(this.markerWrapper_.style.left,10)-e,n=parseInt(this.markerWrapper_.style.top,10)-i;this.markerWrapper_.style.left=o+"px",this.markerWrapper_.style.top=n+"px";var s=this.getOffset_(),a=new google.maps.Point(o-s.width,n-s.height),r=this.getProjection();this.setPosition(r.fromDivPixelToLatLng(a)),this.setCursor_("dragging"),google.maps.event.trigger(this,"drag")}else this.stopDrag()},RichMarker.prototype.removeDragListeners_=function(){this.draggableListener_&&(google.maps.event.removeListener(this.draggableListener_),delete this.draggableListener_),this.setCursor_("")},RichMarker.prototype.addDragging_=function(t){if(t){var e=this;this.draggableListener_=google.maps.event.addDomListener(t,"mousedown",function(t){e.startDrag(t)}),this.setCursor_("draggable")}},RichMarker.prototype.addDraggingListeners_=function(){var e=this;this.markerWrapper_.setCapture?(this.markerWrapper_.setCapture(!0),this.draggingListeners_=[google.maps.event.addDomListener(this.markerWrapper_,"mousemove",function(t){e.drag(t)},!0),google.maps.event.addDomListener(this.markerWrapper_,"mouseup",function(){e.stopDrag(),e.markerWrapper_.releaseCapture()},!0)]):this.draggingListeners_=[google.maps.event.addDomListener(window,"mousemove",function(t){e.drag(t)},!0),google.maps.event.addDomListener(window,"mouseup",function(){e.stopDrag()},!0)]},RichMarker.prototype.removeDraggingListeners_=function(){if(this.draggingListeners_){for(var t,e=0;t=this.draggingListeners_[e];e++)google.maps.event.removeListener(t);this.draggingListeners_.length=0}},RichMarker.prototype.getOffset_=function(){var t=this.getAnchor();if("object"==typeof t)return t;var e=new google.maps.Size(0,0);if(!this.markerContent_)return e;var i=this.markerContent_.offsetWidth,o=this.markerContent_.offsetHeight;switch(t){case RichMarkerPosition.TOP_LEFT:break;case RichMarkerPosition.TOP:e.width=-i/2;break;case RichMarkerPosition.TOP_RIGHT:e.width=-i;break;case RichMarkerPosition.LEFT:e.height=-o/2;break;case RichMarkerPosition.MIDDLE:e.width=-i/2,e.height=-o/2;break;case RichMarkerPosition.RIGHT:e.width=-i,e.height=-o/2;break;case RichMarkerPosition.BOTTOM_LEFT:e.height=-o;break;case RichMarkerPosition.BOTTOM:e.width=-i/2,e.height=-o;break;case RichMarkerPosition.BOTTOM_RIGHT:e.width=-i,e.height=-o}return e},RichMarker.prototype.onAdd=function(){if(this.markerWrapper_||(this.markerWrapper_=document.createElement("DIV"),this.markerWrapper_.style.position="absolute"),this.getZIndex()&&(this.markerWrapper_.style.zIndex=this.getZIndex()),this.markerWrapper_.style.display=this.getVisible()?"":"none",!this.markerContent_){this.markerContent_=document.createElement("DIV"),this.markerWrapper_.appendChild(this.markerContent_);var e=this;google.maps.event.addDomListener(this.markerContent_,"click",function(t){google.maps.event.trigger(e,"click")}),google.maps.event.addDomListener(this.markerContent_,"mouseover",function(t){google.maps.event.trigger(e,"mouseover")}),google.maps.event.addDomListener(this.markerContent_,"mouseout",function(t){google.maps.event.trigger(e,"mouseout")})}this.ready_=!0,this.content_changed(),this.flat_changed(),this.draggable_changed();var t=this.getPanes();t&&t.overlayMouseTarget.appendChild(this.markerWrapper_),google.maps.event.trigger(this,"ready")},RichMarker.prototype.onAdd=RichMarker.prototype.onAdd,RichMarker.prototype.draw=function(){if(this.ready_&&!this.dragging_){var t=this.getProjection();if(t){var e=this.get("position"),i=t.fromLatLngToDivPixel(e),o=this.getOffset_();this.markerWrapper_.style.top=i.y+o.height+"px",this.markerWrapper_.style.left=i.x+o.width+"px";var n=this.markerContent_.offsetHeight,s=this.markerContent_.offsetWidth;s!=this.get("width")&&this.set("width",s),n!=this.get("height")&&this.set("height",n)}}},RichMarker.prototype.draw=RichMarker.prototype.draw,RichMarker.prototype.onRemove=function(){this.markerWrapper_&&this.markerWrapper_.parentNode&&this.markerWrapper_.parentNode.removeChild(this.markerWrapper_),this.removeDragListeners_()},RichMarker.prototype.onRemove=RichMarker.prototype.onRemove;var RichMarkerPosition={TOP_LEFT:1,TOP:2,TOP_RIGHT:3,LEFT:4,MIDDLE:5,RIGHT:6,BOTTOM_LEFT:7,BOTTOM:8,BOTTOM_RIGHT:9},last_search_room_error;window.RichMarkerPosition=RichMarkerPosition,function(m){function d(t,e,i){var u=this;u.id=i,u.options=e,u.status={animated:!1,rendered:!1,disabled:!1,focused:!1},u.elements={target:t.addClass(u.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null},u.cache={mouse:{},position:{},toggle:0},u.timers={},m.extend(u,u.options.api,{show:function(t){function e(){"static"!==u.options.position.type&&u.focus(),u.onShow.call(u,t),m.browser.msie&&u.elements.tooltip.get(0).style.removeAttribute("filter")}var i;if(!u.status.rendered)return m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"show");if("none"!==u.elements.tooltip.css("display"))return u;if(u.elements.tooltip.stop(!0,!1),!1===u.beforeShow.call(u,t))return u;if(u.cache.toggle=1,"static"!==u.options.position.type&&u.updatePosition(t,0<u.options.show.effect.length),"object"==typeof u.options.show.solo?i=m(u.options.show.solo):!0===u.options.show.solo&&(i=m("div.qtip").not(u.elements.tooltip)),i&&i.each(function(){!0===m(this).qtip("api").status.rendered&&m(this).qtip("api").hide()}),"function"==typeof u.options.show.effect.type)u.options.show.effect.type.call(u.elements.tooltip,u.options.show.effect.length),u.elements.tooltip.queue(function(){e(),m(this).dequeue()});else{switch(u.options.show.effect.type.toLowerCase()){case"fade":u.elements.tooltip.fadeIn(u.options.show.effect.length,e);break;case"slide":u.elements.tooltip.slideDown(u.options.show.effect.length,function(){e(),"static"!==u.options.position.type&&u.updatePosition(t,!0)});break;case"grow":u.elements.tooltip.show(u.options.show.effect.length,e);break;default:u.elements.tooltip.show(null,e)}u.elements.tooltip.addClass(u.options.style.classes.active)}return m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.EVENT_SHOWN,"show")},hide:function(t){function e(){u.onHide.call(u,t)}if(!u.status.rendered)return m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"hide");if("none"===u.elements.tooltip.css("display"))return u;if(clearTimeout(u.timers.show),u.elements.tooltip.stop(!0,!1),!1===u.beforeHide.call(u,t))return u;if(u.cache.toggle=0,"function"==typeof u.options.hide.effect.type)u.options.hide.effect.type.call(u.elements.tooltip,u.options.hide.effect.length),u.elements.tooltip.queue(function(){e(),m(this).dequeue()});else{switch(u.options.hide.effect.type.toLowerCase()){case"fade":u.elements.tooltip.fadeOut(u.options.hide.effect.length,e);break;case"slide":u.elements.tooltip.slideUp(u.options.hide.effect.length,e);break;case"grow":u.elements.tooltip.hide(u.options.hide.effect.length,e);break;default:u.elements.tooltip.hide(null,e)}u.elements.tooltip.removeClass(u.options.style.classes.active)}return m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.EVENT_HIDDEN,"hide")},updatePosition:function(t,e){var i,o,n,s,a,r,l,c,d,h,p;if(!u.status.rendered)return m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updatePosition");if("static"==u.options.position.type)return m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.CANNOT_POSITION_STATIC,"updatePosition");if(o={position:{left:0,top:0},dimensions:{height:0,width:0},corner:u.options.position.corner.target},n={position:u.getPosition(),dimensions:u.getDimensions(),corner:u.options.position.corner.tooltip},"mouse"!==u.options.position.target){if("area"==u.options.position.target.get(0).nodeName.toLowerCase()){for(s=u.options.position.target.attr("coords").split(","),i=0;i<s.length;i++)s[i]=parseInt(s[i]);switch(a=u.options.position.target.parent("map").attr("name"),r=m('img[usemap="#'+a+'"]:first').offset(),o.position={left:Math.floor(r.left+s[0]),top:Math.floor(r.top+s[1])},u.options.position.target.attr("shape").toLowerCase()){case"rect":o.dimensions={width:Math.ceil(Math.abs(s[2]-s[0])),height:Math.ceil(Math.abs(s[3]-s[1]))};break;case"circle":o.dimensions={width:s[2]+1,height:s[2]+1};break;case"poly":for(o.dimensions={width:s[0],height:s[1]},i=0;i<s.length;i++)i%2==0?(s[i]>o.dimensions.width&&(o.dimensions.width=s[i]),s[i]<s[0]&&(o.position.left=Math.floor(r.left+s[i]))):(s[i]>o.dimensions.height&&(o.dimensions.height=s[i]),s[i]<s[1]&&(o.position.top=Math.floor(r.top+s[i])));o.dimensions.width=o.dimensions.width-(o.position.left-r.left),o.dimensions.height=o.dimensions.height-(o.position.top-r.top);break;default:return m.fn.qtip.log.error.call(u,4,m.fn.qtip.constants.INVALID_AREA_SHAPE,"updatePosition")}o.dimensions.width-=2,o.dimensions.height-=2}else 1===u.options.position.target.add(document.body).length?(o.position={left:m(document).scrollLeft(),top:m(document).scrollTop()},o.dimensions={height:m(window).height(),width:m(window).width()}):(void 0!==u.options.position.target.attr("qtip")?o.position=u.options.position.target.qtip("api").cache.position:o.position=u.options.position.target.offset(),o.dimensions={height:u.options.position.target.outerHeight(),width:u.options.position.target.outerWidth()});l=m.extend({},o.position),-1!==o.corner.search(/right/i)&&(l.left+=o.dimensions.width),-1!==o.corner.search(/bottom/i)&&(l.top+=o.dimensions.height),-1!==o.corner.search(/((top|bottom)Middle)|center/)&&(l.left+=o.dimensions.width/2),-1!==o.corner.search(/((left|right)Middle)|center/)&&(l.top+=o.dimensions.height/2)}else o.position=l={left:u.cache.mouse.x,top:u.cache.mouse.y},o.dimensions={height:1,width:1};if(-1!==n.corner.search(/right/i)&&(l.left-=n.dimensions.width),-1!==n.corner.search(/bottom/i)&&(l.top-=n.dimensions.height),-1!==n.corner.search(/((top|bottom)Middle)|center/)&&(l.left-=n.dimensions.width/2),-1!==n.corner.search(/((left|right)Middle)|center/)&&(l.top-=n.dimensions.height/2),c=m.browser.msie?1:0,m.browser.msie&&6===parseInt(m.browser.version.charAt(0))?1:0,0<u.options.style.border.radius&&(-1!==n.corner.search(/Left/)?l.left-=u.options.style.border.radius:-1!==n.corner.search(/Right/)&&(l.left+=u.options.style.border.radius),-1!==n.corner.search(/Top/)?l.top-=u.options.style.border.radius:-1!==n.corner.search(/Bottom/)&&(l.top+=u.options.style.border.radius)),c&&(-1!==n.corner.search(/top/)?l.top-=c:-1!==n.corner.search(/bottom/)&&(l.top+=c),-1!==n.corner.search(/left/)?l.left-=c:-1!==n.corner.search(/right/)&&(l.left+=c),-1!==n.corner.search(/leftMiddle|rightMiddle/)&&(l.top-=1)),!0===u.options.position.adjust.screen&&(l=function(t,e,i){var o,n,s,a,r;return o=this,"center"==i.corner?e.position:(n=m.extend({},t),a={x:!1,y:!1},r={left:n.left<m.fn.qtip.cache.screen.scroll.left,right:n.left+i.dimensions.width+2>=m.fn.qtip.cache.screen.width+m.fn.qtip.cache.screen.scroll.left,top:n.top<m.fn.qtip.cache.screen.scroll.top,bottom:n.top+i.dimensions.height+2>=m.fn.qtip.cache.screen.height+m.fn.qtip.cache.screen.scroll.top},(s={left:r.left&&(-1!=i.corner.search(/right/i)||-1==i.corner.search(/right/i)&&!r.right),right:r.right&&(-1!=i.corner.search(/left/i)||-1==i.corner.search(/left/i)&&!r.left),top:r.top&&-1==i.corner.search(/top/i),bottom:r.bottom&&-1==i.corner.search(/bottom/i)}).left?("mouse"!==o.options.position.target?n.left=e.position.left+e.dimensions.width:n.left=o.cache.mouse.x,a.x="Left"):s.right&&("mouse"!==o.options.position.target?n.left=e.position.left-i.dimensions.width:n.left=o.cache.mouse.x-i.dimensions.width,a.x="Right"),s.top?("mouse"!==o.options.position.target?n.top=e.position.top+e.dimensions.height:n.top=o.cache.mouse.y,a.y="top"):s.bottom&&("mouse"!==o.options.position.target?n.top=e.position.top-i.dimensions.height:n.top=o.cache.mouse.y-i.dimensions.height,a.y="bottom"),n.left<0&&(n.left=t.left,a.x=!1),n.top<0&&(n.top=t.top,a.y=!1),!1!==o.options.style.tip.corner&&(n.corner=new String(i.corner),!1!==a.x&&(n.corner=n.corner.replace(/Left|Right|Middle/,a.x)),!1!==a.y&&(n.corner=n.corner.replace(/top|bottom/,a.y)),n.corner!==o.elements.tip.attr("rel")&&f.call(o,n.corner)),n)}.call(u,l,o,n)),"mouse"===u.options.position.target&&!0===u.options.position.adjust.mouse&&(d=!0===u.options.position.adjust.screen&&u.elements.tip?u.elements.tip.attr("rel"):u.options.position.corner.tooltip,l.left+=-1!==d.search(/right/i)?-6:6,l.top+=-1!==d.search(/bottom/i)?-6:6),!u.elements.bgiframe&&m.browser.msie&&6==parseInt(m.browser.version.charAt(0))&&m("select, object").each(function(){(h=m(this).offset()).bottom=h.top+m(this).height(),h.right=h.left+m(this).width(),l.top+n.dimensions.height>=h.top&&l.left+n.dimensions.width>=h.left&&function(){var t,e;e=this.getDimensions(),t='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; height:'+e.height+"px; width:"+e.width+'px" />',this.elements.bgiframe=this.elements.wrapper.prepend(t).children(".qtip-bgiframe:first")}.call(u)}),l.left+=u.options.position.adjust.x,l.top+=u.options.position.adjust.y,p=u.getPosition(),l.left!=p.left||l.top!=p.top){if(!1===u.beforePositionUpdate.call(u,t))return u;u.cache.position=l,!0===e?(u.status.animated=!0,u.elements.tooltip.animate(l,200,"swing",function(){u.status.animated=!1})):u.elements.tooltip.css(l),u.onPositionUpdate.call(u,t),void 0!==t&&t.type&&"mousemove"!==t.type&&m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.EVENT_POSITION_UPDATED,"updatePosition")}return u},updateWidth:function(e){var t;return u.status.rendered?e&&"number"!=typeof e?m.fn.qtip.log.error.call(u,2,"newWidth must be of type number","updateWidth"):(t=u.elements.contentWrapper.siblings().add(u.elements.tip).add(u.elements.button),e||("number"==typeof u.options.style.width.value?e=u.options.style.width.value:(u.elements.tooltip.css({width:"auto"}),t.hide(),m.browser.msie&&u.elements.wrapper.add(u.elements.contentWrapper.children()).css({zoom:"normal"}),e=u.getDimensions().width+1,u.options.style.width.value||(e>u.options.style.width.max&&(e=u.options.style.width.max),e<u.options.style.width.min&&(e=u.options.style.width.min)))),e%2!=0&&(e-=1),u.elements.tooltip.width(e),t.show(),u.options.style.border.radius&&u.elements.tooltip.find(".qtip-betweenCorners").each(function(t){m(this).width(e-2*u.options.style.border.radius)}),m.browser.msie&&(u.elements.wrapper.add(u.elements.contentWrapper.children()).css({zoom:"1"}),u.elements.wrapper.width(e),u.elements.bgiframe&&u.elements.bgiframe.width(e).height(u.getDimensions.height)),m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.EVENT_WIDTH_UPDATED,"updateWidth")):m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateWidth")},updateStyle:function(t){var e,i,o,n;return u.status.rendered?"string"==typeof t&&m.fn.qtip.styles[t]?(u.options.style=v.call(u,m.fn.qtip.styles[t],u.options.user.style),u.elements.content.css(s(u.options.style)),!1!==u.options.content.title.text&&u.elements.title.css(s(u.options.style.title,!0)),u.elements.contentWrapper.css({borderColor:u.options.style.border.color}),!1!==u.options.style.tip.corner&&(m("<canvas>").get(0).getContext?(e=u.elements.tooltip.find(".qtip-tip canvas:first"),e.get(0).getContext("2d").clearRect(0,0,300,300),n=l(o=e.parent("div[rel]:first").attr("rel"),u.options.style.tip.size.width,u.options.style.tip.size.height),a.call(u,e,n,u.options.style.tip.color||u.options.style.border.color)):m.browser.msie&&(e=u.elements.tooltip.find('.qtip-tip [nodeName="shape"]')).attr("fillcolor",u.options.style.tip.color||u.options.style.border.color)),0<u.options.style.border.radius&&(u.elements.tooltip.find(".qtip-betweenCorners").css({backgroundColor:u.options.style.border.color}),m("<canvas>").get(0).getContext?(i=_(u.options.style.border.radius),u.elements.tooltip.find(".qtip-wrapper canvas").each(function(){m(this).get(0).getContext("2d").clearRect(0,0,300,300),o=m(this).parent("div[rel]:first").attr("rel"),g.call(u,m(this),i[o],u.options.style.border.radius,u.options.style.border.color)})):m.browser.msie&&u.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){m(this).attr("fillcolor",u.options.style.border.color)})),m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.EVENT_STYLE_UPDATED,"updateStyle")):m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.STYLE_NOT_DEFINED,"updateStyle"):m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateStyle")},updateContent:function(t,e){function i(){u.updateWidth(),!1!==e&&("static"!==u.options.position.type&&u.updatePosition(u.elements.tooltip.is(":visible"),!0),!1!==u.options.style.tip.corner&&r.call(u))}var o,n,s;if(!u.status.rendered)return m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateContent");if(!t)return m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateContent");if("string"==typeof(o=u.beforeContentUpdate.call(u,t)))t=o;else if(!1===o)return;return m.browser.msie&&u.elements.contentWrapper.children().css({zoom:"normal"}),t.jquery&&0<t.length?t.clone(!0).appendTo(u.elements.content).show():u.elements.content.html(t),0<(n=u.elements.content.find("img[complete=false]")).length?(s=0,n.each(function(t){m('<img src="'+m(this).attr("src")+'" />').load(function(){++s==n.length&&i()})})):i(),u.onContentUpdate.call(u),m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.EVENT_CONTENT_UPDATED,"loadContent")},loadContent:function(t,e,i){function o(t){u.onContentLoad.call(u),m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.EVENT_CONTENT_LOADED,"loadContent"),u.updateContent(t)}return u.status.rendered?(!1===u.beforeContentLoad.call(u)||("post"==i?m.post(t,e,o):m.get(t,e,o)),u):m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"loadContent")},updateTitle:function(t){return u.status.rendered?t?(returned=u.beforeTitleUpdate.call(u),!1===returned?u:(u.elements.button&&(u.elements.button=u.elements.button.clone(!0)),u.elements.title.html(t),u.elements.button&&u.elements.title.prepend(u.elements.button),u.onTitleUpdate.call(u),m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.EVENT_TITLE_UPDATED,"updateTitle"))):m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateTitle"):m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateTitle")},focus:function(t){var e,i,o;if(!u.status.rendered)return m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"focus");if("static"==u.options.position.type)return m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.CANNOT_FOCUS_STATIC,"focus");if(e=parseInt(u.elements.tooltip.css("z-index")),i=6e3+m("div.qtip[qtip]").length-1,!u.status.focused&&e!==i){if(!1===u.beforeFocus.call(u,t))return u;m("div.qtip[qtip]").not(u.elements.tooltip).each(function(){!0===m(this).qtip("api").status.rendered&&("number"==typeof(o=parseInt(m(this).css("z-index")))&&-1<o&&m(this).css({zIndex:parseInt(m(this).css("z-index"))-1}),m(this).qtip("api").status.focused=!1)}),u.elements.tooltip.css({zIndex:i}),u.status.focused=!0,u.onFocus.call(u,t),m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.EVENT_FOCUSED,"focus")}return u},disable:function(t){return u.status.rendered?(t?u.status.disabled?m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,"disable"):(u.status.disabled=!0,m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.EVENT_DISABLED,"disable")):u.status.disabled?(u.status.disabled=!1,m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.EVENT_ENABLED,"disable")):m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,"disable"),u):m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"disable")},destroy:function(){var t,e;if(!1===u.beforeDestroy.call(u))return u;if(u.status.rendered?(u.options.show.when.target.unbind("mousemove.qtip",u.updatePosition),u.options.show.when.target.unbind("mouseout.qtip",u.hide),u.options.show.when.target.unbind(u.options.show.when.event+".qtip"),u.options.hide.when.target.unbind(u.options.hide.when.event+".qtip"),u.elements.tooltip.unbind(u.options.hide.when.event+".qtip"),u.elements.tooltip.unbind("mouseover.qtip",u.focus),u.elements.tooltip.remove()):u.options.show.when.target.unbind(u.options.show.when.event+".qtip-create"),"object"==typeof u.elements.target.data("qtip")&&("object"==typeof(e=u.elements.target.data("qtip").interfaces)&&0<e.length))for(t=0;t<e.length-1;t++)e[t].id==u.id&&e.splice(t,1);return delete m.fn.qtip.interfaces[u.id],"object"==typeof e&&0<e.length?u.elements.target.data("qtip").current=e.length-1:u.elements.target.removeData("qtip"),u.onDestroy.call(u),m.fn.qtip.log.error.call(u,1,m.fn.qtip.constants.EVENT_DESTROYED,"destroy"),u.elements.target},getPosition:function(){var t,e;return u.status.rendered?((t="none"===u.elements.tooltip.css("display"))&&u.elements.tooltip.css({visiblity:"hidden"}).show(),e=u.elements.tooltip.offset(),t&&u.elements.tooltip.css({visiblity:"visible"}).hide(),e):m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getPosition")},getDimensions:function(){var t,e;return u.status.rendered?((t=!u.elements.tooltip.is(":visible"))&&u.elements.tooltip.css({visiblity:"hidden"}).show(),e={height:u.elements.tooltip.outerHeight(),width:u.elements.tooltip.outerWidth()},t&&u.elements.tooltip.css({visiblity:"visible"}).hide(),e):m.fn.qtip.log.error.call(u,2,m.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getDimensions")}})}function h(){var t,e,i,o,n;(t=this).beforeRender.call(t),t.status.rendered=!0,t.elements.tooltip='<div qtip="'+t.id+'" class="qtip '+(t.options.style.classes.tooltip||t.options.style)+'"style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;position:'+t.options.position.type+';">  <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;">    <div class="qtip-contentWrapper" style="overflow:hidden;">       <div class="qtip-content '+t.options.style.classes.content+'"></div></div></div></div>',t.elements.tooltip=m(t.elements.tooltip),t.elements.tooltip.appendTo(t.options.position.container),t.elements.tooltip.data("qtip",{current:0,interfaces:[t]}),t.elements.wrapper=t.elements.tooltip.children("div:first"),t.elements.contentWrapper=t.elements.wrapper.children("div:first").css({background:t.options.style.background}),t.elements.content=t.elements.contentWrapper.children("div:first").css(s(t.options.style)),m.browser.msie&&t.elements.wrapper.add(t.elements.content).css({zoom:1}),"unfocus"==t.options.hide.when.event&&t.elements.tooltip.attr("unfocus",!0),"number"==typeof t.options.style.width.value&&t.updateWidth(),m("<canvas>").get(0).getContext||m.browser.msie?(0<t.options.style.border.radius?function(){var t,e,i,o,n,s,a,r,l,c,d,h,p,u,f;for(e in(t=this).elements.wrapper.find(".qtip-borderBottom, .qtip-borderTop").remove(),i=t.options.style.border.width,o=t.options.style.border.radius,n=t.options.style.border.color||t.options.style.tip.color,s=_(o),a={},s)a[e]='<div rel="'+e+'" style="'+(-1!==e.search(/Left/)?"left":"right")+":0; position:absolute; height:"+o+"px; width:"+o+'px; overflow:hidden; line-height:0.1px; font-size:1px">',m("<canvas>").get(0).getContext?a[e]+='<canvas height="'+o+'" width="'+o+'" style="vertical-align: top"></canvas>':m.browser.msie&&(r=2*o+3,a[e]+='<v:arc stroked="false" fillcolor="'+n+'" startangle="'+s[e][0]+'" endangle="'+s[e][1]+'" style="width:'+r+"px; height:"+r+"px; margin-top:"+(-1!==e.search(/bottom/)?-2:-1)+"px; margin-left:"+(-1!==e.search(/Right/)?s[e][2]-3.5:-1)+'px; vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>'),a[e]+="</div>";l=t.getDimensions().width-2*Math.max(i,o),c='<div class="qtip-betweenCorners" style="height:'+o+"px; width:"+l+"px; overflow:hidden; background-color:"+n+'; line-height:0.1px; font-size:1px;">',d='<div class="qtip-borderTop" dir="ltr" style="height:'+o+"px; margin-left:"+o+'px; line-height:0.1px; font-size:1px; padding:0;">'+a.topLeft+a.topRight+c,t.elements.wrapper.prepend(d),h='<div class="qtip-borderBottom" dir="ltr" style="height:'+o+"px; margin-left:"+o+'px; line-height:0.1px; font-size:1px; padding:0;">'+a.bottomLeft+a.bottomRight+c,t.elements.wrapper.append(h),m("<canvas>").get(0).getContext?t.elements.wrapper.find("canvas").each(function(){p=s[m(this).parent("[rel]:first").attr("rel")],g.call(t,m(this),p,o,n)}):m.browser.msie&&t.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>'),u=Math.max(o,o+(i-o)),f=Math.max(i-o,0),t.elements.contentWrapper.css({border:"0px solid "+n,borderWidth:f+"px "+u+"px"})}.call(t):t.elements.contentWrapper.css({border:t.options.style.border.width+"px solid "+t.options.style.border.color}),!1!==t.options.style.tip.corner&&f.call(t)):(t.elements.contentWrapper.css({border:t.options.style.border.width+"px solid "+t.options.style.border.color}),t.options.style.border.radius=0,t.options.style.tip.corner=!1,m.fn.qtip.log.error.call(t,2,m.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,"render")),"string"==typeof t.options.content.text&&0<t.options.content.text.length||t.options.content.text.jquery&&0<t.options.content.text.length?e=t.options.content.text:"string"==typeof t.elements.target.attr("title")&&0<t.elements.target.attr("title").length?(e=t.elements.target.attr("title").replace("\\n","<br />"),t.elements.target.attr("title","")):"string"==typeof t.elements.target.attr("alt")&&0<t.elements.target.attr("alt").length?(e=t.elements.target.attr("alt").replace("\\n","<br />"),t.elements.target.attr("alt","")):(e=" ",m.fn.qtip.log.error.call(t,1,m.fn.qtip.constants.NO_VALID_CONTENT,"render")),!1!==t.options.content.title.text&&function(){var e=this;null!==e.elements.title&&e.elements.title.remove(),e.elements.title=m('<div class="'+e.options.style.classes.title+'">').css(s(e.options.style.title,!0)).css({zoom:m.browser.msie?1:0}).prependTo(e.elements.contentWrapper),e.options.content.title.text&&e.updateTitle.call(e,e.options.content.title.text),!1!==e.options.content.title.button&&"string"==typeof e.options.content.title.button&&(e.elements.button=m('<a class="'+e.options.style.classes.button+'" style="float:right; position: relative"></a>').css(s(e.options.style.button,!0)).html(e.options.content.title.button).prependTo(e.elements.title).click(function(t){e.status.disabled||e.hide(t)}))}.call(t),t.updateContent(e),function(){function e(t){!0!==n.status.disabled&&(clearTimeout(n.timers.inactive),n.timers.inactive=setTimeout(function(){m(a).each(function(){s.unbind(this+".qtip-inactive"),n.elements.content.unbind(this+".qtip-inactive")}),n.hide(t)},n.options.hide.delay))}function i(t){!0!==n.status.disabled&&("inactive"==n.options.hide.when.event&&(m(a).each(function(){s.bind(this+".qtip-inactive",e),n.elements.content.bind(this+".qtip-inactive",e)}),e()),clearTimeout(n.timers.show),clearTimeout(n.timers.hide),n.timers.show=setTimeout(function(){n.show(t)},n.options.show.delay))}function o(t){if(!0!==n.status.disabled){if(!0===n.options.hide.fixed&&-1!==n.options.hide.when.event.search(/mouse(out|leave)/i)&&0<m(t.relatedTarget).parents("div.qtip[qtip]").length)return t.stopPropagation(),t.preventDefault(),clearTimeout(n.timers.hide),!1;clearTimeout(n.timers.show),clearTimeout(n.timers.hide),n.elements.tooltip.stop(!0,!0),n.timers.hide=setTimeout(function(){n.hide(t)},n.options.hide.delay)}}var n,t,s,a;t=(n=this).options.show.when.target,s=n.options.hide.when.target,n.options.hide.fixed&&(s=s.add(n.elements.tooltip)),"inactive"==n.options.hide.when.event?a=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"]:!0===n.options.hide.fixed&&n.elements.tooltip.bind("mouseover.qtip",function(){!0!==n.status.disabled&&clearTimeout(n.timers.hide)}),1===n.options.show.when.target.add(n.options.hide.when.target).length&&n.options.show.when.event==n.options.hide.when.event&&"inactive"!==n.options.hide.when.event||"unfocus"==n.options.hide.when.event?(n.cache.toggle=0,t.bind(n.options.show.when.event+".qtip",function(t){0==n.cache.toggle?i(t):o(t)})):(t.bind(n.options.show.when.event+".qtip",i),"inactive"!==n.options.hide.when.event&&s.bind(n.options.hide.when.event+".qtip",o)),-1!==n.options.position.type.search(/(fixed|absolute)/)&&n.elements.tooltip.bind("mouseover.qtip",n.focus),"mouse"===n.options.position.target&&"static"!==n.options.position.type&&t.bind("mousemove.qtip",function(t){!(n.cache.mouse={x:t.pageX,y:t.pageY})===n.status.disabled&&!0===n.options.position.adjust.mouse&&"static"!==n.options.position.type&&"none"!==n.elements.tooltip.css("display")&&n.updatePosition(t)})}.call(t),!0===t.options.show.ready&&t.show(),!1!==t.options.content.url&&(i=t.options.content.url,o=t.options.content.data,n=t.options.content.method||"get",t.loadContent(i,o,n)),t.onRender.call(t),m.fn.qtip.log.error.call(t,1,m.fn.qtip.constants.EVENT_RENDERED,"render")}function g(t,e,i,o){var n=t.get(0).getContext("2d");n.fillStyle=o,n.beginPath(),n.arc(e[0],e[1],i,0,2*Math.PI,!1),n.fill()}function f(t){var e,i,o,n,s;null!==(e=this).elements.tip&&e.elements.tip.remove(),i=e.options.style.tip.color||e.options.style.border.color,!1!==e.options.style.tip.corner&&(t||(t=e.options.style.tip.corner),o=l(t,e.options.style.tip.size.width,e.options.style.tip.size.height),e.elements.tip='<div class="'+e.options.style.classes.tip+'" dir="ltr" rel="'+t+'" style="position:absolute; height:'+e.options.style.tip.size.height+"px; width:"+e.options.style.tip.size.width+'px; margin:0 auto; line-height:0.1px; font-size:1px;">',m("<canvas>").get(0).getContext?e.elements.tip+='<canvas height="'+e.options.style.tip.size.height+'" width="'+e.options.style.tip.size.width+'"></canvas>':m.browser.msie&&(n=e.options.style.tip.size.width+","+e.options.style.tip.size.height,s="m"+o[0][0]+","+o[0][1],s+=" l"+o[1][0]+","+o[1][1],s+=" "+o[2][0]+","+o[2][1],s+=" xe",e.elements.tip+='<v:shape fillcolor="'+i+'" stroked="false" filled="true" path="'+s+'" coordsize="'+n+'" style="width:'+e.options.style.tip.size.width+"px; height:"+e.options.style.tip.size.height+"px; line-height:0.1px; display:inline-block; behavior:url(#default#VML); vertical-align:"+(-1!==t.search(/top/)?"bottom":"top")+'"></v:shape>',e.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>',e.elements.contentWrapper.css("position","relative")),e.elements.tooltip.prepend(e.elements.tip+"</div>"),e.elements.tip=e.elements.tooltip.find("."+e.options.style.classes.tip).eq(0),m("<canvas>").get(0).getContext&&a.call(e,e.elements.tip.find("canvas:first"),o,i),-1!==t.search(/top/)&&m.browser.msie&&6===parseInt(m.browser.version.charAt(0))&&e.elements.tip.css({marginTop:-4}),r.call(e,t))}function a(t,e,i){var o=t.get(0).getContext("2d");o.fillStyle=i,o.beginPath(),o.moveTo(e[0][0],e[0][1]),o.lineTo(e[1][0],e[1][1]),o.lineTo(e[2][0],e[2][1]),o.fill()}function r(t){var e,i,o,n,s;!1!==(e=this).options.style.tip.corner&&e.elements.tip&&(t||(t=e.elements.tip.attr("rel")),i=positionAdjust=m.browser.msie?1:0,e.elements.tip.css(t.match(/left|right|top|bottom/)[0],0),-1!==t.search(/top|bottom/)?(m.browser.msie&&(6===parseInt(m.browser.version.charAt(0))?positionAdjust=-1!==t.search(/top/)?-3:1:positionAdjust=-1!==t.search(/top/)?1:2),-1!==t.search(/Middle/)?e.elements.tip.css({left:"50%",marginLeft:-e.options.style.tip.size.width/2}):-1!==t.search(/Left/)?e.elements.tip.css({left:e.options.style.border.radius-i}):-1!==t.search(/Right/)&&e.elements.tip.css({right:e.options.style.border.radius+i}),-1!==t.search(/top/)?e.elements.tip.css({top:-positionAdjust}):e.elements.tip.css({bottom:positionAdjust})):-1!==t.search(/left|right/)&&(m.browser.msie&&(positionAdjust=6===parseInt(m.browser.version.charAt(0))?1:-1!==t.search(/left/)?1:2),-1!==t.search(/Middle/)?e.elements.tip.css({top:"50%",marginTop:-e.options.style.tip.size.height/2}):-1!==t.search(/Top/)?e.elements.tip.css({top:e.options.style.border.radius-i}):-1!==t.search(/Bottom/)&&e.elements.tip.css({bottom:e.options.style.border.radius+i}),-1!==t.search(/left/)?e.elements.tip.css({left:-positionAdjust}):e.elements.tip.css({right:positionAdjust})),o="padding-"+t.match(/left|right|top|bottom/)[0],n=e.options.style.tip.size[-1!==o.search(/left|right/)?"width":"height"],e.elements.tooltip.css("padding",0),e.elements.tooltip.css(o,n),m.browser.msie&&6==parseInt(m.browser.version.charAt(0))&&(s=parseInt(e.elements.tip.css("margin-top"))||0,s+=parseInt(e.elements.content.css("margin-top"))||0,e.elements.tip.css({marginTop:s})))}function s(t,e){var i,o;for(o in i=m.extend(!0,{},t))!0===e&&-1!==o.search(/(tip|classes)/i)?delete i[o]:e||-1===o.search(/(width|border|tip|title|classes|user)/i)||delete i[o];return i}function p(t){return"object"!=typeof t.tip&&(t.tip={corner:t.tip}),"object"!=typeof t.tip.size&&(t.tip.size={width:t.tip.size,height:t.tip.size}),"object"!=typeof t.border&&(t.border={width:t.border}),"object"!=typeof t.width&&(t.width={value:t.width}),"string"==typeof t.width.max&&(t.width.max=parseInt(t.width.max.replace(/([0-9]+)/i,"$1"))),"string"==typeof t.width.min&&(t.width.min=parseInt(t.width.min.replace(/([0-9]+)/i,"$1"))),"number"==typeof t.tip.size.x&&(t.tip.size.width=t.tip.size.x,delete t.tip.size.x),"number"==typeof t.tip.size.y&&(t.tip.size.height=t.tip.size.y,delete t.tip.size.y),t}function v(){var t,e,i,o,n;for(this,e=[!0,{}],t=0;t<arguments.length;t++)e.push(arguments[t]);for(i=[m.extend.apply(m,e)];"string"==typeof i[0].name;)i.unshift(p(m.fn.qtip.styles[i[0].name]));return i.unshift(!0,{classes:{tooltip:"qtip-"+(arguments[0].name||"defaults")}},m.fn.qtip.styles.defaults),o=m.extend.apply(m,i),n=m.browser.msie?1:0,o.tip.size.width+=n,o.tip.size.height+=n,0<o.tip.size.width%2&&(o.tip.size.width+=1),0<o.tip.size.height%2&&(o.tip.size.height+=1),!0===o.tip.corner&&(o.tip.corner="center"!==this.options.position.corner.tooltip&&this.options.position.corner.tooltip),o}function l(t,e,i){var o={bottomRight:[[0,0],[e,i],[e,0]],bottomLeft:[[0,0],[e,0],[0,i]],topRight:[[0,i],[e,0],[e,i]],topLeft:[[0,0],[0,i],[e,i]],topMiddle:[[0,i],[e/2,0],[e,i]],bottomMiddle:[[0,0],[e,0],[e/2,i]],rightMiddle:[[0,0],[e,i/2],[0,i]],leftMiddle:[[e,0],[e,i],[0,i/2]]};return o.leftTop=o.bottomRight,o.rightTop=o.bottomLeft,o.leftBottom=o.topRight,o.rightBottom=o.topLeft,o[t]}function _(t){var e;return m("<canvas>").get(0).getContext?e={topLeft:[t,t],topRight:[0,t],bottomLeft:[t,0],bottomRight:[0,0]}:m.browser.msie&&(e={topLeft:[-90,90,0],topRight:[-90,90,-t],bottomLeft:[90,270,0],bottomRight:[90,270,-t]}),e}m.fn.qtip=function(t,e){var i,o,n,s,a,r,l,c;if("string"==typeof t){if("object"!=typeof m(this).data("qtip")&&m.fn.qtip.log.error.call(self,1,m.fn.qtip.constants.NO_TOOLTIP_PRESENT,!1),"api"==t)return m(this).data("qtip").interfaces[m(this).data("qtip").current];if("interfaces"==t)return m(this).data("qtip").interfaces}else t||(t={}),("object"!=typeof t.content||t.content.jquery&&0<t.content.length)&&(t.content={text:t.content}),"object"!=typeof t.content.title&&(t.content.title={text:t.content.title}),"object"!=typeof t.position&&(t.position={corner:t.position}),"object"!=typeof t.position.corner&&(t.position.corner={target:t.position.corner,tooltip:t.position.corner}),"object"!=typeof t.show&&(t.show={when:t.show}),"object"!=typeof t.show.when&&(t.show.when={event:t.show.when}),"object"!=typeof t.show.effect&&(t.show.effect={type:t.show.effect}),"object"!=typeof t.hide&&(t.hide={when:t.hide}),"object"!=typeof t.hide.when&&(t.hide.when={event:t.hide.when}),"object"!=typeof t.hide.effect&&(t.hide.effect={type:t.hide.effect}),"object"!=typeof t.style&&(t.style={name:t.style}),t.style=p(t.style),(s=m.extend(!0,{},m.fn.qtip.defaults,t)).style=v.call({options:s},s.style),s.user=m.extend(!0,{},t);return m(this).each(function(){if("string"==typeof t){if(r=t.toLowerCase(),"object"==typeof(n=m(this).qtip("interfaces")))if(!0===e&&"destroy"==r)for(;0<n.length;)n[n.length-1].destroy();else for(!0!==e&&(n=[m(this).qtip("api")]),i=0;i<n.length;i++)"destroy"==r?n[i].destroy():!0===n[i].status.rendered&&("show"==r?n[i].show():"hide"==r?n[i].hide():"focus"==r?n[i].focus():"disable"==r?n[i].disable(!0):"enable"==r&&n[i].disable(!1))}else{for((l=m.extend(!0,{},s)).hide.effect.length=s.hide.effect.length,l.show.effect.length=s.show.effect.length,!1===l.position.container&&(l.position.container=m(document.body)),!1===l.position.target&&(l.position.target=m(this)),!1===l.show.when.target&&(l.show.when.target=m(this)),!1===l.hide.when.target&&(l.hide.when.target=m(this)),o=m.fn.qtip.interfaces.length,i=0;i<o;i++)if(void 0===m.fn.qtip.interfaces[i]){o=i;break}a=new d(m(this),l,o),m.fn.qtip.interfaces[o]=a,"object"==typeof m(this).data("qtip")?(void 0===m(this).attr("qtip")&&(m(this).data("qtip").current=m(this).data("qtip").interfaces.length),m(this).data("qtip").interfaces.push(a)):m(this).data("qtip",{current:0,interfaces:[a]}),!1===l.content.prerender&&!1!==l.show.when.event&&!0!==l.show.ready?l.show.when.target.bind(l.show.when.event+".qtip-"+o+"-create",{qtip:o},function(t){(c=m.fn.qtip.interfaces[t.data.qtip]).options.show.when.target.unbind(c.options.show.when.event+".qtip-"+t.data.qtip+"-create"),c.cache.mouse={x:t.pageX,y:t.pageY},h.call(c),c.options.show.when.target.trigger(c.options.show.when.event)}):(a.cache.mouse={x:l.show.when.target.offset().left,y:l.show.when.target.offset().top},h.call(a))}})},m(document).ready(function(){var t;m.fn.qtip.cache={screen:{scroll:{left:m(window).scrollLeft(),top:m(window).scrollTop()},width:m(window).width(),height:m(window).height()}},m(window).bind("resize scroll",function(e){clearTimeout(t),t=setTimeout(function(){for("scroll"===e.type?m.fn.qtip.cache.screen.scroll={left:m(window).scrollLeft(),top:m(window).scrollTop()}:(m.fn.qtip.cache.screen.width=m(window).width(),m.fn.qtip.cache.screen.height=m(window).height()),i=0;i<m.fn.qtip.interfaces.length;i++){var t=m.fn.qtip.interfaces[i];!0===t.status.rendered&&("static"!==t.options.position.type||t.options.position.adjust.scroll&&"scroll"===e.type||t.options.position.adjust.resize&&"resize"===e.type)&&t.updatePosition(e,!0)}},100)}),m(document).bind("mousedown.qtip",function(e){0===m(e.target).parents("div.qtip").length&&m(".qtip[unfocus]").each(function(){var t=m(this).qtip("api");m(this).is(":visible")&&!t.status.disabled&&1<m(e.target).add(t.elements.target).length&&t.hide(e)})})}),m.fn.qtip.interfaces=[],m.fn.qtip.log={error:function(){return this}},m.fn.qtip.constants={},m.fn.qtip.defaults={content:{prerender:!1,text:!1,url:!1,data:null,title:{text:!1,button:!1}},position:{target:!1,corner:{target:"bottomRight",tooltip:"topLeft"},adjust:{x:0,y:0,mouse:!0,screen:!1,scroll:!0,resize:!0},type:"absolute",container:!1},show:{when:{target:!1,event:"mouseover"},effect:{type:"fade",length:100},delay:140,solo:!1,ready:!1},hide:{when:{target:!1,event:"mouseout"},effect:{type:"fade",length:100},delay:0,fixed:!1},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}},m.fn.qtip.styles={defaults:{background:"white",color:"#111",overflow:"hidden",textAlign:"left",width:{min:0,max:250},padding:"5px 9px",border:{width:1,radius:0,color:"#d3d3d3"},tip:{corner:!1,color:!1,size:{width:13,height:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},button:{cursor:"pointer"},classes:{target:"",tip:"qtip-tip",title:"qtip-title",button:"qtip-button",content:"qtip-content",active:"qtip-active"}},cream:{border:{width:3,radius:0,color:"#F9E98E"},title:{background:"#F0DE7D",color:"#A27D35"},background:"#FBF7AA",color:"#A27D35",classes:{tooltip:"qtip-cream"}},light:{border:{width:3,radius:0,color:"#E2E2E2"},title:{background:"#f1f1f1",color:"#454545"},background:"white",color:"#454545",classes:{tooltip:"qtip-light"}},dark:{border:{width:3,radius:0,color:"#303030"},title:{background:"#404040",color:"#f3f3f3"},background:"#505050",color:"#f3f3f3",classes:{tooltip:"qtip-dark"}},red:{border:{width:3,radius:0,color:"#CE6F6F"},title:{background:"#f28279",color:"#9C2F2F"},background:"#F79992",color:"#9C2F2F",classes:{tooltip:"qtip-red"}},green:{border:{width:3,radius:0,color:"#A9DB66"},title:{background:"#b9db8c",color:"#58792E"},background:"#CDE6AC",color:"#58792E",classes:{tooltip:"qtip-green"}},blue:{border:{width:3,radius:0,color:"#ADD9ED"},title:{background:"#D0E9F5",color:"#5E99BD"},background:"#E5F6FE",color:"#4D9FBF",classes:{tooltip:"qtip-blue"}}}}(jQuery),jQuery(document).ready(function(l){function c(t,e){return'<div class="alert alert-'+t+'"> <button data-dismiss="alert" type="button" class="close"><span aria-hidden="true">x</span> </button> <p class="text-small">'+e+"</p> </div>"}function e(){setTimeout(function(){var t=l(".row_content_partner").height(),e=l("body").width();0<t&&960<e&&l(".user-left-menu>.st-page-sidebar-new").css("min-height",t)},1500)}function t(t,e){"on"==l("."+t).val()?l("."+e).fadeIn(500):l("."+e).fadeOut(500),l("."+t).change(function(){"on"==l(this).val()?l("."+e).fadeIn(500):l("."+e).fadeOut(500)})}l(document).on("click",".btn_add_wishlist",function(t){var e=l(this);l.ajax({url:st_params.ajax_url,type:"POST",data:{action:"st_add_wishlist",data_id:l(this).data("id"),data_type:l(this).data("type")},dataType:"json",beforeSend:function(){}}).done(function(t){e.html(t.icon).attr("data-original-title",t.title)})}),l(document).on("click",".btn_remove_wishlist",function(t){var e=l(this);l.ajax({url:st_params.ajax_url,type:"POST",data:{action:"st_remove_wishlist",data_id:l(this).data("id"),data_type:l(this).data("type")},dataType:"json",beforeSend:function(){l(".post-"+e.attr("data-id")+" .user_img_loading").show()}}).done(function(t){"true"==t.status?l(".post-"+t.msg).html(c(t.type,t.content)).attr("data-original-title",t.title):l(".post-"+t.msg).append(c(t.type,t.content)).attr("data-original-title",t.title)})}),l(".btn_load_more_wishlist").click(function(){var e=l(this),i=e.html();l.ajax({url:st_params.ajax_url,type:"GET",data:{action:"st_load_more_wishlist",data_per:l(".btn_load_more_wishlist").attr("data-per"),data_next:l(".btn_load_more_wishlist").attr("data-next")},dataType:"json",beforeSend:function(){e.html("Loading...")}}).done(function(t){e.html(i),l("#data_whislist").append(t.msg),"true"==t.status?(console.log(t),l(".btn_load_more_wishlist").attr("data-per",t.data_per)):(l(".btn_load_more_wishlist").attr("disabled","disabled"),l(".btn_load_more_wishlist").html("No More"))})}),l("#btn_add_media").click(function(){l("#my_image_upload").click()}),l("#my_image_upload").change(function(){l("#submit_my_image_upload").click()}),l(".btn_remove_post_type").click(function(){var t=l(this);l.ajax({url:st_params.ajax_url,type:"POST",data:{action:"st_remove_post_type",data_id:l(this).attr("data-id"),data_id_user:l(this).attr("data-id-user")},dataType:"json",beforeSend:function(){l(".post-"+t.attr("data-id")+" .user_img_loading").show()}}).done(function(t){console.log(t),"true"==t.status?l(".post-"+t.msg).html(c(t.type,t.content)):l(".post-"+t.msg).append(c(t.type,t.content))})}),l("#btn_check_insert_post_type_hotel").click(function(){console.log("Submit create hotel !"),l("#btn_insert_post_type_hotel").click()}),l("#btn_check_insert_post_type_room").click(function(){var t,e,i,o,n,s,a,r=!0;1!=(e="Warning : Room Name could not left empty",""==(i=l("#"+(t="title")).val())||null==i?(l(".console_msg_"+t).html(c("danger",e)),l("#"+t).css("borderColor","red"),!1):(l(".console_msg_"+t).html(""),l("#"+t).css("borderColor","#C6DBE0"),!0))&&(r=!1),1!=(n="Warning : Room Name no shorter than 4 characters",s=4,(a=l("#"+(o="title")).val()).length==s||a.length<s?(l(".console_msg_"+o).html(c("danger",n)),l("#"+o).css("borderColor","red"),!1):(l(".console_msg_"+o).html(""),l("#"+o).css("borderColor","#C6DBE0"),!0))&&(r=!1),1==r&&(console.log("Submit create hotel !"),l("#btn_insert_post_type_room").click())}),l(document).on("click",".btn_del_price_custom",function(){l(this).parent().parent().remove()}),l("#btn_add_custom_price").click(function(){var t=l(".data_price_html").html();l(".content_data_price").append(t),l("input.date-pick, .input-daterange, .date-pick-inline").datepicker({todayHighlight:!0,weekStart:1})}),l("#btn_add_custom_price_by_number").click(function(){var t=l(".data_price_by_number_html").html();l(".content_data_price_by_number").append(t)}),l("#btn_add_extra_price").click(function(t){var e=l(".data-extra-price-html").html();l(".content_extra_price").append(e)}),l(document).on("click",".btn_del_extra_price",function(){l(this).parents(".item").remove()}),l("#btn_check_insert_post_type_tours").click(function(){console.log("Submit create Tours !"),l("#btn_insert_post_type_tours").click()}),l("#btn_check_insert_activity").click(function(){console.log("Submit create Activity !"),l("#btn_insert_post_type_activity").click()}),l("#btn_check_insert_cars").click(function(){console.log("Submit create Cars !"),l("#btn_insert_post_type_cars").click()}),l("#btn_check_insert_post_type_rental").click(function(){console.log("Submit create Rental !"),l("#btn_insert_post_type_rental").click()}),l("#btn_check_insert_post_type_cruise").click(function(){console.log("Submit create cruise !"),l("#btn_insert_post_type_cruise").click()}),l("#btn_check_insert_cruise_cabin").click(function(){console.log("Submit create cruise !"),l("#btn_insert_cruise_cabin").click()}),l("#btn_check_insert_post_type_location").click(function(){console.log("Submit create location !"),l("#btn_insert_post_type_location").click()}),l(document).on("change",".btn-file :file",function(){var t=l(this),e=t.val().replace(/\\/g,"/").replace(/.*\//,"");t.parent().parent().parent().find(".data_lable").val(e)}),l(document).on("change",".btn-file.multiple :file",function(){for(var t=l(this),e=t[0].files,i="",o=0;o<e.length;o++)i+=e[o].name+" , ";t.parent().parent().parent().find(".data_lable").val(i)}),l(".btn_del_avatar").click(function(){l("#id_avatar_user_setting").val(""),l(".data_lable").val("")}),l(".btn_load_his_withdrawal").click(function(){var e=l(this),i=e.html();l.ajax({url:st_params.ajax_url,type:"GET",data:{action:"st_load_more_list_withdrawal",paged:e.attr("data-per"),show:"json"},dataType:"json",beforeSend:function(){e.html(st_params.text_loading)}}).done(function(t){e.html(i),"true"==t.status?(console.log(t),e.attr("data-per",t.data_per),e.parent().find("#data_history_withdrawal").append(t.html)):(e.attr("disabled","disabled"),e.html(st_params.text_no_more))})}),l(".btn_load_his_book").click(function(){var e=l(this),i=e.html();l.ajax({url:st_params.ajax_url,type:"GET",data:{action:"st_load_more_history_book",paged:e.attr("data-per"),show:"json",data_type:e.attr("data-type")},dataType:"json",beforeSend:function(){e.html(st_params.text_loading)}}).done(function(t){e.html(i),"true"==t.status?(console.log(t),e.attr("data-per",t.data_per),e.parent().find("#data_history_book").append(t.html)):(e.attr("disabled","disabled"),e.html(st_params.text_no_more))})}),l("#btn_add_program").click(function(){var t=l("#html_program").html();console.log(t),l("#data_program").append(t)}),l("#btn_add_equipment_item").click(function(){var t=l("#html_equipment_item").html();console.log(t),l("#data_equipment_item").append(t)}),l("#btn_add_features").click(function(){var t=l("#html_features").html();console.log(t),l("#data_features").append(t)}),l("#btn_add_features_rental").click(function(){var t=l("#html_features_rental").html();console.log(t),l("#data_features_rental").append(t)}),l(document).on("click",".btn_del_program",function(){l(this).parent().parent().parent().remove()}),l("li.menu_partner a").click(function(){var t=l(this).next(".sub_partner").css("display");console.log(t),"none"==t?(l(this).next(".sub_partner").slideDown(500),l(".icon_partner",this).removeClass("fa-angle-left").addClass("fa-angle-down")):(l(this).next(".sub_partner").slideUp(500),l(".icon_partner",this).removeClass("fa-angle-down").addClass("fa-angle-left"))}),l(".btn_on_off_post_type_partner").click(function(){var e=l(this);l.ajax({url:st_params.ajax_url,type:"POST",data:{action:"st_change_status_post_type",data_id:l(this).attr("data-id"),data_id_user:l(this).attr("data-id-user"),status:l(this).attr("data-status")},dataType:"json",beforeSend:function(){l(".post-"+e.attr("data-id")+" .user_img_loading").show()}}).done(function(t){console.log(t),l(".post-"+e.attr("data-id")+" .user_img_loading").hide(),"true"==t.status&&("on"==e.attr("data-status")?(e.attr("data-status","off"),e.removeClass("fa-eye-slash").addClass("fa-eye")):(e.attr("data-status","on"),e.removeClass("fa-eye").addClass("fa-eye-slash")))})}),l("#add-new-facility").click(function(t){var e=l("#template").html();l("#facility-wrapper").append(e).find(".facility-item").show(),t.preventDefault()}),l("#facility-wrapper").on("click",".btn_del_facility",function(t){l(this).closest(".facility-item").remove()}),l(".btn_featured_image").click(function(){var t=l(this);t.parent().parent().find("#id_featured_image").val(""),t.parent().parent().find(".data_lable").val(""),t.parent().remove()}),l(".btn_del_logo").click(function(){var t=l(this);t.parent().parent().find("#id_logo").val(""),t.parent().parent().find(".data_lable").val(""),t.parent().remove()}),l(".btn_del_gallery").click(function(){var t=l(this);t.parent().parent().find("#id_gallery").val(""),t.parent().parent().find(".data_lable").val(""),t.parent().remove()}),l("#btn_add_custom_paid_options").click(function(){var t=l(".paid_options_html").html();console.log(t),l(".content_data_paid_options").append(t)}),l("#btn_add_custom_add_new_facility").click(function(){var t=l(".add_new_facility_html").html();console.log(t),l(".content_data_add_new_facility").append(t),l(".st_icon").each(function(){l(this).iconpicker({icons:st_icon_picker.icon_list,iconClassPrefix:" "})})}),l(document).on("click",".btn_del_custom_partner",function(){l(this).parent().parent().parent().remove()}),l("#btn_discount_by_adult").click(function(){var t=l("#html_discount_by_adult").html();console.log(t),l("#data_discount_by_adult").append(t)}),l("#btn_discount_by_child").click(function(){var t=l("#html_discount_by_child").html();console.log(t),l("#data_discount_by_child").append(t)}),l("#btn_hotel_policy").on("click",function(){var t=l("#html_hotel_policy").html();console.log(t),l("#data_hotel_policy").append(t)}),l("#btn_add_social").click(function(){var t=l("#html_add_social").html();console.log(t),l("#data_add_social").append(t)}),jQuery(window).bind("load",function(t){e()}),jQuery(window).resize(function(t){e()}),l("#st_form_add_partner .number").each(function(){l(this).change(function(){var t=l(this).val();t=parseFloat(t),isNaN(t)&&(t=0),l(this).val(t)})}),l("#st_form_add_partner input.date-pick").each(function(){var t=l(this).closest("form");l(this,t).datepicker("setStartDate","today")}),l(".check_all").on("ifClicked",function(t){var e=l(this);e.prop("checked")?e.parent().parent().parent().parent().parent().find(".item_tanoxomy").iCheck("uncheck"):e.parent().parent().parent().parent().parent().find(".item_tanoxomy").iCheck("check")}),l(".item_tanoxomy").on("ifClicked",function(t){var e=l(this),i=!0;e.parent().parent().parent().parent().parent().find(".item_tanoxomy").each(function(){var t=l(this);setTimeout(function(){""==t.prop("checked")&&(i=!1)},100)}),setTimeout(function(){1==i?e.parent().parent().parent().parent().parent().find(".check_all").iCheck("check"):e.parent().parent().parent().parent().parent().find(".check_all").iCheck("uncheck")},200)}),t("is_sale_schedule","data_is_sale_schedule"),t("st_tour_external_booking","data_st_tour_external_booking"),t("st_rental_external_booking","data_st_rental_external_booking"),t("st_activity_external_booking","data_st_activity_external_booking"),t("st_room_external_booking","data_st_room_external_booking"),t("st_car_external_booking","data_st_car_external_booking"),t("best-price-guarantee","data_best-price-guarantee"),""!=l(".deposit_payment_status").val()?l(".data_deposit_payment_status").fadeIn(500):l(".data_deposit_payment_status").fadeOut(500),l(".deposit_payment_status").change(function(){""!=l(this).val()?l(".data_deposit_payment_status").fadeIn(500):l(".data_deposit_payment_status").fadeOut(500)}),"off"==l(".is_auto_caculate").val()?l(".data_is_auto_caculate").fadeIn(500):l(".data_is_auto_caculate").fadeOut(500),l(".is_auto_caculate").change(function(){"off"==l(this).val()?l(".data_is_auto_caculate").fadeIn(500):l(".data_is_auto_caculate").fadeOut(500)}),"price_by_date"==l(".is_custom_price").val()?(l(".data_price_by_date").fadeIn(500),l(".data_price_by_number").fadeOut(0)):(l(".data_price_by_date").fadeOut(0),l(".data_price_by_number").fadeIn(500)),l(".is_custom_price").change(function(){"price_by_date"==l(this).val()?(l(".data_price_by_date").fadeIn(500),l(".data_price_by_number").fadeOut(0)):(l(".data_price_by_date").fadeOut(0),l(".data_price_by_number").fadeIn(500))}),"car_transfer"==l("#car_type").val()?(l(".car-price-type").fadeIn(),l(".car-passengers").fadeIn(),l(".car-journey").fadeIn()):(l(".car-price-type").fadeOut(),l(".car-passengers").fadeOut(),l(".car-journey").fadeOut()),l("#car_type").change(function(){"car_transfer"==l(this).val()?(l(".car-price-type").fadeIn(),l(".car-passengers").fadeIn(),l(".car-journey").fadeIn()):(l(".car-price-type").fadeOut(),l(".car-passengers").fadeOut(),l(".car-journey").fadeOut())}),setTimeout(function(){l(".div_btn_submit input[type=submit]").removeAttr("disabled")},5e3)}),jQuery(function(o){1==o("#st_form_add_partner").hasClass("success")&&(console.log("Reset"),o("#st_form_add_partner input[type=text]").val(""),o("#st_form_add_partner input[type=email]").val(""),o("#st_form_add_partner input[type=number]").val("0"),o("#st_form_add_partner .st_content").val(""),o("#st_form_add_partner textarea").html(""),o("#st_form_add_partner .user-profile-avatar").html(""),o("#st_form_add_partner .id_featured_image").val(""),o("#st_form_add_partner .id_logo").val(""),o("#st_form_add_partner .data_lable").val(""),o("#st_form_add_partner .content_data_add_new_facility").html(""),o("#st_form_add_partner .content_data_paid_options").html(""),o("#st_form_add_partner .content_data_price").html(""),o("#st_form_add_partner .selectize-input").html(""),o("#st_form_add_partner select").prop("selectedIndex",0),o("#st_form_add_partner").find(".item_tanoxomy").iCheck("uncheck")),o(".input-daterange input.st_date_start").each(function(){var i=o(this).closest("form");o(this);o(this).datepicker({language:st_params.locale,autoclose:!0,todayHighlight:!0,startDate:"today",format:o("[data-date-format]").data("date-format"),weekStart:1}).on("changeDate",function(t){var e=t.date;e.setDate(e.getDate()+1),o(".input-daterange input.st_date_end",i).datepicker("setDates",e),o(".input-daterange input.st_date_end",i).datepicker("setStartDate",e)}),o(".input-daterange input.st_date_end",i).datepicker({language:st_params.locale,startDate:"+1d",format:o("[data-date-format]").data("date-format"),autoclose:!0,todayHighlight:!0})})}),jQuery(function($){function init_canvas_detail_post_type(div_content,id_rand,post_type,lable,data_item){var id_div="canvas_detail_post_type_"+id_rand,$content=$("."+div_content);$content.html('<canvas id="'+id_div+'" height="150"></canvas>'),lable=eval(lable),data_item=eval(data_item);var color="237,​ 131,​ 35";switch(post_type){case"st_hotel":color="87, 142, 190";break;case"st_rental":color="227, 91, 90";break;case"st_cars":color="68, 182, 174";break;case"st_tours":color="135, 117, 167";break;case"st_activity":color="39, 174, 96"}var lineChartData={labels:lable,datasets:[{label:"My First",fillColor:"rgba("+color+", 0.8)",strokeColor:"rgba("+color+", 1)",pointColor:"rgba("+color+", 1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba("+color+", 1)",data:data_item}]},ctx=document.getElementById(id_div).getContext("2d");new Chart(ctx).Line(lineChartData,{responsive:!0,animationEasing:"easeOutBounce"})}if($(document).on("click",".st_menu_new li.item",function(){var t=$(this).parent(),e=$(this);0==e.hasClass("active")&&(t.find("li.item").removeClass("active").find(".sub-menu").css("display","none"),e.find(".sub-menu").fadeIn(500),e.addClass("active"))}),$(".input-date-start").each(function(){var i=$(this).closest("form");$(this);$(this).datepicker({language:st_params.locale,autoclose:!0,todayHighlight:!0,todayBtn:!0,format:$(this).data("date-format"),weekStart:1}).on("changeDate",function(t){var e=t.date;e.setDate(e.getDate()+1),$(".input-date-end",i).datepicker("setDates",e)}),$(".input-date-end",i).datepicker({language:st_params.locale,format:$(this).data("date-format"),autoclose:!0,todayBtn:!0,todayHighlight:!0,weekStart:1})}),$(document).on("click",".btn_show_custom_date",function(){var t=$(this);console.log(t.hasClass("open")),1==t.hasClass("open")?($(".div-custom-date").fadeOut(),t.removeClass("open")):($(".div-custom-date").fadeIn(),t.addClass("open"))}),$(document).on("click",".btn_cancel",function(){$(".div-custom-date").fadeOut(),$(".btn_show_custom_date").removeClass("open")}),"custom_date||"==$(".custom_select_date").val()?$(".data_custom_date").fadeIn():$(".data_custom_date").fadeOut(),$(document).on("change",".custom_select_date",function(){"custom_date||"==$(this).val()?$(".data_custom_date").fadeIn():$(".data_custom_date").fadeOut()}),$(document).on("click",".btn_show_month_by_year",function(){var e=$(this).parent().parent().parent();e.find("tr").removeClass("active"),$(this).parent().parent().addClass("active");var i=$(this),o=i.data("post-type"),t=i.data("year");$.ajax({url:st_params.ajax_url,type:"POST",data:{action:"st_load_month_by_year_partner",data_year:t,data_post_type:o},dataType:"json",beforeSend:function(){e.find(".active a.btn_show_month_by_year").html(i.data("loading"))}}).done(function(t){$(".div_single_month .data_month").html(t.html),$(".div_single_month .bc_single").html(t.bc_title),e.find(".active a.btn_show_month_by_year").html(i.data("title")),$(".div_single_year").hide(),$(".div_single_day").hide(),$(".div_single_month").fadeIn(),$(".div_single_custom").hide(),init_canvas_detail_post_type("st_div_item_canvas_month",t.id_rand,o,t.js.lable,t.js.data)}).error(function(t){console.log(t)})}),$(document).on("click",".btn_show_day_by_month_year_partner",function(){var e=$(this).parent().parent().parent();e.find("tr").removeClass("active"),$(this).parent().parent().addClass("active");var i=$(this),o=i.data("post-type"),t=i.data("year"),n=i.data("month");$.ajax({url:st_params.ajax_url,type:"POST",data:{action:"st_load_day_by_month_and_year_partner",data_year:t,data_month:n,data_post_type:o},dataType:"json",beforeSend:function(){e.find(".active a.btn_show_day_by_month_year_partner").html(i.data("loading"))}}).done(function(t){$(".div_single_day .data_day").html(t.html),$(".div_single_day .bc_single").html(t.bc_title),e.find(".active a.btn_show_day_by_month_year_partner").html(i.data("title")),$(".div_single_year").hide(),$(".div_single_month").hide(),$(".div_single_day").fadeIn(),init_canvas_detail_post_type("st_div_item_canvas_day",t.id_rand,o,t.js.lable,t.js.data)}).error(function(t){console.log(t)})}),$(document).on("click",".btn_single_all_time",function(){$(".div_single_year").fadeIn(),$(".div_single_month").hide(),$(".div_single_day").hide()}),$(document).on("click",".btn_single_year",function(){$(".div_single_year").hide(),$(".div_single_month").fadeIn(),$(".div_single_day").hide()}),$(document).on("click",".btn_all_time_show_month_by_year",function(){var e=$(this).parent().parent().parent();e.find("tr").removeClass("active"),$(this).parent().parent().addClass("active");var i=$(this),t=i.data("year");$.ajax({url:st_params.ajax_url,type:"POST",data:{action:"st_load_month_all_time_by_year_partner",data_year:t},dataType:"json",beforeSend:function(){e.find(".active a.btn_all_time_show_month_by_year").html(i.data("loading"))}}).done(function(t){$(".div_all_time_month .data_all_time_month").html(t.html),$(".div_all_time_month .bc_all_time").html(t.bc_title),e.find(".active a.btn_all_time_show_month_by_year").html(i.data("title")),$(".div_all_time_year").hide(),$(".div_all_time_day").hide(),$(".div_all_time_month").fadeIn(),$(".div_custom_month").hide(),init_canvas_detail_post_type("st_div_item_all_time_canvas_month",t.id_rand,"st_hotel",t.js.lable,t.js.data)}).error(function(t){console.log(t)})}),$(document).on("click",".btn_all_time_show_day_by_month_year_partner",function(){var e=$(this).parent().parent().parent();e.find("tr").removeClass("active"),$(this).parent().parent().addClass("active");var i=$(this),t=i.data("year"),o=i.data("month");$.ajax({url:st_params.ajax_url,type:"POST",data:{action:"st_load_day_all_time_by_month_and_year_partner",data_year:t,data_month:o},dataType:"json",beforeSend:function(){e.find(".active a.btn_all_time_show_day_by_month_year_partner").html(i.data("loading"))}}).done(function(t){$(".div_all_time_day .data_all_time_day").html(t.html),$(".div_all_time_day .bc_all_time").html(t.bc_title),e.find(".active a.btn_all_time_show_day_by_month_year_partner").html(i.data("title")),$(".div_all_time_year").hide(),$(".div_all_time_month").hide(),$(".div_all_time_day").fadeIn(),init_canvas_detail_post_type("st_div_item_all_time_canvas_day",t.id_rand,"st_hotel",t.js.lable,t.js.data)}).error(function(t){console.log(t)})}),$(document).on("click",".btn_all_time",function(){$(".div_all_time_year").fadeIn(),$(".div_all_time_month").hide(),$(".div_all_time_day").hide()}),$(document).on("click",".btn_all_time_year",function(){$(".div_all_time_year").hide(),$(".div_all_time_month").fadeIn(),$(".div_all_time_day").hide()}),$(".st_timepicker").length){var time_picker_arg={timeFormat:"hh:mm tt",showMeridian:!1};"12h"==st_params.time_format?time_picker_arg.showMeridian=!0:time_picker_arg.showMeridian=!1,$(".st_timepicker").timepicker(time_picker_arg)}$(".st_icon").each(function(){$(this).iconpicker({icons:st_icon_picker.icon_list,iconClassPrefix:" "})})}),jQuery(document).ready(function(r){1==r(".register_form").data("reset")&&(r(".register_form .data_field :input[type=text]").each(function(){r(this).val("")}),r(".data_image_certificates").each(function(){r(this).html("")})),r(".register_form .register_as").on("ifChecked",function(t){var e=r(this).val();"partner"==e&&r(".content_partner").slideDown(1e3),"normal"==e&&r(".content_partner").slideUp(1e3),console.log(e)}),"partner"==r(".register_form .register_as:checked").val()&&r(".content_partner").show(),r(".register_form .st_certificates").change(function(){r(this).data("type")});r(".register_form");if(r(".register_form").submit(function(){if(0==r(this).hasClass("update_info_partner")&&!function(){var t=!0;try{""==r("#field-user_name").val()?(r("#field-user_name").css("border-color","red"),t=!1):r("#field-user_name").css("border-color","#ccc"),""==r("#field-password").val()?(r("#field-password").css("border-color","red"),t=!1):r("#field-password").css("border-color","#ccc"),""==r("#field-email").val()?(r("#field-email").css("border-color","red"),t=!1):r("#field-email").css("border-color","#ccc"),"on"!=r(".term_condition:checked").val()?(r(".term_condition").parent().css("border-color","red"),t=!1):r(".term_condition").parent().css("border-color","#ccc")}catch(t){console.log(t)}return t}())return console.log("Error"),!1}),r("input#address").length){var e=r("input.bt_ot_gmap_input_lat"),i=r("input.bt_ot_gmap_input_lng"),o=r("#bt_ot_gmap_st_street_number"),n=r("#bt_ot_gmap_st_locality"),s=r("#bt_ot_gmap_st_route"),a=r("#bt_ot_gmap_st_sublocality_level_1"),l=r("#bt_ot_gmap_st_administrative_area_level_2"),c=r("#bt_ot_gmap_st_administrative_area_level_1"),d=r("#bt_ot_gmap_st_country"),t=r("input#address").get(0),h=new google.maps.places.Autocomplete(t);h.addListener("place_changed",function(){var t=h.getPlace();0!=t.length&&(e.val(t.geometry.location.lat()),i.val(t.geometry.location.lng()),o.val(""),n.val(""),s.val(""),a.val(""),l.val(""),c.val(""),d.val(""),r.each(t.address_components,function(t,e){-1!=r.inArray("street_number",e.types)&&o.val(e.long_name),-1!=r.inArray("locality",e.types)&&n.val(e.long_name),-1!=r.inArray("route",e.types)&&s.val(e.long_name),-1!=r.inArray("sublocality_level_1",e.types)&&a.val(e.long_name),-1!=r.inArray("administrative_area_level_2",e.types)&&l.val(e.long_name),-1!=r.inArray("administrative_area_level_1",e.types)&&c.val(e.long_name),-1!=r.inArray("country",e.types)&&d.val(e.long_name)}))})}function p(t){var i="",o="";u.length&&r.each(u,function(t,e){i+="<p class='item-location-from-to' data-index="+t+" style='padding: 5px; margin-top: 5px; border-bottom: 1px solid #CCC; background: #EEE; font-weight: bold;'>"+e.pickup_text+" -> "+e.dropoff_text+" <span class='delete-item-location-from-to'>x</span></p>",o+='<input type="hidden" name="locations_from_to[pickup][]" value="'+e.pickup+'"><input type="hidden" name="locations_from_to[dropoff][]" value="'+e.dropoff+'">'}),r("#location-car-selected").html(i),r(".location-save-data").html(o)}r(document).on("click",".paged_item_service",function(){var e=r(this).parent().parent().parent().parent(),t=r(this).data("page"),i=r(this).data("user-id"),o=r(this).data("post-type");console.log(o),r.ajax({url:st_params.ajax_url,type:"POST",data:{action:"get_list_item_service_available",data_page:t,data_user_id:i,data_post_type:o,st_ajax:1},dataType:"json",beforeSend:function(){e.find(".ajax_loader").show()}}).done(function(t){console.log(t),e.find(".data_single_partner").html(t.data),e.find(".paging_single_partner").html(t.paging),e.find(".ajax_loader").hide(),r(".st-popup-gallery").each(function(){r(this).magnificPopup({delegate:".st-gp-item",type:"image",gallery:{enabled:!0}})})})}),r(".car_location_pick_up").each(function(t,e){var n=r(this);n.select2({placeholder:n.data("placeholder"),minimumInputLength:2,ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(t,e){return{q:t,action:"st_post_select_ajax",post_type:"location"}},results:function(t,e){return{results:t.items}},cache:!0},formatResult:function(t){return t.id?t.name+"<p><em>"+t.description+"</em></p>":t.name},formatSelection:function(t){return t.id?t.name+"<p><em>"+t.description+"</em></p>":t.name},escapeMarkup:function(t){return t}}),n.on("change",function(t){console.log(typeof t.added),void 0!==t.added&&void 0!==t.added.name&&n.attr("data-name",t.added.name);var i,o=t.val;""!=o&&r(".car_location_drop_off").each(function(t,e){(i=r(this)).select2({placeholder:n.data("placeholder"),ajax:{url:ajaxurl,dataType:"json",quietMillis:250,data:function(t,e){return{action:"st_get_location_childs",location_id:o}},results:function(t,e){return{results:t.items}},cache:!0},formatResult:function(t){return t.id?t.name+"<p><em>"+t.description+"</em></p>":t.name},formatSelection:function(t){return t.id?t.name+"<p><em>"+t.description+"</em></p>":t.name},escapeMarkup:function(t){return t}}),i.on("change",function(t){void 0!==t.added&&void 0!==t.added.name&&i.attr("data-name",t.added.name)})})})});var u=st_location_from_to.lists;(p(),r("#add-location-from-to").click(function(t){r("p.location-message").html("");var e=r("input.car_location_pick_up").val(),i=r("input.car_location_drop_off").val();if(""!=e&&""!=i){var o=r("input.car_location_pick_up").attr("data-name"),n=r("input.car_location_drop_off").attr("data-name");u.push({pickup:e,pickup_text:o,dropoff:i,dropoff_text:n}),r(".car_location_drop_off").select2("data",null)}else r("p.location-message").html("Please select pick up and drop off location!");return p(),!1}),r("body").on("click",".delete-item-location-from-to",function(t){var e=r(this).parent(".item-location-from-to").data("index");u.splice(e,1),p()}),r("select#location_type").length)&&f(r("select#location_type").val());function f(t){"multi_location"==t&&(r(".multi_location_wrapper").fadeIn(),r(".location_from_to_wrapper").fadeOut()),"check_in_out"==t&&(r(".multi_location_wrapper").fadeOut(),r(".location_from_to_wrapper").fadeIn())}r("select#location_type").change(function(t){f(r(this).val())}),r(".st-select-loction").length&&r(".st-select-loction").each(function(t,e){var o,i=r(this),n=r('input[name="search"]',i),s=r(".list-location-wrapper",i);n.keyup(function(t){clearTimeout(o);var i=r(this);o=setTimeout(function(){var e=i.val().toLowerCase();""==e?r(".item",s).show():(r(".item",s).hide(),r(".item",s).each(function(){var t=r(this).data("name").toLowerCase();new RegExp(e,"g").test(t)&&r(this).show()}))},100)})}),r("#st_partner_payout").change(function(){var t=r(this).val();console.log(t),"paypal"==t&&(r(".content_partner_paypal").show(),r(".content_partner_stripe").hide()),"stripe"==t&&(r(".content_partner_paypal").hide(),r(".content_partner_stripe").show())});var m=r("#st_partner_payout").val();"paypal"==m&&(r(".content_partner_paypal").show(),r(".content_partner_stripe").hide()),"stripe"==m&&(r(".content_partner_paypal").hide(),r(".content_partner_stripe").show()),r(".st_partner_payout_item .item-pay").click(function(){r(".st_partner_payout_item").find(".item-pay").removeClass("active"),r(this).parent().find(".st_partner_payout").iCheck("check"),r(this).addClass("active");var t=r(this).parent().find(".st_partner_payout").val();r(".item.st_partner_payout_item").hide(),r(".st_partner_payout_item_"+t).fadeIn(500),r(".item.st_partner_payout_item.control").fadeIn(500)}),r(".st_partner_payout_item .item-pay").each(function(){if(r(this).hasClass("active")){var t=r(this).parent().find(".st_partner_payout").val();r(".st_partner_payout_item_"+t).fadeIn(500),r(".item.st_partner_payout_item.control").fadeIn(500)}}),r(document).on("click",".btn_del_withdrawal",function(t){var e=r(this),i=(e.parent().html(),e.parent().parent());r.ajax({url:st_params.ajax_url,type:"POST",data:{action:"st_remove_withdrawal",data_user_id:r(this).data("user-id"),data_date_create:r(this).data("date-create")},dataType:"json",beforeSend:function(){e.parent().html('<img src="'+st_params.loading_url+'" />')}}).done(function(t){"true"==t.status&&i.fadeOut()})}),r("body").on("click",".confirm-cancel-booking",function(t){t.preventDefault();var i=r(this);r("#cancel-booking-modal").on("show.bs.modal",function(t){var e=r(this);r(".modal-content-inner",e).empty(),r(".overlay-form",e).fadeIn()}),r("#cancel-booking-modal").on("shown.bs.modal",function(t){var o=r(this),e={action:"st_get_cancel_booking_step_1",order_id:i.data("order_id"),order_encrypt:i.data("order_encrypt")};r.post(st_params.ajax_url,e,function(t,e,i){"object"==typeof t&&(r(".modal-content-inner",o).html(t.message),o.data("order_id",t.order_id),o.data("order_encrypt",t.order_encrypt),r(".modal-footer button.next",o).attr("id",t.step)),r(".overlay-form",o).fadeOut()},"json")})});var g=!1;r("body").on("click","#next-to-step-2",function(t){t.preventDefault();var e=r(this),o=e.closest("#cancel-booking-modal");if(g)return!1;g=!0,r(".overlay-form",o).fadeIn(),e.addClass("hidden");var i={action:"st_get_cancel_booking_step_2",order_id:o.data("order_id"),order_encrypt:o.data("order_encrypt"),why_cancel:r('input[name="why_cancel"]',o).val(),detail:r("textarea",o).val()};r.post(st_params.ajax_url,i,function(t,e,i){"object"==typeof t&&(r(".modal-content-inner",o).html(t.message),o.data("order_id",t.order_id),o.data("order_encrypt",t.order_encrypt),r(".modal-footer button.next",o).attr("id",t.step)),r(".overlay-form",o).fadeOut(),g=!1},"json")});var v=!1;r("body").on("click","#next-to-step-3",function(t){t.preventDefault();var i,o=r(this).closest("#cancel-booking-modal"),e=r("form",o);if(g)return!1;if(v=!(g=!0),r(".overlay-form",o).fadeIn(),$validate=(i=!0,r(".required",e).each(function(t,e){""==r(this).val()?(i=!1,r(this).addClass("error")):r(this).removeClass("error")}),i),0==$validate)return r(".overlay-form",o).fadeOut(),g=!1;var n=e.serializeArray();n.push({name:"action",value:"st_get_cancel_booking_step_3"},{name:"order_id",value:o.data("order_id")},{name:"order_encrypt",value:o.data("order_encrypt")}),r.post(st_params.ajax_url,n,function(t,e,i){"object"==typeof t&&(r(".modal-content-inner",o).html(t.message),r(".overlay-form",o).fadeOut(),v=!(g=!1),r("button.next",o).attr("id",t.step).addClass("hidden"))},"json")}),r("#cancel-booking-modal").on("hidden.bs.modal",function(t){var e=r(this);e.off("show.bs.modal shown.bs.modal"),r(".overlay-form",e).fadeOut(),r(".modal-content-inner",e).empty(),e.data("order_id",""),e.data("order_encrypt",""),v&&window.location.reload()}),r("body").on("change",'#cancel-booking-modal input[name="why_cancel"]',function(t){t.preventDefault();var e=r(this),i=e.parents("form"),o=(e.closest("#cancel-booking-modal"),e.val()),n=e.data("text");void 0!==o&&""!=o?r(".modal-footer button.next").removeClass("hidden"):r(".modal-footer button.next").addClass("hidden"),"other"==o?r("textarea",i).val("").removeClass("hide"):r("textarea",i).val(n).addClass("hide")}),r("body").on("change",'#cancel-booking-modal input[name="select_account"]',function(t){t.preventDefault();var e=r(this),i=e.parents("form"),o=(e.closest("#cancel-booking-modal"),e.val());if(void 0!==o&&""!=o?r(".modal-footer button.next").removeClass("hidden"):r(".modal-footer button.next").addClass("hidden"),void 0!==o&&""!=o){var n=r('.form-get-account [data-value="'+o+'"]').html();r(".form-get-account-inner",i).html(n)}else r(".form-get-account-inner",i).html("")}),r("body").on("click",".with_a_refund",function(t){t.preventDefault()}),r("#with-refund-modal").on("hidden.bs.modal",function(t){var e=r(this);e.off("show.bs.modal shown.bs.modal"),r(".overlay-form",e).fadeOut(),r(".modal-content-inner",e).empty(),e.data("order_id",""),e.data("order_encrypt",""),y&&window.location.reload()}),r("body").on("click",".with_a_refund",function(t){t.preventDefault();var i=r(this);r("#with-refund-modal").on("show.bs.modal",function(t){var e=r(this);r(".modal-content-inner",e).empty(),r(".overlay-form",e).fadeIn()}),r("#with-refund-modal").on("shown.bs.modal",function(t){var o=r(this),e={action:"st_get_refund_infomation",order_id:i.data("order_id"),order_encrypt:i.data("order_encrypt")};r.post(st_params.ajax_url,e,function(t,e,i){"object"==typeof t&&(r(".modal-content-inner",o).html(t.message),o.data("order_id",t.order_id),o.data("order_encrypt",t.order_encrypt),r(".modal-footer button.next",o).attr("id",t.step).removeClass("hidden")),r(".overlay-form",o).fadeOut()},"json")})});var _=!1,y=!1;r("body").on("click","#st_check_complete_refund",function(t){t.preventDefault();var e=r(this),o=e.closest("#with-refund-modal");if(_)return!1;_=!0,r(".overlay-form",o).fadeIn(),e.addClass("hidden");var i={action:"st_check_complete_refund",order_id:o.data("order_id"),order_encrypt:o.data("order_encrypt")};r.post(st_params.ajax_url,i,function(t,e,i){"object"==typeof t&&(r(".modal-content-inner",o).html(t.message),1==t.status&&(y=!0)),r(".overlay-form",o).fadeOut(),_=!1},"json")}),r(document).on("click",".btn_save_and_preview",function(t){r(".save_and_preview").val("true"),r(".btn_partner_submit_form").click()}),r(".user-alert").each(function(){var t=r(this);r(".alert-close",t).click(function(){return t.removeClass("open"),r(".alert-overlay").removeClass("open"),!1})}),r(document).on("click",".refund_via_paypal_adaptive",function(t){var s=r(this),a=r(this).parent(),e={action:"st_refund_via_paypal_adaptive",order_id:r(this).data("order-id")};s.addClass("loading"),a.find(".message").html(""),r.post(st_params.ajax_url,e,function(t,e,i){s.removeClass("loading");var o="danger";"true"==t.status&&(o="success",s.attr("disabled","disabled"));var n='<div class="alert alert-'+o+' mt20">'+t.message+"</div>";a.find(".message").html(n),console.log(t)},"json")}),r("#btn_check_insert_post_type_flight").click(function(){console.log("Submit create Tours !"),r("#btn_insert_post_type_flight").click()}),(r("body").hasClass("edit-tours")||r("body").hasClass("create-tours"))&&(r("select#tour_price_by").length&&"person"==r("select#tour_price_by").val()?(r(".fixed_price").hide(),r(".people_price").show(),r(".tour-calendar-price-fixed").hide(),r(".tour-calendar-price-person").show(),r("#calendar_price_type").val("person"),r("input#adult-price-bulk, input#children-price-bulk, input#infant-price-bulk").parent().parent().removeClass("hide"),r("input#base-price-bulk").val("").parent().parent().addClass("hide")):(r(".fixed_price").show(),r(".people_price").hide(),r(".tour-calendar-price-fixed").show(),r(".tour-calendar-price-person").hide(),r("#calendar_price_type").val("fixed"),r("input#adult-price-bulk, input#children-price-bulk, input#infant-price-bulk").val("").parent().parent().addClass("hide"),r("input#base-price-bulk").parent().parent().removeClass("hide")),r("select#tour_price_by").change(function(t){price_type=r(this).val(),"person"==price_type?(r(".fixed_price").hide(),r(".people_price").show(),r(".tour-calendar-price-fixed").hide(),r(".tour-calendar-price-person").show(),r("#calendar_price_type").val("person"),r("input#adult-price-bulk, input#children-price-bulk, input#infant-price-bulk").parent().parent().removeClass("hide"),r("input#base-price-bulk").val("").parent().parent().addClass("hide")):(r(".fixed_price").show(),r(".people_price").hide(),r(".tour-calendar-price-fixed").show(),r(".tour-calendar-price-person").hide(),r("#calendar_price_type").val("fixed"),r("input#adult-price-bulk, input#children-price-bulk, input#infant-price-bulk").val("").parent().parent().addClass("hide"),r("input#base-price-bulk").parent().parent().removeClass("hide"))}))}),jQuery,jQuery("#st_enable_javascript").html(".search-tabs-bg > .tabbable >.tab-content > .tab-pane{display: none; opacity: 0;}.search-tabs-bg > .tabbable >.tab-content > .tab-pane.active{display: block; opacity: 1;}"),jQuery(document).ready(function(d){"use strict";if(d("[name=st_utm]").length,d(".top-user-area-lang a.current_langs").click(function(t){t.preventDefault()}),d("#wp_is_mobile").length<=0){var t=d("ul.slimmenu").data("title");d("ul.slimmenu").length&&d("ul.slimmenu").slimmenu({resizeWidth:"992",collapserTitle:t,animSpeed:250,indentChildren:!0,childrenIndenter:"",expandIcon:"<i class='fa fa-angle-down'></i>",collapseIcon:"<i class='fa fa-angle-up'></i>"})}d(".countdown").each(function(){var i=d(this);d(this).countdown({zeroCallback:function(t){var e=(e=new Date).setHours(e.getHours()+130);d(i).attr("data-countdown",e),d(i).countdown({unixFormat:!0})}})}),d(".booking-filters-title").each(function(t,e){""!=d(this).text()&&(d(this).addClass("arrow"),d(this).click(function(t){d(this).stop(!0,!1).toggleClass("closed").next().slideToggle()}))}),d(".btn").button(),d("[rel='tooltip']").tooltip(),d(".form-group").each(function(){var t=d(this),e=t.find("input");e.focus(function(){t.addClass("form-group-focus")}),e.blur(function(){e.val()?t.addClass("form-group-filled"):t.removeClass("form-group-filled"),t.removeClass("form-group-focus")})});var s="";d(".typeahead_drop_off_address").length&&d(".typeahead_drop_off_address").typeahead({hint:!0,highlight:!0,minLength:3,limit:8},{source:function(t,e){if(console.log(s),0<s.length)return d.ajax({dataType:"json",type:"get",url:"http://gd.geobytes.com/AutoCompleteCity?callback=?&filter="+s+"&q="+t,chache:!1,success:function(t){var i=[];d.each(t,function(t,e){i.push({value:e})}),e(i)}})}}),d(".typeahead_pick_up_address").keyup(function(){d(".typeahead_drop_off_address").each(function(){d(this).attr("disabled","disabled"),d(this).css("background","#eee"),d(this).val("")})}),d(".typeahead_pick_up_address").length&&(d(".typeahead_pick_up_address").typeahead({hint:!0,highlight:!0,minLength:3,limit:8},{source:function(t,e){return d.ajax({dataType:"json",type:"get",url:"http://gd.geobytes.com/AutoCompleteCity?callback=?&q="+t,chache:!1,success:function(t){var i=[];d.each(t,function(t,e){i.push({value:e})}),e(i)}})}}),d(".typeahead_pick_up_address").bind("typeahead:selected",function(t,e,i){var o=d(this).val(),n=d(this);jQuery.getJSON("http://gd.geobytes.com/GetCityDetails?callback=?&fqcn="+o,function(t){n.attr("data-country",t.geobytesinternet),s=t.geobytesinternet,console.log(s),d(".typeahead_drop_off_address").each(function(){d(this).removeAttr("disabled"),d(this).css("background","#fff")})})}),d(".typeahead_pick_up_address").each(function(){var t=d(this).val(),e=d(this);0<t.length&&jQuery.getJSON("http://gd.geobytes.com/GetCityDetails?callback=?&fqcn="+t,function(t){e.attr("data-country",t.geobytesinternet),s=t.geobytesinternet,console.log(s)})})),d(".county_pick_up").each(function(){var t=d(this).data("address"),e=d(this);0<t.length&&jQuery.getJSON("http://gd.geobytes.com/GetCityDetails?callback=?&fqcn="+t,function(t){e.val(t.geobytesinternet)})}),d(".county_drop_off").length&&d(".county_drop_off").each(function(){var t=d(this).data("address"),e=d(this);0<t.length&&jQuery.getJSON("http://gd.geobytes.com/GetCityDetails?callback=?&fqcn="+t,function(t){e.val(t.geobytesinternet)})}),d(".typeahead_address").length&&d(".typeahead_address").typeahead({hint:!0,highlight:!0,minLength:3,limit:8},{source:function(t,e){return d.ajax({dataType:"json",type:"get",url:"http://gd.geobytes.com/AutoCompleteCity?callback=?&q="+t,chache:!1,success:function(t){var i=[];d.each(t,function(t,e){i.push({value:e})}),e(i)}})}}),d(".typeahead").length&&d(".typeahead").typeahead({hint:!0,highlight:!0,minLength:3,limit:8},{source:function(t,e){return d.ajax({dataType:"json",type:"get",url:"http://gd.geobytes.com/AutoCompleteCity?callback=?&q="+t,chache:!1,success:function(t){var i=[];d.each(t,function(t,e){i.push({value:e})}),e(i)}})}}),d(".typeahead_location").length&&d(".typeahead_location").typeahead({hint:!0,highlight:!0,minLength:3,limit:8},{source:function(t,e){return d.ajax({dataType:"json",type:"get",url:st_params.ajax_url,data:{security:st_params.st_search_nonce,action:"st_search_location",s:t},cache:!0,success:function(t){var i=[];t.data&&(d.each(t.data,function(t,e){i.push({value:e.title,location_id:e.id,type_color:"success",type:e.type})}),e(i))}})},templates:{suggestion:Handlebars.compile('<p><label class="label label-{{type_color}}">{{type}}</label><strong> {{value}}</strong></p>')}}),d(".typeahead_location").bind("typeahead:selected",function(t,e,i){d(this).parents(".form-group").find(".location_id").val(e.location_id)}),d(".typeahead_location").keyup(function(){d(this).parents(".form-group").find(".location_id").val("")}),d("input.date-pick, .date-pick-inline").length&&d("input.date-pick, .date-pick-inline").datepicker({todayHighlight:!0,weekStart:1}).on("changeDate",function(t){d(this).datepicker("hide")});var e=d(".st_single_rental").length,i=d(".st_single_hotel_room").length;0<e||0<i||d('.input-daterange input[name="start"]').each(function(){var i=d(this).closest("form");d(this);d(this).datepicker({language:st_params.locale,autoclose:!0,todayHighlight:!0,startDate:"today",format:d("[data-date-format]").data("date-format"),weekStart:1}).on("changeDate",function(t){var e=t.date;e.setDate(e.getDate()+1),d('.input-daterange input[name="end"]',i).datepicker("remove"),d('.input-daterange input[name="end"]',i).datepicker({language:st_params.locale,startDate:"+1d",format:d("[data-date-format]").data("date-format"),autoclose:!0,todayHighlight:!0,weekStart:1}),d('.input-daterange input[name="end"]',i).datepicker("setDates",e),d('.input-daterange input[name="end"]',i).datepicker("setStartDate",e)}),d('.input-daterange input[name="end"]',i).datepicker({language:st_params.locale,startDate:"+1d",format:d("[data-date-format]").data("date-format"),autoclose:!0,todayHighlight:!0,weekStart:1})}),d(".pick-up-date").each(function(){var i=d(this).closest("form");d(this);d(this).datepicker({language:st_params.locale,startDate:"today",format:d("[data-date-format]").data("date-format"),todayHighlight:!0,autoclose:!0,weekStart:1}),d(this).on("changeDate",function(t){var e=t.date;e.setDate(e.getDate()),d(".drop-off-date",i).datepicker("setDates",e),d(".drop-off-date",i).datepicker("setStartDate",e)}),d(".drop-off-date",i).datepicker({language:st_params.locale,startDate:"today",todayHighlight:!0,autoclose:!0,format:d("[data-date-format]").data("date-format"),weekStart:1})}),0<d(".tour_book_date").length&&0<d(".tour_book_date").val().length?(d(".tour_book_date").datepicker("setStartDate","today"),d(".tour_book_date").datepicker("setDates",d(".tour_book_date").val())):d(".tour_book_date").length&&(d(".tour_book_date").datepicker("setStartDate","today"),d(".tour_book_date").datepicker("setDates","today"));var o,n={minuteStep:15,showInpunts:!1,defaultTime:"current"};function a(){if(0!=d("#owl-carousel-slider").length)if(0!=d(".bg-front .search-tabs").length){var t=d(".bg-front .search-tabs").outerHeight(!0)+20;t+=parseInt(d(".bg-front .search-tabs").css("top"),10),d(".top-area").height(t)}else{var e=d(window).height()-d("#st_header_wrap").height(),i=.5*d(window).height();0!=d(".top-area").length&&d(".top-area").height(e),0!=d(".special-area").length&&d(".special-area").height(i)}}function r(){if(0!=d(".top-area.is_form #slide-testimonial").length){var t=d(".search-tabs").height()+parseInt(d(".search-tabs").css("top"),10)+20+35;d(".top-area.is_form").height(t)}}if("12h"==st_params.time_format?n.showMeridian=!0:n.showMeridian=!1,d("input.time-pick").each(function(){d(this).timepicker(n)}),d(document).on("click",".popup-text",function(t){setTimeout(function(){d("input.time-pick").each(function(){d(this).timepicker(n)})},1e3)}),d("input.date-pick-years").length&&d("input.date-pick-years").datepicker({startView:2,weekStart:1}),d(".booking-item-price-calc .checkbox label").click(function(){var o,t=d(this).find("input"),e=d(t).prop("checked"),n=parseInt(d(this).find("span.pull-right").html().replace("$","")),i=d("#car-equipment-total"),s=d("#car-total"),a=parseInt(i.attr("data-value")),r=parseInt(s.attr("data-value")),l=function(t,e,i){return o=function(){return i?e.attr("data-value",t+n):e.attr("data-value",t-n)},d({val:t}).animate({val:parseInt(o().attr("data-value"))},{duration:500,easing:"swing",step:function(){i?e.text(Math.ceil(this.val)):e.text(Math.floor(this.val))}})};e?(l(a,i,!1),l(r,s,!1)):(l(a,i,!0),l(r,s,!0))}),d("div.bg-parallax").each(function(){var i=d(this);992<d(window).width()&&d(window).scroll(function(){var t;t=i.hasClass("bg-blur")?10:15;var e="50% "+-d(window).scrollTop()/t+"px";i.css("background-position",e)})}),d(document).ready(function(){var t=d("#owl-carousel"),e=t.attr("data-items"),i=d("#owl-carousel-slider, .owl-carousel-slider"),o=d("#owl-carousel-slider, .owl-carousel-slider").data("effect");i.attr("data-nav");if(t.length&&t.owlCarousel({items:e,navigation:!0,navigationText:["",""]}),i.length&&i.owlCarousel({slideSpeed:300,paginationSpeed:400,singleItem:!0,navigation:!0,pagination:!1,navigationText:["",""],transitionStyle:o,autoPlay:4500}),d("#main-footer").length){var n=d(window).height(),s=d("#main-footer").height(),a=d("#main-footer").position().top+s;a<n&&d("#main-footer").css("margin-top",n-a+"px")}}),a(),r(),d(window).resize(function(){clearTimeout(o),o=setTimeout(function(){a(),r()},500)}).resize(),d(document).on("click","#required_dropoff,.expand_search_box",function(t){t.preventDefault();var e=d(this).html();d(this).html(d(this).attr("data-change")),d(this).attr({"data-change":e}),d(this).parent(".same_location").next(".form-drop-off ").toggleClass("field-hidden"),d(this).parent(".same_location").next(".form-drop-off ").hasClass("field-hidden")?(d('input[name="required_dropoff"]').prop("checked",!0),d(this).parent(".same_location").next(".form-drop-off ").addClass("field-hidden")):(d('input[name="required_dropoff"]').prop("checked",!1),d(this).parent(".same_location").next(".form-drop-off ").removeClass("field-hidden")),setTimeout(function(){var t=d(".div_fleid_search_map").height();d(".div_btn_search_map").find(".btn_search_2").height(t)},0),setTimeout(a(),500),setTimeout(r(),500)}),d("#myTab a[data-toggle='tab']").on("shown.bs.tab",function(t){if(t.target,0<d(".st-slider-location").length){var e=d(".search-tabs").outerHeight(!0)+20;d(".top-area").height(e)}if(0<d("#slide-testimonial").length){e=d(".search-tabs").height()+parseInt(d(".search-tabs").css("top"),10)+20;d(".top-area").height(e)}a()}),d(document).ready(function(){d("#slide-testimonial").each(function(){var t=d(this);t.owlCarousel({slideSpeed:d(this).attr("data-speed"),paginationSpeed:400,pagination:!1,itemsCustom:[[0,1],[400,1],[768,1],[1024,1]],navigation:d(this).data("data-navigation"),navigationText:["",""],transitionStyle:d(this).data("effect"),autoPlay:t.attr("data-play")})})}),d(".nav-drop").click(function(){d(this).hasClass("active-drop")?d(this).removeClass("active-drop"):(d(".nav-drop").removeClass("active-drop"),d(this).addClass("active-drop"))}),d(document).mouseup(function(t){var e=d(".nav-drop");e.is(t.target)||0!==e.has(t.target).length||d(".nav-drop").removeClass("active-drop")}),d(".range-slider").each(function(){var t=d(this).data("min"),e=d(this).data("max"),i=d(this).data("step");d(this).ionRangeSlider({min:t,max:e,from:t,to:e,step:i,grid:!0,grid_snap:!0,prettify:!1,postfix:" km",type:"double",force_edges:!0})}),d(".price-slider").each(function(){var t=d(this).data("min"),e=d(this).data("max"),i=d(this).data("step"),o=d(this).val().split(";"),n=d(this).data("symbol"),s=o[1],a={min:t,max:e,type:"double",prefix:n,prettify:!1,step:i,grid_snap:!0,grid:!0,onFinish:function(t){var e,i,o,n,s;console.log(t),e=t,i=d('input[name="price_range"]'),o=Math.round(parseInt(e.from)/1),n=Math.round(parseInt(e.to)/1),s=o+";"+n,i.val(s)},from:o=o[0],to:s,force_edges:!0};"on"==st_params.currency_rtl_support&&(delete a.prefix,a.postfix=n),i||delete a.grid_snap,d(this).ionRangeSlider(a)}),d(".i-check, .i-radio").iCheck({checkboxClass:"i-check",radioClass:"i-radio"}),d("#roundtrip").prop("checked")?d("#roundtrip").parents(".row").find(".form-group-transfer-end").show():d("#roundtrip").parents(".row").find(".form-group-transfer-end").hide(),d("#roundtrip").on("ifChanged",function(t){d(this).prop("checked")?d(this).parents(".row").find(".form-group-transfer-end").show():d(this).parents(".row").find(".form-group-transfer-end").hide()}),d(".transfer-map").each(function(){if("undefined"!=typeof google){var t=d(this),e=d(".transfer-map-content",t).get(0),s=new google.maps.LatLngBounds,a=new google.maps.Map(e,{zoom:10,center:{lat:0,lng:0},scrollwheel:!1,disableDefaultUI:!0}),r={preserveViewport:!0,suppressMarkers:!0,routeIndex:0},l=new google.maps.DirectionsService,c=t.data("route");"object"==typeof c&&d.each(c.routes,function(i,o){var t={origin:new google.maps.LatLng(o.origin.lat,o.origin.lng),destination:new google.maps.LatLng(o.destination.lat,o.destination.lng),travelMode:google.maps.TravelMode.DRIVING},n=new google.maps.DirectionsRenderer(r);n.setMap(a),l.route(t,function(t,e){if(e==google.maps.DirectionsStatus.OK){if(n.setDirections(t),1<c.routes.length){if("oneway"==c.oneway&&i<c.routes.length-1){new google.maps.Marker({position:new google.maps.LatLng(o.origin.lat,o.origin.lng),title:o.origin.title,label:o.origin.title,map:a});s.extend(new google.maps.LatLng(o.origin.lat,o.origin.lng))}if("oneway"==c.oneway&&i==c.routes.length-1){new google.maps.Marker({position:new google.maps.LatLng(o.origin.lat,o.origin.lng),title:o.origin.title,label:o.origin.title,map:a});s.extend(new google.maps.LatLng(o.origin.lat,o.origin.lng));new google.maps.Marker({position:new google.maps.LatLng(o.destination.lat,o.destination.lng),title:o.destination.title,label:o.destination.title,map:a});s.extend(new google.maps.LatLng(o.destination.lat,o.destination.lng))}if("oneway"!=c.oneway){new google.maps.Marker({position:new google.maps.LatLng(o.origin.lat,o.origin.lng),title:o.origin.title,label:o.origin.title,map:a});s.extend(new google.maps.LatLng(o.origin.lat,o.origin.lng))}}else{new google.maps.Marker({position:new google.maps.LatLng(o.origin.lat,o.origin.lng),title:o.origin.title,label:o.origin.title,map:a});s.extend(new google.maps.LatLng(o.origin.lat,o.origin.lng));new google.maps.Marker({position:new google.maps.LatLng(o.destination.lat,o.destination.lng),title:o.destination.title,label:o.destination.title,map:a});s.extend(new google.maps.LatLng(o.destination.lat,o.destination.lng))}a.fitBounds(s)}})})}}),d(".form-booking-car-transfer").each(function(){var i=d(this),o=i.closest(".booking-item"),n=d(".overlay-form",o);d(".message",o).attr("class","message").html(""),i.submit(function(t){t.preventDefault(),n.fadeIn();var e=i.serializeArray();d.post(st_params.ajax_url,e,function(t){"object"==typeof t&&(0==t.status?d(".message",o).addClass(t.class).html(t.message):window.location.href=t.redirect),n.fadeOut()},"json")})}),d(".booking-item-review-expand").click(function(t){var e=d(this).parent(".booking-item-review-content");e.hasClass("expanded")?e.removeClass("expanded"):e.addClass("expanded")}),d(".expand_search_box").click(function(t){var e=d(this).parent(".search_advance");e.hasClass("expanded")?e.removeClass("expanded"):e.addClass("expanded")}),d(".stats-list-select > li > .booking-item-rating-stars > li").each(function(){var t=d(this).parent(),e=t.children(),i=d(this).index(),o=t.parent();d(this).hover(function(){for(var t=0;t<e.length&&t<=i;t++)d(e[t]).addClass("hovered");d(this).click(function(){for(var t=0;t<e.length;t++)t<=i?d(e[t]).addClass("selected"):d(e[t]).removeClass("selected");o.children(".st_review_stats").val(i+1)})},function(){e.removeClass("hovered")})}),d(".booking-item-container").children(".booking-item").click(function(t){d(this).hasClass("active")?(d(this).removeClass("active"),d(this).parent().removeClass("active")):(d(this).addClass("active"),d(this).parent().addClass("active"),d(this).delay(1500).queue(function(){d(this).addClass("viewed")}))}),d("#map-canvas").length){var l,c=40.7564971,h=-73.9743277;d("#google-map-tab").attr("data-lat")&&d("#google-map-tab").attr("data-long")&&(c=d("#google-map-tab").attr("data-lat"),h=d("#google-map-tab").attr("data-long")),jQuery(function(i){i(document).ready(function(){var e=new google.maps.LatLng(c,h),t={zoom:16,center:e,mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:!1};l=new google.maps.Map(document.getElementById("map-canvas"),t),new google.maps.Marker({position:e,map:l}).setMap(l),i('a[href="#google-map-tab"]').on("shown.bs.tab",function(t){google.maps.event.trigger(l,"resize"),l.setCenter(e)})})})}d(".card-select > li").click(function(){var t=this;d(t).addClass("card-item-selected"),d(t).siblings("li").removeClass("card-item-selected"),d(".form-group-cc-number input").click(function(){d(t).removeClass("card-item-selected")})}),d(".popup-gallery").each(function(){d(this).magnificPopup({delegate:"a.popup-gallery-image",type:"image",gallery:{enabled:!0}})}),d(".st-popup-gallery").each(function(){d(this).magnificPopup({delegate:".st-gp-item",type:"image",gallery:{enabled:!0}})}),d(".popup-image").length&&d(".popup-image").magnificPopup({type:"image"}),d(".popup-text").length&&d(".popup-text").magnificPopup({removalDelay:500,closeBtnInside:!0,callbacks:{beforeOpen:function(){this.st.mainClass=this.st.el.attr("data-effect")}},midClick:!0}),d(".popup-iframe").length&&d(".popup-iframe").magnificPopup({dispableOn:700,type:"iframe",removalDelay:160,mainClass:"mfp-fade",preloader:!1}),d(".form-group-select-plus").each(function(){var t=d(this),e=t.find(".btn-group").first(),i=t.find("select");3==e.children("label").last().index()&&e.children("label").last().click(function(){e.addClass("hidden"),i.removeClass("hidden")}),e.children("label").click(function(){var t=d(this);i.find("option[value="+t.children("input").val()+"]").prop("selected","selected"),t.hasClass("active")||i.trigger("change")})}),d(document).ready(function(){var t=d("#twitter-ticker").find(".tweet-list"),e=function(){setTimeout(function(){t.find("li:first").animate({marginTop:"-4.7em"},850,function(){d(this).detach().appendTo(t).removeAttr("style")}),e()},5e3)};e()}),d(function(){d(".ri-grid").each(function(){var t=d(this);void 0!==d.fn.gridrotator&&t.gridrotator({rows:t.attr("data-row"),columns:t.attr("data-col"),animType:"random",animSpeed:1200,interval:t.attr("data-speed"),step:"random",preventClick:!1,maxStep:2,w992:{rows:5,columns:4},w768:{rows:6,columns:3},w480:{rows:8,columns:3},w320:{rows:8,columns:2},w240:{rows:6,columns:4}})})}),d(function(){void 0!==d.fn.gridrotator&&d("#ri-grid-no-animation").gridrotator({rows:4,columns:8,slideshow:!1,w1024:{rows:4,columns:6},w768:{rows:3,columns:3},w480:{rows:4,columns:4},w320:{rows:5,columns:4},w240:{rows:6,columns:4}})});setInterval(function(){d(".div_tagline").each(function(){var t=d(this).find(".tagline ul li.active");t.removeClass("active").addClass("vs-out"),setTimeout(function(){t.removeClass("vs-out")},500);var e=t.next("li");e.length||(e=d(this).find(".tagline ul li").first()),e.addClass("active")})},2500);function p(t,e,i,o){var n,s,a=n=o-i;switch(a=a<=0?0:Math.ceil(a/3600/24),st_single_car.check_booking_days_included&&a++,e){case"day":case"per_day":t*=a;break;case"hour":case"per_hour":s=Math.ceil(n/3600),st_single_car.check_booking_days_included&&s++,t*=s}return t}function u(t){if(!t)return st_params.free_text;t=function(t,e,i,o){t=(t+"").replace(/[^0-9+\-Ee.]/g,"");var n=isFinite(+t)?+t:0,s=isFinite(+e)?Math.abs(e):0,a=void 0===o?",":o,r=void 0===i?".":i,l="";3<(l=(s?(c=n,d=s,h=Math.pow(10,d),""+(Math.round(c*h)/h).toFixed(d)):""+Math.round(n)).split("."))[0].length&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a));var c,d,h;(l[1]||"").length<s&&(l[1]=l[1]||"",l[1]+=new Array(s-l[1].length+1).join("0"));return l.join(r)}(t,st_params.booking_currency_precision,st_params.decimal_separator,st_params.thousand_separator);var e=st_params.currency_symbol,i="";switch(st_params.currency_position){case"right":i=t+e;break;case"left_space":i=e+" "+t;break;case"right_space":i=t+" "+e;break;case"left":default:i=e+t}return i}function f(t){return t="0"+t,t=parseFloat(t)}function m(t,e,i,o){var n=screen.width/2-i/2,s=screen.height/2-o/2;return window.open(t,e,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width="+i+", height="+o+", top="+s+", left="+n)}d("#submit").addClass("btn btn-primary"),d(".st-like-review").click(function(t){t.preventDefault();var e=d(this);if(!e.hasClass("loading")){var i=e.data("id"),o=d('<i class="loading_icon fa fa-spinner fa-spin"></i>');e.addClass("loading"),e.before(o),d.ajax({url:st_params.ajax_url,type:"post",dataType:"json",data:{action:"like_review",comment_ID:i},success:function(t){t.status?(t.data.like_status?e.addClass("fa-thumbs-o-down").removeClass("fa-thumbs-o-up"):e.addClass("fa-thumbs-o-up").removeClass("fa-thumbs-o-down"),null!=typeof t.data.like_count&&(t.data.like_count=parseInt(t.data.like_count),e.parent().find(".text-color .number").html(" "+t.data.like_count))):t.error.error_message&&alert(t.error.error_message),e.removeClass("loading"),o.remove()},error:function(t){console.log(t),alert("Ajax Faild"),e.removeClass("loading"),o.remove()}})}}),d(".st-like-comment").click(function(t){t.preventDefault();var e=d(this);if(!e.hasClass("loading")){var i=e.data("id"),o=d('<i class="loading_icon fa fa-spinner fa-spin"></i>');e.addClass("loading"),e.before(o),d.ajax({url:st_params.ajax_url,type:"post",dataType:"json",data:{action:"like_review",comment_ID:i},success:function(t){console.log(t),t.status?(t.data.like_status?e.addClass("fa-heart").removeClass("fa-heart-o"):e.addClass("fa-heart-o").removeClass("fa-heart"),null!=typeof t.data.like_count&&(t.data.like_count=parseInt(t.data.like_count),e.next(".text-color").html(" "+t.data.like_count))):t.error.error_message&&alert(t.error.error_message),e.removeClass("loading"),o.remove()},error:function(t){console.log(t),alert("Ajax Faild"),e.removeClass("loading"),o.remove()}})}}),d(".booking-item-price-calc .equipment").length&&(d(".booking-item-price-calc .equipment").on("ifChanged",function(t){var s=0,a=new Object,r=[],l=d(".car_booking_form [name=check_in_timestamp]").val(),c=d(".car_booking_form [name=check_out_timestamp]").val();d(".singe_cars").find(".equipment").each(function(t){if(1==d(this)[0].checked){f(d(this).attr("data-price"));var e=f(d(this).attr("data-price-max")),i=1,o=d(this).closest(".equipment-list");d('select[name="number_equipment"]',o).length&&(i=parseInt(d('select[name="number_equipment"]',o).val())),a[d(this).attr("data-title")]=f(d(this).attr("data-price"))*i,f(d(this).attr("data-price"))*i*d(this).data("number-unit"),s+=f(d(this).attr("data-convert-price"))*i*d(this).data("number-unit"),r.push({title:d(this).attr("data-title"),price:f(d(this).attr("data-price")),price_unit:d(this).data("price-unit"),price_max:d(this).data("price-max"),number_item:i});var n=p(f(d(this).attr("data-price"))*i,d(this).data("price-unit"),l,c);e<n&&0<e&&(n=e),n}}),d(".data_price_items").val(JSON.stringify(a)),d(".st_selected_equipments").val(JSON.stringify(r));for(var e=0;e<r.length;e++);var i=s+f(d(".st_cars_price").attr("data-value")),o=d(".car_booking_form [name=price]").val(),n=d(".car_booking_form [name=time]").val();d(".car_booking_form [name=price_unit]").val(),d(".car_booking_form [name=price_rate]").val();o=parseFloat(o),n=parseFloat(n);d(".car_booking_form .st_cars_price").data("value");d(".st_data_car_equipment_total").html(u(s)),d(".st_data_car_total").html(u(i)),d(".data_price_total").val(i)}),d('.booking-item-price-calc select[name="number_equipment"]').each(function(){d(this).change(function(){var s=0,a=new Object,r=[],l=d(".car_booking_form [name=check_in_timestamp]").val(),c=d(".car_booking_form [name=check_out_timestamp]").val();l=d(".car_booking_form [name=check_in_timestamp]").val(),c=d(".car_booking_form [name=check_out_timestamp]").val();d(".singe_cars").find(".equipment").each(function(t){if(1==d(this)[0].checked){f(d(this).attr("data-price"));var e=f(d(this).attr("data-price-max")),i=1,o=d(this).closest(".equipment-list");d('select[name="number_equipment"]',o).length&&(i=parseInt(d('select[name="number_equipment"]',o).val())),a[d(this).attr("data-title")]=f(d(this).attr("data-price"))*i,f(d(this).attr("data-price"))*i*d(this).data("number-unit"),s+=f(d(this).attr("data-convert-price"))*i*d(this).data("number-unit"),r.push({title:d(this).attr("data-title"),price:f(d(this).attr("data-price")),price_unit:d(this).data("price-unit"),price_max:d(this).data("price-max"),number_item:i});var n=p(f(d(this).attr("data-price"))*i,d(this).data("price-unit"),l,c);e<n&&0<e&&(n=e),n}}),d(".data_price_items").val(JSON.stringify(a)),d(".st_selected_equipments").val(JSON.stringify(r));var t=s+f(d(".st_cars_price").attr("data-value")),e=d(".car_booking_form [name=price]").val(),i=d(".car_booking_form [name=time]").val();d(".car_booking_form [name=price_unit]").val(),d(".car_booking_form [name=price_rate]").val();e=parseFloat(e),i=parseFloat(i);d(".car_booking_form .st_cars_price").data("value");d(".st_data_car_equipment_total").html(u(s)),d(".st_data_car_total").html(u(t)),d(".data_price_total").val(t)})})),d(".share li>a").click(function(){var t=d(this).attr("href");if(t&&0==d(this).hasClass("no-open"))return m(t,"",600,600),!1}),d(".social_login_nav_drop .login_social_link").click(function(){return m(d(this).attr("href"),"",600,450),!1}),d(document).on("click",".social_login_nav_drop .login_social_link",function(t){return m(d(this).attr("href"),"",600,450),!1}),d(".btn_show_year").click(function(){d(".head_control a").removeClass("active"),d(this).addClass("active"),d(".st_reports").show(1e3)}),d(".btn_show_year").hasClass("active")&&d(".st_reports").show(1e3);var g=d(".activity_booking_form"),v=d(".activity_booking_form .message_box");d(".activity_booking_form input[type=submit]").click(function(){if(!function(){var t=!0;v.html(""),v.removeClass("alert");var e=g.find(".check_in").val(),i=g.find(".check_out").val();try{0<e.length&&0<i.length?t=!0:(t=!1,v.html('<div class="alert alert-danger">'+st_hotel_localize.is_not_select_date+"</div>"))}catch(t){console.log(t)}return t}())return!1;g.submit()}),g.find(".check_in").each(function(){d(this).datepicker("setDates","today")}),setTimeout(function(){d(".bg-video").show().css("display","block")},2e3),d(window).load(function(){d(".bg-video").show().css("display","block")})}),jQuery(document).ready(function(o){o(".form-custom-taxonomy .item_tanoxomy").on("ifClicked",function(t){var e=o(this),i="";e.parent().parent().parent().parent().parent().find(".item_tanoxomy").each(function(){var t=o(this);setTimeout(function(){t.prop("checked")&&(i+=t.val()+",")},100)}),setTimeout(function(){console.log(i),e.parent().parent().parent().parent().parent().find(".data_taxonomy").val(i)},200)})}),jQuery(document).ready(function(t){t(".st_list_rental_room").length&&t(".st_list_rental_room").owlCarousel({items:4,navigation:!0,navigationText:["",""],slideSpeed:1e3})}),jQuery(window).load(function(){window.setTimeout(function(){jQuery(".bg-video").css("display","table")},2e3)}),jQuery(function(t){if(0<t(".owl_carousel_style2").length){var e=t(window).height();0<t(".room_bgr_with_form").height()&&(e=t(".room_bgr_with_form").height()),"absolute"===t(".owl_carousel_style2").css("position")&&(e+=t("#menu2").height()),t(".owl_carousel_style2").height(e)}if(1024<t(window).width()){var i=t(window).height()-t(".form_bottom").height();t(".top-are-fix").height(i)}}),jQuery(document).ready(function(o){o(document).on("click","._show_wc_cart_item_information_btn",function(t){t.preventDefault();var e=o(this).attr("data-hide"),i=o(this).html();o(this).attr({"data-hide":i}),o(this).html(e)})}),jQuery(document).ready(function(a){a(".search_advance:not(.expanded) input,.search_advance:not(.expanded) select").attr({disabled:"disabled"}),a(document).on("click",".search_advance",function(t){t.preventDefault(),a(this).hasClass("expanded")?a(this).find("select, input").removeAttr("disabled"):a(this).find("select, input").attr({disabled:"disabled"})}),a("form.main-search").submit(function(t){var i=!0;return a("input.required, select.required, textarea.required",this).each(function(t,e){console.log(a(this).val()),""==a(this).val()?(a(this).addClass("error"),a(this).closest(".form-group").find(".bootstrap-select").addClass("error"),i&&(i=!1)):(a(this).removeClass("error"),a(this).closest(".form-group").find(".bootstrap-select").removeClass("error"))}),!!i}),a(".register_form .st_register_service").on("ifChecked",function(t){var e=a(this).parent().parent().parent().parent().parent();e.find(".col-md-7").show(500),e.find(".col-md-2").show(500)}),a(".register_form .st_register_service").on("ifUnchecked",function(t){var e=a(this).parent().parent().parent().parent().parent();e.find(".col-md-7").hide(500),e.find(".col-md-2").hide(500)}),a(".register_form .st_register_service").on("ifClicked",function(t){var e=a(this),i=!1;e.parent().parent().parent().parent().parent().parent().find(".st_register_service").each(function(){var t=a(this);setTimeout(function(){console.log(t.prop("checked")),1==t.prop("checked")&&(i=!0)},100)}),setTimeout(function(){console.log(i),1==i?e.parent().parent().parent().parent().parent().parent().find(".col-md-8").show():e.parent().parent().parent().parent().parent().parent().find(".col-md-8").hide()},200)});var e=!1;a(".register_form").find(".st_register_service").each(function(){var t=a(this);setTimeout(function(){console.log(t.prop("checked")),1==t.prop("checked")&&(e=!0)},100)}),setTimeout(function(){1==e?a(".register_form").find(".col-md-8").show():a(".register_form").find(".col-md-8").hide()},200),a(".register_form").find(".st_register_service").each(function(){var e=a(this);setTimeout(function(){if(console.log(e.prop("checked")),1==e.prop("checked")){var t=e.parent().parent().parent().parent().parent();t.find(".col-md-7").show(500),t.find(".col-md-2").show(500)}},100)}),a(".btn_partner_send_email_user").click(function(){var e=a(this).parent().parent().parent(),t=e.find(".name").val(),i=e.find(".email").val(),o=e.find(".message").val(),n=e.find(".user_id").val(),s=!0;""==t?(e.find(".name").css("border-color","red"),s=!1):(e.find(".name").css("border-color","#ccc"),s=!0),""==i?(s=!1,e.find(".email").css("border-color","red")):(e.find(".email").css("border-color","#ccc"),s=!0),""==o?(s=!1,e.find(".message").css("border-color","red")):(e.find(".message").css("border-color","#ccc"),s=!0),1==s&&(e.find(".ajax_loader").show(),a.ajax({url:st_params.ajax_url,type:"post",dataType:"json",data:{action:"send_email_for_user_partner",st_name:t,st_email:i,st_content:o,user_id:n},success:function(t){console.log(t),e.find(".ajax_loader").hide(),e.find(".msg").html(t.msg)},error:function(t){}}))}),0<a(".st_social_login_success_check").length&&(window.opener.location.reload(),window.close()),a(".tours-filters input[type=checkbox],.hotel-filters input[type=checkbox],.hotel-filters input[type=checkbox],.tours-filters input[type=checkbox]").on("ifClicked",function(t){var e=a(this).data("url");e&&(window.location.href=e)}),a(".cars-filters input[type=checkbox]").on("ifClicked",function(t){var e=a(this).attr("data-url");e&&(window.location.href=e)}),a(".st_login_form_popup").on("submit",function(t){t.preventDefault(),a.ajax({url:st_params.ajax_url,type:"POST",data:{action:"st_login_popup",user_login:a(this).find("#pop-login_name").attr("value"),user_password:a(this).find("#pop-login_password").attr("value")},dataType:"json",beforeSend:function(){a(".btn-submit-form img").show()},complete:function(t){var e=t.responseText;e=a.parseJSON(e),a(".btn-submit-form img").hide(),e.error?(a(".notice_login").html(e.message),a(".popup_forget_pass").show()):window.location.href=e.need_link},error:function(t){}})}),a(".register_form_popup").on("submit",function(t){t.preventDefault();a(".register_form_popup").serializeArray();var e=new FormData(a(".register_form_popup")[0]);a.ajax({url:st_params.ajax_url,type:"POST",data:e,dataType:"json",processData:!1,contentType:!1,beforeSend:function(){a(".btn-submit-form img").show()},complete:function(t){var e=t.responseText;e=a.parseJSON(e),a(".btn-submit-form img").hide(),a(".notice_register").html(e.notice),e.error||(a(".register_form_popup .data_field :input[type=text]").each(function(){a(this).val("")}),a(".register_form_popup .data_field :input[type=password]").each(function(){a(this).val("")}),a(".data_image_certificates").each(function(){a(this).html("")}))},error:function(t){}})})}),jQuery(document).ready(function(r){r(".flickr_items").each(function(){var t=r(this).data("uid"),s=r(this),a=r(this).data("num");console.log(a),t&&r.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id="+t+"&format=json&jsoncallback=?",function(t){for(var e=0;e<=a;e++){var i=t.items[e],o=i.media.m.replace("_m.jpg","_s.jpg");console.log(e);var n=r("<li><a title='"+i.title+"' href='"+i.link+"' target='_blank'><img width=\"75px\" height=\"75px\" src='"+o+"' /></a></li>");s.append(n)}})})}),jQuery(document).ready(function(i){i("#show-mini-cart-button").click(function(t){return i(this).parent().find(".traveler-cart-mini").toggleClass("open"),!1}),i(".i-check").on("ifChanged",function(){var e=i(this);setTimeout(function(){var t=e.data("url");console.log(t),t&&(window.location.href=t)},500)})}),jQuery(document).ready(function(o){function e(){var t=o(".top-user-area").parent(".get_location_weather");t.remove(),o(window).width()<=992?o(".menu_div").after(t):o(".slimmenu-menu-collapser").parent(".nav").parent(".col-lg-8").after(t)}function i(){var t=o(window).width(),e=(t-1170+30)/2;t<1380&&(e=(t-1170+30)/2),t<1199&&(e=(t-970+30)/2),t<991&&(e=(t-750+30)/2),t<767&&(e=15),o(".st-new-fullwidth").css({width:t+"px",left:"-"+e+"px",position:"relative"})}function n(){var t=o(window).height()-o("#st_header_wrap").height();0<o("#wpadminbar").length&&(t-=o("#wpadminbar").height()),t<480&&(t=480),o(".st-full-height").css({height:t+"px"})}function s(t){var e=[];return"style_normal"==t&&(e=[{featureType:"road.highway",elementType:"geometry",stylers:[{saturation:60},{lightness:-20}]}]),"style_midnight"==t&&(e=[{featureType:"all",elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#000000"},{lightness:40}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#000000"},{lightness:16}]},{featureType:"all",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:17},{weight:1.2}]},{featureType:"administrative.country",elementType:"labels",stylers:[{visibility:"on"},{lightness:"0"}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{visibility:"on"},{lightness:"13"}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#000000"},{lightness:21}]},{featureType:"road",elementType:"all",stylers:[{visibility:"on"},{saturation:"-100"},{lightness:"-20"},{invert_lightness:!0}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#bebebe"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{visibility:"on"},{lightness:"-47"}]},{featureType:"road",elementType:"labels.text.stroke",stylers:[{lightness:"-33"},{weight:"0.52"}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{visibility:"on"},{color:"#b5b5b5"},{saturation:"-1"},{gamma:"0.00"},{weight:"2.22"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{lightness:"0"},{visibility:"on"},{weight:"2.8"},{color:"#585858"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#909090"},{lightness:"2"},{weight:"0.2"},{visibility:"off"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{lightness:"16"},{color:"#595959"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{lightness:"-63"},{weight:"1"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#000000"},{lightness:18},{visibility:"on"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{visibility:"on"},{lightness:"10"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{visibility:"on"},{lightness:"28"}]},{featureType:"road.arterial",elementType:"labels.text.stroke",stylers:[{visibility:"on"},{weight:"0.1"},{lightness:"-96"}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#000000"},{lightness:16}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#000000"},{lightness:19}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#12161a"},{lightness:17}]}]),"style_family_fest"==t&&(e=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry.fill",stylers:[{visibility:"on"},{saturation:"-6"}]},{featureType:"poi",elementType:"geometry.stroke",stylers:[{visibility:"on"}]},{featureType:"poi",elementType:"labels",stylers:[{visibility:"on"},{weight:"1.30"}]},{featureType:"poi",elementType:"labels.text",stylers:[{visibility:"on"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{visibility:"on"}]},{featureType:"poi",elementType:"labels.icon",stylers:[{visibility:"on"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#52978e"},{visibility:"on"}]}]),"style_open_dark"==t&&(e=[{featureType:"all",elementType:"labels.text.fill",stylers:[{color:"#ffffff"}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#3e606f"},{weight:2},{gamma:.84}]},{featureType:"all",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"administrative",elementType:"geometry",stylers:[{weight:.6},{color:"#1a3541"}]},{featureType:"landscape",elementType:"all",stylers:[{visibility:"on"},{color:"#293c4d"}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#2c5a71"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{color:"#293c4d"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#406d80"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#2c5a71"}]},{featureType:"road",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#1f3035"},{lightness:-37}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#406d80"}]},{featureType:"transit",elementType:"labels.icon",stylers:[{hue:"#00d1ff"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#193341"}]}]),"style_riverside"==t&&(e=[{featureType:"administrative",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{visibility:"on"}]},{featureType:"administrative",elementType:"labels",stylers:[{visibility:"on"},{color:"#716464"},{weight:"0.01"}]},{featureType:"administrative.country",elementType:"geometry",stylers:[{visibility:"on"}]},{featureType:"administrative.country",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"administrative.country",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"landscape",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{visibility:"simplified"}]},{featureType:"landscape.natural.landcover",elementType:"geometry",stylers:[{visibility:"simplified"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"poi",elementType:"geometry.fill",stylers:[{visibility:"simplified"}]},{featureType:"poi",elementType:"geometry.stroke",stylers:[{visibility:"simplified"}]},{featureType:"poi",elementType:"labels.text",stylers:[{visibility:"simplified"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{visibility:"simplified"}]},{featureType:"poi",elementType:"labels.text.stroke",stylers:[{visibility:"simplified"}]},{featureType:"poi.attraction",elementType:"geometry",stylers:[{visibility:"on"}]},{featureType:"poi.business",elementType:"geometry",stylers:[{visibility:"off"}]},{featureType:"poi.business",elementType:"geometry.fill",stylers:[{visibility:"off"}]},{featureType:"poi.government",elementType:"geometry",stylers:[{visibility:"off"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{visibility:"off"}]},{featureType:"poi.school",elementType:"geometry",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{visibility:"on"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#787878"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{visibility:"simplified"},{color:"#a05519"},{saturation:"-13"}]},{featureType:"road.highway",elementType:"labels.text",stylers:[{color:"#fcfcfc"},{visibility:"on"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#636363"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{weight:"4.27"},{color:"#ffffff"}]},{featureType:"road.highway",elementType:"labels.icon",stylers:[{visibility:"on"},{weight:"0.01"}]},{featureType:"road.local",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"transit",elementType:"geometry",stylers:[{visibility:"simplified"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{visibility:"on"}]},{featureType:"water",elementType:"all",stylers:[{visibility:"simplified"},{color:"#84afa3"},{lightness:52}]},{featureType:"water",elementType:"geometry",stylers:[{visibility:"on"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{visibility:"on"},{color:"#7ca0a4"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#ffffff"}]}]),"style_ozan"==t&&(e=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{visibility:"on"},{weight:1},{color:"#003867"}]},{featureType:"administrative",elementType:"labels.text.stroke",stylers:[{visibility:"on"},{weight:8}]},{featureType:"road.highway",elementType:"geometry",stylers:[{visibility:"on"},{color:"#E1001A"},{weight:.4}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{visibility:"on"},{color:"#edeff1"},{weight:.2}]},{featureType:"road.local",elementType:"geometry",stylers:[{visibility:"on"},{color:"#edeff1"},{weight:.4}]}]),"style_icy_blue"==t&&(e=[{stylers:[{hue:"#2c3e50"},{saturation:250}]},{featureType:"road",elementType:"geometry",stylers:[{lightness:50},{visibility:"simplified"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"off"}]}]),e}o("input.required-field").each(function(t,e){var i=o(this).parents("form");1==o(this).prop("checked")?o(".form-drop-off",i).addClass("field-hidden"):o(".form-drop-off",i).removeClass("field-hidden")}),jQuery(window).bind("load",function(t){e()}),jQuery(window).resize(function(t){e(),n(),i()}),i(),n(),o(window).load(function(){if(0<o(".tour-gallery").length){var t=o(".tour-gallery");t.owlCarousel({items:1,center:!0,loop:!0,autoPlay:7e3,itemsDesktop:[1199,1],itemsDesktopSmall:[979,1],itemsTablet:[768,1],itemsTabletSmall:!1,itemsMobile:[479,1],dots:!1}),t.parent().find(".owl-prev").click(function(){t.trigger("owl.prev")}),t.parent().find(".owl-next").click(function(){t.trigger("owl.next")})}}),o(".on_the_map .btn-on-map").each(function(){o(this).on("click",function(t){t.preventDefault();var e=o(this).parent().parent();o(this).toggleClass("active"),o(this).hasClass("active")?o(this).text(o(this).data("hide")):o(this).text(o(this).data("no-hide")),e.find(".st-tour-map").toggleClass("st-hide"),e.find(".review-price").toggleClass("active")})}),window.__={};var t=o("#st-tour-map-new");if(0<t.length&&"object"==typeof google){var a="style_normal";null!=t.data("style")&&(a=t.data("style"));var r=!0;0==t.data("autoload_map")&&(r=!1),window.__.map_data={map_element:t,location:t.data("location"),style:s(a),style_name:a,map:{},map_width:0,map_height:0,marker:{},marker_data:t.data("marker-data"),autoload:r,marker_icon:t.data("marker-icon")},o(".on_the_map .btn-on-map").on("click",function(t){t.preventDefault(),__.map_data.autoload||(__.map_render.loadmap(),__.map_render.on(),__.map_render.responsive(),__.map_data.autoload=!0)}),o(window).load(function(){__.map_data.autoload||(__.map_render.loadmap(),__.map_render.on(),__.map_render.responsive(),__.map_data.autoload=!0)});var l=function(){};l.prototype.init=function(){__.map_data.autoload&&(__.map_render.loadmap(),__.map_render.on())},l.prototype.loadmap=function(){if(__.map_data.map=new google.maps.Map(__.map_data.map_element[0],{scrollwheel:!1,zoom:parseInt(__.map_data.location.zoom),center:new google.maps.LatLng(parseFloat(__.map_data.location.lat),parseFloat(__.map_data.location.lng)),styles:__.map_data.style,mapTypeId:google.maps.MapTypeId.ROADMAP,zoomControl:!1,mapTypeControl:!1,scaleControl:!1,streetViewControl:!1,rotateControl:!1,fullscreenControl:!1,mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DEFAULT,mapTypeIds:[google.maps.MapTypeId.ROADMAP,google.maps.MapTypeId.TERRAIN]}}),__.map_data.map,null!=__.map_data.marker_data&&""!=__.map_data.marker_data){var t="";"style_midnight"==__.map_data.style_name&&(t="dark"),__.map_data.marker=new RichMarker({position:new google.maps.LatLng(parseFloat(__.map_data.location.lat),parseFloat(__.map_data.location.lng)),map:__.map_data.map,draggable:!1,shadow:"none",animation:google.maps.Animation.DROP,content:'<div class="padding-bottom30 '+t+'"><div class="large-marker-hotel "><div class="bg-thumb" style="background: url('+__.map_data.marker_data.thumb+')"></div><div class="caption"><h3 class="title">'+__.map_data.marker_data.title+'</h3><span class="location">'+__.map_data.marker_data.in+"</span></div></div></div>"})}else new google.maps.Marker({position:new google.maps.LatLng(parseFloat(__.map_data.location.lat),parseFloat(__.map_data.location.lng)),map:__.map_data.map,draggable:!1,icon:__.map_data.marker_icon,animation:google.maps.Animation.DROP});this.loadmap.fullHeight=function(){var t=o(window).width();if(__.map_data.full_height){var e=o(window).height();if(e<480&&(e=480),0<o("#wpadminbar").length&&(e-=o("#wpadminbar").height()),0<o(".topbar  .no-transparent").length&&991<t)e-=o(".topbar  .no-transparent").height();e<480&&(e=480),t<parseInt(__.map_data.check_width)&&0<parseInt(__.map_data.check_width)&&(e=300),__.map_data.map_element.height(e)}},__.map_render.loadmap.fullHeight(),__.map_render.action()},l.prototype.responsive=function(){__.map_data.autoload&&__.map_render.loadmap.fullHeight(),google.maps.event.trigger(__.map_data.map,"resize")},l.prototype.action=function(t,e){this.action.clickZoomControl=function(t){switch(t){case"my-location":var i=new google.maps.Marker({clickable:!1,icon:new google.maps.MarkerImage("https://maps.gstatic.com/mapfiles/ms2/micons/green-dot.png"),shadow:null,zIndex:999,map:__.map_data.map});navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(t){var e=new google.maps.LatLng(t.coords.latitude,t.coords.longitude);i.setPosition(e),__.map_data.map.panTo(e)},function(t){});break;case"zoom-in":var e=__.map_data.map.getZoom();__.map_data.map.setZoom(e+1);break;case"zoom-out":var o=__.map_data.map.getZoom();__.map_data.map.setZoom(o-1)}},this.action.clickViewControl=function(t,e){switch(t){case"full-screen":__.map_data.map_width=__.map_data.map_element.css("width"),__.map_data.map_height=__.map_data.map_element.css("height"),__.map_data.map_element.css({position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"dark","z-index":"9999999"}),o(".st-tour-map .zoom-control").css({"z-index":1e7,position:"fixed"}),o(".st-tour-map .view-control").css({"z-index":1e7,position:"fixed"}),__.map_data.map_element.closest(".st-tour-map").css({position:"fixed",top:0,left:0,"z-index":"9999999"}),google.maps.event.trigger(__.map_data.map,"resize"),o(".full-screen").toggle(),o(".exit-full-screen").toggle();break;case"exit-full-screen":__.map_data.map_element.css({position:"relative","z-index":0,top:0,width:__.map_data.map_width,height:__.map_data.map_height,backgroundColor:"transparent"}),__.map_data.map_element.closest(".st-tour-map").css({position:"absolute",top:0,left:0,"z-index":"2"}),o(".st-tour-map .zoom-control").css({"z-index":1,position:"absolute"}),640<o(window).width()?o(".st-tour-map .view-control").css({"z-index":1,position:"absolute"}):o(".st-tour-map .view-control").css({"z-index":99,position:"absolute"}),o(".full-screen").toggle(),o(".exit-full-screen").toggle();break;case"view":e.element.hasClass("active")?(e.element.removeClass("active"),o(".st-tour-map .view-control .map_type").fadeOut(300)):(e.element.addClass("active"),o(".st-tour-map .view-control .map_type").fadeIn(300))}},this.action.clickMapType=function(t){if(__.map_data.style_name!=t){__.map_data.style_name=t,__.map_data.style=s(t);var e=new google.maps.StyledMapType(__.map_data.style);__.map_data.map.mapTypes.set("styled_map",e),__.map_data.map.setMapTypeId("styled_map")}}},l.prototype.on=function(){o("body").on("click",".map-content-marker .icon_marker",function(t){t.preventDefault(),__.map_render.action.clickMarker({element:o(this)})}),o(".st-tour-map .zoom-control a").each(function(){o(this).on("click",function(t){t.preventDefault(),__.map_render.action.clickZoomControl(o(this).attr("class"))})}),o(".st-tour-map .view-control a").each(function(){o(this).on("click",function(t){t.preventDefault(),__.map_render.action.clickViewControl(o(this).attr("data-class"),{element:o(this)})})}),o(".st-tour-map .view-control .map_type span").each(function(){o(this).on("click",function(t){t.preventDefault(),__.map_render.action.clickMapType(o(this).attr("data-map"))})})},window.__.map_render=new l,__.map_render.init(),o(window).on("resize",function(){__.map_render.responsive()})}o(".collapse-user").length&&o(".collapse-user").click(function(t){return o(".user-nav-wrapper").toggleClass("open"),!1}),o(window).width()<768&&o(".st-elements-filters").each(function(){o(this).find("li .booking-filters-title").addClass("closed"),o(this).find("li > div").css("display","none")}),o(".transfer-selectpicker").length&&o(".transfer-selectpicker").selectpicker({size:10})}),jQuery(function(t){t("#st_enable_javascript").each(function(){t(this).hasClass("allow")&&t("#st_enable_javascript").html(".search-tabs-bg > .tabbable >.tab-content > .tab-pane{display: none; opacity: 0;}.search-tabs-bg > .tabbable >.tab-content > .tab-pane.active{display: block;opacity: 1;}.search-tabs-to-top { margin-top: -120px;}")})}),jQuery(document).ready(function(l){if(void 0!==l.fn.sticky){var c=0;481<l(window).width()&&l("body").hasClass("admin-bar")&&(c=l("#wpadminbar").height()),function(){var t=l(".menu_style1").length,e=l(".menu_style2").length,i=l(".menu_style3").length,o=l(".menu_style4").length,n=l("#top_toolbar").length,s=l(".enable_sticky_topbar").length,a=l(".enable_sticky_menu").length;{if(l(".enable_sticky_header").length||a&&s)return l("#st_header_wrap_inner").sticky({topSpacing:c});if(s&&n&&l("#top_toolbar").sticky({topSpacing:c}),a&&(t||e||i||o)){var r=c;return n&&s&&(r+=l("#top_toolbar").height()),l("#menu1").sticky({topSpacing:r}),l("#menu2").sticky({topSpacing:r}),l("#menu3").sticky({topSpacing:r}),l("#menu4").sticky({topSpacing:r})}}}()}function t(){var t=l(window).scrollTop();l("body").hasClass("menu_style2")&&0!=t&&0!==l(".enable_sticky_menu.header_transparent").length?l(".header-top").css(st_params.header_bgr):l(".header-top").css({"background-color":""})}l("body").hasClass("search_enable_preload")&&window.setTimeout(function(){l(".full-page-absolute").fadeOut().addClass(".hidden")},1e3),l("#gotop").click(function(){l("body,html").animate({scrollTop:0},1e3,function(){l("#gotop").fadeOut()})}),l(window).scroll(function(){200<l(window).scrollTop()?l("#gotop").fadeIn():l("#gotop").fadeOut(),t()}),t();var e,i=l(".st-top-ajax-search");i.length&&(i.typeahead({hint:!0,highlight:!0,minLength:3,limit:8},{source:function(t,e){return l(".st-top-ajax-search").parent().addClass("loading"),l.ajax({dataType:"json",type:"get",url:st_params.ajax_url,data:{security:st_params.st_search_nonce,action:"st_top_ajax_search",s:t,lang:i.data("lang")},cache:!0,success:function(t){l(".st-top-ajax-search").parent().removeClass("loading");var i=[];t.data&&(l.each(t.data,function(t,e){i.push({value:e.title,location_id:e.id,type_color:"success",type:e.type,url:e.url})}),e(i),console.log(i))},error:function(t){l(".st-top-ajax-search").parent().removeClass("loading")}})},templates:{suggestion:Handlebars.compile('<p class="search-line-item"><label class="label label-{{type_color}}">{{type}}</label><strong> {{value}}</strong></p>')}}),i.bind("typeahead:selected",function(t,e,i){e.url&&(window.location.href=e.url)})),l.fn.chosen&&l(".chosen_select").chosen(),l(".woocommerce-ordering .posts_per_page").change(function(){l(".woocommerce-ordering").submit()}),l(".woocommerce li.product").hover(function(){var t=l(this);e=window.setTimeout(function(){t.find(".product-info-hide").slideDown("fast")},250)},function(){window.clearTimeout(e),l(this).find(".product-info-hide").slideUp("fast")});var o=null;l(window).resize(function(t){clearTimeout(o),l("header#menu3").length&&(o=setTimeout(function(){if(window.matchMedia("(min-width: 1200px)").matches){var t=l("#top_header .container").height(),e=l("#slimmenu").height();l("header#menu3 .nav").css("margin-top",(t-e)/2)}},500))}).resize(),l("#search-icon").click(function(t){return l(".main-header-search").fadeIn("fast"),!1}),l("#search-close").click(function(t){return l(".main-header-search").fadeOut("fast"),!1}),l(".st-slider-list-hotel").length&&l(".st-slider-list-hotel").owlCarousel({items:1,singleItem:!0,slideSpeed:500,transitionStyle:l(".st-slider-list-hotel").data("effect"),autoHeight:!0}),l("#owl-twitter").length&&l("#owl-twitter").owlCarousel({navigation:!0,slideSpeed:300,paginationSpeed:400,singleItem:!0,navigationText:["",""],pagination:!1,autoPlay:!0});var n=l(".st_list_partner");setTimeout(function(){n.each(function(){l(this).data("items");var t=l(this).data("speed"),e=l(this).data("autoplay");e="yes"==e,l(this).owlCarousel({slideSpeed:t,paginationSpeed:400,navigationText:["",""],pagination:!1,navigation:!1,autoPlay:e,items:4,itemsDesktop:[1e3,4],itemsDesktopSmall:[900,3],itemsTablet:[600,1],itemsMobile:!1})})},500),l(".st_list_partner_nav .next").click(function(){n.trigger("owl.next")}),l(".st_list_partner_nav .prev").click(function(){n.trigger("owl.prev")}),l(".st_tour_ver_countdown").each(function(){l(this).syotimer({year:parseInt(l(this).data("year")),month:parseInt(l(this).data("month")),day:parseInt(l(this).data("day")),hour:0,minute:0,lang:l(this).data("lang")})}),l(".st_tour_ver_fotorama").length&&l(".st_tour_ver_fotorama").fotorama({nav:!1});var a=!1;l("body").on("click",".add-coupon-ajax",function(){var o=l(this),n=o.closest(".booking-item-payment").find(".overlay-form"),t=o.closest("form"),s=l(".alert",t),e=t.serializeArray();return a||(a=!0,n.fadeIn(),s.addClass("hidden").html(""),l.post(st_params.ajax_url,e,function(t,e,i){if(1==t.status){n.fadeIn();l.post(st_params.ajax_url,{action:"modal_get_cart_detail"},function(t,e,i){o.closest(".booking-item-payment").html(t),n.fadeOut(),a=!1},"json")}else s.removeClass("hidden").html(t.message),n.fadeOut(),a=!1},"json")),!1});var s=1;l("body").on("click",".booking-item-coupon form button",function(t){if(!l(this).hasClass("add-coupon-ajax")){if(0==s)return!1;s=0,t.preventDefault();var o=l(this).closest("form");l(this).append('<i class="fa fa-spinner fa-spin"></i>');var e={action:"apply_mdcoupon_function",code:l("#field-coupon_code",o).val()};l.post(st_params.ajax_url,e,function(t,e,i){1==t.status&&o.submit()},"json")}}),l("body").on("click",".ajax-remove-coupon",function(t){t.preventDefault();var o=l(this),n=o.closest(".booking-item-payment").find(".overlay-form"),e=o.closest("form");l(".alert",e);if(a)return!1;a=!0,n.fadeIn();var i={action:"ajax_remove_coupon",coupon:l(this).data("coupon")};l.post(st_params.ajax_url,i,function(t,e,i){n.fadeIn();l.post(st_params.ajax_url,{action:"modal_get_cart_detail"},function(t,e,i){o.closest(".booking-item-payment").html(t),n.fadeOut(),a=!1},"json")},"json")}),l("#myModal").modal("show")}),jQuery(document).ready(function(i){i(".extra-collapse a").click(function(t){t.preventDefault();var e=i(this).closest(".extra-price");e.find(".extra-collapse-control").hasClass("extra-none")?(i(this).find("i").removeClass("fa-angle-double-down"),i(this).find("i").addClass("fa-angle-double-up"),e.find(".extra-collapse-control").removeClass("extra-none")):(i(this).find("i").removeClass("fa-angle-double-up"),i(this).find("i").addClass("fa-angle-double-down"),e.find(".extra-collapse-control").addClass("extra-none"))}),i(".has-matchHeight","body").length&&i(".has-matchHeight","body").matchHeight()}),jQuery(function(r){r(".ac-gallery").each(function(){var t=r(this);t.owlCarousel({items:1,loop:!0,autoplay:!1,dots:!1,pagination:!1}),r(this).parent().find(".owl-prev").click(function(){t.trigger("owl.prev")}),r(this).parent().find(".owl-next").click(function(){t.trigger("owl.next")})}),r(".accommodation-single-map .st_list_map .content_map #list_map").each(function(){var t=r(window).height()-r("#st_header_wrap").height();0<r("#wpadminbar").length&&(t-=r("#wpadminbar").height()),t<480&&(t=480),r(this).css({height:t+"px"})}),r(".on_the_map .btn-on-map").each(function(){r(this).on("click",function(t){t.preventDefault();var e=r(this).parent().parent();r(this).toggleClass("active"),r(this).hasClass("active")?r(this).text(r(this).data("hide")):r(this).text(r(this).data("no-hide")),e.find(".accommodation-single-map").toggleClass("active"),e.find(".review-price").toggleClass("active")})}),r(".st-inbox-send").click(function(t){t.preventDefault();var e=r(this).closest(".st-form-inbox"),i=r(this);if(""==e.find('input[name="inbox-title"]').val())e.find('input[name="inbox-title"]').addClass("wb-error");else if(""==e.find('textarea[name="inbox-message"]').val())e.find('textarea[name="inbox-message"]').addClass("wb-error");else{var o=e.find('input[name="post_id"]').val(),n=e.find('input[name="to_user"]').val(),s=e.find('input[name="inbox-title"]').val(),a=e.find('textarea[name="inbox-message"]').val();i.addClass("loading"),e.find('input[name="inbox-title"]').removeClass("wb-error"),e.find('textarea[name="inbox-message"]').removeClass("wb-error"),r.ajax({url:st_params.ajax_url,data:{action:"send_message_partner",id:o,title:s,message:a,to_user:n,st_send_message:e.find('input[name="st_send_message"]').val(),_wp_http_referer:e.find('input[name="_wp_http_referer"]').val()},dataType:"json",type:"POST",success:function(t){1==t.status?(e.find(".inbox-group").hide(),e.find(".inbox-notice").addClass("success"),e.find(".inbox-notice").text(e.find(".inbox-notice").data("success")),e.find(".detail-message").attr("href",t.link_detail),e.find(".detail-message").removeClass("hide"),e.find(".inbox-notice").addClass("alert-success").removeClass("hide").removeClass("alert-danger")):(t.message.length<0?e.find(".inbox-notice").text(e.find(".inbox-notice").data("error")):e.find(".inbox-notice").html(t.message),e.find(".inbox-notice").addClass("alert-danger").removeClass("hide")),i.removeClass("loading")},error:function(t){console.log(t)}})}}),r(".inbox-reply-btn").click(function(t){t.preventDefault();var o=r(this).closest(".form-reply"),n=r(this);if(""==o.find('textarea[name="reply-content"]').val())o.find('textarea[name="reply-content"]').addClass("wb-error");else{var e=o.find('textarea[name="reply-content"]').val();n.addClass("loading"),r.ajax({url:st_params.ajax_url,data:{action:"inbox_reply_message",content:e,to_user:o.find('input[name="to_user"]').val(),parent_id:o.find('input[name="message_id"]').val(),post_id:o.find('input[name="post_id"]').val()},dataType:"json",type:"POST",success:function(t){if(1==t.status){var e='<div class="message-item from"><div class="user-avatar">'+t.data.avatar+"<span>"+t.data.username+'</span></div><div class="message-item-content"><span>'+t.data.content+"</span><span>"+t.data.created_at+"</span></div></div>";r(".st-inbox-body-detail .message-box").append(e),o.find('textarea[name="reply-content"]').val(""),o.find('textarea[name="reply-content"]').removeClass("wb-error"),jQuery().niceScroll&&r(".st-inbox-body-detail .message-box").niceScroll();var i=r(".message-box .message-item").last().position().top;r(".st-inbox-body-detail .message-box").animate({scrollTop:i},"slow")}n.removeClass("loading")},error:function(t){console.log(t)}})}}),r(".btn_remove_message").click(function(){var e=r(this).closest(".st-inbox-body"),i=r(this).closest(".message-item"),o=r(this);o.addClass("loading"),r.ajax({url:st_params.ajax_url,data:{action:"inbox_remove_message",message_id:o.data("message-id")},dataType:"json",type:"POST",success:function(t){i.remove(),e.find(".count_message").html(t.total_message)},error:function(t){o.removeClass("loading")}})}),r(".message-box").each(function(){if(jQuery().niceScroll&&r(".st-inbox-body-detail .message-box").niceScroll(),0<r(".message-box .message-item").length){var t=r(".message-box .message-item").last().position().top;r(".st-inbox-body-detail .message-box").animate({scrollTop:t},"slow")}}),r(".st_last_message_id").each(function(){var e=r(this),s=r(this).closest(".st-inbox-body-detail"),a=!0;setInterval(function(){var t=e.val();if(0==a)return!1;a=!1,r.ajax({url:st_params.ajax_url,data:{action:"inbox_get_last_message",last_message_id:t,message_id:e.data("message_id"),user_id:e.data("user_id"),post_id:e.data("post_id")},dataType:"json",type:"POST",success:function(t){if(a=!0,0<t.length)for(var e in t){var i=t[e],o='<div class="message-item to"><div class="user-avatar">'+i.avatar+"<span>"+i.username+'</span></div><div class="message-item-content"><span>'+i.content+"</span><span>"+i.created_at+"</span></div></div>";s.find(".message-box").append(o),s.find(".st_last_message_id").val(i.id)}jQuery().niceScroll&&s.find(".message-box").niceScroll();var n=r(".message-box .message-item").last().position().top;s.find(".message-box").animate({scrollTop:n},"slow")},error:function(t){}})},1e4)}),r.ajax({url:st_params.ajax_url,data:{action:"check_inbox_notification"},dataType:"json",type:"POST",success:function(t){if(1==t.status&&(void 0===t.old_count||t.new_message!=t.old_count)){var e="<a href='"+t.inbox_link+"' target='_blank' ><div class='st_notice_template'><i class='fa fa-comment'></i> <div class='display_table'>"+t.message+"</div>  </div></a>";noty({text:e,layout:"topRight",type:"info",closeWith:["click","button"],animation:{open:"animated bounceInRight",close:"animated bounceOutRight",easing:"swing",speed:500},theme:"relax",progressBar:!0,timeout:6e3})}},error:function(t){console.log(t)}}),r(".st-inbox").click(function(){r(this).find(".st-form-inbox").addClass("active")}),r(".st-hotel-tabs-content .nav-tabs li a, .st-tour-tabs-content .nav-tabs li a").click(function(){var t=r(this).attr("href");window.location.replace(t)}),r(".st-hotel-tabs-content,.st-tour-tabs-content").each(function(){if(0<window.location.href.indexOf("#")){var t=window.location.href.slice(window.location.href.indexOf("#")+1).split("&")[0],e=t.split("-");0<t.length&&"comment"==e[0]&&(t="review"),0<t.length&&(r(this).find("li").removeClass("active"),r(this).find(".tab-pane").removeClass("active").removeClass("in"),r(this).find("a[href=#"+t+"]").parent().addClass("active"),r(this).find("#"+t).addClass("active").addClass("in"))}})}),jQuery(function(o){o(document).on("click",".btn-info-booking",function(t){var e=o(this).data("target");(e=o(e)).find(".modal-content-inner").empty(),e.find(".overlay-form").fadeIn(),o.ajax({url:st_params.ajax_url,data:{action:"st_get_info_booking_history",order_id:o(this).data("order_id"),service_id:o(this).data("service_id")},dataType:"json",type:"POST",success:function(t){1==t.status&&e.find(".modal-content-inner").html(t.html),""!=t.msg&&e.find(".modal-content-inner").html(t.msg),e.find(".overlay-form").fadeOut()},error:function(t){console.log(t)}})}),o(".btn-user-update-to-partner").click(function(t){0==confirm(o(this).data("confirm"))&&t.preventDefault()}),o(".booking-email-form").length&&(o("#cb-select-all").click(function(){o(this);o(this).closest(".booking-email-form").find("input:checkbox").not(this).prop("checked",this.checked)}),o(".cb-select-child").click(function(){o(this);var t=o(this).closest(".booking-email-form");t.find("input#cb-select-all").prop("checked",!1);var e=0;o(".cb-select-child").each(function(t){o(this).is(":checked")||e++}),0==e&&t.find("input#cb-select-all").prop("checked",!0)})),o("#booking-email-form-btn").click(function(t){t.preventDefault();var e=o(this).closest(".booking-email-form"),i=e.serializeArray();e.find(".form-message").html("").hide(),o.ajax({url:st_params.ajax_url,type:"POST",data:i,dataType:"json",beforeSend:function(){e.find(".overlay-form").show()}}).done(function(t){1==t.status?e.find(".form-message").html('<div class="alert alert-success">'+t.message+"</div>").show():e.find(".form-message").html('<div class="alert alert-danger">'+t.message+"</div>").show(),e.find(".overlay-form").hide()})})}),jQuery(document).ready(function(l){function o(t){var e=l(".booking-list.loop-room"),i={nonce:l("input[name=room_search]").val()};void 0!==t&&(i=t.find("input,select,textarea").serializeArray());for(var o={},n=0;n<i.length;n++)o[i[n].name]=i[n].value;var s=l(".search_room_alert");if(s.html(""),t.find(".age_of_child_input").removeClass("error"),t.find(".form-control").removeClass("error"),t.find(".form_input").removeClass("error"),""==o.start&&""==o.end)return""==o.start&&t.find("[name=start]").addClass("error"),""==o.end&&t.find("[name=end]").addClass("error"),c(s,st_hotel_localize.is_not_select_date,"danger"),!1;if(""==o.start)return""==o.start&&t.find("[name=start]").addClass("error"),c(s,st_hotel_localize.is_not_select_check_in_date,"danger"),!1;if(""==o.end)return""==o.end&&t.find("[name=end]").addClass("error"),c(s,st_hotel_localize.is_not_select_check_out_date,"danger"),!1;if(1==o.room_num_search){if(""==o.adult_num||""==o.child_num)return c(s,st_hotel_localize.booking_required_adult_children,"danger"),!1}else{var a=!1;if(t.find(".room_num_children_input").each(function(){0<l(this).val()&&l(this).closest("tr").find(".age_of_child_input").each(function(){"-1"==l(this).val()?(l(this).addClass("error"),a=!0):l(this).removeClass("error")})}),a)return c(s,st_hotel_localize.is_aoc_fail,"danger"),!1;var r=!1;if(t.find(".room_num_host_name_input").each(function(){""==l(this).val()?(l(this).addClass("error"),r=!0):l(this).removeClass("error")}),r)return c(s,st_hotel_localize.is_host_name_fail,"danger"),!1}e.hasClass("loading")?alert("Still loading"):(e.addClass("loading"),l.ajax({type:"post",dataType:"json",url:"",data:i,success:function(t){e.removeClass("loading"),t.status&&(void 0!==t.data&&t.data?e.html(t.data):e.html(""),l("body").tooltip({selector:"[rel=tooltip]"}),l(".i-check, .i-radio").iCheck({checkboxClass:"i-check",radioClass:"i-radio"})),t.message&&(c(s,t.message,"danger"),e.html("")),l(".div_paged_room").html(t.paging),l(".booking-item-dates-change .paged_room").val(1)},error:function(t){e.removeClass("loading")}}))}function c(t,e,i){void 0===i&&(i="infomation");var o='<div class="alert alert-'+i+'">'+e+"</div>";t.length&&(t.html(""),t.html(o),function(t){if(t.length){var e=t.offset().top;l("#wpadminbar").length&&"fixed"==l("#wpadminbar").css("position")&&(e-=32),e-=50,l("html,body").animate({scrollTop:e},500)}}(t))}function s(){l(".room_num_config tbody tr").each(function(){0<l(this).find(".room_num_children_input").val()&&l(".age_of_children_col").removeClass("hidden")})}l(".btn-do-search-room").click(function(){o(l(this).parents(".booking-item-dates-change"))}),l(".btn-show-price").click(function(){o(l(".booking-item-dates-change"))}),l(".btn-clr-search-room").click(function(){var t,e=l(this).parents(".booking-item-dates-change");(t=e).find("input[type=text]").val(""),t.find("select").each(function(t,e){e.selectedIndex=0}),t.find(".btn-group-select-num .btn-primary").removeClass("active"),l(".search_room_alert").html(""),l(".age_of_child_input").removeClass("error"),t.find(".form-control").removeClass("error"),o(e)}),l(document).on("change",".room_num_children_input",function(){var t=l(this).val(),e=l(this).closest("tr");if(s(),0==t)e.find(".room_num_age_of_children").html("");else{e.find(".room_num_age_of_children").html("");var o=l(this).closest(".room-item").data("room-num");for(i=1;i<=t;i++){var n=l("#example_age_of_child").clone();n.removeAttr("id"),n.removeClass("hidden"),n.addClass("required"),n.attr("name","room_data["+o+"][age_of_children]["+i+"]"),e.find(".room_num_age_of_children").append(n)}}}),s()}),jQuery(document).ready(function(e){if(!(e(".st_single_hotel").length<1)){if(console.log("Single Hotel"),e("ul.paged_room a.paged_room").each(function(){e(this).attr("data-page",e(this).html())}),e(document).on("click",".paged_item_room",function(){var t=e(this).data("page");e(".booking-item-dates-change .paged_room").val(t),e(".btn-do-search-room").click()}),e("#field-hotel-start, #field-hotel-end").length){var t=e("#field-hotel-start"),i=e("#field-hotel-end");e("#field-hotel-start, #field-hotel-end").datepicker({language:st_params.locale,autoclose:!0,todayHighlight:!0,startDate:"today",format:e("[data-date-format]").data("date-format"),weekStart:1}),t.on("changeDate",function(t){var e=t.date;e.setDate(e.getDate()+1),i.datepicker("setDates",e),i.datepicker("setStartDate",e),i.datepicker("show")})}if(e(".st-slider-list-room").length){e(".st-slider-list-room").owlCarousel({items:3,itemsDesktop:[1200,3],itemsDesktopSmall:[992,3],itemsTablet:[768,2],itemsMobile:[320,1],slideSpeed:1e3,paginationSpeed:1e3,pagination:!1});var o=e(".st-slider-list-room").data("owlCarousel");e(".st-slider-list-room-wrapper .control-left").click(function(t){return o.prev(),!1}),e(".st-slider-list-room-wrapper .control-right").click(function(t){return o.next(),!1})}var n=e(".booking-item-dates-change").data("booking-period");e("input.checkin_hotel, input.checkout_hotel").datepicker("setStartDate","+"+(n+1)+"d"),e(".overlay-form").fadeOut(500)}}),jQuery(document).ready(function(t){}),jQuery(document).ready(function(o){if(o("body").hasClass("single-st_rental")){var i="",n="",t="off";if(o("#rental_is_groupday").length&&(t="on"==o("#rental_is_groupday").val()?"on":"off"),"off"==t){o("#form-booking-inpage .form-group.form-group-icon-left .form-control.checkin_rental").css("background","transparent"),o("#form-booking-inpage .form-group.form-group-icon-left .form-control.checkout_rental").css("background","transparent");var s=[],a=[],r=[],l=o(".booking-item-dates-change").data("period");function e(t,e){post_id=o(".booking-item-dates-change").data("post-id"),o(".date-overlay").addClass("open");var i={rental_id:post_id,month:t,year:e,security:st_params.st_search_nonce,action:"st_get_disable_date_rental"};o.post(st_params.ajax_url,i,function(e){if(s=Object.keys(e.disable).map(function(t){return e.disable[t]}),a=Object.keys(e.fist_half_day).map(function(t){return e.fist_half_day[t]}),r=Object.keys(e.last_half_day).map(function(t){return e.last_half_day[t]}),0<a.length)for(var t=0;t<a.length;t++){var i="st_calendar_"+a[t];o("."+i).addClass("st_fist_half_day")}if(0<r.length)for(t=0;t<r.length;t++){i="st_calendar_"+r[t];o("."+i).addClass("st_last_half_day")}if(0<s.length)for(t=0;t<s.length;t++){i="st_calendar_"+s[t];o("."+i).addClass("disabled disabled-date booked day st_booked")}o(".date-overlay").removeClass("open")},"json")}l||(l="today"),o("input.checkin_rental, input.checkout_rental").each(function(){var t=o(this);t.datepicker({language:st_params.locale,format:o("[data-date-format]").data("date-format"),todayHighlight:!0,autoclose:!0,startDate:l,weekStart:1,setRefresh:!0,beforeShowDay:function(t){var e=t,i=e.getDate();i<10&&(i="0"+i);var o=e.getMonth()+1;return o<10&&(o="0"+o),{classes:"st_calendar_"+i+"_"+o+"_"+e.getFullYear()}}}),t.click(function(){if(0<a.length)for(var t=0;t<a.length;t++){var e="st_calendar_"+a[t];o("."+e).addClass("st_fist_half_day")}if(0<r.length)for(t=0;t<r.length;t++){e="st_calendar_"+r[t];o("."+e).addClass("st_last_half_day")}if(0<s.length)for(t=0;t<s.length;t++){e="st_calendar_"+s[t];o("."+e).addClass("disabled disabled-date booked day st_booked")}}),o(".date-overlay").addClass("open");var e=o(this).datepicker("getDate");null==e&&(e=new Date),n=e.getFullYear(),i=e.getMonth()+1}),e(i,n),o("input.checkin_rental").on("changeMonth",function(t){n=new Date(t.date).getFullYear(),e(i=new Date(t.date).getMonth()+1,n,o(this))}),o("input.checkin_rental").on("changeDate",function(t){var e=t.date;e.setDate(e.getDate()+1),o("input.checkout_rental").datepicker("setStartDate",e)}),o("input.checkin_rental, input.checkout_rental").on("keyup",function(t){setTimeout(function(){if(0<a.length)for(var t=0;t<a.length;t++){var e="st_calendar_"+a[t];o("."+e).addClass("st_fist_half_day")}if(0<r.length)for(t=0;t<r.length;t++){e="st_calendar_"+r[t];o("."+e).addClass("st_last_half_day")}if(0<s.length)for(t=0;t<s.length;t++){e="st_calendar_"+s[t];o("."+e).addClass("disabled disabled-date booked day st_booked")}},200)}),o("input.checkout_rental").on("changeMonth",function(t){n=new Date(t.date).getFullYear(),e(i=new Date(t.date).getMonth()+1,n,o(this))})}else o("#form-booking-inpage .form-group.form-group-icon-left .form-control.checkin_rental").css("background","#dfdfdf"),o("#form-booking-inpage .form-group.form-group-icon-left .form-control.checkout_rental").css("background","#dfdfdf")}}),jQuery(document).ready(function(c){var r;if(!(c(".st_single_rental").length<1)){console.log("Single Rental"),c(".btn_booking_modal").click(function(){var t=c(this).closest("form");c(".alert",t).remove();var e=!0,o=[];if(c("input.required,textarea.required,select.required",t).each(function(){c(this).removeClass("error"),c(this).val()||(e=!1,c(this).addClass("error")),c(this).attr("name")&&o.push({value:c(this).val(),name:c(this).attr("name")})}),!e)return t.prepend('<div class="alert alert-danger">'+st_checkout_text.validate_form+"</div>"),!1;var n=c(this).data("target");for(i=0;i<o.length;i++){var s=o[i];c(n).find(".booking_modal_form").prepend('<input type="hidden" name="'+s.name+'" value="'+s.value+'">')}c.magnificPopup.open({items:{type:"inline",src:n}})});var o=function(t){var n=this;this.container=t,this.calendar=null,this.form_container=null,this.init=function(){n.container=t,n.calendar=c(".calendar-content",n.container),n.form_container=c(".calendar-form",n.container),n.initCalendar()},this.initCalendar=function(){var t=n.calendar.data("start");n.calendar.fullCalendar({firstDay:1,lang:st_params.locale,customButtons:{reloadButton:{text:st_params.text_refresh,click:function(){n.calendar.fullCalendar("refetchEvents")}}},header:{left:"prev",center:"title",right:"next, "},contentHeight:360,events:function(t,e,i,o){c.ajax({url:st_params.ajax_url,dataType:"json",type:"post",data:{action:"st_get_availability_rental_single",post_id:n.container.data("post-id"),start:t.unix(),end:e.unix()},success:function(t){"object"==typeof t&&o(t)},error:function(t){alert("Can not get the availability slot. Lost connect with your sever")}})},eventClick:function(t,e,i){var o="off";if(c("#rental_is_groupday").length&&(o="on"==c("#rental_is_groupday").val()?"on":"off"),"on"==o)if(c(this).find("button").hasClass("is_group_day")){r=c(this),date=new Date(t.start._i),date.setDate(date.getDate()),date=c.fullCalendar.moment(date),check_in=date.format("YYYY-MM-DD");var n=date.format(st_params.date_format_calendar.toUpperCase());date=new Date(t.end._i),date.setDate(date.getDate()-1),date=c.fullCalendar.moment(date),check_out=date.format("YYYY-MM-DD");var s=date.format(st_params.date_format_calendar.toUpperCase());c(".fc-day-grid-event").removeClass("st-active"),r.addClass("st-active"),c("input#field-rental-start").val(n).parent().show(),c("input#field-rental-end").val(s).parent().show(),c(".fc-day-grid-event").removeClass("current-select"),c(".fc-day-grid-event").each(function(t){c(this).find("button").hasClass("btn-disabled-gd")&&(c(this).find("button").removeClass("btn-disabled-gd").addClass("btn-available"),c(this).find("button").removeAttr("disabled"))})}else if(""==c("input#field-rental-start").val()||""!=c("input#field-rental-start").val()&&""!=c("input#field-rental-end").val()){if(!c(this).find("button").hasClass("btn-available")&&!c(this).find("button").hasClass("btn-available_allow_fist")&&!c(this).find("button").hasClass("btn-available_allow_last"))return;c(".fc-day-grid-event").removeClass("st-active"),c(".fc-day-grid-event").removeClass("current-select"),c(this).addClass("st-active");c(this);date=c.fullCalendar.moment(t.start._i),c("input#field-rental-start").val(date.format(st_params.date_format_calendar.toUpperCase())).parent().show(),c("input#field-rental-end").val(""),c(this).addClass("current-select");var a=0;c(".fc-day-grid-event").each(function(){if(a++,c(this).hasClass("current-select"))return!1}),c(".fc-day-grid-event").each(function(t){t<a&&c(this).find("button").hasClass("btn-available")&&(c(this).find("button").removeClass("btn-available").addClass("btn-disabled-gd"),c(this).find("button").attr("disabled",!0),c(this).find(".tooltip").remove())})}else if(""==c("input#field-rental-end").val()||""!=c("input#field-rental-start").val()&&""!=c("input#field-rental-end").val()){if(!c(this).find("button").hasClass("btn-available")&&!c(this).find("button").hasClass("btn-available_allow_fist")&&!c(this).find("button").hasClass("btn-available_allow_last"))return;c(this).addClass("st-active"),date=c.fullCalendar.moment(t.start._i),c("input#field-rental-end").val(date.format(st_params.date_format_calendar.toUpperCase())).parent().show()}},eventRender:function(t,e,i){var o="",n="",s="btn-disabled",a="disabled",r=(new Date).getFullYear()+"-"+((new Date).getMonth()+1)+"-"+(new Date).getDate();t.status,t.status,t.status,"available"==t.status&&(s="btn-available",a="",n=st_checkout_text.origin_price+": "+t.price),"available_allow_fist"==t.status&&(s="btn-available btn-calendar btn-available_allow_fist available_allow_fist",a="",n=st_checkout_text.origin_price+": "+t.price),"available_allow_last"==t.status&&(s="btn-available btn-calendar btn-available_allow_last available_allow_last",a="",n=st_checkout_text.origin_price+": "+t.price);var l="";void 0!==t.date_end&&(l="is_group_day"),o+="<button  "+a+" data-toggle='tooltip' data-placement='top' class= '"+s+" btn "+l+"' title ='"+n+"''>"+t.day,void 0!==t.date_end&&(o+=" - "+t.date_end),r===t.date&&(o+="<span class='triangle'></span>"),o+="</button>",c(".fc-content",e).html(o)},eventAfterRender:function(t,e,i){c('[data-toggle="tooltip"]').tooltip({html:!0})},loading:function(t,e){t?c(".calendar-wrapper-inner .overlay-form").fadeIn():c(".calendar-wrapper-inner .overlay-form").fadeOut()},defaultDate:c.fullCalendar.moment(t)})}};c(".calendar-wrapper").length&&c(".calendar-wrapper").each(function(t,e){var i=c(this),n=new o(i);setTimeout(function(){n.init(),s(n),c(".fc-next-button, .fc-prev-button").click(function(){s(n)})},100),c("body").on("calendar.change_month",function(t,e){var i=n.calendar.fullCalendar("getDate"),o=i.format("M");i=i.add(e-o,"M"),n.calendar.fullCalendar("gotoDate",i.format("YYYY-MM-DD"))})}),c(document).on("click",".ui-tabs-anchor",function(){setTimeout(function(){c(".calendar-content",".calendar-wrapper").fullCalendar("today")},1e3)});var t=c(".st_single_rental_room");if(0<t.length){var n=t.data("fancy_arr");1==n&&c("a#fancy-gallery").on("click",function(t){var e=n;c.fancybox.open(e)})}c("a.button-readmore").click(function(){0<c("#read-more").length&&(c("#read-more").removeClass("hidden"),c(this).addClass("hidden"),c("#show-description").remove())}),c(document).on("click","#gdate-choose .gdate-choose-item",function(){switch(c(this).attr("id")){case"gdate_start_item":if(""==c("input#field-rental-start").val()||""!=c("input#field-rental-start").val()&&""!=c("input#field-rental-end").val()){c("input#field-rental-start").val(c(this).data("date")).parent().show(),c("input#field-rental-end").val(""),c(".fc-day-grid-event").removeClass("st-active"),c(".fc-day-grid-event").removeClass("current-select"),r.addClass("st-active"),r.addClass("current-select");var e=0;c(".fc-day-grid-event").each(function(){if(e++,c(this).hasClass("current-select"))return!1}),c(".fc-day-grid-event").each(function(t){t<e-1&&c(this).find("button").hasClass("btn-available")&&(c(this).find("button").removeClass("btn-available").addClass("btn-disabled-gd"),c(this).find("button").attr("disabled",!0),c(this).find(".tooltip").remove())})}else(""==c("input#field-rental-end").val()||""!=c("input#field-rental-start").val()&&""!=c("input#field-rental-end").val())&&(c("input#field-rental-end").val(c(this).data("date")).parent().show(),r.addClass("st-active"));break;case"gdate_end_item":if(""==c("input#field-rental-start").val()||""!=c("input#field-rental-start").val()&&""!=c("input#field-rental-end").val()){c("input#field-rental-start").val(c(this).data("date")).parent().show(),c("input#field-rental-end").val(""),c(".fc-day-grid-event").removeClass("st-active"),c(".fc-day-grid-event").removeClass("current-select"),r.addClass("st-active"),r.addClass("current-select");e=0;c(".fc-day-grid-event").each(function(){if(e++,c(this).hasClass("current-select"))return!1}),c(".fc-day-grid-event").each(function(t){t<e&&c(this).find("button").hasClass("btn-available")&&(c(this).find("button").removeClass("btn-available").addClass("btn-disabled-gd"),c(this).find("button").attr("disabled",!0),c(this).find(".tooltip").remove())})}else(""==c("input#field-rental-end").val()||""!=c("input#field-rental-start").val()&&""!=c("input#field-rental-end").val())&&(c("input#field-rental-end").val(c(this).data("date")).parent().show(),r.addClass("st-active"));break;case"gdate_all_item":c(".fc-day-grid-event").removeClass("st-active"),r.addClass("st-active"),c("input#field-rental-start").val(c(this).data("start-date")).parent().show(),c("input#field-rental-end").val(c(this).data("end-date")).parent().show(),c(".fc-day-grid-event").removeClass("current-select"),c(".fc-day-grid-event").each(function(t){c(this).find("button").hasClass("btn-disabled-gd")&&(c(this).find("button").removeClass("btn-disabled-gd").addClass("btn-available"),c(this).find("button").removeAttr("disabled"))})}c.magnificPopup.close()}),c("#clear-gdate-rental").click(function(t){t.preventDefault(),c("input#field-rental-start").val(""),c("input#field-rental-end").val(""),c(".fc-day-grid-event").removeClass("st-active"),c(".fc-day-grid-event").removeClass("current-select"),c(".fc-day-grid-event").each(function(t){c(this).find("button").hasClass("btn-disabled-gd")&&(c(this).find("button").removeClass("btn-disabled-gd").addClass("btn-available"),c(this).find("button").removeAttr("disabled"))})})}function s(t){var e=t.calendar.fullCalendar("getDate").format("M");c(".calendar_change_month").val(e)}}),jQuery(document).ready(function(t){}),jQuery(document).ready(function(h){if(!(h(".st_single_hotel_room").length<1)){var e;console.log("Single Hotel Room");var n="",s="",i="",o="";h(window).resize(function(t){clearTimeout(e),e=setTimeout(function(){h(window).scroll(function(t){if(992<=h(window).width()){""==n&&(n=h(window).scrollTop());var e=0;h("#top_toolbar-sticky-wrapper").length&&h("#top_toolbar-sticky-wrapper").hasClass("is-sticky")&&h("#top_toolbar").length&&(e+=h("#top_toolbar").height()),h("#st_header_wrap_inner-sticky-wrapper").length&&h("#st_header_wrap_inner-sticky-wrapper").hasClass("is-sticky")&&(h("#main-header").length&&(e+=h("#main-header").height()),h("#top_toolbar").length&&(e+=h("#top_toolbar").height())),h("#menu1-sticky-wrapper").length&&h("#menu1-sticky-wrapper").hasClass("is-sticky")&&(h("#menu1").length&&(e+=h("#menu1").height()),h("#top_toolbar").length&&(e+=h("#top_toolbar").height()));var i=0;if(h(".hotel-room-form").length&&(i=h(".hotel-room-form").offset().top-h(window).scrollTop(),""==s&&(s=h(".hotel-room-form").offset().top)),i<=e){w=h(".hotel-room-form").width();var o=e;0<h("#wpadminbar").length&&(o+=h("#wpadminbar").height()),h(".hotel-room-form").hasClass("sidebar-fixed")||(h(".hotel-room-form").css("top",o),h(".hotel-room-form").addClass("sidebar-fixed").css("width",w),h(".hotel-room-form").addClass("no_margin_top"))}h(window).scrollTop()<=s&&h(window).scrollTop()<n&&(h(".hotel-room-form").removeClass("sidebar-fixed").css("width","auto"),h(".hotel-room-form").css("top",0),h(".hotel-room-form").removeClass("no_margin_top")),n=h(window).scrollTop()}})},500)}).resize();var a=[],r=[],l=[],t=h("input.checkin_hotel, input.checkout_hotel"),c=h(".input-daterange").data("period");c||(c="today"),t.length&&(t.each(function(){var t=h(this);t.datepicker({language:st_params.locale,format:h("[data-date-format]").data("date-format"),todayHighlight:!0,autoclose:!0,startDate:c,weekStart:1,setRefresh:!0,beforeShowDay:function(t){var e=t,i=e.getDate();i<10&&(i="0"+i);var o=e.getMonth()+1;return o<10&&(o="0"+o),{classes:"st_calendar_"+i+"_"+o+"_"+e.getFullYear()}}}),t.click(function(){if(0<r.length)for(var t=0;t<r.length;t++){var e="st_calendar_"+r[t];h("."+e).addClass("st_fist_half_day")}if(0<l.length)for(t=0;t<l.length;t++){e="st_calendar_"+l[t];h("."+e).addClass("st_last_half_day")}if(0<a.length)for(t=0;t<a.length;t++){e="st_calendar_"+a[t];h("."+e).addClass("disabled disabled-date booked day st_booked")}}),h(".date-overlay").addClass("open");var e=h(this).datepicker("getDate");null==e&&(e=new Date),o=e.getFullYear(),i=e.getMonth()+1}),f(i,o,t)),h("input.checkin_hotel").on("changeMonth",function(t){o=new Date(t.date).getFullYear(),f(i=new Date(t.date).getMonth()+1,o,h(this))}),h("input.checkin_hotel").on("changeDate",function(t){var e=t.date;e.setDate(e.getDate()+1),h("input.checkout_hotel").datepicker("setStartDate",e)}),h("input.checkin_hotel, input.checkout_hotel").on("keyup",function(t){setTimeout(function(){if(0<r.length)for(var t=0;t<r.length;t++){var e="st_calendar_"+r[t];h("."+e).addClass("st_fist_half_day")}if(0<l.length)for(t=0;t<l.length;t++){e="st_calendar_"+l[t];h("."+e).addClass("st_last_half_day")}if(0<a.length)for(t=0;t<a.length;t++){e="st_calendar_"+a[t];h("."+e).addClass("disabled disabled-date booked day st_booked")}},200)}),h("input.checkout_hotel").on("changeMonth",function(t){o=new Date(t.date).getFullYear(),f(i=new Date(t.date).getMonth()+1,o,h(this))});var d=function(t){var d=this;this.container=t,this.calendar=null,this.form_container=null,this.init=function(){d.container=t,d.calendar=h(".calendar-content",d.container),d.form_container=h(".calendar-form",d.container),d.initCalendar()},this.initCalendar=function(){var t=d.calendar.data("start");d.calendar.fullCalendar({firstDay:1,lang:st_params.locale,customButtons:{reloadButton:{text:st_params.text_refresh,click:function(){d.calendar.fullCalendar("refetchEvents")}}},header:{left:"prev",center:"title",right:"next"},contentHeight:360,events:function(t,e,i,o){h.ajax({url:st_params.ajax_url,dataType:"json",type:"post",data:{action:"st_get_availability_hotel_room",post_id:d.container.data("post-id"),start:t.unix(),end:e.unix()},success:function(t){"object"==typeof t&&o(t)},error:function(t){alert("Can not get the availability slot. Lost connect with your sever")}})},eventClick:function(t,e,i){},eventRender:function(t,e,i){var o="",n="",s="btn-disabled",a="disabled",r=(new Date).getFullYear()+"-"+((new Date).getMonth()+1)+"-"+(new Date).getDate();t.status,t.status,t.status,"available"==t.status&&(s="btn-available",a="",n=st_checkout_text.origin_price+": "+t.price),"available_allow_fist"==t.status&&(s="btn-calendar btn-available_allow_fist available_allow_fist single-room",a="",n=st_checkout_text.origin_price+": "+t.price),"available_allow_last"==t.status&&(s="btn-calendar btn-available_allow_last available_allow_last single-room",a="",n=st_checkout_text.origin_price+": "+t.price);var l=d.calendar.fullCalendar("getDate").format("MM"),c="";h.fullCalendar.moment(t.start._i).format("MM")!=l&&(c="next_month"),o+="<button  "+a+" data-toggle='tooltip' data-placement='top' class= '"+s+" "+c+" btn' title ='"+n+"''>"+t.day,r===t.date&&(o+="<span class='triangle'></span>"),o+="</button>",h(".fc-content",e).html(o)},eventAfterRender:function(t,e,i){h('[data-toggle="tooltip"]').tooltip({html:!0})},loading:function(t,e){t?h(".calendar-wrapper-inner .overlay-form").fadeIn():h(".calendar-wrapper-inner .overlay-form").fadeOut()},defaultDate:h.fullCalendar.moment(t)})}};h(".calendar-wrapper").length&&h(".calendar-wrapper").each(function(t,e){var i=h(this),n=new d(i);n.init(),h("body").on("calendar.change_month",function(t,e){var i=n.calendar.fullCalendar("getDate"),o=i.format("M");i=i.add(e-o,"M"),n.calendar.fullCalendar("gotoDate",i.format("YYYY-MM-DD"))}),m(n),h(".fc-next-button, .fc-prev-button").click(function(){m(n)})});var p=h(".st_single_hotel_room");if(0<p.length){var u=p.data("fancy_arr");1==u&&h("a#fancy-gallery").on("click",function(t){var e=u;h.fancybox.open(e)})}h("a.button-readmore").click(function(){0<h("#read-more").length&&(h("#read-more").removeClass("hidden"),h(this).addClass("hidden"),h("#show-description").remove())})}function f(t,e,i){post_id=h(i).data("post-id"),h(".date-overlay").addClass("open");var o={room_id:post_id,month:t,year:e,security:st_params.st_search_nonce,action:"st_get_disable_date_hotel"};h.post(st_params.ajax_url,o,function(e){if(a=Object.keys(e.disable).map(function(t){return e.disable[t]}),r=Object.keys(e.fist_half_day).map(function(t){return e.fist_half_day[t]}),l=Object.keys(e.last_half_day).map(function(t){return e.last_half_day[t]}),0<r.length)for(var t=0;t<r.length;t++){var i="st_calendar_"+r[t];h("."+i).addClass("st_fist_half_day")}if(0<l.length)for(t=0;t<l.length;t++){i="st_calendar_"+l[t];h("."+i).addClass("st_last_half_day")}if(0<a.length)for(t=0;t<a.length;t++){i="st_calendar_"+a[t];h("."+i).addClass("disabled disabled-date booked day st_booked")}h(".date-overlay").removeClass("open")},"json")}function m(t){var e=t.calendar.fullCalendar("getDate").format("M");h(".calendar_change_month").val(e)}}),jQuery(document).ready(function(r){var l=0;r("#field-hotelroom-room, .extra-service-select, #field-hotelroom-checkout, #field-hotelroom-checkin").on("change",function(t){0==l&&e(),l++});var t=!1;function e(){var t=r("#st-base-price").data("base-price"),e=0;0<r("#st-origin-price").length&&(e=r("#st-origin-price").data("origin-price"));var i=r("#field-hotelroom-room").val(),o=r("#field-hotelroom-checkin").val(),n=r("#field-hotelroom-checkout").val(),s=0;0<r(".extra-price").length&&r(".extra-price .extra-service-select").each(function(){var t,e=r(this).val(),i=r(this).data("extra-price");t=Number(i.toString().replace(/([^\d|^\.])*/g,""))*Number(e),s+=t}),function(t,e,i,o,n,s){r(".message_box").html("");var a=r("#hotel-room-box .overlay-form");r.ajax({method:"POST",url:st_params.ajax_url,data:{base_price:t,origin_price:e,post_id:r("#field-hotelroom-checkin").data("post-id"),number_room:i,check_in:n,check_out:s,total_extra:o,action:"st_format_real_price"},beforeSend:function(){a.show()},success:function(t){if(1==t.status)0<r("#st-base-price").length&&r("#st-base-price").html(t.sale),0<r("#st-origin-price").length&&r("#st-origin-price").html(t.origin),0<r("#st-number-day").length&&r("#st-number-day").html(t.numberday),r(".message_box").html(""),l=0,a.hide();else if(""!=t.message)return r(".message_box").html('<div class="alert alert-danger">'+t.message+"</div>"),l=0,a.hide(),!1}})}(t,e,i,s,o,n)}"1"!=r("#field-hotelroom-room").val()&&0<r("#field-hotelroom-room").length&&(t=!0),0<r(".extra-price").length&&r(".extra-price .extra-service-select").each(function(){"0"!=r(this).val()&&(t=!0)}),t&&e()});
//# sourceMappingURL=traveler.min.js.map