﻿// 使用本插件前请先在<head></head>标签内引入 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
var icopath = "http://if.api.li/ico/"; //图标文件存放路径
var mpsjs = "javascript:location.href='http://www.myspace.cn/Modules/PostTo/Pages/DefaultMblog.aspx?t='+encodeURIComponent(document.title)+'&u='+encodeURIComponent(location.href)";
var zsjs = "javascript:u=location.href;t=document.title;t=t.substr(0,76);c=%22%22+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);c=c.substr(0,180);location=%22http://zuosa.com/collect/Collect.aspx?t=%22+encodeURIComponent(t)+%22&u=%22+encodeURIComponent(u);void%200";
var ffjs = "javascript:var d=document,w=window,f='http://fanfou.com/share',l=d.location,e=encodeURIComponent,p='?u='+e(l.href)+'?t='+e(d.title)+'?d='+e(w.getSelection?w.getSelection().toString():d.getSelection?d.getSelection():d.selection.createRange().text)+'?s=bl';if(!w.open(f+'r'+p,'sharer','toolbar=0,status=0,width=600,height=400')){l.href=f+'.new'+p;}void(0)";
var jwjs = "javascript:var d=document,w=window,f='http://jiwai.de/wo/share/',l=d.location,e=encodeURIComponent,p='?u='+e(l.href)+'&t='+e(d.title)+'&d='+e(w.getSelection?w.getSelection().toString():d.getSelection?d.getSelection():d.selection.createRange().text);a=function(){if(!w.open(f+'s'+p,'sharer','toolbar=0,status=0,resizable=0,width=640,height=310'))l.href=f+'w'+p};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}void(0)";
var ifav = "javascript:window.open('http://www.9fav.com/profile/user_url/add?t='+encodeURIComponent(document.title)+'&u='+encodeURIComponent(document.location.href));void(0)";
var qqjs = "javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','keyit','scrollbars=yes,width=900,height=450,left=20,top=20,status=no,resizable=yes'));keyit.focus();";
var sinajs = "javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=28&title='+escape(d.title)+'&url='+escape(d.location.href)+'&desc='+escape(t),'vivi','scrollbars=yes,width=480,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();";
var skjs = "javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.shouker.com/mc/col/post2.aspx?surl='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'keyit','scrollbars=yes,width=600,height=450,left=20,top=20,status=no,resizable=yes'));keyit.focus();";
var wowajs = "javascript:q=(document.location.href);void(open('http://www.digbuzz.com/submit.php?url='+escape(q),'','resizable,location,menubar,toolbar,scrollbars,status'));";
var pocojs = "javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://my.poco.cn/fav/storeIt.php?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&img=http://www.h-strong.com/blog/logo.gif','keyit','scrollbars=yes,width=475,height=575,status=no,resizable=yes'));keyit.focus();";
var hmjs = "javascript:desc='';via='';if(document.referrer)via=document.referrer;if(typeof(_ref)!='undefined')via=_ref;if(window.getSelection)desc=window.getSelection();if(document.getSelection)desc=document.getSelection();if(document.selection)desc=document.selection.createRange().text;void(open('http://www.hemidemi.com/user_bookmark/new?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&description='+encodeURIComponent(desc)+'&via='+encodeURIComponent(via)));";
var udnjs = "javascript:desc='';via='';if(document.referrer)via=document.referrer;if(typeof(_ref)!='undefined')via=_ref;if(window.getSelection)desc=window.getSelection();if(document.getSelection)desc=document.getSelection();if(document.selection)desc=document.selection.createRange().text;void(open('http://bookmark.udn.com/add?f_TITLE='+encodeURIComponent(document.title)+'&f_URL='+encodeURIComponent(location.href)+'&f_DIGEST='+encodeURIComponent(desc)+'&via='+encodeURIComponent(via)));";
var keyjs = "javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();";
var yeskyjs = "javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(yesky=window.open('http://hot.yesky.com/dp.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&st=2','yesky','scrollbars=no,width=400,height=480,left=75,top=20,status=no,resizable=yes'));yesky.focus();";
var hexunjs = "javascript:t=document.title;u=location.href;e=document.selection?(document.selection.type!='None'?document.selection.createRange().text:''):(document.getSelection?document.getSelection():'');void(open('http://bookmark.hexun.com/post.aspx?title='+escape(t)+'&url='+escape(u)+'&excerpt='+escape(e),'HexunBookmark','scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes'));";
var bolajs = "javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(blog=window.open('http://www5.bolaa.com/CommendBlog/SmallLogin.aspx?title='+escape(d.title)+'&newspath='+escape(d.location.href)+'&subtitle='+escape(t),'bolaa','width=400px,height=400px'));blog.focus();";
var diglogjs = "javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.diglog.com/submit.aspx?title='+escape(d.title)+'&url='+escape(d.location.href)+'&description='+escape(t),'keyit','resizable,location,menubar,toolbar,scrollbars,status'));keyit.focus();";
var msjs = "javascript:(function(){d=document;w=window;t='';if(d.selection){t=d.selection.createRange().text;}else{if(d.getSelection){t=d.getSelection();}else{if(w.getSelection){t=w.getSelection()}}}void(window.open('http://myshare.url.com.tw/index.php?func=newurl&from=mysharepop&url='+encodeURIComponent(location.href)+'&desc='+escape(document.title)+'&contents='+escape(t),'newwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=510,height=535'))})();";
var twitjs = "javascript:(function(){TwitiousPop=window.open(%22http://twitio.us/go?url=%22+encodeURIComponent(location.href)+%22%26title=%22+((document.title)?encodeURIComponent(document.title.replace(/^\s*|\s*$/g,%27%27)):%22%22),%22TwitiousPop%22,%22width=600,height=500,location,status,scrollbars,resizable,dependent=yes%22);setTimeout(%22TwitiousPop.focus()%22,100);})()";
var haineijs = "javascript:void((function(s,d,e,t,v){var f='http://hainei.com/share.proxy?a=',u=d.location,l=d.title,p=['&src=bookmark&url=',e(u),'&title=',e(l),'&v=',v,'&i=',t].join('');function a(){if(!window.open([f,'bmlet',p].join(''),'hnsharer',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,'newurl',p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();})(screen,document,encodeURIComponent,1207710314,1));";
var funpjs = "javascript:(function(){t='';if(window.getSelection)t=window.getSelection();else if (document.getSelection)t=document.getSelection();else if(document.selection)t=document.selection.createRange().text;w=window.open('http://funp.com/push/submit/?popup&url='+encodeURIComponent(location.href)+'&t='+encodeURIComponent(t),'FunP.com','height=500,width=760,scrollbars,resizable');})()";
var doubanjs = "javascript:void(function(){var d=document,e=encodeURIComponent,s1=window.getSelection,s2=d.getSelection,s3=d.selection,s=s1?s1():s2?s2():s3?s3.createRange().text:'',r='http://www.douban.com/recommend/?url='+e(d.location.href)+'&title='+e(d.title)+'&sel='+e(s)+'&v=1',x=function(){if(!window.open(r,'douban','toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330'))location.href=r+'&r=1'};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})()";
var gnotesjs = "javascript:var%20b=document.body;var%20GR________bookmarklet_domain='https://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='https://www.google.com/reader/ui/link-bookmarklet.js');void(b.appendChild(z));}else{}"
var ffeedjs = "javascript:void((function(){var%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('src','http://friendfeed.com/share/bookmarklet/javascript');document.body.appendChild(e)})())";
var yiqijs = "javascript:function init(){try{var script=document.createElement('SCRIPT');script.src='http://www.yiqi.com/icut/BaseBtn.php?comType=4&reqType=1';document.body.appendChild(script);}catch(err){}}init();";
var g2js = "javascript:var%20d=document,w=window,l=d.location,db=d.body,html=function(n){var%20x=d.createElement('div');x.appendChild(n.cloneNode(true));return%20x.innerHTML;},a=w.getSelection,b=d.getSelection,c=d.selection,s=(a?a():(b)?b():(c?c.createRange().text:0)),sp='<|>',f=d.createElement('FORM'),di=d.images,do1=db.getElementsByTagName('OBJECT');de=db.getElementsByTagName('EMBED');for(var%20n=0;n<di.length;n++){if(di[n].offsetWidth*di[n].offsetHeight>70*70){var%20i=d.createElement('input');i.name='i[]';i.type='hidden';i.value=di[n].offsetWidth+sp+di[n].offsetHeight+sp+di[n].src;f.appendChild(i);}}for(var%20n=0;n<do1.length;n++){var%20i=d.createElement('input');i.name='o[]';i.type='hidden';i.value=html(do1[n]);f.appendChild(i);}for(var%20n=0;n<de.length;n++){if(de[n].parentNode.tagName%20!=%20'OBJECT'){var%20i=d.createElement('input');i.name='e[]';i.type='hidden';i.value=html(de[n]);f.appendChild(i);}}var%20e=encodeURIComponent,u='http://goofy2.com/tools/share?layout=bookmarklet_view',q='&v=2&u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s),r=u+q,x=function(){w.open('about:blank','g2share','toolbar=0,resizable=1,scrollbars=yes,status=1,width=630,height=300');f.target='g2share';f.action=r+'&p=t';f.method='post';db.appendChild(f);f.submit();};if(/Firefox/.test(navigator.userAgent))setTimeout(x,0);else{x()}void(0)";
// This function by http://jqueryfordesigners.com/coda-popup-bubbles/
$(function () {
$('#sharepackbox').each(function () {
var distance = 10;
var time = 250;
var hideDelay = 500;
var hideDelayTimer = null;
var beingShown = false;
var shown = false;
var trigger = $('#sharebotton', this);
var info = $('#sharepack_bubble', this).css('opacity', 0);
$([trigger.get(0), info.get(0)]).mouseover(function () {
    if (hideDelayTimer) clearTimeout(hideDelayTimer);
    if (beingShown || shown) {
        // don't trigger the animation again
        return;
    } else {
        // reset position of info box
        beingShown = true;
info.css({
top: 30,
left: 90,
display: 'block'
        }).animate({
top: '-=' + distance + 'px',
opacity: 1
        }, time, 'swing', function() {
beingShown = false;
shown = true;
        });
    }
    return false;
}).mouseout(function () {
    if (hideDelayTimer) clearTimeout(hideDelayTimer);
    hideDelayTimer = setTimeout(function () {
        hideDelayTimer = null;
        info.animate({
top: '-=' + distance + 'px',
opacity: 0
        }, time, 'swing', function () {
shown = false;
info.css('display', 'none');
        });
}, hideDelay);
return false;
});
});
});
//如需更改弹出页面的样式，请更改下面document.writeln('');引号中的HTML。
document.writeln('<style><!-- #sharepackbox {position:relative;top:10px;width:500px;padding:0 0 10px 0;}#sharebotton {cursor:pointer;}#sharepack_bubble {background:url('+icopath+'sharebox.gif) no-repeat bottom center; position:absolute;display:none; width:202px; height:110px;padding:30px 12px 5px;text-align:center;}#sharepack_table td {text-align:center;}#sharepack_table td img {border:0;margin:5px 3px;} --></style>');
document.writeln('<img src="http://ifire.cn/if/sharepack.gif" id="sharebotton" /><div id="sharepack_bubble"><table border="0" id="sharepack_table" cellspacing="0" cellpadding="0" style="text-align:center;">');
document.writeln('<tr><td><a href="javascript:u=location.href;t=document.title;c = %22%22 + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text);var url=%22http://cang.baidu.com/do/add?it=%22+encodeURIComponent(t)+%22&iu=%22+encodeURIComponent(u)+%22&dc=%22+encodeURIComponent(c)+%22&fr=ien#nw=1%22;window.open(url,%22_blank%22,%22scrollbars=yes,width=600,height=450,left=75,top=20,status=no,resizable=yes%22); void 0" title="百度收藏"><img class="sharepix" src="'+icopath+'baidu.gif" title="百度收藏" /></a><a href="'+qqjs+'"><img src="'+icopath+'qqfav.png" title="收藏QQ书签" /></a><a href="'+sinajs+'"><img src="'+icopath+'sina.gif" title="收藏到新浪" /></a><a href="'+skjs+'"><img src="'+icopath+'shouker.gif" title="收藏到收客" /></a><a href="'+keyjs+'"><img src="'+icopath+'365key.gif" title="添加到365网摘" /></a><a href="'+wowajs+'"><img src="'+icopath+'digbuzz.gif" title="收藏到我挖" /></a><a href="'+yeskyjs+'"><img src="'+icopath+'yesky.gif" alt="天极网摘" title="添加到天极网摘" /><a href="'+pocojs+'"><img src="'+icopath+'poco.gif" title="收藏到POCO" /></a><a href="'+hexunjs+'"><img src="'+icopath+'hexun.gif" alt="和讯网摘" title="添加到和讯网摘" /></a></td></tr>');
document.writeln('<tr><td><a href="'+mpsjs+'" title="分享到9911"><img src="'+icopath+'myspaceshare.gif" alt="分享到9911" /></a><a href="'+twitjs+'" title="分享到Twitter"><img alt="分享到Twitter" src="'+icopath+'twitter.gif" /></a><a href="'+zsjs+'"><img src="'+icopath+'zuosa.gif" title="分享到做啥" /></a><a href="'+ffjs+'"><img src="'+icopath+'fanfou.gif" title="分享到饭否" /></a><a href="'+haineijs+'"><img src="'+icopath+'hainei.png" title="分享到海内" /></a><a href="'+jwjs+'" class="sharebtn"><img src="'+icopath+'jiwai.gif" title="收藏到叽歪" /></a><a href="'+ifav+'" class="outer_link"><img src="'+icopath+'9fav.gif" title="收藏到就喜欢" /></a><a href="'+bolajs+'"><img src="'+icopath+'bolaa.gif" alt="博拉网" title="添加到博拉网" /></a><a href="javascript://" onclick="'+diglogjs+'" title="推荐到奇客"><img src="'+icopath+'diglog.gif" /></a></td></tr>');
document.writeln('<tr><td><a href="'+doubanjs+'" title="推荐到豆瓣"><img src="'+icopath+'douban.gif" alt="推荐到豆瓣"></a><a href="'+gnotesjs+'"><img src="'+icopath+'gnotes.gif" title="Share to Google Notes" /></a><a href="'+ffeedjs+'"><img src="'+icopath+'friendfeed.gif" title="Share no Friendfeed" /></a><a href="'+funpjs+'" title="貼到funP"><img src="'+icopath+'funp.gif" /></a><a href="'+udnjs+'"><img src="'+icopath+'udn.gif" title="收藏到UDN" /></a><a href="'+hmjs+'"><img src="'+icopath+'heimi.gif" title="收藏到黑米书签" /></a><a href="'+msjs+'"><img src="'+icopath+'myshare.gif" title="Add to MyShare" /></a><a href="'+yiqijs+'" title="收藏到一起"><img src="'+icopath+'yiqi.png" /></a><a href="'+g2js+'" title="收藏到G2"><img src="'+icopath+'g2.gif" /></a></td></tr>');
document.writeln('<tr><td><a href="http://if.api.li/sharepack" target="_blank"><img align="center" src="'+icopath+'gethis.gif" title="获取这个插件" /></a></td></tr></table></div>');