var presentation = ["The Cheesecake Factory<\/word>","pay for her graduate studies<\/word>","microbiology<\/word>","smart<\/word>","short-tempered<\/word>","ruthless<\/word>","competitive<\/word>","sweet<\/word>","nice<\/word>","has a darker side<\/word>","Bernadette Rostenkowski-Wolowitz<\/word>","waitress and co-worker<\/word>","Penny<\/word>","her wages<\/word>","friendly personality<\/word>","squeaky voice<\/word>","Bernadette Rostenkowski-Wolowitz<\/strong>, PhD is originally a waitress and co-worker<\/strong> of Penny<\/strong>'s at The Cheesecake Factory<\/strong>, using her wages<\/strong> to pay for her graduate studies<\/strong> in microbiology<\/strong>. She is a smart<\/strong>, short-tempered<\/strong>, ruthless<\/strong>, and often competitive<\/strong> young woman who sometimes displays a sweet<\/strong>, nice<\/strong>, and friendly personality<\/strong>. Despite her squeaky voice<\/strong>, she has a darker side<\/strong>.<\/phrase>","Catholic upbringing<\/word>","frequently manipulates people<\/word>","often pretending to be a friendly<\/word>","quickly making friends<\/word>","Amy<\/word>","The Locomotion Interruption<\/word>","Penny interviews<\/word>","pharmaceutical sales representative position<\/word>","Polish origin<\/word>","cross necklace<\/word>","good-natured individual<\/word>","Penny<\/word>","short stature<\/word>","somewhat intimidating<\/word>","sharp tongue<\/word>","aggressive demeanor<\/word>","Bernadette is of Polish origin<\/strong> and Catholic upbringing<\/strong>, and was originally seen wearing a cross necklace<\/strong>. She frequently manipulates people<\/strong>, often pretending to be a friendly<\/strong> and good-natured individual<\/strong>, quickly making friends<\/strong> with Penny<\/strong> and Amy<\/strong>, as well as the rest of the gang. Despite her short stature<\/strong>, she is regarded as being somewhat intimidating<\/strong>, largely because of her sharp tongue<\/strong>, aggressive demeanor<\/strong>, and occasional signs of mania. In season eight's \"The Locomotion Interruption<\/strong>\", Penny interviews<\/strong> for a pharmaceutical sales representative position<\/strong> with Bernadette's boss, and secures it because she concurs with his opinion that Bernadette is kind of a bully and that they are slightly terrified of her.<\/phrase>","Bernadette to Howard<\/word>","Leonard's request<\/word>","first date<\/word>","do not find any common field of interest<\/word>","both have domineering mothers<\/word>","third date<\/word>","three dates<\/word>","threshold<\/word>","deciding whether they want a long-term relationship<\/word>","Howard hesitates initially<\/word>","temporary rift<\/word>","impulsively proposes marriage<\/word>","she declines<\/word>","sings a heartfelt song<\/word>","The Cheesecake Factory<\/word>","most romantic thing anyone has ever done for her<\/word>","relationship continues<\/word>","Penny<\/word>","first introduced<\/word>","discover<\/word>","Blindsided<\/word>","Penny<\/strong> first introduced<\/strong> Bernadette to Howard<\/strong> on Leonard's request<\/strong>. During their first date<\/strong>, Bernadette and Howard do not find any common field of interest<\/strong> until they discover<\/strong> that they both have domineering mothers<\/strong>. After their third date<\/strong>, Bernadette declares that three dates<\/strong> is the threshold<\/strong> for deciding whether they want a long-term relationship<\/strong>. Blindsided<\/strong>, Howard hesitates initially<\/strong>, causing a temporary rift<\/strong> between them, but then impulsively proposes marriage<\/strong> to show her that he does care about her. Frustrated, she declines<\/strong>, but when he sings a heartfelt song<\/strong> for her at The Cheesecake Factory<\/strong>, she declares that it is the most romantic thing anyone has ever done for her<\/strong> and their relationship continues<\/strong>.<\/phrase>","initial appearances<\/word>","Bernadette does not use her high-pitched speaking voice<\/word>","dim-witted blonde<\/word>","season four<\/word>","The Alien Parasite Hypothesis<\/word>","much smarter than Howard<\/word>","protect Howard<\/word>","acted dumber<\/word>","fourth season finale<\/word>","doctorate<\/word>","hired by a pharmaceutical company<\/word>","Howard and Bernadette marry<\/word>","day before Howard leaves<\/word>","upcoming mission<\/word>","order<\/word>","International Space Station<\/word>","In her initial appearances<\/strong> in the third season, Bernadette does not use her high-pitched speaking voice<\/strong> and is portrayed as almost a dim-witted blonde<\/strong> by taking things literally and not understanding even the simplest of ideas. She mentions this fact in season four<\/strong>'s \"The Alien Parasite Hypothesis<\/strong>\", where she says she is much smarter than Howard<\/strong>, but in order<\/strong> to protect Howard<\/strong>, she acted dumber<\/strong>. In the fourth season finale<\/strong>, she obtains her doctorate<\/strong> and is subsequently hired by a pharmaceutical company<\/strong> that offers her a high salary. Howard and Bernadette marry<\/strong> the day before Howard leaves<\/strong> for his upcoming mission<\/strong> to the International Space Station<\/strong>.<\/phrase>","seasons six and seven<\/word>","Howard's difficulty<\/word>","readjusting to life on Earth<\/word>","struggle to keep a healthy relationship<\/word>","Howard's mother<\/word>","arguments over money<\/word>","The Valentino Submergence<\/word>","reveals that she is pregnant<\/word>","child is a girl<\/word>","The Birthday Synchronicity<\/word>","Bernadette gives birth to a girl<\/word>","screams like the baby's late grandmother<\/word>","Halley<\/word>","Debbie Wolowitz<\/word>","During seasons six and seven<\/strong>, the newlyweds deal with Howard's difficulty<\/strong> in readjusting to life on Earth<\/strong>, the struggle to keep a healthy relationship<\/strong> with Howard's mother<\/strong>, and arguments over money<\/strong>. In the ninth-season episode, \"The Valentino Submergence<\/strong>\", Bernadette reveals that she is pregnant<\/strong>, informing Howard in the next episode. Raj learns about the baby's gender and inadvertently reveals that the child is a girl<\/strong>. In \"The Birthday Synchronicity<\/strong>\" Bernadette gives birth to a girl<\/strong> named Halley<\/strong> who screams like the baby's late grandmother<\/strong>, Debbie Wolowitz<\/strong>.<\/phrase>","season 11<\/word>","learns that she is again pregnant<\/word>","Sheldon and Amy got engaged<\/word>","six months of bed rest<\/word>","The Neonatal Nomenclature<\/word>","Bernadette gives birth to a boy<\/word>","season 12<\/word>","Bernadette pushes Penny in her sales career<\/word>","Neil Michael Wolowitz<\/word>","In season 11<\/strong>, Bernadette learns that she is again pregnant<\/strong>, while Howard is telling her Sheldon and Amy got engaged<\/strong>. Her doctor puts her on six months of bed rest<\/strong>, which makes her fond of watching detective- and criminal-themed TV shows. In \"The Neonatal Nomenclature<\/strong>\" Bernadette gives birth to a boy<\/strong> named Neil Michael Wolowitz<\/strong>, but she insists that she and Howard call him by his middle name. In season 12<\/strong>, Bernadette pushes Penny in her sales career<\/strong>.<\/phrase>"]; var currentPosition = 0; var totalPositions = 0; var timePerWord = 1500; var timePerPhraseWord = 120 var readAheadPlayerTimer; var autoPlay = true; var setMinimized = false; var wordSpeedOptions = {'Slower':2000,'Moderate':1200,'Fast':800}; var phraseSpeedOptions = {'Slower':280,'Moderate':200,'Fast':80}; var defaultWordSpeedOption = 'Moderate'; var defaultPhraseSpeedOption = 'Moderate'; var logToLTI = false; $(window).load(function(){ totalPositions = presentation.length; if (totalPositions > 0){ $('body').prepend('
'); $('body').prepend('
'); $('#read_ahead_player').prepend('
'); initializeReadAheadControls(); initializeReadAheadSlider(); initializeReadAheadSpeedOptions(); currentReadAheadControls(); resumeReadAheadPlayback(); } }); $(document).keyup(function(e){ switch(e.which) { case 37: pauseReadAheadPresentation(); priorReadAheadPresentationItem(); break; case 39: pauseReadAheadPresentation(); nextReadAheadPresentationItem(); break; default: break; } }); function initializeReadAheadControls(){ var s = ''; s += ''; s += ''; s += ''; s += '
'; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += '
'; $('#read_ahead_player').append(s); } function initializeReadAheadSlider(){ var s = ''; s += '
'; s += '
'; s += '
'; $('#read_ahead_controls').prepend(s); updateReadAheadSliderPosition(); } function initializeReadAheadSpeedOptions(){ var s = '
'; s += '
'; s += ' Word Speed
'; s += '
'; optionCount = 0; for (index in wordSpeedOptions) { optionCount++; } optionWidth = 100 / optionCount; for (index in wordSpeedOptions) { var option = wordSpeedOptions[index]; if (index == defaultWordSpeedOption) { s += ''; updateReadAheadWordSpeed(option); } else { s += ''; } } s += '
'; s += '
'; s += '
'; s += ' Phrase Speed
'; s += '
'; optionCount = 0; for (index in phraseSpeedOptions) { optionCount++; } optionWidth = 100 / optionCount; for (index in phraseSpeedOptions) { var option = phraseSpeedOptions[index]; if (index == defaultWordSpeedOption) { s += ''; updateReadAheadPhraseSpeed(option); } else { s += ''; } } s += '
'; s += '
'; s += '
'; $('#read_ahead_controls').append(s); } function updateReadAheadWordSpeed(microseconds,sender) { microseconds = microseconds != undefined && microseconds > 0 ? microseconds : 0; if (microseconds > 0) { timePerWord = microseconds; } if (sender!=undefined) { $('#slider_control_word_speed').find('a').removeClass('current_speed'); $(sender).addClass('current_speed'); } logReadAheadPlayerAction('updateReadAheadWordSpeed','Presentation',microseconds); } function updateReadAheadPhraseSpeed(microseconds,sender) { microseconds = microseconds != undefined && microseconds > 0 ? microseconds : 0; if (microseconds > 0 ) { timePerPhraseWord = microseconds; } if (sender!=undefined) { $('#slider_control_phrase_speed').find('a').removeClass('current_speed'); $(sender).addClass('current_speed'); } logReadAheadPlayerAction('updateReadAheadPhraseSpeed','Presentation',microseconds); } function updateReadAheadSliderPosition(){ var currentSliderBarWidth = 100 - (100 / totalPositions * (currentPosition + 1)); $('#readAheadSliderBar').css('width',currentSliderBarWidth+'%'); } function currentReadAheadControls(){ $('#read_ahead_player_pause_play').show(); if (currentPosition < totalPositions - 1) { $('#read_ahead_player_next_word').removeClass('disabled'); } else { $('#read_ahead_player_next_word').addClass('disabled'); } if (currentPosition > 0) { $('#read_ahead_player_previous_word').removeClass('disabled'); } else { $('#read_ahead_player_previous_word').addClass('disabled'); } } function restartReadAheadPresentation(){ currentPosition = 0; logReadAheadPlayerAction('restartReadAheadPresentation','Presentation',''); resumeReadAheadPlayback(); } function resumeReadAheadPlayback(){ $('.fa-repeat').removeClass('fa-repeat').addClass('fa-play'); $('#read_ahead_player_pause_play').each(function(){ $(this).find('.fa-play').removeClass('fa-play').addClass('fa-pause'); $(this).off('click'); $(this).attr('onclick','pauseReadAheadPresentation()'); }); logReadAheadPlayerAction('resumeReadAheadPlayback','Presentation',''); playReadAheadPresentation(); } function pauseReadAheadPresentation(){ $('#read_ahead_player_pause_play').each(function(){ $(this).find('.fa-pause').removeClass('fa-pause').addClass('fa-play'); $(this).off('click'); $(this).attr('onclick','resumeReadAheadPlayback()'); }); logReadAheadPlayerAction('pauseReadAheadPresentation','Presentation',''); read_ahead_pause(); } function endReadAheadPresentation(){ $('.fa-play').removeClass('fa-play').addClass('fa-repeat'); $('.fa-pause').removeClass('fa-pause').addClass('fa-repeat'); $('#read_ahead_player_pause_play').each(function(){ $(this).off('click'); $(this).attr('onclick','restartReadAheadPresentation()'); }); logReadAheadPlayerAction('endReadAheadPresentation','Presentation',''); logLTIEndPresentation(); } function playReadAheadPresentation(){ autoPlay=true; currentPosition--; logReadAheadPlayerAction('playReadAheadPresentation','Presentation',''); nextReadAheadPresentationItem(); } function startReadAheadStepper(timeDisplayWord){ clearInterval(readAheadPlayerTimer); readAheadPlayerTimer = setTimeout(function() { read_ahead_step(); },timeDisplayWord); } function stopReadAheadStepper(){ clearInterval(readAheadPlayerTimer); } function read_ahead_step(){ if (autoPlay) { nextReadAheadPresentationItem(); } } function read_ahead_pause(){ autoPlay=false; stopReadAheadStepper(); } function showReadAheadPresentationItem(index){ currentPosition = index; currentPresentationItem = presentation[currentPosition] != undefined ? presentation[currentPosition].trim() : ""; if (currentPresentationItem != "") { currentItemWordCount = presentation[currentPosition].replace("\n","").split(" ").length; if (currentPresentationItem.startsWith("")){ startReadAheadStepper(currentItemWordCount*timePerWord); $('#read_ahead_player_field').html('
'+currentPresentationItem+'
'); logReadAheadPlayerAction('showReadAheadPresentationItem','Word',currentPresentationItem); } else { startReadAheadStepper(currentItemWordCount*timePerPhraseWord); $('#read_ahead_player_field').html('
'+currentPresentationItem.replace("\n","
")+'
'); logReadAheadPlayerAction('showReadAheadPresentationItem','Phrase',''); } } else { if (currentPosition < totalPositions) { nextReadAheadPresentationItem(); } else { endReadAheadPresentation(); read_ahead_minimize(); } } currentReadAheadControls(); updateReadAheadSliderPosition(); saveReadAheadPosition(); } function priorReadAheadPresentationItem(){ stopReadAheadStepper(); logReadAheadPlayerAction('priorReadAheadPresentationItem','Controls',''); showReadAheadPresentationItem(currentPosition-1); } function nextReadAheadPresentationItem(){ stopReadAheadStepper(); logReadAheadPlayerAction('nextReadAheadPresentationItem','Controls',''); showReadAheadPresentationItem(currentPosition+1); } function read_ahead_playAgain(){ currentWordIndex = 0; logReadAheadPlayerAction('read_ahead_playAgain','Controls',''); playReadAheadPresentation(); } function read_ahead_minimize(){ setMinimized = true; logReadAheadPlayerAction('read_ahead_minimize','Controls',''); read_ahead_switch_min_max(); } function read_ahead_maximize(){ setMinimized = false; logReadAheadPlayerAction('read_ahead_maximize','Controls',''); read_ahead_switch_min_max(); } function read_ahead_switch_min_max(forceSwitch){ forceSwitch = forceSwitch != undefined ? forceSwitch : false; if (forceSwitch) { setMinimized = !setMinimized; } if (setMinimized) { $('#read_ahead_player_back').fadeOut(); $('#read_ahead_player').addClass('minimize'); $('.player-icons .fa-stack').removeClass('fa-lg').addClass('fa-sm'); $('.player-icons .fa-minus').removeClass('fa-minus').addClass('fa-expand'); logReadAheadPlayerAction('read_ahead_switch_min_max','Min',''); //$('#read_ahead_player_max_min').each(function(){ // $(this).off('click'); // $(this).attr('onclick','read_ahead_maximize()'); //}); } else { $('#read_ahead_player_back').fadeIn(); $('#read_ahead_player').removeClass('minimize'); $('.player-icons .fa-stack').removeClass('fa-sm').addClass('fa-lg'); $('.player-icons .fa-expand').removeClass('fa-expand').addClass('fa-minus'); logReadAheadPlayerAction('read_ahead_switch_min_max','Max',''); //$('#read_ahead_player_max_min').each(function(){ // $(this).off('click'); // $(this).attr('onclick','read_ahead_minimize()'); //}); } } function saveReadAheadPosition(){ $.ajax({ type:'POST', url:'/ajax/save_user_presentation_position.php', data: { 'id':2409, 'position': currentPosition } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); } function logLTIEndPresentation(action) { if (!logToLTI) { return; } $.ajax({ type:'POST', url:'/lti/presentationEnded.php', data: { 'documentId':2409, 'userId':0, } }) } function logReadAheadPlayerAction(action,area,details){ var d = new Date(); var t = d.getTime(); action = action != undefined ? action.trim() : 'UNKNOWN'; area = area != undefined ? area.trim() : ''; details = details != undefined ? details : ''; // If we are about to show a new word, increase the number of keywords // reinforced so we can log that for the Dashboard page. if (area == 'Word') { window.keywordCount++; } $.ajax({ type:'POST', url:'/logging/logPlayerAction.php', data: { 'documentId':2409, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }