"
).appendTo(".shop.checkout.page_content"),
new SURPREENDA.Modal({ el: "#tpl_checkout_warning", defaults: { width: 450, closeBtn: !1 } }),
setTimeout(function () {
$("#fancybox-wrap #fancybox-outer .lightbox_checkout_warning")
.parent()
.parent()
.parent()
.find("#fancybox-close")
.css("display", "none");
}, 500)),
$("#SPN_CHECKOUT form#shoppingCartForm #ajaxEventDiv .cart_list #btn_add_map_info")
.parent()
.css({ width: "100%", "text-align": "center", padding: 0 }),
$("#SPN_CHECKOUT form#shoppingCartForm #ajaxEventDiv .cart_list #btn_add_map_info")
.parent()
.parent()
.css({ width: "100%", margin: 0 }),
$("#SPN_CHECKOUT form#shoppingCartForm #ajaxEventDiv .cart_list div.item_row .edit_row")
.parent()
.parent()
.css("width", "100%")),
$("#SPN_CHECKOUT #shoppingCartForm").length && applyCheckoutStyling(),
$("section.main-section section.index.page_content").length,
$("#statementDate option").each(function (t) {
t > 3 && $(this).remove();
}),
$(".my_account_link a").on("click", function (t) {
var e = $(".my_account_link a").attr("href");
$(".my_account_link a").attr("href", "javascript:;"), (window.location = e);
}),
$(".pwrl.page_content").length &&
($("#pwrIntro .page_intro").prepend('Turn on hotpoints Pay
'),
applyPayWithRewards(),
$('select#pwrl_account_id option:contains("-- Please Select --")').text("Select a card")),
$("ul.faq-tabs li a").click(function () {
var t = $(this).attr("data-tab");
$("ul.faq-tabs li a").removeClass("current"),
$(".accordion-container").removeClass("current"),
$(this).addClass("current"),
$(".accordion-container").removeClass("currentHide"),
$(".accordion-container").removeClass("currentShow"),
$("#" + t).addClass("current");
}),
$("#question_search_button").length > 0 &&
($(".accordion-container").before(''),
$(
''
).appendTo(".freeform_page_temp_content_box form")),
$("#question_search_button").on("click", function (t) {
var e = $("#txtSearch").val();
if (0 == e.length) return alert("Please enter a search term"), !1;
$("#question_search_results").html("").css("display", "block"),
$("#search_clear").css("display", "inline"),
$(".faq-tabs").hide(),
$(".accordion-container").addClass("currentHide");
var a = 0,
o = "";
$(".accordion-container > section section div div").each(function (t) {
if (-1 !== $(this).text().toLowerCase().indexOf(e.toLowerCase())) {
var n = new RegExp(e, "ig");
(o +=
'' +
$(this)
.html()
.replace(n, function (t) {
return '' + t + "";
}) +
"
"),
a++;
}
}),
0 == a &&
(o =
'Sorry, no answers were found matching the supplied keywords.
Please refine your search, and try again.
'),
$("#question_search_results").html(o);
}),
$("#search_clear").on("click", function (t) {
$("#question_search_results").html("").css("display", "none"),
$(".faq-tabs").show(),
$(".accordion-container.current.currentShow").show(),
$(".accordion-container").each(function (t) {
$(this).hasClass("current")
? ($(this).removeClass("currentHide"), $(this).addClass("currentShow"))
: $(this).addClass("currentHide");
}),
$("#search_clear").css("display", "none"),
$("#txtSearch").val("");
}),
searchForCSRFToken(),
0 == $(".page_content").length &&
($("#dtm_free_form1").length > 0
? $("#dtm_free_form1").addClass("page_content")
: $("#dtm_free_form2").length > 0
? $("#dtm_free_form2").addClass("page_content")
: $("#dtm_free_form3").length > 0
? $("#dtm_free_form3").addClass("page_content")
: $(".main-section").addClass("page_content"));
var P = $("#resp-menu"),
T = $(".sub-category-menu"),
I = !1;
if (
($(P).on("click", function (t) {
t.preventDefault(), T.slideToggle();
}),
$(window).resize(function () {
var t = $(window).width();
t > 920 && T.is(":hidden") && T.removeAttr("style"),
$("#tetable").length > 0 && t <= 480
? (0 == I &&
($("#tetable tr.even, #tetable tr.odd").on("click", function () {
applyTransactionAccordion();
}),
applyTransactionAccordion()),
(I = !0))
: (I = !1),
applyEllipsizeTextBoxStyling();
}),
processCrumbtrail(),
($.xhrPool.abortAll = function () {
$(this).each(function (t, e) {
e.abort(), $.xhrPool.splice(t, 1);
});
}),
$.ajaxSetup({
beforeSend: function (t) {
$.xhrPool.push(t);
},
complete: function (t, e) {
var a = $.xhrPool.indexOf(t);
a > -1 && $.xhrPool.splice(a, 1),
applyEllipsizeTextBoxStyling(),
searchForCSRFToken(),
$(".pwrl.page_content").length && applyPayWithRewards();
},
}),
$("#kiwisaverSlider").length > 0)
) {
var B = 1 / 210,
E = 210,
R = 4200,
H = isLoggedin() ? Math.floor(availablePoints / E) * E : 275e3,
O = $("#kiwisaverSlider").slider({
value: R,
min: R,
max: H,
step: E,
create: function (t, e) {
$('').appendTo("#kiwisaverSlider");
var a = $(".ui-slider-handle").position();
$("#redbar").css("width", a.left);
var o = void 0 !== e.value ? e.value : R;
$("#pointsValue").val(o);
},
slide: function (t, e) {
var a = e.value,
o = e.value * B,
n = $(".ui-slider-handle").position();
$("#pointsValue").val(a),
$("#dollarValue").html("$" + o.toFixed(2)),
$("#qty").val(a / E),
$("#redbar").css("width", n.left);
},
stop: function (t, e) {
var a = $(".ui-slider-handle").position();
$("#redbar").css("width", a.left),
$("#pointsValue").val() > availablePoints &&
$("button.btn-link.kiwisaver_btn").addClass("disabled-element").prop("disabled", !0);
},
});
(minSlideValue = $("#kiwisaverSlider").slider("option", "min")),
(maxSlideValue = $("#kiwisaverSlider").slider("option", "max")),
$(".dollar-value .start-val").html("$" + (minSlideValue * B).toFixed(2)),
$(".dollar-value .end-val").html("$" + (maxSlideValue * B).toFixed(2)),
$(".hotpoints-value .start-val").html(numberWithCommas(minSlideValue) + " pts"),
$(".hotpoints-value .end-val").html(numberWithCommas(maxSlideValue) + " pts"),
(pointsVal = $("#kiwisaverSlider").slider("value")),
(dollarVal = $("#kiwisaverSlider").slider("value") * B),
$("#pointsValue").val(pointsVal),
$("#dollarValue").html(dollarVal.toFixed(2)),
$("#qty").val(pointsVal / E);
}
$("#sliderval #pointsValue").on("change", function () {
var t = parseInt($(this).val().replace(/\D/g, ""), 10);
isNaN(t) && (t = R), t < R && (t = R), (t = Math.floor(t / E) * E), O.slider("value", t), $(this).val(t);
var e = $("#kiwisaverSlider").slider("value") * B;
$("#sliderval #dollarValue").html(e.toFixed(2)), $("#qty").val(t / E);
var a = $(".ui-slider-handle").position();
$("#redbar").css("width", a.left);
}),
$("#sliderval #dollarValue").on("change", function () {
O.slider("value", parseInt($(this).val() * E));
}),
$("#contact").length > 0 &&
($(
"You can contact us for enquiries about your hotpoints account using the details below.
"
).appendTo("#contact header"),
$("Send an email.
").insertAfter("#contact header"),
$(
"We aim to respond to email enquiries within two business days.
For security reasons, please don't email any private information, e.g. Online banking password, credit card numbers or PIN.
"
).insertAfter("#contact form fieldset label:last-child"),
$(
'Call us.
0800 861 862
Monday to Friday 8am - 6pm
+64 9 913 6226
From overseas
(International toll charges apply)
Westpac card services.
For general card enquiries or to open a Westpac hotpoints credit card account.
0800 888 111
+64 9 912 8000
From overseas
(International toll charges apply)
'
).insertAfter("#contact"),
$("label[for=name] span").html(function () {
return $(this).html().replace("Name ", "Name: ").replace("Contact us ", "Contact us: ");
}),
$("label[for=email_addr] span").html(function () {
return $(this).html().replace("E-Mail ", "Email: ");
})),
isLoggedin() ||
$("#sitemap dd a").each(function () {
("Contact Us" != $.trim($(this).html()) && "Points Gifting" != $.trim($(this).html())) ||
$(this).parent().css("display", "none");
}),
$("#tetable").length > 0 &&
$(window).width() <= 480 &&
(setTimeout(function () {
$("#tetable tr.even, #tetable tr.odd").length > 0 &&
($("#tetable tr.even, #tetable tr.odd").on("click", function () {
applyTransactionAccordion();
}),
(I = !0));
}, 5e3),
applyTransactionAccordion()),
setTimeout(function () {
showOnLoad(), searchForCSRFToken();
}, 3e3);
});