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