(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: "Ezra", imgList: [783,784,786,787,788,789,790,791,792,793,1149,1150,1151,1152,1153,1154,1155,1180,1269,1270,1272,1437,1446,1482,1484,1558,2238,1502,2257,2258,2260,2262,2337,2349], cropped: {img_783:'hs2_307_a.jpg',img_784:'hs2_308_a.jpg',img_786:'lb2ezr_7_1_a.jpg',img_787:'lb2ezr_1_5_a.jpg',img_788:'llh_203_1_a.jpg',img_789:'llh_203_2_a.jpg',img_790:'llh_357_a.jpg',img_791:'llh_358_a.jpg',img_792:'llh_359_a.jpg',img_793:'llh_360_a.jpg',img_1149:'sb32o_a.jpg',img_1150:'sb32p_a.jpg',img_1151:'sb32q_a.jpg',img_1152:'sb32r_a.jpg',img_1153:'sb32s_a.jpg',img_1154:'sb32t_a.jpg',img_1155:'sb32u_a.jpg',img_1180:'jb_014_a.jpg',img_1269:'tgb_072_a.jpg',img_1270:'tgb_074a_a.jpg',img_1272:'tgb_075_a.jpg',img_1437:'wailing_a.jpg',img_1446:'OT_timeline2_a.jpg',img_1482:'wc_00bible_a.jpg',img_1484:'wc_00ot_a.jpg',img_1558:'wc_00ot_2histories_a.jpg',img_2238:'diagram_27_01_a.jpg',img_1502:'wc_15ezr_a.jpg',img_2257:'illustration_15_zerubbabels-temple_a.jpg',img_2258:'illustration_16_jerusalem-in-the-time-of-nehemiah_a.jpg',img_2260:'illustration_27_babylon_a.jpg',img_2262:'illustration_32_nineveh_a.jpg',img_2337:'map_15_01_a.jpg',img_2349:'map_27_02_a.jpg'}, thumbs: {img_783:'hs2_307_b',img_784:'hs2_308_b',img_786:'lb2ezr_7_1_b',img_787:'lb2ezr_1_5_b',img_788:'llh_203_1_b',img_789:'llh_203_2_b',img_790:'llh_357_b',img_791:'llh_358_b',img_792:'llh_359_b',img_793:'llh_360_b',img_1149:'sb32o_b',img_1150:'sb32p_b',img_1151:'sb32q_b',img_1152:'sb32r_b',img_1153:'sb32s_b',img_1154:'sb32t_b',img_1155:'sb32u_b',img_1180:'jb_014_b',img_1269:'tgb_072_b',img_1270:'tgb_074a_b',img_1272:'tgb_075_b',img_1437:'wailing_b',img_1446:'OT_timeline2_b',img_1482:'wc_00bible_b',img_1484:'wc_00ot_b',img_1558:'wc_00ot_2histories_b',img_2238:'diagram_27_01_b',img_1502:'wc_15ezr_b',img_2257:'illustration_15_zerubbabels-temple_b',img_2258:'illustration_16_jerusalem-in-the-time-of-nehemiah_b',img_2260:'illustration_27_babylon_b',img_2262:'illustration_32_nineveh_b',img_2337:'map_15_01_b',img_2349:'map_27_02_b'}, imgFull: {img_783:'hs2_307.jpg',img_784:'hs2_308.jpg',img_786:'lb2ezr_7_1.jpg',img_787:'lb2ezr_1_5.jpg',img_788:'llh_203_1.jpg',img_789:'llh_203_2.jpg',img_790:'llh_357.jpg',img_791:'llh_358.jpg',img_792:'llh_359.jpg',img_793:'llh_360.jpg',img_1149:'sb32.jpg',img_1150:'sb32.jpg',img_1151:'sb32.jpg',img_1152:'sb32.jpg',img_1153:'sb32.jpg',img_1154:'sb32.jpg',img_1155:'sb32.jpg',img_1180:'jb_014.jpg',img_1269:'tgb_072.jpg',img_1270:'tgb_074a.jpg',img_1272:'tgb_075.jpg',img_1437:'wailing.jpg',img_1446:'OT_timeline2.jpg',img_1482:'wc_00bible.jpg',img_1484:'wc_00ot.jpg',img_1558:'wc_00ot_2histories.jpg',img_2238:'diagram_27_01.jpg',img_1502:'wc_15ezr.jpg',img_2257:'illustration_15_zerubbabels-temple.jpg',img_2258:'illustration_16_jerusalem-in-the-time-of-nehemiah.jpg',img_2260:'illustration_27_babylon.jpg',img_2262:'illustration_32_nineveh.jpg',img_2337:'map_15_01.jpg',img_2349:'map_27_02.jpg'}, imgPDF: {img_783:'',img_784:'',img_786:'',img_787:'',img_788:'',img_789:'',img_790:'',img_791:'',img_792:'',img_793:'',img_1149:'',img_1150:'',img_1151:'',img_1152:'',img_1153:'',img_1154:'',img_1155:'',img_1180:'',img_1269:'',img_1270:'',img_1272:'',img_1437:'',img_1446:'',img_1482:'wc_00bible.pdf',img_1484:'wc_00ot.pdf',img_1558:'wc_00ot_2histories.pdf',img_2238:'',img_1502:'wc_15ezr.pdf',img_2257:'',img_2258:'',img_2260:'',img_2262:'',img_2337:'',img_2349:''}, titles: {img_783:'The Rebuilding of the Temple Begins',img_784:'Jerusalem Is Rebuilt',img_786:'The King Grants Ezra\'s Request',img_787:'The Jews Prepared to Return',img_788:'Ezra Reproving the Israelites',img_789:'The Return from Captivity',img_790:'Ezra in Prayer',img_791:'Artaxerxes Granting Liberty to the Jews',img_792:'Rebuilding of the Temple',img_793:'Cyrus Restoring the Vessels of the Temple',img_1149:'Bells/cymbals 1',img_1150:'Bells/cymbals 2',img_1151:'Bells/cymbals 3',img_1152:'Bells/cymbals 4',img_1153:'Bells/cymbals 5',img_1154:'Bells/cymbals 6',img_1155:'Bells/cymbals 7',img_1180:'Ezra Exhorting the Jews to Dissolve Their Strange Marriages',img_1269:'By the Waters of Babylon',img_1270:'The Empire of Persia',img_1272:'The Remnant Returns from Exile',img_1437:'The Jews Wailing Place (engraving)',img_1446:'Old Testament Time Line (Part 2 of 2)',img_1482:'The Bible - Word Cloud',img_1484:'The Old Testament - Word Cloud',img_1558:'The Histories - Word Cloud',img_2238:'The 70 Weeks of Daniel 9',img_1502:'The Book of Ezra - Word Cloud',img_2257:'Zerubbabel’s Temple',img_2258:'Jerusalem in the Time of Nehemiah',img_2260:'The City of Babylon',img_2262:'The City of Nineveh',img_2337:'The Persian Empire at the Time of Ezra',img_2349:'The Empires of Daniel\'s Visions: The Persians'}, paths: {img_783:'Ezr',img_784:'Ezr',img_786:'Ezr',img_787:'Ezr',img_788:'Ezr',img_789:'Ezr',img_790:'Ezr',img_791:'Ezr',img_792:'Ezr',img_793:'Ezr',img_1149:'Instruments',img_1150:'Instruments',img_1151:'Instruments',img_1152:'Instruments',img_1153:'Instruments',img_1154:'Instruments',img_1155:'Instruments',img_1180:'brown_john',img_1269:'TheGraphicBible',img_1270:'TheGraphicBible',img_1272:'TheGraphicBible',img_1437:'blb_classics',img_1446:'rosepub',img_1482:'wordclouds',img_1484:'wordclouds',img_1558:'wordclouds',img_2238:'ESV-Global-Study-Bible',img_1502:'wordclouds',img_2257:'ESV-Global-Study-Bible',img_2258:'ESV-Global-Study-Bible',img_2260:'ESV-Global-Study-Bible',img_2262:'ESV-Global-Study-Bible',img_2337:'ESV-Global-Study-Bible',img_2349:'ESV-Global-Study-Bible'}, imgKeywords: {img_783:'Zerubbabel; Jeshua;',img_784:'Jerusalem;',img_786:'King, Ezra, Request',img_787:'Jews, Return',img_788:'Ezra;',img_789:'Ezra; Israelites;',img_790:'Ezra; prayer',img_791:'Artaxerxes; Liberty; Jews',img_792:'Rebuilding; Temple;',img_793:'Cyrus; Temple;',img_1149:'bell; bells; cymbal; cymbals;',img_1150:'bell; bells; cymbal; cymbals;',img_1151:'bell; bells; cymbal; cymbals;',img_1152:'bell; bells; cymbal; cymbals;',img_1153:'bell; bells; cymbal; cymbals;',img_1154:'bell; bells; cymbal; cymbals;',img_1155:'bell; bells; cymbal; cymbals;',img_1180:'Ezra;',img_1269:'Babylon; Exile; Captivity; Judah; Euphrates; Tigris;',img_1270:'Persia; Cyrus; Empire; Asia Minor; Thrace; Egypt; 525',img_1272:'Jerusalem; Haggai; Zechariah; Remnant; Exile; Return; Babylon; Judea; Phoenicians; 536',img_1437:'Jews; Temple; Wailing',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_1558:'',img_2238:'abomination; antichrist; Artaxerxes; coming; covenant; Cyrus; desolation; exile; Jerusalem; Messiah; second; seven',img_1502:'',img_2257:'Jerusalem; temple; Zerubbabel',img_2258:'City of David; Hinnom Valley; Ophel; Siloam Pool; Temple Mount',img_2260:'Babylon; city; Cyrus; Euphrates River; Nebuchadnezzar',img_2262:'city; Jonah; Nimrod; Nineveh',img_2337:'Babylonians; Cyrus the Great; Ezra; Israel; Judah; Perisan Empire; temple of the Lord; Zerubbabel',img_2349:'Babylonians; Cyrus the Great; Daniel; Egypt; Jews; Median Empire; Persian Empire; Thrace; vision'}, imgScripture: {img_783:'Ezr 3:8-13',img_784:'Ezr 6:14-17',img_786:'Ezr 7:6-28',img_787:'Ezr 1:1-6',img_788:'Ezr 10:1-17',img_789:'Ezr 2:1-70',img_790:'Ezr 7:8-10',img_791:'Ezr 7:1-7',img_792:'Ezr 3:7-13',img_793:'Ezr 5:13-17',img_1149:'Exd 28:33; Exd 39:25; 2Sa 6:5; 1Ch 13:8; 1Ch 15:16; 1Ch 16:5; 1Ch 25:1; 2Ch 5:12; 2Ch 29:25; Ezr 3:10; Neh 12:27; Psa 150:5; Zec 14:20; 1Cr 13:1',img_1150:'Exd 28:33; Exd 39:25; 2Sa 6:5; 1Ch 13:8; 1Ch 15:16; 1Ch 16:5; 1Ch 25:1; 2Ch 5:12; 2Ch 29:25; Ezr 3:10; Neh 12:27; Psa 150:5; Zec 14:20; 1Cr 13:1',img_1151:'Exd 28:33; Exd 39:25; 2Sa 6:5; 1Ch 13:8; 1Ch 15:16; 1Ch 16:5; 1Ch 25:1; 2Ch 5:12; 2Ch 29:25; Ezr 3:10; Neh 12:27; Psa 150:5; Zec 14:20; 1Cr 13:1',img_1152:'Exd 28:33; Exd 39:25; 2Sa 6:5; 1Ch 13:8; 1Ch 15:16; 1Ch 16:5; 1Ch 25:1; 2Ch 5:12; 2Ch 29:25; Ezr 3:10; Neh 12:27; Psa 150:5; Zec 14:20; 1Cr 13:1',img_1153:'Exd 28:33; Exd 39:25; 2Sa 6:5; 1Ch 13:8; 1Ch 15:16; 1Ch 16:5; 1Ch 25:1; 2Ch 5:12; 2Ch 29:25; Ezr 3:10; Neh 12:27; Psa 150:5; Zec 14:20; 1Cr 13:1',img_1154:'Exd 28:33; Exd 39:25; 2Sa 6:5; 1Ch 13:8; 1Ch 15:16; 1Ch 16:5; 1Ch 25:1; 2Ch 5:12; 2Ch 29:25; Ezr 3:10; Neh 12:27; Psa 150:5; Zec 14:20; 1Cr 13:1',img_1155:'Exd 28:33; Exd 39:25; 2Sa 6:5; 1Ch 13:8; 1Ch 15:16; 1Ch 16:5; 1Ch 25:1; 2Ch 5:12; 2Ch 29:25; Ezr 3:10; Neh 12:27; Psa 150:5; Zec 14:20; 1Cr 13:1',img_1180:'Ezr 10:1-14',img_1269:'2Ch 36:7-10; 2Ch 36:20; 2Ki 24:8-12; Dan 1:2; Ezr 6:15; Jer 25:1; Jer 43:5-7; Jer 52:28-30; ',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_1272:'Ezr 1:5; Ezr 7:13; Jer 50:1-35;',img_1437:'1Ki 6, 1Ki 8:17-18, 41-42; 1Ki 9:1ff; 2Ch 3; 2Ch 28:2-3; Ezr 7:10; Neh 4:6',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_1558:'',img_2238:'Ezr 1:1-11; Ezr 7:1-28; Neh 2:1, 5; Dan 1:1; Mat 24:15; 2Th 2:4',img_1502:'',img_2257:'Ezr 3:2-3; 6:3',img_2258:'Ezr 6:3; Neh 2:14; Neh 3:1-32; Neh 12:37-38; Jer 39:3',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_2262:'Gen 10:11; Ezr 4:10; Jon 3:1-5',img_2337:'Ezra',img_2349:'Daniel; 2Ch 36:23; Ezr 1:2'}, imgDescription: {img_783:'',img_784:'',img_786:'',img_787:'',img_788:'',img_789:'',img_790:'',img_791:'',img_792:'',img_793:'',img_1149:'',img_1150:'',img_1151:'',img_1152:'',img_1153:'',img_1154:'',img_1155:'',img_1180:'',img_1269:'',img_1270:'',img_1272:'',img_1437:'',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_1558:'

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

',img_2238:'
Detailed study information about this image:
The Seventy Weeks of Daniel Nine
',img_1502:'

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

',img_2257:'
Detailed study information about this image:
Zerubbabels Temple
',img_2258:'
Detailed study information about this image:
Jerusalem in the Time of Nehemiah
Solomons Temple
',img_2260:'
Detailed study information about this image:
The City of Babylon
',img_2262:'
Detailed study information about this image:
The City of Nineveh
',img_2337:'
Detailed study information about this image:
The Persian Empire at the Time of Ezra
',img_2349:'
Detailed study information about this image:
The Empires of Daniels Visions the Persians
'}, 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); } // Resize left/right expand controls to fit image area setTimeout(function() { let lefty = document.querySelector('#siteExpandLeft'); let righty = document.querySelector('#siteExpandRight'); let imgBody = document.querySelector('.bubBody.imgBody'); if (lefty && righty && imgBody) { let height = parseInt(imgBody.getBoundingClientRect().height); if (!isNaN(height) && height > 145) { lefty.style.maxHeight = height + 37 + 'px'; righty.style.maxHeight = height + 37 + 'px'; console.log(height); } } }, 500) 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); })();