var MySpace={};MySpace.post=function(type,title,content,url,location)
{if(type!='groups_newpost_share'){url=MySpace.addURLTracking(url,type);}
var location=(location==null)?'3':location;var targetUrl='http://www.myspace.com/index.cfm?fuseaction=postto&'+'t='+encodeURIComponent(title)
+'&c='+encodeURIComponent(content)+'&u='+encodeURIComponent(url)+'&l='+location;var myWin=window.open(targetUrl,"MySpace","location=1,status=1,scrollbars=1,width=800,height=500");myWin.focus();MySpace.trackShareClick(type,title);};MySpace.addURLTracking=function(url,content_name)
{var params='utm_medium=widget&utm_source=myspace-news&utm_campaign=General&utm_content='+escape(content_name);return url+((url.indexOf('?')==-1)?'?':'&')+params;};MySpace.trackShareClick=function(type,title)
{if(_gaq){_gaq.push(['_trackEvent','MySpace',type,title]);}}
var Twitter={};Twitter.post=function(type,title,url)
{var targetUrl='/services/twitter_share.php?tweet_message='+encodeURIComponent(title.substr(0,120))+'&tweet_url='+encodeURIComponent(url);var myWin=window.open(targetUrl,"Twitter","location=1,status=1,scrollbars=1,width=800,height=500");myWin.focus();Twitter.trackShareClick(type,title);};Twitter.trackShareClick=function(type,title)
{if(_gaq){_gaq.push(['_trackEvent','Twitter',type,title]);}}
var FBC={};FBC.partnerShare=function(href,title){if(!href){href=location.href;}
if(!title){title=document.title;}
if(_gaq){_gaq.push(['_trackEvent','Facebook','ShareMisc',title]);}
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(href)+'&t='+encodeURIComponent(title),'sharer','toolbar=0,status=0,width=626,height=436');return false;}
var FBroot=document.getElementById('fb-root');if(FBroot){FBC.app_key='60394852528';window.fbAsyncInit=function(){FB.init({appId:FBC.app_key,status:true,cookie:true,xfbml:true,oauth:true});if(typeof initFBEvents=='function'){initFBEvents();}};(function(d){var js,id='facebook-jssdk';if(d.getElementById(id)){return;}
js=d.createElement('script');js.id=id;js.async=true;js.src="//connect.facebook.net/en_US/all.js";d.getElementsByTagName('head')[0].appendChild(js);}(document));FBC.shareItem_last_object=null;FBC.shareItem_last_title=null;FBC.trackShareItem=function()
{if(_gaq){_gaq.push(['_trackEvent','Facebook',FBC.shareItem_last_object,FBC.shareItem_last_title]);FBC.shareItem_last_object=null;FBC.shareItem_last_title=null;}}
FBC.addURLTracking=function(url,content_name,copy_block){var params='utm_medium=sm&utm_source=facebook&utm_campaign=General&utm_content=connect_'+escape(content_name);if(copy_block){params+='&cb_id='+copy_block+'&flow='+copy_block;}
return url+((url.indexOf('?')==-1)?'?':'&')+params;};FBC.showFeed=function(name,href,caption,description,action_link,images,callback)
{var attachment={};attachment.name=name;attachment.href=href;attachment.caption=caption;attachment.description=description;if(images){attachment.media=images;}
else{attachment.media=new Array();attachment.media.push({'type':'image','src':IMAGE_HOST+'/images/fb_connect_logo.jpg','href':href});}
attachment=FB.JSON.stringify(attachment);action_link=FB.JSON.stringify(action_link);FB.ui({method:'stream.publish',message:'',attachment:attachment,action_links:action_link,user_prompt_message:''},callback);}}
