( function( api ) {
	// Extends our custom "shopping-solution" section.
	api.sectionConstructor['shopping-solution'] = api.Section.extend( {

		// No events for this type of section.
		attachEvents: function () {},

		// Always make the section active.
		isContextuallyActive: function () {
			return true;
		}
	} );

} )( wp.customize );

(function ($) {
    function ResetChildDemoSettings() {
        if (!confirm("Are you sure you want to reset demo import settings?")) return;

        $.post(ajaxurl, { action: 'shopping_solution_reset_demo_import_settings' }, function () {
            location.reload();
        });
    }

    window.ResetChildDemoSettings = ResetChildDemoSettings;
})(jQuery);

(function ($, wp) {
    function ResetChildGlobalColor() {
        if (confirm("Are you sure you want to reset global color settings?")) {
            wp.customize.instance("ecommerce_solution_first_color").set("#2bbef9");
        }
    }

    window.ResetChildGlobalColor = ResetChildGlobalColor;
})(jQuery, wp);

