var breeze_prefetch = {"local_url":"https:\/\/hobbylegends.com","ignore_remote_prefetch":"1","ignore_list":["\/cart\/","\/checkout\/","\/my-account\/","wp-admin","wp-login.php"]};
var wps_wpr = {"ajaxurl":"https:\/\/hobbylegends.com\/wp-admin\/admin-ajax.php","message":"Please enter a valid points","empty_notice":"Please enter some points !!","minimum_points":"50","confirmation_msg":"Do you really want to upgrade your user level as this process will deduct the required points from your account?","minimum_points_text":"The minimum Points Required To Convert Points To Coupons is 50","wps_wpr_custom_notice":"The number of points you had entered will get deducted from your Account","wps_wpr_nonce":"9866951b8a","not_allowed":"Please enter some valid points!","not_suffient":"You do not have a sufficient amount of points","above_order_limit":"Entered points do not apply to this order.","points_empty":"Please enter points.","checkout_page":"","wps_user_current_points":"0","is_restrict_message_enable":"","is_restrict_status_set":"","wps_restrict_rewards_msg":"You will not get any Reward Points","wps_wpr_game_setting":[],"wps_wpr_select_spin_stop":[],"wps_is_user_login":"","get_min_redeem_req":"0","is_cart_redeem_sett_enable":"0","is_checkout_redeem_enable":"0","points_coupon_name":"Cart Discount","wps_points_name":"Points","points_message_require":"You require : ","points_more_to_redeem":" points more to get redeem","wps_add_a_points":"Add a points","wps_apply_points":"Apply Points"};
var srpscripts_params = {"ajaxurl":"https:\/\/hobbylegends.com\/wp-admin\/admin-ajax.php","enable_option_nonce":"cf67b9ceed","checked_alert_msg":"Are you sure you want to be part of the Reward Points Program?","unchecked_alert_msg":"Are you sure you want to exit the Reward Points Program?"};
var wc_add_to_cart_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","wc_ajax_url":"\/?wc-ajax=%%endpoint%%","i18n_view_cart":"View cart","cart_url":"https:\/\/hobbylegends.com\/cart\/","is_cart":"","cart_redirect_after_add":"no"};
var fp_cashback_action_params = {"ajaxurl":"https:\/\/hobbylegends.com\/wp-admin\/admin-ajax.php","fp_cashback_request":"76afcfb5a8","fp_cancel_request":"2424b20646","available_points":"0","minpointstoreq":"1","maxpointstoreq":"5000","paymentmethod":"2","conversionrate":"1","conversionvalue":"1","redirection_type":"1","redirection_url":"","enable_recaptcha":"no","user_role_percentage":"100","cash_back_reason":"no"};
var frontendscripts_params = {"ajaxurl":"https:\/\/hobbylegends.com\/wp-admin\/admin-ajax.php","generate_referral":"d5953e44f1","unset_referral":"c353c009ad","unset_product":"da9995df22","booking_msg":"8edc20655b","variation_msg":"40c166940a","enable_option_nonce":"cf67b9ceed","loggedinuser":"no","buttonlanguage":"1","wplanguage":"","fbappid":"","url":"https:\/\/hobbylegends.com\/privacy-policy\/","showreferralmsg":"1","showearnmsg":"1","showearnmsg_guest":"1","showpurchasemsg":"1","showbuyingmsg":"1","productpurchasecheckbox":"yes","buyingpointscheckbox":"no","buyingmsg":"1","variable_product_earnmessage":"no","enqueue_footable":"1","check_purchase_notice_for_variation":"yes","check_referral_notice_for_variation":"no","check_buying_notice_for_variation":"no","is_product_page":"","is_date_filter_enabled":"2","custom_date_error_message":"From Date and To Date is mandatory","default_selection_error_message":"Please select any option"};
Suggested text: Our website address is: https://hobbylegends.com.
Comments
Suggested text: When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection.
An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.
Media
Suggested text: If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.
Cookies
Suggested text: If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.
If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.
When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed.
If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.
Embedded content from other websites
Suggested text: Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.
These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.
Who we share your data with
Suggested text: If you request a password reset, your IP address will be included in the reset email.
How long we retain your data
Suggested text: If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.
For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.
What rights you have over your data
Suggested text: If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.
Where we send your data
Suggested text: Visitor comments may be checked through an automated spam detection service.
function paypaltogglePopup() {
jQuery(".paypalemailid").toggle();
}
function validatePhone(txtPhone) {
var phonenumber = txtPhone;
var filter = /^((\+[1-9]{1,4}[ \-]*)|(\([0-9]{2,3}\)[ \-]*)|([0-9]{2,4})[ \-]*)*?[0-9]{3,4}?[ \-]*[0-9]{3,4}?$/;
if (filter.test(phonenumber)) {
return true;
} else {
return false;
}
}
//validating address field on register page so that user cant enter random data
function validateAddress(addressInput, e) {
if( typeof placeId === 'undefined' || placeId === null || !placeId) {
// User hasn't selected an address from the suggestions
console.log('Please select an address from the suggestions.');
var html = '<ul class="woocommerce-error"><li><strong>Error:</strong> Please select a valid address from the autocomplete suggestions.</li></ul>';
jQuery(html).insertBefore("form.woocommerce-form-register");
e.preventDefault(); // Prevent form submission if the address is empty
jQuery('html, body').animate({
scrollTop: jQuery('.woocommerce-error').offset().top- 300
}, 1000);
return false;
}else{
// User has selected an address from the suggestions
// Proceed with your further validation or processing
console.log('Address is validated. Place ID: ' + placeId);
// var user_address = addressInput.val();
if (user_address === '') {
var html = '<ul class="woocommerce-error"><li><strong>Error:</strong> Please select a valid address from the autocomplete suggestions.</li></ul>';
jQuery(html).insertBefore("form.woocommerce-form-register");
e.preventDefault(); // Prevent form submission if the address is empty
jQuery('html, body').animate({
scrollTop: jQuery('.woocommerce-error').offset().top- 300
}, 1000);
return false;
} else {
// Make a synchronous API request to the Google Geocoding API
var apiKey = 'AIzaSyB0mAr0TtwwE4kSoCh42pquepIYhDw3VBs'; // Replace with your Google API key
var geocodingApiUrl = 'https://maps.googleapis.com/maps/api/geocode/json';
// Prepare the parameters for the API request
var requestData = {
address: user_address,
key: apiKey
};
var isValid = false;
// Send the API request
$.ajax({
url: geocodingApiUrl,
data: requestData,
async: false, // Make the request synchronous
success: function (response) {
if (response.status === 'OK') {
// Address is valid
isValid = true;
var location = response.results[0].geometry.location;
var latitude = location.lat;
var longitude = location.lng;
console.log('Latitude: ' + latitude);
console.log('Longitude: ' + longitude);
e.preventDefault();
} else {
// Address is not valid, display an error message
var errorMessage = 'Invalid or incomplete address. Please select a valid address.';
var html = '<ul class="woocommerce-error"><li><strong>Error:</strong> ' + errorMessage + '</li></ul>';
jQuery(html).insertBefore("form.woocommerce-form-register");
e.preventDefault();
// Scroll to the error message
jQuery('html, body').animate({
scrollTop: jQuery('.woocommerce-error').offset().top- 300
}, 1000); // You can adjust the scrolling duration (1000ms = 1 second)
}
}
});
return isValid;
}
}
}
jQuery(document).ready(function() {
//jQuery('form.woocommerce-EditAccountForm fieldset').remove();
jQuery('form.woocommerce-form-register').on('submit', function(e) {
var reg_username = jQuery('form.woocommerce-form-register input#reg_username').val();
var reg_email = jQuery('form.woocommerce-form-register input#reg_email').val();
var reg_password = jQuery('form.woocommerce-form-register input#reg_password').val();
var phonenumber = jQuery('form.woocommerce-form-register input#phone_number').val();
//var user_address = jQuery('form.woocommerce-form-register textarea#user_address').val();
var addressInput = jQuery('form.woocommerce-form-register textarea#user_address');
jQuery('.woocommerce-error').remove();
if (reg_username == '') {
var html = '<ul class="woocommerce-error"><li><strong>Error:</strong> Please provide a username.</li></ul>';
jQuery(html).insertBefore("form.woocommerce-form-register");
e.preventDefault();
} else if (reg_email == '') {
var html = '<ul class="woocommerce-error"><li><strong>Error:</strong> Please provide a valid email address.</li></ul>';
jQuery(html).insertBefore("form.woocommerce-form-register");
e.preventDefault();
} else if (phonenumber != '' || phonenumber == '') {
if (phonenumber == '') {
var html = '<ul class="woocommerce-error"><li><strong>Error:</strong> Please provide a phone number.</li></ul>';
jQuery(html).insertBefore("form.woocommerce-form-register");
e.preventDefault();
} else {
if (!validatePhone(phonenumber)) {
var html = '<ul class="woocommerce-error"><li><strong>Error:</strong> Please provide a valid phone number.</li></ul>';
jQuery(html).insertBefore("form.woocommerce-form-register");
e.preventDefault();
} else {
// if (user_address == '' ) {
// var html = '<ul class="woocommerce-error"><li><strong>Error:</strong> Please provide address.</li></ul>';
// jQuery(html).insertBefore("form.woocommerce-form-register");
// e.preventDefault();
// }
if (!validateAddress(addressInput, e)) {
e.preventDefault(); // Prevent form submission if the address is not valid
}
}
}
} else if (user_address == '') {
var html = '<ul class="woocommerce-error"><li><strong>Error:</strong> Please provide address.</li></ul>';
jQuery(html).insertBefore("form.woocommerce-form-register");
e.preventDefault();
} else {
}
})
jQuery('.paymentGateway button').click(function() {
jQuery('body').addClass('popup-body');
});
jQuery('.paypalemailid .close-btn').click(function() {
jQuery('body').removeClass('popup-body');
});
jQuery('#paypalemailbutton').click(function() {
var paypalemail = jQuery('#paypalemail').val();
if (paypalemail) {
jQuery('.loadingImg').show();
var ajax_url = "https://hobbylegends.com/wp-admin/admin-ajax.php";
var datas = {
'action': 'verificationPaypalEmail',
'paypalemail': paypalemail
};
jQuery.ajax({
url: ajax_url,
type: 'POST',
data: datas,
success: function(response) {
jQuery('.loadingImg').hide();
jQuery('#requestresponse').html(response);
setTimeout(function() {
location.reload();
}, 1500);
}
});
} else {
jQuery('#paypalemail').css('border', '1px solid red');
}
})
});
var video = document.getElementById('banner-vdo');
function toggleMutes() {
video.muted = !video.muted;
}
jQuery(document).ready(function($) {
//var video=document.getElementById("banner-vdo") ;
$(video).on("click", function(e) {
video.muted = !video.muted;
});
})
var wc_order_attribution = {"params":{"lifetime":1.0e-5,"session":30,"base64":false,"ajaxurl":"https:\/\/hobbylegends.com\/wp-admin\/admin-ajax.php","prefix":"wc_order_attribution_","allowTracking":true},"fields":{"source_type":"current.typ","referrer":"current_add.rf","utm_campaign":"current.cmp","utm_source":"current.src","utm_medium":"current.mdm","utm_content":"current.cnt","utm_id":"current.id","utm_term":"current.trm","utm_source_platform":"current.plt","utm_creative_format":"current.fmt","utm_marketing_tactic":"current.tct","session_entry":"current_add.ep","session_start_time":"current_add.fd","session_pages":"session.pgs","session_count":"udata.vst","user_agent":"udata.uag"}};
//paste this code under the head tag or in a separate js file.
// Wait for window load
$(document).ready(function(){
// Animate loader off screen
$(".se-pre-con").fadeOut("slow");
});