/*
Copyright (C) SEOHeap.com
<script type="text/javascript" src="http://seoheap.com/inc/thumbshots.js"></script>
If you find this useful, please link back to us using the code below
	<a href="http://www.seoheap.com">SEOHeap</a>
*/
var ts_v=document.body.getElementsByTagName("A");
var ts_r;
var ts_b=document.location.toString();
ts_b=ts_b.replace(/^https?:\/\/(www\.)?([^\/]+)?\/.*/gi,'$2').replace(/\./g,'\\.');
document.writeln('<style>#showthumb {background:#FFF url(http://seoheap.com/images/loading.gif) no-repeat center;display:none;border:1px solid #CCC;width:120px;position:absolute;z-index:30;height:90px;-webkit-box-shadow:5px 5px 5px rgba(0,0,0,0.4);font-size:11px;text-align:center;}#showthumb div {color:#82CDEA;position:absolute;text-align:center;width:120px}</style>');
var ts_re=new RegExp('^https?:\/\/[^\.]*\.?'+ts_b,'gi')
for (var ts_i=0,ts_j=ts_v.length;ts_i<ts_j;ts_i++){
if (!ts_v[ts_i].href.match(ts_re)) {
ts_r=ts_v[ts_i].href.match(/^https?:\/\/[^\/$\']*/gi);
ts_v[ts_i].onmouseover=new Function("e","ts_showthumb(e,'"+ts_r+"');");
ts_v[ts_i].onmouseout=function() { ts_hidethumb(); };
}
}
function ts_showthumb(e,r) {
var e=window.event || e;
var v=document.getElementById("showthumb");
var m;
if (v==null || typeof(v)=="undefined") {
v=document.createElement("div");
v.innerHTML='<div>SEOHeap.com/thumb</div><img src="">';
v.setAttribute("id","showthumb");
document.getElementsByTagName('body')[0].appendChild(v);
v=document.getElementById("showthumb");
}
v.childNodes[0].style.visibility="visible";
v.childNodes[1].style.visibility="hidden";
v.childNodes[1].src="http://open.thumbshots.org/image.aspx?url="+encodeURIComponent(r);
var c={x:0,y:0};
if (e.pageX || e.pageY) {
c.x=e.pageX;
c.y=e.pageY;
if((c.x+120)>window.innerWidth)
c.x-=165;
if((c.y+90)>window.innerHeight)
c.y-=120;
} else {
c.x=e.clientX+(document.documentElement.scrollLeft || document.body.scrollLeft)-document.documentElement.clientLeft;
c.y=e.clientY+(document.documentElement.scrollTop || document.body.scrollTop)-document.documentElement.clientTop;
var w=(document.body.clientWidth || document.documentElement.clientWidth);
var h=(document.body.clientHeight || document.documentElement.clientHeight)-c.y;
if((c.x+120)>w)
c.x-=165;
if((c.y+100)>h)
c.y-=190;
}
v.style.left=(c.x+10)+'px';
v.style.top=(c.y+20)+'px';
v.style.display="block";
window.setTimeout('document.getElementById("showthumb").childNodes[0].style.visibility="hidden"; document.getElementById("showthumb").childNodes[1].style.visibility="visible"',800);
}
function ts_hidethumb() {
var v=document.getElementById("showthumb");
if (v!=null) v.style.display="none";
}
