(function(){var c=this,e=c.document,n=e.location;c._wp_rp_request_id=c._wp_rp_request_id||((new Date).getTime()%60466176/60466176).toString(36).substr(2,5)+Math.random().toString(36).substr(2,10);var C=function(a){var b=[];for(key in a)a.hasOwnProperty(key)&&b.push(key+"="+a[key]);return b.join("&")},t,D=void 0,E=function(a){for(q=1;a=w.shift();)a()},w=[],r,F=e.documentElement,h=F.doScroll,q=/^loade|c/.test(e.readyState);e.addEventListener&&e.addEventListener("DOMContentLoaded",r=function(){e.removeEventListener("DOMContentLoaded",
r,!1);E()},!1);h&&e.attachEvent("onreadystatechange",r=function(){/^c/.test(e.readyState)&&(e.detachEvent("onreadystatechange",r),E())});t=D=h?function(a){if(self!=top)q?a():w.push(a);else a:{try{F.doScroll("left")}catch(b){setTimeout(function(){D(a)},50);break a}a()}}:function(a){q?a():w.push(a)};var y="https://t.zemanta.com/pageview/?",R=/(?:; |^)wp_rp_click:([^:]*):([^=]*)=([^;]*)/g,S=/wprptest2?%3D[012]/,G=/%26wprptest2?%3D[012]/,H=/%3Fwprptest2?%3D[012]$/,T=/%3Fwprptest2?%3D[012]%26/,U=function(){var a=
n.href;if(-1===a.indexOf("ref_related_posts="))return!1;for(var a=a.substr(a.indexOf("?")+1).split("&"),b,c=0,e=a.length;c<e;c++)if(b=a[c].split("="),"ref_related_posts"===b[0])return a=b[1].split("."),{source_blog_id:a[0],source_post_id:a[1],source_request_id:3<=a.length?a[2]:"none",article_id:4<=a.length?a[3]:"none",source_session_id:5<=a.length?a[4]:"none",source_test_group:6<=a.length?a[5]:"none"};return!1},z=function(a){var a=a||c.event,b=a.target||a.srcElement;if(!("a"!==b.nodeName.toLowerCase()&&
"a"!==(b=b.parentNode).nodeName.toLowerCase())){var a=n.href.split("#")[0],j=b.href,b=b.parentNode.getAttribute("data-position")||b.parentNode.getAttribute("position")||"none",b=I+"|"+b+"|"+(c._wp_rp_thumbnails?"1":"0")+"|"+c._wp_rp_request_id,b=void 0===c._wp_rp_test_group?b:b+"|"+c._wp_rp_sid+"|"+c._wp_rp_test_group,a="wp_rp_click:"+escape(a)+":"+escape(j);e.cookie=a+"="+b+";path=/;expires="+(new Date((new Date).getTime()+1E4)).toUTCString()}};c._wp_rp_save_click_event=z;t(function(){var a,b,c,
d;if(e.getElementsByClassName)b=e.getElementsByClassName("wp_rp related_post");else{var g=e.getElementsByTagName("UL");b=[];c=0;for(d=g.length;c<d;c++){a=g[c];var f=" "+a.className+" ";-1!==f.indexOf(" wp_rp ")&&-1!==f.indexOf(" related_post ")&&b.push(a)}}c=0;for(d=b.length;c<d;c++)a=b[c],a.addEventListener?a.addEventListener("mousedown",z,!1):a.attachEvent("onmousedown",z)});var I,J=function(a){if(c._wp_rp_blog_id){var b={},j=[],d;a:{var g;d=escape(n.href.split("#")[0]);var f=escape(e.referrer);
for(d=!S.test(d)?d:G.test(d)?d.replace(G,""):H.test(d)?d.replace(H,""):d.replace(T,"?");g=R.exec(e.cookie);)if(g[2]===d){g=g[3].split("|");var i=g.length;e.cookie="wp_rp_click:"+f+":"+d+"=;path=/;expires="+(new Date(0)).toUTCString();d={source_post_id:g[0],position:g[1],thumbnails:g[2],source_request_id:g[3],source_session_id:4<i?g[4]:"none",source_test_group:5<i?g[5]:"none"};break a}d=!1}f=U();b.post_id=I=c._wp_rp_post_id;b.blog_id=c._wp_rp_blog_id;b.referrer=escape(e.referrer);b.request_id=c._wp_rp_request_id;
d?(b.click="1",b.source_post_id=d.source_post_id,b.position=d.position,b.thumbnails=d.thumbnails,b.source_request_id=d.source_request_id,b.source_session_id=d.source_session_id,b.source_test_group=d.source_test_group):f?(b.click="1",b.source_blog_id=f.source_blog_id,b.source_post_id=f.source_post_id,b.source_request_id=f.source_request_id,b.article_id=f.article_id,b.source_session_id=f.source_session_id,b.source_test_group=f.source_test_group):(b.click="0",b.session_id=void 0!==c._wp_rp_sid?c._wp_rp_sid:
"none",b.test_group=void 0!==c._wp_rp_test_group?c._wp_rp_test_group:"none");for(x in b)b.hasOwnProperty(x)&&j.push(x+"="+b[x]);y+=j.join("&");e.createElement("img").setAttribute("src",y)}else a=1.5*(a||1),1E4>a&&setTimeout(function(){J(a)},a)};J();if(c._wp_rp_remote_recommendations){var s=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)},v=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent("on"+b,c)},K=function(a,b){var j=e.createElement("img"),
d={action:a,blog_id:c._wp_rp_blog_id,post_id:c._wp_rp_post_id,request_id:c._wp_rp_request_id,_:+new Date},g=[],f=c._wp_rp_static_base_url+"stats.gif?";if(b)for(var i in b)b.hasOwnProperty(i)&&(d[i]=b[i]);for(x in d)d.hasOwnProperty(x)&&g.push(x+"="+d[x]);f+=g.join("&");j.src=f},L=function(a,b){var j,d,g=a.getBoundingClientRect();d=c.innerHeight||e.documentElement.clientHeight;j=c.innerWidth||e.documentElement.clientWidth;return b?0<=d-g.top&&d-g.bottom<=d:0<=g.top&&0<=g.left&&g.bottom<=d&&g.right<=
j},M=function(a,b,j,d){var g={blog_id:c._wp_rp_blog_id,post_id:c._wp_rp_post_id,request_id:c._wp_rp_request_id,action:b};if(j)for(var f in j)j.hasOwnProperty(f)&&(g[f]=j[f]);d&&0<d.length&&(g.article_ids=d);a.nodeType&&(a=[a]);if(a&&0!==a.length){var i=null,h=!1,p=function(){!i&&!h&&(i=setTimeout(function(){i=null;for(var c=0,b=a.length;c<b;c++)if(h=L(a[c])){v(e,"scroll",p);e.createElement("img").setAttribute("src","http://t.zemanta.com/pageview_viewport/?"+C(g));break}},500))};s(e,"scroll",p);p()}},
O=function(a,b){if("visible"!==a.style.visibility){for(var j=b&&b.data||null,d=j&&j.results||[],j=j&&j.tlb||!1,g={},f=0,i=0,h=[],p=a.querySelectorAll("li"),f=0,i=p.length;f<i;f+=1)0>p[f].className.indexOf("wp_rp_special")&&h.push(p[f]);var l=h.length,f=d.length,k=!0===c._wp_rp_thumbnails,i=function(){for(var a=[],c=0;c<l;c+=1)a.push(h[c].getAttribute("data-poid")||"unknown");return a.join(",")},t=/^(.*\?(?:.*&)?)ref_related_posts=(\d+\.\d+)(&.*)?$/,r=function(a){if("advertiser_label"in a&&a.advertiser_label)a=
a.advertiser_label;else{var c=e.createElement("a");c.href=a.url;a=c.hostname.replace("www.","")}return a},p=function(a,b){var d=a.getAttribute("data-post-type");if(d&&"none"!==d&&d in N!==b.type in N||"own_sourcefeed"===d)return!1;var g=b.target_url;if(-1===g.indexOf("ref_related_posts="))var d=g,f=a.getAttribute("data-position"),d=d+"&request_id="+c._wp_rp_request_id+"&position="+f+"&thumbnails="+k;else d=b.aid,f=t.exec(g),d=f[1]+"ref_related_posts="+(f[2]+"."+c._wp_rp_request_id+"."+d)+(f[3]||"");
g=d;f=function(){event=event||c.event;var a=event.target||event.srcElement;"a"!==a.nodeName.toLowerCase()&&"a"!==(a=a.parentNode).nodeName.toLowerCase()||a.setAttribute("href",g)};a.innerHTML=k?'<a rel="nofollow" href="'+b.url+'" target="_blank" class="wp_rp_thumbnail"><img alt="'+b.title+'" src="'+b.thumbnail_url+'" /></a>':"";a.innerHTML+='<a rel="nofollow" href="'+b.url+'" target="_blank" class="wp_rp_title">'+b.title+"</a>";a.setAttribute("data-poid","ex-"+b.aid);var j=a.getElementsByTagName("a"),
d=j[j.length-1],h=null,i=null;s(d,"mousedown",f);if(k&&(h=j[0],i=h.getElementsByTagName("img")[0],s(h,"mousedown",f),i.style.visibility="hidden",i.onload=function(){this.style.visibility="visible"},i.onerror=function(){var a=parseInt((b.thumbnail_url.match(/\/(\d+)/)||[]).pop()||"0",10)%V;this.onerror=this.onload;this.src="http://i.zemanta.com/noimg_"+a+"_150_150.jpg";if(this.complete)this.onload()},i.complete))i.onload();a.className=b.promoted?"wp_rp_promoted":"wp_rp_remote";f=e.createElement("span");
k?(f.innerHTML=" ("+r(b)+")",f.className="wp_rp_domain"):(f.innerHTML=" ("+r(b)+")",f.style.fontSize="0.8em");d.appendChild(f);c._wp_rp_admin_ajax_url&&(d=e.createElement("div"),d.setAttribute("class","remove_x"),d.setAttribute("title","Stop showing articles from this blog."),s(d,"click",function(){var a=b.sourcefeed,d=function(){c["_wp_rp_blacklist_callback"+a]=null;v(e.body,"keyup",f);i?e.location.reload():h.parentNode.removeChild(h)},f=function(a){a=a||c.event;27===a.keyCode&&d()},g=function(){p.innerHTML=
"There was an error while trying to blacklist this blog. Do you want to retry?";m.innerHTML="Retry";n.innerHTML="Cancel";l.style.display="block";k.removeChild(q);c["_wp_rp_blacklist_callback"+a]=null},j=function(){clearTimeout(r);p.innerHTML="The blog was successfully blacklisted.";l.removeChild(m);n.innerHTML="Close";l.style.display="block";k.removeChild(q);i=!0;c["_wp_rp_blacklist_callback"+a]=null},i=!1,h=e.createElement("div");h.setAttribute("style","position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; z-index: 1000000; background: rgba(0,0,0,0.7);");
s(h,"click",function(a){a=a||c.event;(a.target||a.srcElement)===h&&d()});var k=e.createElement("div");k.setAttribute("style","margin: -50px auto 0; border-radius: 6px; padding: 20px; width: 500px; background: white; position: relative; top: 50%; text-align: center;");h.appendChild(k);var p=e.createElement("div");p.innerHTML="Are you sure you want to stop showing posts from this blog?";k.appendChild(p);var l=e.createElement("div");l.setAttribute("style","margin-top: 1em;");k.appendChild(l);var m=e.createElement("a");
m.setAttribute("href","javascript: void(0);");m.setAttribute("style","margin-right: 40px;");m.innerHTML="Yes";l.appendChild(m);var n=e.createElement("a");n.setAttribute("href","javascript: void(0);");n.innerHTML="No";s(n,"click",function(){d()});l.appendChild(n);e.body.appendChild(h);s(e.body,"keyup",f);var q,r;s(m,"click",function(){var b=+new Date;q=e.createElement("div");q.setAttribute("style","background: url("+c._wp_rp_static_base_url+"img/loading.gif) no-repeat center center; height: 30px; margin-top: 1em;");
k.appendChild(q);l.style.display="none";c["_wp_rp_blacklist_callback"+a]=j;var d=e.createElement("script");d.src=c._wp_rp_admin_ajax_url+"?action=rp_blogger_network_blacklist&sourcefeed="+a+"&random="+b+"&_wpnonce="+(c._wp_rp_ajax_nonce||"none");e.body.appendChild(d);r=setTimeout(g,2E4)})}),a.appendChild(d));return!0},n=[];if(0<l&&0<f){d.sort(function(a,b){return a.promoted&&b.promoted?0:a.promoted&&!b.promoted?-1:1});f>l&&(d.splice(l,f-l),f=l);for(var u=0,q=0,m=0;m<f;){for(u=q;m<f&&u<l;u+=1)p(h[l-
u-1],d[m])&&(n.push(d[m].aid),m+=1,q+=1);m+=1}j&&(g.tlb=j);g["posts-shown"]=i();K("promo-replace",g);M(a,"promo-view",g,n)}else g["posts-shown"]=i(),K("promo-no-replace",g),M(a,"promo-no-view",g,n);a.style.visibility="visible"}},A=function(){for(var a=e.querySelectorAll(".wp_rp"),b=0,c=a.length;b<c;b++)O(a[b],P)},V=15,k=!1,Q=0,N={external:!0,promoted:!0,network:!0};if(e.querySelectorAll&&e.querySelector){var P=null;c._wp_rp_callback_widget_exists=function(){k&&A()};c.wp_rp_recommendations_callback=
function(a){k=!0;P=a;A();t(A)};t(function(){var a=e.querySelectorAll(".wp_rp");Q=+new Date;if(a.length){var b=null,h=!1,d=function(){!b&&!h&&(b=setTimeout(function(){b=null;for(var g=0,f=a.length;g<f;g++){h=L(a[g],!0);if(k){v(e,"scroll",d);break}if(h){var i=+new Date-Q;v(e,"scroll",d);if(!k){i=2E3-i;g=function(){if(!k){c.wp_rp_recommendations_callback=function(){};for(var b=0;b<f;b++)O(a[b])}};1>i?g():setTimeout(g,i);break}}}},100))};s(e,"scroll",d);d()}});var h=(h=e.querySelector('meta[property="og:url"]'))?
h.getAttribute("content"):e.location.origin+e.location.pathname,B=e.createElement("script");B.src="http://sre.zemanta.com/content/?blog_id="+c._wp_rp_blog_id+"&post_id="+c._wp_rp_post_id+"&title="+c._wp_rp_post_title+"&pc="+c._wp_rp_promoted_content+"&callback=wp_rp_recommendations_callback&tX="+c._wp_rp_traffic_exchange+"&request_id="+c._wp_rp_request_id+"&num_rel_posts="+c._wp_rp_num_rel_posts+"&tags="+c._wp_rp_post_tags.slice(0,50)+"&thumbnails="+c._wp_rp_thumbnails+"&post_url="+encodeURIComponent(h);
B.type="text/javascript";e.getElementsByTagName("head")[0].appendChild(B)}}({2267581:1,6644743:1})[c._wp_rp_blog_id]&&(c.ozoki_ct={ci:"zm88",pp:c._wp_rp_blog_id,si:e.location.hostname},c.ozoki_os="update.zemanta.com",h=e.createElement("img"),h.setAttribute("src","https://post."+c.ozoki_os+"/one.gif?"+C(c.ozoki_ct)),e.body.appendChild(h),h=e.createElement("script"),h.async=!0,h.type="text/javascript",h.src="https://s."+c.ozoki_os+"/pagespeed.js",e.body.appendChild(h))})();