// share config
share.url = 'http://www.tildeathtv.com';
share.title = 'Til Death';
share.description  = 'Brad Garrett and Joely Fisher shine a light on the many situations encompassing middle class Americans in TIL DEATH. Check local listings.';
share.tweet = "Brad Garrett and Joely Fisher star as a couple trying to get through married life in TIL DEATH. Check local listings. http://tildeathtv.com";

function shareFunc(id){
	var el = document.getElementById(id);
	var el_anchors = el.getElementsByTagName('a');
	for(var i=0; i<el_anchors.length; i++){
		extendOnClick(el_anchors[i],function(evt,that){
			var rel = that.getAttribute('rel');
			switch(rel){
				case 'facebook':
				case 'twitter':
				case 'myspace':
				case 'digg':
				case 'stumbleupon':
				case 'myspace':
				case 'delicious':
					share.send(rel);
				break;
				default:
					alert('This share does not exist');
			}

			return false;
		});
	}
}

addLoadEvent(function(){
	if(document.getElementById('share') != null)
		shareFunc('share');
});

