xBookUtils.bookID = "fapp10e";
var Player_subtype = Player_manuscript_type.extend({
cfg_showAnswer: "on",
cfg_Box_moveTitle: "all",
cfg_Figures_resizeDivWidth: "on",
cfg_Figures_autoHtml: "on",
cfg_LH_autoHtml: "on",
cfg_LH_externalTargetDefault: "_pop",
cfg_LH_internalTargetDefault: "_pop",
cfg_LH_ebookTargetDefault: "_pop",
cfg_Glossary_hoverTerms: "on",
cfg_Glossary_useStickyDiv: "on",
cfg_LH_useOpenContent: "on",
cfg_LH_useLinksFile: "on",
// turn default page numbering off
cfg_pageNumbers: "on",
initialize_sections: function() {
this._super();
//check if suppwin
var supp_win;
if($("body#supp_win").length > 0)
supp_win = true;
else
supp_win = false;
var chapter_number = $("#manuscript").attr("data-chapter-number");
//mathjax
for (var key in MathJaxMap) {
if (MathJaxMap.hasOwnProperty(key))
$('[data-math="' + key + '"]').html('');
}
$.ajaxSetup({
cache: true
});
//$.getScript("https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" );
$.getScript( "http://prod-cdn-packages.macmillan.cloud/media/MathJax/MathJax.js?config=TeX-MML-AM_CHTML");
//table widths..
$('div[data-type="table"]').each(function() {
table_div = $(this);
var width = table_div.attr('data-attr') * 9; // multiply width attribute by abitrary amound to get the table width
table_div.find('table').css('width', width);
table = table_div.find('table');
table_div.find('[data-type="table_text"]').each(function(){
$(this).css('width', width);
if($(this).next("table").length){
$(this).prependTo($(this).next());
$(this).wrap('
') //for the caption
}
else if($(this).prev("table").length){
$(this).insertAfter($(this).prev());
$(this).find('[data-type="table_caption"]').css("padding-left","0");
$(this).find('[data-type="table_caption"]').css("text-indent","0");
$(this).find('[data-type="table_caption"]').css("margin-bottom","20px");
$(this).prev('table').css("margin-bottom","0");
$(this).css("margin-left", "auto");
$(this).css("margin-right", "auto");
$(this).css("font-family", "arial");
$(this).css("font-size", "12px");
}
});
});
//examples
$('[data-block_type="example_num"]').append("");
$('[data-block_type="example"] [data-type="box_inner"]').children().css('padding-left', '15px');
$('[data-block_type="example"] [data-type="box_inner"] [data-block_type="para_noindent"]:first-of-type').css('padding', '0 0 10px 0');
$('[data-block_type="example"]').append('');
// Example 2, Ch 22 special case
$('[data-block_type="example_num22"]').append("");
//adding tall example classes
$('#comap10e_ch05-exam-1-14, #comap10e_ch05-exam-1-18, #fapp10e-ch08-exam-1-1, #fapp10e-ch08-exam-1-10, #fapp10e-ch08-exam-1-11, #fapp10e-ch08-exam-1-12, #fapp10e-ch08-exam-1-18, #fapp10e-ch09-exam-1-11, #fapp10e-ch10-exam-1-1, #fapp10e-ch10-exam-1-4, #fapp10e-ch11-exam-1-12, #fapp10e-ch11-exam-1-19, #fapp10e-ch08-exam-1-23, #fapp10e-ch12-exam-1-1, #fapp10e-ch12-exam-1-2, #fapp10e-ch12-exam-1-9, #fapp10e-ch12-exam-1-10, #fapp10e-ch13-exam-1-3, #fapp10e-ch13-exam-1-4, #fapp10e-ch13-exam-1-5, #fapp10e-ch19-exam-1-006').addClass('tall_example');
//self check
$('[data-block_type="self_check"]').append('');
$('[data-block_type="self_check"] h3' ).wrap("