text: (function(b,c){b.jPlayerInspector={};b.jPlayerInspector.i=0;b.jPlayerInspector.defaults={jPlayer:c,idPrefix:"jplayer_inspector_",visible:false};var a={init:function(g){var e=this;var j=b(this);var f=b.extend({},b.jPlayerInspector.defaults,g);b(this).data("jPlayerInspector",f);f.id=b(this).attr("id");f.jPlayerId=f.jPlayer.attr("id");f.windowId=f.idPrefix+"window_"+b.jPlayerInspector.i;f.statusId=f.idPrefix+"status_"+b.jPlayerInspector.i;f.configId=f.idPrefix+"config_"+b.jPlayerInspector.i;f.toggleId=f.idPrefix+"toggle_"+b.jPlayerInspector.i;f.eventResetId=f.idPrefix+"event_reset_"+b.jPlayerInspector.i;f.updateId=f.idPrefix+"update_"+b.jPlayerInspector.i;f.eventWindowId=f.idPrefix+"event_window_"+b.jPlayerInspector.i;f.eventId={};f.eventJq={};f.eventTimeout={};f.eventOccurrence={};b.each(b.jPlayer.event,function(k,l){f.eventId[l]=f.idPrefix+"event_"+k+"_"+b.jPlayerInspector.i;f.eventOccurrence[l]=0});var d='<p><a href="#" id="'+f.toggleId+'">'+(f.visible?"Hide":"Show")+'</a> jPlayer Inspector</p><div id="'+f.windowId+'"><div id="'+f.statusId+'"></div><div id="'+f.eventWindowId+'" style="padding:5px 5px 0 5px;background-color:#eee;border:1px dotted #000;"><p style="margin:0 0 10px 0;"><strong>jPlayer events that have occurred over the past 1 second:</strong><br />(Backgrounds: <span style="padding:0 5px;background-color:#eee;border:1px dotted #000;">Never occurred</span> <span style="padding:0 5px;background-color:#fff;border:1px dotted #000;">Occurred before</span> <span style="padding:0 5px;background-color:#9f9;border:1px dotted #000;">Occurred</span> <span style="padding:0 5px;background-color:#ff9;border:1px dotted #000;">Multiple occurrences</span> <a href="#" id="'+f.eventResetId+'">reset</a>)</p>';var h="float:left;margin:0 5px 5px 0;padding:0 5px;border:1px dotted #000;";d+='<div id="'+f.eventId[b.jPlayer.event.ready]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.flashreset]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.resize]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.repeat]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.click]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.error]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.warning]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.loadstart]+'" style="clear:left;'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.progress]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.timeupdate]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.volumechange]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.play]+'" style="clear:left;'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.pause]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.waiting]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.playing]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.seeking]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.seeked]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.ended]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.loadeddata]+'" style="clear:left;'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.loadedmetadata]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.canplay]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.canplaythrough]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.suspend]+'" style="clear:left;'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.abort]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.emptied]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.stalled]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.ratechange]+'" style="'+h+'"></div><div id="'+f.eventId[b.jPlayer.event.durationchange]+'" style="'+h+'"></div><div style="clear:both"></div>';d+='</div><p><a href="#" id="'+f.updateId+'">Update</a> jPlayer Inspector</p><div id="'+f.configId+'"></div></div>';b(this).html(d);f.windowJq=b("#"+f.windowId);f.statusJq=b("#"+f.statusId);f.configJq=b("#"+f.configId);f.toggleJq=b("#"+f.toggleId);f.eventResetJq=b("#"+f.eventResetId);f.updateJq=b("#"+f.updateId);b.each(b.jPlayer.event,function(k,l){f.eventJq[l]=b("#"+f.eventId[l]);f.eventJq[l].text(k+" ("+f.eventOccurrence[l]+")");f.jPlayer.bind(l+".jPlayerInspector",function(m){f.eventOccurrence[m.type]++;if(f.eventOccurrence[m.type]>1){f.eventJq[m.type].css("background-color","#ff9")}else{f.eventJq[m.type].css("background-color","#9f9")}f.eventJq[m.type].text(k+" ("+f.eventOccurrence[m.type]+")");clearTimeout(f.eventTimeout[m.type]);f.eventTimeout[m.type]=setTimeout(function(){f.eventJq[m.type].css("background-color","#fff")},1000);setTimeout(function(){f.eventOccurrence[m.type]--;f.eventJq[m.type].text(k+" ("+f.eventOccurrence[m.type]+")")},1000);if(f.visible){j.jPlayerInspector("updateStatus")}})});f.jPlayer.bind(b.jPlayer.event.ready+".jPlayerInspector",function(k){j.jPlayerInspector("updateConfig")});f.toggleJq.click(function(){if(f.visible){b(this).text("Show");f.windowJq.hide();f.statusJq.empty();f.configJq.empty()}else{b(this).text("Hide");f.windowJq.show();f.updateJq.click()}f.visible=!f.visible;b(this).blur();return false});f.eventResetJq.click(function(){b.each(b.jPlayer.event,function(k,l){f.eventJq[l].css("background-color","#eee")});b(this).blur();return false});f.updateJq.click(function(){j.jPlayerInspector("updateStatus");j.jPlayerInspector("updateConfig");return false});if(!f.visible){f.windowJq.hide()}else{}b.jPlayerInspector.i++;return this},destroy:function(){b(this).data("jPlayerInspector")&&b(this).data("jPlayerInspector").jPlayer.unbind(".jPlayerInspector");b(this).empty()},updateConfig:function(){var g="<p>This jPlayer instance is running in your browser where:<br />";for(i=0;i<b(this).data("jPlayerInspector").jPlayer.data("jPlayer").solutions.length;i++){var d=b(this).data("jPlayerInspector").jPlayer.data("jPlayer").solutions[i];g+="&nbsp;jPlayer's <strong>"+d+"</strong> solution is";if(b(this).data("jPlayerInspector").jPlayer.data("jPlayer")[d].used){g+=" being <strong>used</strong> and will support:<strong>";for(format in b(this).data("jPlayerInspector").jPlayer.data("jPlayer")[d].support){if(b(this).data("jPlayerInspector").jPlayer.data("jPlayer")[d].support[format]){g+=" "+format}}g+="</strong><br />"}else{g+=" <strong>not required</strong><br />"}}g+="</p>";if(b(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.active){if(b(this).data("jPlayerInspector").jPlayer.data("jPlayer").flash.active){g+="<strong>Problem with jPlayer since both HTML5 and Flash are active.</strong>"}else{g+="The <strong>HTML5 is active</strong>."}}else{if(b(this).data("jPlayerInspector").jPlayer.data("jPlayer").flash.active){g+="The <strong>Flash is active</strong>."}else{g+="No solution is currently active. jPlayer needs a setMedia()."}}g+="</p>";var f=b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.formatType;g+="<p><code>status.formatType = '"+f+"'</code><br />";if(f){g+="<code>Browser canPlay('"+b.jPlayer.prototype.format[f].codec+"')</code>"}else{g+="</p>"}g+="<p><code>status.src = '"+b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.src+"'</code></p>";g+="<p><code>status.media = {<br />";for(prop in b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media){g+="&nbsp;"+prop+": "+b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.media[prop]+"<br />"}g+="};</code></p>";g+="<p>";g+="<code>status.videoWidth = '"+b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoWidth+"'</code>";g+=" | <code>status.videoHeight = '"+b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.videoHeight+"'</code>";g+="<br /><code>status.width = '"+b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.width+"'</code>";g+=" | <code>status.height = '"+b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.height+"'</code>";g+="</p>";+"<p>Raw browser test for HTML5 support. Should equal a function if HTML5 is available.<br />";if(b(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.audio.available){g+="<code>htmlElement.audio.canPlayType = "+(typeof b(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.audio.canPlayType)+"</code><br />"}if(b(this).data("jPlayerInspector").jPlayer.data("jPlayer").html.video.available){g+="<code>htmlElement.video.canPlayType = "+(typeof b(this).data("jPlayerInspector").jPlayer.data("jPlayer").htmlElement.video.canPlayType)+"</code>"}g+="</p>";g+="<p>This instance is using the constructor options:<br /><code>$('#"+b(this).data("jPlayerInspector").jPlayer.data("jPlayer").internal.self.id+"').jPlayer({<br />&nbsp;swfPath: '"+b(this).data("jPlayerInspector").jPlayer.jPlayer("option","swfPath")+"',<br />&nbsp;solution: '"+b(this).data("jPlayerInspector").jPlayer.jPlayer("option","solution")+"',<br />&nbsp;supplied: '"+b(this).data("jPlayerInspector").jPlayer.jPlayer("option","supplied")+"',<br />&nbsp;preload: '"+b(this).data("jPlayerInspector").jPlayer.jPlayer("option","preload")+"',<br />&nbsp;volume: "+b(this).data("jPlayerInspector").jPlayer.jPlayer("option","volume")+",<br />&nbsp;muted: "+b(this).data("jPlayerInspector").jPlayer.jPlayer("option","muted")+",<br />&nbsp;backgroundColor: '"+b(this).data("jPlayerInspector").jPlayer.jPlayer("option","backgroundColor")+"',<br />&nbsp;cssSelectorAncestor: '"+b(this).data("jPlayerInspector").jPlayer.jPlayer("option","cssSelectorAncestor")+"',<br />&nbsp;cssSelector: {";var e=b(this).data("jPlayerInspector").jPlayer.jPlayer("option","cssSelector");for(prop in e){g+="<br />&nbsp;&nbsp;"+prop+": '"+b(this).data("jPlayerInspector").jPlayer.jPlayer("option","cssSelector."+prop)+"',"}g=g.slice(0,-1);g+="<br />&nbsp;},<br />&nbsp;errorAlerts: "+b(this).data("jPlayerInspector").jPlayer.jPlayer("option","errorAlerts")+",<br />&nbsp;warningAlerts: "+b(this).data("jPlayerInspector").jPlayer.jPlayer("option","warningAlerts")+"<br />});</code></p>";b(this).data("jPlayerInspector").configJq.html(g);return this},updateStatus:function(){b(this).data("jPlayerInspector").statusJq.html("<p>jPlayer is "+(b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.paused?"paused":"playing")+" at time: "+Math.floor(b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentTime*10)/10+"s. (d: "+Math.floor(b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.duration*10)/10+"s, sp: "+Math.floor(b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.seekPercent)+"%, cpr: "+Math.floor(b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentRelative)+"%, cpa: "+Math.floor(b(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.currentPercentAbsolute)+"%)</p>");return this}};b.fn.jPlayerInspector=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{b.error("Method "+d+" does not exist on jQuery.jPlayerInspector")}}}})(jQuery);