(function($){
	jQuery.fn.socialize = function(settings){
		settings = jQuery.extend({
			imagePath: 'icons/', // where are the service icons?
			services: ['DZone','Twitter','StumbleUpon'], // which services to show	
			allServices: {
				'BarraPunto': {
					'img': 'barrapunto.png',
					'url': 'http://barrapunto.com/submit.pl?subj=#{TITLE}#&amp;story=#{URL}#'
				},
				
				'Bitacoras.com': {
					'img': 'bitacoras.png',
					'url': 'http://bitacoras.com/anotaciones/#{URL}#'
				},
				
				'BlinkList': {
					'img': 'blinklist.png',
					'url': 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=#{URL}#&amp;Title=#{TITLE}#'
				},
			
				'blogmarks': {
					'img': 'blogmarks.png',
					'url': 'http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Blogosphere News': {
					'img': 'blogospherenews.png',
					'url': 'http://www.blogospherenews.com/submit.php?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'blogtercimlap': {
					'img': 'blogter.png',
					'url': 'http://cimlap.blogter.hu/index.php?action=suggest_link&amp;title=#{TITLE}#&amp;url=#{URL}#'
				},
			
				'Faves': {
					'img': 'bluedot.png',
					'url': 'http://faves.com/Authoring.aspx?u=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Current': {
					'img': 'current.png',
					'url': 'http://current.com/clipper.htm?url=#{URL}#&amp;title=#{TITLE}#'
				},
				
				'delicious': {
					'img': 'delicious.png',
					'url': 'http://delicious.com/post?url=#{URL}#&amp;title=#{TITLE}#'
				},
				
				'Design Float': {
					'img': 'designfloat.png',
					'url': 'http://www.designfloat.com/submit.php?url=#{URL}#&amp;title=#{TITLE}#'
				},
				
				'Digg': {
					'img': 'digg.png',
					'url': 'http://digg.com/submit?phase=2&amp;url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Diigo': {
					'img': 'diigo.png',
					'url': 'http://www.diigo.com/post?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'DotNetKicks': {
					'img': 'dotnetkicks.png',
					'url': 'http://www.dotnetkicks.com/kick/?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'DZone': {
					'img': 'dzone.png',
					'url': 'http://www.dzone.com/links/add.html?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'eKudos': {
					'img': 'ekudos.png',
					'url': 'http://www.ekudos.nl/artikel/nieuw?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'email': {
					'img': 'email_link.png',
					'url': 'mailto:?subject=#{TITLE}#&amp;body=#{URL}#'
				},
			
				'Facebook': {
					'img': 'facebook.png',
					'url': 'http://www.facebook.com/share.php?u=#{URL}#&amp;t=#{TITLE}#'
				},
			
				'Fark': {
					'img': 'fark.png',
					'url': 'http://cgi.fark.com/cgi/fark/farkit.pl?h=#{TITLE}#&amp;u=#{URL}#'
				},
			
				'Fleck': {
					'img': 'fleck.png',
					'url': 'http://beta3.fleck.com/bookmarklet.php?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'FriendFeed': {
					'img': 'friendfeed.png',
					'url': 'http://www.friendfeed.com/share?title=#{TITLE}#&amp;link=#{URL}#'
				},
			
				'FSDaily': {
					'img': 'fsdaily.png',
					'url': 'http://www.fsdaily.com/submit?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Global Grind': {
					'img': 'globalgrind.png',
					'url': 'http://globalgrind.com/submission/submit.aspx?url=#{URL}#&amp;type=Article&amp;title=#{TITLE}#'
				},
				
				'Google': {
					'img': 'googlebookmark.png',
					'url': 'http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=#{URL}#&amp;title=#{TITLE}#'
				},
				
				'Gwar': {
					'img': 'gwar.png',
					'url': 'http://www.gwar.pl/DodajGwar.html?u=#{URL}#'
				},
			
				'HackerNews': {
					'img': 'hackernews.png',
					'url': 'http://news.ycombinator.com/submitlink?u=#{URL}#&amp;t=#{TITLE}#'
				},
			
				'Haohao': {
					'img': 'haohao.png',
					'url': 'http://www.haohaoreport.com/submit.php?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'HealthRanker': {
					'img': 'healthranker.png',
					'url': 'http://healthranker.com/submit.php?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'HelloTxt': {
					'img': 'hellotxt.png',
					'url': 'http://hellotxt.com/?status=#{TITLE}#+#{URL}#'
				},
			
				'Hemidemi': {
					'img': 'hemidemi.png',
					'url': 'http://www.hemidemi.com/user_bookmark/new?title=#{TITLE}#&amp;url=#{URL}#'
				},
			
				'Hyves': {
					'img': 'hyves.png',
					'url': 'http://www.hyves.nl/profilemanage/add/tips/?name=#{TITLE}#&amp;body=#{URL}#&amp;rating=5'
				},
			
				'Identi.ca': {
					'img': 'identica.png',
					'url': 'http://identi.ca/notice/new?status_textarea=#{URL}#'
				},
			
				'IndianPad': {
					'img': 'indianpad.png',
					'url': 'http://www.indianpad.com/submit.php?url=#{URL}#'
				},
			
				'Internetmedia': {
					'img': 'im.png',
					'url': 'http://internetmedia.hu/submit.php?url=#{URL}#'
				},
			
				'Kirtsy': {
					'img': 'kirtsy.png',
					'url': 'http://www.kirtsy.com/submit.php?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'LinkArena': {
					'img': 'linkarena.png',
					'url': 'http://linkarena.com/bookmarks/addlink/?url=#{URL}#&amp;title=#{TITLE}#'
				},
				
				'LinkaGoGo': {
					'img': 'linkagogo.png',
					'url': 'http://www.linkagogo.com/go/AddNoPopup?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'LinkedIn': {
					'img': 'linkedin.png',
					'url': 'http://www.linkedin.com/shareArticle?mini=true&amp;url=#{URL}#&amp;title=#{TITLE}#&amp;source=BLOGNAME'
				},
			
				'Linkter': {
					'img': 'linkter.png',
					'url': 'http://www.linkter.hu/index.php?action=suggest_link&amp;url=#{URL}#&amp;title=#{TITLE}#'
				},
				
				'Live': {
					'img': 'live.png',
					'url': 'https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Meneame': {
					'img': 'meneame.png',
					'url': 'http://meneame.net/submit.php?url=#{URL}#'
				},
				
				'Mixx': {
					'img': 'mixx.png',
					'url': 'http://www.mixx.com/submit?page_url=#{URL}#&amp;title=#{TITLE}#'
				},
				
				'muti': {
					'img': 'muti.png',
					'url': 'http://www.muti.co.za/submit?url=#{URL}#&amp;title=#{TITLE}#'
				},
				
				'MyShare': {
					'img': 'myshare.png',
					'url': 'http://myshare.url.com.tw/index.php?func=newurl&amp;url=#{URL}#&amp;desc=#{TITLE}#'
				},
			
				'MySpace': {
					'img': 'myspace.png',
					'url': 'http://www.myspace.com/Modules/PostTo/Pages/?u=#{URL}#&amp;t=#{TITLE}#'
				},
				
				'N4G': {
					'img': 'n4g.png',
					'url': 'http://www.n4g.com/tips.aspx?url=#{URL}#&amp;title=#{TITLE}#'
				},
				
				'Netvibes': {
					'img': 'netvibes.png',
					'url':	'http://www.netvibes.com/share?title=#{TITLE}#&amp;url=#{URL}#'
				},
					
				'NewsVine': {
					'img': 'newsvine.png',
					'url': 'http://www.newsvine.com/_tools/seed&amp;save?u=#{URL}#&amp;h=#{TITLE}#'
				},
			
				'Netvouz': {
					'img': 'netvouz.png',
					'url': 'http://www.netvouz.com/action/submitBookmark?url=#{URL}#&amp;title=#{TITLE}#&amp;popup=no'
				},
			
				'NuJIJ': {
					'img': 'nujij.png',
					'url': 'http://nujij.nl/jij.lynkx?t=#{TITLE}#&amp;u=#{URL}#'
				},
				
				'Ping.fm': {
					'img': 'ping.png',
					'url': 'http://ping.fm/ref/?link=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Posterous': {
					'img': 'posterous.png',
					'url': 'http://posterous.com/share?linkto=#{URL}#&amp;title=#{TITLE}#'
				},
				
				'Propeller': {
					'img': 'propeller.png',
					'url': 'http://www.propeller.com/submit/?url=#{URL}#'
				},
			
				'Ratimarks': {
					'img': 'ratimarks.png',
					'url': 'http://ratimarks.org/bookmarks.php/?action=add&address=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Rec6': {
					'img': 'rec6.png',
					'url': 'http://rec6.via6.com/link.php?url=#{URL}#&amp;=#{TITLE}#'
				},
			
				'Reddit': {
					'img': 'reddit.png',
					'url': 'http://reddit.com/submit?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Scoopeo': {
					'img': 'scoopeo.png',
					'url': 'http://www.scoopeo.com/scoop/new?newurl=#{URL}#&amp;title=#{TITLE}#'
				},	
			
				'Segnalo': {
					'img': 'segnalo.png',
					'url': 'http://segnalo.alice.it/post.html.php?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Simpy': {
					'img': 'simpy.png',
					'url': 'http://www.simpy.com/simpy/LinkAdd.do?href=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Slashdot': {
					'img': 'slashdot.png',
					'url': 'http://slashdot.org/bookmark.pl?title=#{TITLE}#&amp;url=#{URL}#'
				},
			
				'Socialogs': {
					'img': 'socialogs.png',
					'url': 'http://socialogs.com/add_story.php?story_url=#{URL}#&amp;story_title=#{TITLE}#'
				},
				
				'SphereIt': {
					'img': 'sphere.png',
					'url': 'http://www.sphere.com/search?q=sphereit:#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Sphinn': {
					'img': 'sphinn.png',
					'url': 'http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=#{URL}#'
				},
			
				'StumbleUpon': {
					'img': 'stumbleupon.png',
					'url': 'http://www.stumbleupon.com/submit?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Techmeme': { 
					'img': 'techmeme.png',
					'url': 'http://twitter.com/home/?status=tip%20@Techmeme%20#{URL}#%20#{TITLE}#'
				}, 
			
				'Technorati': {
					'img': 'technorati.png',
					'url': 'http://technorati.com/faves?add=#{URL}#'
				},
			
				'Tipd': {
					'img': 'tipd.png',
					'url': 'http://tipd.com/submit.php?url=#{URL}#'
				},
				
				'Tumblr': {
					'img': 'tumblr.png',
					'url': 'http://www.tumblr.com/share?v=3&amp;u=#{URL}#&amp;t=#{TITLE}#'
				},
				
				'Twitter': {
					'img': 'twitter.png',
					'url': 'http://twitter.com/home?status=#{TITLE}#%20-%20#{URL}#'
				},
			
				'Upnews': {
					'img': 'upnews.png',
					'url': 'http://www.upnews.it/submit?url=#{URL}#&amp;title=#{TITLE}#'
				},
				
				'Webnews.de': {
					'img': 'webnews.png',
					'url': 'http://www.webnews.de/einstellen?url=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Webride': {
					'img': 'webride.png',
					'url': 'http://webride.org/discuss/split.php?uri=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Wikio': {
					'img': 'wikio.png',
					'url': 'http://www.wikio.com/vote?url=#{URL}#'
				},
				
				'Wists': {
					'img': 'wists.png',
					'url': 'http://wists.com/s.php?c=&amp;r=#{URL}#&amp;title=#{TITLE}#'
				},
			
				'Wykop': {
					'img': 'wykop.png',
					'url': 'http://www.wykop.pl/dodaj?url=#{URL}#'
				},
			
				'Xerpi': {
					'img': 'xerpi.png',
					'url': 'http://www.xerpi.com/block/add_link_from_extension?url=#{URL}#&amp;title=#{TITLE}#'
				},
				
				'Yahoo! Bookmarks': {
					'img': 'yahoomyweb.png',
					'url': 'http://bookmarks.yahoo.com/toolbar/savebm?u=#{URL}#&amp;t=#{TITLE}#&opener=bm&amp;ei=UTF-8'
				},
			
				'Yigg': {
					'img': 'yiggit.png',
					'url': 'http://yigg.de/neu?exturl=#{URL}#&amp;exttitle=#{TITLE}#'
				 },
				 
				 'Add to favorites': {
					'img': 'addtofavorites.png',
					'url': 'javascript:AddToFavorites();'
				 },
				 
				 'Blogplay': {
					'img': 'blogplay.png',
					'url': 'http://blogplay.com'
				 },
				 
				'MOB': {
					'img': 'mob.png',
					'url': 'http://www.mob.com/share.php?u=#{URL}#&t=#{TITLE}#'
				},
					
				'LaTafanera': {
					'img': 'latafanera.png',
					'url': 'http://latafanera.cat/submit.php?url=#{URL}#'
				},
				
				'SheToldMe': {
					'img': 'shetoldme.png',
					'url': 'http://shetoldme.com/publish?url=#{URL}#&title=#{TITLE}#'
				},
					
				'Diggita': {
					'img': 'diggita.png',
					'url': 'http://www.diggita.it/submit.php?url=#{URL}#&title=#{TITLE}#'
				}	 
			}
		}, settings);

		this.each(function(){
			var node = '<ul class="social">';
			
			for(site in settings.services){
				var svc = settings.services[site];
				
				try {
					var img = settings.imagePath + settings.allServices[svc].img;			
					var url = settings.allServices[svc].url;
				} catch(err) {
					// console.log('Service ' + svc + ' not supported.');
					continue;
				}
				
				url = url.replace('#{TITLE}#', $('title').text()).replace('#{URL}#', window.location.href);				
				node += '<li><a href="' + url + '" title="' + svc + '"><img src="' + img + '" /></a></li>';
			}
			
			node += '</ul>';
			
			$(this).append(node);
		});
	
		return this;
	};	
})(jQuery);
