'
+ ' Update Required'
+ ' To play the media you will need to either update your browser to a recent version or update your Flash plugin.'
+ '
'
+ '
'
+ '
'
,
grade_save_complete: false,
asset_url: function(url) {
if (location.href.indexOf("manuscript/preview/") > -1) {
url = url.replace(/^asset/, "/asset/bfw_demo");
}
return url;
},
show_section_animate: function(section_to_show, direction) {
// "hide" audio player before hiding the section
// (because we don't want to set display:none on the player)
this.jplayer_hide();
// hide currently showing section
if (this.section_currently_showing != null) {
this.get_current_section_jq().hide();
}
this.section_currently_showing = section_to_show;
var s = player.get_current_section();
s.jq.fadeIn(player.fadeIn_duration);
// scroll to top
window.scrollTo(0,0);
// highlight this section in the menu and show correct arrow
$(".activity_menu_item").removeClass("selected");
$(".activity_menu_item_arrow").find("img").attr("src", player.asset_url('asset/css/rightarrow.gif'));
var menu_jq = $("#activity_menu_item_" + this.section_currently_showing);
menu_jq.addClass("selected");
menu_jq.find(".activity_menu_item_arrow").find("img").attr("src", player.asset_url('asset/css/leftarrow.gif'));
// move controller into place and show first box
menu_jq.append(player.controller);
// reset controller controls
$("#controller_text").html("");
$("#controller_instructions").hide();
player.controller_instructions_kill();
// show the first box (resetting the audio and images as well)
player.controller_skip_to(0);
// then reveal the controller
player.controller.hide().slideDown(300);
// make sure audio isn't playing
player.controller_pause();
// show the play button if there is one
s.jq.find(".figure_play_button_img").show();
// if there's an audio file specified...
if (s.audio != null) {
// show the checkbox
$("#controller_audio_checkbox_div").show();
// and load the file
this.jplayer_load("mp3/" + s.audio + ".mp3");
// (we're not currently using the player)
// this.jplayer_show(s.jq.find("h2"));
// if there wasn't an audio file, hide the checkbox
} else {
$("#controller_audio_checkbox_div").hide();
}
// Do some things depending on whether or not the section has events.
// if we have events...
if (s.events.length > 1) {
// show controller_instructions after a short delay
player.controller_instructions_timeout = setTimeout('$("#controller_instructions").slideDown(300)', 4000);
// show the controller play link
$("#controller_play_link").css("visibility","visible");
$("#controller_text").css("min-height","125px");
// else we don't have events, so...
} else {
// hide the controller play link
$("#controller_play_link").css("visibility","hidden");
$("#controller_text").css("min-height","0");
}
},
show_navigation: function() {
var html = "
" + this.activity_title + "
";
$("#manuscript").before(html);
html = "
"
+ "
"
for (var i = 0; i < this.sections.length; ++i) {
var s = this.sections[i];
html += "
";
if (s.jq.attr("data-block_type") == "call_to_action") {
html += "
";
s.audio = null;
s.activity = null;
s.images = [];
s.boxes = [];
s.current_image = -1;
s.current_box = -1;
// prepare text boxes to switch to
var auto_box_time = 0;
s.jq.find('[data-type="box"]').not("[data-block_type]").each(function(index, element) {
$(this).attr("box_index", index);
// time should be specified by [x] at the beginning of the block
// and if we have [*x], that designates a block where we should pause
var time = null;
var pause_at = false;
var html = $(this).html();
var new_html = html.replace(/\s*\[(\*?)(\d+)]/, "");
if (new_html != html) {
if (RegExp.$1 != "") {
pause_at = true;
}
time = RegExp.$2;
$(this).html(new_html)
auto_box_time = time + 5;
// if no time is specified,
} else {
// give it an auto time, and assume we need to pause there
time = auto_box_time;
auto_box_time += 5;
pause_at = true;
}
s.boxes.push({
action: "box",
pause_at: pause_at,
time: time,
index: index
});
});
// extract image and box switches from metadata for section; use custom method
var md = s.jq.find("[data-type=metadata]");
if (md.length > 0) {
// var box_index_to_set = 1;
md.find('[data-type="field"]').each(function(index, element) {
var jq = $(element);
if (jq.attr("key") == "audio") {
s.audio = jq.text();
} else if (jq.attr("key") == "activity") {
s.activity = jq.text();
} else if (jq.attr("key") == "switch_image") {
var arr = jq.text().split(/,\s*/);
if (arr.length != 2 || isNaN(arr[0]*1)) {
safe_log("Invalid switch_image specified: " + jq.text() + " (" + s.images.length + ")");
}
s.images.push({
action: "image",
time: arr[0] * 1,
src: arr[1]
});
// preload image
var path = player.asset_url("asset/" + arr[1]);
var image = $('').attr('src', path);
}
});
}
// find the main figure for the section
s.main_figure = s.jq.find('[data-type="figure"]').filter('[data-layout-width="xlarge"]');
if (s.main_figure.length == 0) {
s.main_figure = null;
} else {
var play_icon_html = "";
// if there's an activity, prepare for that
if (s.activity != null) {
// set cursor to pointer and show the "play" icon
s.main_figure.css({"cursor":"pointer", "position":"relative"});
s.main_figure.append(play_icon_html);
// click event opens activity
s.main_figure.click(function(){
var url = player.get_current_section().activity;
// correct for quirk where "http://websterfw.com" is removed from urls
if (url.indexOf("websterfw") == 0) {
url = "http://" + url;
}
window.open(url, "activity_window", "height=748,width=1004,location=no,manubar=no,resizable=yes,status=no,toolbar=no,top=5,left=5,scrollbars=yes", false);
});
}
// prepare for image switching
// Note original image src
var image = s.main_figure.find("img").not(".figure_play_button_img");
if (image.length > 0) {
s.image_original_src = image.attr("src");
}
// if there's no image for time 0, unshift this one in there
if (s.images[0] == null || s.images[0].time != 0) {
// also, we have to take "asset/" or "bfw_demo/" out of the src
var src = s.image_original_src;
if (src != null && src != "") {
src = s.image_original_src.replace(/.*asset\//, "");
src = src.replace(/.*bfw_demo\//, "");
} else {
src = null;
}
s.images.unshift({
action: "image",
time: 0,
src: src
});
// also, in this case we're currently showing image 0
s.current_image = 0;
}
// if there's more than one image or box, set cursor to pointer and show the "play" icon
// and set click event
if (s.images.length > 1 && s.boxes.length > 1) {
// don't put play icon in if we already have it
if (s.activity == null) {
s.main_figure.css({"cursor":"pointer", "position":"relative"});
s.main_figure.append(play_icon_html);
}
s.main_figure.click(function() {
player.controller_toggle_play()
});
}
}
// now combine all events into one array
s.events = [];
s.current_event = 0;
var bi = 0;
var ii = 0;
while (true) {
var box = s.boxes[bi];
var image = s.images[ii];
if (box == null && image == null) {
break;
}
var e = new Object();
// only box exists, OR box time < image time
if ((box != null && image == null) || (box != null && image != null && box.time < image.time)) {
e.box_index = bi;
e.time = box.time;
e.pause_at = box.pause_at;
box.event_index = s.events.length;
++bi;
// only image exists, OR image time < box time
} else if ((image != null && box == null) || (box != null && image != null && image.time < box.time)) {
e.image_index = ii;
e.time = image.time;
e.pause_at = image.pause_at;
image.event_index = s.events.length;
++ii;
// both exist and are at the same time
} else {
e.box_index = bi;
e.image_index = ii;
e.time = box.time;
e.pause_at = (box.pause_at == true || image.pause_at == true);
box.event_index = s.events.length;
image.event_index = s.events.length;
++ii;
++bi;
}
s.events.push(e);
}
// any special boxes should be shown
s.jq.find('[data-type="box"]').filter("[data-block_type]").show();
}
html += "
";
$("#manuscript").append(html);
player.controller = $("#controller_outer");
player.controller.hide();
// activate all other buttons
UI_Elements.activate_buttons();
},
update_navigation: function() {
// Just do this in show_section_animate
},
jplayer_ready_callback: function(event) {
player.jplayer_ready = true;
},
jplayer_update: function(event) {
var status = event.jPlayer.status;
// record the duration; this doesn't seem to be available in jplayer_ready_callback
var s = player.get_current_section();
s.audio_duration = status.duration;
if (status.paused || player.audio_on == false || player.audio_playing == false) {
return;
} else {
player.controller_skip_to(status.currentTime);
}
},
jplayer_load: function(fn) {
if (player.jplayer_ready == false) {
player.jplayer_load_timeout = setTimeout("player.jplayer_load('" + fn + "')", 1000);
return;
}
// first cancel any previous load
if (player.jplayer_load_timeout != null) {
clearTimeout(player.jplayer_load_timeout);
player.jplayer_load_timeout = null;
}
player.jplayer_jq.jPlayer("clearMedia");
// then load the new file
player.jplayer_jq.jPlayer("setMedia", {
mp3:player.asset_url("asset/" + fn)
});
},
jplayer_show: function(where) {
where.before(player.jplayer_div);
player.jplayer_div.css({"width": "215px", "height": "65px", "position":"static"});
},
jplayer_hide: function() {
player.jplayer_div.css({"width": "0px", "height": "0px", "position":"absolute", "top":"0"});
$("#manuscript").before(player.jplayer_div);
},
jplayer_play: function() {
player.jplayer_jq.jPlayer("play");
player.audio_playing = true;
// call controller_play (but don't skip right here) to show appropriate buttons.
player.controller_play(false);
},
jplayer_pause: function() {
player.audio_playing = false;
player.jplayer_jq.jPlayer("pause");
},
jplayer_play_handler: function() {
},
jplayer_pause_handler: function() {
},
jplayer_ended_handler: function() {
if (player.audio_playing) {
player.audio_playing = false;
// play the next section in a few seconds
if (!player.showing_last_section()) {
setTimeout("player.play_next_section()", 1000);
} else {
player.controller_pause();
}
}
},
jplayer_skip_to: function(time_to_load) {
var s = player.get_current_section();
var total_seconds = s.audio_duration;
var percent = time_to_load / total_seconds * 100;
player.jplayer_jq.jPlayer("playHead", percent);
},
show_text_box: function(box_index) {
var s = player.get_current_section();
var html = "";
if (box_index > -1) {
html = s.jq.find('[box_index=' + box_index + ']').html();
}
if (html == "") {
safe_log("Tried to show box " + box_index + " but couldn't find it.");
}
$("#controller_text").html(html);
s.current_box = box_index;
},
show_image: function(image_index) {
var s = player.get_current_section();
if (image_index != s.current_image) {
var image_src_to_show;
if (image_index == -1) {
image_src_to_show = s.image_original_src;
} else {
image_src_to_show = player.asset_url("asset/" + s.images[image_index].src);;
}
var img = s.main_figure.find("img").not(".figure_play_button_img");
img.hide().attr("src", image_src_to_show).show();
s.current_image = image_index;
}
},
controller_toggle_play: function(force) {
if (force == null) {
force = !player.auto_play;
}
if (force) {
var s = player.get_current_section();
// if we're at the end of the events, start over
if (s.events[s.current_event+1] == null) {
player.controller_skip_to(0);
if (player.audio_on != true) {
$("#controller_play_link").find("a").html("<PLAY>");
s.jq.find(".figure_play_button_img").show();
}
// otherwise start playing...
} else {
// if audio is playing, call controller_play without skipping,
// then start audio (which will start skipping)
if (s.audio != null && player.audio_on) {
player.controller_play(false);
player.jplayer_play();
// otherwise just call controller_play
} else {
player.controller_play();
}
}
} else {
player.controller_pause();
}
},
controller_play: function(start_skipping) {
var s = player.get_current_section();
// hide controller_instructions if necessary
player.controller_instructions_kill();
if (start_skipping == null) {
start_skipping = true;
}
player.auto_play = true;
// toggle button changes to PAUSE, and hide back/next
$("#controller_play_link").find("a").html("<PAUSE>");
// $("#controller_prev_link").css("visibility","hidden");
// $("#controller_next_link").css("visibility","hidden");
// hide figure_play_button_img
s.jq.find(".figure_play_button_img").hide();
// then start skipping (unless told not to)
if (start_skipping) {
player.controller_skip_to('next');
}
},
controller_pause: function() {
var s = player.get_current_section();
player.auto_play = false;
// toggle button changes to PLAY if there's another event to show,
// or if there is only one event at all
if (s.events.length <= 1 || s.events[s.current_event+1] != null) {
$("#controller_play_link").find("a").html("<PLAY>");
// otherwise we're at the end of the line, in which case show "RESET"
} else {
$("#controller_play_link").find("a").html("<RESET>");
}
// show figure_play_button_img
s.jq.find(".figure_play_button_img").show();
// then cancel skipping
player.controller_cancel_skip_timeout();
// and make sure audio is paused
player.jplayer_pause();
},
controller_set_skip_timeout: function(td) {
player.skip_timeout = setTimeout("player.controller_skip_to('next')", td*1000);
},
controller_cancel_skip_timeout: function() {
if (player.skip_timeout != null) {
clearTimeout(player.skip_timeout);
}
player.skip_timeout = null;
},
controller_instructions_kill: function() {
if (player.controller_instructions_timeout != null) {
clearTimeout(player.controller_instructions_timeout);
}
$("#controller_instructions").slideUp(300);
player.controller_instructions_timeout = null;
},
controller_skip_to: function(where) {
// note whether or not this fn was called automatically
var called_automatically = (player.skip_timeout != null);
// then cancel previously-scheduled timeout if present
player.controller_cancel_skip_timeout();
var s = player.get_current_section();
var image_index = s.current_image;
var box_index = s.current_box;
// "where" could be prev or next
if (where == 'prev' || where == 'next') {
// hide controller_instructions if necessary
player.controller_instructions_kill();
// make sure play/pause button is set properly
// PW: not sure when I put this in, but it breaks things now...
if (s.events.length > 1) {
// $("#controller_play_link").find("a").html("<PLAY>");
}
var time_to_load = null;
if (where == 'next') {
// try to get next event
var e = s.events[s.current_event+1];
// if it doesn't exist...
if (e == null) {
// if there is a next *section* (there should be if we're here), show it
if (!player.showing_last_section()) {
player.show_section('next');
}
return;
}
// else there is a next event, so show it
// update image_index and/or box_index
if (e.image_index != null) {
image_index = e.image_index;
}
if (e.box_index != null) {
box_index = e.box_index;
}
// time to load is this event's time
time_to_load = e.time;
// update current_event
++s.current_event;
// NOW: if the current event isn't a "pause_at" event,
// schedule to automatically skip to the next item
// (unless the audio is playing, in which case it'll take care of the skipping)
if (player.audio_playing != true) {
var next_event = s.events[s.current_event+1];
// if we're not supposed to pause here, OR player.auto_play is set to true,
// set a timeout to skip to the next event (if there is a next event)
if ((player.auto_play == true || e.pause_at != true) && next_event != null) {
var td = next_event.time - e.time;
player.controller_set_skip_timeout(td);
// else make sure that everything is paused
} else {
player.controller_pause();
}
}
// else we're going back...
} else {
// if there is no previous event...
if (s.current_event <= 0) {
// if there is a previous *section* (there should be if we're here), show it
if (!player.showing_first_section()) {
player.show_section('previous');
return;
}
}
// else there is a previous event, so go back
// find the last pause_at event, or event 0
while (s.current_event > 0) {
--s.current_event;
var e = s.events[s.current_event];
// update image_index and/or box_index
if (e.image_index != null) {
image_index = e.image_index;
}
if (e.box_index != null) {
box_index = e.box_index;
}
// time to load is this event's time
time_to_load = e.time;
if (e.pause_at == true) {
break;
}
}
}
// if we have an audio file, skip to this time in the audio
if (s.audio != null && time_to_load != null) {
player.jplayer_skip_to(time_to_load);
}
// also, if we're supposed to be playing and aren't, start playing
if (s.audio != null && player.audio_playing == false && player.audio_on == true) {
player.jplayer_play();
}
// hide figure_play_button_img (have to do it here, after controller_pause might have been called
s.jq.find(".figure_play_button_img").hide();
// or where could represent a time
} else {
// find the box to be shown at that time
for (var i = 0; i < s.boxes.length; ++i) {
var box = s.boxes[i];
if (box.time <= where) {
box_index = i;
// set current_event to this item's event_index
s.current_event = box.event_index;
}
}
// and the image to be shown at that time
for (var i = 0; i < s.images.length; ++i) {
var image = s.images[i];
if (image.time <= where) {
image_index = i;
if (image.event_index > s.current_event) {
s.current_event = image.event_index;
}
}
}
// if audio isn't already playing and should be, start it
if (s.audio != null && player.audio_playing == false && player.audio_on == true) {
player.jplayer_play();
}
}
// show the appropriate box and image
player.show_text_box(box_index);
player.show_image(image_index);
// disable next link if there's no next item in this section AND this is the last section
if (s.boxes[box_index+1] == null && s.images[image_index+1] == null && player.showing_last_section()) {
$("#controller_next_link").addClass("controller_disabled_link");
} else {
$("#controller_next_link").removeClass("controller_disabled_link");
}
// disable back link if there's no previous item in this section AND this is the first section
if (box_index <= 0 && image_index <= 0 && player.showing_first_section()) {
$("#controller_prev_link").addClass("controller_disabled_link");
} else {
$("#controller_prev_link").removeClass("controller_disabled_link");
}
},
controller_toggle_audio: function(arg) {
if (typeof(arg) == "object") {
player.audio_on = $(arg).is(':checked');
} else if (arg != null) {
player.audio_on = arg;
} else {
player.audio_on = !player.audio_on;
}
if (player.audio_on) {
player.jplayer_play();
} else {
// if we're pausing, we have to pause auto-playback too, so call controller_pause
// (which will in turn call jplayer_pause)
player.controller_pause();
}
return;
},
play_next_section: function() {
this.show_section('next');
this.controller_toggle_play(true);
},
extract_activity_metadata: function() {
this._super();
},
get_replacement_string: function(s) {
var ss = window.location.search.substr(1);
var re = new RegExp(s + "=([^\&]*)");
if (ss.search(re) > -1) {
player.class_data[s] = unescape(RegExp.$1);
}
},
replaced_text: function(html, s, r) {
if (r == null) {
r = player.class_data[s];
}
var re = new RegExp("xxx_" + s + "_xxx", "g");
if (player.class_data[s] != null) {
html = html.replace(re, unescape(r));
} else {
html = html.replace(re, "");
}
return html;
},
initialize: function() {
// look for items in the url string
this.get_replacement_string("product_name");
this.get_replacement_string("instructor_name");
this.get_replacement_string("link_url");
this.get_replacement_string("access_code");
$("[data-block_type=replaced_text]").each(function(index, element) {
var jq = $(element);
var html = jq.html();
html = player.replaced_text(html, "product_name");
html = player.replaced_text(html, "instructor_name", ", " + player.class_data.instructor_name + ",");
html = player.replaced_text(html, "link_url");
html = player.replaced_text(html, "access_code");
jq.html(html);
});
// insert jplayer, initialize it, and hide it
$("#manuscript").before(this.jplayer_html);
this.jplayer_div = $("#jp_container_1");
this.jplayer_div.css({"width": "0px", "height": "0px"});
this.jplayer_ready = false;
this.jplayer_jq = $("#jquery_jplayer_1");
this.jplayer_jq.jPlayer({
ready: player.jplayer_ready_callback,
preload: "auto",
swfPath: player.asset_url("asset/js/Jplayer.swf"),
supplied: "mp3",
wmode: "window",
volume: 1
}).bind($.jPlayer.event.timeupdate, player.jplayer_update)
.bind($.jPlayer.event.play, player.jplayer_play_handler)
.bind($.jPlayer.event.pause, player.jplayer_pause_handler)
.bind($.jPlayer.event.ended, player.jplayer_ended_handler)
;
// activity title is data-type="title" inside h1
this.activity_title = $("h1").find("[data-type=title]").html();
this._super();
// after we call this.super, re-initialize the activity to the custom
// activity type for this manuscript
this.activity = new Activity_manuscript_type();
},
initialize2: function() {
this._super();
},
init: function() {
this._super();
}
});
player = new Player_manuscript_type();
/*
* jPlayer Plugin for jQuery JavaScript Library
* http://www.jplayer.org
*
* Copyright (c) 2009 - 2012 Happyworm Ltd
* Dual licensed under the MIT and GPL licenses.
* - http://www.opensource.org/licenses/mit-license.php
* - http://www.gnu.org/copyleft/gpl.html
*
* Author: Mark J Panaghiston
* Version: 2.2.0
* Date: 13th September 2012
*/
(function(b,f){b.fn.jPlayer=function(a){var c="string"===typeof a,d=Array.prototype.slice.call(arguments,1),e=this,a=!c&&d.length?b.extend.apply(null,[!0,a].concat(d)):a;if(c&&"_"===a.charAt(0))return e;c?this.each(function(){var c=b.data(this,"jPlayer"),h=c&&b.isFunction(c[a])?c[a].apply(c,d):c;if(h!==c&&h!==f)return e=h,!1}):this.each(function(){var c=b.data(this,"jPlayer");c?c.option(a||{}):b.data(this,"jPlayer",new b.jPlayer(a,this))});return e};b.jPlayer=function(a,c){if(arguments.length){this.element=
b(c);this.options=b.extend(!0,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};b.jPlayer.emulateMethods="load play pause";b.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";b.jPlayer.emulateOptions="muted volume";b.jPlayer.reservedEvent="ready flashreset resize repeat error warning";b.jPlayer.event={ready:"jPlayer_ready",flashreset:"jPlayer_flashreset",resize:"jPlayer_resize",repeat:"jPlayer_repeat",
click:"jPlayer_click",error:"jPlayer_error",warning:"jPlayer_warning",loadstart:"jPlayer_loadstart",progress:"jPlayer_progress",suspend:"jPlayer_suspend",abort:"jPlayer_abort",emptied:"jPlayer_emptied",stalled:"jPlayer_stalled",play:"jPlayer_play",pause:"jPlayer_pause",loadedmetadata:"jPlayer_loadedmetadata",loadeddata:"jPlayer_loadeddata",waiting:"jPlayer_waiting",playing:"jPlayer_playing",canplay:"jPlayer_canplay",canplaythrough:"jPlayer_canplaythrough",seeking:"jPlayer_seeking",seeked:"jPlayer_seeked",
timeupdate:"jPlayer_timeupdate",ended:"jPlayer_ended",ratechange:"jPlayer_ratechange",durationchange:"jPlayer_durationchange",volumechange:"jPlayer_volumechange"};b.jPlayer.htmlEvent="loadstart abort emptied stalled loadedmetadata loadeddata canplay canplaythrough ratechange".split(" ");b.jPlayer.pause=function(){b.each(b.jPlayer.prototype.instances,function(a,c){c.data("jPlayer").status.srcSet&&c.jPlayer("pause")})};b.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,
sepHour:":",sepMin:":",sepSec:""};b.jPlayer.convertTime=function(a){var c=new Date(1E3*a),d=c.getUTCHours(),a=c.getUTCMinutes(),c=c.getUTCSeconds(),d=b.jPlayer.timeFormat.padHour&&10>d?"0"+d:d,a=b.jPlayer.timeFormat.padMin&&10>a?"0"+a:a,c=b.jPlayer.timeFormat.padSec&&10>c?"0"+c:c;return(b.jPlayer.timeFormat.showHour?d+b.jPlayer.timeFormat.sepHour:"")+(b.jPlayer.timeFormat.showMin?a+b.jPlayer.timeFormat.sepMin:"")+(b.jPlayer.timeFormat.showSec?c+b.jPlayer.timeFormat.sepSec:"")};b.jPlayer.uaBrowser=
function(a){var a=a.toLowerCase(),c=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,e=/(mozilla)(?:.*? rv:([\w.]+))?/,a=/(webkit)[ \/]([\w.]+)/.exec(a)||c.exec(a)||b.exec(a)||0>a.indexOf("compatible")&&e.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};b.jPlayer.uaPlatform=function(a){var b=a.toLowerCase(),d=/(android)/,e=/(mobile)/,a=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(b)||[],b=/(ipad|playbook)/.exec(b)||!e.exec(b)&&d.exec(b)||[];a[1]&&(a[1]=a[1].replace(/\s/g,
"_"));return{platform:a[1]||"",tablet:b[1]||""}};b.jPlayer.browser={};b.jPlayer.platform={};var i=b.jPlayer.uaBrowser(navigator.userAgent);i.browser&&(b.jPlayer.browser[i.browser]=!0,b.jPlayer.browser.version=i.version);i=b.jPlayer.uaPlatform(navigator.userAgent);i.platform&&(b.jPlayer.platform[i.platform]=!0,b.jPlayer.platform.mobile=!i.tablet,b.jPlayer.platform.tablet=!!i.tablet);b.jPlayer.prototype={count:0,version:{script:"2.2.0",needFlash:"2.2.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",
supplied:"mp3",preload:"metadata",volume:0.8,muted:!1,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",currentTime:".jp-current-time",duration:".jp-duration",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",
repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},fullScreen:!1,autohide:{restored:!1,full:!0,fadeIn:200,fadeOut:600,hold:1E3},loop:!1,repeat:function(a){a.jPlayer.options.loop?b(this).unbind(".jPlayerRepeat").bind(b.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){b(this).jPlayer("play")}):b(this).unbind(".jPlayerRepeat")},nativeVideoControls:{},noFullScreen:{msie:/msie [0-6]/,ipad:/ipad.*?os [0-4]/,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3](?!.*?mobile)/,
android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,webos:/webos/},noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,webos:/webos/,playbook:/playbook/},verticalVolume:!1,idPrefix:"jp",noConflict:"jQuery",emulateHtml:!1,errorAlerts:!1,warningAlerts:!1},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},
optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:!0,format:{},formatType:"",waitForPlay:!0,waitForLoad:!0,srcSet:!1,video:!1,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:!1},solution:{html:!0,flash:!0},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:!0,
media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis"',flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!0,media:"video"},
ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},_init:function(){var a=this;this.element.empty();this.status=b.extend({},this.status);this.internal=b.extend({},this.internal);this.internal.domNode=this.element.get(0);this.formats=[];this.solutions=[];this.require=
{};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.ancestorJq=[];this.options.volume=this._limitValue(this.options.volume,0,1);b.each(this.options.supplied.toLowerCase().split(","),function(c,d){var e=d.replace(/^\s+|\s+$/g,"");if(a.format[e]){var f=false;b.each(a.formats,function(a,b){if(e===b){f=true;return false}});f||a.formats.push(e)}});b.each(this.options.solution.toLowerCase().split(","),function(c,d){var e=
d.replace(/^\s+|\s+$/g,"");if(a.solution[e]){var f=false;b.each(a.solutions,function(a,b){if(e===b){f=true;return false}});f||a.solutions.push(e)}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);this.internal.self=b.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=b.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:f});this.internal.video=
b.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:f});this.internal.flash=b.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:f,swf:this.options.swfPath+(this.options.swfPath.toLowerCase().slice(-4)!==".swf"?(this.options.swfPath&&this.options.swfPath.slice(-1)!=="/"?"/":"")+"Jplayer.swf":"")});this.internal.poster=b.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:f});b.each(b.jPlayer.event,function(b,c){if(a.options[b]!==f){a.element.bind(c+".jPlayer",a.options[b]);
a.options[b]=f}});this.require.audio=false;this.require.video=false;b.each(this.formats,function(b,c){a.require[a.format[c].media]=true});this.options=this.require.video?b.extend(true,{},this.optionsVideo,this.options):b.extend(true,{},this.optionsAudio,this.options);this._setSize();this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this.status.noFullScreen=this._uaBlocklist(this.options.noFullScreen);this.status.noVolume=this._uaBlocklist(this.options.noVolume);this._restrictNativeVideoControls();
this.htmlElement.poster=document.createElement("img");this.htmlElement.poster.id=this.internal.poster.id;this.htmlElement.poster.onload=function(){(!a.status.video||a.status.waitForPlay)&&a.internal.poster.jq.show()};this.element.append(this.htmlElement.poster);this.internal.poster.jq=b("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.internal.poster.jq.bind("click.jPlayer",function(){a._trigger(b.jPlayer.event.click)});
this.html.audio.available=false;if(this.require.audio){this.htmlElement.audio=document.createElement("audio");this.htmlElement.audio.id=this.internal.audio.id;this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio)}this.html.video.available=false;if(this.require.video){this.htmlElement.video=document.createElement("video");this.htmlElement.video.id=this.internal.video.id;this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video)}this.flash.available=
this._checkForFlash(10);this.html.canPlay={};this.flash.canPlay={};b.each(this.formats,function(b,c){a.html.canPlay[c]=a.html[a.format[c].media].available&&""!==a.htmlElement[a.format[c].media].canPlayType(a.format[c].codec);a.flash.canPlay[c]=a.format[c].flashCanPlay&&a.flash.available});this.html.desired=false;this.flash.desired=false;b.each(this.solutions,function(c,d){if(c===0)a[d].desired=true;else{var e=false,f=false;b.each(a.formats,function(b,c){a[a.solutions[0]].canPlay[c]&&(a.format[c].media===
"video"?f=true:e=true)});a[d].desired=a.require.audio&&!e||a.require.video&&!f}});this.html.support={};this.flash.support={};b.each(this.formats,function(b,c){a.html.support[c]=a.html.canPlay[c]&&a.html.desired;a.flash.support[c]=a.flash.canPlay[c]&&a.flash.desired});this.html.used=false;this.flash.used=false;b.each(this.solutions,function(c,d){b.each(a.formats,function(b,c){if(a[d].support[c]){a[d].used=true;return false}})});this._resetActive();this._resetGate();this._cssSelectorAncestor(this.options.cssSelectorAncestor);
if(!this.html.used&&!this.flash.used){this._error({type:b.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SOLUTION,hint:b.jPlayer.errorHint.NO_SOLUTION});this.css.jq.noSolution.length&&this.css.jq.noSolution.show()}else this.css.jq.noSolution.length&&this.css.jq.noSolution.hide();if(this.flash.used){var c,d="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+
"&muted="+this.options.muted;if(b.jPlayer.browser.msie&&Number(b.jPlayer.browser.version)<=8){d=['','','','',''];c=document.createElement('');
for(var e=0;e0?100*d/this.status.duration:0;if(typeof a.seekable==="object"&&a.seekable.length>0){g=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100;f=this.status.duration>0?100*a.currentTime/a.seekable.end(a.seekable.length-1):0}else{g=
100;f=e}if(b)e=f=d=0;this.status.seekPercent=g;this.status.currentPercentRelative=f;this.status.currentPercentAbsolute=e;this.status.currentTime=d;this.status.readyState=a.readyState;this.status.networkState=a.networkState;this.status.playbackRate=a.playbackRate;this.status.ended=a.ended},_resetStatus:function(){this.status=b.extend({},this.status,b.jPlayer.prototype.status)},_trigger:function(a,c,d){a=b.Event(a);a.jPlayer={};a.jPlayer.version=b.extend({},this.version);a.jPlayer.options=b.extend(true,
{},this.options);a.jPlayer.status=b.extend(true,{},this.status);a.jPlayer.html=b.extend(true,{},this.html);a.jPlayer.flash=b.extend(true,{},this.flash);if(c)a.jPlayer.error=b.extend({},c);if(d)a.jPlayer.warning=b.extend({},d);this.element.trigger(a)},jPlayerFlashEvent:function(a,c){if(a===b.jPlayer.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media);d>0&&(e?this.pause(d):this.play(d))}this._trigger(b.jPlayer.event.flashreset)}}else{this.internal.ready=
true;this.internal.flash.jq.css({width:"0px",height:"0px"});this.version.flash=c.version;this.version.needFlash!==this.version.flash&&this._error({type:b.jPlayer.error.VERSION,context:this.version.flash,message:b.jPlayer.errorMsg.VERSION+this.version.flash,hint:b.jPlayer.errorHint.VERSION});this._trigger(b.jPlayer.event.repeat);this._trigger(a)}if(this.flash.gate)switch(a){case b.jPlayer.event.progress:this._getFlashStatus(c);this._updateInterface();this._trigger(a);break;case b.jPlayer.event.timeupdate:this._getFlashStatus(c);
this._updateInterface();this._trigger(a);break;case b.jPlayer.event.play:this._seeked();this._updateButtons(true);this._trigger(a);break;case b.jPlayer.event.pause:this._updateButtons(false);this._trigger(a);break;case b.jPlayer.event.ended:this._updateButtons(false);this._trigger(a);break;case b.jPlayer.event.click:this._trigger(a);break;case b.jPlayer.event.error:this.status.waitForLoad=true;this.status.waitForPlay=true;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&&
this.internal.poster.jq.show();this.css.jq.videoPlay.length&&this.status.video&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media);this._updateButtons(false);this._error({type:b.jPlayer.error.URL,context:c.src,message:b.jPlayer.errorMsg.URL,hint:b.jPlayer.errorHint.URL});break;case b.jPlayer.event.seeking:this._seeking();this._trigger(a);break;case b.jPlayer.event.seeked:this._seeked();this._trigger(a);break;case b.jPlayer.event.ready:break;
default:this._trigger(a)}return false},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative;this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration;this.status.readyState=4;this.status.networkState=0;this.status.playbackRate=1;this.status.ended=false},_updateButtons:function(a){if(a!==f){this.status.paused=!a;if(this.css.jq.play.length&&this.css.jq.pause.length)if(a){this.css.jq.play.hide();
this.css.jq.pause.show()}else{this.css.jq.play.show();this.css.jq.pause.hide()}}if(this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length)if(this.status.noFullScreen){this.css.jq.fullScreen.hide();this.css.jq.restoreScreen.hide()}else if(this.options.fullScreen){this.css.jq.fullScreen.hide();this.css.jq.restoreScreen.show()}else{this.css.jq.fullScreen.show();this.css.jq.restoreScreen.hide()}if(this.css.jq.repeat.length&&this.css.jq.repeatOff.length)if(this.options.loop){this.css.jq.repeat.hide();
this.css.jq.repeatOff.show()}else{this.css.jq.repeat.show();this.css.jq.repeatOff.hide()}},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%");this.css.jq.playBar.length&&this.css.jq.playBar.width(this.status.currentPercentRelative+"%");this.css.jq.currentTime.length&&this.css.jq.currentTime.text(b.jPlayer.convertTime(this.status.currentTime));this.css.jq.duration.length&&this.css.jq.duration.text(b.jPlayer.convertTime(this.status.duration))},
_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg")},_resetGate:function(){this.html.audio.gate=false;this.html.video.gate=false;this.flash.gate=false},_resetActive:function(){this.html.active=false;this.flash.active=false},setMedia:function(a){var c=this,d=false,e=this.status.media.poster!==a.poster;this._resetMedia();this._resetGate();this._resetActive();b.each(this.formats,
function(e,f){var i=c.format[f].media==="video";b.each(c.solutions,function(b,e){if(c[e].support[f]&&c._validString(a[f])){var g=e==="html";if(i){if(g){c.html.video.gate=true;c._html_setVideo(a);c.html.active=true}else{c.flash.gate=true;c._flash_setVideo(a);c.flash.active=true}c.css.jq.videoPlay.length&&c.css.jq.videoPlay.show();c.status.video=true}else{if(g){c.html.audio.gate=true;c._html_setAudio(a);c.html.active=true}else{c.flash.gate=true;c._flash_setAudio(a);c.flash.active=true}c.css.jq.videoPlay.length&&
c.css.jq.videoPlay.hide();c.status.video=false}d=true;return false}});if(d)return false});if(d){if((!this.status.nativeVideoControls||!this.html.video.gate)&&this._validString(a.poster))e?this.htmlElement.poster.src=a.poster:this.internal.poster.jq.show();this.status.srcSet=true;this.status.media=b.extend({},a);this._updateButtons(false);this._updateInterface()}else this._error({type:b.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SUPPORT,
hint:b.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus();this._updateButtons(false);this._updateInterface();this._seeked();this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);this.html.active?this._html_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia();this.html.active?this._html_clearMedia():this.flash.active&&this._flash_clearMedia();this._resetGate();this._resetActive()},load:function(){this.status.srcSet?
this.html.active?this._html_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},play:function(a){a=typeof a==="number"?a:NaN;this.status.srcSet?this.html.active?this._html_play(a):this.flash.active&&this._flash_play(a):this._urlNotSetError("play")},videoPlay:function(){this.play()},pause:function(a){a=typeof a==="number"?a:NaN;this.status.srcSet?this.html.active?this._html_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},pauseOthers:function(){var a=
this;b.each(this.instances,function(b,d){a.element!==d&&d.data("jPlayer").status.srcSet&&d.jPlayer("pause")})},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);this.status.srcSet?this.html.active?this._html_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.options.muted=a;this.html.used&&this._html_mute(a);
this.flash.used&&this._flash_mute(a);if(!this.html.video.gate&&!this.html.audio.gate){this._updateMute(a);this._updateVolume(this.options.volume);this._trigger(b.jPlayer.event.volumechange)}},mute:function(a){a=a===f?true:!!a;this._muted(a)},unmute:function(a){a=a===f?true:!!a;this._muted(!a)},_updateMute:function(a){if(a===f)a=this.options.muted;if(this.css.jq.mute.length&&this.css.jq.unmute.length)if(this.status.noVolume){this.css.jq.mute.hide();this.css.jq.unmute.hide()}else if(a){this.css.jq.mute.hide();
this.css.jq.unmute.show()}else{this.css.jq.mute.show();this.css.jq.unmute.hide()}},volume:function(a){a=this._limitValue(a,0,1);this.options.volume=a;this.html.used&&this._html_volume(a);this.flash.used&&this._flash_volume(a);if(!this.html.video.gate&&!this.html.audio.gate){this._updateVolume(a);this._trigger(b.jPlayer.event.volumechange)}},volumeBar:function(a){if(this.css.jq.volumeBar.length){var b=this.css.jq.volumeBar.offset(),d=a.pageX-b.left,e=this.css.jq.volumeBar.width(),a=this.css.jq.volumeBar.height()-
a.pageY+b.top,b=this.css.jq.volumeBar.height();this.options.verticalVolume?this.volume(a/b):this.volume(d/e)}this.options.muted&&this._muted(false)},volumeBarValue:function(a){this.volumeBar(a)},_updateVolume:function(a){if(a===f)a=this.options.volume;a=this.options.muted?0:a;if(this.status.noVolume){this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide();this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide();this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()}else{this.css.jq.volumeBar.length&&
this.css.jq.volumeBar.show();if(this.css.jq.volumeBarValue.length){this.css.jq.volumeBarValue.show();this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](a*100+"%")}this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show()}},volumeMax:function(){this.volume(1);this.options.muted&&this._muted(false)},_cssSelectorAncestor:function(a){var c=this;this.options.cssSelectorAncestor=a;this._removeUiClass();this.ancestorJq=a?b(a):[];a&&this.ancestorJq.length!==1&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,
context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT});this._addUiClass();b.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)})},_cssSelector:function(a,c){var d=this;if(typeof c==="string")if(b.jPlayer.prototype.options.cssSelector[a]){this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer");this.options.cssSelector[a]=c;this.css.cs[a]=this.options.cssSelectorAncestor+
" "+c;this.css.jq[a]=c?b(this.css.cs[a]):[];this.css.jq[a].length&&this.css.jq[a].bind("click.jPlayer",function(c){d[a](c);b(this).blur();return false});c&&this.css.jq[a].length!==1&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[a],message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:b.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_METHOD,
hint:b.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:b.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:b.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:b.jPlayer.warningHint.CSS_SELECTOR_STRING})},seekBar:function(a){if(this.css.jq.seekBar){var b=this.css.jq.seekBar.offset(),a=a.pageX-b.left,b=this.css.jq.seekBar.width();this.playHead(100*a/b)}},playBar:function(a){this.seekBar(a)},repeat:function(){this._loop(true)},repeatOff:function(){this._loop(false)},_loop:function(a){if(this.options.loop!==
a){this.options.loop=a;this._updateButtons();this._trigger(b.jPlayer.event.repeat)}},currentTime:function(){},duration:function(){},gui:function(){},noSolution:function(){},option:function(a,c){var d=a;if(arguments.length===0)return b.extend(true,{},this.options);if(typeof a==="string"){var e=a.split(".");if(c===f){for(var d=b.extend(true,{},this.options),g=0;g0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);this.htmlElement.media.pause();if(!isNaN(a))try{this.htmlElement.media.currentTime=
a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},100);return}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this;this._html_load();try{if(typeof this.htmlElement.media.seekable==="object"&&this.htmlElement.media.seekable.length>0)this.htmlElement.media.currentTime=a*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100;else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration))this.htmlElement.media.currentTime=
a*this.htmlElement.media.duration/100;else throw"e";}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},100);return}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,height:this.status.height})}}},_html_volume:function(a){if(this.html.audio.available)this.htmlElement.audio.volume=
a;if(this.html.video.available)this.htmlElement.video.volume=a},_html_mute:function(a){if(this.html.audio.available)this.htmlElement.audio.muted=a;if(this.html.video.available)this.htmlElement.video.muted=a},_flash_setAudio:function(a){var c=this;try{b.each(this.formats,function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4a":case "fla":c._getMovie().fl_setAudio_m4a(a[d]);break;case "mp3":c._getMovie().fl_setAudio_mp3(a[d]);break;case "rtmpa":c._getMovie().fl_setAudio_rtmp(a[d])}c.status.src=
a[d];c.status.format[d]=true;c.status.formatType=d;return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_setVideo:function(a){var c=this;try{b.each(this.formats,function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4v":case "flv":c._getMovie().fl_setVideo_m4v(a[d]);break;case "rtmpv":c._getMovie().fl_setVideo_rtmp(a[d])}c.status.src=a[d];c.status.format[d]=true;c.status.formatType=d;return false}});if(this.options.preload===
"auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"});this._flash_pause(NaN)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=false},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=
false;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}if(a>0){this.status.waitForLoad=false;this._flash_checkWaitForPlay()}},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();
this.internal.flash.jq.css({width:this.status.width,height:this.status.height})}}},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_checkForFlash:function(a){var b=false,d;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a);b=true}catch(e){}else if(navigator.plugins&&navigator.mimeTypes.length>
0)(d=navigator.plugins["Shockwave Flash"])&&navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")>=a&&(b=true);return b},_validString:function(a){return a&&typeof a==="string"},_limitValue:function(a,b,d){return ad?d:a},_urlNotSetError:function(a){this._error({type:b.jPlayer.error.URL_NOT_SET,context:a,message:b.jPlayer.errorMsg.URL_NOT_SET,hint:b.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH";this._error({type:b.jPlayer.error[c],
context:this.internal.flash.swf,message:b.jPlayer.errorMsg[c]+a.message,hint:b.jPlayer.errorHint[c]});this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(a){this._trigger(b.jPlayer.event.error,a);this.options.errorAlerts&&this._alert("Error!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_warning:function(a){this._trigger(b.jPlayer.event.warning,f,a);this.options.warningAlerts&&this._alert("Warning!"+(a.message?"\n\n"+a.message:"")+(a.hint?
"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_alert:function(a){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a)},_emulateHtmlBridge:function(){var a=this;b.each(b.jPlayer.emulateMethods.split(/\s+/g),function(b,d){a.internal.domNode[d]=function(b){a[d](b)}});b.each(b.jPlayer.event,function(c,d){var e=true;b.each(b.jPlayer.reservedEvent.split(/\s+/g),function(a,b){if(b===c)return e=false});e&&a.element.bind(d+".jPlayer.jPlayerHtml",function(){a._emulateHtmlUpdate();
var b=document.createEvent("Event");b.initEvent(c,false,true);a.internal.domNode.dispatchEvent(b)})})},_emulateHtmlUpdate:function(){var a=this;b.each(b.jPlayer.emulateStatus.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.status[d]});b.each(b.jPlayer.emulateOptions.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.options[d]})},_destroyHtmlBridge:function(){var a=this;this.element.unbind(".jPlayerHtml");b.each((b.jPlayer.emulateMethods+" "+b.jPlayer.emulateStatus+" "+b.jPlayer.emulateOptions).split(/\s+/g),
function(b,d){delete a.internal.domNode[d]})}};b.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};b.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",
NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+b.jPlayer.prototype.version.script+" needs Jplayer.swf version "+b.jPlayer.prototype.version.needFlash+" but found "};b.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",
NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};b.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};b.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",
CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};b.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}})(jQuery);