$.fn.bookmark = function() {
	return this.each(function(){	
		$(this).click(function(event){
			event.preventDefault();

			var url 	= $(this).attr('href'), 
				title 	= $(this).attr('title');
			
			switch(true){
				case $.browser.msie:
					window.external.AddFavorite( url, title);
					break;
				case $.browser.mozilla:
					window.sidebar.addPanel(title, url, "");
					break;
				case $.browser.opera:
					if ($(this).attr("rel") != ""){
						$(this).attr("rel","sidebar");
					}
					break;
				case typeof $.browser.chrome != 'undefined' && $.browser.chrome:
				case $.browser.safari:
				default:
					alert('Please try Ctrl-D to create a bookmark for this page!');
					
			}
		});
	});
};