var bookie =  Class.create({
	initialize: function(path)
	{
		path = (typeof path == "undefined") ? '../../' : path;
		if($('bookmark_a'))
		{
			$('bookmark_a').observe('click', function(e){
				e.preventDefault();
				
				ref = this.readAttribute('href');
				$('bookmark').update('<span class="fd">Bookmarking...</span>');
				new Ajax.Request(path+'js/ajax/bookmark.php'+ref, {
					method:'get',
					onSuccess:function(transport){}
				});
			});
		}
		else
		{
			$('bookmark_b').immediateDescendants().each(function (el)
			{
				el.observe('click', function(e)
				{
					var cls = Event.element(e).className;
					if(cls == 'bl')
					{
						e.preventDefault();
						obj = Event.element(e);
						ref = obj.readAttribute('href');
						obj.up().update('Bookmarking...');
						new Ajax.Request(path+'js/ajax/bookmark.php'+ref+'&multi=1', {
							method:'get',
							onSuccess:function(transport){}
						});//*/
					}
				});
			});
		}
	}
})