(function ($) {
function refreshCarousels() {
$('.dipl_image_card_carousel .swiper-container').each(function () {
const el = this;
const s = el.swiper; // Swiper instance created by DP module
if (!s) return;
// Make absolutely sure touch is allowed at the phone breakpoint
s.params.allowTouchMove = true;
s.allowTouchMove = true;
// Recalculate sizes after images / fonts / viewport settle
if (typeof s.updateSize === 'function') s.updateSize();
if (typeof s.updateSlides === 'function') s.updateSlides();
if (typeof s.updateProgress === 'function') s.updateProgress();
if (typeof s.updateSlidesClasses === 'function') s.updateSlidesClasses();
// Keep the same slide but ensure transform is correct
if (typeof s.slideTo === 'function') s.slideTo(s.activeIndex || 0, 0, false);
});
}
// Call once after everything has loaded, and again on resize/orientation change
window.addEventListener('load', function () {
setTimeout(refreshCarousels, 300);
});
window.addEventListener('resize', function () {
setTimeout(refreshCarousels, 200);
});
window.addEventListener('orientationchange', function () {
setTimeout(refreshCarousels, 200);
});
// Fallback: manually drive the active Swiper when arrows are tapped
$(document).on('click touchstart', '.dipl_image_card_carousel .swiper-button-next', function (e) {
e.preventDefault();
const s = $(this).closest('.dipl_image_card_carousel').find('.swiper-container')[0]?.swiper;
if (s && typeof s.slideNext === 'function') s.slideNext();
});
$(document).on('click touchstart', '.dipl_image_card_carousel .swiper-button-prev', function (e) {
e.preventDefault();
const s = $(this).closest('.dipl_image_card_carousel').find('.swiper-container')[0]?.swiper;
if (s && typeof s.slidePrev === 'function') s.slidePrev();
});
})(jQuery);
var DIVI = {"item_count":"%d Item","items_count":"%d Items"};
var et_builder_utils_params = {"condition":{"diviTheme":true,"extraTheme":false},"scrollLocations":["app","top"],"builderScrollLocations":{"desktop":"app","tablet":"app","phone":"app"},"onloadScrollLocation":"app","builderType":"fe"};
var et_frontend_scripts = {"builderCssContainerPrefix":"#et-boc","builderCssLayoutPrefix":"#et-boc .et-l"};
var et_pb_custom = {"ajaxurl":"https:\/\/gameonsp.ca\/wp-admin\/admin-ajax.php","images_uri":"https:\/\/gameonsp.ca\/wp-content\/themes\/Divi\/images","builder_images_uri":"https:\/\/gameonsp.ca\/wp-content\/themes\/Divi\/includes\/builder\/images","et_frontend_nonce":"a0b4a7d330","subscription_failed":"Please, check the fields below to make sure you entered the correct information.","et_ab_log_nonce":"aea4d52968","fill_message":"Please, fill in the following fields:","contact_error_message":"Please, fix the following errors:","invalid":"Invalid email","captcha":"Captcha","prev":"Prev","previous":"Previous","next":"Next","wrong_captcha":"You entered the wrong number in captcha.","wrong_checkbox":"Checkbox","ignore_waypoints":"no","is_divi_theme_used":"1","widget_search_selector":".widget_search","ab_tests":[],"is_ab_testing_active":"","page_id":"1","unique_test_id":"","ab_bounce_rate":"5","is_cache_plugin_active":"yes","is_shortcode_tracking":"","tinymce_uri":"https:\/\/gameonsp.ca\/wp-content\/themes\/Divi\/includes\/builder\/frontend-builder\/assets\/vendors","accent_color":"#ab9a9a","waypoints_options":[]};
var et_pb_box_shadow_elements = [];
var pwh_dcfh_params = {"ajaxURL":"https:\/\/gameonsp.ca\/wp-admin\/admin-ajax.php","ajaxNonce":"0ce96b4f9d","pluginURL":"https:\/\/gameonsp.ca\/wp-content\/plugins\/divi-contact-form-helper","blogURL":"https:\/\/gameonsp.ca","wpLocale":"en","datepickerClass":"et_pb_datetimepicker_input","wpMaxUploadSize":"52428800","wpMaxUploadSizeFormatted":"50 MB","imageMimeTypes":["image\/jpeg","image\/gif","image\/png","image\/bmp","image\/tiff","image\/webp","image\/avif","image\/x-icon","image\/heic","image\/heif","image\/heic-sequence","image\/heif-sequence"],"uploadFileClass":"et_pb_file_input","isSuperAdmin":"","userIPAddress":"0e1ea42f0bc80d945ad02d8e851d8e81","i10n":{"duplicate_form_id_text":"Attention: multiple contact forms currently have the same unique ID. Please open the module settings and open the Admin Label toggle and change the Contact Form Unique ID.","file_upload_btn_text":"Choose Files","accepted_file_text":"Accepted file types:","max_filesize_text":"Max. file size:","chosen_file_text":"No Files Chosen","selected_files_text":"{chosen_files_count} file{_s_} selected","uploading_text":"{percentage} uploaded your files, please wait for the system to continue.","already_attached_text":"File {filename} has already attached. Please choose another file.","allow_filesize_text":"File {filename} not uploaded. Maximum file size {allowed_filesize}.","x_files_allow_text":"Only {allowed_files} files are allowed to upload.","remove_file_text":"Are you sure you want to remove {filename}?","delete_file_icon_hover_text":"Delete","security_reason_text":"File {filename} has failed to upload. Sorry, this file type is not permitted for security reasons.","fill_message_text":"Please fill in the following fields:","fix_message_text":"Please fix the following errors:","siganture_empty_text":"The signature pad is empty. Please sign it and then save.","siganture_before_save_text":"Are you sure you want to save the signature?","siganture_save_text":"The signature has been saved successfully!","siganture_delete_text":"The signature has been deleted successfully!"}};
var et_pb_sticky_elements = {"et_pb_section_1_tb_header":{"id":"et_pb_section_1_tb_header","selector":".et_pb_section_1_tb_header","position":"top","topOffset":"0px","bottomOffset":"0px","topLimit":"none","bottomLimit":"none","offsetSurrounding":"on","transition":"on","styles":{"module_alignment":{"desktop":"","tablet":"","phone":""},"positioning":"relative"},"stickyStyles":{"position_origin_r":"top_left","horizontal_offset":"","vertical_offset":""}}};