jQuery(document).ready(function ($) {
    if (typeof w2pshopDesignData !== 'undefined' && w2pshopDesignData.showSuccess === true) {
        W2PShopCommon.display_success_message("Success", "Your designs have been saved.", function () {});
        W2PShopCommon.delete_cookie("w2pshop_save_design_key");
    }

    // Handle delete saved design click - calls common function
    $(document).on('click', '.delete-saved-design', function(e) {
        e.preventDefault();
        W2PShopCommon.deleteSavedDesign(this);
        return false;
    });
});