var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
( function( $ ) {
	"use strict";

	$(document).ready(function() {

		$('.wc-shortcodes-rsvp').each( function() {
			var $this;

			$this = $(this);

			$this.find('.rsvp-button').click( function() {
				var $button = $(this);
				var data =  $this.find('.rsvp-data').serialize();
				var $message = $this.find('.rsvp-message');
				var $messageParent = $message.parent();
				$message.text("Sending...");
				$messageParent.removeClass('wc-shortcodes-box-warning wc-shortcodes-box-success').addClass('wc-shortcodes-box-info').show();

				$.post(
					WCShortcodes.ajaxurl,
					data,
					function( response ) {
						if (response.success) {
							$message.text(response.message);
							$messageParent.removeClass('wc-shortcodes-box-warning wc-shortcodes-box-info').addClass('wc-shortcodes-box-success').show();
							$button.hide();
						}
						else {
							$message.text(response.message);
							$messageParent.removeClass('wc-shortcodes-box-success wc-shortcodes-box-info').addClass('wc-shortcodes-box-warning').show();
						}
					}
				);
			});
		});

	});
} )( jQuery );

}