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:\/\/www.tristarhatsco.com\/cart","is_cart":"","cart_redirect_after_add":"no"};
var xoo_wsc_params = {"adminurl":"https:\/\/www.tristarhatsco.com\/wp-admin\/admin-ajax.php","wc_ajax_url":"\/?wc-ajax=%%endpoint%%","qtyUpdateDelay":"500","notificationTime":"5000","html":{"successNotice":"<ul class=\"xoo-wsc-notices\"><li class=\"xoo-wsc-notice-success\"><span class=\"xoo-wsc-icon-check_circle\"><\/span>%s%<\/li><\/ul>","errorNotice":"<ul class=\"xoo-wsc-notices\"><li class=\"xoo-wsc-notice-error\"><span class=\"xoo-wsc-icon-cross\"><\/span>%s%<\/li><\/ul>"},"strings":{"maxQtyError":"Only %s% in stock","stepQtyError":"Quantity can only be purchased in multiple of %s%","calculateCheckout":"Please use checkout form to calculate shipping","couponEmpty":"Please enter promo code"},"isCheckout":"","isCart":"","sliderAutoClose":"1","shippingEnabled":"1","couponsEnabled":"1","autoOpenCart":"yes","addedToCart":"","ajaxAddToCart":"yes","skipAjaxForData":[],"showBasket":"hide_empty","flyToCart":"no","productFlyClass":"","refreshCart":"no","fetchDelay":"200","triggerClass":""};
var wc_single_product_params = {"i18n_required_rating_text":"Please select a rating","review_rating_required":"yes","flexslider":{"rtl":false,"animation":"slide","smoothHeight":true,"directionNav":false,"controlNav":"thumbnails","slideshow":false,"animationSpeed":500,"animationLoop":false,"allowOneSlide":false},"zoom_enabled":"1","zoom_options":[],"photoswipe_enabled":"1","photoswipe_options":{"shareEl":false,"closeOnScroll":false,"history":false,"hideAnimationDuration":0,"showAnimationDuration":0},"flexslider_enabled":"1"};
var wc_cart_fragments_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","wc_ajax_url":"\/?wc-ajax=%%endpoint%%","cart_hash_key":"wc_cart_hash_e80b646c1f35ebdb9cb9286f66a5ddfd","fragment_name":"wc_fragments_e80b646c1f35ebdb9cb9286f66a5ddfd","request_timeout":"5000"};
var wc_country_select_params = {"countries":"{\"CA\":{\"AB\":\"Alberta\",\"BC\":\"British Columbia\",\"MB\":\"Manitoba\",\"NB\":\"New Brunswick\",\"NL\":\"Newfoundland and Labrador\",\"NT\":\"Northwest Territories\",\"NS\":\"Nova Scotia\",\"NU\":\"Nunavut\",\"ON\":\"Ontario\",\"PE\":\"Prince Edward Island\",\"QC\":\"Quebec\",\"SK\":\"Saskatchewan\",\"YT\":\"Yukon Territory\"},\"US\":{\"AL\":\"Alabama\",\"AK\":\"Alaska\",\"AZ\":\"Arizona\",\"AR\":\"Arkansas\",\"CA\":\"California\",\"CO\":\"Colorado\",\"CT\":\"Connecticut\",\"DE\":\"Delaware\",\"DC\":\"District Of Columbia\",\"FL\":\"Florida\",\"GA\":\"Georgia\",\"HI\":\"Hawaii\",\"ID\":\"Idaho\",\"IL\":\"Illinois\",\"IN\":\"Indiana\",\"IA\":\"Iowa\",\"KS\":\"Kansas\",\"KY\":\"Kentucky\",\"LA\":\"Louisiana\",\"ME\":\"Maine\",\"MD\":\"Maryland\",\"MA\":\"Massachusetts\",\"MI\":\"Michigan\",\"MN\":\"Minnesota\",\"MS\":\"Mississippi\",\"MO\":\"Missouri\",\"MT\":\"Montana\",\"NE\":\"Nebraska\",\"NV\":\"Nevada\",\"NH\":\"New Hampshire\",\"NJ\":\"New Jersey\",\"NM\":\"New Mexico\",\"NY\":\"New York\",\"NC\":\"North Carolina\",\"ND\":\"North Dakota\",\"OH\":\"Ohio\",\"OK\":\"Oklahoma\",\"OR\":\"Oregon\",\"PA\":\"Pennsylvania\",\"RI\":\"Rhode Island\",\"SC\":\"South Carolina\",\"SD\":\"South Dakota\",\"TN\":\"Tennessee\",\"TX\":\"Texas\",\"UT\":\"Utah\",\"VT\":\"Vermont\",\"VA\":\"Virginia\",\"WA\":\"Washington\",\"WV\":\"West Virginia\",\"WI\":\"Wisconsin\",\"WY\":\"Wyoming\",\"AA\":\"Armed Forces (AA)\",\"AE\":\"Armed Forces (AE)\",\"AP\":\"Armed Forces (AP)\"}}","i18n_select_state_text":"Select an option\u2026","i18n_no_matches":"No matches found","i18n_ajax_error":"Loading failed","i18n_input_too_short_1":"Please enter 1 or more characters","i18n_input_too_short_n":"Please enter %qty% or more characters","i18n_input_too_long_1":"Please delete 1 character","i18n_input_too_long_n":"Please delete %qty% characters","i18n_selection_too_long_1":"You can only select 1 item","i18n_selection_too_long_n":"You can only select %qty% items","i18n_load_more":"Loading more results\u2026","i18n_searching":"Searching\u2026"};
var wc_checkout_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","wc_ajax_url":"\/?wc-ajax=%%endpoint%%","update_order_review_nonce":"1f0cb6b738","apply_coupon_nonce":"88292c0ed0","remove_coupon_nonce":"fe3de4e8b8","option_guest_checkout":"no","checkout_url":"\/?wc-ajax=checkout","is_checkout":"0","debug_mode":"","i18n_checkout_error":"There was an error processing your order. Please check for any charges in your payment method and review your <a href=\"https:\/\/www.tristarhatsco.com\/my-account\/orders\">order history<\/a> before placing the order again."};
jQuery(function($){
var firstHeader = $('.header-1');
var secondHeader = $('.header-2');
var headerSection = $('.header-section');
headerSection.wrap('<div class="header-placeholder"></div>');
var headerWrap = $('.header-placeholder');
var headerHeight = firstHeader.outerHeight();
headerWrap.css('height', headerHeight);
secondHeader.hide();
$(window).scroll(function() {
var topPosition = $(window).scrollTop();
if (topPosition >= 400) {
firstHeader.slideUp();
secondHeader.slideDown();
}
if (topPosition == 0) {
secondHeader.slideUp();
firstHeader.slideDown();
}
});
});
var sbiajaxurl = "https://www.tristarhatsco.com/wp-admin/admin-ajax.php";
(function () {
var c = document.body.className;
c = c.replace(/woocommerce-no-js/, 'woocommerce-js');
document.body.className = c;
})();
jQuery(document).ready(function($){ // wait for jQuery to load
$(".et-search-form").append('<input type="hidden" name="post_type" value="product" />'); // dynamically add the input below the search box that tells the search that the post type to search are products.
$(".et_pb_menu__search-form").each(function() { // now for each search box from the Divi module
$(this).append('<input type="hidden" name="post_type" value="product" />'); // add that input there too
});
});
var PayPalCommerceGateway = {"url":"https:\/\/www.paypal.com\/sdk\/js?client-id=Ab-_edzxAFStRDwM28MMOXUrgRfPP__Rw0dX8CUEmZZi06K6zzvt5_FdPZ4LgBkXdr30jgkWuVrf8APU¤cy=USD&integration-date=2024-11-05&components=buttons,funding-eligibility,buttons,fastlane,fastlane&vault=false&commit=false&intent=capture&disable-funding=card,paylater&enable-funding=venmo","url_params":{"client-id":"Ab-_edzxAFStRDwM28MMOXUrgRfPP__Rw0dX8CUEmZZi06K6zzvt5_FdPZ4LgBkXdr30jgkWuVrf8APU","currency":"USD","integration-date":"2024-11-05","components":"buttons,funding-eligibility,buttons,fastlane,fastlane","vault":"false","commit":"false","intent":"capture","disable-funding":"card,paylater","enable-funding":"venmo"},"script_attributes":{"data-partner-attribution-id":"Woo_PPCP","data-page-type":"product-listing"},"client_id":"Ab-_edzxAFStRDwM28MMOXUrgRfPP__Rw0dX8CUEmZZi06K6zzvt5_FdPZ4LgBkXdr30jgkWuVrf8APU","currency":"USD","data_client_id":{"set_attribute":false,"endpoint":"\/?wc-ajax=ppc-data-client-id","nonce":"ad8785f3e4","user":0,"has_subscriptions":false,"paypal_subscriptions_enabled":false},"redirect":"https:\/\/www.tristarhatsco.com\/checkout","context":"mini-cart","ajax":{"simulate_cart":{"endpoint":"\/?wc-ajax=ppc-simulate-cart","nonce":"614a9f25c4"},"change_cart":{"endpoint":"\/?wc-ajax=ppc-change-cart","nonce":"4324e62f49"},"create_order":{"endpoint":"\/?wc-ajax=ppc-create-order","nonce":"bb3698e676"},"approve_order":{"endpoint":"\/?wc-ajax=ppc-approve-order","nonce":"cdf0b083f4"},"approve_subscription":{"endpoint":"\/?wc-ajax=ppc-approve-subscription","nonce":"0566a72c77"},"vault_paypal":{"endpoint":"\/?wc-ajax=ppc-vault-paypal","nonce":"3f67b92033"},"save_checkout_form":{"endpoint":"\/?wc-ajax=ppc-save-checkout-form","nonce":"ddfabebc50"},"validate_checkout":{"endpoint":"\/?wc-ajax=ppc-validate-checkout","nonce":"cc029a2197"},"cart_script_params":{"endpoint":"\/?wc-ajax=ppc-cart-script-params"},"create_setup_token":{"endpoint":"\/?wc-ajax=ppc-create-setup-token","nonce":"784a1aed60"},"create_payment_token":{"endpoint":"\/?wc-ajax=ppc-create-payment-token","nonce":"a4f33b2d69"},"create_payment_token_for_guest":{"endpoint":"\/?wc-ajax=ppc-update-customer-id","nonce":"4defe6f50f"},"update_shipping":{"endpoint":"\/?wc-ajax=ppc-update-shipping","nonce":"4fe97daa8f"},"update_customer_shipping":{"shipping_options":{"endpoint":"https:\/\/www.tristarhatsco.com\/wp-json\/wc\/store\/cart\/select-shipping-rate"},"shipping_address":{"cart_endpoint":"https:\/\/www.tristarhatsco.com\/wp-json\/wc\/store\/cart\/","update_customer_endpoint":"https:\/\/www.tristarhatsco.com\/wp-json\/wc\/store\/cart\/update-customer"},"wp_rest_nonce":"45680dfc85","update_shipping_method":"\/?wc-ajax=update_shipping_method"}},"cart_contains_subscription":"","subscription_plan_id":"","vault_v3_enabled":"1","variable_paypal_subscription_variations":[],"variable_paypal_subscription_variation_from_cart":"","subscription_product_allowed":"","locations_with_subscription_product":{"product":false,"payorder":false,"cart":false},"enforce_vault":"","can_save_vault_token":"","is_free_trial_cart":"","vaulted_paypal_email":"","bn_codes":{"checkout":"Woo_PPCP","cart":"Woo_PPCP","mini-cart":"Woo_PPCP","product":"Woo_PPCP"},"payer":null,"button":{"wrapper":"#ppc-button-ppcp-gateway","is_disabled":false,"mini_cart_wrapper":"#ppc-button-minicart","is_mini_cart_disabled":false,"cancel_wrapper":"#ppcp-cancel","mini_cart_style":{"layout":"vertical","color":"gold","shape":"pill","label":"paypal","tagline":false,"height":25},"style":{"layout":"vertical","color":"gold","shape":"pill","label":"paypal","tagline":false}},"separate_buttons":{"card":{"id":"ppcp-card-button-gateway","wrapper":"#ppc-button-ppcp-card-button-gateway","style":{"shape":"pill","color":"black","layout":"horizontal"}}},"hosted_fields":{"wrapper":"#ppcp-hosted-fields","labels":{"credit_card_number":"","cvv":"","mm_yy":"MM\/YY","fields_empty":"Card payment details are missing. Please fill in all required fields.","fields_not_valid":"Unfortunately, your credit card details are not valid.","card_not_supported":"Unfortunately, we do not support your credit card.","cardholder_name_required":"Cardholder's first and last name are required, please fill the checkout form required fields."},"valid_cards":["mastercard","visa","amex","discover","american-express","master-card"],"contingency":"NO_3D_SECURE"},"messages":[],"labels":{"error":{"generic":"Something went wrong. Please try again or choose another payment source.","required":{"generic":"Required form fields are not filled.","field":"%s is a required field.","elements":{"terms":"Please read and accept the terms and conditions to proceed with your order."}}},"billing_field":"Billing %s","shipping_field":"Shipping %s"},"simulate_cart":{"enabled":true,"throttling":5000},"order_id":"0","single_product_buttons_enabled":"","mini_cart_buttons_enabled":"1","basic_checkout_validation_enabled":"","early_checkout_validation_enabled":"1","funding_sources_without_redirect":["paypal","paylater","venmo","card"],"user":{"is_logged":false,"has_wc_card_payment_tokens":false},"should_handle_shipping_in_paypal":"","needShipping":"","vaultingEnabled":"","productType":null,"manualRenewalEnabled":"","axo":{"sdk_client_token":"eyJraWQiOiI0ZTE3Y2Y5ZGQ3YzA0OTg5ODVhOWIyNjYyMGU1OTI0YyIsInR5cCI6IkpXVCIsImFsZyI6IkVTMjU2In0.eyJpc3MiOiJodHRwczovL2FwaS5wYXlwYWwuY29tIiwiYXVkIjpbImh0dHBzOi8vYXBpLmJyYWludHJlZWdhdGV3YXkuY29tIiwidHJpc3RhcmhhdHNjby5jb20iXSwic3ViIjoiRkpSR1Q0MzY3MzRKQyIsImFjciI6WyJjbGllbnQiXSwic2NvcGUiOlsiQnJhaW50cmVlOlZhdWx0Il0sIm9wdGlvbnMiOnt9LCJheiI6ImRjZzAyLnBoeCIsImV4dGVybmFsX2lkIjpbIlBheVBhbDpGSlJHVDQzNjczNEpDIiwiQnJhaW50cmVlOjR5OXh4NG5zcnB0OHptOG4iXSwiZXhwIjoxNzMzMzcwNDEyLCJpYXQiOjE3MzMzNjk1MTIsImp0aSI6IlUyQUFNRlZfSDZzS0tKMWJrT2FWTkJ5RHZSdExZQ09GamxvS0V1Z01YVi1HQnROWU05QVp3aW1Sa3MzWVJsdEEwMFA5ZGtXZVZkZ0s0RnBQaFZrUmRuRDVRcEdQR0VDS2pmZHdPeHRKMUNIUTY0TzU1Vlc5ZGdBWVkzel9Ta2RnIn0.2MLuQbDSt8DnBu7mALX5tJ_Jqk2yVimGiKlwCQg1L5JgLb43TzPOjc2pSXd7ct54lcAnOuH23v2psS_RrIAtuA"}};
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:\/\/www.tristarhatsco.com\/wp-admin\/admin-ajax.php","images_uri":"https:\/\/www.tristarhatsco.com\/wp-content\/themes\/Divi\/images","builder_images_uri":"https:\/\/www.tristarhatsco.com\/wp-content\/themes\/Divi\/includes\/builder\/images","et_frontend_nonce":"f75e3e6d8a","subscription_failed":"Please, check the fields below to make sure you entered the correct information.","et_ab_log_nonce":"4bb7463725","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":"241909","unique_test_id":"","ab_bounce_rate":"5","is_cache_plugin_active":"yes","is_shortcode_tracking":"","tinymce_uri":"https:\/\/www.tristarhatsco.com\/wp-content\/themes\/Divi\/includes\/builder\/frontend-builder\/assets\/vendors","accent_color":"#4c4c4c","waypoints_options":[]};
var et_pb_box_shadow_elements = [];
var q2w3_sidebar_options = [{"sidebar":"sidebar-1","use_sticky_position":false,"margin_top":150,"margin_bottom":0,"stop_elements_selectors":"","screen_max_width":0,"screen_max_height":0,"widgets":["#nav_menu-2"]}];
var wc_order_attribution = {"params":{"lifetime":1.0e-5,"session":30,"base64":false,"ajaxurl":"https:\/\/www.tristarhatsco.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"}};