The Lesson of Lot (2024)

Where Is God’s Church Today?

The Lesson of Lot (2)New York, USAThe Lesson of Lot (3)JamaicaThe Lesson of Lot (4)PeruThe Lesson of Lot (5)Idaho, USAThe Lesson of Lot (6)IndiaThe Lesson of Lot (7)BelgiumThe Lesson of Lot (8)KenyaThe Lesson of Lot (9)Arkansas, USAThe Lesson of Lot (10)South AfricaThe Lesson of Lot (11)EnglandThe Lesson of Lot (12)NigeriaThe Lesson of Lot (13)Ohio, USA

Jesus said, “I will build My Church…” There is a single organization that teaches the entire truth of the Bible, and is called to live by “every word of God.” Do you know how to find it? Christ said it would:

  • Teach “all things” He commanded
  • Have called out members set apart by truth
  • Be a “little flock”

Home Ambassador Youth Volume 5, Issue 4

Bible Personalities:
by Bruce A. Ritter

Calling him “just” and “righteous,” the Bible states that Lot was “vexed” by the vile and corrupt conduct of ancient Sodom. But why did he choose to stay there for so long?

Tensions increased. Men from opposing sides exchanged angry words. The scent of potential violence lingered in the air. If left unresolved, the problem could spill into bloodshed.

The patriarch Abraham (then called Abram) owned a large and growing number of oxen, goats and sheep, as did his nephew Lot. As each man’s herd increased in number, Abraham and Lot soon discovered there was not enough green pasture and fresh drinking water to supply the needs of both herds (Gen. 13:1-6). Because of this, “there was a strife between the herdsmen of Abram’s cattle and the herdsmen of Lot’s cattle” (vs. 7).

Fearing that violence would ensue, Abraham wisely offered his nephew a peaceful solution: “Is not the whole land before you? Separate yourself, I pray you, from me: if you will take the left hand, then I will go to the right; or if you depart to the right hand, then I will go to the left” (vs. 9).

Lot agreed, though probably with mixed emotion since it meant leaving Abraham, who had been a surrogate father to him for many years.

The Bible describes Lot as “just” and “righteous,” which meant he kept God’s Law. Undoubtedly he learned it growing up under the wing of his uncle and mentor, Abraham.

Lot had witnessed Abraham’s personal example of changing from a life of worshipping idols to becoming a great servant of the true God. Lot observed that when his uncle received God’s calling to leave his home, country and family to journey to a faraway foreign land, Abraham obeyed his Maker without question. Taking his wife and nephew and a caravan of servants, cattle and other possessions, Abraham departed for foreign territory, trusting in God to direct his steps. This and other tremendous instances of exercising faith must have made a profound impact on Lot’s life.

Now it was time for him to journey on his own. Lot peered into the distance, scanned the surroundings, and chose to move his herdsmen and cattle to the lush Jordan Valley, which was well watered and teeming with fertile pastures (vs. 10). This seemed like a wise choice—but Lot did not take into account the physical and spiritual dangers he would encounter there.

How Was Lot “Vexed”?

The book of Hebrews describes Abraham as a “sojourner”—a spiritual “stranger” and “pilgrim” who refused to embrace the ways of this world. He could have lived in a grand palace or some other permanent home befitting a man of his great stature and wealth. Instead, Abraham chose a nomadic life of residing in tents and moving from place to place, never settling down to establish roots in a world cut off from God. “For he looked for a city which has foundations, whose Builder and Maker is God” (Heb. 11:10).

Abraham was a type for all who “seek…first the kingdom of God, and His righteousness” (Matt. 6:33)—who “desire a better country, that is, an heavenly: wherefore God is not ashamed to be called their God: for He has prepared for them a city” (Heb. 11:16).

This was a life lesson Lot had to learn. Rather than keeping himself from becoming personally attached to society and its pagan customs and traditions, “Lot dwelled in the cities of the plain, and pitched his tent toward Sodom” (Gen. 13:12). To say that this was a HUGE mistake would be an understatement, for “the men of Sodom were wicked and sinners before the Lord exceedingly” (vs. 13).

By living among people who devoted their lives to evil, Lot was “vexed with the filthy conversation [conduct] of the wicked. (For that righteous man dwelling among them, in seeing and hearing, vexed his righteous soul from day to day with their unlawful deeds)” (II Pet. 2:7-8).

Here the word “vexed” means “to make trouble for; to treat roughly; to afflict or oppress with evils.”

Think about the wicked and corrupt behavior Lot witnessed day after day, which greatly troubled him as he strove to obey God. Imagine the worldly pulls and peer pressure he had to battle and endure as he interacted with neighbors, merchants, civic leaders and other citizens.

Ezekiel 16 states that ancient Sodom’s “iniquity” was “pride, fullness of bread, and abundance of idleness,” as well as being “haughty” and failing to care for and “strengthen the hand of the poor and needy” (vs. 49-50).

Sodom was a city of great riches, as were the other cities and towns of the plain. Its people possessed the finest foods, clothing and various other goods. With their lives surrounded by countless items of luxury, the citizens were self-satisfied and smug about their existence. They saw no need to seek after God.

Their pride led them to believe they could live any way they chose—and without consequences. When it came to matters that belonged within the holy confines of marriage, the people of Sodom and Gomorrah rebelled against God’s original intent and engaged in unspeakable practices. And they were unashamed—in fact, proud—of their “alternative lifestyles” and perverse ideas—just like the “sophisticated” and “progressive” cities of today, especially those in the modern nations of Israel (Isa. 3:9).

Sodom’s pride over its great abundance of material goods also led to government corruption and favoritism. Its people rejected God and His protection for those who obey Him, and instead trusted in a military alliance among the five cities of the plain (Gen. 14:8).

Also, residing in Sodom placed Lot in crowded living conditions. Being in daily close quarters made it easier and faster for citizens and visitors to exchange ideas, traditions, customs and practices. Lot was in the midst of this, constantly battling the temptation to mix pagan beliefs with the Way of God.

The Lesson of Lot (14)

But Lot’s wife…looked back, and she became a pillar of salt.

RCG illustration/Paula Rondeau

But (you might be wondering) if living in Sodom was such a trial for Lot, why did he continue to stay there, only leaving when God sent two angels to rescue him from Sodom and Gomorrah’s impending destruction?

While the Bible does not provide an explicit answer, it does give us clues.

Why Did He Stay?

Genesis 19:1 states, “Lot sat in the gate of Sodom,” which implies he may have held some kind of government position, possibly as a magistrate or judge. Verse 9 appears to indicate this: When he confronted a raving crowd of perverse men seeking to do harm, they accused Lot of being a foreigner trying to be a judge over their conduct.

Suppose Lot had been a government official in Sodom. In a society where the wealthy and powerful did nothing to help the poor and needy, he might have convinced himself into staying, thinking he could somehow effect change by making administrative or judicial decisions based on God’s Way.

If this were the case, Sodom had already gone past the point of no return (at least in this life) in its pursuit of all things perverse. Surely, this would have vexed Lot. And his daily affliction eventually taught him what all followers of God ultimately come to understand: This world and its ways are like a condemned building, destined for destruction. It will be replaced by the kingdom of God.

There was another motive for continuing to live in Sodom: family. Lot had a wife, two unmarried daughters living at home, and at least two daughters who had married into Sodomite society (Gen. 19:14-15). Unlike Abraham, Lot had settled down and he and his family grew personally attached to the world around them. His married daughters and their husbands did not leave when told that God was about to rain fire and brimstone upon the city. Lot’s wife departed physically, but she had emotionally attached herself to Sodom—even to the point of disobeying God’s command not to look back as she fled (vs. 17).

Her mistake brought a tragic cost: “But Lot’s wife, behind him, looked back, and she became a pillar of salt” (vs. 26).

It was not until angels, disguised as men, came to warn him that Lot departed Sodom. Despite the worsening levels of wickedness that thrived in the city, which vexed him day and night, “he lingered” (vs. 16)—procrastinated. The angels literally had to take Lot by the hand to get him to leave (same verse).

They told him, “Escape for your life; look not behind you, neither stay you in all the plain; escape to the mountain, lest you be consumed” (vs. 17). But Lot was not yet ready to leave the area, so he asked permission to travel to a small nearby town (vs. 18-22). It seems he still harbored a certain attraction for the world, which he had to overcome.

Though he did keep God’s Law, Lot had to learn that “evil communications [companionship] corrupt good manners [morals, character]” (I Cor. 15:33). The Bible has much to say about this:

  • “Make no friendship with an angry man; and with a furious man you shall not go: Lest you learn his ways, and get a snare to your soul” (Prov. 22:24-25).
  • “Enter not into the path of the wicked, and go not in the way of evil men. Avoid it, pass not by it, turn from it, and pass away. For they sleep not, except they have done mischief; and their sleep is taken away, unless they cause some to fall. For they eat the bread of wickedness, and drink the wine of violence” (Prov. 4:14-17).
  • “He that walks with wise men shall be wise: but a companion of fools shall be destroyed” (Prov. 13:20).
  • “Forsake the foolish, and live; and go in the way of understanding” (Prov. 9:6).
  • “Wherefore come out from among them, and be you separate, says the Lord, and touch not the unclean thing; and I will receive you” (II Cor. 6:17).
  • “Blessed is the man that walks not in the counsel of the ungodly, nor stands in the way of sinners, nor sits in the seat of the scornful” (Psa. 1:1).
  • “I have not sat with vain persons, neither will I go in with dissemblers. I have hated the congregation of evil doers; and will not sit with the wicked” (Psa. 26:4-5).
  • “Come out of her, My people, that you be not partakers of her sins, and that you receive not of her plagues” (Rev. 18:4).

While some situations cannot be entirely avoided, intentionally allowing oneself to remain in an environment that encourages perverse thinking and lascivious lifestyles is dangerous. Doing so eventually leads to tolerating sin—clouding one’s judgment, making poor decisions and having wrong priorities. A careful read of Genesis 19 shows this is what happened to Lot.

Never allow it to happen to you.

The Lesson of Lot (15)

Is there a reason—a purpose—for your life? Learn the awesome meaning behind your existence.

The Lesson of Lot (16)

While newspapers, magazines and other news media report what happened, The Real Truth analyzes and explains the root cause of why events happen—why humanity is at a loss to solve today’s problems.

The Lesson of Lot (17)

Where are the dead? What are they doing? Are they aware of the living? Do the dead “pass away” to heaven or hell? Do people have immortal souls? Does suicide really end it all? Will you see…

Contact Us

Join our free newsletters today!

Subscribe

Copyright © 2024 The Restored Church of God. All Rights Reserved.

The Restored Church of God is a 501(c)(3) not-for-profit organization.

" + objWin.strChapter + "" + objWin.strVerse + "";$(".winBar").html(newHTML);$(".winBar").attr("tooltip", 'Click and drag to make smaller/bigger');if (!editorHint) {$(".winBar").addClass("hint").addClass("lowerTip");editorHint = true;}$.post("/bible/getBooks.php", { currentBook: objWin.strBook }, function (data) {$("#selBibleBook").html(data);$("#txtChapter").css("width", $("#spnChapter").width() + 11 + "px");});$("#scriptureWrap").append('Go');$(".winBox").css("visibility", "visible").css("z-index", "9000");$(".winBox").css("height", "auto");$(".winBox").css("left", "0px");}$("#spnChapter").text($("#txtChapter").val());$("#spnVerse").text($("#txtVerse").val());if ($("#spnVerse").text() == "ALL")$("#txtVerse").css("width", 11 + "px");else$("#txtVerse").css("width", $("#spnVerse").width() + 11 + "px");}var popTarget = null;var scripturePopped = false;function WriteContent(strWinID, strContent) {strContent = strContent.replace(/\[/g, "
").replace(/\]/g, "");if (scripturePopped)divContent = popTarget.document.getElementById(strWinID + 'Content');elsedivContent = xGetElementById(strWinID + 'Content');$("#" + strWinID + 'Content').addClass("updating");divContent.innerHTML = strContent;$("#" + strWinID + 'Content').removeClass("updating");}function InitSlick(strID) {objWin = xGetElementById(strID);objBar = xGetElementById(strID + 'Bar');objFooter = xGetElementById(strID + 'Footer');objContent = xGetElementById(strID + 'Content');xResizeTo(objWin, xWidth(objWin), xHeight(objContent) + xHeight(objBar) + xHeight(objFooter));if (typeof modalFormState === "undefined") modalFormState = false;if (typeof modalFormExState === "undefined")modalFormExState = false;if (typeof modalPageState === "undefined")modalPageState = false;if (modalFormState || modalFormExState || modalPageState) {if (!scripturePopped)PopWindow();}}function RefreshTitle(strID, strBook, strChapter, strVerse) {if (scripturePopped)objWin = popTarget.document.getElementById(strID);elseobjWin = xGetElementById(strID);objWin.strBook = strBook;objWin.strChapter = strChapter;objWin.strVerse = strVerse;if (scripturePopped)objBar = popTarget.document.getElementById(strID + 'Bar');elseobjBar = xGetElementById(strID + 'Bar');if ($("#selBibleBook > option:selected").val() != strBook) {if (objWin.strVerse == 'ALL')objBar.innerHTML = objWin.strBook + ' ' + objWin.strChapter;elseobjBar.innerHTML = objWin.strBook + ' ' + objWin.strChapter + ':' + objWin.strVerse;SetNewStyles();}else {if (strVerse == 'ALL') {$("#txtVerse").val('').css("width", "11px");$("#spnVerse").text('');}else {$("#txtVerse").val(strVerse);$("#spnVerse").text(strVerse);$("txtVerse").css("width", $("#spnVerse").width() + 11 + "px");}$("#txtChapter").val(strChapter);$("#spnChapter").text(strChapter);$("txtChapter").css("width", $("#spnChapter").width() + 11 + "px");}}function DynamicContentWrite(strID, strContent) {var strWinID = 'SlickContentWindow-' + strID;var strContentID = strWinID + 'Content';var divContent = xGetElementById(strContentID);divContent.innerHTML = strContent;}function CloseNotes() {if ($("#bibleNotes").length) {$(".col-notes").remove();$(".winNotesWrap.winContent").contents().unwrap();$(".col-bible").removeClass("col-bible").removeClass("win-column");$("#WinScriptureBoxContent").addClass("winContent");UnDockVideo();}}function WriteNotes() {if (!$("#WinScriptureBoxBar").length)slickWindow('Genesis', '1', 'ALL');var strNotes = '';$.post("/readNotes.php", { lngProduct: lngProduct, lngUser: lngUser }, function (data) {var dateMod = "";if (data.indexOf("_saved|") >= 0) {var splitData = data.split("_saved|");dateMod = splitData[1];data = splitData[0];}strNotes = data;if ($(".winNotesWrap").length <= 0) {$(".winContent").addClass("col-bible").addClass("win-column").removeClass("winContent");$(".col-bible").wrap('');$('

' + '

').appendTo(".winNotesWrap");$(".slicknav").addClass("col-bible");$(".slicknavContainer").append("");$(".slicknavContainer").wrapInner("");}if (data.indexOf("Sorry") >= 0) {$("#dateModified").addClass("error").html(data);$(".button.save").addClass("error").text("Error");$(".slicknavContent").addClass("error");$("#notes-toolbar").html("

" + data + "

");}else {CreateRichText();$(".button.save").after("" + dateMod + "");setTimeout(function () {$("#dateModified").css("opacity", "");}, 5000);}});if (!Cookies.get("NewNotesNoticed"))Cookies.set("NewNotesNoticed", true, { path: '/', expires: 365 });AdjustBody();}function UnDockVideo() {if (!$("#openVideoDock").length && $("#mediaWrapper").length)$("").appendTo(".winBox");if ($("#closeVideoDock").length && $("#mediaWrapper").length) {var rightPos = ($(window).width() - $("#closeVideoDock").offset().left + ($("#closeVideoDock").outerWidth() - 106));var bottomPos = ($('.winBox').outerHeight() - $("#closeVideoDock").offset().top - $("#closeVideoDock").outerHeight());$("#openVideoDock").css({ "right": rightPos + "px", "bottom": bottomPos + "px" });}$("#openVideoDock").fadeIn();$("#openVideoDock").animate({ "bottom": "6px", "right": "7px" }, 300, 'linear');if ($("#mediaWrapper").length != 0) {$("html, body").animate({scrollTop: $("body")}, 600, 'linear');$("#mediaWrapper.docked").appendTo(".mediaStage").removeClass("docked"); //.css("", ""); $("#closeVideoDock").remove();$("#bibleNotes, .winContent").removeClass("videoDocked");}$("#mediaWrapper").removeClass("docked").removeClass("mobileDocked");$(".mobileDock").removeClass("mobileDock");$("#closeVideoDock").remove();return 'true';}function DockVideo() {$("#openVideoDock").remove();if ($("#mediaWrapper").length) { // Don't do anything if there's no videoif ($("body").width() < 900) {DockMobile();}else if ($("#bibleNotes").length) {DockwNotes();}else {DockMobile();}}}function DockMobile() {$(".winBox").addClass("mobileDock");if ($("#bibleNotes").length) {$(".mediaStage > #mediaWrapper").css("opacity", "0").addClass("mobileDock").append("").addClass("docked").animate({ "opacity": "1" }, 900, 'linear');}else {$(".mediaStage > #mediaWrapper").css("opacity", "0").addClass("mobileDock").append("").addClass("docked").animate({ "opacity": "1" }, 900, 'linear');}$("#openVideoDock").remove();}function DockwNotes() {$("#bibleNotes").addClass("videoDocked");$(".mediaStage > #mediaWrapper, .col-bible > #mediaWrapper").css("opacity", "0").appendTo("#bibleNotes").append("").addClass("docked").animate({ "opacity": "1" }, 900, 'linear');}function ResizeDock() {if ($("#mediaWrapper").length && $(".winBox").length) { // Don't do anything if there's no videoif ($("body").width() < 900 && !$(".winBox.mobileDock").length) {//DockMobile();}else if ($(".mediaStage > #mediaWrapper").length && !$("#openVideoDock").length) {if ($("body").width() >= 900 && $("#bibleNotes").length) {$(".winContent").addClass("videoDocked");$(".mobileDock").each(function () {$(this).removeClass("mobileDock");});$("#openVideoDock").remove();$(".mediaStage > #mediaWrapper").css("opacity", "0").appendTo("#bibleNotes").addClass("docked").append("").animate({ "opacity": "1" }, 900, 'linear');$("#WinScriptureBox").css("bottom", "");}}else {UnDockVideo();}}}function FakeResponse(target, changeText, doneText, originalText) {$(target).text(changeText);var loadIcn = "The Lesson of Lot (18)";var successIcn = "The Lesson of Lot (19)";$(target).prepend(loadIcn).addClass("active");setTimeout(function () {$(target).removeClass("active").addClass("done").html(successIcn + doneText);if (doneText == "Error")$(target).addClass('error');else$(target).removeClass('error');}, 1800);if (doneText != "Error") {setTimeout(function () {$(target).text(originalText).removeClass("done").removeClass("error");}, 5500);}}function SaveNotes() {var strNotes = editor.getData().replace(/</g, '<').replace(/>/g, '>').replace(/">/g, '');$("#txtNotes").html(strNotes);var charCount = parseInt($("#notesLength").text().replace(/,/g, ""));$.post("/saveNotes.php", { strNotes: strNotes, lngProduct: lngProduct, lngUser: lngUser, charCount: charCount }, function (data) {var currentTime = new Date();var hours = currentTime.getHours();var minutes = currentTime.getMinutes();var suffix = "AM";if (hours >= 12) {suffix = "PM";hours = hours - 12;}if (hours == 0)hours = 12;if (minutes < 10)minutes = "0" + minutes;if (data.indexOf("Sorry") >= 0) {$("#dateModified").addClass("error").html(data);FakeResponse(".button.save", "Saving", "Error", "Save");}else {$("#dateModified").html(data + "at " + hours + ":" + minutes + " " + suffix + "").addClass("updated");FakeResponse(".button.save", "Saving", "Saved", "Save");}});setTimeout(function () {$("#dateModified:not(.error)").removeClass("updated");}, 5500);}function PrintNotes() {Popup($(".ck-editor__editable_inline").html());}function Popup(data) {var mywindow = window.open('', 'new div', 'height=650,width=450');mywindow.document.write($("#sermonNotes").text() + '

' + data);mywindow.print();mywindow.close();return true;}function SetWinButtons() {$(".winToggle.button").each(function () {$(this).removeClass("open");if ($(this).attr("onclick") == "" && $(this).attr("suspendedonclick"))$(this).attr("onclick", $(this).attr("suspendedonclick"));});}function CheckCursor(input) {var textInput = document.getElementById(input), val = textInput.value;var isAtStart = false, isAtEnd = false;if (typeof textInput.selectionStart == "number") {// Non-IE browsersisAtStart = (textInput.selectionStart == 0);isAtEnd = (textInput.selectionEnd == val.length);} else if (document.selection && document.selection.createRange) {// IE <= 8 branchtextInput.trigger("focus");var selRange = document.selection.createRange();var inputRange = textInput.createTextRange();var inputSelRange = inputRange.duplicate();inputSelRange.moveToBookmark(selRange.getBookmark());isAtStart = inputSelRange.compareEndPoints("StartToStart", inputRange) == 0;isAtEnd = inputSelRange.compareEndPoints("EndToEnd", inputRange) == 0;}if (input == "txtVerse" && isAtStart)InputFocus("txtChapter");else if (input == "txtChapter" && isAtEnd)$("#txtVerse").trigger("focus");}function InputFocus(input) { // puts focus in input at end$("#" + input).trigger("focus");var tmpActiveVal = $("#" + input).val();$("#" + input).val('').val(tmpActiveVal);}function AddNotes(elem) {$clickedVerse = $(elem).closest(".verse");varverseNo = $clickedVerse.find(".verseNo").text();var seeBook = $("#selBibleBook > option:selected").val();var seeChapter = $("#txtChapter").val();var seeVerse = 1;if (verseNo != null && !isNaN(verseNo))// check if clickedVerse is numericseeVerse = verseNo;var scripture = seeBook + ' ' + seeChapter + ':' + seeVerse;var seeVerseText = $clickedVerse.find(".verseText").text();var insertHTML = '
' + scripture + '
' + seeVerseText + '';editor.updateSourceElement();$("#txtNotes").append(insertHTML);const viewFragment = editor.data.processor.toView(insertHTML);const modelFragment = editor.data.toModel(viewFragment);const insertPosition = editor.model.document.selection.getFirstPosition();editor.model.insertContent(modelFragment, insertPosition);clearTimeout(typingTimer);if ($(".ck-editor__editable_inline").length) {typingTimer = setTimeout(SaveNotes, doneTypingInterval);}}var typingTimer; //timer identifiervar doneTypingInterval = 2500; //time in ms, 2.5 seconds $(document).ready(function () {$("body").on("keypress", "#txtChapter, #txtVerse", function (e) {var code = (e.keyCode ? e.keyCode : e.which);if (code == 13) { // Enter keyvar chapter = $("#txtChapter").val().replace(/[^0-9]/g, '');var verse = $("#txtVerse").val().replace(/[^0-9\-]/g, '');if (verse.indexOf("-") == 0)verse = verse.substring(1)if (verse.indexOf("-") >= 0) {verseSplit = verse.split("-");if ($("#selBibleBook > option:selected").val() == "Jude") {verse = verseSplit[0] + "-" + $("#selBibleBook > option:selected").attr("maxVerse");$("#txtVerse").val(verse);}else {if (parseInt(verseSplit[0]) > parseInt(verseSplit[1]))verse = verseSplit[1] + "-" + verseSplit[0];verseSplit = verse.split("-");if (parseInt(verseSplit[1]) > parseInt($("#selBibleBook option:selected").attr("maxVerse"))) {verseSplit[1] = $("#selBibleBook option:selected").attr("maxVerse");verse = verseSplit[0] + "-" + verseSplit[1];}}}else if (parseInt(verse) > parseInt($("#selBibleBook option:selected").attr("maxVerse"))) {verse = $("#selBibleBook option:selected").attr("maxVerse");}if (chapter == "" || chapter == " ")chapter = "1";if (parseInt(chapter) > parseInt($("#selBibleBook option:selected").attr("maxChapter")))chapter = $("#selBibleBook option:selected").attr("maxChapter");$("#txtChapter").val(chapter);$("#txtVerse").val(verse);parseVerse($("#selBibleBook > option:selected").val() + " " + chapter + ":" + verse);}});$("body").on("change", "#selBibleBook", function () {$("#verseSubmit").trigger("click");if ($("#txtChapter").val().length)InputFocus("txtChapter");else$("#txtChapter").trigger("focus");});$("body").on("keyup", "#txtChapter", function (e) {var code = (e.keyCode ? e.keyCode : e.which);if (code == 38) { // Up keyif ((parseInt($(this).val()) + 1) <= parseInt($("#selBibleBook > option:selected").attr("maxChapter"))) {$(this).val(parseInt($(this).val()) + 1);$("#spnChapter").text($(this).val());$("#verseSubmit").trigger("click");}}else if (code == 40) { // Down keyif ((parseInt($(this).val()) - 1) >= 1) {$(this).val(parseInt($(this).val()) - 1);$("#spnChapter").text($(this).val());$("#verseSubmit").trigger("click");}}else if (code == 39) { // Right keyCheckCursor("txtChapter");}$("#spnChapter").text($("#txtChapter").val());$(this).css("width", $("#spnChapter").width() + 11 + "px");});$("body").on("keyup", "#txtVerse", function (e) {var code = (e.keyCode ? e.keyCode : e.which);if (code == 38) { // Up keyif ((parseInt($(this).val()) + 1) <= parseInt($("#selBibleBook > option:selected").attr("maxVerse"))) {$(this).val(parseInt($(this).val()) + 1);$("#spnVerse").text($(this).val());$("#verseSubmit").trigger("click");}}else if (code == 40) { // Down keyif ((parseInt($(this).val()) - 1) >= 1) {$(this).val(parseInt($(this).val()) - 1);$("#spnVerse").text($(this).val());$("#verseSubmit").trigger("click");}}else if (code == 37) { // Left keyCheckCursor("txtVerse");}$("#spnVerse").text($("#txtVerse").val());$(this).css("width", $("#spnVerse").width() + 11 + "px");});$("body").on("click", "#verseColon", function () {InputFocus("txtChapter");});$("body").on("dblclick", ".winBar", function () {if ($(".winBox").css("top") == "0px")$(".winBox").animate({ "top": "40%" }, 300, 'linear');else {$(".winBox").animate({ "top": 0 }, 300, 'linear');}AdjustBody();});$("body").on("click", "#verseSubmit", function () {$("#txtVerse").trigger({type: 'keypress',which: 13});});$("body").on("mouseenter", ".winBar", function () {$(this).removeClass("hint");});$(window).on('keydown', function (event) {if (event.ctrlKey || event.metaKey) {switch (String.fromCharCode(event.which).toLowerCase()) {case 's':event.preventDefault();$(".button.save").trigger("click");break;}}});$("body").on("click", ".button.winToggle:not(.open)", function (e) {$(this).toggleClass("open").attr("suspendedonclick", $(this).attr("onclick")).attr("onclick", "");$(this).siblings(".winToggle").removeClass("open").attr("onclick", $(this).siblings(".winToggle").attr("suspendedonclick"));});$(window).on('resize', function () {ResizeDock();});$("body").on("click", "#WinScriptureBoxContent", function () {if ($("#WinScriptureBoxAutoScrollBtn").hasClass("clicked"))AutoScroll();});// on keyup, start the countdown$("body").on("keypress, keydown", ".ck-editor__editable_inline", function () {clearTimeout(typingTimer);if ($(this).length) {typingTimer = setTimeout(SaveNotes, doneTypingInterval);}});$("body").on("click", ".ck-editor__editable_inline a[href='#']", function () {parseVerse($(this).text());$(this).attr("href", $(this).text());});$("body").on("click", ".ck-editor__editable_inline a[href]", function (e) {if ($(this).attr("href").indexOf("/") <= 0) {parseVerse($(this).attr("href"));}});$("body").on("click", "a.ck-link-actions__preview[href='#']", function (e) {e.stopPropagation();return false;});$("body").on("click", ".ck-editor__editable_inline > a[target='_blank']", function (e) {if ($(this).attr("href").indexOf("/") <= 0) {e.stopPropagation();parseVerse($(this).text());return false;}});$("body").on("hover", ".ck-link-actions__preview > .ck-button__label:contains(void)", function (e) {$(this).text("");});$("body").on("dblclick", ".win-column > .verse", function () {$(this).children(".notes-add").trigger("click");});$("body").on("mouseenter", ".col-bible > .verse", function () {$(this).children(".notes-add").fadeIn();});$("body").on("mouseleave", ".col-bible > .verse", function () {$(this).children(".notes-add").hide();});});var footerLocation;var ProdFoot;var PageFoot;var AnalyticsInterval;var URLInsert = URLInsert ? URLInsert : "";function SetUserAnalyticsFunctions() {userAnalytics.beginAnalytics = function () {userAnalytics.startTime = new Date().getTime();userAnalytics.lastLocation = -1;AnalyticsInterval = setInterval("userAnalytics.checkForUpdates()", 5000); // 5 second resolution. Record changes at MOST once every 5 seconds.this.setAvailableLocations();if ($("#ProductFooter").length) {ProdFoot = $("#ProductFooter").offset() ? $("#ProductFooter").offset().top : $(document).height();PageFoot = $("#PageFooter").offset() ? $("#PageFooter").offset().top : $(document).height();footerLocation = Math.min(ProdFoot, PageFoot);if ($("#bookmarker").length) {if ($("#bookmarker").offset().top > footerLocation) {$("#bookmarker").css('visibility', 'hidden');}else$("#bookmarker").css('visibility', 'visible');}}$(window).on("scroll", function () {//console.log('scrolling');var freezePosition;if ($("#bookmarker").length > 0)freezePosition = $("#bookmarker").offset().top;elsefreezePosition = window.pageYOffset;ProdFoot = $("#ProductFooter").offset() ? $("#ProductFooter").offset().top : $(document).height();PageFoot = $("#PageFooter").offset() ? $("#PageFooter").offset().top : $(document).height();footerLocation = Math.min(ProdFoot, PageFoot);if ($("#bookmarker").length) {if ($("#bookmarker").offset().top > footerLocation)$("#bookmarker").css('visibility', 'hidden');else$("#bookmarker").css('visibility', 'visible');}if (userAnalytics.scrollPosition == freezePosition) // Nothing has changed.return;userAnalytics.scrollPosition = freezePosition;if (typeof freezePosition == "undefined")return;var foundLocation = "Not Found";if (typeof userAnalytics.arrLocations != 'undefined') {$.each(userAnalytics.arrLocations, function (index, ele) {if (typeof ele != "undefined" && ele.locTop < freezePosition) {foundLocation = ele.locId;}elsereturn true; // break out of each});}if (foundLocation != "Not Found") {userAnalytics.recordLocation(foundLocation);}});$(document).on("unload", function () { // Save final snapshot. // final snapshot also grabs timevar time = new Date().getTime();var timeSpent = time - userAnalytics.startTime;$.post(URLInsert + "/user/snapshot.php", { pro: userAnalytics.lngProduct, loc: userAnalytics.lastLocation, timeSpent: timeSpent });});}userAnalytics.setAvailableLocations = function () {$(".jRenderLocation").css("display", "block");userAnalytics.arrLocations = [];var locTop;$(".jRenderLocation").each(function (index, ele) {if ($(this).parents(".jRenderLocation").length == 0) {if ($(ele).is(":visible")) {locTop = $(ele).offset().top;userAnalytics.arrLocations[index] = { locId: this.id, locTop: locTop };}}});//console.log(userAnalytics.arrLocations);}userAnalytics.checkForUpdates = function () {//console.log('checkForUpdates');var loc = 0//console.log('userAnalytics.foundLocation');//console.log(userAnalytics.foundLocation);//console.log('userAnalytics.lastLocation');//console.log(userAnalytics.lastLocation);if (typeof userAnalytics.foundLocation != "undefined" && userAnalytics.foundLocation != "Not Found")var loc = userAnalytics.foundLocation.replace(/\D/g, "");if (loc != userAnalytics.lastLocation) {userAnalytics.lastLocation = loc;$.post(URLInsert + "/user/snapshot.php", { pro: userAnalytics.lngProduct, loc: loc });}}userAnalytics.recordLocation = function (foundLocation) {userAnalytics.foundLocation = foundLocation;$(".jCurrentRenderLocation").removeClass('jCurrentRenderLocation');$("#" + foundLocation).addClass('jCurrentRenderLocation');}}SetUserAnalyticsFunctions();$(document).ready(function() { SearchFunctions();NavDocReady();$('html').on("click", function () {$("#searchSuggestions").slideUp(400, 'linear');ToggleOptions(null, null);$("ul.ui-autocomplete").slideUp('fast');});var EmailSubscribeDefault = $("#txtEmailSubscribe").val();$(document).on("focus","#txtEmailSubscribe",function () { var text = $(this).val(); //console.log(EmailSubscribeDefault); console.trace(); if (text == EmailSubscribeDefault) { $(this).val(userAnalytics.strEmail ? userAnalytics.strEmail : ''); }});$(document).on("blur", "#txtEmailSubscribe", function () {if ($(this).val().length == 0) {$(this).val(EmailSubscribeDefault);}});$(document).on("click", "#cmdFooterSubscribe", function () { if ($("#txtEmailSubscribe").val() != "email@domain.com") { Cookies.set('subscribeEmail', $("#txtEmailSubscribe").val(), { expires: 1 }); } window.location.replace('/subscriptions');});var bolEnteringLanguageMenu = false;$(document).hoverIntent(navHover, navHoverOut, "#topNavLang")function navHover() { if (!$("#topNavLang").hasClass("clicked") && !$("#langOptions").is(":visible")) { bolEnteringLanguageMenu = true; $("#langOptions").slideDown({ duration: 400,easing: 'linear', complete: function () { $("#topNavLang").removeClass('collapsed').addClass('expanded'); bolEnteringLanguageMenu = false; } }); }}function navHoverOut() { if (bolEnteringLanguageMenu) return; if (!$("#topNavLang").hasClass("clicked")) { $("#topNavLang").addClass('collapsed').removeClass('expanded'); $("#langOptions").slideUp(400, 'linear'); }}$(document).on("click", "span.langOption", function () { $("#langOptions").slideUp(400, 'linear'); $("#langOptions").removeClass('expanded').addClass('collapsed'); $("#topNavLang").addClass('collapsed').removeClass('expanded').removeClass("clicked");});SetFooterEvents();if (typeof userAnalytics.beginAnalytics == 'function') userAnalytics.beginAnalytics();Cookies.set('RCG_vid_lng', 97255094, { path: '/', expires: 28800 });Cookies.set('RCG_vid_member', 0, { path: '/', expires: 28800 }); ResizeAd("#rewrittenLiterature");$(window).on('resize', function () {if ($(".notification[id*=orderedWindow]:visible").length >= 1)MoveToRequests();ResizeAd("#rewrittenLiterature");});if (orderedWindowObject == null || orderedWindowObject === undefined) {orderedWindowObject = $("body").find(".notification[id*=orderedWindow]");}var lastScroll = this.scrollY;window.onscroll = function () {if ($(".notification[id*=orderedWindow]").length >= 1) {if ((this.scrollY - lastScroll) > 8) {$(".notification[id*=orderedWindow]:visible").find(".jClose").trigger("click");}else {MoveToRequests();}}lastScroll = this.scrollY;}$(document).on("click", ".showPass", function () {if ($(this).prev("input").hasClass("showing")) {$(this).prev("input").removeClass("showing");$(this).prev("input").prop("type", "password");$(this).text($(this).attr("onshow"));}else {$(this).prev("input").addClass("showing");$(this).prev("input").prop("type", "text");$(this).text($(this).attr("onhide"));}});$(".modFormEx").on("click", function () { // Redirect old modals to new non-modal formsif ($(this).attr("link") == "44") {window.location.replace('/subscriptions');return false;}if ($(this).attr("link") == "5") {window.location.replace('/contact');return false;}if ($(this).attr("link") == "45") {window.location.replace('/forgot');return false;}});if (window.location.href.indexOf("#") > -1) {var jumpLocation = window.location.href.substring(window.location.href.indexOf("#"));if ($targetJump.length > 0) {e.stopEventPropagation;$('html, body').animate({ scrollTop: $(jumpLocation).offset().top - 40 }, 800, 'linear');}}$(document).on("click", ".jClose", function () {$(".notification[id*=orderedWindow]").fadeOut(300, 'linear');});$(".jOrderLit").removeAttr('href');// Cookies Alertvar cookieEnabled = (navigator.cookieEnabled) ? true : false;if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled){ document.cookie="testcookie"; cookieEnabled=(document.cookie.indexOf("testcookie")!=-1)? true : false;}if (!cookieEnabled) {$("body").addClass("cookiesDisabled"); $("body").prepend("

This website requires the use of cookies Explain This and Javascript Explain This to function correctly. Performance and usage will suffer if these are disabled.

Yes, it’s okayCookies Preferences

"); $(".warning").hide(); $(window).on("load", function () { setTimeout(function () { $(".warning").slideToggle(1500); $(".warning").addClass("shown"); }, 1500); });}$(".jScrollTop").on("click", function () {$('html,body').animate({scrollTop: $("#PageHeader").offset().top}, 400, 'linear');});$(".jScrollToFoot").on("click", function () {$('html,body').animate({scrollTop: $("#PageFooter").offset().top}, 400, 'linear');});$(".jBookmarkLink").on("click", function (event) {if (userAnalytics.bolAccount == false) {event.preventDefault();loginBeforeGo($(this).attr('href'));return false;}});$(".jRequestLink").on("click", function (event) {/*if (userAnalytics.bolAccount == false) {event.preventDefault();loginBeforeGo($(this).attr('href'));return false;}*/});$("#orderedWindow a.completeLink").on("click", function () {$("#orderedWindow").fadeOut(500);});$("#orderedWindow a.close").on("click", function () {$("#orderedWindow").fadeOut(500);});$("#orderLink a.close").on("click", function () { $("#orderLink").fadeOut(500);});if ($.browser.msie && $.browser.version < 8) { // This was being bound twice.$(window).on('hashchange', function (e) {CheckJumpTo();});} else {window.onhashchange = CheckJumpTo;}CheckJumpTo();$(".jLogout").on("click", function (event) {event.preventDefault();LogUserOut();return false;});$(document).on("mousemove", function (event) {mousePos = {x: event.pageX,y: event.pageY};});flagModal();if ($.browser.msie && $.browser.version < 8) { // This was being bound twice.$(window).on('hashchange', function (e) {CheckModalHash();});} else {window.onhashchange = CheckModalHash;}CheckModalHash();if (typeof userAnalytics === 'undefined' || typeof userAnalytics.lngUser === 'undefined' || userAnalytics.lngUser == 0) {if (document.URL.indexOf('donate') == -1 && document.URL.indexOf('account') == -1) {checkGlobalLogin(refreshHeader);}}var fnCallBackEnabled = Cookies.get("fnCallBackEnabled");var fnToCallback = Cookies.get("fnToCallBack");if (typeof fnToCallback != "undefined" && fnToCallback != null && fnToCallback.length > 0 && typeof fnCallBackEnabled != "undefined" && fnCallBackEnabled == "true") {var fnParams = Cookies.get("fnParams"); if (typeof fnParams != "undefined" && fnParams != null && fnParams.length > 0) { executeFunctionByName(fnToCallback, window, fnParams); } else executeFunctionByName(fnToCallback, window); $.removeCookie("fnToCallBack", { path: '/' }); $.removeCookie("fnCallBackEnabled", { path: '/' }); $.removeCookie("fnParams", { path: '/' });}$(".imageShaper").on("click", function () { if ($(this).hasClass("zoomed")) $(this).removeClass("zoomed"); else $(this).addClass("zoomed");});$(".imageShaper").on('mouseleave', function () { $(this).removeClass("zoomed");});$(document).on('tap', function (event) { if (!$(event.target).closest('.imageShaper').length) { if($(".imageShaper").hasClass("zoomed")) $(".imageShaper").removeClass("zoomed"); else $(".imageShaper").addClass("zoomed"); }});// discern initial position.$(window).trigger('scroll');$(".switch").on("click", function () {if ($(this).hasClass("on")) $(this).removeClass("on").addClass("off");else$(this).removeClass("off").addClass("on");$(this).find("input").trigger("click");});});/* Navigation.js */function NavDocReady() {SetNavWaypoints();SetNavEvents();SetAboutUsUpdate();$("#mainNavNews").on("click", function (event) {if ($(this).children("span.noNotification").length) {$(".jNews").find("span.noNotification").fadeTo(400, .001);}var d = new Date();Cookies.set("NewsDate", Math.floor(d.getTime() / 1000));});}function SetNavWaypoints() {//return; if (typeof $.fn.waypoint == 'undefined') {setTimeout("SetNavWaypoints()", 100);} else {$("#NavWrapper").height(parseInt($("#NavWrapper").height()));$("#AlertWrapper").height(parseInt($("#AlertWrapper").height()));$('#NavWrapper').waypoint(function (direction) {//console.log('#NavWrapper waypoint function');if (direction == 'up') {//console.log('#NavWrapper up'); $('#NavFloat').removeClass("fixedNav"); $('#LeftToolbar').removeClass("fixedTools"); $('#AlertWrapper').removeClass("fixedAlert");} else {//console.log('#NavWrapper else');$('#NavFloat').addClass("fixedNav");var navFooterHeight = ($("#MainContent").height() + 34 + $("#PageFooter").height());if(navFooterHeight >= screen.height)$('#LeftToolbar').addClass("fixedTools"); $('#AlertWrapper').addClass("fixedAlert");}});}}function SetAboutUsUpdate() {//return;if (typeof $.fn.innerfade_old == 'undefined') {setTimeout("SetAboutUsUpdate()", 20);} else {$('#newsTickerWrap').innerfade_old({animationtype: 'fade',speed: 400,timeout: 7500,type: 'sequence',containerheight: '1.7em',runningclass: 'innerFade'}).children().removeClass("jPrehide");}}function SetNavEvents() {//console.log('SetNavEvents'); console.trace();$("#MenuCompact").off().on("click", function (event) {event.stopPropagation();ToggleMenu();});$(".jCompactNavItem").off().on("click", function (event) {var prefix = $(this).attr("id").substring(0, 10);var id = $(this).attr("id").substring(10);ToggleOptions(id, prefix);event.stopPropagation();});$(".jFullNavItem").off().on("click", function (event) {var prefix = $(this).attr("id").substring(0, 7);var id = $(this).attr("id").substring(7);ToggleOptions(id, prefix);if ($(this).attr("id") == "mainNavAboutUs") {var HasVisible = false;$("#newsTickerWrap").children("span").each(function () {if (!HasVisible) {$(this).css("display", "block");HasVisible = true;} else {$(this).css("display", "none");}});}if ($(this).attr("id") != "mainNavBookshelf" && $(this).attr("id") != "mainNavBookshelf") {event.stopPropagation();}});$(window).off("resize", MenuResizer).on("resize", MenuResizer);}var menuSetting;MenuResizer();function MenuResizer() {if (menuSetting != $("#CompactMenuImg").is(":visible")) {menuSetting = $("#CompactMenuImg").is(":visible");$("#LeftToolbar").removeClass("open").addClass("closed");}}function UserOptionsShowHide() { if ($("#userOptions").is(":visible")) { $("#userOptions").slideUp(400, 'linear'); $("#userControls").removeClass('expanded').addClass('collapsed'); } else { $("#userOptions").slideDown(400, 'linear'); $("#userControls").removeClass('collapsed').addClass('expanded'); }}function ExpandLanguages() { if ($("#langOptions").is(":visible")) { if ($("#topNavLang").hasClass("clicked")) { $("#langOptions").slideUp(400, 'linear'); $("#langOptions").removeClass('expanded').addClass('collapsed'); $("#topNavLang").addClass('collapsed').removeClass('expanded').removeClass("clicked"); } else { $("#topNavLang").addClass("clicked") } } else { $("#langOptions").slideDown(400, 'linear'); $("#topNavLang").removeClass('collapsed').addClass('expanded').addClass("clicked"); }}function ToggleMenu() { if ($("#pageNavCompact").is(":visible")) { $("#pageNavCompact").slideUp(400, 'linear'); $("#MenuCompact").addClass('closed').removeClass('open');$("#LeftToolbar").removeClass("open").addClass("closed");$("#wrapSiteAlert").fadeIn(1000);} else { $("#userOptions").slideUp(400, 'linear'); $("#userControls").removeClass("expanded").addClass("collapsed"); $("#wrapSiteAlert").stop().fadeOut("fast"); $("#pageNavCompact").slideDown(400, 'linear');$("#MenuCompact").removeClass('closed').addClass('open');}}function ToggleOptions(id, prefix) {$(".moreNavOptions").each(function () {if ($(this).attr("id") != $("#options" + id).attr("id")) {$(this).fadeOut(400, 'linear').addClass("jClosed");}});$(".jFullNavItem").removeClass('open');if ($("#options" + id).hasClass('jClosed')) {$("#options" + id).fadeIn('slow', 'linear').removeClass('jClosed');$("#" + prefix + id).addClass('open');} else {$("#options" + id).fadeOut(400, 'linear').addClass("jClosed");}}var arrLocations = arrLocations ? arrLocations : [];function OnPageGoTo() {//console.log("GoToLocation");var divLocations = document.createElement("div");$(divLocations).attr("id", "LocationChooser");var CurrentLocation;console.log(arrLocations);$(arrLocations).each(function () {var spanLocation = document.createElement("span");$(spanLocation).addClass("LocationChooser").html($(this).html()).on("click", { location: $(this).html() }, ChoseLocation);$(divLocations).append($(spanLocation));});$.modal(divLocations, {opacity: 80,overlayClose: true,onclose: function () { arrLocations = []; $.modal.close();}});}function ChoseLocation(e) {if (e) {if (e.data) {if (e.data.location) {var loc = $("h5#" + e.data.location).offset().top - $("#NavWrapper").height();//$("body").animate({ scrollTop: loc }, 150);$("body").scrollTo(loc);}}}$.modal.close();e.stopPropagation();}function SetFooterEvents() { /*$("#navItemFootLanguage").on("click", function (f) {$("#currentLanguage").hide('slow');$("#langSetting").show('slow');} ,function (f) {if ($(f.srcElement).attr("id") != "langSetting") {$("#currentLanguage").show('slow');$("#langSetting").hide('slow');}});*/$("#navItemFootLanguage a").removeAttr("href");}/* Utiltities.js */function closeWarning(id) { if ($("#" + id).hasClass("top") && $("#" + id).hasClass("warning")) $("#" + id).slideToggle(); else $("#" + id).hide(); setTimeout(function () { if ($("body").hasClass("blur")) { $("body").addClass("removeBlur").removeClass("blur"); } $(".faderBG").fadeOut(1500); }, 500); setTimeout(function () { if ($("body").hasClass("blur")) { $("body").removeClass("removeBlur"); } }, 500);}function ToggleShow(id, speed) {speed = parseInt(speed);if (isNaN(speed))speed = 200;if ($("#" + id).is(":visible")) {$("#" + id).hide(speed);} else {$("#" + id).show(speed);}}function ToggleSlide(id, speed, parent) {if (isNaN(speed) || speed == "")speed = Math.min(250, ($("#" + id).height() * 10));if (parent !== undefined && parent !== '') {var prodTarget = $("#" + id).attr("product");$("#" + parent).find(".otherOptions[product='" + prodTarget + "']").slideToggle(speed, "linear").toggleClass("gridVisible");}else {if ($("#" + id).is(":visible")) {$("#" + id).slideUp(speed, "linear");$("#" + id).removeClass("gridVisible");} else {$("#" + id).slideDown(speed, "linear");$("#" + id).addClass("gridVisible");$("#" + id).closest(".multiOptionButton").removeClass("pulsing");}}}function FadeSlide(id, speed) {if (isNaN(speed))speed = Math.min(400, ($("#" + id).height() * 10));if ($("#" + id).is(":visible")) {$("#" + id).fadeOut(speed);$("#" + id).removeClass("gridVisible");} else {$("#" + id).fadeIn(speed);$("#" + id).addClass("gridVisible");$("#" + id).closest(".multiOptionButton").removeClass("pulsing");}}function getUrlVars() {if (window.location.href.indexOf('?') > -1) {var base = '{"' + window.location.href.slice(window.location.href.indexOf('?') + 1).replace(/&/g, '", "').replace(/\=/g, '": "') + '"}';var ret = JSON.parse(base);return ret;}return new Object();}function SaveManyForLater(arrProductIDs, strIdExtra) {if (typeof userAnalytics.bolAccount != "undefined" && userAnalytics.bolAccount == true) {} else {SetModalState("modalFormEx=" + LoginForm);return;}var identifier = strIdExtra + arrProductIDs.join("_");var oldText = $("a.SaveForLater" + identifier).html();$("a.SaveForLater" + identifier).html("Saving");objJqXHR = $.ajax(URLInsert + "/bookmarks/save.php", { data: { id: arrProductIDs, current: userAnalytics.lngProduct } }).done(function (data, status, objJqXHR) {var Results = JSON.parse(data);$(".jBookshelfCount").fadeOut(function () {if(Results.lngBookmarks >= 100) $(".jBookshelfCount").addClass("long");else$(".jBookshelfCount").removeClass("long"); $(".jBookshelfCount").text(Results.lngBookmarks);}).removeClass("hidden").fadeIn().css("display", "");Results.lngProducts.push({ date: null, product: identifier });var arrFinished = Array();for (var i = 0; i < Results.lngProducts.length; i++) {var anc = $("a.SaveForLater" + Results.lngProducts[i].product);if ($(anc).hasClass("add")) {$(anc).addClass("added").removeClass("add").removeClass("hidden").removeAttr("onclick").attr("href", $(anc).attr("savedHref")).removeAttr("savedHref");$(anc).each(function () {//BookmarkedTextif (arrFinished[$(this).attr("id")]) {return true;}if ($("#" + $(this).attr("id") + "BookmarkedText").html()) {$(this).html($("#" + $(this).attr("id") + "BookmarkedText").html());$("#" + $(this).attr("id") + "BookmarkedText").remove();} else {$(this).html("Saved to " + $(this).attr("action") + " later on " + Results.lngProducts[i].date);}$(this).removeAttr("action");$(this).parents(".jBookmarkWrap").addClass("bookmarked");arrFinished[$(this).attr("id")] = true;});}$("#later_" + Results.lngProducts[i].product).addClass('hidden');$("#latered_" + Results.lngProducts[i].product).removeClass('hidden');$("#SideOptions" + Results.lngProducts[i].product).find("div").each(function () {var anc = $(this).find("a.button");if ($(anc).attr("savedtext") || $(anc).attr("savedclass") || $(anc).attr("unsavedclass")) {$(anc).html($(anc).attr("savedtext")).addClass($(anc).attr("savedclass")).removeClass($(anc).attr("unsavedclass")).removeAttr("savedtext savedclass unsavedclass");}});$("div#SaveForLater" + Results.lngProducts[i].product).addClass("hidden");$("a#saveLink" + Results.lngProducts[i].product).removeClass("hidden");}}).fail(function (objJqXHR, status, strError) { }).always(function (objJqXHR, status) {HideLoading();ClearInfo();$("#SubjectMenu").children(".jLoading").addClass("Hidden");});return false;}function flagBookmarkedFields(ProductID) { $("#later_" + ProductID).addClass('hidden'); $("#mobileSaveOptions-" + ProductID + ' li#mobileSaveLater').addClass('hidden'); $("#mobileSaveOptions-" + ProductID + ' li#mobileSavedLater').removeClass('hidden'); $("#requestQueueSave-" + ProductID + ' a.saveForLater').attr('onclick', '').off('click').attr('href', '/bookshelf.html').html('Saved to bookshelf').addClass("added");var bookshelf = $("#jLitSaveForLater").attr("bookshelf"); $("#jLitSaveForLater").attr('onclick', '').off('click').attr('href', bookshelf).addClass('saved').addClass('burgundy').html(' ' + $("#jLitSaveForLater").attr('saved') + ' ' + $("#jLitSaveForLater").attr('viewbookshelf') + ''); $("#aSaveItem" + ProductID).text($("#aSaveItem" + ProductID).attr('savedtext')).removeClass('add').addClass('added').attr('href', $("#aSaveItem" + ProductID).attr('savedhref')).attr('onclick', '').off('click'); $("#listItem_" + ProductID).addClass('bookmarked'); $("#latered_" + ProductID).removeClass('hidden'); $("#SideOptions" + ProductID).find("div").each(function () { var anc = $(this).find("a.button"); if ($(anc).attr("savedtext") || $(anc).attr("savedclass") || $(anc).attr("unsavedclass")) { $(anc).html($(anc).attr("savedtext")).addClass($(anc).attr("savedclass")).removeClass($(anc).attr("unsavedclass")).removeAttr("savedtext savedclass unsavedclass"); } }); $("div#SaveForLater" + ProductID).addClass("hidden"); $("a#saveLink" + ProductID).removeClass("hidden");}function SaveForLater(ProductID, bolSeries) { if (typeof userAnalytics.bolAccount == "undefined" || userAnalytics.bolAccount != true) { loginAndCallBack("SaveForLater", [ProductID]);return; } if (typeof bolSeries == "undefined") { bolSeries = 'false'; } var oldText = $("#listItem_" + ProductID + " a.SaveForLater").html(); if ($("a.SaveForLater" + ProductID).attr("savingtext") != "undefined") { $("a.SaveForLater" + ProductID).html($("a.SaveForLater" + ProductID).attr("savingtext")); } else { $("a.SaveForLater" + ProductID).html("Saving"); }//$.get(URLInsert + "/user/bookmarkSave.php", { pro: ProductID }, function (date) {objJqXHR = $.ajax(URLInsert + "/bookmarks/save.php", { data: { id: ProductID, current: userAnalytics.lngProduct, bolSeries: bolSeries } }).done(function (data, status, objJqXHR) { if (data == "TRANSIENT") { loginAndCallBack("SaveForLater", [ProductID]); return; } $.get('/v4.php?refreshUser');var Results = JSON.parse(data);$(".jBookshelfCount").fadeOut(function () {if(Results.lngBookmarks >= 100) $(".jBookshelfCount").addClass("long");else$(".jBookshelfCount").removeClass("long");$(".jBookshelfCount").text(Results.lngBookmarks);}).removeClass("hidden").fadeIn().css("display", "");if (bolSeries) { $("a.SaveForLaterMagazine" + ProductID).addClass("added").removeClass("add").removeAttr("onclick") .attr("href", $("a.SaveForLaterMagazine" + ProductID).attr("savedHref")).removeAttr("savedHref") .text($("#aSaveItemMagazine" + ProductID + "BookmarkedText").text());}for (var i = 0; i < Results.lngProducts.length; i++) {var anc = $("a.SaveForLater" + Results.lngProducts[i].product);if ($(anc).hasClass("add")) {$(anc).addClass("added").removeClass("add").removeClass("hidden").removeAttr("onclick").attr("href", $(anc).attr("savedHref")).removeAttr("savedHref");$(anc).each(function () {//BookmarkedTextif ($("#" + $(this).attr("id") + "BookmarkedText").html()) {$(this).html($("#" + $(this).attr("id") + "BookmarkedText").html());$("#" + $(this).attr("id") + "BookmarkedText").remove();} else { if ($(this).attr("savedtext")) { $(this).html($(this).attr("savedtext") + " " + Results.lngProducts[i].date); } else { $(this).html("Saved to " + $(this).attr("action") + " later on " + Results.lngProducts[i].date); } }$(this).removeAttr("action");});}if (typeof Results.lngProducts[i].product != "undefined") { flagBookmarkedFields(Results.lngProducts[i].product);} else { flagBookmarkedFields(Results.lngProducts[i]);}}$("div#desktopLitOptions span.bookshelfControl a#jLitSaveForLater").addClass('burgundy');}).fail(function (objJqXHR, status, strError) { }).always(function (objJqXHR, status) {HideLoading();ClearInfo();$("#SubjectMenu").children(".jLoading").addClass("Hidden");});return false;}function refreshReminders() { if ($("#AlertWrapper").is(":visible")) return; var marks = 0; var requests = 0; if ($("#mainNavBookshelf span.noNotification").length) { marks = $("#mainNavBookshelf span.noNotification").html(); if (parseInt(marks) > 0) { $("#ListingReminders").show().removeClass('hidden'); $("#savedForLaterCount").show(); $("#savedForLaterCount span.countNo").html(marks); } } if ($("#mainNavRequests span.noNotification").length) { requests = $("#mainNavRequests span.noNotification").html(); if (parseInt(requests) > 0) { $("#ListingReminders").show().removeClass('hidden'); $("#requestQueue").show(); $("#requestQueue span.countNo").html(requests); } }}function refreshHeader(skipNav) { if (typeof window.subjectControl == 'undefined') var subjectControl = false; else { var subjectControl = window.subjectControl; }skipNav = typeof skipNav !== 'undefined' ? skipNav : false;$.post(URLInsert + "/user/refreshHeader.php", { ProductID: ProductID, subjectControl: subjectControl, subSiteRoot: subSiteRoot }, function (data) {$("#PageHeader").replaceWith(data);refreshReminders();if (typeof SetNavWaypoints == 'function') {NavDocReady();SearchFunctions();}});$.post(URLInsert + "/user/refreshFooter.php", { ProductID: ProductID, subSiteRoot: subSiteRoot }, function (str) {if ($("div.footerContainer").length) {$("div.footerContainer").attr("id", "__REPLACE_THIS_DIV__").after(str);$("#__REPLACE_THIS_DIV__").remove();SetFooterEvents();}});} function validVar(toCheck) { if (typeof toCheck != "undefined" && toCheck != null && toCheck != "") return true; else return false;}function executeFunctionByName(functionName, context /*, args */) { var args = Array.prototype.slice.call(arguments, 2); var namespaces = functionName.split("."); var func = namespaces.pop(); for (var i = 0; i < namespaces.length; i++) { context = context[namespaces[i]]; } return context[func].apply(context, args);}function loginAndCallBack(str, params) { Cookies.set("fnToCallBack", str, { path: '/' }); Cookies.set("fnParams", params, { path: '/' }); Cookies.set("fnURL", window.location.href, { path: '/' }); window.location.replace(LoginLocation); return false;}function validVar(toCheck) { if (typeof toCheck != "undefined" && toCheck != null && toCheck != "") return true; else return false;}function loginAndComeBack(bookmarkSpot) { var url = window.location.pathname; window.location.replace(LoginLocation + "?p=" + encodeURI(url) + "&loc=" + bookmarkSpot.replace("Loc-Ren", ""));}function loginBeforeGo(URL) {if (!userAnalytics.bolAccount) { window.location.replace(LoginLocation + "?p=" + URL);return true;} else {window.location = URL;}}function checkForTransient(str) {if (str == "TRANSIENT") {return true;}return false;}$(document).on("click", ".jRequestButton", function () {if (typeof pro == undefined || typeof pro == "undefined")return;$("#optionRequest-" + pro + ' a.button').removeAttr('onclick').off('click').addClass("litOrderSuccess");$("#order-" + pro).addClass('hidden');$("#ordered-" + pro).removeClass("hidden");setTimeout(function () {$("#optionRequest-" + pro + ' a.button').attr("href", URLInsert + "/requests");}, 0);OrderLit(pro);});var mousePos = { x: -1, y: -1 };var orderedWindowObject;function ShowOrderedWindow(pro) {var y = mousePos.y - 70;var x = mousePos.x - 170;while ((x + $("#orderedWindow").width() + 50) > $('body').innerWidth())x -= 10;while ((y + $("#orderedWindow").height()) > $(document).height())y -= 10;if (y < $(document).scrollTop() + 60)y = $(document).scrollTop() + 60;if (y < 0)y = 10;if (x < 0)x = 10;let imgSrc = $(".litCover[product='" + pro + "']").first().clone();$("#orderedWindow img.jInnerImage").replaceWith(imgSrc);$("#orderedWindow .notificationText img").addClass("jInnerImage");orderedWindowObject = $("#orderedWindow").clone();if ($(".notification[id*=orderedWindow]").length >= 2) // Get rid of extras$(".notification[id*=orderedWindow]").remove();orderedWindowObject.prependTo("#MainContent").show().css("top", y);orderedWindowObject.css("left", x);if(orderedWindowObject.find(".jInnerImage").length >= 2)$(".jInnerImage.litCover.featured").remove();setTimeout(MoveToRequests, 0);}function MoveToRequests() {if ($("#mainNavRequests").is(":visible")) {var offset = $("#mainNavRequests").offset();var x = Math.round(offset.left);var y = Math.round(offset.top);if ($("body").hasClass("homepage")) {x = Math.round(offset.left) - (orderedWindowObject.width() / 2);y = Math.round(offset.top) + ((orderedWindowObject.height() / 2) - 28);}else if ($("body").hasClass("library")) {x = x - orderedWindowObject.width();}else if ($("body").hasClass("literature")) {y = y + (orderedWindowObject.height() / 2) - 15;} if (y < $("#PageHeader").height() + 25) y = $("#PageHeader").height() + 25; while ((x + orderedWindowObject.width() + 50) > $('body').innerWidth()) x -= 10; while ((y + orderedWindowObject.height()) > $(document).height()) y -= 10; if (y < $(document).scrollTop() + 60) y = $(document).scrollTop() - 60; if (y < 0) y = 10; if (x < 0) x = 10; orderedWindowObject.css({ left: x, top: y });//orderedWindowObject.animate({ left: x, top: y }, 300, 'linear'); }}function OrderLit(pro) { if (parseInt(pro) == PRODUCT_GPU) { $("#orderLink").css({'top': lngY, 'left': lngX }).fadeIn('slow'); return; }if (typeof userAnalytics.bolAccount != "undefined") {//MOBif ($("#litOffer-" + pro).hasClass("jReplace")) {var newFirst = $("#litOffer-" + pro).closest(".multiOptionButton").find(".jMakeFirst").first();$("#litOffer-" + pro).after(newFirst);}$("#litOffer-" + pro).addClass("hidden");/* For desktop literature options only: */$("#orderLitButton-" + pro).addClass("hidden");$("#freeCopyBubble-" + pro).addClass("hidden");/* For mobile literature options: */$(".jMobileRequest").toggleClass("hidden");/* For listing page order options: */$("#btnLitOffer_" + pro).addClass("hidden");if (userAnalytics.bolAccount) { // Can do instant if they have an account//MOB$("#litOffered-" + pro).removeClass("hidden");$("#offered-" + pro).removeClass("hidden");$("#ordered-" + pro).removeClass("hidden").removeAttr("href");$("#order-" + pro).addClass("hidden");if ($("#litOffer-" + pro).hasClass("jReplace")) {var newFirst = $("#litOffer-" + pro).closest(".multiOptionButton").find(".jMakeFirst").first();$("#litOffer-" + pro).after(newFirst);if (!$("#extra" + pro + $("#litOffer-" + pro).attr("extraid")).is(":visible")) {ToggleSlide("extra" + pro + $("#litOffer-" + pro).attr("extraid"));}}/* For desktop literature options only: */$("#orderedLitButton-" + pro).removeClass("hidden");/* For mobile literature options: */$("#mobileOrder-" + pro).addClass("litOrderSuccess");/* For listing page order options: */$("#btnLitOffered_" + pro).removeClass("hidden");ShowOrderedWindow(pro);}}$.post(URLInsert + "/user/requestAdd.php", { pro: pro }, function (str) {if (checkForTransient(str)) return;if (!userAnalytics.bolAccount) {//MOB$("#litOffered-" + pro).removeClass("hidden");$("#offered-" + pro).removeClass("hidden");if ($("#litOffer-" + pro).hasClass("jReplace")) {var newFirst = $("#litOffer-" + pro).closest(".multiOptionButton").find(".jMakeFirst").first();$("#litOffer-" + pro).after(newFirst);if (!$("#extra" + pro + $("#litOffer-" + pro).attr("extraid")).is(":visible")) {ToggleSlide("extra" + pro + $("#litOffer-" + pro).attr("extraid"));}}/* For desktop literature options only: */$("#orderedLitButton-" + pro).removeClass("hidden");/* For mobile literature options: */$("#mobileOrder-" + pro).addClass("litOrderSuccess");/* For listing page order options: */$("#btnLitOffered_" + pro).removeClass("hidden");ShowOrderedWindow(pro);}userAnalytics.bolAccount = true; refreshHeader();//if ($("#mobImage-" + pro).length) {//TrackEvent(REQUEST, ADD_TO_Q, $("#mobImage-" + pro).attr("mobtitle"), 0, false);//}//else if ($("#listItem_" + pro).length && $("#listItem_" + pro + " span.productCover img").length) {TrackEvent(REQUEST, ADD_TO_Q, $("#listItem_" + pro).find(".productTitle").html().replace(/(<([^>]+)>)/ig, ""), 0, false);}else if ($("#pageTitle").length) {TrackEvent(REQUEST, ADD_TO_Q, $("#pageTitle").html(), 0, false);}TrackEvent(REQUEST, ADD_FROM_PAGE, document.title, 0, false);});return false;}function ClearState() {var top = $(document).scrollTop();//$.bbq.removeState('jumpTo');$(document).scrollTop(top);}function CheckJumpTo() {//var state = $.bbq.getState('jumpTo');//if (typeof state != 'undefined' && state != 0) {//$(document).scrollTop(state);//setTimeout(ClearState, 0);//}}function ModalClose(str) {if (str == LoginForm) {if (!userAnalytics.bolAccount && loginRequired) {window.location = URLInsert + '/home';}}}function checkGlobalLogin(successFunc) {$.support.cors = true;$.ajax(accountsLocation + "ServiceLogin", {xhrFields: { withCredentials: true },crossDomain: true,data: { 'continue': "token" },type: 'GET',success: function (data) {if (data != "NO" && data.length > 0) {$.post(URLInsert + "/user/recordLogin.php", { t: data }, function (str) {if (str == 'success') {if (typeof (successFunc) == 'function')successFunc();}});}}});}function recordGlobalLogin(publicKey, successFunc) {$.support.cors = true;$.ajax(accountsLocation + "RecordLogin", {xhrFields: { withCredentials: true },crossDomain: true,data: { 'continue': "token", "r": publicKey },type: 'GET',success: function (data) {if (typeof (successFunc) == 'function')successFunc();}});}function ShowSeries(sid) {if ($("#SeriesList" + sid).is(":visible")) {$("#SeriesList" + sid).slideUp(150, 'linear');$("#ExpandCollapse-" + sid + " .expandWord").removeClass("Hidden");$("#ExpandCollapse-" + sid + " .collapseWord").addClass("Hidden");$("#ExpandCollapse-" + sid).removeClass("expanded").addClass("collapsed");} else {$("#SeriesList" + sid).slideDown(150, 'linear');$("#ExpandCollapse-" + sid + " .expandWord").addClass("Hidden");$("#ExpandCollapse-" + sid + " .collapseWord").removeClass("Hidden");$("#ExpandCollapse-" + sid).addClass("expanded").removeClass("collapsed");;}}//#region More Buttonfunction FetchMore(appender, deleter, gotourl, q, starter) {$("#" + deleter).off().html('The Lesson of Lot (20)');bolUpdateCSS = false;bolNoScroll = true;objJqXHR = $.ajax(gotourl, { data: { next: starter, q: q, bolAjax: 1, subSiteRoot: subSiteRoot } }).done(function (data, status, objJqXHR) {$("#" + deleter).remove();var thisData = $.parseHTML(data, document, true);var intDelay = 1;$(thisData).children().each(function () {$(this).addClass("Hidden");$("#" + appender).append($(this));$(this).attr("oldid", $(this).attr("id"));$(this).attr("id", $(this).attr("id") + '_' + parseInt(Math.random() * 1000000));var fadeInId = $(this).attr("id");setTimeout(function () {$("#" + fadeInId).removeClass("Hidden").hide(0).slideDown(300).attr("id", $("#" + fadeInId).attr("oldid")).removeAttr("oldid");}, intDelay * 200);intDelay++;});$(thisData).filter("script").each(function () {$("#" + appender).append($(this));});}).fail(function (objJqXHR, status, strError) { }).always(function (objJqXHR, status) {bolNoScroll = true;AjaxPageReset();});}//#endregion//#region Ajaxvar timeLoading;function LoadingScreen(str) { return; // disabled for nowvar LoadingDelay = 1500;clearTimeout(timeLoading);timeLoading = setTimeout(function () {if ($("#LoadingScreen").length > 0) {var divLoading = $("#LoadingScreen");$(divLoading).html(null);} else {var divLoading = document.createElement("div");$(divLoading).attr("id", "LoadingScreen");}var spanLoadingWrap = document.createElement("span");$(spanLoadingWrap).attr("id", "LoadingWrap");$(divLoading).append($(spanLoadingWrap));var spanLoading = document.createElement("span");$(spanLoading).addClass("pageTitle");$(spanLoadingWrap).append($(spanLoading));if (typeof str != "undefined" && str.length > 0) {$(spanLoading).html(str);} else {$(spanLoading).html("Loading");var imgLoading = document.createElement("img");$(imgLoading).attr("src", "https://images.azureedge.net/images/interface/ajax-loader_transparent.gif");$(spanLoadingWrap).append($(imgLoading));}$("#PageContent").append($(divLoading).fadeIn(150));}, LoadingDelay);}function HideLoading(ms) {clearTimeout(timeLoading);if (isNaN(ms)) {ms = 0;}timeLoading = setTimeout(function () {while ($("#LoadingScreen").length > 0) {$("#LoadingScreen").remove();}}, parseInt(ms));}function ResizeAd(id) {if($(id).length) {var pageWidth = parseFloat($("#PageContent").innerWidth());console.log("pageWidth: " + pageWidth);if(pageWidth >= 1050) {pageWidth + 10;var o1 = $("#PageContent").offset();var o2 = $("#mainText").offset();var dx = o1.left - o2.left;var dy = o1.top - o2.top;var distance = (Math.sqrt(dx * dx + dy * dy) - 5);$(id).parent(".jRenderLocation").css("background", '#E7E7E7').css("width", pageWidth).css("margin-left", (distance * -1));$(id).css("max-width", "900px").css("margin-left", "auto").css("margin-right", "auto").css("padding-bottom", "1.5em");}else {$(id).parent().css("background", '').css("width", '').css("margin-left", '');$(id).css("max-width", "").css("margin-left", "").css("margin-right", "").css("padding-bottom", "");}}}//#endregionfunction SearchFunctions() {//SetAutocomplete(); $(document).on("keypress", "#q", function (e) { if (e.which == 13) { if (typeof $("#q").val() ==undefined || $("#q").val().length == 0) { e.preventDefault(); return false; } } });$('#q').off().on("click",function (event) {event.stopPropagation();if ($("body").width() < 658) {$.scrollTo('#search', 800, { offset: -7 }, { easing: 'easeOutBack' });}$("#searchSuggestions").slideDown('slow', 'linear');}).off("focus").on("focus", function () {$(this).removeClass("blank");if ($(this).val() != "") {}}).off("blur").on("blur", function () {if ($(this).val() == "") {$(this).addClass("blank");}});$(".popularSearch").off().on("click", function () {$("#q").val(($(this).html()));document.getElementById('search').submit();});$("#searchSuggestions ul li").on("mouseenter", function () {$("#searchSuggestions li.first").removeClass("active");});}function SetAutocomplete() {if (typeof $.fn.autocomplete == 'undefined') {if (AutocompleteTimer++ < 1000)setTimeout("SetAutocomplete()", 50);//else//console.log('autocomplete will not load'); console.trace();} else {$("#q").autocomplete({ delay: 0, autoFocus: true, minLength: 0,source: AutocompleteOptions,open: function (event) {$("ul.ui-autocomplete li:gt(10)").hide();$("li:contains('(Not currently available)')").addClass('auto-disabled');},close: function (event) {$("ul.ui-autocomplete li").remove();},focus: function (event, ui) {return false; // Don't update the text until select.},search: function () {$("#searchSuggestions").slideUp(400, 'linear');return true;},select: function (event, ui) {$(this).val(ui.item.label);document.getElementById('search').submit();return false;}});AutocompleteTimer = 0;}}//#region More Info Modalvar locMouse = {pageX: 0,pageY: 0,};var mouseMove;var bolClickInfo = new Object;var tListing = new Object;$(document).on("mousemove", function (e) {//console.log('mouse move event');mouseMove = e;locMouse.pageX = e.pageX;locMouse.pageY = e.pageY;});var sizeWindow = {width: $(window).width(),height: $(window).height(),};$(window).on("resize", function (e) {if (sizeWindow.width == $(window).width() && sizeWindow.height == $(window).height()) {e.stopPropagation();return;}sizeWindow = {width: $(window).width(),height: $(window).height(),};//console.log('resize');//console.log(e);ClearAllInfo();});function ClearAllInfo() {//console.log("ClearAllInfo"); printStackTrace();if ($("#InfoModal").length > 0) {$("#InfoModal").fadeOut(300, "linear", function () {$(this).remove();ClearAllInfo();});}}function ClearInfo(xId) {// console.log("ClearInfo");// console.trace();// console.log(xId);clearTimeout(tListing[xId]);bolClickInfo[xId] = false;$("#InfoModal" + (typeof xId != "undefined" ? "." + xId : null)).fadeOut(300, "linear", function () {$(this).remove();});}function HoverShowInfo(obj, xId) {// console.log('HoverShowInfo');// console.trace();// console.log(xId);if (!bolClickInfo[xId]) {ClearInfo(xId);tListing[xId] = setTimeout(function () {ShowInfo(obj, false, xId);}, 500);}}function HoverClose(xId) {// console.log('HoverClose');// console.trace();// console.log(xId);if (!bolClickInfo[xId]) {clearTimeout(tListing[xId]);tListing[xId] = setTimeout(function () {ClearInfo(xId);}, 1000);}}function ShowInfo(obj, bolPersist, xId) {clearTimeout(tListing[xId]);// console.log('ShowInfo');// console.trace();console.log(obj);//console.log(bolPersist);// console.log(xId);var nId = xId.replace(/\D/g, "");// console.log(nId);ClearInfo(xId);var divMain = document.createElement("div");$(divMain).attr("id", "InfoModal").css("position", "absolute").addClass(xId).addClass(obj.prodType);if (obj.imgSrc) {var i = document.createElement("img");$(i).attr("id", "imgInfo").attr("src", obj.imgSrc).attr("alt", obj.altTitle);$(divMain).append($(i));}var iOverlay = document.createElement("div");$(iOverlay).attr("id", "ImageOverlay");$(divMain).append($(iOverlay));var divTextWrapper = document.createElement("div");$(divTextWrapper).attr("id", "InfoText");var divTitle = document.createElement("div");$(divTitle).attr("id", "InfoTitle");$(divTitle).html(obj.strTitle);$(divTextWrapper).append($(divTitle));var divPromo = document.createElement("div");$(divPromo).attr("id", "InfoPromo");$(divPromo).html(obj.strPromo);$(divTextWrapper).append($(divPromo));var divSwaddle = document.createElement("div");$(divSwaddle).addClass("actionButtons");$(divTextWrapper).append($(divSwaddle));if (obj.bolLater) {var aLater = document.createElement("a");$(aLater).attr("id", "aSaveItem" + nId).addClass("SaveForLater" + nId).addClass("button").addClass("playlistControl").addClass(obj.strLaterClass);if (!obj.bolLoggedIn) {$(aLater).attr("href", obj.strLoginHref);}//console.log(aLater);//"Save to Playlistvar strUnsaved = "Save to Playlist";var strSaved = "In Playlist";if (obj.lngSeries > 0) {strUnsaved = "Save Series to Playlist";strSaved = "Series in Playlist";}var spanIcon = document.createElement("span");$(spanIcon).addClass("icon").addClass("add" + (obj.bolSaved ? "ed" : "")).html("");var spanBubble = document.createElement("span");$(spanBubble).addClass("commentBubbleTop").html("");var spanToolTip = document.createElement("span");$(spanToolTip).addClass("toolTip").addClass("bottom").html("View Playlist").prepend(spanBubble);var holder = document.createElement("span");$(holder).append($(spanIcon)).append($(spanToolTip));var spanDisplay = document.createElement("span");$(spanDisplay).addClass("text");if (obj.bolSaved) {$(aLater).attr("href", "/my-playlist");$(spanDisplay).html(strSaved);} else {$(aLater).attr("onclick", "SaveForLater(" + nId + ", false)").attr("savedhref", "/my-playlist").attr("saved", $(holder).html() + strSaved);$(spanDisplay).html(strUnsaved);}$(aLater).append($(spanIcon)).append($(spanToolTip)).append($(spanDisplay));$(divSwaddle).append($(aLater));}if (obj.bolNow) {var span3 = document.createElement("span");$(span3).addClass("icon").html("");var span4 = document.createElement("span");$(span4).addClass("text").html(obj.strNow);var aNow = document.createElement("a");$(aNow).attr("id", "aNowItem" + nId).attr("href", "/" + nId).addClass("button").addClass(obj.strNowClass).append($(span3)).append($(span4));$(divSwaddle).append($(aNow));}setTimeout(function () {$(divMain).append($(divTextWrapper));}, 5);bolClickInfo[xId] = bolPersist;var spanClose = document.createElement("span");spanClose.setAttribute("class", "close icon");$(spanClose).html("close").on("click", function () {ClearInfo(xId);});$(divMain).append($(spanClose));if (!bolPersist) {$(divMain).on("mouseout", function () {clearTimeout(tListing[xId]);tListing[xId] = setTimeout(function () {ClearInfo(xId);}, 1000);});$(divMain).on("mouseover", function () {clearTimeout(tListing[xId]);});}$("body").append($(divMain).fadeIn(300, "linear"));if (locMouse.pageX == 0 && locMouse.pageY == 0) {$(divMain).css("top", locMouse.pageY).css("left", locMouse.pageX).position({my: "left top",at: "right top",of: "#ShowInfo" + xId.replace(/\D/g, ""),within: "#MainContent",collision: "fit",});} else {$(divMain).css("top", locMouse.pageY).css("left", locMouse.pageX).position({my: "left top",of: mouseMove,collision: "fit",});}}function ExtraInfo(xId, expander, InnerWrapper) {if ($("#tag" + xId).hasClass("goUp")) {ClearInfo(xId);$("#" + InnerWrapper).removeClass("level2Expanded");$("#" + expander).slideUp(400, "linear");} else {$("#" + InnerWrapper).addClass("level2Expanded");$("#" + expander).slideDown(400, "linear");}Collapse("tag" + xId, "expanded" + xId);$(window).trigger("resize");}$(document).on("mouseup touchend", function (e) {var container = $("#InfoModal");if (!container.is(e.target) // if the target of the click isn't the container...&& container.has(e.target).length === 0) // ... nor a descendant of the container{$("#InfoModal").find(".close.icon").trigger("click");}});//#endregion
The Lesson of Lot (2024)

References

Top Articles
Latest Posts
Article information

Author: Edwin Metz

Last Updated:

Views: 6378

Rating: 4.8 / 5 (78 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Edwin Metz

Birthday: 1997-04-16

Address: 51593 Leanne Light, Kuphalmouth, DE 50012-5183

Phone: +639107620957

Job: Corporate Banking Technician

Hobby: Reading, scrapbook, role-playing games, Fishing, Fishing, Scuba diving, Beekeeping

Introduction: My name is Edwin Metz, I am a fair, energetic, helpful, brave, outstanding, nice, helpful person who loves writing and wants to share my knowledge and understanding with you.