 jQuery(document).ready
			    (
			    	function()
			    	{
						jQuery('.add').click(function()
						{
							var current=jQuery(this);
							var name=current.parent().parent().find('.name').html();
							var kol=current.parent().find('.example').val();
							jQuery.post("http://tienshimoscow.ru/wp-content/themes/atahualpa/tryout1.php", { kol: kol,name:name}, function(data)
							{
							//var res1=jQuery.parseJSON(data);
								var res=jQuery.parseJSON(data);
								if(res.status=='changed')
								{
									current=current.parent().parent();
									current.css('background','green');
									jQuery('#price_full').parent().css('background','green');
									jQuery('#price_small').parent().css('background','green');
									setTimeout(function() { current.css('background','#e6e6fa'); }, 2000);
									setTimeout(function() { jQuery('#price_full').parent().css('background','#e6e6fa'); }, 2000);
									setTimeout(function() { jQuery('#price_small').parent().css('background','#e6e6fa'); }, 2000);
									current.parent().parent().parent().find('#price_small').html(res.small);
									current.parent().parent().parent().find('#price_full').html(res.full);

								}
								if(res.status=='not_int')
								{
									alert('not_int');
								}
								if(res.status=='zero')
								{
									current=current.parent().parent();
									current.css('background','red');
									setTimeout(function() { current.css('background','#e6e6fa'); }, 2000);
								}
							}
							);
						}
						),
						jQuery('.delete').click(function()
												{
													var current=jQuery(this);
													var name=current.parent().parent().find('.name').html();
													var del=1;
													jQuery.post("http://tienshimoscow.ru/wp-content/themes/atahualpa/tryout1.php", { name: name,del: del}, function(data)
													{
														var res = jQuery.parseJSON(data);
														current.parent().parent().hide();
														current.parent().parent().parent().find('#price_small').html(res.small);
														current.parent().parent().parent().find('#price_full').html(res.full);
														jQuery('#price_full').parent().css('background','green');
														jQuery('#price_small').parent().css('background','green');
														setTimeout(function() { jQuery('#price_full').parent().css('background','#e6e6fa'); }, 2000);
														setTimeout(function() { jQuery('#price_small').parent().css('background','#e6e6fa'); }, 2000);

													}
													)

												}
						)
			    	}
			    );


