var verselink_process,verselink_result,result;window.onload=function(){(function(){function a(a,b){var c=document.createElement("script");c.type="text/javascript",c.readyState?c.onreadystatechange=function(){if(c.readyState=="loaded"||c.readyState=="complete")c.onreadystatechange=null,b&&b()}:c.onload=function(){b&&b()},c.src=a,document.body.appendChild(c)}function A(a){var g,h,i,j;h=regex.exec(a.data);if(h){if(a.parentNode.tagName=="A"||a.parentNode.tagName=="SCRIPT")return!1;j=a.splitText(h.index),j.splitText(h[0].length),x=h[0],g=a.ownerDocument.createElement("a");var k=c+"/query?utf=8%E2%9C%93&query="+escape(x)+"&translation="+escape(f);d&&(k+="&redirect_iframe="+d),g.setAttribute("href",k),g.setAttribute("target","_blank"),g.addEventListener?g.addEventListener("mouseover",function(a){v=a.pageX,w=a.pageY,z=g,e=setTimeout(function(){B(a,h[0])},b)}):g.attachEvent?g.attachEvent("onmouseover",function(a){v=a.clientX,w=a.clientY,z=g,e=setTimeout(function(){B(a,h[0])},b)}):g.onmouseover=function(a){v=a.clientX,w=a.clientY,z=g,e=setTimeout(function(){B(a,h[0])},b)},g.onmouseout=function(){clearTimeout(e)},a.parentNode.replaceChild(g,j),g.appendChild(j)}}function B(a,b){u&&(document.getElementById(u).style.display="none"),u=b.replace(/ /g,""),d=document.getElementById(u);if(!d){var d,e;d=document.createElement("div"),d.className="ebible-passage-popup",d.id=u,d.width="275px !important;",document.body.appendChild(d),popup_body=document.createElement("div"),popup_body.innerHTML="<img src="+c+"/images/ajax-loader.gif />",d.appendChild(popup_body),C(b)}D()}function C(a){var b,e;e=c+"/verselink?utf=8%E2%9C%93&query="+a+"&verselink=true&callback=verselink_result&verselink_translation="+escape(f),d&&(e+="&iframe_url="+d),b=document.createElement("script"),b.src=e,b.type="text/javascript",document.body.appendChild(b)}function D(){var a=u;a=document.getElementById(u);if(!a)return!1;a.style.display="block",a.style.left=0,a.style.top=0;var b=20,c=0,d=document.body.clientWidth;d-v<a.offsetWidth+30?b=v-b-a.offsetWidth-30:b+=v,w=E(z),a.style.left=v.toString()+"px",a.style.top=w.toString()+"px"}function E(a){var b=0;if(a.offsetParent)for(;;){b+=a.offsetTop;if(!a.offsetParent)break;a=a.offsetParent}else a.y&&(b+=a.y);return b}function F(){var a,b,c,d,e,f,g,h;f=document.getElementById(u),a=f.getElementsByTagName("*");for(var i=0;i<a.length;i++)a[i].className=="vl-link"&&(g=a[i].href);g&&(c=document.createElement("fb:like"),c.setAttribute("href",g),c.setAttribute("send",!1),c.setAttribute("width","100"),c.setAttribute("show_faces","false"),c.setAttribute("layout","button_count"),c.setAttribute("style","margin: 4px 0 0 12px"),c.setAttribute("action","recommend"),document.getElementById(u).firstChild.appendChild(c),document.getElementById(u).innerHTML+='<div class="ebible-clear"></div>',FB.XFBML.parse(document.getElementById(u))),g||(g="http://ebible.com/bible/not_found"),d=document.createElement("script"),d.type="text/javascript",h=g.replace("http://ebible.com/",""),e="try{",e+='var pageTracker = _gat._createTracker("UA-19550895-1");',e+='pageTracker._setDomainName("ebible.com");',e+='pageTracker._trackPageview("'+h+'?verselink=1");',e+="} catch(err) {}",d.text=e,document.body.appendChild(d),document.getElementById(u).innerHTML+='<p id="popup-meta">Powered by <a href="http://ebible.com">eBible.com</a></p>'}var b,c,d,e,f;b=200,c="http://ebible.com",params={},f="ESV";var g=document.getElementsByTagName("script");for(var h=0;h<g.length;h++){var i,j,k,l,m;m=g[h].src.search(/ebible.verselink|verselink|ebibleicious/);if(m>=0){k=g[h],i=k.src.match(/iframe_url=(.*)/),i&&i.length>0&&(d=i[1]),j=k.src.split("?").pop().split("&");for(var n=0;n<j.length;n++){var o;o=j[n].split("="),params[o[0]]=o[1]}}}params.translation&&params.translation!=f&&(f=params.translation);if(document.createStyleSheet)document.createStyleSheet(c+"/assets/ministry/verselink.css");else{var p=document.createElement("link");p.type="text/css",p.rel="stylesheet",p.href=c+"/assets/ministry/verselink.css",document.getElementsByTagName("head")[0].appendChild(p)}var q,r,s;s=document.createElement("div"),s.id="fb-root",document.body.appendChild(s),q=document.createElement("script"),r="FB.init({",r+="appId  : 278638678822700,",r+="status : true,",r+="cookie : true,",r+="xfbml  : true,",r+="channelURL : 'http://www.ebible.com/channel.html',",r+="oauth  : true",r+="});",q.text=r,a("http://connect.facebook.net/en_US/all.js#xfbml=1",function(){document.body.appendChild(q)});var t=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";a(t),verselink_process=function(){var a,b,c;a="Genesis|Exodus|Leviticus|Numbers|Deuteronomy|Joshua|Judges|Ruth|1 Samuel|2 Samuel|1 Kings|2 Kings|1 Chronicles|2 Chronicles|Ezra|Nehemiah|Esther|Job|Psalms|Proverbs|Ecclesiastes|Songs of Solomon|Song of Solomon|Isaiah|Jeremiah|Lamentations|Ezekiel|Daniel|Hosea|Joel|Amos|Obadiah|Jonah|Micah|Nahum|Habakkuk|Zephaniah|Haggai|Zechariah|Malachi|Matthew|Mark|Luke|John|Acts|Romans|1 Corinthians|2 Corinthians|Galatians|Ephesians|Philippians|Colossians|1 Thessalonians|2 Thessalonians|1 Timothy|2 Timothy|Titus|Philemon|Hebrews|James|1 Peter|2 Peter|1 John|2 John|3 John|Jude|Revelations|Revelation",a+="Gen|Ge|Gn|Exo|Ex|Exod|Lev|Le|Lv|Num|Nu|Nm|Nb|Deut|Dt|De|Josh|Jos|Jsh|Judg|Jdg|Jg|Jdgs|Rth|Ru|1 Sam|1 Sa|1Samuel|1S|1 Sa|1 Sm|1Sa|1 Sam|1Sam|1 Samuel|1st Samuel|First Samuel|2 Sam|2 Sa|2S|II Sa|2 Sm|2Sa|II Sam|2Sam|II Samuel|2Samuel|2nd Samuel|Second Samuel|1 Kgs|1 Ki|1K|1Kgs|1 Ki|1Ki|I Kings|1Kings|1st Kgs|1st Kings|1Kin|2 Kgs|2Ki|2K|IIKgs|2Kgs|II Ki|2Ki|II Kings|2Kings|2st Kgs|2st Kings|Second Kings|Second Kgs|2Kin|1 Chron|1 Ch|1Ch|1 Chr|I Chr|I Chron|1Chron|1 Chronicles|1Chronicles|1st Chronicles|First Chronicles|2 Chron|2 Ch|II Ch|2Ch|2 Chr|2Chr|II Chr|II Chron|2Chron|II Chronicles|2Chronicles|2nd Chronicles|Second Chronicles|Ezr|Neh|Ne|Esth|Es|Jb|Pslm|Ps|Psalm|Psa|Psm|Pss|Prov|Pr|Prv|Eccl|Eccle|Ec|Qoh|Qoheleth|Song|So|Song of Songs|Song of Song|SOS|Isa|Is|Jer|Je|Jr|Lam|La|Ezek|Eze|Ezk|Dan|Da|Dn|Ho|Hos|Joe|Jl|Am|Obad|Ob|Jnh|Jon|Mic|Nah|Na|Hab|Zeph|Zep|Zp|Hag|Hg|Zech|Zec|Zc|Mal|Ml|Matt|Mat|Mt|Mrk|Mk|Mr|Luk|Lk|Lu|Jn|Jhn|Ac|Rom|Ro|Rm|1 Cor|Co|1Co|I Cor|1Cor|I Corinthians|1Corinthians|1st Corinthians|First Corinthians|2 Cor|2 Co|II Co|2 Co|2Co|II Cor|2Cor|II Corinthians|2Corinthians|2nd Corinthians|Second Corinthians|Gal|Ga|Ephes|Eph|Phil|Php|Col|1 Thess|1 Th|1Th|1 Thes|1Thes|I Thes|1Thess|I Thessalonians|1Thessalonians|1st Thessalonians|First Thessalonians|2 Thess|2 Th|2Th|2 Thes|2Thes|II Thess|2Thess|II Thessalonians|2Thessalonians|2nd Thessalonians|Second Thessalonians|1 Tim|1 Ti|1Ti|I Tim|1Tim|I Timothy|ITimothy|1st Timothy|First Timothy|2 Tim|2 Ti|2Ti|II Tim|2Tim|II Timothy|IITimothy|2nd Timothy|Second Timothy|Tit|Philem|Phm|Heb|Jas|Jm|Jam|Jms|1 Pet|1 Pe|1Pe|I Pet|1Pet|I Pt|1Pt|I Peter|1Peter|1st Peter|First Peter|2 Pet|2Pe|II Pe|2Pe|II Pet|2Pet|II Pt|2 Pt|2Pt|II Peter|2Peter|2nd Peter|Second Peter|1 Jn|I Jn|1Jn|I Jo|1Jo|I Joh|1Joh|I Jhn|1 Jhn|1Jhn|I John|1 John|1John|1st John|First John|2Joh|II Jhn|2 Jhn|2Jhn|II John|2 John|2John|2nd John|Second John|3Joh|III Jhn|3 Jhn|3Jhn|III John|3 John|3John|3rd John|Third John|Jud|Rev|Re",regex="\\b("+a+")\\s+\\d+(:\\d+)?(?:\\s?[-&]\\s?\\d+)?(:\\d+)?",regex=new RegExp(regex,"g");var d,e,f,g,h,i;e=[],i=document.body;var j=0;d=i,h=null;do{j++,h=d.firstChild,h==null&&(d.nodeType==3&&A(d),h=d.nextSibling);if(h==null){var k=d;do{h=k.parentNode;if(h==i)break;h.nodeType==3&&A(d),k=h,h=h.nextSibling}while(h==null)}d=h}while(d!=i&&j<=1e3)},verselink_process();var u,v,w,x,y,z;verselink_result=function(a){var b,c;b=document.getElementById(u),c=b.firstChild,c.innerHTML=a,F(),D()},document.body.onclick=function(){u&&(document.getElementById(u).style.display="none")}})()}
