/*
 *  social-bookmarking.js
 *  Version 0.1
 *  Hugo Haas - http://larve.net/people/hugo/
 *  {home of social-bookmarking.js here}/
 *  Copyright (c) 2006 Hugo Haas
 *  License: GPL 2
 *
 *  This code is based on wp-notable 1.4 by Cal Evans.
 *  The images used are from the plugin.
 *
 *  Below is the copyright information from wp-notable.
 */

/*
Plugin Name: wp-notable
Plugin URI: http://www.calevans.com/view.php/page/notable
Version: 1.14
Description: Add social bookmark links to each blog entry.
Author: Cal Evans
Author URI: http://blog.calevans.com
*/

/*
 * Copyright 2006  Cal Evans
 * Thanks to Kirk Montgomery  (email : webmaster@maxpower.ca) for the graphics.
 *  
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

// Replace with your URL here
var image_dir="http://www.baeder-fuehrer.ch/inc/sb/images";

function add_tool(icon, name, url) {
  document.write('<span class="socialAddButton" id="socialAddButton-' + icon + '"><a href="' + url + '" title="Bookmarken bei ' + name +'" target="_blank"><img src="' + image_dir + '/' + icon + '.gif" alt="' + name + ' icon" width="18" height="18" /></a></span> ');
}

function add_all() {
  var title = encodeURIComponent(document.title);
  var url = encodeURIComponent(document.URL);
  var urln = document.URL;

  add_tool('google', 'google', 'http://www.google.com/bookmarks/mark?op=add&amp;hl=de&amp;bkmk=' + url + '&amp;annotation=&amp;labels=&amp;title=' + title);
  add_tool('technorati', 'technorati', 'http://www.technorati.com/faves?add=' + urln + '');
  add_tool('twitter', 'twitter', 'http://twitter.com/home?status='+ title + ' ' + url);
  add_tool('delicious', 'del.icio.us', 'http://del.icio.us/post?url=' + url + '&amp;title=' + title);
  add_tool('digg', 'digg', 'http://digg.com/submit?phase=2&amp;url=' + url + '&amp;title=' + title);
  add_tool('spurl', 'Spurl.net', 'http://www.spurl.net/spurl.php?url=' + url + '&amp;title=' + title);
  add_tool('newsvine', 'Newsvine', 'http://www.newsvine.com/_tools/seed&amp;save?u=' + url + '&amp;h=' + title);
  add_tool('reddit', 'reddit', 'http://reddit.com/submit?url=' + url + '&amp;title=' + title);
  add_tool('yahoo', 'Yahoo! My Web', 'http://myweb2.search.yahoo.com/myresults/bookmarklet?u=' + url + '&amp;t=' + title);
  add_tool('mrwong', 'mrwong', 'http://www.mister-wong.de/index.php?action=addurl&bm_url=' + url + '&amp;bm_description=' + title);
  add_tool('tausendreporter', 'tausendreporter', 'http://tausendreporter.stern.de/submit.php?url=' + url + '&amp;title=' + title);
  add_tool('webnews', 'webnews', 'http://www.webnews.de/einstellen?url=' + url + '&amp;title=' + title);
  add_tool('facebook', 'facebook', 'http://www.facebook.com/share.php?u=' + url + '&amp;t=' + title);
  add_tool('live', 'live', 'https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=' + url + '&amp;title=' + title);
  add_tool('yahoomyweb', 'yahoomyweb', 'http://bookmarks.yahoo.com/toolbar/savebm?u=' + url + '&amp;t=' + title + '&amp;opener=bm&amp;ei=UTF-8&amp;d=' + title);
  
}

add_all();

