var VzotchShareLinks;

function VzotchShareLinks( container, class_name, services ) {

	this.services = {
		'yandex' 	: { 'title': 'Я.ру', 'url': 'http://share.yandex.ru/go.xml?service=yaru&url='+window.location.href+'&title='+document.title, 'bgpos': '50% -17px' },
		'vkontakte' : { 'title': 'Вконтакте', 'url' : 'http://vkontakte.ru/share.php?url='+window.location.href+'', 'bgpos': '50% 0px' },
		'moimir' 	: { 'title': 'Мой мир', 'url' : 'http://connect.mail.ru/share?share_url=='+window.location.href+'', 'bgpos': '50% -85px' },
		'facebook' 	: { 'title': 'Facebook', 'url': 'http://www.facebook.com/sharer.php?u='+window.location.href+'&t='+document.title, 'bgpos': '50% -67px' },
		'twitter' 	: { 'title': 'Twitter', 'url': 'http://twitter.com/home?status='+document.title+'%20'+window.location.href, 'bgpos': '50% -51px' },
		'lj' 		: { 'title': 'LiveJournal', 'url': 'http://www.livejournal.com/update.bml?subject='+document.title+'&event='+window.location.href+'&prop_taglist='+window.location.hostname, 'bgpos': '50% -34px' },
		'gbuzz' 	: { 'title': 'Google Buzz', 'url': 'http://www.google.com/reader/link?title='+document.title+'&url='+window.location.href, 'bgpos': '50% -237px' },
		'google' 	: { 'title': 'Google Bookmarks', 'url': 'http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+window.location.href+'&title='+document.title, 'bgpos': '50% -204px' },
		'delicious' : { 'title': 'Delicious', 'url': 'http://del.icio.us/post?url='+window.location.href+'&title='+document.title, 'bgpos': '50% -221px' },
		'digg' 		: { 'title': 'Digg', 'url': 'http://digg.com/submit?phase=2&url='+window.location.href+'&title='+document.title, 'bgpos': '50% -305px' }
//		'blogger' 	: { 'title': 'Blogger', 'url': '', 'bgpos': '50% -187px' }
//		'linkedin' 	: ''
//		'friendfeed': ''
//		'evernote' 	: ''
// 		'yahoo' 	: 'http://buzz.yahoo.com/article/'+window.location.href
	}

	if ( services )
	{
		for ( i=0; i<services.length; i++ )
		{
			var srv = eval( 'this.services.'+services[i] );
			$(container).append('<a href="'+srv.url+'" title="'+srv.title+'" style="background-position:'+srv.bgpos+';" target="_blank"></a>');
		}
	}
	else
	{
		$.each(this.services, function(key,val){
			$(container).append('<a href="'+val.url+'" title="'+val.title+'" style="background-position:'+val.bgpos+';" target="_blank"></a>');
		});
	}


	if ( class_name ) $(container).addClass( class_name );
}


