var Renren=Renren||{};
Renren.share||(Renren.share=function(){var f=navigator.userAgent.match(/(msie) ([\w.]+)/i),g=location.href.indexOf("#"),h=-1==g?location.href:location.href.substr(0,g),i="",j,k;j="undefined"!=typeof imgMinWidth?imgMinWidth||60:60;k="undefined"!=typeof imgMinHeight?imgMinHeight||60:60;var l=function(){if(document.charset)return document.charset.toUpperCase();for(var a=document.getElementsByTagName("meta"),d=0;d<a.length;d++){var b=a[d];if(b.getAttribute("charset"))return b.getAttribute("charset");if(b=
b.getAttribute("content")){var b=b.toLowerCase(),c=b.indexOf("charset=");if(-1!=c)return a=b.indexOf(";",c+8),-1!=a?b.substring(c+8,a):b.substring(c+8)}}return""}();window.rrShareOnclick=function(a){a=a||{};a.api_key=a.api_key||"";a.resourceUrl=a.resourceUrl||h;a.title=a.title||"";a.pic=a.pic||"";a.description=a.description||"";h==a.resourceUrl&&(a.images=a.images||i);a.charset=a.charset||l||"";var d=[],b;for(b in a)a[b]&&d.push(b+"="+encodeURIComponent(a[b]));b="http://widget.renren.com/dialog/share?"+
d.join("&");if(b.length>(f?2048:4100)){window.open("about:blank","fwd","width=700,height=650,left=0,top=0,resizable=yes,scrollbars=1");b=document.createElement("form");b.action="http://widget.renren.com/dialog/share";b.target="fwd";b.method="POST";b.acceptCharset="UTF-8";for(var c in a)if(d=a[c],null!==d&&void 0!==d){var e=document.createElement("textarea");e.name=c;e.value=d;b.appendChild(e)}c=document.getElementById("renren-root-hidden");c||(c=document.createElement("div"),syl=c.style,syl.positon=
"absolute",syl.top="-10000px",syl.width=syl.height="0px",c.id="renren-root-hidden",(document.body||document.getElementsByTagName("body")[0]).appendChild(c));c.appendChild(b);try{c=null,f&&"UTF-8"!=document.charset.toUpperCase()&&(c=document.charset,document.charset="UTF-8"),b.submit()}finally{b.parentNode.removeChild(b),c&&(document.charset=c)}}else window.open(b,"fwd","width=700,height=650,left=0,top=0,resizable=yes,scrollbars=1");return!1};var e=function(){if(!(Renren.share.isReady||"complete"!==
document.readyState)){for(var a=document.getElementsByTagName("img"),d=[],b=0;b<a.length;b++)a[b].width>=j&&a[b].height>=k&&d.push(a[b].src);window.rrShareImgs=d;0<d.length&&(i=d.join("|"));document.addEventListener?document.removeEventListener("DOMContentLoaded",e,!1):document.detachEvent("onreadystatechange",e);a=document.createElement("link");a.rel="stylesheet";a.type="text/css";a.href="http://xnimg.cn/xnapp/share/css/v2/rrshare.css";(document.getElementsByTagName("head")[0]||document.body).appendChild(a);
d=(a=document.getElementsByName("xn_share"))?a.length:0;for(b=0;b<d;b++){var c=a[b];if(!c.rendered){c.paramIndex=b;var f=(c.getAttribute("type")||"button").split("_");c.innerHTML=['<span class="xn_share_wrapper ',"xn_share_"+("icon"==f[0]?"icon":"button")+"_"+(f[1]||"small"),'"></span>'].join("");c.rendered=!0}}Renren.share.isReady=!0}};"complete"===document.readyState?e():document.addEventListener?(document.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",e,!1)):(document.attachEvent("onreadystatechange",
e),window.attachEvent("onload",e))});
