// Tomado de Wordpress

function akst_share(id, url, title, theform) {
  if (theform.style.display == 'block') {
    theform.style.display = 'none';
    return;
  }
  
  document.getElementById("akst_delicious").href = akst_share_url("http://del.icio.us/post?url={url}&title={title}", url, title);
  document.getElementById("akst_digg").href = akst_share_url("http://digg.com/submit?phase=2&url={url}&title={title}", url, title);
  document.getElementById("akst_google_bmarks").href = akst_share_url("  http://www.google.com/bookmarks/mark?op=edit&bkmk={url}&title={title}", url, title);
  document.getElementById("akst_yahoo_bmarks").href = akst_share_url("http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&u={url}&t={title}", url, title);
  document.getElementById("akst_yahoo_myweb").href = akst_share_url("http://myweb2.search.yahoo.com/myresults/bookmarklet?u={url}&t={title}", url, title);
  document.getElementById("akst_technorati").href = akst_share_url("http://www.technorati.com/faves?add={url}", url, title);
  document.getElementById("akst_myspace").href = akst_share_url("http://www.myspace.com/Modules/PostTo/Pages/?l=3&u={url}&t={title}", url, title);
  document.getElementById("akst_facebook").href = akst_share_url("http://www.facebook.com/share.php?u={url}", url, title);
  document.getElementById("akst_live").href = akst_share_url("https://favorites.live.com/quickadd.aspx?marklet=1&mkt=es&url={url}&title={title}&top=1", url, title);
  document.getElementById("akst_barrapunto").href = akst_share_url("http://barrapunto.com/submit.pl?story=&subj={title}", url, title);
  document.getElementById("akst_meneame").href = akst_share_url("http://meneame.net/submit.php?url={url}", url, title);
  document.getElementById("akst_fresqui").href = akst_share_url("http://act.fresqui.com/post?url={url}&title={title}", url, title);
  document.getElementById("akst_blinklist").href = akst_share_url("http://es.blinklist.com/index.php?Action=Blink/addblink.php&Url={url}&Title={title}", url, title);
  document.getElementById("akst_enchilame").href = akst_share_url("http://enchilame.com/submit.php?url={url}", url, title);
  document.getElementById("akst_tuteame").href = akst_share_url("http://tuteame.com/submit.php?url={url}", url, title);
  document.getElementById("akst_twitter").href = akst_share_url("http://twitthat.com/go?title={title}&url={url}", url, title);
  theform.style.display = 'block';
}

function akst_share_url(base, url, title) {
  base = base.replace('{url}', url);
  return base.replace('{title}', title);
}

function akst_share_tab(tab) {
  var tab1 = document.getElementById('akst_tab1');
  var tab2 = document.getElementById('akst_tab2');
  var body1 = document.getElementById('akst_social');
  var body2 = document.getElementById('akst_email');
  switch (tab) {
    case '1':
      tab2.className = '';
      tab1.className = 'selected';
      body2.style.display = 'none';
      body1.style.display = 'block';
      break;
    case '2':
      tab1.className = '';
      tab2.className = 'selected';
      body1.style.display = 'none';
      body2.style.display = 'block';
      break;
  }
}

function akst_xy(id) {
  var element = $(id);
  var x = 0;
  var y = 0;
}
