(e=>{"function"==typeof define&&define.amd?define("pricingPlans",e):e()})(function(){jQuery(document).ready(function(e){var i,t=e(".pricing-item.featured");function n(e){var t;return!!(e=e.parents(".pricing-item")).length&&((void 0===e.data("selected")?e.find('.owned-product-packages input[name="listing_package"]').first():(t=parseInt(e.data("selected"),10),e.find('.owned-product-packages input[name="listing_package"][value="'+t+'"]'))).prop("checked",!0),!0)}e(".pricing-item").hover(function(){e(t).removeClass("featured"),e(this).addClass("active")},function(){e(this).removeClass("active"),e(t).addClass("featured")}),e(".package-available .use-package-toggle").click(function(){e(this).parent(".package-available").toggleClass("open")}),(i=jQuery)('.cts-pricing-item input[name="listing_package"]').change(function(e){var t=i(this).parents(".pricing-item");if(!t.length)return!0;t.data("selected",i(this).val())}),i(".cts-pricing-item .use-package-toggle").click(function(e){n(i(this))}),i(".cts-pricing-item .select-plan:not(.cts-trigger-buy-new)").click(function(e){e.preventDefault(),n(i(this))&&i("#job_package_selection").submit()}),i(".cts-pricing-item .cts-trigger-buy-new").click(function(e){e.preventDefault();e=i(this).parents(".pricing-item");if(!e.length)return!1;e.find("input.cts-buy-new").prop("checked",!0),i("#job_package_selection").submit()}),i(".cts-wcpl-package a.select-plan").on("click",function(e){e.preventDefault(),i(this).siblings(".c27-job-package-radio-button").prop("checked",!0),i("#job_package_selection").submit()})})});
