(function() { window.addEventListener('resize', function(ev) { BLB.Images.vpW = BLB.getViewportWidth(); var thumbsCount = Math.floor(BLB.Images.vpW/BLB.Images.thumbWidth)-2; thumbsCount = (thumbsCount%2?thumbsCount:thumbsCount-1); if(thumbsCount != BLB.Images.thumbsCount) { for(var tmpThumbsCount=BLB.Images.thumbsCount;tmpThumbsCount<=thumbsCount;tmpThumbsCount+=2) { var thumbsHalfway = Math.ceil(tmpThumbsCount/2); if(BLB.Images.imgListHalfway-thumbsHalfway-BLB.Images.thumbDistance+1 >= 0) BLB.Images.prefetchThumbnail(BLB.Images.imgListHalfway-thumbsHalfway-BLB.Images.thumbDistance+1); if(BLB.Images.imgListHalfway+thumbsHalfway+BLB.Images.thumbDistance-1 < BLB.Images.imgList.length) BLB.Images.prefetchThumbnail(BLB.Images.imgListHalfway+thumbsHalfway+BLB.Images.thumbDistance-1); } BLB.Images.windowShift((thumbsCount-BLB.Images.thumbsCount)/2); BLB.Images.thumbsCount = thumbsCount; BLB.Images.setCarouselWindowWidth(); } }); BLB.Images = { currentThumb: null, currentImgId: null, thumbsCount: 0, thumbDistance: 3, thumbWidth: 69, imgListHalfway: 0, carouselClick: false, callBackStack: [], galleryName: "Esther", imgList: [803,804,805,806,807,808,809,811,812,813,814,815,816,817,818,819,820,821,822,823,1181,1219,1220,1270,1446,1482,1484,1504,2260,2340], cropped: {img_803:'hs2_301_a.jpg',img_804:'lb2est_3_1_a.jpg',img_805:'lb2est_5_1_a.jpg',img_806:'hs2_302_a.jpg',img_807:'hs2_303_a.jpg',img_808:'hs2_304_a.jpg',img_809:'hs2_305_a.jpg',img_811:'LLS_009_a.jpg',img_812:'LLS_037_a.jpg',img_813:'llh_067_a.jpg',img_814:'llh_070_a.jpg',img_815:'llh_116_a.jpg',img_816:'llh_205_1_a.jpg',img_817:'llh_205_2_a.jpg',img_818:'llh_233_a.jpg',img_819:'llh_288_a.jpg',img_820:'llh_319_a.jpg',img_821:'llh_321_a.jpg',img_822:'llh_354_a.jpg',img_823:'llh_412_a.jpg',img_1181:'jb_015_a.jpg',img_1219:'jh_035_a.jpg',img_1220:'jh_036_a.jpg',img_1270:'tgb_074a_a.jpg',img_1446:'OT_timeline2_a.jpg',img_1482:'wc_00bible_a.jpg',img_1484:'wc_00ot_a.jpg',img_1504:'wc_17est_a.jpg',img_2260:'illustration_27_babylon_a.jpg',img_2340:'map_17_01_a.jpg'}, thumbs: {img_803:'hs2_301_b',img_804:'lb2est_3_1_b',img_805:'lb2est_5_1_b',img_806:'hs2_302_b',img_807:'hs2_303_b',img_808:'hs2_304_b',img_809:'hs2_305_b',img_811:'LLS_009_b',img_812:'LLS_037_b',img_813:'llh_067_b',img_814:'llh_070_b',img_815:'llh_116_b',img_816:'llh_205_1_b',img_817:'llh_205_2_b',img_818:'llh_233_b',img_819:'llh_288_b',img_820:'llh_319_b',img_821:'llh_321_b',img_822:'llh_354_b',img_823:'llh_412_b',img_1181:'jb_015_b',img_1219:'jh_035_b',img_1220:'jh_036_b',img_1270:'tgb_074a_b',img_1446:'OT_timeline2_b',img_1482:'wc_00bible_b',img_1484:'wc_00ot_b',img_1504:'wc_17est_b',img_2260:'illustration_27_babylon_b',img_2340:'map_17_01_b'}, imgFull: {img_803:'hs2_301.jpg',img_804:'lb2est_3_1.jpg',img_805:'lb2est_5_1.jpg',img_806:'hs2_302.jpg',img_807:'hs2_303.jpg',img_808:'hs2_304.jpg',img_809:'hs2_305.jpg',img_811:'LLS_009.jpg',img_812:'LLS_037.jpg',img_813:'llh_067.jpg',img_814:'llh_070.jpg',img_815:'llh_116.jpg',img_816:'llh_205_1.jpg',img_817:'llh_205_2.jpg',img_818:'llh_233.jpg',img_819:'llh_288.jpg',img_820:'llh_319.jpg',img_821:'llh_321.jpg',img_822:'llh_354.jpg',img_823:'llh_412.jpg',img_1181:'jb_015.jpg',img_1219:'jh_035.jpg',img_1220:'jh_036.jpg',img_1270:'tgb_074a.jpg',img_1446:'OT_timeline2.jpg',img_1482:'wc_00bible.jpg',img_1484:'wc_00ot.jpg',img_1504:'wc_17est.jpg',img_2260:'illustration_27_babylon.jpg',img_2340:'map_17_01.jpg'}, imgPDF: {img_803:'',img_804:'',img_805:'',img_806:'',img_807:'',img_808:'',img_809:'',img_811:'',img_812:'',img_813:'',img_814:'',img_815:'',img_816:'',img_817:'',img_818:'',img_819:'',img_820:'',img_821:'',img_822:'',img_823:'',img_1181:'',img_1219:'',img_1220:'',img_1270:'',img_1446:'',img_1482:'wc_00bible.pdf',img_1484:'wc_00ot.pdf',img_1504:'wc_17est.pdf',img_2260:'',img_2340:''}, titles: {img_803:'Esther Wins the King\'s Favor',img_804:'Mordecai Doesn’t Bow to Haman',img_805:'Esther Obtains Favor in the Sight of the King',img_806:'Esther Comes before Ahasuerus',img_807:'Ahasuerus Decides to Reward Mordecai',img_808:'Mordecai\'s Triumph',img_809:'Haman Pleads for His Life',img_811:'Esther in the Presence of the King',img_812:'The Triumph of Mordecai',img_813:'Mordecai Honoured',img_814:'Esther and Ahasuerus',img_815:'Triumph of Mordecai',img_816:'Ahasuerus Crowning Esther',img_817:'Mordecai Advanced by Ahasuerus',img_818:'Reading the Book of the Records to King Ahasuerus',img_819:'Esther before Ahasuerus',img_820:'Esther Entering the King\'s Presents',img_821:'Esther before the King',img_822:'Mordecai Second to Ahasuerus',img_823:'Mordecai\'s Triumph',img_1181:'The Triumph of Mordecai',img_1219:'King Ahasuerus and Esther',img_1220:'The Triumph of Mordecai',img_1270:'The Empire of Persia',img_1446:'Old Testament Time Line (Part 2 of 2)',img_1482:'The Bible - Word Cloud',img_1484:'The Old Testament - Word Cloud',img_1504:'Esther - Word Cloud',img_2260:'The City of Babylon',img_2340:'The Persian Empire at the Time of Esther'}, paths: {img_803:'Est',img_804:'Est',img_805:'Est',img_806:'Est',img_807:'Est',img_808:'Est',img_809:'Est',img_811:'Est',img_812:'Est',img_813:'Est',img_814:'Est',img_815:'Est',img_816:'Est',img_817:'Est',img_818:'Est',img_819:'Est',img_820:'Est',img_821:'Est',img_822:'Est',img_823:'Est',img_1181:'brown_john',img_1219:'hewlett_john',img_1220:'hewlett_john',img_1270:'TheGraphicBible',img_1446:'rosepub',img_1482:'wordclouds',img_1484:'wordclouds',img_1504:'wordclouds',img_2260:'ESV-Global-Study-Bible',img_2340:'ESV-Global-Study-Bible'}, imgKeywords: {img_803:'Esther; Ahasuerus;',img_804:'Mordecai, Bow, Haman',img_805:'Esther, Favor, King',img_806:'Esther; Ahasuerus;',img_807:'Mordecai; Ahasuerus;',img_808:'Haman; Mordecai;',img_809:'Esther; Ahasuerus; Haman;',img_811:'Esther; Ahasuerus',img_812:'Mordecai; Haman; Robe; Horse; City ',img_813:'Mordecai; Haman; Ahasuerus;',img_814:'Esther; Ahasuerus;',img_815:'Mordecai; Haman;',img_816:'Esther; Ahasuerus;',img_817:'Mordecai; Ahasuerus;',img_818:'Ahasuerus; Mordecai; Haman; ',img_819:'Esther; Ahasuerus;',img_820:'Esther; Ahasuerus;',img_821:'Esther; Ahasuerus;',img_822:'Mordecai;',img_823:'Mordecai; Haman;',img_1181:'Mordecai; Haman;',img_1219:'Ahasuerus; Esther;',img_1220:'Mordecai;',img_1270:'Persia; Cyrus; Empire; Asia Minor; Thrace; Egypt; 525',img_1446:'Amos; Cyrus; David; Eli; Elijah; Elisha; Habakkuk; Haggai; Hezekiah; Hosea; Hoshea; Jeroboam; Jonah; Josiah; Judges; Malachi; Manasseh; Micah; Nahum; Nehemiah; Nineveh; Obadiah; Rebuilding the Temple; Ruth; Samuel; Saul; Solomon; Zechariah; Zephaniah',img_1482:'',img_1484:'',img_1504:'',img_2260:'Babylon; city; Cyrus; Euphrates River; Nebuchadnezzar',img_2340:'Assyrians; Babylonians; Esther; Haman; Israel; Judah; Persian Empire'}, imgScripture: {img_803:'Est 2:16-18',img_804:'Est 3:2-5',img_805:'Est 5:1-4',img_806:'Est 5:1-4',img_807:'Est 6:1-11',img_808:'Est 6:1-11',img_809:'Est 7:7-8',img_811:'Est 5:1-4',img_812:'Est 6:1-11',img_813:'Est 6:10-11',img_814:'Est 2:15-18',img_815:'Est 6:10-11',img_816:'Est 2:15-18',img_817:'Est 6:10-11',img_818:'Est 6:1-14',img_819:'Est 5:1-4',img_820:'Est 5:1-4',img_821:'Est 5:1-4',img_822:'Est 10:2-3',img_823:'Est 6:10-11',img_1181:'Est 6:11',img_1219:'Est 5:1-5',img_1220:'Est 6:1-12',img_1270:'2Ch 36:20-23; Ezr 1:1-8; Ezr 3:7; Ezr 4:3-24; Ezr 6:14; Ezr 7:1; Ezr 9:9; Est 1:1-18; Est 10:2; Eze 27:10; Eze 38:5; Dan 8:20; Dan 10:1-20;',img_1446:'Jdg 1-21; Rth 4:13; 1Sam 1-15; 2Sam 1-20; 2Ch 1-4; 2Ch 10; 2Ch 33; 1Ki 12; 1Ki 17-19; 1Ki 21; 2Ki 1-8; 2Ki 13; 2Ki 18-23; Ezr 1:1-4; Ezr 3:8-13; Ezr 4-6; Neh 1-13; Hos 1-14; Amo 1-9; Oba 1; Jon 1-4; Mic 1-7; Nah 1-3; Hab 1-3; Zep 1-3; Hag 1-2; Zec 1-14; Mal 1-4;',img_1482:'',img_1484:'',img_1504:'',img_2260:'2Ki 24:1, 10-11; 2Ki 25:1, 8, 22; 2Ch 36:6; Ezr 5:12; Est 2:6; Jer 21:2, 7; Jer 22:25; Jer 24:1; Jer 25:1; Jer 27:8, 20; Jer 28:3, 11, 14; Jer 29:3, 21; Jer 32:28; Jer 34:1; Jer 35:11; Jer 37:1; Jer 39:1, 5, 11; Jer 44:30; Jer 46:2, 13, 26; Jer 49:28, 30; Jer 50:17; Jer 52:4, 12; Eze 26:7; Eze 29:18-19; Eze 30:10; Dan 1:1',img_2340:'Esther'}, imgDescription: {img_803:'',img_804:'',img_805:'',img_806:'',img_807:'',img_808:'',img_809:'',img_811:'',img_812:'',img_813:'',img_814:'',img_815:'',img_816:'',img_817:'',img_818:'',img_819:'',img_820:'',img_821:'',img_822:'',img_823:'',img_1181:'',img_1219:'',img_1220:'',img_1270:'',img_1446:'',img_1482:'

These Bible word clouds feature the top 150 to 300 words used in the indicated section of Scripture.

',img_1484:'

These Bible word clouds feature the top 150 to 300 words used in the indicated section of Scripture.

',img_1504:'

These Bible word clouds feature the top 150 to 300 words used in the indicated section of Scripture.

',img_2260:'
Detailed study information about this image:
The City of Babylon
',img_2340:'
Detailed study information about this image:
The Persian Empire at the Time of Esther
'}, init: function() { if(BLB.blbIsLoaded) { YEvent.delegate("imgCarousel", "click", BLB.Images.onClickHndlr, "div"); YEvent.delegate("imgParade", "click", BLB.Images.onClickHndlr, "div.imgParBrowse"); YEvent.delegate("imgBody", "click", BLB.Images.onClickHndlr, "div"); YEvent.delegate("imgBody", "click", BLB.Images.onClickHndlr, "img"); YEvent.delegate("imgShareLinks", "click", BLB.Images.onClickHndlr, "img"); YEvent.delegate("imgLegend", "click", BLB.Images.onClickHndlr, "a[class=imgpop]"); lftRtArrow = new KeyListener(document, {shift:false, ctrl:false, alt:false, keys:[BLB.keyCodes.leftArrow, BLB.keyCodes.rightArrow]}, function(ev, evA) { if(evA[1].target.tagName == 'INPUT') return false; if(evA[1].target.tagName == 'TEXTAREA') return false; if(BLB.Images.imgList.length > 1) { var currentImg = document.querySelector('#' + BLB.Images.currentImgId); switch(evA[0]) { case BLB.keyCodes.leftArrow: var nextState = BLB.Images.thumbs[currentImg.previousSibling.id]; BLB.Images.historyNavigate(nextState); break; case BLB.keyCodes.rightArrow: var nextState = BLB.Images.thumbs[currentImg.nextSibling.id]; BLB.Images.historyNavigate(nextState); break; default: break; }; } }, 'keydown'); lftRtArrow.enable(); window.addEventListener('popstate', BLB.Images.popstateEventHandler); var state = BLB.Images.getBookmarkedState(); if(state.toLowerCase() == 'imagedisplay' && document.location.hash != '') { var h = document.location.hash.split(/=/)[1]; document.location.href = document.location.pathname + h; } var distance = 0; var thumbsCount = 0; var imgCount = BLB.Images.imgList.length; var imgListHalfway = Math.floor(imgCount/2); for(var thumb in BLB.Images.thumbs) { if(state == BLB.Images.thumbs[thumb]) { BLB.Images.currentThumb = state; BLB.Images.currentImgId = thumb; break; } distance++; } BLB.Images.vpW = BLB.getViewportWidth(); thumbsCount = Math.floor(BLB.Images.vpW/BLB.Images.thumbWidth)-2; BLB.Images.thumbsCount = (thumbsCount%2?thumbsCount:thumbsCount-1); BLB.Images.imgListHalfway = (imgCount%2?imgListHalfway:imgListHalfway-1); BLB.Images.setCarouselWidth(); BLB.Images.setCarouselWindowWidth(); var imgCarousel = document.querySelector('#imgCarousel'); imgCarousel.style.left = '-12px'; if(BLB.Images.imgListHalfway > distance) for(var i=0;i 1) { var nextState = BLB.Images.thumbs[currentImg.nextSibling.id]; BLB.Images.historyNavigate(nextState); } else if(matchedEl.id == 'imgNavL' && BLB.Images.imgList.length > 1) { var nextState = BLB.Images.thumbs[currentImg.previousSibling.id]; BLB.Images.historyNavigate(nextState); } else if(matchedEl.id == 'imgExact' || matchedEl.id == 'imgZoom') { var fullImg = BLB.Images.imgFull[BLB.Images.currentImgId]; var path = BLB.Images.paths[BLB.Images.currentImgId]; location.href = '/assets-v3/images/bibleMedia/' + path + '/' + fullImg; } break; case 'imgCarousel': if(BLB.Images.imgList.length > 1) if(matchedEl.classList.contains('imgParCenter')) { var nextState = BLB.Images.thumbs[currentImg.nextSibling.id]; BLB.Images.historyNavigate(nextState); } else { var nextState = BLB.Images.thumbs[matchedEl.id]; BLB.Images.historyNavigate(nextState); } break; case 'imgParade': if(BLB.Images.imgList.length > 1) if(matchedEl.id=='imgParBrowseRt') { var nextState = BLB.Images.thumbs[currentImg.nextSibling.id]; BLB.Images.historyNavigate(nextState); } else { var nextState = BLB.Images.thumbs[currentImg.previousSibling.id]; BLB.Images.historyNavigate(nextState); } break; case 'imgShareLinks': if (matchedEl.dataset !== undefined && matchedEl.dataset.sharer !== undefined) { var platform = matchedEl.dataset.sharer; if (platform == 'shareLink') { document.querySelector('#pageLink').click(); document.querySelector('#imgShareFeedback').innerHTML = "

Please click on the [COPY] button at the top of this page to copy a link to this image.
"; setTimeout(function() { document.querySelector('#imgShareFeedback').innerHTML = ""; }, 7000); } else if (platform == 'shareEmail') { var email=('<>'); var subject = ('An image from Blue Letter Bible'); var body = 'I wanted to share this wonderful image with you: '+window.location.href; var emailLink = document.createElement('a'); emailLink.href = 'mailto:' + email+'?subject=' +subject+'&body=' +body; emailLink.target = '_blank'; emailLink.click(); } else { BLB.sharePage(platform); } } break; case 'imgLegend': var linkName = matchedEl.rel; var param = location.href; var popupDiv = document.querySelector('#popupDiv'); document.querySelector('#popupDivContents').innerHTML = BLB.popupDivContents; popupDiv.classList.remove('hidden'); popupDiv.style.width = '500px'; BLB.setXY(matchedEl, popupDiv); BLB.toolTipPopup(linkName, param); YEvent.stopPropagation(ev); break; default: break; }; }, slideCarouselWindow: function(direction, count) { var thisThumb = document.querySelector('#' + BLB.Images.currentImgId); var nextThumb = (direction=='left' ? thisThumb.nextSibling : thisThumb.previousSibling); var thumbsHalfway = Math.ceil(BLB.Images.thumbsCount/2); var imgCarousel = document.querySelector('#imgCarousel'); var thumbWidth = parseInt(imgCarousel.style.width, 10); var thumbMarginLeft = parseInt(imgCarousel.style.marginLeft, 10); var windowDistance = 69 * (direction=='left'?-1:1); var imgCarouselLeft = parseInt(imgCarousel.style.left, 10); var imgCarouselKeyFrames = new KeyframeEffect(imgCarousel, [ { left: (imgCarouselLeft + windowDistance) + 'px' } ], 100 ); var imgCarouselKeyAnimation = new Animation(imgCarouselKeyFrames, document.timeline); imgCarouselKeyAnimation.addEventListener("finish", () => { imgCarouselKeyAnimation.commitStyles(); if(direction=='left') { imgCarousel.appendChild(imgCarousel.firstChild) BLB.Images.imgList.push(BLB.Images.imgList.shift()); if (thumbsHalfway+BLB.Images.thumbDistance <= BLB.Images.imgListHalfway) BLB.Images.prefetchThumbnail(BLB.Images.imgListHalfway+thumbsHalfway+BLB.Images.thumbDistance); } else { imgCarousel.insertBefore(imgCarousel.lastChild, imgCarousel.firstChild) BLB.Images.imgList.unshift(BLB.Images.imgList.pop()); if (thumbsHalfway+BLB.Images.thumbDistance <= BLB.Images.imgListHalfway) BLB.Images.prefetchThumbnail(BLB.Images.imgListHalfway-thumbsHalfway-BLB.Images.thumbDistance); } if(count > 1) BLB.Images.slideCarouselWindow(direction, --count); else if(BLB.Images.callBackStack.length > 0) BLB.Images.slideCarouselWindowCaller(); else BLB.Images.updateImgMainBody() }); imgCarouselKeyAnimation.play(); thisThumb.classList.remove('imgParCenter'); nextThumb.classList.add('imgParCenter'); BLB.Images.currentImgId = nextThumb.id; BLB.Images.currentThumb = BLB.Images.thumbs[BLB.Images.currentImgId]; }, slideCarouselWindowCaller: function() { var state = BLB.Images.callBackStack.shift(); var ill = BLB.Images.imgList.length; var direction = 'left'; var count = 0; for(var i=0;i 0) { if(thumbState == BLB.Images.currentThumb || thumbState == state) break; count++; } else if(thumbState == BLB.Images.currentThumb) { direction='left'; count++; } else if (thumbState == state) { direction='right'; count++; } } BLB.Images.slideCarouselWindow(direction, count); }, updateImgMainBody: function() { var title = BLB.Images.titles[BLB.Images.currentImgId]; var cropped = BLB.Images.cropped[BLB.Images.currentImgId]; var path = BLB.Images.paths[BLB.Images.currentImgId]; var imgSrc = '/assets-v3/images/bibleMedia/'+path+'/' + cropped; var tmpImg = document.createElement('img'); var imgWidth = 72; var imgHeight = 0; var metaDescTemplate = "Image from the {galleryName} gallery. Images for {scripture} are provided by the Blue Letter Bible and its partner ministries." var imgDataTitle = document.querySelector('#imgDataTitle'); var imgRespTitle = document.querySelector('#imgTitle_Resp'); var imgDataCr = document.querySelector('#imgDataCr'); var imgDataSe = document.querySelector('#imgDataSe'); var imgDataSrc = document.querySelector('#imgDataSrc'); var imgDataBtn = document.querySelector('#imgDataBtn'); var imgDataDesc = document.querySelector('#imgDataDesc'); var imgDataBtn = document.querySelector('#imgDataBtn'); var scripturesA = BLB.Images.imgScripture[BLB.Images.currentImgId].replace(/(^\s*|;?\s*$)/g, '').replace(/(\d);([a-zA-Z])/g, '$1; $2'); var keywordsA = BLB.Images.imgKeywords[BLB.Images.currentImgId].replace(/(^\s*|;?\s*$)/g, ''); var b = null; pb = null; var c = null; var v = null; var v1 = null; var bid = null; keywordsA = (keywordsA==''?[]:keywordsA.split(/;/)); tmpImg.src = imgSrc; imgDataBtn.addEventListener('mouseover', function() { var img = this.firstChild; img.src = img.src.replace(/_a\.svg/, '_b.svg'); }); imgDataBtn.addEventListener('mouseout', function() { var img = this.firstChild; img.src = img.src.replace(/_b\.svg/, '_a.svg'); }); tmpImg.addEventListener('load', function() { document.querySelector('#imgTitle').innerHTML = title; document.querySelector('#imgTitle_Resp').innerHTML = title; // Update title and meta data tags var metaDesc = metaDescTemplate; metaDesc = metaDesc.replace('{galleryName}', BLB.Images.galleryName).replace('{scripture}', title); document.title = title +' - '+ BLB.Images.galleryName; document.head.querySelector("meta[name='Description']").content = metaDesc; document.head.querySelector("meta[property='og:title']").content = document.title; document.head.querySelector("meta[property='og:description']").content = metaDesc; document.head.querySelector("meta[property='og:image']").content = 'https://www.blueletterbible.org/assets-v3/images/bibleMedia/' + path + '/' + BLB.Images.thumbs[BLB.Images.currentImgId] + '.jpg'; document.querySelector('#imgExact').innerHTML = ''; document.querySelector('#imgPrint').firstChild.src = imgSrc; imgDataDesc.innerHTML = ''; imgDataCr.innerHTML = ''; imgDataSe.innerHTML = ''; imgDataSrc.innerHTML = ''; imgDataTitle.innerHTML = title; imgRespTitle.innerHTML = title; var imgLinks = document.querySelector('#imgLinks'); var imgDesc = BLB.Images.imgDescription[BLB.Images.currentImgId]; var imgDataDescP = document.querySelector('#imgDataDescP'); var imgDataDescTop = document.querySelector('#imgDataDescTop'); var imgDesc = BLB.Images.imgDescription[BLB.Images.currentImgId]; imgDataDescTop.style.display='none'; imgDataDescTop.innerHTML=''; imgDataDescP.style.display='none'; var showDescOnTop = false; if (path == "ESV-Global-Study-Bible") {showDescOnTop = true} if (imgDesc.length > 0) { if (showDescOnTop == true) { imgDataDescTop.style.display="block"; imgDataDescTop.innerHTML = imgDesc; } else { imgDataDescP.style.display="block"; imgDataDesc.innerHTML = imgDesc; } } var imgDataCrP = document.querySelector('#imgDataCrP'); if(scripturesA.length == 0) { imgDataCrP.style.display="none"; } else { imgDataCrP.style.display="block"; imgDataCr.innerHTML = scripturesA; BLB.Tagger.walkDomTree(imgDataCr); } var imgDataSeP = document.querySelector('#imgDataSeP'); if(keywordsA.length == 0) { imgDataSeP.style.display="none"; } else { imgDataSeP.style.display="block"; for(var i=0;iDownload PDF
'; }); BLB.Images.carouselClick=false; if(!BLB.firstLoad) BLB.Menu.evDispatch({event: 'page_view'}); // Tell Google about the page_view change due to AJAX call BLB.firstLoad = false; }, windowShift: function(count) { var imgCarousel = document.querySelector('#imgCarousel'); var windowLeft = parseInt(imgCarousel.style.left, 10); imgCarousel.style.left = windowLeft + (BLB.Images.thumbWidth*count) + 'px'; }, setCarouselWidth: function() { var imgCarousel = document.querySelector('#imgCarousel'); var carouselWidth = BLB.Images.imgList.length*BLB.Images.thumbWidth+15+9+78; imgCarousel.style.width = carouselWidth+'px'; }, setCarouselWindowWidth: function() { var imgCarouselWindow = document.querySelector('#imgCarouselWindow'); var carouselWindowWidth = BLB.Images.thumbsCount*BLB.Images.thumbWidth+15; imgCarouselWindow.style.width = carouselWindowWidth+'px'; }, prefetchThumbnail: function(thmbPos) { var imgCarousel = document.querySelector('#imgCarousel'); var thumbDiv = imgCarousel.children[thmbPos]; if(thumbDiv != undefined) { var imgKey = thumbDiv.id; var thumber = BLB.Images.thumbs[imgKey]; var thumbsCount = Math.floor(BLB.Images.vpW/BLB.Images.thumbWidth)-2; thumbsCount = (thumbsCount%2?thumbsCount:thumbsCount-1); thumber = thumber.replace(/.$/, 'd'); thumbDiv.firstChild.src = '/assets-v3/images/bibleMedia/' + BLB.Images.paths[imgKey] + '/' + thumber + '.jpg'; } }, getBookmarkedState: function() { var pathname = document.location.pathname.replace(/\/+$/, ''); var pa = pathname.split(/\//); var state = pa[pa.length-1]; return state; }, getHistoryState: function() { var historyState = history.state; var state = null; if(historyState != undefined) state = historyState.state; return state; }, historyNavigate: function(state) { if(BLB.Images.carouselClick) return false; BLB.Images.carouselClick=true; var pathname = document.location.pathname.replace(/\/+$/, ''); var pa = pathname.split(/\//); pa.pop(); pa.push(state); history.replaceState({state:state}, null, pa.join('/')); BLB.Images.sectionStateChangeHandler(state); }, sectionStateChangeHandler: function(state) { BLB.Images.callBackStack.push(state); BLB.Images.slideCarouselWindowCaller(); }, popstateEventHandler: function(ev) { var state = ev.state; BLB.Images.sectionStateChangeHandler(state.state); } }; YEvent.onDOMReady(BLB.Images.init, BLB.Images.init, true); })();