jQuery(document).ready(function(){
	
	jQuery(".teilen").live('click', function () {
		if (document.URL.indexOf("hoerspieltage/2011") != -1) {
			//jQuery(this).removeAttr("href");
			jQuery(".closer > a").removeAttr("href");
		}
		jQuery(this).parent().find(".share").toggle();
		//Abruf der Zaehlpixel (IVW, GSEA, etracker)
		if (document.URL.indexOf("hoerspieltage/2011") == -1 && jQuery(this).parent().find(".share").is(':visible')) jQuery(this).init_all_pixel("ShareButtons");
		return false;
	});
	
	jQuery(".closer > a").live('click', function () {
		jQuery(this).parent().parent().hide();
		return false;
	});
});

function setBookmark (where) { 
burl = encodeURIComponent(location.href); 
btitle = encodeURIComponent(document.title); 

	switch(where) { 
		case 'Delicious': window.open('http://www.delicious.com/save?v=5&noui&jump=close&url='+burl+'&amp;title='+btitle, 'delicious','toolbar=no,width=550,height=550'); break;		
		case 'Mrwong': window.open('http://www.mister-wong.de/index.php?bm_url='+burl+'&bm_notice=&bm_description='+btitle+'&action=addurl'); break; 
		case 'Webnews': window.open('http://www.webnews.de/einstellen?url='+burl+'&title='+btitle); break;
		case 'Yigg': window.open('http://yigg.de/neu?exturl='+burl); break;
		case 'facebook': window.open('http://www.facebook.com/sharer.php?u='+burl+'&t='+btitle); break;    
		case 'studivz': window.open('http://www.studivz.net/Link/Selection/Url/?u='+burl+'&desc='+btitle+'&prov='+btitle); break;    
		case 'twitter': window.open('http://twitter.com/home?status='+btitle+" "+burl); break;
		case 'Google': window.open('http://www.google.com/bookmarks/mark?op=add&bkmk='+burl+'&title='+btitle); break;
		case 'Digg': window.open('http://digg.com/submit?url='+burl+'&amp;title='+btitle); break;
	} 
}
