var livedoor_clip_anywhere_style;var livedoor_clip_anywhere_limit;var livedoor_clip_anywhere_collapse;var livedoor_clip_anywhere_url;var livedoor_clip_anywhere_icon_url="http://blog.ddc.co.jp/img/icon/images/livedoorclip-16x16-w.gif";var livedoor_clip_anywhere_edit_icon_url="http://blog.ddc.co.jp/img/icon/famfamfam/comment_edit.gif";function __livedoor_clip_anywhere_receiver(json){try{var html="";var escapeHTML=function(str){str=str.replace("&","&amp;");str=str.replace("\"","&quot;");str=str.replace("'","&#039;");str=str.replace("<","&lt;");str=str.replace(">","&gt;");return str;};var addCSSRule=(document.createStyleSheet)?(function(sheet){return function(selector,declaration){sheet.addRule(selector,declaration);};})(document.createStyleSheet()):(function(sheet){return function(selector,declaration){sheet.insertRule(selector+'{'+declaration+'}',sheet.cssRules.length);};})((function(e){e.appendChild(document.createTextNode(''));(document.getElementsByTagName('head')[0]||(function(h){document.documentElement.insertBefore(h,this.firstChild);return h;})(document.createElement('head'))).appendChild(e);return e.sheet;})(document.createElement('style')))
if(livedoor_clip_anywhere_style!==false){addCSSRule("#livedoor_clip_anywhere","font-size: 90%; font-family: \"Arial\", sans-serif; color: #000;");addCSSRule("#livedoor_clip_anywhere * ","margin: 0; padding: 0; text-align: left; font-weight: normal; font-family: \"Arial\", sans-serif;");addCSSRule("#livedoor_clip_anywhere img","vertical-align: middle;");addCSSRule("#livedoor_clip_anywhere .livedoor_clip_anywhere_zero","background-color:#edf1fd; border-top:1px solid #5279e7; list-style-position: inside; margin:2px 0 0 0;padding: 8px 5px 12px 8px;");addCSSRule("#livedoor_clip_anywhere ul","background-color:#edf1fd; border-top:1px solid #5279e7; list-style-position: inside; margin:2px 0 0 0;padding: 8px 5px 12px 8px;");addCSSRule("#livedoor_clip_anywhere ul li","list-style-type: circle; padding: 1px 0;");addCSSRule("#livedoor_clip_anywhere .livedoor_clip_anywhere_user","color: #00e; text-decoration: underline; margin: 0 2px; vertical-align: middle;");addCSSRule("#livedoor_clip_anywhere .livedoor_clip_anywhere_tags","font-size: 90%; color: #66c; margin: 0 4px 0 2px;");addCSSRule("#livedoor_clip_anywhere .livedoor_clip_anywhere_tags a","text-decoration: none; color: #66c;");addCSSRule("#livedoor_clip_anywhere .livedoor_clip_anywhere_go","font-size: 90%; color: #66c; text-decoration: none;");addCSSRule("#livedoor_clip_anywhere img.livedoor_clip_anywhere_edit","margin: 0px 3px; vertical-align: middle;");addCSSRule("#livedoor_clip_anywhere a.livedoor_clip_anywhere_edit","font-weight: bold;");addCSSRule("#livedoor_clip_anywhere li.livedoor_clip_anywhere_edit","margin-top: 10px;");addCSSRule("#livedoor_clip_anywhere img.livedoor_clip_anywhere_jump","margin: 0px 3px; vertical-align: middle;");}
if((json.isSuccess=="0")||(json.total_clip_count=="0")){html+='このエントリーのlivedoor clip (0) <a class="livedoor_clip_anywhere_go" href="http://clip.livedoor.com/page/'
+escapeHTML(livedoor_clip_anywhere_url)
+'"><img class="livedoor_clip_anywhere_jump" src="'
+livedoor_clip_anywhere_icon_url
+'" width="16" height="16" border="0" alt="liveddor clip" />livedoor clipのページへ飛ぶ</a><br />';html+='<div class="livedoor_clip_anywhere_zero">';html+='このページはまだブックマークされていません。<br /><a class="livedoor_clip_anywhere_edit" href="http://clip.livedoor.com/clip/add?link='
+escapeHTML(livedoor_clip_anywhere_url)
+'&title='
+encodeURIComponent(document.title)
+'">livedoor clipで最初のブックマーク＆コメントしてみませんか？<img class="livedoor_clip_anywhere_edit" src="'
+livedoor_clip_anywhere_edit_icon_url
+'" width="16" height="16" border="0" alt="コメント" /></a>';html+='</div>';}
else{if((typeof livedoor_clip_anywhere_limit)!="number")livedoor_clip_anywhere_limit=100;if((typeof livedoor_clip_anywhere_collapse)=="undefined"&&json.Comments.length>livedoor_clip_anywhere_limit)livedoor_clip_anywhere_collapse=true;jjjjjj=json.Comments.length;jjjjj=livedoor_clip_anywhere_collapse;var hide_clip_count=json.total_clip_count-json.public_clip_count;html+='このエントリーのlivedoor clip (公開:'
+json.public_clip_count
+' + 非公開:'
+hide_clip_count
+') <a class="livedoor_clip_anywhere_go" href="http://clip.livedoor.com/page/'
+escapeHTML(livedoor_clip_anywhere_url)
+'"><img class="livedoor_clip_anywhere_jump" src="'
+livedoor_clip_anywhere_icon_url
+'" width="16" height="16" border="0" alt="livedoor clip" />livedoor clipのページへ飛ぶ</a><br/>';html+='<ul id="bookmarked_user">';var t=new Array(6);for(var i=0;i<json.public_clip_count&&livedoor_clip_anywhere_limit>0;++i){var bookmark=json.Comments[i];var dd=new Date();dd.setTime(bookmark.created_on*1000);t[0]=dd.getYear();if(t[0]<1900){t[0]+=1900;}
t[1]=dd.getMonth()+1;t[2]=dd.getDate();t[3]=dd.getHours();t[4]=dd.getMinutes();t[5]=dd.getSeconds();for(var count=3;count<6;count++){if(t[count]<10){t[count]="0"+t[count]}}
t[1]=('0'+t[1]).match('..$');t[2]=('0'+t[2]).match('..$');;var tags=[];for(var j=0;j<json.Comments[i].tags.length;++j){var tag=json.Comments[i].tags[j];tags.push('<a href="http://clip.livedoor.com/clips/'+bookmark.livedoor_id+'/tag/'+tag+'" target="_blank">'+escapeHTML(tag)+'</a>');}
html+='<li><span class="__livedoor_clip_anywhere_timestamp">'
+t[0]
+'年'
+t[1]
+'月'
+t[2]
+'日</span><img src="http://image.profile.livedoor.jp/icon/'
+escapeHTML(bookmark.livedoor_id)
+'_16.gif" width="16" height="16"><a href="http://clip.livedoor.com/clips/'
+escapeHTML(bookmark.livedoor_id)
+'/'
+t[0]
+t[1]
+t[2]
+'" class="livedoor_clip_anywhere_user" target="_blank">'
+escapeHTML(bookmark.livedoor_id)
+'</a><span class="livedoor_clip_anywhere_tags">'
+tags.join(", ")
+'</span>'
+escapeHTML(bookmark.notes)
+'</li>';livedoor_clip_anywhere_limit--;}
html+='<li class="livedoor_clip_anywhere_edit"><a class="livedoor_clip_anywhere_edit" href="http://clip.livedoor.com/clip/add?link='
+escapeHTML(livedoor_clip_anywhere_url)
+'&title='
+encodeURIComponent(document.title)
+'">livedoor clipでブックマーク＆コメントしてみませんか？<img src="'
+livedoor_clip_anywhere_edit_icon_url
+'" width="16" height="16" border="0" alt="コメント" /></a></li>';html+='</ul>';}
var wrap=document.createElement("div");wrap.innerHTML=html;document.getElementById("livedoor_clip_anywhere").innerHTML="";document.getElementById("livedoor_clip_anywhere").appendChild(wrap);}catch(e){}}
function __livedoor_clip_anywhere_loade(){try{if((typeof document.getElementById("livedoor_clip_anywhere"))!="undefined"){var script=document.createElement("script");script.setAttribute("type","text/javascript");if((typeof livedoor_clip_anywhere_url)=="undefined")livedoor_clip_anywhere_url=location.href.replace(/#.*/,"");script.setAttribute("src","http://clip.livedoor.com/api/json/comments?link="+livedoor_clip_anywhere_url+"&callback=__livedoor_clip_anywhere_receiver&all=1");document.body.appendChild(script);}}catch(e){}}
try{if(window.addEventListener){window.addEventListener("load",__livedoor_clip_anywhere_loade,false);}
else{window.attachEvent("onload",__livedoor_clip_anywhere_loade);}}catch(e){}