﻿var _href;

function socialShare(type, u, t)
{
	var _lh  = (u) ? u : window.location.href;
    _lh = encodeURIComponent(_lh);
    var _title = (t) ? t : document.title;
    _title = encodeURIComponent(_title);
	//
	if(type == "FB")
	{
		_href = "http://www.facebook.com/sharer.php?u="+ _lh + "&t=" + _title;
		window.open( _href, 'sharer', 'toolbar=0,status=0,width=626,height=436');
		//window.open( _href , "_blank" );
	}
	if(type == "PL")
	{
		_href = "http://www.plurk.com/?qualifier=shares&status=".concat(_lh).concat(' ').concat('(').concat(_title).concat(')');
		window.open( _href , "_blank" );
	}
	if(type == "TW")
	{
		_href = "http://twitter.com/home/?status=" + _title + " " + _lh;
		window.open( _href , "_blank" );
	}
	
	if(type == "kaixin")
	{
		_href = "http://www.kaixin001.com/repaste/share.php?rtitle=" + "我和刘嘉玲、曾子墨、李艾、范然、沈星，一起见证了”每一天，看见更年轻的自己”" + "&rurl=" + _lh + "&rcontent=" + _lh;
		window.open( _href , "_blank", 'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes' );
	}
}
