(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: "Jonah", imgList: [919,920,921,922,923,924,925,926,927,928,1184,1446,1482,1484,1560,1897,2262,1519,2327], cropped: {img_919:'hs2_310e.jpg',img_920:'hs2_312_a.jpg',img_921:'hs2_313_a.jpg',img_922:'hs2_314_a.jpg',img_923:'lb2_jon_26_1_a.jpg',img_924:'LLS_008_a.jpg',img_925:'hs2_315_a.jpg',img_926:'llh_325_a.jpg',img_927:'llh_326_a.jpg',img_928:'llh_327_a.jpg',img_1184:'jb_019_a.jpg',img_1446:'OT_timeline2_a.jpg',img_1482:'wc_00bible_a.jpg',img_1484:'wc_00ot_a.jpg',img_1560:'wc_00ot_4prophets_a.jpg',img_1897:'snapboard_mar_4_35-41_a.jpg',img_2262:'illustration_32_nineveh_a.jpg',img_1519:'wc_32jon_a.jpg',img_2327:'map_12_06_a.jpg'}, thumbs: {img_919:'hs2_310e_b',img_920:'hs2_312_b',img_921:'hs2_313_b',img_922:'hs2_314_b',img_923:'lb2_jon_26_1_b',img_924:'LLS_008_b',img_925:'hs2_315_b',img_926:'llh_325_b',img_927:'llh_326_b',img_928:'llh_327_b',img_1184:'jb_019_b',img_1446:'OT_timeline2_b',img_1482:'wc_00bible_b',img_1484:'wc_00ot_b',img_1560:'wc_00ot_4prophets_b',img_1897:'snapboard_mar_4_35-41_b',img_2262:'illustration_32_nineveh_b',img_1519:'wc_32jon_b',img_2327:'map_12_06_b'}, imgFull: {img_919:'hs2_310.jpg',img_920:'hs2_312.jpg',img_921:'hs2_313.jpg',img_922:'hs2_314.jpg',img_923:'lb2_jon_26_1.jpg',img_924:'LLS_008.jpg',img_925:'hs2_315.jpg',img_926:'llh_325.jpg',img_927:'llh_326.jpg',img_928:'llh_327.jpg',img_1184:'jb_019.jpg',img_1446:'OT_timeline2.jpg',img_1482:'wc_00bible.jpg',img_1484:'wc_00ot.jpg',img_1560:'wc_00ot_4prophets.jpg',img_1897:'snapboard_mar_4_35-41.jpg',img_2262:'illustration_32_nineveh.jpg',img_1519:'wc_32jon.jpg',img_2327:'map_12_06.jpg'}, imgPDF: {img_919:'',img_920:'',img_921:'',img_922:'',img_923:'',img_924:'',img_925:'',img_926:'',img_927:'',img_928:'',img_1184:'',img_1446:'',img_1482:'wc_00bible.pdf',img_1484:'wc_00ot.pdf',img_1560:'wc_00ot_4prophets.pdf',img_1897:'',img_2262:'',img_1519:'wc_32jon.pdf',img_2327:''}, titles: {img_919:'Jonah',img_920:'Jonah Is Cast into the Sea',img_921:'The Fish Vomits Jonah Out',img_922:'Jonah Preaches to Nineveh',img_923:'Jonah Predicts the Destruction of Nineveh',img_924:'Jonah Preaching in Nineveh',img_925:'Jonah Is Rebuked',img_926:'Jonah Preaching to the Ninevites',img_927:'Jonah Proclaiming God\'s Wrath',img_928:'Jonah Cast Forth by the Whale',img_1184:'Jonah\'s Deliverance',img_1446:'Old Testament Time Line (Part 2 of 2)',img_1482:'The Bible - Word Cloud',img_1484:'The Old Testament - Word Cloud',img_1560:'The Prophets - Word Cloud',img_1897:'Jesus is the Jonah Jonah Never Was',img_2262:'The City of Nineveh',img_1519:'The Book of Jonah - Word Cloud',img_2327:'Prophets of Israel and Judah'}, paths: {img_919:'Prophets',img_920:'Jon',img_921:'Jon',img_922:'Jon',img_923:'Jon',img_924:'Jon',img_925:'Jon',img_926:'Jon',img_927:'Jon',img_928:'Jon',img_1184:'brown_john',img_1446:'rosepub',img_1482:'wordclouds',img_1484:'wordclouds',img_1560:'wordclouds',img_1897:'snapboards',img_2262:'ESV-Global-Study-Bible',img_1519:'wordclouds',img_2327:'ESV-Global-Study-Bible'}, imgKeywords: {img_919:'Jonah',img_920:'Jonah;',img_921:'Jonah;',img_922:'Jonah; Nineveh;',img_923:'Jonah, Nineveh',img_924:'Jonah; Preaching; Nineveh',img_925:'Jonah; Nineveh;',img_926:'Jonah; Ninevites; Nineveh;',img_927:'Jonah; Ninevites; Nineveh;',img_928:'Jonah;',img_1184:'Jonah;',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_1560:'',img_1897:'Jesus; Jonah',img_2262:'city; Jonah; Nimrod; Nineveh',img_1519:'',img_2327:'Ahijah; Amos; Elijah; Elisha; Haggai; Hosea; Isaiah; Israel; Jehu; Jeremiah; Jonah; Judah; Malachi; Micah; Nahum; prophets; Zechariah; Zephaniah'}, imgScripture: {img_919:'Jon 1:1',img_920:'Jon 1:7-17',img_921:'Jon 2:1-10',img_922:'Jon 3:1-10',img_923:'Jon 3:1-10',img_924:'Jon 3:1-10',img_925:'Jon 4:1-11',img_926:'Jon 3:1-10',img_927:'Jon 3:1-10',img_928:'Jon 2:1-10',img_1184:'Jon 2:1-10',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_1560:'',img_1897:'Jon 1:1-17; Jon 1:4; Jon 1:5; Jon 1:16; Mar 4:35-41; Mar 4:37; Mar 4:38; Mar 4:41',img_2262:'Gen 10:11; Ezr 4:10; Jon 3:1-5',img_1519:'',img_2327:'2 Kings; Amos; Haggai; Hosea; Isaiah; Jeremiah; Jonah; Malachi; Micah; Nahum; Zechariah; Zephaniah'}, imgDescription: {img_919:'',img_920:'',img_921:'',img_922:'',img_923:'',img_924:'',img_925:'',img_926:'',img_927:'',img_928:'',img_1184:'',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_1560:'

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

',img_1897:'',img_2262:'
Detailed study information about this image:
The City of Nineveh
',img_1519:'

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

',img_2327:'
Detailed study information about this image:
Prophets of Israel and Judah
'}, 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); })();