Please note:
For information on how to work with this special "Single Page" website we suggest you read this information at least
once:
CLICK HERE
PS - this informational message will not appear for visitors to your website
var backgroundListIndex = 0;
var backgroundList = [['1','/uploads/16194/pagetemplates/DesignCreated201801181644/images/bg.jpg'],['2','/uploads/16194/pagetemplates/DesignCreated201801181644/images/8a7fc9c8-608d-4bbf-86f3-a6dd9c0e8531.jpg'],['3','/uploads/16194/pagetemplates/DesignCreated201801181644/images/18d5277a-3b71-4fd8-82f4-5c6f5b3fcee5.jpg'],['4','/uploads/16194/pagetemplates/DesignCreated201801181644/images/6b279c4a-b305-489b-85b3-254beef0162f.jpg'],['5','/uploads/16194/pagetemplates/DesignCreated201801181644/images/68f2a7e3-069f-407e-bd31-d54375d9eaa6.jpg'],['6','/uploads/16194/pagetemplates/DesignCreated201801181644/images/71c0302a-4185-4304-be0a-57565d33d05b.jpg']];
$(document).ready(function () {
App.init();
$('.bg').css('background-color', '#ffffff');
var initial_backgroundPage = '1';
// the string value of "null" was being stored/returned from getItem call, I expanded this if block to cover all potential values
if (initial_backgroundPage == 'undefined' || initial_backgroundPage == undefined || initial_backgroundPage == null || initial_backgroundPage == "null") {
initial_backgroundPage = '1';
};
var targetTagId = convertBackgroundPageToTagId(initial_backgroundPage);
$('#pnlPageContent .menuItem').addClass('page-scroll');
$('a.page-scroll').bind('click', function (event) {
var $anchor = $(this);
var href = $anchor.attr('href');
var backgroundPage = convertTargetTagIdToBackgroundPage(href);
$('html, body').stop().animate({
scrollTop: $(href).offset().top
}, 1500, 'easeInOutExpo').promise().done(function () {
/* see if there is a background pic for this page */
setBackgroundPage(backgroundPage);
});
event.preventDefault();
});
//jQuery to collapse the navbar on scroll
$(window).scroll(function () {
if ($(".navbar").offset().top > 50) {
$(".navbar-fixed-top").addClass("top-nav-collapse");
} else {
$(".navbar-fixed-top").removeClass("top-nav-collapse");
}
});
$("div[id^='ts-footer']").css('background-color', 'rgba(80,80,80,.5)');
$("div[id^='ts-footer']").css('padding', '1px 1px 1px 1px');
$("[id^='ts-footer'] *").css('color', 'white');
$("[id^='ts-footer'] *").css('font-size', 'x-small');
if (typeof adminEditPage == 'undefined') {
}
else {
if (adminEditPage) {
$('#ts-one-page-info-alert').show(function () {
$(this).find('div.alert.alert-info').slideDown();
$('#pnlPageContent .section-header').slideDown();
});
$('.ts-section').css('border-top', '2px dotted pink');
$('.ts-section').css('border-bottom', '2px solid red');
}
}
for (i = 0; i < backgroundList.length; i++) {
var targetId = convertBackgroundPageToTagId(backgroundList[i][0]);
$(targetId).css('background-image', 'url(' + backgroundList[i][1] + ')');
$(targetId).css('background-size', '100%');
}
setTimeout(function () {
var destination = convertBackgroundPageToTagId(initial_backgroundPage);
$('html,body').stop().animate({
scrollTop: $(destination).offset().top
}, 10, 'easeInOutExpo').promise().done(function () {
/* see if there is a background pic for this page */
setBackgroundPage(initial_backgroundPage);
});
}, 500);
});
function setBackgroundPage(target_backgroundPage) {
localStorage.setItem("backgroundPage", target_backgroundPage);
return;
}
function convertBackgroundPageToTagId(backgroundPage) {
var targetTagId = '#a';
switch (backgroundPage) {
case '1':
targetTagId = '#a';
break;
case '2':
targetTagId = '#b';
break;
case '3':
targetTagId = '#c';
break;
case '4':
targetTagId = '#d';
break;
case '5':
targetTagId = '#e';
break;
case '6':
targetTagId = '#f';
break;
}
return targetTagId;
}
function convertTargetTagIdToBackgroundPage(targetTagId) {
var backgroundPage = '1';
switch (targetTagId) {
case '#a':
backgroundPage = '1';
break;
case '#b':
backgroundPage = '2';
break;
case '#c':
backgroundPage = '3';
break;
case '#d':
backgroundPage = '4';
break;
case '#e':
backgroundPage = '5';
break;
case '#f':
backgroundPage = '6';
break;
}
return backgroundPage;
}