<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">			var price_with_options_ajax_call = function() {
				$.ajax({
					type: 'POST',
					url: 'index.php?route=product/live_options/index&amp;product_id=1007',
					data: $('#content input[type=\'text\'], #content input[type=\'hidden\'], #content input[type=\'radio\']:checked, #content input[type=\'checkbox\']:checked, #content select, #content textarea'),
					dataType: 'json',
					beforeSend: function() {
						// you can add smth useful here
					},
					complete: function() {
						// you can add smth useful here
					},
					success: function(json) {
						if (json.success) {
							if ($('#content .price-tax-2').length &gt; 0 &amp;&amp; json.new_price.tax) {
								animation_on_change_price_with_options('#content .price-tax-2', json.new_price.tax);
							}
							if ($('#content .price-new-2').length &gt; 0 &amp;&amp; json.new_price.special) {
								animation_on_change_price_with_options('#content .price-new-2', json.new_price.special);
							}
							if ($('#content .price-old-2').length &gt; 0 &amp;&amp; json.new_price.price) {
								animation_on_change_price_with_options('#content .price-old-2', json.new_price.price);
							}
							// points
							if ($('#content .spend-points-2').length &gt; 0 &amp;&amp; json.new_price.points) {
								animation_on_change_price_with_options('#content .spend-points-2', json.new_price.points);
							}
							// reward
							if ($('#content .get-reward-2').length &gt; 0 &amp;&amp; json.new_price.reward) {
								animation_on_change_price_with_options('#content .get-reward-2', json.new_price.reward);
							}
						}
					},
					error: function(error) {
						console.log('error: '+error);
					}
				});
			}
			
			var animation_on_change_price_with_options = function(selector_class_or_id, new_html_content) {
				$(selector_class_or_id).fadeOut(150, function() {
					$(this).html(new_html_content).fadeIn(50);
				});
			}

			if ( jQuery.isFunction(jQuery.fn.on) ) 
			{
				$(document).on('change', '#content input[type=\'text\'], #content input[type=\'hidden\'], #content input[type=\'radio\']:checked, #content input[type=\'checkbox\'], #content select, #content textarea, .product-info input[name=\'quantity\']', function () {
					
					price_with_options_ajax_call();
				});
			} 
			else 
			{
				$('#content input[type=\'text\'], #content input[type=\'hidden\'], #content input[type=\'radio\']:checked, #content input[type=\'checkbox\']:checked, #content select, #content textarea, .product-info input[name=\'quantity\']').live('change', function() {
					price_with_options_ajax_call();
				});
			}	</pre></body></html>