!function(s){var i,c,a,n,r,o,e,d,t,g,l,m,u;function p(e){s(".ywgc-form-preview-amount").text(e)}function y(e){s("button.gift_card_add_to_cart_button").attr("disabled",!e)}function _(){var t=s("#give-as-present"),a=s("button.ywgc-amount-buttons"),c=s("input.ywgc-amount-buttons"),i=s("input.ywgc-manual-amount"),n=s("button.ywgc-amount-buttons:first"),r=s(".ywgc-manual-amount-container"),o=(0===a.length&&y(!1),1===a.length&&0===i.length&&a.hide(),("1"==i.length&&void 0!==i.val()&&0===i.val().length||1===a.length||0===r.length)&&(n.addClass("selected_button"),n.hasClass("selected_button")&&s("input.ywgc-amount-buttons:first").attr("name","gift_amounts"),s(".ywgc-form-preview-amount").text(n.data("wc-price"))),a.on("click",function(e){e.preventDefault(),a.removeClass("selected_button"),c.removeClass("selected_button"),c.removeAttr("name"),i.removeClass("selected_button"),s(this).addClass("selected_button"),s(this).next().addClass("selected_button"),s(".ywgc-manual-amount-error").removeClass("selected_button"),s(document).trigger("ywgc-amount-changed",[s(this)])}),i.on("focusout",function(e){0===i.val().length&&n.click()}),i.on("click change keyup",function(e){var t;e.preventDefault(),s(".ywgc-manual-amount-error").show(),(s(this).hasClass("ywgc-manual-amount")?s(".ywgc-predefined-amount-button"):(a.removeClass("selected_button"),s(".ywgc-manual-currency-symbol"))).removeClass("selected_button"),c.removeClass("selected_button"),c.removeAttr("name"),s(".ywgc-form-preview-amount").text(s(this).data("wc-price")),s(".summary .price").text(s(this).data("wc-price")),i.length&&(r.removeClass("ywgc-red-border"),r.addClass("ywgc-normal-border"),e=i.val(),t=new RegExp("^[1-9]\\d*(?:\\"+ywgc_data.currency_format_decimal_sep+"\\d{1,2})?$","g"),e.length&&!t.test(e)?(s(".ywgc-manual-amount-error").remove(),r.after('<div class="ywgc-manual-amount-error">'+ywgc_data.manual_amount_wrong_format+"</div>"),r.addClass("ywgc-red-border"),r.removeClass("ywgc-normal-border"),p(o=accounting.formatMoney("",{symbol:ywgc_data.currency_format_symbol,decimal:ywgc_data.currency_format_decimal_sep,thousand:ywgc_data.currency_format_thousand_sep,precision:ywgc_data.currency_format_num_decimals,format:ywgc_data.currency_format})),y(!1)):parseInt(e)<parseInt(ywgc_data.manual_minimal_amount)&&0<ywgc_data.manual_minimal_amount_error.length?(s(".ywgc-manual-amount-error").remove(),r.after('<div class="ywgc-manual-amount-error">'+ywgc_data.manual_minimal_amount_error+"</div>"),r.addClass("ywgc-red-border"),r.removeClass("ywgc-normal-border"),p(o=accounting.formatMoney(e,{symbol:ywgc_data.currency_format_symbol,decimal:ywgc_data.currency_format_decimal_sep,thousand:ywgc_data.currency_format_thousand_sep,precision:ywgc_data.currency_format_num_decimals,format:ywgc_data.currency_format})),y(!1)):parseInt(e)>parseInt(ywgc_data.manual_maximum_amount)&&0<ywgc_data.manual_maximum_amount_error.length&&0!=parseInt(ywgc_data.manual_maximum_amount)?(s(".ywgc-manual-amount-error").remove(),r.after('<div class="ywgc-manual-amount-error">'+ywgc_data.manual_maximum_amount_error+"</div>"),r.addClass("ywgc-red-border"),r.removeClass("ywgc-normal-border"),p(o=accounting.formatMoney(e,{symbol:ywgc_data.currency_format_symbol,decimal:ywgc_data.currency_format_decimal_sep,thousand:ywgc_data.currency_format_thousand_sep,precision:ywgc_data.currency_format_num_decimals,format:ywgc_data.currency_format})),y(!1)):e?(s(".ywgc-manual-amount-error").remove(),y(!0),(o=accounting.unformat(e,ywgc_data.mon_decimal_point))<=0?y(!1):(p(o=accounting.formatMoney(o,{symbol:ywgc_data.currency_format_symbol,decimal:ywgc_data.currency_format_decimal_sep,thousand:ywgc_data.currency_format_thousand_sep,precision:ywgc_data.currency_format_num_decimals,format:ywgc_data.currency_format})),y(!0))):(p(o=accounting.formatMoney("",{symbol:ywgc_data.currency_format_symbol,decimal:ywgc_data.currency_format_decimal_sep,thousand:ywgc_data.currency_format_thousand_sep,precision:ywgc_data.currency_format_num_decimals,format:ywgc_data.currency_format})),y(!1)))}),n.data("wc-price"));a.on("click",function(e){e.preventDefault(),c.removeAttr("name"),t.length||(s("input.selected_button").data("price")<0?y(!1):(y(!0),o=s("input.selected_button").data("wc-price"),s("input.selected_button").attr("name","gift_amounts")),p(o)),r.hasClass("selected_button")?(s(".ywgc-manual-amount-error").show(),y(!1)):(s(".ywgc-manual-amount-error").hide(),y(!0))}),s("#yith-wapo-container").length&&y(!0)}function w(){r(s("div.cart_totals")),s.ajax({url:e("get_cart_totals"),dataType:"html",success:function(e){s("div.cart_totals").replaceWith(e)}}),s(document.body).trigger("update_checkout")}function f(e,t,a,c,i){var n=s("#give-as-present");""!==e&&n.attr("data-price",e),""!==t&&n.attr("data-price-html",t),""!==a&&n.attr("data-product-id",a),""!==c&&n.attr("data-product-name",c),""!==i&&n.attr("data-image-url",i)}"undefined"!=typeof ywgc_data&&(s(document).on("click",".ywgc-choose-image.ywgc-choose-template",function(e){e.preventDefault(),s("#yith-ywgc .yith-ywgc-popup-close").show()}),s(document).on("ywgc-picture-changed",function(e,t,a){s(".ywgc-template-design").remove(),s(".ywgc-design-type").remove(),"custom"==a&&(s(".ywgc-custom-upload-image-li").show(),t="custom"),"custom-modal"==a&&(t="custom-modal"),s("form.cart").append('<input type="hidden" class="ywgc-design-type" name="ywgc-design-type" value="'+t+'">'),s("form.cart").append('<input type="hidden" class="ywgc-template-design" name="ywgc-template-design" value="'+a+'">')}),s(function(){ywgc_data.is_product&&(s("#ywgc-delivery-date").datetimepicker({minDate:ywgc_data.min_date,maxDate:ywgc_data.max_date,dateFormat:ywgc_data.date_format,timeFormat:ywgc_data.time_format,timezone:ywgc_data.timezone,showSecond:!1,showMillisec:!1,showMicrosec:!1,showTimezone:!1,hourText:ywgc_data.hour_text,currentText:ywgc_data.current_text,closeText:ywgc_data.close_text,controlType:"select",hour:parseInt(ywgc_data.default_hour),minute:parseInt(ywgc_data.default_minutes),beforeShow:function(e,t){s("#ui-datepicker-div").addClass("ywgc-date-picker"),setTimeout(function(){s("#ywgc-delivery-date").datepicker("widget").find(".ui-timepicker-div").hide(),s(".ui-datepicker-calendar td").hasClass("ui-datepicker-current-day")?s("#ywgc-delivery-date").datepicker("widget").find(".ui-timepicker-div").show():s(ywgc_data.today_selected_message_div).insertAfter(".ui-timepicker-div")},1)},onSelect:function(e,t){setTimeout(function(){s("td.ui-datepicker-today").hasClass("ui-datepicker-current-day")?(s("#ywgc-delivery-date").datepicker("widget").find(".ui-timepicker-div").hide(),s(ywgc_data.today_selected_message_div).insertAfter(".ui-timepicker-div"),s("input#ywgc-delivery-date").val("")):s("#ywgc-delivery-date").datepicker("widget").find(".ui-timepicker-div").show()},1)}}),s(".ywgc-choose-design-preview .ywgc-design-list li.default-image-li .ywgc-preset-image img").click(),_())}),i=s(".product-type-gift-card .woocommerce-product-gallery__image a"),c=s(".product-type-gift-card .woocommerce-product-gallery__image--placeholder"),s(".ywgc-preset-image.ywgc-default-product-image img").addClass("selected_design_image"),s(document).on("click",".product-type-gift-card form.gift-cards_form.cart .ywgc-preset-image img:not(.ywgc_upload_plus_icon)",function(e){e.preventDefault();var t,a,e=s(this).closest(".ywgc-preset-image").data("design-id");s(document).trigger("ywgc-picture-changed",["template",e]),s("a.lightbox-added").remove(),0!=s(".product-type-gift-card .woocommerce-product-gallery__wrapper").children().length&&(s(".product-type-gift-card .woocommerce-product-gallery__image").remove(),e=s(this).closest(".ywgc-preset-image").data("design-url"),t=s(this).attr("srcset"),a=s(this).attr("src"),(s(this).hasClass("custom-selected-image")||s(this).hasClass("custom-modal-selected-image"))&&(e=a),0!=c.length&&c.remove(),s('<div data-thumb="'+a+'" data-thumb-alt class="woocommerce-product-gallery__image"><a href="'+e+'"><img src="'+e+'" class="wp-post-image size-full" alt="" data-caption="" data-src="'+e+'" data-large_image="'+e+'" data-large_image_width="1024" data-large_image_height="1024" sizes="(max-width: 600px) 100vw, 600px"'+t+' width="600" height="600"></a></div>').insertBefore(".ywgc-main-form-preview-container"))}),s(document).on("click",".ywgc-preset-image img:not(.ywgc_upload_plus_icon)",function(e){e.preventDefault();e=s(this).closest(".ywgc-preset-image").data("design-id");s(".ywgc-preset-image img").removeClass("selected_design_image"),s(".ywgc-preset-image").removeClass("selected_image_parent"),s(this).addClass("selected_design_image"),s(this).closest(".ywgc-preset-image").addClass("selected_image_parent"),s(document).trigger("ywgc-picture-changed",["template",e])}),s(document).on("yith_ywgc_popup_template_loaded",function(e,t){s(t).on("click","a.ywgc-show-category",function(e){var t=s(this).data("category-id");return s("a.ywgc-custom-design-menu-title-link").removeClass("ywgc-category-selected"),s("a.ywgc-show-category").removeClass("ywgc-category-selected"),s(this).addClass("ywgc-category-selected"),("all"!==t?(s(".ywgc-design-item").hide(),s(".ywgc-design-item."+t)):s(".ywgc-design-item")).fadeIn("fast"),!1}),s(t).on("click","a.ywgc-custom-design-menu-title-link",function(e){s("a.ywgc-show-category").removeClass("ywgc-category-selected"),s(this).addClass("ywgc-category-selected")}),s(t).on("click",".ywgc-preset-image img",function(e){var t,a,c;e.preventDefault(),s(".ywgc-preset-image img").removeClass("selected_design_image"),s(this).addClass("selected_design_image"),s(this).hasClass("selected_design_image")&&(e=s(this).attr("src"),t=s(this).parent().data("design-id"),a=s(this).parent().data("design-url"),c='<a href="'+e+'"><img src="'+e+'" class="wp-post-image size-thumbnail" alt="" data-caption="" data-src="'+e+'" data-large_image="'+e+'" data-large_image_width="1024" data-large_image_height="1024" sizes="(max-width: 600px) 100vw, 600px" width="600" height="600"></a>',e='<img src="'+e+'" class="attachment-shop_thumbnail size-shop_thumbnail selected_design_image selected_design_image_in_modal" alt="" sizes="(max-width: 150px) 100vw, 150px" width="150" height="150">',s(".ywgc-design-list li.default-image-li .ywgc-preset-image ").hasClass("ywgc-default-product-image")&&i.html(c),s(".ywgc-design-list li.default-image-li .ywgc-preset-image").html(e),s(".ywgc-design-list li.default-image-li .ywgc-preset-image").data("design-id",t),s(".ywgc-design-list li.default-image-li .ywgc-preset-image").data("design-url",a)),s(".yith-ywgc-popup-wrapper .yith-ywgc-popup-close").click()}),s(t).on("click",".ywgc-upload-section-modal",function(e){e.preventDefault(),s(".ywgc-design-list-modal").hide(),s(".ywgc-custom-upload-container-modal").show()}),s(t).on("click",".ywgc-show-category",function(e){e.preventDefault(),s(".ywgc-custom-upload-container-modal").hide(),s(".ywgc-design-list-modal").show()}),s("#ywgc-upload-picture-modal").on("change",function(){s(".ywgc-preset-image img").removeClass("selected_design_image"),s(".ywgc-picture-error").remove();var e=s(this).val().split(".").pop().toLowerCase();-1==s.inArray(e,["png","jpg","jpeg"])?s("div.gift-card-content-editor.step-appearance").append('<span class="ywgc-picture-error">'+ywgc_data.invalid_image_extension+"</span>"):s(this)[0].files[0].size>1024*ywgc_data.custom_image_max_size*1024&&0<ywgc_data.custom_image_max_size&&s("div.gift-card-content-editor.step-appearance").append('<span class="ywgc-picture-error">'+ywgc_data.invalid_image_size+"</span>")}),s(t).on("click","#accept-image",a),s(t).on("click","#decline-image",n)}),a=function(){var e,t,a=s(".yith-ywgc-preview-image .custom-selected-image").attr("src");a&&(e='<img src="'+a+'" class="attachment-thumbnail size-thumbnail  custom-selected-image selected_design_image" alt="" srcset="'+a+" 150w, "+a+" 250w, "+a+' 100w" sizes="(max-width: 150px) 85vw, 150px" width="150" height="150">',t='<img src="'+a+'" class="wp-post-image size-full" alt="" width="600" height="600">',s(".ywgc-design-list li.default-image-li .ywgc-preset-image ").hasClass("ywgc-default-product-image")?(s(".ywgc-design-list li.default-image-li .ywgc-preset-image").html(e),i.html(t)):s(".ywgc-design-list li.default-image-li .ywgc-preset-image").html(e),s(".ywgc-design-list .ywgc-preset-image img.custom-selected-image").parent().attr("data-design-url",a),s(".ywgc-design-list .ywgc-preset-image img.custom-selected-image").parent().attr("data-design-id","custom"),s(".custom-selected-image").click(),s(".yith-ywgc-popup-wrapper .yith-ywgc-popup-close").click(),s("form.cart").append('<input type="hidden" class="ywgc-custom-modal-design" name="ywgc-custom-modal-design" value="'+a+'">'),s(document).trigger("ywgc-picture-changed",["custom","custom-modal"]))},n=function(){s(".yith-ywgc-drag-drop-icon-modal").show(),s(".yith-plugin-fw-file").removeClass("yith-plugin-fw--filled")},s(document).on("yith_ywgc_popup_closed",function(e,t){s(".ywgc-design-list .ywgc-preset-image img.selected_design_image_in_modal").click()}),"v1"===ywgc_data.v2_layout&&s(document).on("click",".ywgc-custom-picture",function(e){e.preventDefault(),s("#ywgc-upload-picture").click()}),s("#ywgc-upload-picture").on("change",function(){s(".ywgc-preset-image img").removeClass("selected_design_image");s(".ywgc-picture-error").remove();var e,t=s(this).val().split(".").pop().toLowerCase();-1==s.inArray(t,["png","jpg","jpeg"])?s("div.gift-card-content-editor.step-appearance").append('<span class="ywgc-picture-error">'+ywgc_data.invalid_image_extension+"</span>"):s(this)[0].files[0].size>1024*ywgc_data.custom_image_max_size*1024&&0<ywgc_data.custom_image_max_size?s("div.gift-card-content-editor.step-appearance").append('<span class="ywgc-picture-error">'+ywgc_data.invalid_image_size+"</span>"):(t=s(this)[0].files[0],(e=new FileReader).readAsDataURL(t),e.onload=function(e){var e=e.target.result,t='<img src="'+e+'" class="attachment-thumbnail size-thumbnail  custom-selected-image selected_design_image" alt="" srcset="'+e+" 150w, "+e+" 250w, "+e+' 100w" sizes="(max-width: 150px) 85vw, 150px" width="150" height="150">',a='<img src="'+e+'" class="wp-post-image size-full" alt="" width="600" height="600">';s(".ywgc-design-list li.default-image-li .ywgc-preset-image ").hasClass("ywgc-default-product-image")?(s(".ywgc-design-list li.default-image-li .ywgc-preset-image").html(t),i.html(a)):s(".ywgc-design-list li.default-image-li .ywgc-preset-image").html(t),s(".ywgc-design-list .ywgc-preset-image img.custom-selected-image").parent().attr("data-design-url",e),s(".ywgc-design-list .ywgc-preset-image img.custom-selected-image").parent().attr("data-design-id","custom"),s(".custom-selected-image ").click(),s(".yith-plugin-fw-file.yith-ywgc-upload-file-field").removeClass("yith-plugin-fw--is-dragging"),s(document).trigger("ywgc-picture-changed",["custom","custom"])})}),s(document).on("click","a.ywgc-show-giftcard",function(){return s(".ywgc_enter_code").slideToggle(300,function(){s(".yith_wc_gift_card_blank_brightness").length||(s(".ywgc_enter_code").find(":input:eq( 0 )").focus(),s(".ywgc_enter_code").keyup(function(e){13===e.keyCode&&s("button.ywgc_apply_gift_card_button").click()}))}),!1}),s(document).on("input",".gift-cards-list input.ywgc-manual-amount",function(e){_()}),ywgc_data.v2_layout&&(s(document).on("focus",".gift-cards-list input.ywgc-manual-amount",function(e){("left"===ywgc_data.currency_position||"left_space"===ywgc_data.currency_position?s(".ywgc-manual-currency-symbol.left"):s(".ywgc-manual-currency-symbol.right")).removeClass("ywgc-hidden")}),s(document).on("focusout",".gift-cards-list input.ywgc-manual-amount",function(e){s(this).val()||("left"===ywgc_data.currency_position||"left_space"===ywgc_data.currency_position?s(".ywgc-manual-currency-symbol.left"):s(".ywgc-manual-currency-symbol.right")).addClass("ywgc-hidden")})),s(document).on("input","#ywgc-edit-message",function(e){s(".ywgc-card-message").html(s("#ywgc-edit-message").val())}),s(document).on("change",".gift-cards-list select",function(e){_()}),s("#ywgc-manual-amount").keypress(function(e){13==e.keyCode&&e.preventDefault()}),s('.ywgc-single-recipient input[name="ywgc-recipient-email[]"]').each(function(e,t){s(this).on("input",function(){s(this).closest(".ywgc-single-recipient").find(".ywgc-bad-email-format").remove()})}),s(document).on("submit",".gift-cards_form",function(e){var c=!0;s('.ywgc-single-recipient input[name="ywgc-recipient-email[]"]').each(function(e,t){var a;s(this).val()&&(a=s(this).val(),!new RegExp("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}$","i").test(a))&&(s(this).closest(".ywgc-single-recipient").find(".ywgc-bad-email-format").remove(),s(this).after('<span class="ywgc-bad-email-format">'+ywgc_data.email_bad_format+"</span>"),c=!1)}),c||e.preventDefault()}),s(document).on("click","a.ywgc-remove-gift-card ",function(e){e.preventDefault();var t=s(e.currentTarget).parents("table"),e=s(e.currentTarget).data("gift-card-code"),e=(r(t),{security:ywgc_data.gift_card_nonce,code:e,action:"ywgc_remove_gift_card_code"});s.ajax({type:"POST",url:ywgc_data.ajax_url,data:e,dataType:"html",success:function(e){d(e),s(document.body).trigger("removed_gift_card"),o(t)},complete:function(){w()}})}),s(document).on("click","button.ywgc_apply_gift_card_button",function(e){e.preventDefault();var t=s(this).closest("div.ywgc_enter_code"),a=(r(t),t.find('input[ name="gift_card_code" ]')),e=a.val(),e={security:ywgc_data.gift_card_nonce,code:e,action:"ywgc_apply_gift_card_code"};s.ajax({type:"POST",url:ywgc_data.ajax_url,data:e,dataType:"html",success:function(e){d(e),s(document.body).trigger("applied_gift_card")},complete:function(){o(t),a.val(""),w()}})}),r=function(e){e.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},o=function(e){e.removeClass("processing").unblock()},e=function(e){return ywgc_data.wc_ajax_url.toString().replace("%%endpoint%%",e)},d=function(e){s(".woocommerce-error, .woocommerce-message").remove(),s(ywgc_data.notice_target).after(e),s(".ywgc_have_code").length&&s(".ywgc_enter_code").slideUp("300")},s(document).on("qv_loader_stop yit_quick_view_loaded flatsome_quickview",function(){_(),t()}),t=function(){s('input[name="ywgc-as-present-enabled"]').length&&(s(".ywgc-generator").hide(),y(!1))},(g=s(".ywgc-recipient-name input")).on("change keyup",function(e){e.preventDefault();e=g.val(),e=s.parseHTML(e.replace(/(<([^>]+)>)/gi,""));s(".ywgc-form-preview-to-content").html(e)}),(l=s(".ywgc-sender-name input")).on("change keyup",function(e){e.preventDefault();e=l.val(),e=s.parseHTML(e.replace(/(<([^>]+)>)/gi,""));s(".ywgc-form-preview-from-content").html(e)}),(m=s(".ywgc-message textarea")).on("change keyup",function(e){e.preventDefault();e=m.val(),e=s.parseHTML(e.replace(/(<([^>]+)>)/gi,"").replace(/\n/g,"<br/>"));s(".ywgc-form-preview-message").html(e)}),s(document).on("click","a.add-recipient",function(e){e.preventDefault();var t,a,c,i,n,e=s(".ywgc-additional-recipient").length,r=s(".product-qty-arrows");r.length&&r.hide(),e=(r=e)+2,t=s("div.gift_card_template_button input[name='quantity']"),a=ywgc_data.multiple_recipient.replace("%number_gift_cards%",e),c=s("div.ywgc-single-recipient").last(),i=ywgc_data.mandatory_email?"required":"",n='<div class="ywgc-additional-recipient"><label for="ywgc-recipient-name'+r+'">'+ywgc_data.label_name+'</label><input type="text" id="ywgc-recipient-name'+r+'" name="ywgc-recipient-name[]" class="yith_wc_gift_card_input_recipient_details" placeholder="'+ywgc_data.name+'" '+i+'/><br><label for="ywgc-recipient-email'+r+'">'+ywgc_data.label_email+'</label><input type="email" id="ywgc-recipient-email'+r+'" name="ywgc-recipient-email[]" class="ywgc-recipient yith_wc_gift_card_input_recipient_details" placeholder="'+ywgc_data.email+'" '+i+'/><a href="#" class="ywgc-remove-recipient"> </div>',r='<div class="ywgc-additional-recipient"><div class="ywgc-recipient-name ywgc-label-above-input clearfix"><label for="ywgc-recipient-name'+r+'">'+ywgc_data.label_name+'</label><input type="text" id="ywgc-recipient-name'+r+'" name="ywgc-recipient-name[]" class="yith_wc_gift_card_input_recipient_details" '+i+'/></div><div class="ywgc-recipient-email ywgc-label-above-input clearfix"><a href="#" class="ywgc-remove-recipient"></a><label for="ywgc-recipient-email'+r+'">'+ywgc_data.label_email+'</label><input type="email" id="ywgc-recipient-email'+r+'" name="ywgc-recipient-email[]" class="ywgc-recipient yith_wc_gift_card_input_recipient_details"'+i+"/></div></div>",ywgc_data.v2_layout?c.after(r):c.after(n),t.addClass("ywgc-remove-number-input"),t.attr("onkeydown","return false"),t.css("background-color","lightgray"),t.val(e),s(".ywgc-multi-recipients span").remove(),s("div.gift_card_template_button div.quantity").before("<div class='ywgc-multi-recipients'><span>"+a+"</span></div>")}),s(document).on("click","a.ywgc-remove-recipient",function(e){e.preventDefault();var t,e=s(".ywgc-additional-recipient").length,a=s(".product-qty-arrows");a.length&&"0"===e&&a.show(),a=s(this),e=e,(t=s("div.gift_card_template_button input[name='quantity']")).val(e),e=ywgc_data.multiple_recipient.replace("%number_gift_cards%",e),s(".ywgc-multi-recipients span").remove(),s("div.gift_card_template_button div.quantity").before("<div class='ywgc-multi-recipients'><span>"+e+"</span></div>"),s(a).parent().parent("div.ywgc-additional-recipient").remove(),1==s('input[name="ywgc-recipient-email[]"]').length&&(s("a.hide-if-alone").css("visibility","hidden"),s("div.ywgc-multi-recipients").remove(),t.removeClass("ywgc-remove-number-input"),t.removeAttr("onkeydown"),t.css("background-color",""))}),s(".variations_form.cart").on("found_variation",function(e,t){void 0!==t&&(s("#give-as-present").prop("disabled",!1),f(t.display_price,t.price_html,t.variation_id,t.name,t.image.gallery_thumbnail_src))}),s(document).on("reset_data",function(){s("#give-as-present").prop("disabled",!0),f("","","","")}),(u=s(".yith-wcbk-booking-form")).length&&(u.on("yith_wcbk_booking_form_add_to_cart_enabled_status_updated",function(e,t){s("#give-as-present").prop("disabled",!t),t?s("#gift-this-product").css("opacity","1"):s("#gift-this-product").css("opacity","0.5")}),u.on("yith_wcbk_form_update_response",function(e,t){f(t.raw_price,t.price,"","","")})),s(".yith-wcpb-product-bundled-items").length&&setTimeout(function(){s("#give-as-present").prop("disabled",!1)},1e3),s(document).on("yith_wcpb_ajax_update_price_request",function(e,t){t&&null!=t&&t.price&&(s("#give-as-present").data("price",t.price),s("#give-as-present").data("price-html",t.price_html))}),s(function(){s("#new-card-form-submitted").val()&&location.reload()}),s(document).on("wapo-after-calculate-product-price",function(e,t){var a=t.order_price_raw,t=t.order_price_suffix,c=s("#give-as-present");s(".product-type-gift-card .ywgc-form-preview-amount").html(t),s(".product-type-gift-card .summary .price").html(t),c.attr("data-price",a),c.attr("data-price-html",t)}))}(jQuery);