/* This is the standard template you should add to your book JS file before customizing. Uncomment any of the configuration options to change the default behavior (see https://macmillanhighered.atlassian.net/wiki/display/MP/Player+Configuration+Options for descriptions of the options). */ /************************************** Set this to the DF book ID (Subtype) **************************************/ xBookUtils.bookID = "mckayunderstanding2e"; /* You only need to set the disciplines if you are using the HTML Quiz question delivery method, which only BSM ebooks are at this time (in other words, if this is a FW ebook then you don't need to do a thing). Change the zeros to the discipline number for each tier on PX. Discipline numbers: History: 6696 (all tiers) Composition: 6698 (all tiers) Communication: 6700 (all tiers) College Success: 6704 (all tiers) */ xBookUtils.discipline = { dev: 6696, qa: 6696, pr: 6696, www: 6696 } var Player_subtype = Player_manuscript_type.extend({ //cfg_removeRawHtmlDivs: "on", //cfg_showAnswer: "on", //cfg_showAnswerAutoWrapThis: "off", //cfg_Box_moveTitle: "all", //cfg_Box_moveTitleExclude: "", //cfg_Figures_targetDefault: "_blank", //cfg_Figures_resizeDivWidth: "off", cfg_Figures_autoHtml: "on", cfg_LH_autoHtml: "on", //cfg_LH_externalTargetDefault: "_pop", cfg_LH_internalTargetDefault: "_pop", cfg_LH_ebookTargetDefault: "_pop", cfg_LH_imageTargetDefault: "_blank", //cfg_LH_useLinksFile: "on", //cfg_Glossary_hoverTerms: "on", //cfg_Glossary_useStickyDiv: "on", //cfg_Glossary_hoverTermsNoClick: "", cfg_LH_useOpenContent: "on", initialize_sections: function() { // Do not delete this this._super(); // Anything that needs to be done before the page displays // should be done here. // add page number and chronology link to the top of each page var ch_num = $("#manuscript").data("chapter-number"); $("[data-type='section']").each(function(index, element) { var jq = $(element); $("[data-type='section']").prepend("
"); var page = jq.data('print_page'); if (page !== undefined) { $(".page_num").prepend("Understanding Western Society
Printed Page " + page + "
' + match[3] + '
'); title.after('' + title_uc + '
'); title.after('' + match[1] + '
'); title.remove(); } } if ($('[data-block_type="a_head"]').length > 0) { $('body').addClass('a_head'); var $h2 = $('h2') var h2_html = $h2.html(); var h2_txt = $h2.text(); // Create a table for a heads to display arrow with title $h2.replaceWith('> | ' + h2_html + ' |
' + match[2] + '
'); } } if ($('[data-block_type="study_gd"]').length > 0) { $('body').addClass('study_gd'); var $h2 = $('h2'); var h2_html = $h2.html(); var h2_txt = $h2.text(); if (match = h2_txt.match(/(Step 1): (.*)/)) { $h2.addClass('s1'); } if (match = h2_txt.match(/(Step 2): (.*)/)) { $h2.addClass('s2'); } if (match = h2_txt.match(/(Step 3): (.*)/)) { $h2.addClass('s3'); } if (match = h2_txt.match(/(Step 4): (.*)/)) { $h2.addClass('s4'); } if (match = h2_txt.match(/(Step \d+): (.*)/)) { var title_temp = match[2]; var title_uc = title_temp.toUpperCase(); $h2.text(title_uc); } } if ($('[data-block_type="iyow"]').length > 0) { $('body').addClass('iyow'); var $h2 = $('h2'); var h2_txt = $h2.text(); var title_uc = h2_txt.toUpperCase(); $h2.text(title_uc); $h2.prepend('>'); } // move table caption of chronology table above the table $('[data-block_type="chrono"], [data-block_type="l2_tbl"]').find('[data-type="table_text"]').each(function() { var tbl_text = $(this); var tbl_title = $('[data-type="table_caption"]').text(); tbl_text.remove(); $('[data-block_type="chrono"], [data-block_type="l2_tbl"]').prepend('