var resizeThis = function() { if ( player.section_currently_showing === 2 ) { var frame = player.sections[player.section_currently_showing].jq[0].querySelector( 'iframe' ); frame.width = player.sections[player.section_currently_showing].jq.width(); } }; window.addEventListener( 'resize', resizeThis ); var Player_chapter_7 = Player_devtk.extend( { show_section_animate: function( section_to_show, direction ) { this._super( section_to_show, direction ); if( section_to_show === 2 ) { var frame = player.sections[section_to_show].jq[0].querySelector( 'iframe' ); frame.width = player.sections[section_to_show].jq.width(); } }, start_activity: function() { var src = $( "[data-block_type=activity_iframe] iframe " ).attr( "src" ); var window_width = 1000; var window_height = 820; player.activity_window = window.open( src, "activity_window", "width=" + window_width + ",height=" + window_height + ", left=0, top=0, toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, copyhistory=no" ); }, start_activity_2: function() { var src2 = 'asset/data_connections/activities/early_child_care/slide_2/index.html'; var window_width = 1000; var window_height = 820; player.activity_window = window.open( src2, "activity_window", "width=" + window_width + ",height=" + window_height + ", left=0, top=0, toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, copyhistory=no" ); }, start_activity_3: function() { var src3 = 'asset/activities/early_child_care/slide_2_3/index.html'; var window_width = 1000; var window_height = 820; player.activity_window = window.open( src3, "activity_window", "width=" + window_width + ",height=" + window_height + ", left=0, top=0, toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, copyhistory=no" ); }, start_activity_4: function() { var src4 = 'asset/activities/early_child_care/slide_2_2/index.html'; var window_width = 1000; var window_height = 820; player.activity_window = window.open( src4, "activity_window", "width=" + window_width + ",height=" + window_height + ", left=0, top=0, toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, copyhistory=no" ); }, start_activity_5: function() { var src5 = 'asset/activities/early_child_care/slide_2_4/index.html'; var window_width = 1000; var window_height = 820; player.activity_window = window.open( src5, "activity_window", "width=" + window_width + ",height=" + window_height + ", left=0, top=0, toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, copyhistory=no" ); }, start_activity_6: function() { var src6 = 'asset/activities/early_child_care/slide_2_5/index.html'; var window_width = 1000; var window_height = 820; player.activity_window = window.open( src6, "activity_window", "width=" + window_width + ",height=" + window_height + ", left=0, top=0, toolbar=no, location=no, directories=no, status=no, scrollbars=no, resizable=no, copyhistory=no" ); }, create_start_activity_button: function() { var button = $( "[data-block_type=start_activity_button]" ); var button2 = $( "[data-block_type=start_activity_button_2]" ); var button3 = $( "[data-block_type=start_activity_button_3]" ); var button4 = $( "[data-block_type=start_activity_button_4]" ); var button5 = $( "[data-block_type=start_activity_button_5]" ); var button6 = $( "[data-block_type=start_activity_button_6]" ); if( button.length ) { var button_html = "
"; button.after( button_html ); } if( button2.length ) { var button_html = " "; button2.after( button_html ); } if( button3.length ) { var button_html = " "; button3.after( button_html ); } if( button4.length ) { var button_html = " "; button4.after( button_html ); } if( button5.length ) { var button_html = " "; button5.after( button_html ); } if( button6.length ) { var button_html = " "; button5.after( button_html ); } } }); window.player = new Player_chapter_7();