// Generated by CoffeeScript 1.12.8
(function() {
// Compatiblity with IE 11, from http://stackoverflow.com/questions/30867172/code-not-running-in-ie-11-works-fine-in-chrome
// Only run this file once [prevent loops if it in the global template]
if (!String.prototype.startsWith) {
String.prototype.startsWith = function(searchString, position) {
position = position || 0;
return this.indexOf(searchString, position) === position;
};
}
window.evo_get_window_width = function() {
var is_safari = navigator.userAgent.toLowerCase().indexOf('safari/') > -1;
if (is_safari) {
return $(window).outerWidth();
}
var width = 0;
if(width == 0) { // width will be 0 on an ipad
try { width = window.outerWidth; }
catch(error) {}
}
if(width == 0) { // returns correct
try { width = $(window).outerWidth(); }
catch(error) {}
}
return width;
}
;
var EvoCenterMobile, EvoPopupSearchWithGoogle, MatchSidebarHeight, required_template_lines,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
required_template_lines = "\n\n\n";
window.Evo = {
'STATIC_URL': window.STATIC_URL,
'weather_widget': null,
'evo_cloud_widget': null,
'evo_ticket': null,
'INIT_NOT_STARTED': [],
'INIT_STARTED': [],
'INIT_COMPLETED': [],
'OL': null,
'jquery_marquee_loaded': null,
'anytime_js_loaded': null,
'anytime_css_loaded': null
};
window.Evo.EVO_FORM_FROMSERVER = {};
window.full_screen_map_functions = [];
$('head').append($('').attr('href', window.STATIC_URL + 'lib/evo_common.css'));
if (typeof window.evo_mobile_width === "undefined") {
window.evo_mobile_width = 960;
}
$.ajax({
url: window.STATIC_URL + 'widget/evo_cloud_widget_menu.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.EvoCloudWidgetMenu.initialize();
}
});
$.ajax({
url: window.STATIC_URL + 'weather/weather.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.WeatherWidget.initialize();
}
});
// $.ajax({
// url: 'https://www.google.com/recaptcha/api.js',
// Type: "GET",
// dataType: "script",
// cache: true,
// success: function(data, textStatus, jqXHR) {}
// });
$.ajax({
url: window.STATIC_URL + 'evo_form/evo_form_resumable.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {}
});
$.ajax({
url: window.STATIC_URL + 'evo_form/evo_form_base.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {}
});
$.ajax({
url: window.STATIC_URL + 'widget/evo_cloud_widget.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.EvoCloudWidget.initialize();
}
});
$.ajax({
url: window.STATIC_URL + 'widget/evo_ticket.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.EvoTicket.initialize();
}
});
$.ajax({
url: window.STATIC_URL + 'evo_311/evo_311.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.Evo311.initialize();
}
});
$.ajax({
url: window.STATIC_URL + 'booking/booking.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.Booking.initialize();
}
});
$.ajax({
url: window.STATIC_URL + 'widget/evo_cloud_calendar_widget.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.EvoCloudCalendarWidget.initialize();
}
});
$.ajax({
url: window.STATIC_URL + 'evo_layers/evo_ol.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.OL.initialize();
}
});
$.ajax({
url: window.STATIC_URL + 'lib/sortable_table.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {}
});
$.ajax({
url: window.STATIC_URL + 'evo_misc/evo_misc.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.EvoMisc.initialize(true);
}
});
$.ajax({
url: window.STATIC_URL + 'widget/evo_cloud_department_widget.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.EvoCloudDepartmentWidget.initialize();
}
});
MatchSidebarHeight = (function() {
MatchSidebarHeight.MaxTimeToRun = 1000 * 35;
MatchSidebarHeight.TimeRun = 0;
MatchSidebarHeight.Interval = 250;
function MatchSidebarHeight() {}
MatchSidebarHeight.initialize = function() {
var err;
if (MatchSidebarHeight.TimeRun > MatchSidebarHeight.MaxTimeToRun) {
return void 0;
}
MatchSidebarHeight.TimeRun = MatchSidebarHeight.TimeRun + MatchSidebarHeight.Interval;
setTimeout(MatchSidebarHeight.initialize, MatchSidebarHeight.Interval);
try {
return $('#page-content').matchHeight({
"target": $("#contextual-nav-id"),
"property": "min-height"
});
} catch (error) {
err = error;
}
};
return MatchSidebarHeight;
})();
MatchSidebarHeight.initialize();
EvoPopupSearchWithGoogle = (function() {
EvoPopupSearchWithGoogle.StartedMatchHeightScriptLoad = false;
EvoPopupSearchWithGoogle.MaxTimeToRun = 1000 * 10;
EvoPopupSearchWithGoogle.TimeRun = 0;
EvoPopupSearchWithGoogle.Interval = 1000;
EvoPopupSearchWithGoogle.search_popup_open = false;
function EvoPopupSearchWithGoogle() {}
EvoPopupSearchWithGoogle.initialize = function() {
if (EvoPopupSearchWithGoogle.TimeRun > EvoPopupSearchWithGoogle.MaxTimeToRun) {
return void 0;
}
$("#search_popup_span_open").unbind('click');
$("#search_popup_span_open").click(function(event) {
var popup;
popup = $("#search_popup");
if (popup.css('display') === 'none') {
return popup.css('display', 'block');
} else {
return popup.css('display', 'none');
}
});
$("#search_popup_span_close").unbind('click');
$("#search_popup_span_close").click(function(event) {
var popup;
popup = $("#search_popup");
return popup.css('display', 'none');
});
EvoPopupSearchWithGoogle.TimeRun = EvoPopupSearchWithGoogle.TimeRun + EvoPopupSearchWithGoogle.Interval;
return setTimeout(EvoPopupSearchWithGoogle.initialize, EvoPopupSearchWithGoogle.Interval);
};
return EvoPopupSearchWithGoogle;
})();
EvoCenterMobile = (function() {
function EvoCenterMobile() {}
EvoCenterMobile.perform_centering = function() {
var element, element_width, elements, i, len, results, window_width;
elements = $(".evo_center_mobile");
results = [];
for (i = 0, len = elements.length; i < len; i++) {
element = elements[i];
window_width = $(window).width();
element_width = $(element).width();
if (window_width < window.evo_mobile_width) {
results.push($(element).css("margin-left", window_width / 2 - element_width / 2));
} else {
results.push($(element).css("margin-left", ""));
}
}
return results;
};
return EvoCenterMobile;
})();
window.Evo.EvoCenterMobile = EvoCenterMobile;
EvoPopupSearchWithGoogle.initialize();
$(window).on('load', function() {
var background, c, classlist, element, elements, i, j, k, len, len1, len2, ref, results, slideshow_name, specific_slideshow, specify_background_image, url;
if (window.location.pathname === '/') {
$("body")[0].classList.add("home-page");
}
if (indexOf.call($("body")[0].classList, "evo_background_if_no_background_slideshow") >= 0 && $(".evo_specify_background_image").length === 0) {
if ($("#evo_background_slideshow").length === 0) {
if (typeof evo_body_background !== "undefined") {
$("body").css("background", evo_body_background);
$("body").css("background-size", "cover");
}
}
}
window.Evo.EvoCenterMobile.perform_centering();
if (indexOf.call($("body")[0].classList, "evo_background_random_from_slideshow_if_no_background_slideshow") >= 0 && $(".evo_specify_background_image").length === 0) {
if ($("#evo_background_slideshow").length === 0 && $("#evo_background_prevent_random_image_from_no_slideshow").length === 0) {
if (window.evo_get_window_width() < window.evo_mobile_width) {
if (typeof evo_body_background_random_mobile !== "undefined") {
background = evo_body_background_random_mobile;
} else {
background = "none";
}
$("body").css("background", background);
} else {
slideshow_name = "";
specific_slideshow = $("#evo_random_slideshow_background_image_name");
if (specific_slideshow.length) {
classlist = specific_slideshow[0].classList;
for (i = 0, len = classlist.length; i < len; i++) {
c = classlist[i];
slideshow_name = c;
}
}
if (slideshow_name) {
url = window.location.protocol + "//" + window.location.hostname + '/evo_random_background_from_slideshow/' + slideshow_name;
} else {
specific_slideshow = $("#evo_random_slideshow_background_from_slideshow_id")
if(specific_slideshow){
try{
c = specific_slideshow[0].classList;
url = window.location.protocol + "//" + window.location.hostname + '/evo_random_background_from_slideshow_id/' + c[0];
} catch {
url = window.location.protocol + "//" + window.location.hostname + '/evo_random_background_from_slideshow/';
}
} else {
url = window.location.protocol + "//" + window.location.hostname + '/evo_random_background_from_slideshow/';
}
}
$.ajax({
url: url,
Type: "GET",
dataType: "text",
success: function(data, textStatus, jqXHR) {
if (data !== "none") {
$("body").css("background-color", data.split(' ')[0]);
if (data !== "none") {
$("body").css("background-image", 'url("' + data.split(' ')[1] + '")');
}
return $("body").css("background-size", "cover");
}
}
});
}
}
}
if (indexOf.call($("body")[0].classList, "evo_background_random_from_slideshow") >= 0 && $(".evo_specify_background_image").length === 0) {
if (window.evo_get_window_width() < window.evo_mobile_width) {
if (typeof evo_body_background_random_mobile !== "undefined") {
background = evo_body_background_random_mobile;
} else {
background = "none";
}
$("body").css("background", background);
} else if ($(".evo_specify_background_image").length === 0) {
$.ajax({
url: window.location.protocol + "//" + window.location.hostname + '/evo_random_background_from_slideshow/',
Type: "GET",
dataType: "text",
success: function(data, textStatus, jqXHR) {
$("body").css("background-color", data.split(' ')[0]);
$("body").css("background-image", 'url("' + data.split(' ')[1] + '")');
return $("body").css("background-size", "cover");
}
});
}
}
ref = $(".evo_specify_background_image");
for (j = 0, len1 = ref.length; j < len1; j++) {
specify_background_image = ref[j];
$("body").css("background-image", 'url("' + $(specify_background_image).text() + '")');
$("body").css("background-size", "cover");
$("body").css("background-attachment", "fixed");
$("body").css("background-repeat", "no-repeat");
}
if ($("#evo_meetings_listview").length) {
$.ajax({
url: window.STATIC_URL + 'meetings/meetings.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.Meetings.initialize();
}
});
}
$.ajax({
url: window.STATIC_URL + 'evo_chart/evo_chart_base.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.EvoChart.initialize(true);
}
});
if ($(".evo_param_alerts").length) {
$.ajax({
url: 'https://cdn.evo.cloud/scripts/jquery-marquee/1.3.1/jquery.marquee.min.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.jquery_marquee_loaded = true;
}
});
}
if ($("#evo_meetings_form").length) {
$.ajax({
url: 'https://cdn.evo.cloud/lib/anytime/5.2.0/anytime.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {
return window.Evo.anytime_js_loaded = true;
}
});
$('').appendTo('head').attr({
type: 'text/css',
rel: 'stylesheet',
href: 'https://cdn.evo.cloud/lib/anytime/5.2.0/anytime.css'
});
window.Evo.anytime_css_loaded = true;
}
elements = $("#mainNav").find($(".dropdown-menu"));
results = [];
for (k = 0, len2 = elements.length; k < len2; k++) {
element = elements[k];
if (element.tagName === "UL" && $(element).text() === "\n") {
results.push($(element).remove());
} else {
results.push(void 0);
}
}
if(($("#GOOGLE_RECAPTCHA_SITE_API_KEY").length || $(".g-recaptcha").length /*|| $(".evo_param_newsletter_signup").length*/)){
$.ajax({
url: 'https://www.google.com/recaptcha/api.js',
Type: "GET",
dataType: "script",
cache: true,
success: function(data, textStatus, jqXHR) {}
});
}
return results;
});
// JavaScript Cookie v2.1.4
// https://github.com/js-cookie/js-cookie
//
// Copyright 2006, 2015 Klaus Hartl & Fagner Brack
// Released under the MIT license
;(function (factory) {
var registeredInModuleLoader = false;
if (typeof define === 'function' && define.amd) {
define(factory);
registeredInModuleLoader = true;
}
if (typeof exports === 'object') {
module.exports = factory();
registeredInModuleLoader = true;
}
if (!registeredInModuleLoader) {
var OldCookies = window.Cookies;
var api = window.Cookies = factory();
api.noConflict = function () {
window.Cookies = OldCookies;
return api;
};
}
}(function () {
function extend () {
var i = 0;
var result = {};
for (; i < arguments.length; i++) {
var attributes = arguments[ i ];
for (var key in attributes) {
result[key] = attributes[key];
}
}
return result;
}
function init (converter) {
function api (key, value, attributes) {
var result;
if (typeof document === 'undefined') {
return;
}
// Write
if (arguments.length > 1) {
attributes = extend({
path: '/'
}, api.defaults, attributes);
if (typeof attributes.expires === 'number') {
var expires = new Date();
expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
attributes.expires = expires;
}
// We're using "expires" because "max-age" is not supported by IE
attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
try {
result = JSON.stringify(value);
if (/^[\{\[]/.test(result)) {
value = result;
}
} catch (e) {}
if (!converter.write) {
value = encodeURIComponent(String(value))
.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
} else {
value = converter.write(value, key);
}
key = encodeURIComponent(String(key));
key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
key = key.replace(/[\(\)]/g, escape);
var stringifiedAttributes = '';
for (var attributeName in attributes) {
if (!attributes[attributeName]) {
continue;
}
stringifiedAttributes += '; ' + attributeName;
if (attributes[attributeName] === true) {
continue;
}
stringifiedAttributes += '=' + attributes[attributeName];
}
return (document.cookie = key + '=' + value + stringifiedAttributes);
}
// Read
if (!key) {
result = {};
}
// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling "get()"
var cookies = document.cookie ? document.cookie.split('; ') : [];
var rdecode = /(%[0-9A-Z]{2})+/g;
var i = 0;
for (; i < cookies.length; i++) {
var parts = cookies[i].split('=');
var cookie = parts.slice(1).join('=');
if (cookie.charAt(0) === '"') {
cookie = cookie.slice(1, -1);
}
try {
var name = parts[0].replace(rdecode, decodeURIComponent);
cookie = converter.read ?
converter.read(cookie, name) : converter(cookie, name) ||
cookie.replace(rdecode, decodeURIComponent);
if (this.json) {
try {
cookie = JSON.parse(cookie);
} catch (e) {}
}
if (key === name) {
result = cookie;
break;
}
if (!key) {
result[name] = cookie;
}
} catch (e) {}
}
return result;
}
api.set = api;
api.get = function (key) {
return api.call(api, key);
};
api.getJSON = function () {
return api.apply({
json: true
}, [].slice.call(arguments));
};
api.defaults = {};
api.remove = function (key, attributes) {
api(key, '', extend(attributes, {
expires: -1
}));
};
api.withConverter = init;
return api;
}
return init(function () {});
}));;
}).call(this);