var STCONST_WS_UPDATE_TRANSCRIPT="/transactions/update_from_editor",STCONSTS_WSCREDS_BITLY_LOGIN="speakertext",STCONSTS_WSCREDS_BITLY_APIKEY="R_2274af29d71349021399a6ee1191ab6b",STCONST_WS_ANALYTICS_CLICK="http://speakertext.com/analytics/track_click",STCONST_WS_ANALYTICS_LOAD="http://speakertext.com/analytics/track_load",STCONST_WS_ANALYTICS_SEARCH="http://speakertext.com/analytics/track_search",STCONST_WS_ANALYTICS_SHARE="http://speakertext.com/analytics/track_share",STCONST_CLASS_SHARE_BUTTON=
"STxShare",STCONST_CLASS_SHARE_FACEBOOK="STfacebookShare",STCONST_CLASS_SHARE_TWITTER="STtwitterShare",STCONST_CLASS_SHARE_URL="STurlShare",STCONST_WSPREFIX_TRANSCRIPTCALLBACK="STcallback",STCONST_QUERY_PLAYER_QUOTELINK="STQL",STCONST_TEXT_BAR_SEARCH="Search inside this video...",STCONST_TEXT_BAR_LOGOLINK="http://speakertext.com",STCONST_TEXT_BAR_AUTOSCROLL="AUTO SCROLL",STCONST_TEXT_BAR_SHOWTEXT="EXPAND TRANSCRIPT",STCONST_TEXT_EDIT_SAVE="Save",STCONST_TEXT_EDIT_CANCEL="Cancel",STCONST_TEXT_MESSAGE_EDIT=
"<p>Just start typing to edit the transcript.</p>",STCONST_TEXT_SHARE_UNSELECTED="<strong>Link to a video quote</strong><br>To start, select some text from the transcript<br>",STCONST_TEXT_SHARE_HIGHLIGHTED="<strong>Share the selected quote</strong><br>The video will start playing at this quote</a><br>",STCONST_TEXT_SHARE_SELECTED="<strong>Share the current quote</strong><br>The video will start playing at this quote</a><br>",STCONST_TEXT_SHARE_BUTTONS="<a class='"+STCONST_CLASS_SHARE_TWITTER+" "+
STCONST_CLASS_SHARE_BUTTON+"' onmousedown=\"stjQuery(this).STcaptureQuoteLink()\" onclick=\"if(stjQuery(this).data(STCONST_DATAKEY_QUOTELINK_TEXT) != '') { temp = window.open('','_blank'); stjQuery(this).STtwitterShare(temp); }\"></a><a class='"+STCONST_CLASS_SHARE_FACEBOOK+" "+STCONST_CLASS_SHARE_BUTTON+"' onmousedown=\"stjQuery(this).STcaptureQuoteLink()\" onclick=\"if(stjQuery(this).data(STCONST_DATAKEY_QUOTELINK_TEXT) != '') { temp = window.open('','_blank'); stjQuery(this).STfacebookShare(temp); }\"></a><a class='"+
STCONST_CLASS_SHARE_URL+" "+STCONST_CLASS_SHARE_BUTTON+'\' onmousedown="stjQuery(this).STcaptureQuoteLink()" onclick="if(stjQuery(this).data(STCONST_DATAKEY_QUOTELINK_TEXT) != \'\') { stjQuery(this).STurlShare(); }"></a><br>',STCONST_TEXT_MESSAGE_SHAREURL_BEGIN="<h1>",STCONST_TEXT_MESSAGE_SHAREURL_END="</h1><p>Copy and share this URL to link back to this moment of the video.</p>",STCONST_TEXT_MESSAGE_COPY="<strong>QuoteLink Created!</strong><p>When you paste this text, it will link back to this moment in the video. <a href='http://speakertext.com/what' target='_blank'>More&nbsp;&raquo;</a></p>",
STCONST_TEXT_MESSAGE_SAVING="<p>Saving Transcript...</p>",STCONST_TEXT_MESSAGE_SAVEOK="<h1>Transcript Received!</h1><p>Your transcript has been queued for processing and should be visible in a few moments. <a href='/library'>Return to library &raquo</a></p>",STCONST_TEXT_MESSAGE_SAVEERROR="<h1>Error</h1><p>Your transcript could not be saved at this time. Please try again in a few moments.</p>",STCONST_TEXT_TRANSCRIPT_LOADING="<div>The transcript for this video is loading.</div>",STCONST_TEXT_TRANSCRIPT_UNAVAILABLE=
"<div>The transcript for this video is unavailable.</div>",STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX="STtranscriptContent",STCONST_PLAYER_TRANSCRIPTEMBED_PREFIX="STtranscriptEmbed",STCONST_PLAYER_IGNORE_THRESHOLD=3E3,STCONST_CLASS_PLAYER="STplayer",STCONST_CLASS_UNINITIALIZED="STplayerUninitialized",STCONST_CLASS_EMBEDDED="STplayerEmbedded",STCONST_CLASS_NICEBUTTON="nicebutton",STCONST_CLASS_EDITOR="STeditor",STCONST_CLASS_VIDEOPLAYER="STvideoPlayer",STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT="STdisplayWithTranscript",
STCONST_CLASS_PLAYER_TRANSCRIPTPANE="STtranscriptPane",STCONST_CLASS_PLAYER_TRANSCRIPTWRAPPER="STtranscriptWrapper",STCONST_CLASS_PLAYER_NATIVESCROLL="STtranscriptNativeScroll",STCONST_CLASS_PLAYER_BAREBONES="STplayerBarebones",STCONST_CLASS_PLAYER_SHAREPANE="STsharePane",STCONST_CLASS_PLAYER_SHAREPANE_ACTIVE="STsharePaneActive",STCONST_CLASS_PLAYER_SHAREPANE_HIGHLIGHT="STsharePaneHighlight",STCONST_CLASS_PLAYER_SHAREPANE_TEXT="STsharePaneText",STCONST_CLASS_PLAYER_COPYFEEDBACK="STsharePaneCopyFeedback",
STCONST_CLASS_PLAYER_TRANSCRIPTDISPLAY="STtranscriptDisplay",STCONST_CLASS_PLAYER_TRANSCRIPTSTATUS="STtranscriptStatus",STCONST_CLASS_PLAYER_TRANSCRIPT_CONTENT="STtranscriptContent",STCONST_CLASS_PLAYER_SEARCH="STsearch",STCONST_CLASS_PLAYER_SEARCHFIELD="STsearchField",STCONST_CLASS_PLAYER_SEARCHPREVBUTTON="STsearchPrevButton",STCONST_CLASS_PLAYER_SEARCHNEXTBUTTON="STsearchNextButton",STCONST_CLASS_PLAYER_AUTOSCROLL="STautoScroll",STCONST_CLASS_PLAYER_SHOWTEXT="STshowText",STCONST_CLASS_PLAYER_LOGO=
"STlogo",STCONST_CLASS_PLAYER_CURRENTCONTENT="STcurrentContent",STCONST_CLASS_PLAYER_SEARCHMATCH="STsearchMatch",STCONST_CLASS_PLAYER_BASE="STplayerBase",STCONST_CLASS_PLAYER_BASELEFT="STplayerBaseLeft",STCONST_CLASS_PLAYER_BASERIGHT="STplayerBaseRight",STCONST_CLASS_PLAYER_HANDLE="STplayerHandle",STCONST_CLASS_PLAYER_SCROLLBAR="STscrollBar",STCONST_CLASS_PLAYER_SCROLLUP="STscrollUp",STCONST_CLASS_PLAYER_SCROLLDOWN="STscrollDown",STCONST_CLASS_PLAYER_SCROLLVISIBLE="STscrollVisible",STCONST_CLASS_PLAYER_SCROLLTOP=
"STscrollTop",STCONST_CLASS_PLAYER_SCROLLBOTTOM="STscrollBottom",STCONST_CLASS_PLAYER_BAR="STbar",STCONST_CLASS_MESSAGEPANE="STmessagePane",STCONST_CLASS_COPY_FEEDBACK="STcopyFeedback",STCONST_CLASS_PLAYER_FONTSIZEBUTTON="STfontSizeButton",STCONST_CLASS_EDIT_SAVE="STsaveButton",STCONST_CLASS_EDIT_CANCEL="STcancelButton",STCONST_CLASS_EDIT_EMPTY="STemptyContentEdit",STCONST_CLASS_PLAYER_EMBEDOVERLAY="SToverlay",STCONST_CLASS_PLAYER_EMBEDWRAPPER="STembedWrapper",STCONST_CLASS_PLAYER_AUTOSCROLL_ON="on",
STCONST_CLASS_PLAYER_AUTOSCROLL_OFF="off",STCONST_CLASS_PLAYER_TRANSCRIPT_LOADING="STtranscriptLoading",STCONST_CLASS_PLAYER_TRANSCRIPT_VISIBLE="visibleTranscript",STCONST_CLASS_PLAYER_SEARCHEMPTY="empty",STCONST_CLASS_PLAYER_SMALLFONT="smallFont",STCONST_CLASS_PLAYER_MEDIUMFONT="mediumFont",STCONST_CLASS_PLAYER_LARGEFONT="largeFont",STCONST_EVENT_TRANSCRIPT_LOADED="transcriptLoaded",STCONST_EVENT_PLAYER_SHOW="showPlayer",STCONST_EVENT_PLAYER_HIDE="hidePlayer",STCONST_EVENT_CONTENT_CLICKED="contentClicked",
STCONST_EVENT_CONTENT_SELECT="contentSelect",STCONST_EVENT_CONTENT_COPY="contentCopy",STCONST_EVENT_CONTENT_DESELECT="contentDeselect",STCONST_EVENT_PLAYER_SEARCH="search",STCONST_EVENT_PLAYER_SEARCHNEXT="searchNext",STCONST_EVENT_PLAYER_SEARCHPREV="searchPrev",STCONST_DATAKEY_VIDEOPLAYERID="STvideoplayerID",STCONST_DATAKEY_VIDEOPLAYERTYPE="STVPtype",STCONST_DATAKEY_TRANSCRIPTID="STtranscriptID",STCONST_DATAKEY_PLAYERQUEUE="STplayerQueue",STCONST_DATAKEY_PLAYER_DISABLED="STplayerDisabled",STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL=
"STautoScroll",STCONST_DATAKEY_TRANSCRIPT_CURRENTCONTENTID="STcurrentContentID",STCONST_DATAKEY_TRANSCRIPT_SEARCHMATCHES="STsearchMatches",STCONST_DATAKEY_TRANSCRIPT_SEARCHTERMS="STsearchTerms",STCONST_DATAKEY_TRANSCRIPT_IGNOREPROGRESS="STtranscriptIgnoreProgress",STCONST_DATAKEY_CONFIG="STconfig",STCONST_DATAKEY_QUOTELINK_TEXT="STquoteLinkText",STCONST_DATAKEY_QUOTELINK_CONTENTID="STquoteLinkContentID",STCONST_DATAKEY_SHAREURL_TIMEOUT="STshareUrlTimeout",STCONST_DATAKEY_EDITMESSAGE_SHOWN="STeditMessageShown",
STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_OFF=0,STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_ON=1,STCONST_CONFIG_INITIALSTATE_OPEN="open",STCONST_CONFIG_INITIALSTATE_CLOSED="closed",STCONST_CONFIG_EDITENABLED_OFF="off",STCONST_CONFIG_EDITENABLED_ON="on",STCONST_CONFIG_EMBEDSTYLE_OVERLAY="overlay",STCONST_CONFIG_EMBEDSTYLE_EMBED="embed";if(typeof window.jQuery!="undefined")window.stjQuery=window.jQuery;else console.error("Must load jQuery >1.3 before loading SpeakerText plugin!");
(function(b){function l(){this.timestamp=this.id=0;this.text=""}function h(){this.task=this.videoID=this.transcriptID=0;this.hash="";this.content=[]}var g=[],k=[],n=0;h.prototype.getContentByTimestamp=function(e){if(this.content.length==0)return null;previousContent=this.content[0];for(var f in this.content){a=this.content[f];if(a.timestamp==e)return a;else if(a.timestamp>e)return previousContent;previousContent=a}return previousContent};h.prototype.getContentByID=function(e){for(var f in this.content){a=
this.content[f];if(a.id==e)return a}return null};h.prototype.updateContentByID=function(e,f){for(var j in this.content){a=this.content[j];if(a.id==e){this.content[j].text=f;return}}return null};h.prototype.search=function(e){var f=[];e=e.toLowerCase();for(var j in this.content){a=this.content[j];a.text.toLowerCase().search(e)!=-1&&f.push(a)}return f};b.fn.extend({hasSpeakerText:function(){return b(this).hasClass(STCONST_CLASS_VIDEOPLAYER)},speakerText:function(e,f){var j={minHeight:30,defaultHeight:210,
videoPlayerID:"",preEmbedID:"",initialState:STCONST_CONFIG_INITIALSTATE_OPEN,editEnabled:STCONST_CONFIG_EDITENABLED_OFF,embedStyle:STCONST_CONFIG_EMBEDSTYLE_EMBED};typeof STglobalSettings!="undefined"&&b.extend(j,STglobalSettings);f&&b.extend(j,f);this.each(function(){if(b(this).hasSpeakerText())return true;++n;var d;d=j.videoPlayerID!=""?STCONST_CLASS_PLAYER+j.videoPlayerID:b(this).attr("id")!=""?STCONST_CLASS_PLAYER+b(this).attr("id"):STCONST_CLASS_PLAYER+n;b(this).addClass(STCONST_CLASS_VIDEOPLAYER);
if(j.preEmbedID!="")var c=b("#"+j.preEmbedID);if(c.length==0)c=b("#"+j.preEmbedID.replace("STEMBEDAPIKEY",""));if(j.preEmbedID==""||c.length==0){c=b(this).after("<div class='"+STCONST_CLASS_PLAYER+" "+STCONST_CLASS_UNINITIALIZED+"' id='"+d+"' />").next();d="";d+="<div class='"+STCONST_CLASS_PLAYER_BAR+"'>";d+="<div class='"+STCONST_CLASS_PLAYER_LOGO+"'><a href='"+STCONST_TEXT_BAR_LOGOLINK+"' target='_blank'></a></div>";d+="<input type='text' class='"+STCONST_CLASS_PLAYER_SEARCHFIELD+" "+STCONST_CLASS_PLAYER_SEARCHEMPTY+
"'/>";d+="<div class='"+STCONST_CLASS_PLAYER_SEARCHPREVBUTTON+" "+STCONST_CLASS_PLAYER_SEARCHEMPTY+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_SEARCHNEXTBUTTON+" "+STCONST_CLASS_PLAYER_SEARCHEMPTY+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_FONTSIZEBUTTON+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_AUTOSCROLL+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+
"'>"+STCONST_TEXT_BAR_AUTOSCROLL+"</div>";d+="<div class='"+STCONST_CLASS_PLAYER_SHOWTEXT+"'>"+STCONST_TEXT_BAR_SHOWTEXT+"</div>";d+="</div>";d+="<div class='"+STCONST_CLASS_PLAYER_EMBEDWRAPPER+"'>";d+="<div class='"+STCONST_CLASS_PLAYER_SHAREPANE+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+"'><span class='"+STCONST_CLASS_PLAYER_SHAREPANE_TEXT+"'>"+STCONST_TEXT_SHARE_UNSELECTED+"</span>"+STCONST_TEXT_SHARE_BUTTONS+"</div>";d+="<div class='"+STCONST_CLASS_PLAYER_TRANSCRIPTPANE+"'>";d+="<div class='"+
STCONST_CLASS_PLAYER_SCROLLBAR+"'>";d+="<div class='"+STCONST_CLASS_PLAYER_SCROLLUP+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_SCROLLVISIBLE+"'>";d+="<div class='"+STCONST_CLASS_PLAYER_SCROLLTOP+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_SCROLLBOTTOM+"'></div>";d+="</div>";d+="<div class='"+STCONST_CLASS_PLAYER_SCROLLDOWN+"'></div>";d+="</div>";d+="<div class='"+STCONST_CLASS_PLAYER_TRANSCRIPTWRAPPER+"'>";d+="<div class='"+STCONST_CLASS_PLAYER_TRANSCRIPTDISPLAY+"'></div>";d+="<div class='"+
STCONST_CLASS_PLAYER_TRANSCRIPTSTATUS+"'></div>";d+="</div>";d+="</div>";d+="<div class='"+STCONST_CLASS_PLAYER_BASE+"'>";d+="<div class='"+STCONST_CLASS_PLAYER_BASERIGHT+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_BASELEFT+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_HANDLE+"'></div>";d+="</div>";d+="<div class='"+STCONST_CLASS_MESSAGEPANE+"'></div>";d+="</div>";if(j.editEnabled==STCONST_CONFIG_EDITENABLED_ON)d+="<a class='"+STCONST_CLASS_EDIT_SAVE+" "+STCONST_CLASS_NICEBUTTON+"' value='"+
STCONST_TEXT_EDIT_SAVE+"'>"+STCONST_TEXT_EDIT_SAVE+"</a>";c.html(d)}else{if(c.hasClass(STCONST_CLASS_PLAYER_BAREBONES)){c.removeClass(STCONST_CLASS_PLAYER_BAREBONES);c.addClass(STCONST_CLASS_PLAYER_TRANSCRIPT_VISIBLE);var r=c.STembedWrapper().html();d="";d+="<div class='"+STCONST_CLASS_PLAYER_EMBEDWRAPPER+"'>";d+="  <div class='"+STCONST_CLASS_PLAYER_SHAREPANE+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+"'>";d+="    <span class='"+STCONST_CLASS_PLAYER_SHAREPANE_TEXT+"'>"+STCONST_TEXT_SHARE_UNSELECTED+
"</span>"+STCONST_TEXT_SHARE_BUTTONS;d+="  </div>";d+="  <div class='"+STCONST_CLASS_PLAYER_TRANSCRIPTPANE+"'>";d+="    <div class='"+STCONST_CLASS_PLAYER_SCROLLBAR+"'>";d+="      <div class='"+STCONST_CLASS_PLAYER_SCROLLUP+"'></div>";d+="      <div class='"+STCONST_CLASS_PLAYER_SCROLLVISIBLE+"'>";d+="        <div class='"+STCONST_CLASS_PLAYER_SCROLLTOP+"'></div>";d+="        <div class='"+STCONST_CLASS_PLAYER_SCROLLBOTTOM+"'></div>";d+="      </div>";d+="      <div class='"+STCONST_CLASS_PLAYER_SCROLLDOWN+
"'></div>";d+="    </div>";d+="    <div class='"+STCONST_CLASS_PLAYER_TRANSCRIPTWRAPPER+"'>";d+="     <div class='"+STCONST_CLASS_PLAYER_TRANSCRIPTDISPLAY+"'>";d+=r;d+="      </div>";d+="      <div class='"+STCONST_CLASS_PLAYER_TRANSCRIPTSTATUS+"'></div>";d+="    </div>";d+="  </div>";d+="  <div class='"+STCONST_CLASS_PLAYER_BASE+"'>";d+="    <div class='"+STCONST_CLASS_PLAYER_BASERIGHT+"'></div>";d+="    <div class='"+STCONST_CLASS_PLAYER_BASELEFT+"'></div>";d+="    <div class='"+STCONST_CLASS_PLAYER_HANDLE+
"'></div>";d+="  </div>";d+="  <div class='"+STCONST_CLASS_MESSAGEPANE+"'></div>";d+="</div>";c.STembedWrapper().remove();c.append(d);d="";d+="<input type='text' class='"+STCONST_CLASS_PLAYER_SEARCHFIELD+" "+STCONST_CLASS_PLAYER_SEARCHEMPTY+"'/>";d+="<div class='"+STCONST_CLASS_PLAYER_SEARCHPREVBUTTON+" "+STCONST_CLASS_PLAYER_SEARCHEMPTY+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_SEARCHNEXTBUTTON+" "+STCONST_CLASS_PLAYER_SEARCHEMPTY+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+
"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_FONTSIZEBUTTON+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_AUTOSCROLL+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+"'>"+STCONST_TEXT_BAR_AUTOSCROLL+"</div>";d+="<div class='"+STCONST_CLASS_PLAYER_SHOWTEXT+"'>"+STCONST_TEXT_BAR_SHOWTEXT+"</div>";c.STbar().append(d)}else{c.removeClass(STCONST_CLASS_PLAYER_NATIVESCROLL);c.STtranscriptWrapper().scrollTop(0);d="";d+="<div class='"+STCONST_CLASS_PLAYER_SHAREPANE+
" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+"'><span class='"+STCONST_CLASS_PLAYER_SHAREPANE_TEXT+"'>"+STCONST_TEXT_SHARE_UNSELECTED+"</span>"+STCONST_TEXT_SHARE_BUTTONS+"</div>";c.STembedWrapper().prepend(d);d="";d+="<div class='"+STCONST_CLASS_PLAYER_SCROLLBAR+"'>";d+="<div class='"+STCONST_CLASS_PLAYER_SCROLLUP+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_SCROLLVISIBLE+"'>";d+="<div class='"+STCONST_CLASS_PLAYER_SCROLLTOP+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_SCROLLBOTTOM+"'></div>";
d+="</div>";d+="<div class='"+STCONST_CLASS_PLAYER_SCROLLDOWN+"'></div>";d+="</div>";c.STtranscriptPane().prepend(d);d="";d+="<input type='text' class='"+STCONST_CLASS_PLAYER_SEARCHFIELD+" "+STCONST_CLASS_PLAYER_SEARCHEMPTY+"'/>";d+="<div class='"+STCONST_CLASS_PLAYER_SEARCHPREVBUTTON+" "+STCONST_CLASS_PLAYER_SEARCHEMPTY+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_SEARCHNEXTBUTTON+" "+STCONST_CLASS_PLAYER_SEARCHEMPTY+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+
"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_FONTSIZEBUTTON+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+"'></div>";d+="<div class='"+STCONST_CLASS_PLAYER_AUTOSCROLL+" "+STCONST_CLASS_PLAYER_DISPLAYWITHTRANSCRIPT+"'>"+STCONST_TEXT_BAR_AUTOSCROLL+"</div>";d+="<div class='"+STCONST_CLASS_PLAYER_SHOWTEXT+"'>"+STCONST_TEXT_BAR_SHOWTEXT+"</div>";c.STbar().append(d);c.STplayerBase().append("<div class='"+STCONST_CLASS_PLAYER_HANDLE+"'></div>")}if(j.editEnabled==STCONST_CONFIG_EDITENABLED_ON){d="<a class='"+
STCONST_CLASS_EDIT_SAVE+" "+STCONST_CLASS_NICEBUTTON+"' value='"+STCONST_TEXT_EDIT_SAVE+"'>"+STCONST_TEXT_EDIT_SAVE+"</a>";c.append(d);c.STtranscriptWrapper().find("."+STCONST_CLASS_PLAYER_TRANSCRIPT_CONTENT).attr("contentEditable","true")}}j.embedStyle==STCONST_CONFIG_EMBEDSTYLE_OVERLAY&&c.addClass(STCONST_CLASS_PLAYER_EMBEDOVERLAY);b(this).attr("id")||b(this).attr("id",STCONST_CLASS_VIDEOPLAYER+n);k[b(this).attr("id")]=c;j.videoPlayerID==""?c.data(STCONST_DATAKEY_VIDEOPLAYERID,b(this).attr("id")):
c.data(STCONST_DATAKEY_VIDEOPLAYERID,j.videoPlayerID);c.data(STCONST_DATAKEY_VIDEOPLAYERTYPE,e);var s=c.STtranscriptDisplay(),q=c.STtranscriptPane(),v=c.STtranscriptWrapper(),x=c.STsharePane(),G=c.STscrollVisible();c.STplayerHandle();d=c.STplayerBase();r=c.STautoScrollButton();var U=c.STtranscriptShowButton(),y=c.STsearchField(),B=c.STsearchNextButton(),C=c.STsearchPrevButton(),V=c.STfontSizeButton();c.STmessagePane();y.val(STCONST_TEXT_BAR_SEARCH);if(j.editEnabled==STCONST_CONFIG_EDITENABLED_ON){x.remove();
c.addClass(STCONST_CLASS_EDITOR)}v.css("overflow","hidden");v.attr("tabindex",100);b(s).bind("mouseup",function(){STgetSelectedText()!=""&&b(this).trigger(STCONST_EVENT_CONTENT_SELECT)});b(q).bind("copy",function(){var o=b(this).parents("."+STCONST_CLASS_PLAYER).eq(0),m=b(o).STtranscript(),p=null;if(typeof window.getSelection!="undefined"){var u=window.getSelection();if(u.toString())if(typeof u.setBaseAndExtent!="undefined"){var t=u.getRangeAt(0);p=t.cloneRange();p.collapse(true);p=p.startContainer;
if(typeof b(p).attr("id")=="undefined")p=b(p).parent();p=b(p).attr("id").slice(STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX.length);p=m.getContentByID(p);m=m.transcriptID;m=STsetURLParameterByName(window.location.href,STCONST_QUERY_PLAYER_QUOTELINK+m,p.timestamp);var w=document.createElement("div");b(w).css("position","absolute");b(w).css("left","-10000px");m="<a href='"+m+"'>";var z="</a>";m=m+b(t.cloneContents()).text()+z;b(w).html(m);b(document.body).append(w);m=document.createRange();m.selectNode(w);
u.removeAllRanges();u.addRange(m);window.setTimeout(function(){b(w).remove();window.getSelection().setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset)},0)}else{u=window.getSelection();t=u.getRangeAt(0);p=t.cloneRange();p.collapse(true);p=p.startContainer;if(typeof b(p).attr("id")=="undefined")p=b(p).parent();p=b(p).attr("id").slice(STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX.length);p=m.getContentByID(p);m=m.transcriptID;m=STsetURLParameterByName(window.location.href,STCONST_QUERY_PLAYER_QUOTELINK+
m,p.timestamp);w=document.createElement("a");b(w).attr("href",m);b(w).text(b(t.cloneContents()).text());b(document.body).append(w);m=document.createRange();m.selectNode(w);u.removeAllRanges();u.addRange(m);window.setTimeout(function(){b(w).remove();u.removeAllRanges();u.addRange(t)},0)}}else if(document.selection){t=document.selection.createRange();p=document.selection.createRange();p.collapse(true);p=p.parentElement();p=b(p).attr("id").slice(STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX.length);p=m.getContentByID(p);
m=m.transcriptID;m=STsetURLParameterByName(window.location.href,STCONST_QUERY_PLAYER_QUOTELINK+m,p.timestamp);w=document.createElement("div");b(w).css("visibility","hidden");m="<a href='"+m+"'>";z="</a>";m=m+t.htmlText+z;b(w).html(m);b(document.body).append(w);m=document.body.createTextRange();m.moveToElementText(w);m.select();window.setTimeout(function(){t.select();b(w).remove()},0)}b(this).trigger(STCONST_EVENT_CONTENT_COPY);b.get(STCONST_WS_ANALYTICS_SHARE,{hash:o.STgetHash(),timestamp:p.timestamp,
type:"quotelink"},function(){},"jsonp")});j.editEnabled==STCONST_CONFIG_EDITENABLED_ON&&c.STsaveButton().click(function(){b(this).addClass("disabled");b(this).html("Saving...");c.STshowMessage(STCONST_TEXT_MESSAGE_SAVING);var o=b(this).STtranscript();b.ajax({type:"PUT",url:STCONST_WS_UPDATE_TRANSCRIPT,data:{transcriptID:o.transcriptID,hash:o.hash,content:o.content},success:function(){c.STsaveButton().removeClass("disabled");c.STsaveButton().html("Save");c.STshowMessage(STCONST_TEXT_MESSAGE_SAVEOK);
window.setTimeout(function(){b(c).SThideMessage()},8E3)},error:function(){c.STsaveButton().removeClass("disabled");c.STsaveButton().html("Save");c.STshowMessage(STCONST_TEXT_MESSAGE_SAVEERROR);window.setTimeout(function(){b(c).SThideMessage()},5E3)}})});V.click(function(){if(c.hasClass(STCONST_CLASS_PLAYER_SMALLFONT)){c.removeClass(STCONST_CLASS_PLAYER_SMALLFONT);c.addClass(STCONST_CLASS_PLAYER_MEDIUMFONT)}else if(c.hasClass(STCONST_CLASS_PLAYER_MEDIUMFONT)){c.removeClass(STCONST_CLASS_PLAYER_MEDIUMFONT);
c.addClass(STCONST_CLASS_PLAYER_SMALLFONT)}else if(c.hasClass(STCONST_CLASS_PLAYER_LARGEFONT)){c.removeClass(STCONST_CLASS_PLAYER_LARGEFONT);c.addClass(STCONST_CLASS_PLAYER_SMALLFONT)}else c.addClass(STCONST_CLASS_PLAYER_MEDIUMFONT);c.STredraw()});d.dblclick(function(){c.hasClass(STCONST_CLASS_PLAYER_TRANSCRIPT_VISIBLE)?b(this).trigger(STCONST_EVENT_PLAYER_HIDE):b(this).trigger(STCONST_EVENT_PLAYER_SHOW)});U.click(function(){b(this).trigger(STCONST_EVENT_PLAYER_SHOW)});var H=0,K=0,A=c.hasClass(STCONST_CLASS_PLAYER_TRANSCRIPT_VISIBLE),
L=function(o){o=Math.max(K+o.pageY-H,0);v.height(o);if(o>0&&!A){A=true;c.addClass(STCONST_CLASS_PLAYER_TRANSCRIPT_VISIBLE);q.show();x.show()}else if(o<=0&&A){A=false;c.removeClass(STCONST_CLASS_PLAYER_TRANSCRIPT_VISIBLE);q.hide();x.hide()}c.STredraw("handleDrag");return false},D=function(o){b("html").unbind("mouseup",D);b("html").unbind("mouseleave",D);b("html").unbind("mousemove",L);v.height()<j.minHeight&&o.pageY!=H&&v.animate({height:j.defaultHeight},200,function(){c.STredraw()})};d.mousedown(function(o){H=
o.pageY;K=v.height();A=c.hasClass(STCONST_CLASS_PLAYER_TRANSCRIPT_VISIBLE);b("html").bind("mousemove",L);b("html").bind("mouseleave",D);b("html").bind("mouseup",D);return false});var I=0,J=0,M=0,N=0,O=0,P=0,Q=s.get(0).style,R=function(o){Q.top=Math.max(-J,Math.min((o.pageY-N-O)*P,0))+"px";c.STredraw("scroll");return false},E=function(){b(document).unbind("mouseup",E);b(document).unbind("mouseleave",E);b(document).unbind("mousemove",R)};G.mousedown(function(o){var m=q.css("padding-top");m=parseInt(m.substring(0,
m.length-2));N=q.offset().top+m;O=o.pageY-G.offset().top;I=q.height();J=s.height()-I;M=G.height();P=-1*J/(I-M);c.data(STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL,STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_OFF);b(document).bind("mousemove",R);b(document).bind("mouseleave",E);b(document).bind("mouseup",E);return false});q.mousewheel(function(o,m){var p=q.height();p=s.height()-p;if(!(p<0)){var u=1;if(isChrome()||isFirefox()||isMSIE())u=16;p=Math.max(-p,Math.min(s.position().top+u*m,0));Q.top=p+"px";c=b(this).parents("."+
STCONST_CLASS_PLAYER).eq(0);c.data(STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL,STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_OFF);c.STredraw("scroll")}},true);var S=function(o){c.data(STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL,STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_OFF);var m=0;m=o=="line"?Math.min(s.position().top+18,0):Math.min(s.position().top+q.height()-20,0);s.css("top",m);c.STredraw("scroll")},T=function(o){var m=s.height()-q.height();if(!(m<0)){c.data(STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL,STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_OFF);
var p=0;p=o=="line"?Math.max(s.position().top-18,-m):Math.max(s.position().top-q.height()+20,-m);s.css("top",p);c.STredraw("scroll")}};q.keydown(function(o){switch(o.keyCode){case 38:S("line");break;case 33:S("page");break;case 34:T("page");break;case 40:T("line");break}if(o.keyCode==38||o.keyCode==33||o.keyCode==40||o.keyCode==34)o.preventDefault()});r.click(function(){var o=b(this).parents("."+STCONST_CLASS_PLAYER).eq(0);o.data(STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL)==STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_ON?
o.data(STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL,STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_OFF):o.data(STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL,STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_ON);o.STredraw()});y.keyup(function(o){b(this).trigger(STCONST_EVENT_PLAYER_SEARCH);if(o.which&&o.which==13||o.keyCode&&o.keyCode==13)b(this).trigger(STCONST_EVENT_PLAYER_SEARCHNEXT);if(b(this).val()!=""){B.removeClass(STCONST_CLASS_PLAYER_SEARCHEMPTY);C.removeClass(STCONST_CLASS_PLAYER_SEARCHEMPTY)}else{B.addClass(STCONST_CLASS_PLAYER_SEARCHEMPTY);
C.addClass(STCONST_CLASS_PLAYER_SEARCHEMPTY)}});y.focus(function(){if(b(this).hasClass(STCONST_CLASS_PLAYER_SEARCHEMPTY)){b(this).removeClass(STCONST_CLASS_PLAYER_SEARCHEMPTY);b(this).val("");b(this).trigger(STCONST_EVENT_PLAYER_SEARCH)}});y.blur(function(){if(b(this).val()==""){b(this).val(STCONST_TEXT_BAR_SEARCH);b(this).addClass(STCONST_CLASS_PLAYER_SEARCHEMPTY);B.addClass(STCONST_CLASS_PLAYER_SEARCHEMPTY);C.addClass(STCONST_CLASS_PLAYER_SEARCHEMPTY)}});B.click(function(){b(this).trigger(STCONST_EVENT_PLAYER_SEARCHNEXT)});
C.click(function(){b(this).trigger(STCONST_EVENT_PLAYER_SEARCHPREV)});c.bind(STCONST_EVENT_PLAYER_SHOW,function(){c.addClass(STCONST_CLASS_PLAYER_TRANSCRIPT_VISIBLE);q.height()<j.minHeight&&q.hide().height(j.defaultHeight);q.slideDown(500);x.slideDown(500,function(){q.height("");c.STredraw()})});c.bind(STCONST_EVENT_PLAYER_HIDE,function(){q.slideUp(500,function(){c.removeClass(STCONST_CLASS_PLAYER_TRANSCRIPT_VISIBLE)});x.slideUp(500)});c.bind(STCONST_EVENT_CONTENT_CLICKED,function(o,m,p){c.onSTVPprogress(m.timestamp,
true);c.STVPseekToAndPlay(m.timestamp);c.data(STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL,STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_ON);c.STredraw();p&&b.get(STCONST_WS_ANALYTICS_CLICK,{hash:c.STgetHash(),timestamp:m.timestamp},function(){},"jsonp")});c.bind(STCONST_EVENT_PLAYER_SEARCH,function(){var o=y.val(),m=c.STtranscript();c.hasClass(STCONST_CLASS_PLAYER_TRANSCRIPT_VISIBLE)||b(this).trigger(STCONST_EVENT_PLAYER_SHOW);var p=o==""?[]:m.search(o);b(this).data(STCONST_DATAKEY_TRANSCRIPT_SEARCHMATCHES,p);b(this).STsearchPrevButton();
b(this).STsearchNextButton();b(m.content).each(function(){var u=b("#"+STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX+this.id),t=this.text;if(o!="")t=t.replace(RegExp("("+o.replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1")+")","i"),"<span class='"+STCONST_CLASS_PLAYER_SEARCHMATCH+"'>$1</span>");u.html(t)})});c.bind(STCONST_EVENT_PLAYER_SEARCHNEXT,function(){var o=b(this).data(STCONST_DATAKEY_TRANSCRIPT_SEARCHMATCHES),m=b(this).data(STCONST_DATAKEY_TRANSCRIPT_CURRENTCONTENTID),p,u=b(this).STsearchField().val(),
t=b(this).data(STCONST_DATAKEY_TRANSCRIPT_SEARCHTERMS);if(typeof t=="undefined")t=[];var w=true;for(i in t){if(t[i]==u)w=false;break}if(w){b.get(STCONST_WS_ANALYTICS_SEARCH,{hash:c.STgetHash(),search_term:u},function(){},"jsonp");t.push(u);b(this).data(STCONST_DATAKEY_TRANSCRIPT_SEARCHTERMS,t)}if(o.length!=0){if(m>=o[o.length-1].id)p=o[0];else for(var z in o){u=o[z];if(m<u.id){p=u;break}}c.trigger(STCONST_EVENT_CONTENT_CLICKED,[p,false])}});c.bind(STCONST_EVENT_PLAYER_SEARCHPREV,function(){var o=
b(this).data(STCONST_DATAKEY_TRANSCRIPT_SEARCHMATCHES),m=b(this).data(STCONST_DATAKEY_TRANSCRIPT_CURRENTCONTENTID),p;if(m<=o[0].id)p=o[o.length-1];else for(var u in o){var t=o[u];if(m<=t.id)break;p=t}b(this).trigger(STCONST_EVENT_CONTENT_CLICKED,[p,false])});var F=function(){setTimeout(W,50)},W=function(){if(STgetSelectedText()==""){c.trigger(STCONST_EVENT_CONTENT_DESELECT);b("html").unbind("mouseup",F);b("html").unbind("keyup",F)}};c.bind(STCONST_EVENT_CONTENT_SELECT,function(){if(j.editEnabled!=
STCONST_CONFIG_EDITENABLED_ON){b(this).STsharePane().addClass(STCONST_CLASS_PLAYER_SHAREPANE_HIGHLIGHT).find("."+STCONST_CLASS_PLAYER_SHAREPANE_TEXT).html(STCONST_TEXT_SHARE_HIGHLIGHTED);b("html").bind("mouseup",F);b("html").bind("keyup",F)}});c.bind(STCONST_EVENT_CONTENT_DESELECT,function(){b(this).STsharePane().removeClass(STCONST_CLASS_PLAYER_SHAREPANE_HIGHLIGHT).find("."+STCONST_CLASS_PLAYER_SHAREPANE_TEXT).html(STCONST_TEXT_SHARE_SELECTED);if(!b(this).STsharePane().hasClass(STCONST_CLASS_PLAYER_SHAREPANE_ACTIVE)){b(this).STsharePane().removeClass(STCONST_CLASS_COPY_FEEDBACK).find("."+
STCONST_CLASS_PLAYER_SHAREPANE_TEXT).html(STCONST_TEXT_SHARE_UNSELECTED);b(this).STsharePane().find("."+STCONST_CLASS_SHARE_BUTTON).show()}});c.bind(STCONST_EVENT_CONTENT_COPY,function(){if(j.editEnabled!=STCONST_CONFIG_EDITENABLED_ON){c.STshowCopyMessage();window.setTimeout(function(){c.SThideCopyMessage()},5E3)}});c.bind(STCONST_EVENT_TRANSCRIPT_LOADED,function(o,m){b("."+STCONST_CLASS_PLAYER_TRANSCRIPT_LOADING+m).each(function(){b(this).removeClass(STCONST_CLASS_PLAYER_TRANSCRIPT_LOADING+m);b(this).STrenderTranscript(m);
b.get(STCONST_WS_ANALYTICS_LOAD,{hash:c.STgetHash(),url:window.location.toString(),timestamp:STgetURLParameterByName(window.location.href,STCONST_QUERY_PLAYER_QUOTELINK+m),open:c.hasClass(STCONST_CLASS_PLAYER_TRANSCRIPT_VISIBLE)},function(){},"jsonp")})});c.data(STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL,STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_ON);c.data(STCONST_DATAKEY_TRANSCRIPT_CURRENTCONTENTID,0);c.data(STCONST_DATAKEY_CONFIG,j);c.data(STCONST_DATAKEY_TRANSCRIPT_IGNOREPROGRESS,false);j.editEnabled==STCONST_CONFIG_EDITENABLED_ON&&
c.data(STCONST_DATAKEY_EDITMESSAGE_SHOWN,false);if(c.hasClass(STCONST_CLASS_EMBEDDED)){c.STtranscriptWrapper().height(j.defaultHeight);c.STsharePane().height(j.defaultHeight+14)}if(j.initialState==STCONST_CONFIG_INITIALSTATE_OPEN)c.trigger(STCONST_EVENT_PLAYER_SHOW);else c.hasClass(STCONST_CLASS_PLAYER_TRANSCRIPT_VISIBLE)&&c.trigger(STCONST_EVENT_PLAYER_HIDE)});return this},STcaptureQuoteLink:function(){var e=STgetSelectedText()+"",f=STgetSelectedContentID();if(e==""){e=b(this).parents("."+STCONST_CLASS_PLAYER).eq(0);
f=e.data(STCONST_DATAKEY_TRANSCRIPT_CURRENTCONTENTID);e=e.STtranscriptDisplay().find("#"+STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX+f).text()}b(this).data(STCONST_DATAKEY_QUOTELINK_TEXT,e);b(this).data(STCONST_DATAKEY_QUOTELINK_CONTENTID,f)},STtwitterShare:function(e){var f=b(this).data(STCONST_DATAKEY_QUOTELINK_TEXT),j=b(this).data(STCONST_DATAKEY_QUOTELINK_CONTENTID),d=b(this).parents("."+STCONST_CLASS_PLAYER).eq(0),c=b(d).STtranscript();j=c.getContentByID(j);var r=STsetURLParameterByName(window.location.href,
STCONST_QUERY_PLAYER_QUOTELINK+c.transcriptID,j.timestamp);b.ajax({type:"GET",url:"http://api.bit.ly/v3/shorten",dataType:"jsonp",data:{login:STCONSTS_WSCREDS_BITLY_LOGIN,apiKey:STCONSTS_WSCREDS_BITLY_APIKEY,longUrl:r,format:"json"},success:function(s,q){new h;r=" - "+s.data.url;q=f.replace("\n","");if(q.length+r.length>140)q=q.slice(0,138-r.length);q='"'+q+'"'+r;var v="http://twitter.com/home?status="+encodeURIComponent(q);e.document.location=v},error:function(){}});b.get(STCONST_WS_ANALYTICS_SHARE,
{hash:d.STgetHash(),timestamp:j.timestamp,type:"twitter"},function(){},"jsonp")},STfacebookShare:function(e){var f=b(this).data(STCONST_DATAKEY_QUOTELINK_TEXT),j=b(this).data(STCONST_DATAKEY_QUOTELINK_CONTENTID),d=b(this).parents("."+STCONST_CLASS_PLAYER).eq(0),c=b(d).STtranscript();j=c.getContentByID(j);var r=STsetURLParameterByName(window.location.href,STCONST_QUERY_PLAYER_QUOTELINK+c.transcriptID,j.timestamp);b.ajax({type:"GET",url:"http://api.bit.ly/v3/shorten",dataType:"jsonp",data:{login:STCONSTS_WSCREDS_BITLY_LOGIN,
apiKey:STCONSTS_WSCREDS_BITLY_APIKEY,longUrl:r,format:"json"},success:function(s){new h;r=s.data.url;s="http://facebook.com/sharer.php?u="+encodeURIComponent(r)+"&t="+encodeURIComponent(f);e.document.location=s},error:function(){}});b.get(STCONST_WS_ANALYTICS_SHARE,{hash:d.STgetHash(),timestamp:j.timestamp,type:"facebook"},function(){},"jsonp")},STurlShare:function(){b(this).data(STCONST_DATAKEY_QUOTELINK_TEXT);var e=b(this).data(STCONST_DATAKEY_QUOTELINK_CONTENTID),f=b(this).parents("."+STCONST_CLASS_PLAYER).eq(0),
j=b(f).STtranscript();e=j.getContentByID(e);var d=STsetURLParameterByName(window.location.href,STCONST_QUERY_PLAYER_QUOTELINK+j.transcriptID,e.timestamp);b.ajax({type:"GET",url:"http://api.bit.ly/v3/shorten",dataType:"jsonp",data:{login:STCONSTS_WSCREDS_BITLY_LOGIN,apiKey:STCONSTS_WSCREDS_BITLY_APIKEY,longUrl:d,format:"json"},success:function(c){new h;d=c.data.url;f.STshowMessage(STCONST_TEXT_MESSAGE_SHAREURL_BEGIN+d+STCONST_TEXT_MESSAGE_SHAREURL_END);timeout=f.data(STCONST_DATAKEY_SHAREURL_TIMEOUT);
window.clearTimeout(timeout);f.data(STCONST_DATAKEY_SHAREURL_TIMEOUT,window.setTimeout(function(){b(f).SThideMessage()},1E4))},error:function(){}});b.get(STCONST_WS_ANALYTICS_SHARE,{hash:f.STgetHash(),timestamp:e.timestamp,type:"url"},function(){},"jsonp")},STredraw:function(e){var f=this.STtranscriptPane(),j=this.STtranscriptDisplay(),d=this.STsharePane(),c=this.data(STCONST_DATAKEY_TRANSCRIPT_CURRENTCONTENTID),r=j.position().top,s=r,q=j.height();f=f.height();var v=this.data(STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL);
if(e!="scroll"){f<=0?d.height(0):d.height(f+14);if(c!=0&&v==STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_ON){c=j.find("#"+STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX+c);d=Math.min(c.position().top,q-f);c=c.height();c=d+c+r;if(c<-1||c>f)s=-d}q=-(q-f);if(r<q)s=Math.min(0,q);STplayer=this;if(s!=r)e=="handleDrag"?j.css("top",s):j.animate({top:s},{step:function(){STplayer.STredrawScrollBar()}})}e=this.find("."+STCONST_CLASS_PLAYER_AUTOSCROLL);v=this.data(STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL);e.removeClass(STCONST_CLASS_PLAYER_AUTOSCROLL_ON+
" "+STCONST_CLASS_PLAYER_AUTOSCROLL_OFF);switch(v){case STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_OFF:e.addClass(STCONST_CLASS_PLAYER_AUTOSCROLL_OFF);break;case STCONST_FLAG_TRANSCRIPT_AUTOSCROLL_ON:e.addClass(STCONST_CLASS_PLAYER_AUTOSCROLL_ON);break}this.STredrawScrollBar()},STredrawScrollBar:function(){var e=this.STscrollVisible(),f=this.STtranscriptPane(),j=this.STtranscriptDisplay(),d=j.height();f=f.height();var c=j.position().top;if(d>0&&f<d){j=Math.max(f/d*f,0)+10;if(f<j)e.hide();else e.is(":hidden")&&
e.show();d=-1*c/(d-f)*(f-j);e.height(j).css("top",d)}else e.hide()},STrenderTranscript:function(e){if(!(e in g))return this;if(b(this).data(STCONST_DATAKEY_TRANSCRIPTID)!=e){var f=g[e];b(this).STtranscriptStatus().html("");var j=b(this).data(STCONST_DATAKEY_CONFIG);b(this).data(STCONST_DATAKEY_TRANSCRIPTID,e);var d="";if(j.editEnabled==STCONST_CONFIG_EDITENABLED_ON)d=" contenteditable='true'";b(this).STtranscriptPane();var c=b(this).STtranscriptDisplay();if(!b(this).hasClass(STCONST_CLASS_EMBEDDED)){var r=
[];b(f.content).each(function(){r.push("<span id='"+STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX+this.id+"' class='"+STCONST_CLASS_PLAYER_TRANSCRIPT_CONTENT+"'"+d+">"+this.text+"</span>")});var s=r.join("");c.html(s);b(this).removeClass(STCONST_CLASS_EMBEDDED)}b(this).removeClass(STCONST_CLASS_UNINITIALIZED);var q=this;b(c).find("."+STCONST_CLASS_PLAYER_TRANSCRIPT_CONTENT).click(function(){if(j.editEnabled==STCONST_CONFIG_EDITENABLED_ON){if(b(this).hasClass(STCONST_CLASS_PLAYER_CURRENTCONTENT))return;
if(!q.data(STCONST_DATAKEY_EDITMESSAGE_SHOWN)){q.data(STCONST_DATAKEY_EDITMESSAGE_SHOWN,true);q.STshowMessage(STCONST_TEXT_MESSAGE_EDIT);window.setTimeout(function(){b(q).SThideMessage()},5E3)}}if(STgetSelectedText()==""){var v=b(this).STtranscript(),x=b(this).attr("id").slice(STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX.length);(v=v.getContentByID(x))&&b(this).trigger(STCONST_EVENT_CONTENT_CLICKED,[v,true])}});j.editEnabled==STCONST_CONFIG_EDITENABLED_ON&&b(c).find("."+STCONST_CLASS_PLAYER_TRANSCRIPT_CONTENT).blur(function(){var v=
b(this).STtranscript(),x=b(this).attr("id").slice(STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX.length);b(this).removeClass(STCONST_CLASS_EDIT_EMPTY);if(b(this).html()==""){b(this).html(" ");b(this).addClass(STCONST_CLASS_EDIT_EMPTY)}v.updateContentByID(x,b(this).html())});timestamp=STgetURLParameterByName(window.location.href,STCONST_QUERY_PLAYER_QUOTELINK+e);if(timestamp!=""){timestamp=new Number(timestamp);e=f.getContentByTimestamp(timestamp);b(this).trigger(STCONST_EVENT_PLAYER_SHOW);b(this).trigger(STCONST_EVENT_CONTENT_CLICKED,
[e,false])}b(this).STredraw();return this}},STvideoPlayer:function(){return b("#"+b(this).data(STCONST_DATAKEY_VIDEOPLAYERID))},STbar:function(){return b(this).find("."+STCONST_CLASS_PLAYER_BAR)},STtranscriptPane:function(){return b(this).find("."+STCONST_CLASS_PLAYER_TRANSCRIPTPANE)},STsharePane:function(){return b(this).find("."+STCONST_CLASS_PLAYER_SHAREPANE)},STtranscriptDisplay:function(){return b(this).find("."+STCONST_CLASS_PLAYER_TRANSCRIPTDISPLAY)},STtranscriptWrapper:function(){return b(this).find("."+
STCONST_CLASS_PLAYER_TRANSCRIPTWRAPPER)},STtranscriptStatus:function(){return b(this).find("."+STCONST_CLASS_PLAYER_TRANSCRIPTSTATUS)},STplayerHandle:function(){return b(this).find("."+STCONST_CLASS_PLAYER_HANDLE)},STplayerBase:function(){return b(this).find("."+STCONST_CLASS_PLAYER_BASE)},STautoScrollButton:function(){return b(this).find("."+STCONST_CLASS_PLAYER_AUTOSCROLL)},STtranscriptShowButton:function(){return b(this).find("."+STCONST_CLASS_PLAYER_SHOWTEXT)},STscrollBar:function(){return b(this).find("."+
STCONST_CLASS_PLAYER_SCROLLBAR)},STscrollUp:function(){return b(this).find("."+STCONST_CLASS_PLAYER_SCROLLUP)},STscrollDown:function(){return b(this).find("."+STCONST_CLASS_PLAYER_SCROLLDOWN)},STscrollVisible:function(){return b(this).find("."+STCONST_CLASS_PLAYER_SCROLLVISIBLE)},STsearch:function(){return b(this).find("."+STCONST_CLASS_PLAYER_SEARCH)},STsearchField:function(){return b(this).find("."+STCONST_CLASS_PLAYER_SEARCHFIELD)},STembedWrapper:function(){return b(this).find("."+STCONST_CLASS_PLAYER_EMBEDWRAPPER)},
STsearchPrevButton:function(){return b(this).find("."+STCONST_CLASS_PLAYER_SEARCHPREVBUTTON)},STsearchNextButton:function(){return b(this).find("."+STCONST_CLASS_PLAYER_SEARCHNEXTBUTTON)},STfontSizeButton:function(){return b(this).find("."+STCONST_CLASS_PLAYER_FONTSIZEBUTTON)},STmessagePane:function(){return b(this).find("."+STCONST_CLASS_MESSAGEPANE)},STtranscript:function(){var e;e=b(this).hasClass(STCONST_CLASS_PLAYER)?b(this).data(STCONST_DATAKEY_TRANSCRIPTID):b(this).parents("."+STCONST_CLASS_PLAYER).eq(0).data(STCONST_DATAKEY_TRANSCRIPTID);
return g[e]?g[e]:null},STsaveButton:function(){return b(this).find("."+STCONST_CLASS_EDIT_SAVE)},STcancelButton:function(){return b(this).find("."+STCONST_CLASS_EDIT_CANCEL)},STplayer:function(){var e=b(this).attr("id");if(e in k)return k[e];return null},STautoScroll:function(){return b(this).find("."+STCONST_DATAKEY_TRANSCRIPT_AUTOSCROLL)},STgetHash:function(){return b(this).STtranscript().hash},STloadTranscript:function(e){if(e in g&&g[e]instanceof h){b(this).STrenderTranscript(e);return this}else if(e in
g&&g[e]instanceof XMLHttpRequest){b(this).addClass(STCONST_CLASS_PLAYER_TRANSCRIPT_LOADING+e);return this}b(this).addClass(STCONST_CLASS_PLAYER_TRANSCRIPT_LOADING+e);var f=b(this).STtranscriptStatus();if(e){f.html(STCONST_TEXT_TRANSCRIPT_LOADING);var j=b("#"+STCONST_PLAYER_TRANSCRIPTEMBED_PREFIX+e.replace("-","_").replace("-","_"));if(j.length==0)j=b("#"+STCONST_PLAYER_TRANSCRIPTEMBED_PREFIX+e.replace("STEMBEDAPIKEY-","_").replace("-","_"));if(j.length!==0){var d=new h;b(j).find("."+STCONST_CLASS_PLAYER_TRANSCRIPT_CONTENT).each(function(){var r=
new l;r.id=parseInt(b(this).attr("id").slice(STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX.length));r.timestamp=parseInt(b(this).attr("name"));r.text=b(this).html();d.content.push(r)});d.transcriptID=e;d.hash=b(this).attr("data-hash");g[e]=d;b(this).trigger(STCONST_EVENT_TRANSCRIPT_LOADED,[e]);return this}else{var c=this;window[STCONST_WSPREFIX_TRANSCRIPTCALLBACK+e.replace(/-/g,"_")]=function(r,s){f.html("");var q=new h,v=[];if(window.DOMParser)v=b(r).find("content");else{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";xmlDoc.loadXML(r);v=xmlDoc.getElementsByTagName("content")}b(v).each(function(){var x=new l;x.id=parseInt(b(this).attr("id"));x.timestamp=parseInt(b(this).attr("timestamp"));x.text=b(this).text().replace(RegExp("\n","g"),"<br>");q.content.push(x)});if(e){q.transcriptID=e;q.hash=s;g[e]=q;b(c).trigger(STCONST_EVENT_TRANSCRIPT_LOADED,[e])}};g[e]=b.ajax({type:"GET",cache:false,url:"http://jb.speakertext.com/transcripts/"+e+".js",dataType:"jsonp",success:function(){},error:function(){f.html(STCONST_TEXT_TRANSCRIPT_UNAVAILABLE)}})}return this}else f.html(STCONST_TEXT_TRANSCRIPT_UNAVAILABLE)},
STloadTranscriptFromVideoID:function(e,f){if(typeof STapiKey=="undefined")STapiKey="";var j=STapiKey+"-"+e+"-"+f;b(this).STloadTranscript(j);return this},STlogMessage:function(e){alert("Logging Message: "+e);return this},STshowMessage:function(e){var f=b(this).STmessagePane();f.html(e);f.fadeIn(200)},STshowCopyMessage:function(){var e=b(this).STsharePane();e.addClass(STCONST_CLASS_COPY_FEEDBACK);e.find("."+STCONST_CLASS_PLAYER_SHAREPANE_TEXT).html(STCONST_TEXT_MESSAGE_COPY);e.find("."+STCONST_CLASS_SHARE_BUTTON).hide()},
SThideMessage:function(){b(this).STmessagePane().fadeOut(200)},SThideCopyMessage:function(){var e=b(this).STsharePane().removeClass(STCONST_CLASS_COPY_FEEDBACK);if(e.hasClass(STCONST_CLASS_PLAYER_SHAREPANE_HIGHLIGHT))e.find("."+STCONST_CLASS_PLAYER_SHAREPANE_TEXT).html(STCONST_TEXT_SHARE_HIGHLIGHTED);else e.hasClass(STCONST_CLASS_PLAYER_SHAREPANE_HIGHLIGHT)?e.find("."+STCONST_CLASS_PLAYER_SHAREPANE_TEXT).html(STCONST_TEXT_SHARE_SELECTED):e.find("."+STCONST_CLASS_PLAYER_SHAREPANE_TEXT).html(STCONST_TEXT_SHARE_UNSELECTED);
e.find("."+STCONST_CLASS_SHARE_BUTTON).show()},onSTVPprogress:function(e,f){if(!(e<=0)){var j=b(this).STtranscript();if(j!=null){var d=j.getContentByTimestamp(e),c=b(this).data(STCONST_DATAKEY_TRANSCRIPT_IGNOREPROGRESS);if(c!==false&&!f)if(d.id<c||d.timestamp-STCONST_PLAYER_IGNORE_THRESHOLD>j.getContentByID(c).timestamp)return;else b(this).data(STCONST_DATAKEY_TRANSCRIPT_IGNOREPROGRESS,false);j=b(this).STtranscriptDisplay();c=b(this).data(STCONST_DATAKEY_TRANSCRIPT_CURRENTCONTENTID);if(c!=d.id){b(j).find("#"+
STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX+c).removeClass(STCONST_CLASS_PLAYER_CURRENTCONTENT);b(this).data(STCONST_DATAKEY_TRANSCRIPT_CURRENTCONTENTID,d.id);b(j).find("#"+STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX+d.id).addClass(STCONST_CLASS_PLAYER_CURRENTCONTENT);f&&b(this).data(STCONST_DATAKEY_VIDEOPLAYERTYPE)!=STVP_HOST_BLIP&&b(this).data(STCONST_DATAKEY_TRANSCRIPT_IGNOREPROGRESS,d.id);b(this).STsharePane().hasClass(STCONST_CLASS_PLAYER_SHAREPANE_ACTIVE)||b(this).STsharePane().addClass(STCONST_CLASS_PLAYER_SHAREPANE_ACTIVE).find("."+
STCONST_CLASS_PLAYER_SHAREPANE_TEXT).html(STCONST_TEXT_SHARE_SELECTED);b(this).STredraw()}}}},STVPseekTo:function(e){if(typeof e!="undefined"){e/=1E3;switch(b(this).data(STCONST_DATAKEY_VIDEOPLAYERTYPE)){case STVP_HOST_YT:var f=document.getElementById(b(this).STvideoPlayer().attr("id"));b(f).parent();f.seekTo(e,true);break;case STVP_HOST_VIMEO:f=document.getElementById(b(this).STvideoPlayer().attr("id"));b(f).parent();f.api_seekTo(e);break;case STVP_HOST_BC:brightcove.getExperience(b(this).STvideoPlayer().attr("id")).getModule(APIModules.VIDEO_PLAYER).seek(e);
break;case STVP_HOST_BLIP:document.getElementById(b(this).STvideoPlayer().attr("id")).sendEvent("seek",e);break;case STVP_HOST_OOYALA:document.getElementById(b(this).STvideoPlayer().attr("id")).setPlayheadTime(e);break;case STVP_HOST_SC:soundcloud.getPlayer(b(this).STvideoPlayer().attr("id")).api_seekTo(e);break;case STVP_PLAYER_JW:document.getElementById(b(this).STvideoPlayer().attr("id")).sendEvent("SEEK",e);break;default:break}}},STVPseekToAndPlay:function(e){switch(b(this).data(STCONST_DATAKEY_VIDEOPLAYERTYPE)){case STVP_HOST_YT:var f=
document.getElementById(b(this).STvideoPlayer().attr("id"));b(f).parent().STplayer();f.seekTo(e/1E3,true);f.playVideo();break;case STVP_HOST_VIMEO:f=document.getElementById(b(this).STvideoPlayer().attr("id"));b(f).parent().STplayer();f.api_play();f.api_seekTo(e/1E3);break;case STVP_HOST_BC:f=brightcove.getExperience(b(this).STvideoPlayer().attr("id")).getModule(APIModules.VIDEO_PLAYER);if(f.isPlaying())f.seek(e/1E3);else{b(this).data(STCONST_DATAKEY_PLAYERQUEUE,e);f.pause(false)}break;case STVP_HOST_BLIP:f=
document.getElementById(b(this).STvideoPlayer().attr("id"));b(this).data(STCONST_DATAKEY_PLAYERQUEUE,e);f.sendEvent("play");break;case STVP_HOST_OOYALA:f=document.getElementById(b(this).STvideoPlayer().attr("id"));if(f.getState()!=ST_CONST_OOYALASTATE_PLAYING||b(this).data(STCONST_DATAKEY_PLAYER_DISABLED)){b(this).data(STCONST_DATAKEY_PLAYERQUEUE,e);f.playMovie()}else f.setPlayheadTime(e/1E3);break;case STVP_HOST_SC:f=soundcloud.getPlayer(b(this).STvideoPlayer().attr("id"));b(this).data(STCONST_DATAKEY_PLAYERQUEUE,
e);f.api_play();break;case STVP_PLAYER_JW:f=document.getElementById(b(this).STvideoPlayer().attr("id"));if(f.getConfig().state=="IDLE"){f.sendEvent("PLAY");b(this).data(STCONST_DATAKEY_PLAYERQUEUE,e)}else f.sendEvent("SEEK",e/1E3);break;default:break}}})})(stjQuery);function isChrome(){return navigator.userAgent.toLowerCase().indexOf("chrome")!=-1}function isFirefox(){return navigator.userAgent.toLowerCase().indexOf("firefox")!=-1}
function isMSIE(){return navigator.userAgent.toLowerCase().indexOf("msie")!=-1}function STgetSelectedText(){if(window.getSelection)return window.getSelection();else if(document.getSelection)return document.getSelection();else if(document.selection)return document.selection.createRange().text;return""}
function STgetSelectedContentID(){if(typeof window.getSelection!="undefined"){var b=window.getSelection();if(b.toString()){if(typeof b.setBaseAndExtent!="undefined"){b=b.getRangeAt(0);b=b.cloneRange();b.collapse(true);b=b.startContainer}else{b=window.getSelection();b=b.getRangeAt(0);b=b.cloneRange();b.collapse(true);b=b.startContainer}if(typeof stjQuery(b).attr("id")=="undefined")b=stjQuery(b).parent();return stjQuery(b).attr("id").slice(STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX.length)}}else if(document.selection){document.selection.createRange();
b=document.selection.createRange();b.collapse(true);b=b.parentElement();return stjQuery(b).attr("id").slice(STCONST_PLAYER_TRANSCRIPTCONTENT_PREFIX.length)}}function STgetURLParameterByName(b,l){l=l.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var h=RegExp("[\\?&]?"+l+"=([^&#]*)").exec(b);return h==null?"":decodeURIComponent(h[1].replace(/\+/g," "))}
function STsetURLParameterByName(b,l,h){var g="";if(b.indexOf("?")!=-1){qlIndex=b.indexOf(l+"=");if(qlIndex!=-1){g=b.substring(0,qlIndex)+l+"="+h;isThereMore=b.indexOf("&",qlIndex);if(isThereMore>-1)g+=b.substring(isThereMore)}else g=b+"&"+l+"="+h}else g=b+"?"+l+"="+h;return g}
stjQuery.fn.extend({mousewheel:function(b,l,h){return this.hover(function(){stjQuery.event.mousewheel.giveFocus(this,b,l,h)},function(){stjQuery.event.mousewheel.removeFocus(this)})},mousewheeldown:function(b,l){return this.mousewheel(function(){},b,l)},mousewheelup:function(b,l){return this.mousewheel(b,function(){},l)},unmousewheel:function(){return this.each(function(){stjQuery(this).unmouseover().unmouseout();stjQuery.event.mousewheel.removeFocus(this)})},unmousewheeldown:stjQuery.fn.unmousewheel,
unmousewheelup:stjQuery.fn.unmousewheel});
stjQuery.event.mousewheel={giveFocus:function(b,l,h,g){b._handleMousewheel&&stjQuery(b).unmousewheel();if(g==window.undefined&&h&&h.constructor!=Function){g=h;h=null}b._handleMousewheel=function(k){if(!k)k=window.event;if(g)if(k.preventDefault)k.preventDefault();else k.returnValue=false;var n=0;if(k.wheelDelta){n=k.wheelDelta/120;if(window.opera)n=-n}else if(k.detail)n=-k.detail/3;if(l&&(n>0||!h))l.apply(b,[k,n]);else h&&n<0&&h.apply(b,[k,n])};window.addEventListener&&window.addEventListener("DOMMouseScroll",
b._handleMousewheel,false);window.onmousewheel=document.onmousewheel=b._handleMousewheel},removeFocus:function(b){if(b._handleMousewheel){window.removeEventListener&&window.removeEventListener("DOMMouseScroll",b._handleMousewheel,false);window.onmousewheel=document.onmousewheel=null;b._handleMousewheel=null}}};
var STVP_PLAYER_AUTOID_PREFIX="STautoID",STVP_HOST_YT=1,STVP_HOST_VIMEO=2,STVP_HOST_BC=3,STVP_HOST_BLIP=4,STVP_HOST_OOYALA=5,STVP_HOST_SC=6,STVP_HOST_SELF=7,STVP_PLAYER_JW=1E3,ST_CONST_YTSTATE_UNSTARTED=-1,ST_CONST_YTSTATE_ENDED=0,ST_CONST_YTSTATE_PLAYING=1,ST_CONST_YTSTATE_PAUSED=2,ST_CONST_YTSTATE_BUFFERING=3,ST_CONST_YTSTATE_CUED=5,ST_CONST_BLIPUPDATE_STATECHANGE="player_state_change",ST_CONST_BLIPUPDATE_PROGRESS="time",ST_CONST_BLIPUPDATE_PROGRESS_2="current_time_change",ST_CONST_OOYALASTATE_PLAYING=
"playing",ST_CONST_OOYALASTATE_PAUSED="paused",ST_CONST_OOYALASTATE_BUFFERING="buffering";
(function(b){b(function(){var l=0;b("object, embed:not(object > embed)").each(function(){l++;var g=b(this),k=g.attr("id");if(typeof k=="undefined"||k=="")k=STVP_PLAYER_AUTOID_PREFIX+l;g.attr("id",k);g.attr("name",k);var n="";if(this.tagName.toLowerCase()=="embed")n=g.attr("src");else{var e=g.find("embed");if(e.length)n=e.attr("src");else if(g.attr("data"))n=g.attr("data");else return true}var f=g.attr("height"),j=g.attr("width");e=function(){var d={};g.get(0).tagName.toLowerCase()=="object"&&g.find("param").each(function(){d[b(this).attr("name")]=
b(this).attr("value")});d.allowScriptAccess="always";var c={id:k,name:k};if(n.match("youtube.com")){if(STgetURLParameterByName(n,"enablejsapi")!=1)n=STsetURLParameterByName(n,"enablejsapi",1);if(STgetURLParameterByName(n,"playerapiid")!=1)n=STsetURLParameterByName(n,"playerapiid",k);swfobject.embedSWF(n,k,j,f,"8",null,null,d,c)}else if(n.match("blip.tv"))swfobject.embedSWF(n,k,j,f,"8",null,null,d,c);else if(n.match("soundcloud.com")){if(STgetURLParameterByName(n,"enable_api")!="true")n=STsetURLParameterByName(n,
"enable_api","true");if(STgetURLParameterByName(n,"object_id")!=k)n=STsetURLParameterByName(n,"object_id",k);swfobject.embedSWF(n,k,j,f,"8",null,null,d,c);b.getScript("http://jb.speakertext.com/player/soundcloud.player.api.js",function(){soundcloud.addEventListener("onPlayerReady",onSoundCloudPlayerReady)})}};typeof swfobject=="undefined"?b.getScript("http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js",e):e()});if(typeof brightcove!="undefined"&&typeof APIModules=="undefined"){var h=
brightcove.cdnURL;if(window.location.protocol=="https:")h=brightcove.secureCDNURL;b.ajax({async:false,type:"GET",url:h+"/js/APIModules_all.js",dataType:"script"})}})})(stjQuery);function passVPCallbacks(b){for(i=0;i<b.length;i++)window[b[i][0]].apply(this,b[i][1])}
function setupSpeakerText(b,l,h,g,k){if(typeof STapiKey=="undefined")STapiKey="";k.preEmbedID=STCONST_PLAYER_TRANSCRIPTEMBED_PREFIX+"STEMBEDAPIKEY_"+l+"_"+g;b.speakerText(h,k);l=b.STplayer();h=l.STmessagePane();g=l.STembedWrapper();k=Math.max(400,b.width());l.width(k-(l.outerWidth()-l.innerWidth()));h.width(k-(h.outerWidth()-h.innerWidth()));g.width(k-(g.outerWidth()-g.innerWidth()));b.css("text-align")=="center"?l.css("margin","0 auto"):l.css("margin-left",b.css("margin-left"));l.width()<460&&l.addClass("narrow");
return l}
function onYouTubePlayerReady(b){(function(l){if(typeof b!="undefined"){var h=document.getElementById(b),g=l(h).parent();g.is("object")||(g=l(h));if(l(h).is("object")){src=l(h).attr("data");if(typeof src=="undefined"||src=="")src=l(h).find("param[name='movie']").attr("value")}else src=l(h).attr("src");var k=src.match(/v\/[a-zA-Z0-9_\-]+/)[0].slice(2),n=setupSpeakerText(g,STVP_HOST_YT,STVP_HOST_YT,k,{videoPlayerID:b});h.addEventListener("onStateChange",'(function(state) { return STYTplayerStateChange(state, "'+b+
'"); })');window.setInterval(function(){var e=h.getCurrentTime(),f=l(n).data(STCONST_DATAKEY_PLAYERQUEUE);if(typeof f=="undefined")n.data(STCONST_DATAKEY_PLAYERQUEUE,-1);else if(f!=-1){n.data(STCONST_DATAKEY_PLAYERQUEUE,-1);n.STVPseekTo(f)}else n.onSTVPprogress(e*1E3,false)},100)}})(stjQuery)}
function STYTplayerStateChange(b,l){b=b;(function(h){var g=document.getElementById(l),k=h(g).parent();k.is("object")||(k=h(g));h=k.STplayer();switch(b){case ST_CONST_YTSTATE_UNSTARTED:break;case ST_CONST_YTSTATE_ENDED:break;case ST_CONST_YTSTATE_PLAYING:g=STgetURLParameterByName(g.getVideoUrl(),"v");h.STloadTranscriptFromVideoID(STVP_HOST_YT,g);break;case ST_CONST_YTSTATE_PAUSED:break;case ST_CONST_YTSTATE_BUFFERING:break;case ST_CONST_YTSTATE_CUED:g=STgetURLParameterByName(g.getVideoUrl(),"v");h.STloadTranscriptFromVideoID(STVP_HOST_YT,
g);break}})(stjQuery)}
function onTemplateLoaded(b){(function(l){var h=brightcove.getExperience(b),g=h.getModule(APIModules.VIDEO_PLAYER),k=h.getModule(APIModules.EXPERIENCE);h.getModule(APIModules.CONTENT);var n=l("#"+b);h=function(){var e=g.getCurrentVideo();setupSpeakerText(n,STVP_HOST_BC,STVP_HOST_BC,e.id,{}).STloadTranscriptFromVideoID(STVP_HOST_BC,e.id);g.pause(true)};g.getCurrentVideo()!=null?h():k.addEventListener(BCExperienceEvent.CONTENT_LOAD,h);g.addEventListener(BCMediaEvent.PROGRESS,function(e){var f=n.STplayer(),
j=l(f).data(STCONST_DATAKEY_PLAYERQUEUE);if(j!=-1){f.data(STCONST_DATAKEY_PLAYERQUEUE,-1);f.STVPseekTo(j)}else f.onSTVPprogress(e.position*1E3,false)})})(stjQuery)}
function getUpdate(b,l){(function(h){var g="",k=h("embed[src*='blip.tv']").first();if(typeof swf_id=="undefined"){k=h("object[data*='blip.tv']").first();g=h(k).attr("data")}else g=h(k).attr("src");var n=document.getElementById(h(k).attr("id"));g=g.match(/play\/[a-zA-Z0-9]+/)[0].slice(5);h=h(n).hasSpeakerText()?h(n).STplayer():setupSpeakerText(h(n),STVP_HOST_BLIP,STVP_HOST_BLIP,g,{videoPlayerID:h(k).attr("id")});switch(b){case ST_CONST_BLIPUPDATE_STATECHANGE:switch(l){case "ready":h.STloadTranscriptFromVideoID(STVP_HOST_BLIP,
g);break}break;case ST_CONST_BLIPUPDATE_PROGRESS:case ST_CONST_BLIPUPDATE_PROGRESS_2:k=h.data(STCONST_DATAKEY_PLAYERQUEUE);if(k!=-1){h.data(STCONST_DATAKEY_PLAYERQUEUE,-1);h.STVPseekTo(k)}else h.onSTVPprogress(l*1E3,false);break}})(stjQuery)}
function st_ooyala_callback(b,l,h){(function(g){var k=document.getElementById(b);g=g(k).parent();switch(l){case "apiReady":k=k.getCurrentItem();g=setupSpeakerText(g,STVP_HOST_OOYALA,STVP_HOST_OOYALA,k.embedCode,{videoPlayerID:b});g.data(STCONST_DATAKEY_PLAYER_DISABLED,false);g.STloadTranscriptFromVideoID(STVP_HOST_OOYALA,k.embedCode);break;case "playheadTimeChanged":g=g.STplayer();if(!g.data(STCONST_DATAKEY_PLAYER_DISABLED)){k=g.data(STCONST_DATAKEY_PLAYERQUEUE);if(k!=-1){g.data(STCONST_DATAKEY_PLAYERQUEUE,
-1);g.STVPseekTo(k)}else g.onSTVPprogress(h.playheadTime*1E3,false)}break;case "adStarted":g=g.STplayer();g.data(STCONST_DATAKEY_PLAYER_DISABLED,true);break;case "adCompleted":g=g.STplayer();g.data(STCONST_DATAKEY_PLAYER_DISABLED,false);break}})(stjQuery)}
function onSoundCloudPlayerReady(b,l){(function(h){var g=b.id,k=h(b).parent();k.is("object")||(k=h(b));k="";if(h(b).is("object")){k=h(b).attr("data");if(typeof k=="undefined"||k=="")k=h(b).find("param[name='movie']").attr("value")}else k=h(b).attr("src");k=l.mediaId;var n=setupSpeakerText(h(b),STVP_HOST_SC,STVP_HOST_SC,k,{videoPlayerID:g});n.STloadTranscriptFromVideoID(STVP_HOST_SC,k);window.setInterval(function(){var e=b.api_getTrackPosition(),f=h(n).data(STCONST_DATAKEY_PLAYERQUEUE);if(typeof f==
"undefined")n.data(STCONST_DATAKEY_PLAYERQUEUE,-1);else if(f!=-1&&e>0){n.data(STCONST_DATAKEY_PLAYERQUEUE,-1);n.STVPseekTo(f)}else n.onSTVPprogress(e*1E3,false)},100)})(stjQuery)}
function playerReady(b){(function(l){var h=b.id;if(typeof h!="undefined"){var g=document.getElementById(h),k=function(){var n=l(g).find("param[name=flashvars]").attr("value");if(typeof n=="undefined")n=l(g).attr("flashvars");n=STgetURLParameterByName(n,"file").replace(/%3F/g,"?").replace(/%3D/g,"=").replace(/%26/g,"&");n=l("<a/>").attr("href",n)[0].pathname.replace(/^[^\/]/,"/");n=sha1Hash(n);setupSpeakerText(l(g),STVP_HOST_SELF,STVP_PLAYER_JW,n,{videoPlayerID:h}).STloadTranscriptFromVideoID(STVP_HOST_SELF,
n);g.addModelListener("TIME","STjw_on_progress")};typeof sha1Hash=="undefined"?l.getScript("http://jb.speakertext.com/player/sha1.js",k):k()}})(stjQuery)}function STjw_on_progress(b){(function(l){if(typeof b.id!="undefined"){var h=document.getElementById(b.id),g=l(h).STplayer();l=l(g).data(STCONST_DATAKEY_PLAYERQUEUE);if(l!=-1&&h.getConfig().state=="PLAYING"){g.data(STCONST_DATAKEY_PLAYERQUEUE,-1);g.STVPseekTo(l)}else g.onSTVPprogress(parseFloat(b.position)*1E3,false)}})(stjQuery)};

