
// execute your scripts when the DOM is ready. this is a good habit
$(function() {

	

	// setup tooltip for a single DIV element 
	$("div.price").tooltip({

		// each trashcan image works as a trigger
		tip: '#tooltip',

		// custom positioning
		position: ['center', 'right'],

		// move tooltip a little bit to the right
		offset: [0,0],
		
		// use a simple show/hide effect
		effect: 'toggle',

		// there is no delay when the mouse is moved out of the trigger
		delay: 0
	});

	

	$("div.price").click(function() {

		// get handle to the current image (trashcan)
		var img = $(this);
		
		// gradually hide the parent row
		img.parents("tr").fadeOut(function()  {

			// after the row is deleted, hide our tooltip using the tooltip API
			img.tooltip().hide();

		});

	});

});
