function addLoadEvent(func){
	var oldonload = window.onload;
	if(typeof window.onload != 'function'){
	window.onload = func;
	}else{
		window.onload = function(){
			oldonload();
			func();
		}
	}
}

function wanmeiShare(){
	var url = encodeURIComponent(window.location.href);
	var title = encodeURIComponent(window.document.title);
	
	var baidu = document.getElementById("share_baidu");
	var bsh = document.getElementById("share_bsh");
	var qqbm = document.getElementById("share_qqbm");
	var qqzone = document.getElementById("share_qqzone");
	var sina = document.getElementById("share_sina");
	var douban = document.getElementById("share_douban");
	var renren = document.getElementById("share_renren");
	var kaixin = document.getElementById("share_kaixin");
	var qqmarks = document.getElementById("share_qqmarks");
	var googlemarks = document.getElementById("share_googlemarks");
	
	if(baidu) baidu.href = "http://cang.baidu.com/do/add?it=" + title + "&iu=" + url;	//百度搜藏
	if(bsh) bsh.href = "http://bai.sohu.com/share/blank/addbutton.do?from=fengyin&link=" + url + "&title=" + title;	//搜狐白社会
	if(qqbm) qqbm.href = "http://shuqian.qq.com/post?from=3&title=" + title + "&uri=" + url;	//QQ书签
	if(qqzone) qqzone.href = "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=" + url;	//QQ空间
	if(sina) sina.href = "http://v.t.sina.com.cn/share/share.php?url=" + url + "&title=" + title;	//新浪微博
	if(douban) douban.href = "http://www.douban.com/recommend/?url=" + url + "&title=" + title;	//豆瓣
	if(renren) renren.href = "http://share.renren.com/share/buttonshare.do?link=" + url + "&title=" + title;	//人人网
	if(kaixin) kaixin.href = "http://www.kaixin001.com/repaste/share.php?rtitle=" + url + "&rcontent=" + title;	//开心001
	if(qqmarks) qqmarks.href = "http://shuqian.qq.com/post?jumpback=1&title=" + title+ "&uri=" + url;	//QQ书签
	if(googlemarks) googlemarks.href = "https:www.google.com/bookmarks/mark?op=add&bkmk=" + url + "&title=" + title//Google书签
	
}


addLoadEvent(wanmeiShare)
