');
$('.afterpay-logo').attr('src', '/Content/shared/afterpay-mint.png');
if ($('.send-voucher-by-button-wrapper').length) {
$('.send-voucher-by-button-wrapper').append('
We will get your address details at checkout
');
};
/* Case 22672 - Pay by deposit text change */
if (location.href.toLowerCase().indexOf('/cart') > -1) {
$('.deposit-note-wrapper .deposit-note strong').text('Pay by Deposit - $50 per person');
}
/* Case 21690 - New custom header + other changes */
$('body').on('ibEventBookingUnitChange', function () {
var itemUnit = parseInt($('.ticket-units:eq(0)').val());
$('.ticket-units').each(function () {
$('option', this).each(function () {
if ($(this).val() > 10) {
$(this).remove();
}
})
})
$('.addon-units').each(function () {
/* Case 24172 - Disable add-on quantity limit off to the Weight Charge add-ons, allowing customers to have up to the number of pax irrespective of other add-ons */
if ($(this).attr('id').indexOf('weight-charge') == -1) {
$('option', this).each(function () {
if ($(this).is(':selected')) {
if ($(this).val() > itemUnit) {
$('.addon-units option:last-child').prop('selected', true);
}
}
if ($(this).val() > itemUnit) {
$(this).remove();
}
})
var unitsLeft = itemUnit - $('option:selected', this).val();
$('.addon-units').not(this).find('option').each(function () {
if ($(this).closest('select').attr('id').indexOf('weight-charge') == -1) {
if ($(this).val() > unitsLeft) {
$(this).remove();
}
} else {
if ($(this).val() > itemUnit) {
$(this).remove();
}
}
})
}
})
})
$('.cart-details-bookings').each(function () {
$(this).find('img.prod-image').attr('src', 'https://resources.ibisnz.com/excoskyau/icon-booking.jpg');
})
/* Case 24714 - Remove humm from payment options */
if ($('#fit5-your-details-wrapper').length) {
$('.fit5-purchaser-payment-method .fit5-purchaser-payment-windcave .col-xs-12').html('Pay by Credit Card');
}
/* Case 24625 - Change deposit wording on cart page */
$('.deposit-note-wrapper .deposit-note-description').html('If Skydiving within 72 hours please do not tick ’Pay by Deposit‘ box as full payment is due at time of booking');
var $resourceDir = 'https://resources.ibisnz.com/excoskyau/';
/* Case 25001 - custom print button on the confirmation page + change # to Booking ID */
if ($('.page-receipt').length) {
$('.cart-items-booking .cart-prod-details-wrapper').each(function () {
var txt = $(this).find('.col-sm-7').eq(0).text();
txt = txt.replace('#', 'Booking ID ');
$(this).find('.col-sm-7').eq(0).text(txt);
})
$('.return-home').after('
Print this page
');
$('.print-receipt').on('click', function () {
window.print();
})
$('head').append('')
}
if (location.href.toLowerCase().indexOf('/departures/groups') > -1) {
function adjustBG() {
if (window.innerWidth < 620) {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-buy-now-groups-sm.gif)' });
} else {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-buy-now-groups.gif)' });
}
$('#container').css('margin-top', '');
}
adjustBG();
$(window).resize(function () {
adjustBG();
});
} else if (location.href.toLowerCase().indexOf('/departures/index') > -1) {
function adjustBG() {
if (window.innerWidth < 620) {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-good-choice-sm.gif)' });
} else {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-good-choice.gif)' });
}
$('#container').css('margin-top', '');
}
adjustBG();
$(window).resize(function () {
adjustBG();
});
} else if (location.href.toLowerCase().indexOf('/booking/new') > -1) {
function adjustBG() {
if (window.innerWidth < 620) {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-nice-work-sm.gif)' });
} else {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-nice-work.gif)' });
}
$('#container').css('margin-top', '');
}
adjustBG();
$(window).resize(function () {
adjustBG();
});
} else if (location.href.toLowerCase().indexOf('/giftvoucher/items/') > -1) {
function adjustBG() {
if (window.innerWidth < 620) {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-good-choice-voucher-sm.gif)' });
$('#container').css('margin-top', '315px');
} else {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-good-choice-voucher.gif)' });
$('#container').css('margin-top', '');
}
}
adjustBG();
$(window).resize(function () {
adjustBG();
});
} else if (location.href.toLowerCase().indexOf('/giftvoucher/new/') > -1) {
function adjustBG() {
if (window.innerWidth < 620) {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-lets-personalise-sm.gif)' });
$('#container').css('margin-top', '315px');
} else {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-lets-personalise.gif)' });
$('#container').css('margin-top', '');
}
}
adjustBG();
$(window).resize(function () {
adjustBG();
});
} else if (location.href.toLowerCase().indexOf('/giftvoucher') > -1) {
function adjustBG() {
if (window.innerWidth < 620) {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-buy-now-groups-sm.gif)' });
} else {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-buy-now-groups.gif)' });
}
$('#container').css('margin-top', '');
}
adjustBG();
$(window).resize(function () {
adjustBG();
});
} else if (location.href.toLowerCase().indexOf('au/cart') > -1) {
function adjustBG() {
if (window.innerWidth < 620) {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-youre-close-sm.gif)' });
} else {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-youre-close.gif)' });
}
$('#container').css('margin-top', '');
}
adjustBG();
$(window).resize(function () {
adjustBG();
});
} else if (location.href.toLowerCase().indexOf('/payment/payforcart') > -1) {
function adjustBG() {
if (window.innerWidth < 620) {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-almost-there-sm.gif)' });
} else {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-almost-there.gif)' });
}
$('#container').css('margin-top', '390px');
}
adjustBG();
$(window).resize(function () {
adjustBG();
});
} else if (location.href.toLowerCase().indexOf('/payment/') > -1) {
function adjustBG() {
if (window.innerWidth < 620) {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-lets-lock-it-in-sm.gif)' });
} else {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-lets-lock-it-in.gif)' });
}
$('#container').css('margin-top', '390px');
}
adjustBG();
$(window).resize(function () {
adjustBG();
});
} else if (location.href.toLowerCase().indexOf('/receipt/index/') > -1) {
function adjustBG() {
if (window.innerWidth < 620) {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-you-did-it-sm.gif)' });
} else {
$('body').css({ 'background-image': 'url(' + $resourceDir + 'header-you-did-it.gif)' });
}
$('#container').css('margin-top', '');
}
adjustBG();
$(window).resize(function () {
adjustBG();
});
} else {
function adjustBG() {
if (window.innerWidth < 620) {
$('#container').css('margin-top', '220px');
} else {
var calcWidth = window.innerWidth * .275;
$('#container').css('margin-top', calcWidth + 'px');
}
}
adjustBG();
$(window).resize(function () {
adjustBG();
});
}
/* Case 21690 - Custom location header */
setTimeout(function () {
var site = 'AirliBeach';
if (location.pathname.toLowerCase().indexOf('/departures') > -1) {
if (location.search.toLowerCase().indexOf('prodgroup-airlieb') > 0 || location.search.toLowerCase().indexOf('productcode=ab') > 0) {
site = 'AirliBeach';
} else if (location.search.toLowerCase().indexOf('prodgroup-byronbay') > 0 || location.search.toLowerCase().indexOf('productcode=bb') > 0) {
site = 'ByronBay';
} else if (location.search.toLowerCase().indexOf('prodgroup-cairns') > 0 || location.search.toLowerCase().indexOf('productcode=cn') > 0) {
site = 'Cairns';
} else if (location.search.toLowerCase().indexOf('prodgroup-gor') > 0 || location.search.toLowerCase().indexOf('productcode=gr') > 0) {
site = 'GrORoad';
} else if (location.search.toLowerCase().indexOf('prodgroup-hunter') > 0 || location.search.toLowerCase().indexOf('productcode=hv') > 0) {
site = 'HunteValle';
} else if (location.search.toLowerCase().indexOf('prodgroup-melbourne') > 0 || location.search.toLowerCase().indexOf('productcode=me') > 0) {
site = 'MeSKilda';
} else if (location.search.toLowerCase().indexOf('prodgroup-missionb') > 0 || location.search.toLowerCase().indexOf('productcode=mb') > 0) {
site = 'MissiBeach';
} else if (location.search.toLowerCase().indexOf('prodgroup-noosa') > 0 || location.search.toLowerCase().indexOf('productcode=na') > 0) {
site = 'Noosa';
} else if (location.search.toLowerCase().indexOf('prodgroup-perthcbd') > 0 || location.search.toLowerCase().indexOf('productcode=pc') > 0) {
site = 'PerCBD';
} else if (location.search.toLowerCase().indexOf('prodgroup-perth') > 0 || location.search.toLowerCase().indexOf('productcode=pe') > 0) {
site = 'Perth';
} else if (location.search.toLowerCase().indexOf('prodgroup-newcastle') > 0 || location.search.toLowerCase().indexOf('productcode=sn') > 0) {
site = 'Newcastle';
} else if (location.search.toLowerCase().indexOf('prodgroup-surfers') > 0 || location.search.toLowerCase().indexOf('productcode=sp10t') > 0) {
site = 'SkySurPa';
} else if (location.search.toLowerCase().indexOf('prodgroup-wollong') > 0 || location.search.toLowerCase().indexOf('productcode=sw') > 0) {
site = 'SydneyWoll';
} else if (location.search.toLowerCase().indexOf('prodgroup-yarra') > 0 || location.search.toLowerCase().indexOf('productcode=yv') > 0) {
site = 'YarraValle';
} else if (location.search.toLowerCase().indexOf('prodgroup-sydney') > 0 || location.search.toLowerCase().indexOf('productcode=sy') > 0) {
site = 'SydCBD';
} else {
site = 'AirliBeach';
}
}
function adjustDropdown() {
/*if (location.href.toLowerCase().indexOf('ttps://cart.skydive.com.au/') === 1) {
$('select#ProductCode option').each(function () {
if ($(this).text().indexOf('---') > 0 || $(this).data('extra1') == 'group' || $(this).data('extra2') != site) {
$(this).remove();
}
});
}*/
}
$(function () {
adjustDropdown();
})
$('body').on('ibEventDeparturePartialReload', function () {
adjustDropdown();
})
}, 50);
/* Case 24843 - Add Amex logo to cart page */
if ($('.fit5-purchaser-payment-windcave').length) {
$('.fit5-purchaser-payment-windcave > .form-group > p > img').attr('src', 'https://resources.ibisnz.com/excoskyau/payment-icons-cc.png');
}
/* mobile nav threshold settings */
/* burger = mobile nav, mini = smaller icon, micro = no cart icon and in the nav instead, nano = not used at the moment */
var goBurger = 1, goBurgerMini = 1, goBurgerMicro = 1, goBurgerNano = 1;
(function () {
var $window = $(window), $html = $('html');
function resize() {
if ($window.innerWidth() < goBurger) {
$html.addClass('hamburger');
} else {
$html.removeClass('hamburger');
}
if ($window.innerWidth() < goBurgerMini) {
$html.addClass('mini');
} else {
$html.removeClass('mini');
}
if ($window.innerWidth() < goBurgerMicro) {
$html.addClass('micro');
$('#nav-cart').removeClass('hidden');
} else {
$html.removeClass('micro');
$('#nav-cart').addClass('hidden');
}
if ($window.innerWidth() < goBurgerNano) {
$html.addClass('nano');
} else {
$html.removeClass('nano');
}
}
$window.resize(resize).trigger('resize');
})();
/* set background smooth scroll | param 70 = 70% of the page scroll */
FIT5Initial.setBackgroundSmoothScroll(0);
});