// Social bookmarking - must include glabal share.js and common.js
share.url = "http://www.myboystv.com/meta2.html";
share.title = "MY BOYS - Official Site";
share.description = "The hilarious reality of becoming adults begins to catch up to PJ and her close-knit group of guy friends on TBS's acclaimed original series MY BOYS - Watch Sundays at 10/9c.";
share.tweet = "For the MY BOYS gang growing up can be hard, but it's also crazy funny! Watch TBS' comedy Sundays @ 10/9c! www.myboystv.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;
		});
	}
}

/*var flashversion = "9.0.115";

function loadFlash() {
	var flashvars = {
	};
									
	var params = {
		allowscriptaccess:"always",
		allowfullscreen:"true",
		base:"media/",
		wmode:"transparent"
	};
				
	var attributes = {
	};
										
	swfobject.embedSWF("media/flashcontent.swf", "flashcontent", "100%", "200", flashversion, "", flashvars, params, attributes);
}*/



//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",349,528,"directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0");
				return false;
			}
		}
	}
}

addLoadEvent(function(){
	windowPop();
});
/*addLoadEvent(function(){
	loadFlash();
});*/
addLoadEvent(function(){
	shareFunc('share');
});
