950) {
$info.addClass('col-lg-3');
}
var store = window.localStorage;
var key = "5-list-view";
var printKey = "24-list-view";
$('.gz-view-btn').click(function (e) {
e.preventDefault();
$('.gz-view-btn').removeClass('active');
$(this).addClass('active');
if ($(this).hasClass('gz-list-view')) {
store.setItem(key, true);
store.setItem(printKey, true);
$('.gz-list-card-wrapper').removeClass('col-sm-6 col-md-4').addClass('gz-list-col');
} else {
store.setItem(key, false);
store.setItem(printKey, false);
$('.gz-list-card-wrapper').addClass('col-sm-6 col-md-4').removeClass('gz-list-col');
}
});
var isListView = store.getItem(key) == null ? MNI.DEFAULT_LISTING : store.getItem(key) == "true";
if (isListView) $('.gz-view-btn.gz-list-view').click();
store.setItem(printKey, isListView);
MNI.LayoutResolution();
(function ($modal) {
if ($modal[0]) {
$('#gz-info-contactfriend').on('shown.bs.modal', function (e) {
$modal.css('max-height', $(window).height() + 'px');
$modal.addClass('isLoading');
$.ajax({ url: MNI.BaseUrl + '/inforeq/contactFriend?itemType='+MNI.ITEM_TYPE+'&itemId='+MNI.ITEM_ID })
.then(function (r) {
$modal.find('.modal-body')
.html($.parseHTML(r.Html));
$modal.removeClass('isLoading');
$('#gz-info-contactfriend').addClass('in');
$.getScript("https://www.google.com/recaptcha/api.js");
});
});
$('#gz-info-contactfriend .send-btn').click(function () {
var $form = $modal.find('form');
$modal.addClass('isLoading');
$.ajax({
url: $form.attr('action'),
type: 'POST',
data: $form.serialize(),
dataType: 'json'
}).then(function (r) {
if (r.Success) $('#gz-info-contactfriend').modal('hide');
else $modal.find('.modal-body').html($.parseHTML(r.Html));
$.getScript("https://www.google.com/recaptcha/api.js");
$modal.removeClass('isLoading');
});
});
}
})($('#gz-info-contactfriend .modal-content'));
(function ($modal) {
if ($modal[0]) {
$('#gz-info-subscribe').on('shown.bs.modal', function (e) {
$('#gz-info-subscribe .send-btn').show();
$modal.addClass('isLoading');
$.ajax({ url: MNI.SUBSCRIBE_URL })
.then(function (r) {
$modal.find('.modal-body')
.html(r);
$modal.removeClass('isLoading');
});
});
$('#gz-info-subscribe .send-btn').click(function () {
var $form = $modal.find('form');
$modal.addClass('isLoading');
waitForGrecaptcha(() => {
setReCaptchaToken($form, () => {
$.ajax({
url: $form.attr('action'),
type: 'POST',
data: $form.serialize()
}).then(function (r) {
if (r.toLowerCase().search('thank you') != -1) {
$('#gz-info-subscribe .send-btn').hide();
}
$modal.find('.modal-body').html(r);
$modal.removeClass('isLoading');
});
}, "hotDealsSubscribe");
})
});
}
})($('#gz-info-subscribe .modal-content'));
(function ($modal) {
$('#gz-info-calendarformat').on('shown.bs.modal', function (e) {
var backdropElem = "