/* 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 = "mckayworld10e"; /* 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: "", initialize_sections: function() { // Do not delete this this._super(); // Anything that needs to be done before the page displays // should be done here. 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) { if (match = page.match(/([^-]+)-([^"]+)/)) { $(".page_num").prepend("A History of World Societies:
Printed Page " + match[1] + "
A History of World Societies Value
Edition: Printed Page " + match[2] + "
' + match[3] + '
'); title.before('' + match[1] + '
'); } else if (match = title_txt.match(/(\d+)\. ([^,]+), (.*)/)) { title.text(match[2]); title.after('' + match[3] + '
'); title.before('' + match[1] + '
'); } else if (match = title_txt.match(/(\d+)\. (.*)/)) { title.text(match[2]); title.addClass('title'); title.before('' + match[1] + '
'); title.after(''); } } if ($('[data-block_type="atb"]').length > 0) { $('body').addClass('atb'); var $h2 = $('h2') var h2_txt = $h2.text(); if (match = h2_txt.match(/(Preface): (Why This Book This Way)/)) { $h2.text(match[1]); $h2.after('' + match[2] + '
'); } $('.page_num').remove(); } if ($('[data-block_type="list_past"]').length > 0) { $('body').addClass('list_past'); var $h2 = $('h2 [data-type="title"]'); var h2_html = $h2.html(); if (match = h2_html.match(/(Listening to the Past): (.*)/)) { $h2.after('' + match[1] + '
' + match[2] + '
' + match[1] + '
' + match[2] + '
' + match[2] + '
');*/ } } if ($('[data-block_type="ind_soc"]').length > 0) { $('body').addClass('ind_soc'); var $h2 = $('h2 [data-type="title"]'); var h2_html = $h2.html(); if (match = h2_html.match(/(Individuals in Society): (.*)/)) { $h2.after('' + match[1] + '
' + match[2] + '
' + match[2] + '
');*/ } } if ($('[data-block_type="glo_tra"]').length > 0) { $('body').addClass('glo_tra'); var $h2 = $('h2'); var h2_txt = $h2.html(); if (match = h2_txt.match(/(Global Trade): (.*)/)) { $h2.text(match[1]); } } if ($('[data-block_type="connect"]').length > 0) { $('body').addClass('connect'); var $h2 = $('h2'); var h2_txt = $h2.text(); if (match = h2_txt.match(/(Connections)/)) { $h2.text('CONNECTIONS'); } } if ($('[data-block_type="review"][level="2"]').length > 0) { $('body').addClass('review'); var $h2 = $('h2') var h2_txt = $h2.text(); if (match = h2_txt.match(/(Chronology)/)) { $('body').addClass('chrono'); var $table_text = $('[data-type="table_text"]'); $table_text.remove(); $('div[data-type="table"]').prepend($table_text); } $('h2.section-title').before('' + match[2] + '
' + uc_title + '
' + match[2] + '
' + match[2] + '
'); } } if ($('[data-block_type="odp_essay"]').length > 0) { $('body').addClass('odp_essay'); var $h2 = $('h2') var h2_html = $h2.html(); if (match = h2_html.match(/Essay (Assignment) for Online Document Project \d+.*/)) { $h2.html(match[1]); } } $('#supp_win').find('a').each(function() { var link = $(this); var link_txt = link.text(); if (match = link_txt.match(/((?:Map|Figure) \d+\.\d+)/)) { link.attr('target', '_pop'); link.removeAttr('data-xrefs-target'); } }); } // end initialize2 }); // end Player_subtype // Do not delete this player = new Player_subtype();