		
		 var $j = jQuery.noConflict();
		
		
		$j('.tooltip_a').live('mouseover', function(event)
		{
		
			var tooltip_left_ = $j(this).offset().left*1 + 20;		
			var	heig = $j(this).height()*1;
			if ( heig >= 300 )
				{ heig = -10; }
			var tooltip_top_ = $j(this).offset().top*1 + heig*1 + 20;
			if ( $j(this).next().attr('id') != 'warehouse_id' )
			{
				$j(this).next().css('top',tooltip_top_);
				$j(this).next().css('left',tooltip_left_);
				$j(this).next().show();
			}
		
		});
		
		$j('.tooltip_a').live('mouseout', function(event)
		{
			if ( $j(this).next().attr('id') != 'warehouse_id' )
			{
				$j(this).next().hide();
			}		
		});
		
		$j(document).ready
		(	
			function()
			{ 
			
				var wh_arr = [];
				
				$j.ajax({
					url: 'warehouse/ajax.php',
					async: true,
					dataType: 'html',
					type: 'GET',
					data: 	{
								action: 'checkall'
							},
					success: function(html)
						{	
							eval(html); //wh_array;
							wh_arr = wh_array;
				
							$j('body').find('div[id="warehouse_id"]').each
							(
								function()
								{
									var id = $j(this).attr('item_id');
									var obj = this;
									if ( wh_arr[id]+'' == '1' )
									{
										$j(obj).html('<span style="color: green">частично складское</span>');
									}
									else if ( wh_arr[id]+'' == '0' )
									{
										$j(obj).html('на заказ');										
									}
								}
							);							
							
						}
				});
				
			}
		);
		
		
		
		
		
		
		
		
		
		
