var share = {
	// required
	url: "http://www.brothers-tv.com",
	title: "Brothers",
	
	// optional
	description: "Brothers is a FOX comedy about former NFL star (Michael Strahan) who finds himself living back home, where sibling-rivalry with his brother (Deryl 'Chill' Mitchell) keeps Mom (CCH Pounder) & Dad (Carl Weathers) maneuvering.",
	
	// specific
	tweet: "Watch former NFL stars Michael Strahan and Carl Weathers in 'BROTHERS' on FOX! www.brothers-tv.com ",
	
	send: function (site)
	{
		var url = null;
		switch (site) {
			case 'delicious':
				if (this.url && this.title) {
					var url = 'http://delicious.com/save?url=' + escape(this.url) + '&title=' + escape(this.title) + '&notes=' + escape(this.description);
				}
				break;
			case 'digg':
				if (this.url && this.title) {
					var url = 'http://digg.com/submit?phase=2&partner=[partner]&url=' + escape(this.url) + '&title=' + escape(this.title);
				}
				break;
			case 'facebook':
				if (this.url) {
					var url = 'http://www.facebook.com/sharer.php?u=' + escape(this.url) + '&t=' + escape(this.title);
				}
				break;
			case 'myspace':
				if (this.url && this.title) {
					var url = 'http://www.myspace.com/Modules/PostTo/Pages/?u=' + escape(this.url) + '&t=' + escape(this.title);
				}
				break;
			case 'stumbleupon':
				if (this.url && this.title) {
					var url = 'http://www.stumbleupon.com/submit?url=' + escape(this.url) + '&title=' + escape(this.title);
				}
				break;
			case 'twitter':
				if (this.tweet) {
					var url = 'http://twitter.com/home?status=' + escape(this.tweet);
				}
				break;
		}
		//if (url) window.location = url;
		if (url) {
			if ( window.open(url) ) {
				return true;
			}
			return false;
		}
	}
	
};


function applyShare(){
	var sharelinks = document.getElementById('sharelinks');
	if(sharelinks){
		var a = sharelinks.getElementsByTagName('a');
		for(var i=0; i<a.length; i++){
			var rel = a[i].getAttribute('rel');
			if(rel && typeof(extendOnClick)=='function'){
				extendOnClick(a[i],function(evt,obj){
					share.send(obj.getAttribute('rel'));
					return false;
				});
			}
		}
	}
}

addLoadEvent(applyShare);
