jQuery(document).ready(function(n){n("#wc-facebook-enhanced-settings-sync-products").click(function(c){c.preventDefault();var e=n(this);e.html("Syncing..."),e.prop("disabled",!0);var o={action:"wc_facebook_sync_products",nonce:wc_facebook_enhanced_settings_sync.sync_products_nonce};n.post(wc_facebook_enhanced_settings_sync.ajax_url,o,function(n){n.success?(e.html("Sync completed"),e.prop("disabled",!1)):(e.html("Sync failed"),e.prop("disabled",!1))}).fail(function(){e.html("Sync failed"),e.prop("disabled",!1)})}),n("#wc-facebook-enhanced-settings-sync-coupons").click(function(c){c.preventDefault();var e=n(this);e.html("Syncing..."),e.prop("disabled",!0);var o={action:"wc_facebook_sync_coupons",nonce:wc_facebook_enhanced_settings_sync.sync_coupons_nonce};n.post(wc_facebook_enhanced_settings_sync.ajax_url,o,function(n){n.success?(e.html("Sync completed"),e.prop("disabled",!1)):(e.html("Sync failed"),e.prop("disabled",!1))}).fail(function(){e.html("Sync failed"),e.prop("disabled",!1)})}),n("#wc-facebook-enhanced-settings-sync-shipping-profiles").click(function(c){c.preventDefault();var e=n(this);e.html("Syncing..."),e.prop("disabled",!0);var o={action:"wc_facebook_sync_shipping_profiles",nonce:wc_facebook_enhanced_settings_sync.sync_shipping_profiles_nonce};n.post(wc_facebook_enhanced_settings_sync.ajax_url,o,function(n){n.success?(e.html("Sync completed"),e.prop("disabled",!1)):(e.html("Sync failed"),e.prop("disabled",!1))}).fail(function(){e.html("Sync failed"),e.prop("disabled",!1)})}),n("#wc-facebook-enhanced-settings-sync-navigation-menu").click(function(c){c.preventDefault();var e=n(this);e.html("Syncing..."),e.prop("disabled",!0);var o={action:"wc_facebook_sync_navigation_menu",nonce:wc_facebook_enhanced_settings_sync.sync_navigation_menu_nonce};n.post(wc_facebook_enhanced_settings_sync.ajax_url,o,function(n){n.success?(e.html("Sync completed"),e.prop("disabled",!1)):(e.html("Sync failed"),e.prop("disabled",!1))}).fail(function(){e.html("Sync failed"),e.prop("disabled",!1)})})});