// bookmark 代码来自 blogit 2, 作者 coolcode, http://www.coolcode.cn/xenium/wordpress-plugin-blog-it-2/240, 偶爱偶家稍作修改.
function blogit_init()
{
    var lists = [
        {name : "ZhuaXia",
         logo : "zhuaxia.gif",
         href : function(t,u,c) {
                    return "http://www.zhuaxia.com/add_channel.php?sourceid=103" +
                        "&url=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t);
                }
        },
        {name : "delicious",
         logo : "delicious.gif",
         href : function(t,u,c) {
                    return "http://del.icio.us/post?v=4" +
                        ";url=" + encodeURIComponent(u) +
                        ";title=" + encodeURIComponent(t);
                }
        },
        {name : "digg",
         logo : "digg.gif",
         href : function(t,u,c) {
                     return "http://digg.com/submit?phase=2" +
                         "&url=" + encodeURIComponent(u) +
                         "&title=" + encodeURIComponent(t);
                 }
         },
/*        {name : "365key",
         logo : "365key.gif",
         href : function(t,u,c) {
                    return "http://www.365key.com/storeit.aspx?noui=yes&jump=close" +
                        "&t=" + escape(t) +
                        "&u=" + escape(u) +
                        "&c=" + escape(c);
                }
        },
*/
        {name : "baidu",
         logo : "baidu.gif",
         href : function(t,u,c) {
                    return "http://cang.baidu.com/do/add?fr=ieo;&it=" +
                        encodeURIComponent(t) +
                        "&iu=" + encodeURIComponent(u) +
                        "&dc=" + encodeURIComponent(c);
                }
        },
        {name : "Google",
         logo : "google.gif",
         href : function(t,u,c) {
                    return "http://www.google.com/bookmarks/mark?op=add" +
                        "&bkmk=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t)
                }
        },
        {name : "Yahoo",
         logo : "yahoo.gif",
         href : function(t,u,c) {
                    return "http://myweb.cn.yahoo.com/addp.html?method=add" +
                        "&url=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t)
                }
        },
        {name : "Windows Live Bookmarks",
         logo : "winlive.gif",
         href : function(t,u,c) {
                    return "https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us" +
                        "&url=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t)
                }
        },
        {name : "Sina vivi",
         logo : "vivi.gif",
         href : function(t,u,c){
                    return "http://vivi.sina.com.cn/collect/icollect.php?pid=2008" + 
                        "&title=" + escape(t) +
                        "&url=" + escape(u) +
                        "&desc=" + escape(c)
                }
        },
/*        {name : "hexun",
         logo : "hexun.gif",
         href : function(t,u,c) {
                    return "http://bookmark.hexun.com/post.aspx?" + 
                        "title=" + escape(t) +
                        "&url=" + escape(u) +
                        "&excerpt=" + escape(c);
                }
        },
*/
/*       {name : "Spurl",
         logo : "spurl.png",
         href : function(t,u,c) {
                    return "http://www.spurl.net/spurl.php?" + 
                        "title=" + encodeURIComponent(t) +
                        "&url=" + encodeURIComponent(u);
                }
        },
*/
        {name : "Wists",
         logo : "wists.png",
         href : function(t,u,c) {
                    return "http://wists.com/r.php?" +
                        "c=" + encodeURIComponent(c) +
                        "&r=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t);
                }
        },
        {name : "Simpy",
         logo : "simpy.png",
         href : function(t,u,c) {
                    return "http://www.simpy.com/simpy/LinkAdd.do?" +
                        "href=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t);
                }
        },
        {name : "Newsvine",
         logo : "newsvine.png",
         href : function(t,u,c) {
                    return "http://www.newsvine.com/_tools/seed&save?" +
                        "u=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t);
                }
        },

        {name : "Blinklist",
         logo : "blinklist.png",
         href : function(t,u,c) {
                    return "http://www.blinklist.com/index.php?Action=Blink/addblink.php" +
                        "&Url=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t);
                }
        },
        {name : "Furl",
         logo : "furl.png",
         href : function(t,u,c) {
                    return "http://www.furl.net/storeIt.jsp?" +
                        "u=" + encodeURIComponent(u);
                }
        },
        {name : "Reddit",
         logo : "reddit.png",
         href : function(t,u,c) {
                    return "http://reddit.com/submit?" +
                        "url=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t);
                }
        },
        {name : "Fark IP",
         logo : "fark.png",
         href : function(t,u,c) {
                    return "http://cgi.fark.com/cgi/fark/edit.pl?" +
                        "new_url=" + encodeURIComponent(u);
                }
        },
        {name : "Blogmarks",
         logo : "blogmarks.png",
         href : function(t,u,c) {
                    return "http://blogmarks.net/my/new.php?mini=1&simple=1" +
                        "&url=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t);
                }
        },
        {name : "Smarking",
         logo : "smarking.png",
         href : function(t,u,c) {
                    return "http://smarking.com/editbookmark/?" +
                        "url=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t);
                }
        },
        {name : "magnolia",
         logo : "magnolia.png",
         href : function(t,u,c) {
                    return "http://ma.gnolia.com/bookmarklet/add?" +
                        "url=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t);
                }
        },
        {name : "Segnalo",
         logo : "segnalo.png",
         href : function(t,u,c) {
                    return "http://segnalo.com/post.html.php?" +
                        "url=" + encodeURIComponent(u) +
                        "&title=" + encodeURIComponent(t);
                }
        },
        {name : "BumpZee",
         logo : "bumpzee.png",
         href : function(t,u,c) {
                    return "http://www.bumpzee.com/entries/new/?" +
                        "u=" + encodeURIComponent(u);
                }
        },
		{name : "QQ Bookmark",
		logo : "qq.gif",
		href : function(t,u,c) {
					return "http://shuqian.qq.com/post?from=3" + 
						"&title=" + encodeURIComponent(t) + 
						"&uri=" + encodeURIComponent(u);
				}
		},
		{name : "Fanfou",
		logo : "fanfou.gif",
		href : function(t,u,c) {
					return "http://fanfou.com/sharer?" + 
						"&u=" + encodeURIComponent(u) + 
						"&title=" + encodeURIComponent(t);
				}
		}
    ]
    var title = document.title;
    var url = location.href;
    var comment = "Very good!";
    var blogit = document.getElementById("subscribebox");
    var i, a, button, img;
    if (blogit) {
        for (i=0; i<lists.length; i++) {
            //button = document.createElement("span");
            a = document.createElement("a");
            img = document.createElement("img");
            img.src = imageurl  + lists[i].logo;
            img.title = "submit to " + lists[i].name;
            img.style.padding = "0px";
            img.style.border = "1px solid #FFFFFF";
            img.onmouseover = function () {
                this.style.border = "1px solid #C3CED9";
            }
            img.onmouseout = function () {
                this.style.border = "1px solid #FFFFFF";
            }
            a.href = lists[i].href(title, url, comment);
            a.target = "_blank";
            a.appendChild(img);
            //button.appendChild(a);
            blogit.appendChild(a);
        }
    }
}
blogit_init();
//bookmark结束

var timeID = null;

function showrss(){
	
	var ns=(document.layers);
	var ie=(document.all);
	var w3=(document.getElementById && !ie);
		
	if(!ns && !ie && !w3){
		return;
	}
	if(ie){
		rssdiv=eval('document.all.rsssub.style');
	}else if(ns){
		rssdiv=eval('document.layers["rsssub"]');
	}else if(w3){
		rssdiv=eval('document.getElementById("rsssub").style');
	}
	if (!ie){
		winW = window.innerWidth + window.pageXOffset - 60 -400;
		winH = window.innerHeight + window.pageYOffset - 20 -450;
	}else{
		winW = document.documentElement.clientWidth + document.documentElement.scrollLeft - 40 - 400;
		winH = document.documentElement.clientHeight + document.documentElement.scrollTop - 20 - 450;
	}
	rssdiv.left=winW+"px";
	rssdiv.top=winH+"px";
	rssdiv.display ="";
	timeID = setTimeout("showrss()",10);
}
	
function closerss(){
	clearTimeout(timeID);
	rssdiv.display="none";
}
	
function dwrite(){
	document.writeln('<div id="rsssub" style="position: absolute; display: none; height: 430px; width: 360px; right:0px; bottom:0px; background: #FEFDF5; border: #FCE9BF solid 2px; padding: 0 15px"><center><h2 style="color: #000;">RSS订阅</h2></center><hr /><p style="color: #888888;">&nbsp;&nbsp;这是一个可以使用RSS阅读器进行订阅的页面，您可以将这个地址添加到您习惯使用的RSS阅读器中。</p><h4 style="color: #FE9E01;">直接订阅RSS：</h4><div><a href="http://feeds2.feedburner.com/wen1xia/seosem"><img src="http://feeds2.feedburner.com/~fc/wen1xia/seosem?bg=99CCFF&amp;fg=444444&amp;anim=1" height="26" width="88" style="border:0" alt="" title="关注SEO/SEM"/></a><a href="http://feed.feedsky.com/SEOSEM_x8n9" title="关注SEO/SEM" target="_blank"><img src="http://www.feedsky.com/feed/SEOSEM_x8n9/sc/blue.gif" style="margin: 0 10px; border: 0;" alt="By Feedsky" /></a></div><h4 style="color: #FE9E01;">通过在线阅读器订阅：</h4><div><a href="http://www.zhuaxia.com/add_channel.php?url=http://feeds2.feedburner.com/wen1xia/seosem"><img alt="订阅到抓虾" src="'+imageurl+'icon_subscribe_zhuaxia_fs.gif" border="0" /></a><a href="http://www.xianguo.com/subscribe.php?url=http://feeds2.feedburner.com/wen1xia/seosem"><img alt="订阅到鲜果" src="'+imageurl+'icon_subscribe_xianguo_fs.gif" border="0" /></a><a href="http://fusion.google.com/add?feedurl=http://feeds2.feedburner.com/wen1xia/seosem"><img alt="google reader" src="'+imageurl+'icon_subscribe_google_fs.gif" border="0" /></a><a href="http://www.newsgator.com/ngs/subscriber/subfext.aspx?url=http://feeds2.feedburner.com/wen1xia/seosem"><img alt="Newsgator" src="'+imageurl+'icon_subscribe_newsgator_fs.gif" border="0" /></a><a href="http://www.bloglines.com/sub/http://feeds2.feedburner.com/wen1xia/seosem"><img alt="bloglines" src="'+imageurl+'icon_subscribe_bloglines_fs.gif" border="0" /></a><a href="http://www.rojo.com/add-subscription?resource=http://feeds2.feedburner.com/wen1xia/seosem"><img alt="Rojo" src="'+imageurl+'icon_subscribe_rojo_fs.gif" border="0" /></a><a href="http://www.pageflakes.com/subscribe.aspx?url=http://feeds2.feedburner.com/wen1xia/seosem"><img alt="订阅到飞鸽" src="'+imageurl+'icon_subscribe_pageflakes_fs.gif" border="0" /></a><a href="http://www.gougou.com/find_rss.jsp?url=http://feeds2.feedburner.com/wen1xia/seosem"><img alt="gougou" src="'+imageurl+'icon_subscribe_gougou_fs.gif" border="0" /></a><a href="http://add.my.yahoo.com/rss?url=http://feeds2.feedburner.com/wen1xia/seosem"><img alt="my yahoo" src="'+imageurl+'icon_subscribe_yahoo_fs.gif" border="0" /></a></div><h4 style="color: #FE9E01;">通过E-mail订阅：</h4><div><a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=634574"><img src="'+imageurl+'mailburner.gif" style="margin: 0px 10px; border: 0;" alt="Email订阅(Feedburner)" /></a><a href="http://www.feedsky.com/msub_wr.html?burl=2i2j"><img src="'+imageurl+'mailsky.gif" style="margin: 0px 10px; border: 0;" alt="Email订阅(Feedsky)" /></a></div><br /><hr /><div><center><a href="javascript:void(0)" title="关闭" onclick="closerss();"><img alt="关闭" src="'+imageurl+'close.png" border="0" /></a></center></div></div>');
}
dwrite();