<commit_before>/*
Code ©2017 Ecstatic Living Institute All rights reserved.
Created by Conscious Apps Inc. www.consciousapps.com
*/
if (window.location.href.indexOf('ecstaticliving.com') > -1) {
	console.log('Welcome to EcstaticLiving.com')
} else {
	console.log('TEST code at ', window.location.href)
}


// DECLARATIONS
// General
const $main = $('.main'),
$mainSection = $('.main-section'),

// Nav Menu
$navMenu = $('.navigation-menu'),
$navContainer = $('.nav-container'),

// Contact
$contactForm = $('.contact-form'),
$contactSection = $('.contact-section'),
$receivedSection = $('.received-section')

// Initialization Module
const siteUrl = window.location.href.indexOf('ecstaticliving.com') > -1
	? 'https://www.ecstaticliving.com/'
	: 'https://ecstaticliving.webflow.io/'

//	INITIALIZE
function initialize() {
	if (Math.min($(window).width(), $(window).height()) >= 320) {
		device = 'mobile'
	}
	if (Math.min($(window).width(), $(window).height()) >= 641) {
		device = 'tablet'
	}
	//	Some large tablets exist, but for all intents and purposes, we’ll treat them as desktops.
	if (Math.max($(window).width(), $(window).height()) >= 1025) {
		device = 'desktop'
	}
	if ($(window).width() > $(window).height()) {
		deviceOrientation = 'landscape'
	} else {
		deviceOrientation = 'portrait'
	}
	if (device === 'tablet') {
		if (deviceOrientation === 'landscape') {
			//	Increase side padding for small screen
			$mainSection.css({
				'padding-left': '100px',
				'padding-right': '100px'
			})
		} else {
			$mainSection.css({
				'padding-left': '30px',
				'padding-right': '30px'
			})
		}
	}
}

$(window).on('load orientationchange', function() {
	initialize()
})

var page
if (window.location.href.indexOf('/events/') > -1) {
	page = 'Event'
}
if (window.location.href.indexOf('/charge') > -1) {
	page = 'Custom'
}
if (window.location.href.indexOf('/contact') > -1) {
	page = 'Contact'
}

// Browser validation
// The following code is embedded into ecstaticLiving.com/events. Make changes here, then insert into 'Events' template page on EcstaticLiving.com
{/* <noscript>
	<div style="width:100%; max-width:400px; margin:auto; border:3px solid maroon; border-radius:10px; padding: 0px 20px 20px 20px; font-size: 18px;">
		<h3>Please enable JavaScript</h3>
		In order to register online, you will need to enable JavaScript. Otherwise, feel free to call us at 707-987-3456 to register by phone. For instructions on how to enable JavaScript on your browser, click the appropriate link below:<br /><br />
		<strong>Mobile</strong>: <a href="http://activatejavascript.org/en/instructions/ios#instructions" target="_blank" class="lpa-link">iOS</a> | <a href="http://activatejavascript.org/en/instructions/android#instructions" target="_blank" class="lpa-link">Android</a>
		<br /><br />
		<strong>Web</strong>: <a href="http://activatejavascript.org/en/instructions/chrome#instructions" target="_blank" class="lpa-link">Chrome</a> | <a href="http://activatejavascript.org/en/instructions/firefox#instructions" target="_blank" class="lpa-link">Firefox</a> | <a href="http://activatejavascript.org/en/instructions/safari#instructions" target="_blank" class="lpa-link">Safari</a> | <a href="http://activatejavascript.org/en/instructions/opera#instructions" target="_blank" class="lpa-link">Opera</a>
	</div>
</noscript>
<script src="https://ecstaticliving.github.io/ecstaticliving.com/is.js"></script>
<script type="text/javascript">
	const isSafariBrowser = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && safari.pushNotification))
	if (!is.edge() && !is.chrome() && !is.firefox() && !is.opera() && !isSafariBrowser) {
		document.write("<div style=\"width:100%; max-width:400px; margin:auto; border:3px solid maroon; border-radius:10px; padding: 0px 20px 20px 20px; font-size: 18px;\"><h3>Please use a different browser</h3>In order to register online, you will need to use a different browser. Otherwise, feel free to call us at 707-987-3456 to register by phone. For download links to usable browsers, click the appropriate link below:<br /><br /><strong>PC</strong>: <a href=\"https://www.microsoft.com/en-us/windows/microsoft-edge\" target=\"_blank\">Edge</a> | <a href=\"https://www.google.com/chrome/index.html\" target=\"_blank\">Google Chrome</a> | <a href=\"https://www.mozilla.org/en-US/firefox/new/\" target=\"_blank\">Firefox</a><br /><br /><strong>Mac</strong>: Safari | <a href=\"https://www.google.com/chrome/index.html\" target=\"_blank\">Google Chrome</a> | <a href=\"https://www.mozilla.org/en-US/firefox/new/\" target=\"_blank\">Firefox</a><br /><br /><strong>Mobile</strong>: Safari (for iOS) | <a href=\"https://www.google.com/chrome/index.html\" target=\"_blank\">Google Chrome</a> | <a href=\"https://www.mozilla.org/en-US/firefox/new/\" target=\"_blank\">Firefox</a></div>")
	}
</script> */}

// Browser detection courtesy of: https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
const ua = window.navigator.userAgent
const isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && safari.pushNotification))
const safariVersion = Number.parseInt(ua.split('Safari/')[1], 10)
const firefoxVersion = Number.parseInt(ua.split('Firefox/')[1], 10)
if ((page === 'Event' || page === 'Custom') && !is.edge() && !is.chrome() && (!is.firefox() || firefoxVersion <= 32) && !is.opera() && (!isSafari || safariVersion <= 601)) {
	window.alert('This page does not work on this browser. Please use a different browser.')
}


// NAV MENU
const $navButton = $('.menu-icon')
const $navClose = $('.nav-close')
// If nav menu is opened<commit_msg>Browser validation.<commit_after>/*
Code ©2017 Ecstatic Living Institute All rights reserved.
Created by Conscious Apps Inc. www.consciousapps.com
*/
if (window.location.href.indexOf('ecstaticliving.com') > -1) {
	console.log('Welcome to EcstaticLiving.com')
} else {
	console.log('TEST code at ', window.location.href)
}


// DECLARATIONS
// General
const $main = $('.main'),
$mainSection = $('.main-section'),

// Nav Menu
$navMenu = $('.navigation-menu'),
$navContainer = $('.nav-container'),

// Contact
$contactForm = $('.contact-form'),
$contactSection = $('.contact-section'),
$receivedSection = $('.received-section')

// Initialization Module
const siteUrl = window.location.href.indexOf('ecstaticliving.com') > -1
	? 'https://www.ecstaticliving.com/'
	: 'https://ecstaticliving.webflow.io/'

//	INITIALIZE
function initialize() {
	if (Math.min($(window).width(), $(window).height()) >= 320) {
		device = 'mobile'
	}
	if (Math.min($(window).width(), $(window).height()) >= 641) {
		device = 'tablet'
	}
	//	Some large tablets exist, but for all intents and purposes, we’ll treat them as desktops.
	if (Math.max($(window).width(), $(window).height()) >= 1025) {
		device = 'desktop'
	}
	if ($(window).width() > $(window).height()) {
		deviceOrientation = 'landscape'
	} else {
		deviceOrientation = 'portrait'
	}
	if (device === 'tablet') {
		if (deviceOrientation === 'landscape') {
			//	Increase side padding for small screen
			$mainSection.css({
				'padding-left': '100px',
				'padding-right': '100px'
			})
		} else {
			$mainSection.css({
				'padding-left': '30px',
				'padding-right': '30px'
			})
		}
	}
}

$(window).on('load orientationchange', function() {
	initialize()
})

var page
if (window.location.href.indexOf('/events/') > -1) {
	page = 'Event'
}
if (window.location.href.indexOf('/charge') > -1) {
	page = 'Custom'
}
if (window.location.href.indexOf('/contact') > -1) {
	page = 'Contact'
}

// Browser validation
// The following code is embedded into ecstaticLiving.com/events. Make changes here, then insert into 'Events' template page on EcstaticLiving.com
{/* <noscript>
	<div style="width:100%; max-width:400px; margin:auto; border:3px solid maroon; border-radius:10px; padding: 0px 20px 20px 20px; font-size: 18px;">
		<h3>Please enable JavaScript</h3>
		In order to register online, you will need to enable JavaScript. Otherwise, feel free to call us at 707-987-3456 to register by phone. For instructions on how to enable JavaScript on your browser, click the appropriate link below:<br /><br />
		<strong>Mobile</strong>: <a href="http://activatejavascript.org/en/instructions/ios#instructions" target="_blank" class="lpa-link">iOS</a> | <a href="http://activatejavascript.org/en/instructions/android#instructions" target="_blank" class="lpa-link">Android</a>
		<br /><br />
		<strong>Web</strong>: <a href="http://activatejavascript.org/en/instructions/chrome#instructions" target="_blank" class="lpa-link">Chrome</a> | <a href="http://activatejavascript.org/en/instructions/firefox#instructions" target="_blank" class="lpa-link">Firefox</a> | <a href="http://activatejavascript.org/en/instructions/safari#instructions" target="_blank" class="lpa-link">Safari</a> | <a href="http://activatejavascript.org/en/instructions/opera#instructions" target="_blank" class="lpa-link">Opera</a>
	</div>
</noscript>
<script src="https://ecstaticliving.github.io/ecstaticliving.com/is.js"></script>
<script type="text/javascript">
	const isSafariBrowser = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && safari.pushNotification))
	if (!is.edge() && !is.chrome() && !is.firefox() && !is.opera() && !isSafariBrowser) {
		document.write("<div style=\"width:100%; max-width:400px; margin:auto; border:3px solid maroon; border-radius:10px; padding: 0px 20px 20px 20px; font-size: 18px;\"><h3>Please use a different browser</h3>In order to register online, you will need to use a different browser. Otherwise, feel free to call us at 707-987-3456 to register by phone. For download links to usable browsers, click the appropriate link below:<br /><br /><strong>PC</strong>: <a href=\"https://www.microsoft.com/en-us/windows/microsoft-edge\" target=\"_blank\">Edge</a> | <a href=\"https://www.google.com/chrome/index.html\" target=\"_blank\">Google Chrome</a> | <a href=\"https://www.mozilla.org/en-US/firefox/new/\" target=\"_blank\">Firefox</a><br /><br /><strong>Mac</strong>: Safari | <a href=\"https://www.google.com/chrome/index.html\" target=\"_blank\">Google Chrome</a> | <a href=\"https://www.mozilla.org/en-US/firefox/new/\" target=\"_blank\">Firefox</a><br /><br /><strong>Mobile</strong>: Safari (for iOS) | <a href=\"https://www.google.com/chrome/index.html\" target=\"_blank\">Google Chrome</a> | <a href=\"https://www.mozilla.org/en-US/firefox/new/\" target=\"_blank\">Firefox</a></div>")
	}
</script> */}

// Browser detection courtesy of: https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
const ua = window.navigator.userAgent
const isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && safari.pushNotification))
const safariVersion = Number.parseInt(ua.split('Safari/')[1], 10)
const firefoxVersion = Number.parseInt(ua.split('Firefox/')[1], 10)
if ((page === 'Event' || page === 'Custom') && !is.edge() && !is.chrome() && (!is.firefox() || firefoxVersion <= 32) && !is.opera() && (!isSafari || safariVersion <= 600)) {
	window.alert('This page does not work on this browser. Please use a different browser.')
}


// NAV MENU
const $navButton = $('.menu-icon')
const $navClose = $('.nav-close')
// If nav menu is opened
{'fraction_non_alphanumeric': 0.1964407356948229, 'fraction_numerical': 0.018222070844686647, 'mean_word_length': 4.823004462072385, 'pattern_counts': {'":': 0, '<': 127, '<?xml version=': 0, '>': 141, 'https://': 22, 'lorem ipsum': 0, 'www.': 18, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '26755', 'n_tokens_mistral': 4096, 'n_tokens_neox': 3787, 'n_words': 866}