// Social bookmarking - must include glabal share.js and common.js
share.url = "http://www.thebigc-tv.com/";
share.title = "The Big C";
share.description = "Laura Linney stars as Cathy, a reserved schoolteacher who receives life changing news and decides to make drastic, long-overdue adjustments to the way she is living her life. On SHOWTIME.";
share.tweet = "Check out the unpredictably witty series THE BIG C on SHOWTIME! www.thebigc-tv.com";
//share.delicious.description = "";

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;
		});
	}
}

//Configure pop up window. Must include global common.js
function windowPop(){
	var links = document.getElementsByTagName('a');	
	for(i=0;i<links.length;i++){
		if (links[i].getAttribute('rel')=="popup"){
			links[i].onclick = function(){
				displayWindow(this.href,"forgot_password",475,447,"directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0");
				return false;
			}
		}
	}
}

addLoadEvent(function(){
	windowPop();
});

addLoadEvent(function(){
	shareFunc('share');
});

