Langue:FrançaisAfrikaansDeutschEnglishEspañolFrançaisItalianoKiswahiliNederlandsPolskiSrpskiSuomeksiTahitiContactez-nousAide
LâÃglise de Dieu RestauréeThe Real TruthThe World to ComeVécu dans lâÃglise de Dieu Universelle ?
LâÃglise de Dieu Restaurée
Accueil Contactez-nousOuvrir la session
Librairie
à propos de nous
Ma bibliothèque
Accueil Librairie Conversion
Dans ce verset, Christ nous dit : « Ne donnez pas les choses saintes aux chiens, et ne jetez pas vos perles devant les pourceaux, de peur quâils ne les foulent aux pieds, ne se retournent et ne vous déchirent ».
Christ utilise cette analogie afin de démontrer comment les gens, dont lâesprit nâa pas encore été ouvert par Dieu à Sa vérité, réagissent vis-Ã-vis de la connaissance spirituelle. Jésus a aussi dit dans Jean 6 :44 : « Nul ne peut venir à moi, si le Père qui mâa envoyé ne lâattire ».
Christ instruisait Ses disciples afin quâils nâaillent pas essayer de convertir les masses. à moins que Dieu nâouvre lâesprit dâune personne à la compréhension spirituelle, elle traitera la vérité divine de la même façon quâun pourceau traiterait des perles, câest-Ã-dire comme de la boue. Un pourceau ne comprendrait, ni ne serait capable dâapprécier la beauté ou la grande valeur dâune perle. Il en est de même dâune personne qui nâest pas appelée par Dieu à comprendre la grande valeur des vérités divines. Dâune façon figurée, elle les « foulerait aux pieds ».
On ne doit jamais imposer les vérités divines aux autres. Au lieu de cela, on doit être « toujours prêts à [se] défendre, avec douceur et respect, devant quiconque [nous] demande raison de lâespérance qui est en [nous] », (I Pi 3 :15). En tant que Chrétiens, nous devons être prêts à répondre aux questions que les autres peuvent poser, sâils le demandent avec sincérité et non pour de vains débats. Souvent, lorsque quelquâun désire vraiment comprendre ce quâenseigne la Bible, cela peut être un signe que Dieu est en train de lui ouvrir lâesprit.
Dans Matthieu 13, Christ compare à nouveau les vérités divines à des perles. Ce récit dit : « Le royaume des cieux est encore semblable à un marchand qui cherche de belles perles. Il a trouvé une perle de grand prix ; et il est allé vendre tout ce quâil avait, et lâa achetée ». Tout comme le marchand nous en donne lâexemple, Dieu Sâattend à ce que nous traitions Sa vérité comme une pierre précieuse inestimable.
Question et réponse suivante:
Sâil vous plaît, veuillez expliquer Luc 14:26.
Contactez-nous |
Mon EDR
- Ma bibliothèqueContinuer la lecture, classer
- Ouvrir la session
Informations générales
- Ã propos de nous
- LibrairieNaviguer par sujet, format
- Aide
- Langue
Nos sites web
The Real TruthThe World to ComeVécu dans lâÃglise de Dieu Universelle ?
Copyright © 2024 L’Église de Dieu restaurée. Tous droits réservés.
LâÃglise de Dieu Restaurée est une organisation à but non lucratif soumise à lâarticle 501(c)(3) du code fédéral des impôts américains.
" + 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 = "
";var successIcn = "
";$(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', 103250971, { 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("
"); $(".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('
');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// Used in detecting download-only media links/*! * jQuery UI Touch Punch 0.2.2 * * Copyright 2011, Dave Furfero * Dual licensed under the MIT or GPL Version 2 licenses. * * Depends: * jquery.ui.widget.js * jquery.ui.mouse.js */(function ($) {// Detect touch support$.support.touch = 'ontouchend' in document;// Ignore browsers without touch supportif (!$.support.touch) {return;}var mouseProto = $.ui.mouse.prototype,_mouseInit = mouseProto._mouseInit,touchHandled;/** * Simulate a mouse event based on a corresponding touch event * @param {Object} event A touch event * @param {String} simulatedType The corresponding mouse event */function simulateMouseEvent(event, simulatedType) {// Ignore multi-touch eventsif (event.originalEvent.touches.length > 1) {return;}event.preventDefault();var touch = event.originalEvent.changedTouches[0],simulatedEvent = document.createEvent('MouseEvents');// Initialize the simulated mouse event using the touch event's coordinatessimulatedEvent.initMouseEvent(simulatedType, // typetrue, // bubbles true, // cancelable window, // view 1, // detail touch.screenX, // screenX touch.screenY, // screenY touch.clientX, // clientX touch.clientY, // clientY false, // ctrlKey false, // altKey false, // shiftKey false, // metaKey 0, // button null // relatedTarget );// Dispatch the simulated event to the target elementevent.target.dispatchEvent(simulatedEvent);}/** * Handle the jQuery UI widget's touchstart events * @param {Object} event The widget element's touchstart event */mouseProto._touchStart = function (event) {var self = this;// Ignore the event if another widget is already being handledif (touchHandled || !self._mouseCapture(event.originalEvent.changedTouches[0])) {return;}// Set the flag to prevent other widgets from inheriting the touch eventtouchHandled = true;// Track movement to determine if interaction was a clickself._touchMoved = false;// Simulate the mouseover eventsimulateMouseEvent(event, 'mouseover');// Simulate the mousemove eventsimulateMouseEvent(event, 'mousemove');// Simulate the mousedown eventsimulateMouseEvent(event, 'mousedown');};/** * Handle the jQuery UI widget's touchmove events * @param {Object} event The document's touchmove event */mouseProto._touchMove = function (event) {// Ignore event if not handledif (!touchHandled) {return;}// Interaction was not a clickthis._touchMoved = true;// Simulate the mousemove eventsimulateMouseEvent(event, 'mousemove');};/** * Handle the jQuery UI widget's touchend events * @param {Object} event The document's touchend event */mouseProto._touchEnd = function (event) {// Ignore event if not handledif (!touchHandled) {return;}// Simulate the mouseup eventsimulateMouseEvent(event, 'mouseup');// Simulate the mouseout eventsimulateMouseEvent(event, 'mouseout');// If the touch interaction did not move, it should trigger a clickif (!this._touchMoved) {// Simulate the click eventsimulateMouseEvent(event, 'click');}// Unset the flag to allow other widgets to inherit the touch eventtouchHandled = false;};/** * A duck punch of the $.ui.mouse _mouseInit method to support touch events. * This method extends the widget with bound touch event handlers that * translate touch events to mouse events and pass them to the widget's * original mouse event handling methods. */mouseProto._mouseInit = function () {var self = this;// Delegate the touch handlers to the widget's elementself.element.bind('touchstart', $.proxy(self, '_touchStart')).bind('touchmove', $.proxy(self, '_touchMove')).bind('touchend', $.proxy(self, '_touchEnd'));// Call the original $.ui.mouse init method_mouseInit.call(self);};})(jQuery);var altClickText = 'RIGHT-click';var saveLinkText = 'Save link as...';var isTouch = is_touch_device();// IE 8+ and Edgeif (document.documentMode || /Edge/.test(navigator.userAgent)) {saveLinkText = 'Save Target As...';}// Safariif (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {saveLinkText = 'Download Linked File As...';}// Opera 8.0+if ((navigator.userAgent.indexOf("Opera") || navigator.userAgent.indexOf('OPR')) != -1) {saveLinkText = 'Save Linked Content As...';}if (isTouch) {altClickText = "Tap + hold (until you see a popup menu)";saveLinkText = "Download Link";}if (isTouch)saveLinkText = "Download Linked File";elsealtClickText = "Hold down \"Control\" key + click";function is_touch_device() {return 'ontouchstart' in window;}