var login = (function() {
var login_Global = {};
var loginDom = document.getElementById('login-text_login');
var loginDomMob = document.getElementById('mob_icon_login');
var loggedIn = false;
var loggingInOrOut = false;
var openModal = false;
var whatIs = document.querySelector(".woo_whatIsWooID_login");
var forgotPass = document.querySelector(".forgot_pass_login");
function getAppData(){
return new Promise((resolve) => {
var url = woo.getRemoteCouch() + "/fantastictours$public/fantastictours-invoice-settings";
var data = {}
resolve(woo.queryCouch(url, "GET", data));
}).catch((error) => {
return null;
});
}
getAppData().then((data) => {
if (data){
$("#login .website_name").html(data.brandName);
$("#login #fullLogoImage").attr("src", "/resources/fantastictours/uploads/" + data.logoImage);
}
})
function forgotPass_login(){
woo.updateCurrentPage("forgot-password");
}
function whatIsClick_login(){
var note = "What is the Woo ID? With a growing awareness of on-line privacy and security issues, further tightening of the spam laws worldwide and the need for businesses to have more robust collection of data systems in place, Woo has risen to the challenge by creating a universal ID for users on the platform - called a Woo ID.
The Woo ID provides you with the security that Woo is dedicated, and bound by law, to ensure your information is kept private and that all anti-spam laws are adhered to. Every user added to a Woo website gets to verify their email address. This ensures issues with data entry and out-of-date email accounts are spotted early.
The Woo ID universal ID is the market leader: creating a safe and spam free environment for you.
Read more about Woo and their Privacy Policy
";
var message = $("" + note + "
OK
")
.appendTo("body").slideDown('normal');
$(message).click(function(){
$(this).slideUp('normal', function(){
$(this).remove();
});
});
}
function closeButtonPressed_login(){
$(".woo-dialogBox").hide();
loggingInOrOut = false;
openModal = false;
}
function makeModal_login(content){
openModal = true;
var dialogBox = document.createElement('div');
dialogBox.className = "woo-dialogBox";
document.getElementsByClassName("wooMainContent")[0].appendChild(dialogBox);
var closeBox = document.createElement('button');
closeBox.className = 'woo-dialogClose';
closeBox.classList.add('material-symbols-outlined');
closeBox.addEventListener('click', closeButtonPressed_login);
var dialogContent = document.createElement('div');
dialogContent.className = "woo-dialogContent";
dialogContent.appendChild(closeBox);
dialogContent.appendChild(content);
dialogBox.appendChild(dialogContent);
}
function login_login(usernameElem, passwordElem){
woo.execLogin(usernameElem.value, passwordElem.value).then(() => {
$(".woo-dialogBox").hide();
openModal = false;
}).catch((error) => {
loggingInOrOut = false;
//alert("User name or password is incorrect. Please try again.");
$(".wooMainContent #woo_loginErrorMessage").css("display", "block");
});
}
function register_login(){
woo.updateCurrentPage("register");
}
function loginOnClick_login(){
if (loggingInOrOut == false) {
loggingInOrOut = true;
if (!loggedIn){
if ($(".woo-dialogBox").length){
$(".woo-dialogBox").show();
} else {
var signinModal = document.querySelector("#signinModal_login");
var usernameInput = document.querySelector("#wooUsername_login");
var passwordInput = document.querySelector("#wooPassword_login");
document.querySelector(".woo_logIn_login").addEventListener('click', login_login.bind(this, usernameInput, passwordInput));
document.querySelector(".woo_signUp_login").addEventListener('click', register_login.bind(this));
makeModal_login(signinModal);
}
} else {
woo.execLogout();
}
}
}
function changeLoginState_login(loginState){
if(!loginState){
loggedIn = false;
loginDom.innerHTML = "login";
loginDomMob.innerHTML = "lock";
}
else {
loggedIn = true;
loginDom.innerHTML = "logout";
loginDomMob.innerHTML = "lock_open";
}
}
function addEventListeners_login() {
if (woo.sessionData != null){
changeLoginState_login(true);
}
else {
changeLoginState_login(false);
}
loginDomMob.addEventListener('click', loginOnClick_login, false);
loginDom.addEventListener('click', loginOnClick_login, false);
whatIs.addEventListener('click', whatIsClick_login, false);
forgotPass.addEventListener('click', forgotPass_login, false);
}
addEventListeners_login();
login_Global.unload = () => {
//Unload callbacks here
loginDomMob.removeEventListener('click', loginOnClick_login, false);
loginDom.removeEventListener('click', loginOnClick_login, false);
whatIs.removeEventListener('click', whatIsClick_login, false);
forgotPass.removeEventListener('click', forgotPass_login, false);
//document.querySelector(".woo_logIn_login").removeEventListener('click', login_login);
//document.querySelector(".woo_signUp_login").removeEventListener('click', register_login);
console.log("Unloaded login");
}
return login_Global;
})(); var gkxwvsqf_2024526154916__908_214 = (function() {
var self = document.getElementById('gkxwvsqf_2024526154916__908_214');
var gkxwvsqf_2024526154916__908_214_Global = {};
gkxwvsqf_2024526154916__908_214_Global.unload = () => {
//Unload callbacks here
console.log("Unloaded gkxwvsqf_2024526154916__908_214");
}
var imageFileData = "";
var divCount = 0;
function loadImages(){
$("#gkxwvsqf_2024526154916__908_214").empty();
Promise.all([woo.getGadgetProperty("gkxwvsqf_2024518104845", woo.gadgetDB, "imageFileData"), woo.getGadgetProperty("gkxwvsqf_2024526154916__908_214", woo.instanceDB, "imageFileData"), woo.getGadgetProperty("gkxwvsqf_2024526154916__908_214", woo.pageDB, "imageFileData")]).then((results) => {
if (results){
var defaultValues = results[0];
if (defaultValues != ""){
imageFileData = defaultValues;
}
var instanceValues = results[1];
if (instanceValues != ""){
imageFileData = instanceValues;
}
var pageValues = results[2];
if (pageValues != ""){
imageFileData = pageValues;
}
if ("false" == "false"){
} else {
var imageContainerDiv = document.createElement('div');
imageContainerDiv.className = "image_Container_div";
self.appendChild(imageContainerDiv);
}
//console.log(imageFileData);
if (imageFileData != ""){
divCount = Object.keys(imageFileData).length - 1;
Object.entries(imageFileData).map((imageFile) => {
//console.log(imageFile);
if ("false" == "false"){
var imageFileDiv = document.createElement('div');
imageFileDiv.className = "image_File_Div";
imageFileDiv.id = "imageFile_" + imageFile[0];
imageFileDiv.style.backgroundImage= "url('/resources/fantastictours/uploads/" + imageFile[1].name + "')";
imageFileDiv.setAttribute("caption", imageFile[1].caption);
/*var caption = document.createElement('span');
caption.className = "image_caption";
caption.textContent = imageFile[1].caption;
imageFileDiv.appendChild(caption);*/
self.appendChild(imageFileDiv);
} else {
var imageFileDiv = document.createElement('img');
imageFileDiv.className = "image_File_img";
imageFileDiv.id = "imageFile_" + imageFile[0];
imageFileDiv.src= "/resources/fantastictours/uploads/" + imageFile[1].name;
imageFileDiv.setAttribute("caption", imageFile[1].caption);
imageContainerDiv.appendChild(imageFileDiv);
}
imageFileDiv.addEventListener('click', openImage.bind(this, imageFile[0]));
});
}
}
}).catch((err) => {
console.error(err);
});
}
function openImage(imageIndex){
var img = document.querySelector("#gkxwvsqf_2024526154916__908_214 #imageFile_" + imageIndex);
var bi = "";
// Check if the element is an tag or a
if (img.tagName.toLowerCase() === 'img') {
// If it's an img tag, just get the src attribute
bi = img.src;
} else {
// If it's a div, extract the URL from the background-image style
var style = img.currentStyle || window.getComputedStyle(img, false);
bi = style.backgroundImage.slice(4, -1).replace(/"/g, "").replace(/['"]/g, "");
}
console.log(bi);
var imageCaption = img.getAttribute('caption');
$(".woo-dialogBox").remove();
var form = document.createElement('div');
form.id = "image_parent";
var imageFileDiv = document.createElement('img');
imageFileDiv.className = "image_File_Div_modal";
imageFileDiv.src = bi;
form.appendChild(imageFileDiv);
var caption = document.createElement('span');
caption.className = "image_caption";
caption.textContent = imageCaption;
form.appendChild(caption);
var formLeft = document.createElement('div');
formLeft.className = "imageGallery_left";
var formRight = document.createElement('div');
formRight.className = "imageGallery_right";
form.appendChild(formLeft);
form.appendChild(formRight);
var nextImage = parseInt(imageIndex) + 1;
var previousImage = parseInt(imageIndex) - 1;
if (nextImage > divCount){
nextImage = 0;
}
if (previousImage < 0){
previousImage = divCount;
}
formLeft.addEventListener('click', openImage.bind(this, previousImage));
formRight.addEventListener('click', openImage.bind(this, nextImage));
makeModal(form, "woo-dialogContent_gallery");
}
function makeModal(content, extraClass){
var dialogBox = document.createElement('div');
dialogBox.className = "woo-dialogBox";
document.getElementsByClassName("wooMainContent")[0].appendChild(dialogBox);
var closeBox = document.createElement('button');
closeBox.className = 'woo-dialogClose';
closeBox.classList.add('material-symbols-outlined');
closeBox.addEventListener('click', closeButtonPressed);
var dialogContent = document.createElement('div');
dialogContent.className = "woo-dialogContent";
if (extraClass){
dialogContent.classList.add(extraClass);
}
dialogContent.appendChild(closeBox);
dialogContent.appendChild(content);
dialogBox.appendChild(dialogContent);
}
function closeButtonPressed(){
$(".woo-dialogBox").remove();
}
function updateValues(values){
var saveLevel = property_toolbar.getSaveLevel;
switch (saveLevel){
case "instance":
typeDB = woo.instanceDB;
break;
case "page":
typeDB = woo.pageDB;
break;
case "user":
typeDB = woo.pageDB;
break;
default:
typeDB = woo.pageDB;
}
woo.updateGadgetProperty("gkxwvsqf_2024526154916__908_214", typeDB, "imageFileData", values, woo.getCurrentPage()).then(() => {
loadImages();
}).catch((err) => {
console.log(err);
alert("Images not saved!");
});
}
function updateCaptions(captionNo, valueField){
imageFileData[captionNo]["caption"] = valueField.value;
console.log(imageFileData);
var saveLevel = property_toolbar.getSaveLevel;
switch (saveLevel){
case "instance":
typeDB = woo.instanceDB;
break;
case "page":
typeDB = woo.pageDB;
break;
case "user":
typeDB = woo.userDB;
break;
default:
typeDB = woo.pageDB;
}
woo.updateGadgetProperty("gkxwvsqf_2024526154916__908_214", typeDB, "imageFileData", imageFileData, woo.getCurrentPage()).then(() => {
loadImages();
}).catch((err) => {
console.log(err);
alert("Images not saved!");
});
}
function editCaptions(){
$(".woo-dialogBox").remove();
var form = document.createElement('div');
var title = document.createElement('span');
title.className = "dialog_title";
title.textContent = "Edit Captions";
form.appendChild(title);
if (imageFileData != ""){
Object.entries(imageFileData).map((imageFile) => {
var span1 = document.createElement('span');
form.appendChild(span1);
var label1 = document.createElement('label');
label1.className = "image_caption_input_label";
label1.textContent = "Image " + imageFile[0] + " Caption:";
span1.appendChild(label1);
var idInput = document.createElement('input');
idInput.className = "image_caption_input";
idInput.type = "text";
idInput.value = imageFile[1].caption;
span1.appendChild(idInput);
var imageName = document.createElement('span');
imageName.className = "image_name_label";
imageName.append("Image: " + imageFile[1].name);
span1.appendChild(imageName);
idInput.addEventListener('focusout', updateCaptions.bind(this, imageFile[0], idInput));
idInput.addEventListener('keypress', function (e) {
if (e.key === 'Enter') {
updateCaptions(imageFile[0], idInput);
}
});
});
} else {
var Error = document.createElement('span');
Error.className = "dialog_title";
Error.textContent = "Please upload image first!";
form.appendChild(Error);
}
makeModal(form);
}
function imageFileManager(){
$(".woo-dialogBox").remove();
var form = document.createElement('div');
var title = document.createElement('span');
title.className = "dialog_title";
title.textContent = "Upload Image";
form.appendChild(title);;
var span1 = document.createElement('span');
form.appendChild(span1);
var label1 = document.createElement('label');
label1.textContent = "Select Image:";
span1.appendChild(label1);
var idInput = document.createElement('input');
idInput.className = "file_upload_input";
idInput.type = "file";
idInput.setAttribute("multiple","");
idInput.required = "true";
span1.appendChild(idInput);
var span2 = document.createElement('span');
form.appendChild(span2);
var submitInput = document.createElement('input');
submitInput.type = "button";
submitInput.value = "Upload";
submitInput.addEventListener('click', uploadImage.bind(this, form, idInput));
form.appendChild(submitInput);
makeModal(form);
}
function uploadImage(form, idInput){
var formData = new FormData();
formData.append("name", "Images");
var fileLength = 0;
if (imageFileData != "") {
fileLength = Object.keys(imageFileData).length;
} else {
imageFileData = {};
}
for(let i = fileLength; i < (idInput.files.length + fileLength); i++) {
formData.append("files", idInput.files[i - fileLength]);
imageFileData[i] = {};
imageFileData[i]["name"] = idInput.files[i - fileLength].name;
imageFileData[i]["caption"] = "";
}
uploadFiles(formData).then((response) => {
console.log(response);
updateValues(imageFileData);
alert(response);
$(".woo-dialogBox").remove();
}).catch((error) => {
console.log(error);
alert("Something went wrong");
});
}
function uploadFiles(formData) {
console.log(formData);
return $.ajax({
type: "POST",
url: woo.getAuthServer() + "/app/upload_Files",
headers: {
//"Content-Type": "multipart/form-data",
"Authorization": "Bearer " + woo.sessionData.token + ":" + woo.sessionData.password
},
xhrFields: {
withCredentials: true
},
processData: false,
contentType: false,
crossDomain: true,
cache: false,
data: formData,
timeout: 10000
});
}
loadImages();
gkxwvsqf_2024526154916__908_214_Global.imageFileManager = () => {
imageFileManager();
}
gkxwvsqf_2024526154916__908_214_Global.editCaptions = () => {
editCaptions();
}
return gkxwvsqf_2024526154916__908_214_Global;
})();
var gkxwvsqf_202382802446_594_226_766 = (function() {
var self = document.getElementById('gkxwvsqf_202382802446_594_226_766');
var gkxwvsqf_202382802446_594_226_766_Global = {};
var unloadPromise;
gkxwvsqf_202382802446_594_226_766_Global.unload = () => {
return new Promise((resolve, reject) => {
//Unload callbacks here
if (unloadPromise){
unloadPromise.then(() => {
resolve("done");
}).catch((error) => {
reject(error);
});
} else {
resolve("done");
}
woo.events.off("Page Added", recreate);
woo.events.off("Page Deleted", recreate);
woo.events.off("Page Hidden", recreate);
woo.events.off("Page Unhidden", recreate);
woo.events.off("Page Linked", recreate);
woo.events.off("Page Unlinked", recreate);
woo.events.off("Page Order Updated", recreate);
woo.events.off("Page Parent Updated", recreate);
woo.events.off("Page pageName Updated", recreate);
console.log("Unloaded gkxwvsqf_202382802446_594_226_766");
});
}
woo.events.on("Page Added", recreate);
woo.events.on("Page Deleted", recreate);
woo.events.on("Page Hidden", recreate);
woo.events.on("Page Unhidden", recreate);
woo.events.on("Page Linked", recreate);
woo.events.on("Page Unlinked", recreate);
woo.events.on("Page Order Updated", recreate);
woo.events.on("Page Parent Updated", recreate);
woo.events.on("Page pageName Updated", recreate);
function recreate(){
unloadPromise = createFullULMenu().then(() => {
console.log("boy oh boy a lincoln toy!");
createFullULMenu();
}).catch((error) => {
console.log("Menu not created! " + error);
});
}
$("#mob_icon_gkxwvsqf_202382802446_594_226_766").on("click", function(){
$("#mainMenuContent_gkxwvsqf_202382802446_594_226_766").toggle();
});
checkBuild();
gkxwvsqf_202382802446_594_226_766_Global.createMenu = () => {
createFullULMenu().then(() => {
}).catch((error) => {
console.error(error);
});
}
function checkBuild(){
return new Promise((resolve, reject) => {
woo.getGadgetProperty("gkxwvsqf_202382802446_594_226_766", woo.instanceDB, "toolbarBuild").then((propValue) => {
if (!propValue){
createFullULMenu();
}
resolve("done");
}).catch((error) => {
reject(error);
});
}).catch((error) => {
console.error(error);
});
}
var showPage ='home';
var pageCount = 0;
function getChildrenByKey(obj, key) {
if (obj[key]) {
return obj[key].children || {};
}
for (let k in obj) {
if (obj[k] && typeof obj[k] === 'object') {
const result = getChildrenByKey(obj[k].children || {}, key);
if (result) {
return result;
}
}
}
return null; // Key not found
}
function createFullULMenu(){
return new Promise((resolve, reject) => {
$("#mainMenuContent_gkxwvsqf_202382802446_594_226_766").empty();
var form = document.querySelector("#mainMenuContent_gkxwvsqf_202382802446_594_226_766");
var allHtml = {};
var pages = {};
var rootPage = "";
woo.getFullPageStructure().then((response) => {
//console.log(response);
if ("home" == "home"){
rootPage = Object.keys(response)[0];
pages = response[rootPage].children;
} else {
rootPage = Object.keys(response)[0];
pages = getChildrenByKey(response, "home");
//pages = response[rootPage].children["home"].children;
}
//console.log(pages);
var promises = Object.entries(pages).map((node) => {
if (node[1]["props"].hidden == false){
return createPageNode(node, 1).then((gadgetHtml) => {
allHtml[node[0]] = gadgetHtml;
});
}
});
return Promise.all(promises);
}).then(() => {
var pageListUL = document.createElement('ul');
pageListUL.className = "menuUl1";
if (Object.keys(allHtml).length != 0) {
Object.entries(pages).forEach((entry) => {
if (allHtml[entry[0]]){
pageListUL.appendChild(allHtml[entry[0]]);
}
});
}
form.appendChild(pageListUL);
var str = form.innerHTML;
woo.updateGadgetProperty("gkxwvsqf_202382802446_594_226_766", woo.instanceDB, "toolbarBuild", str, woo.getCurrentPage()).then(() => {
$(".menuClick_gkxwvsqf_202382802446_594_226_766").unbind();
$(".menuClick_gkxwvsqf_202382802446_594_226_766").on("click", function(){
if ($(this).attr("linked") == "true"){
if ($(this).attr("linkID") != ""){
$('body').removeClass("pageAnimateOut").addClass("pageAnimateIn");
showPage = $(this).attr("linkID");
setTimeout(animatePageIn, 0);
} else {
window.location = $(this).attr("linkURL");
}
} else {
$('body').removeClass("pageAnimateOut").addClass("pageAnimateIn");
showPage = $(this).attr("showPage");
setTimeout(animatePageIn, 0);
}
});
resolve("done");
}).catch((err) => {
//alert("Gadget value not saved! " + err);
reject(error);
});
}).catch((error) => {
console.error(error);
reject(error);
});
});
}
function createPageNode(page, level){
return new Promise((resolve) => {
//create li
var pageLI = document.createElement('li');
if (level == 1){
pageLI.className = "menuLi1";
} else if (level == 2){
pageLI.className = "menuLi2";
} else {
pageLI.className = "menuLi3";
}
pageLI.classList.add("menuLlX");
var menuMouseOverID = page[0];
pageLI.id = menuMouseOverID;
if (level == 1){
var nameSpanOuter = document.createElement('span');
nameSpanOuter.className = "woo_menuName_outer";
var nameUnderLineSpan = document.createElement('span');
nameUnderLineSpan.className = "woo_menuName_underline";
nameUnderLineSpan.id = "woo_menuName_underline_" + page[0];
}
var nameSpan = document.createElement('button');
if (level == 1){
nameSpan.className = "woo_menuName";
} else {
nameSpan.className = "woo_subMenuName";
}
nameSpan.classList.add("menuClick_gkxwvsqf_202382802446_594_226_766");
console.log("pageCount: " + pageCount + ", odd/even: " + (pageCount % 2));
if ((pageCount % 2) != 1) {
nameSpan.classList.add("oddPage");
}
pageCount++;
nameSpan.innerText = page[1]["props"].name;
console.log(page[1]["props"].name + " : " + page[1]["props"].linked);
if (page[1]["props"].linked == "true" || page[1]["props"].linked == true){
nameSpan.setAttribute("linked", page[1]["props"].linked);
nameSpan.setAttribute("linkID", page[1]["props"].linkID);
nameSpan.setAttribute("linkURL", page[1]["props"].linkURL);
} else {
nameSpan.setAttribute("showPage", page[0]);
}
nameSpan.setAttribute("menuid", page[0]);
if (level == 1){
nameSpanOuter.appendChild(nameSpan);
nameSpanOuter.appendChild(nameUnderLineSpan);
pageLI.appendChild(nameSpanOuter);
} else {
pageLI.appendChild(nameSpan);
}
var childPagesHtml = {};
var children = page[1].children;
var subLevel = level + 1;
var promises = Object.entries(children).map((childNode) => {
if (subLevel <= 10){
if (childNode[1]["props"].hidden == false){
return createPageNode(childNode, subLevel).then((childHtml) => {
childPagesHtml[childNode[0]] = childHtml;
});
}
}
});
Promise.all(promises).then(() => {
if (Object.keys(page[1]["children"]).length != 0){
var pageListULNext = document.createElement('ul');
if (level == 1){
pageListULNext.className = "menuUl2";
} else {
pageListULNext.className = "menuUl3";
}
pageListULNext.classList.add("menuUlX");
var childCount = 0;
Object.entries(children).forEach((entry) => {
if (childPagesHtml[entry[0]]){
childCount++;
pageListULNext.appendChild(childPagesHtml[entry[0]]);
}
});
if (childCount > 0){
pageLI.appendChild(pageListULNext);
}
}
resolve(pageLI);
});
});
}
function cleanPageNameForUrl(pageName) {
// Convert to lowercase
let url = pageName.toLowerCase();
// Replace spaces with dashes
url = url.replace(/\s+/g, '-');
// Remove all special characters except dashes and alphanumeric characters
url = url.replace(/[^a-z0-9-]/g, '');
// Remove multiple consecutive dashes
url = url.replace(/-+/g, '-');
// Remove leading and trailing dashes
url = url.replace(/^-|-$/g, '');
return url;
}
var currentPageId = woo.getCurrentPage();
$("#gkxwvsqf_202382802446_594_226_766 .woo_menuName").each(function(){
if (currentPageId == cleanPageNameForUrl($(this).text())){
$(this).css({"background-color": "#000000", "color" : "#ffffff"});
}
});
$(".menuClick_gkxwvsqf_202382802446_594_226_766").on("click", function(){
if ($(this).attr("linked")){
if ($(this).attr("linkID") != ""){
$('body').removeClass("pageAnimateOut").addClass("pageAnimateIn");
showPage = $(this).attr("linkID");
setTimeout(animatePageIn, 0);
} else {
window.location = $(this).attr("linkURL");
}
} else {
$('body').removeClass("pageAnimateOut").addClass("pageAnimateIn");
showPage = $(this).attr("showPage");
setTimeout(animatePageIn, 0);
}
});
$("#gkxwvsqf_202382802446_594_226_766 .parentPage_gkxwvsqf_202382802446_594_226_766 .menuClick_gkxwvsqf_202382802446_594_226_766").unbind();
$("#gkxwvsqf_202382802446_594_226_766 .parentPage_gkxwvsqf_202382802446_594_226_766").on("click", function(){
var burgerMenuId = $("#gkxwvsqf_202382802446_594_226_766").parents(".burger_menu").attr("id");
//var subMenuNode = $(this).children("li > ul");
var subMenu = this.querySelector("li > ul").cloneNode(true);
//var subMenu = subMenuNode.cloneNode(true);
console.log(burgerMenuId);
window[burgerMenuId].changeSubPage($(this).attr("id"), 'gkxwvsqf_202382802446_594_226_766', subMenu, 0, 0);
});
function animatePageIn() {
Promise.all([woo.updateCurrentPage(showPage)]).then(() => {
document.body.scrollTop = document.documentElement.scrollTop = 0;
$('body').removeClass("pageAnimateIn").addClass("pageAnimateOut");
});
}
gkxwvsqf_202382802446_594_226_766_Global.animateMenuIn = () => {
animateMenuIn();
};
function animateMenuIn(){
$("#gkxwvsqf_202382802446_594_226_766 .woo_menuName").removeClass("animateMenuOut").addClass("animateMenuIn");
}
gkxwvsqf_202382802446_594_226_766_Global.animateMenuOut = () => {
animateMenuOut();
};
function animateMenuOut(){
$("#gkxwvsqf_202382802446_594_226_766 .woo_menuName").removeClass("animateMenuIn").addClass("animateMenuOut");
}
return gkxwvsqf_202382802446_594_226_766_Global;
})(); var gkxwvsqf_202382815548_882_561_501 = (function() {
var self = document.getElementById('gkxwvsqf_202382815548_882_561_501');
//self.classList.add("sun_editor_content");
var gkxwvsqf_202382815548_882_561_501_Global = {};
gkxwvsqf_202382815548_882_561_501_Global.unload = () => {
//Unload callbacks here
console.log("Unloaded gkxwvsqf_202382815548_882_561_501");
}
return gkxwvsqf_202382815548_882_561_501_Global;
})(); var gkxwvsqf_202392093827_673_40_256 = (function() {
var self = document.getElementById('gkxwvsqf_202392093827_673_40_256');
var gkxwvsqf_202392093827_673_40_256_Global = {};
gkxwvsqf_202392093827_673_40_256_Global.unload = () => {
//Unload callbacks here
window.removeEventListener("scroll", gkxwvsqf_202392093827_673_40_256Reveal);
console.log("Unloaded gkxwvsqf_202392093827_673_40_256");
}
function gkxwvsqf_202392093827_673_40_256Reveal() {
var reveals = document.querySelector("#gkxwvsqf_202392093827_673_40_256 .reveal");
var windowHeight = window.innerHeight;
var elementTop = reveals.getBoundingClientRect().top;
var elementVisible = 150;
if (elementTop < windowHeight - elementVisible) {
reveals.classList.add("active");
self.classList.add("gkxwvsqf_202392093827_673_40_256ShadowReveal");
self.classList.remove("gkxwvsqf_202392093827_673_40_256ShadowRevealOff");
} else {
reveals.classList.remove("active");
self.classList.remove("gkxwvsqf_202392093827_673_40_256ShadowReveal");
self.classList.add("gkxwvsqf_202392093827_673_40_256ShadowRevealOff");
}
}
if ("home" != "" || "Change_Page" == "Open_Image_in_New_Window"){
$("#gkxwvsqf_202392093827_673_40_256 .mainImage").css("cursor", "pointer");
$("#gkxwvsqf_202392093827_673_40_256 .mainImage").on("click", function(){
switch ("Change_Page"){
case "Change_Page":
woo.updateCurrentPage("home");
break;
case "External_Link":
window.location("home");
break;
case "Open_Image_in_New_Window":
window.open("/resources/fantastictours/uploads/main-logo-ft.png");
break;
default:
console.error("No link option selected");
}
});
}
gkxwvsqf_202392093827_673_40_256_Global.animateMenuIn = () => {
animateMenuIn();
};
function animateMenuIn(){
$("#gkxwvsqf_202392093827_673_40_256 .imageWrapper").removeClass("animateMenuOut").addClass("animateMenuIn");
}
gkxwvsqf_202392093827_673_40_256_Global.animateMenuOut = () => {
animateMenuOut();
};
function animateMenuOut(){
$("#gkxwvsqf_202392093827_673_40_256 .imageWrapper").removeClass("animateMenuIn").addClass("animateMenuOut");
}
return gkxwvsqf_202392093827_673_40_256_Global;
})(); var gkxwvsqf_202382815548_882_561_707 = (function() {
var self = document.getElementById('gkxwvsqf_202382815548_882_561_707');
//self.classList.add("sun_editor_content");
var gkxwvsqf_202382815548_882_561_707_Global = {};
gkxwvsqf_202382815548_882_561_707_Global.unload = () => {
//Unload callbacks here
console.log("Unloaded gkxwvsqf_202382815548_882_561_707");
}
return gkxwvsqf_202382815548_882_561_707_Global;
})(); var box_container_958_403_288 = (function() {
var box_container_958_403_288_Global = {};
var self = $("#box_container_958_403_288");
box_container_958_403_288_Global.unload = () => {
//Unload callbacks here
window.removeEventListener("resize", setLeftOnPercent);
console.log("Unloaded box_container_958_403_288");
}
setLeftOnPercent();
window.addEventListener("resize", setLeftOnPercent);
var currentTop = parseInt($(self).css("top"));
function fixDiv() {
var scrollTop = parseInt($(window).scrollTop());
var newTop = currentTop;
if ($("#property_toolbar").length > 0) {
var elemToolBar = $("#property_toolbar");
var elemHeight = window.getComputedStyle(elemToolBar[0]).height;
var elemPosition = elemToolBar.position();
var elemTop = elemPosition.top;
var elemBottom = parseInt(elemTop) + parseInt(elemHeight);
newTop = elemBottom + currentTop;
}
var currentPosition = ((parseInt($(self).css("top")) - newTop) + parseInt($(self).css("min-height")));
if (!isNaN(currentPosition) && !isNaN(scrollTop) && (newTop => 0)){
//console.log("scrollTop: " + scrollTop);
//console.log("currentPosition: " + currentPosition);
//console.log("newTop: " + newTop);
if (scrollTop > (currentPosition + 100)) {
$(self).css({'position': 'fixed', 'top': newTop}).slideDown('slow');
} else {
$(self).css({'position': 'absolute', 'top': '0px'});
}
}
}
//$(window).scroll(fixDiv);
function setLeftOnPercent(){
var container = $(self).parent();
var containerWidth = container.css("width");
var boxWidth = "100%";
var mainWrapper = document.querySelector("#woo_ui_wrapper");
if (mainWrapper){
var docWidth = $("#woo_ui_wrapper").width();
}else{
var docWidth = $(window).width();
}
if (boxWidth.indexOf("%") > -1){
if ((parseInt(containerWidth) < docWidth) && (containerWidth != "100%")){
//if ((parseInt(containerWidth) < docWidth)){
var intWidth = parseInt(boxWidth);
var newWidth = parseInt((docWidth * (intWidth/100)));
var leftSide1 =((docWidth - newWidth)/2);
var leftSide2 = ((docWidth - parseInt(container.css("width")))/2);
leftValue = leftSide2 - leftSide1;
$(self).css({"width": newWidth + "px", "margin-left": "0px", "margin-right": "0px", "left": -leftValue + "px"});
}
}
}
return box_container_958_403_288_Global;
})(); var gkxwvsqf_2023913213116_972_568_822 = (function() {
var self = document.getElementById('gkxwvsqf_2023913213116_972_568_822');
var gkxwvsqf_2023913213116_972_568_822_Global = {};
gkxwvsqf_2023913213116_972_568_822_Global.unload = () => {
//Unload callbacks here
console.log("Unloaded gkxwvsqf_2023913213116_972_568_822");
}
return gkxwvsqf_2023913213116_972_568_822_Global;
})(); var box_container_958_403_844 = (function() {
var box_container_958_403_844_Global = {};
var self = $("#box_container_958_403_844");
box_container_958_403_844_Global.unload = () => {
//Unload callbacks here
window.removeEventListener("resize", setLeftOnPercent);
console.log("Unloaded box_container_958_403_844");
}
setLeftOnPercent();
window.addEventListener("resize", setLeftOnPercent);
var currentTop = parseInt($(self).css("top"));
function fixDiv() {
var scrollTop = parseInt($(window).scrollTop());
var newTop = currentTop;
if ($("#property_toolbar").length > 0) {
var elemToolBar = $("#property_toolbar");
var elemHeight = window.getComputedStyle(elemToolBar[0]).height;
var elemPosition = elemToolBar.position();
var elemTop = elemPosition.top;
var elemBottom = parseInt(elemTop) + parseInt(elemHeight);
newTop = elemBottom + currentTop;
}
var currentPosition = ((parseInt($(self).css("top")) - newTop) + parseInt($(self).css("min-height")));
if (!isNaN(currentPosition) && !isNaN(scrollTop) && (newTop => 0)){
//console.log("scrollTop: " + scrollTop);
//console.log("currentPosition: " + currentPosition);
//console.log("newTop: " + newTop);
if (scrollTop > (currentPosition + 100)) {
$(self).css({'position': 'fixed', 'top': newTop}).slideDown('slow');
} else {
$(self).css({'position': 'absolute', 'top': '0px'});
}
}
}
//$(window).scroll(fixDiv);
function setLeftOnPercent(){
var container = $(self).parent();
var containerWidth = container.css("width");
var boxWidth = "100%";
var mainWrapper = document.querySelector("#woo_ui_wrapper");
if (mainWrapper){
var docWidth = $("#woo_ui_wrapper").width();
}else{
var docWidth = $(window).width();
}
if (boxWidth.indexOf("%") > -1){
if ((parseInt(containerWidth) < docWidth) && (containerWidth != "100%")){
//if ((parseInt(containerWidth) < docWidth)){
var intWidth = parseInt(boxWidth);
var newWidth = parseInt((docWidth * (intWidth/100)));
var leftSide1 =((docWidth - newWidth)/2);
var leftSide2 = ((docWidth - parseInt(container.css("width")))/2);
leftValue = leftSide2 - leftSide1;
$(self).css({"width": newWidth + "px", "margin-left": "0px", "margin-right": "0px", "left": -leftValue + "px"});
}
}
}
return box_container_958_403_844_Global;
})();