/*! Projekktor v1.2.37 -jarisflash | http://www.projekktor.com | Copyright 2010, 2011, Sascha Kluger, Spinning Airwhale Media, http://www.spinningairwhale.com | GNU General Public License - http://www.projekktor.com/license/ */ jQuery(function($){var projekktors=[];document.createElement("video").canPlayType&&function(){return;var t;var e}();function Iterator(t){this.length=t.length,this.each=function(e){$.each(t,e)},this.size=function(){return t.length}}$.fn.prop||($.fn.prop=function(t,e){return $(this).attr(t,e)}),projekktor=$p=function(){var arg=arguments[0],instances=[],plugins=[];if(!arguments.length)return projekktors[0]||null;if("number"==typeof arg)return projekktors[arg];if("string"==typeof arg){if("*"==arg)return new Iterator(projekktors);for(var i=0;projekktors.length>i;i++){try{if(projekktors[i].getId()==arg.id){instances.push(projekktors[i]);continue}}catch(e){}try{for(var j=0;$(arg).length>j;j++)projekktors[i].env.playerDom.get(0)!=$(arg).get(j)||instances.push(projekktors[i])}catch(e){}try{if(projekktors[i].getParent()==arg){instances.push(projekktors[i]);continue}}catch(e){}try{if(projekktors[i].getId()==arg){instances.push(projekktors[i]);continue}}catch(e){}}if(instances.length>0)return 1==instances.length?instances[0]:new Iterator(instances)}if(0===instances.length){var cfg=arguments[1]||{},callback=arguments[2]||{},count=0,playerA;if("string"==typeof arg)return $.each($(arg),function(){playerA=new PPlayer($(this),cfg,callback),projekktors.push(playerA),count++}),count>1?new Iterator(projekktors):playerA;if(arg)return projekktors.push(new PPlayer(arg,cfg,callback)),new Iterator(projekktors)}return null;function PPlayer(srcNode,cfg,onReady){return this.config=new projekktorConfig("1.3.09"),this.env={muted:!1,playerDom:null,mediaContainer:null,agent:"standard",mouseIsOver:!1,loading:!1,className:"",onReady:onReady},this.media=[],this._plugins=[],this._pluginCache={},this._queue=[],this._cuePoints={},this.listeners=[],this.playerModel={},this._isReady=!1,this._maxElapsed=0,this._currentItem=null,this._playlistServer="",this._id="",this._reelUpdate=function(obj){var ref=this,itemIdx=null,data=obj||[{}],files=data.playlist||data;this.env.loading=!0,this.media=[];try{for(var props in data.config)if(data.config.hasOwnProperty(props)){if(typeof data.config[props].indexOf("objectfunction")>-1)continue;this.config[props]=eval(data.config[props])}null!=data.config&&($p.utils.log("Updated config var: "+props+" to "+this.config[props]),this._promote("configModified"),delete data.config)}catch(e){}$.each(files,function(){itemIdx=ref._addItem(ref._prepareMedia({file:this,config:this.config||{},errorCode:this.errorCode||0})),$.each(this.cuepoints||[],function(){this.item=itemIdx,ref.setCuePoint(this)})}),null===itemIdx&&this._addItem(this._prepareMedia({file:"",config:{},errorCode:97})),this.env.loading=!1,this._promote("scheduled",this.getItemCount()),this._syncPlugins(function(){ref.setActiveItem(0)})},this._addItem=function(t,e,i){var s=0;return 1===this.media.length&&"NA"==this.media[0].mediaModel&&(this._detachplayerModel(),this.media=[]),void 0===e||0>e||e>this.media.length-1?(this.media.push(t),s=this.media.length-1):(this.media.splice(e,i===!0?1:0,t),s=e),this.env.loading===!1&&this._promote("scheduleModified",this.getItemCount()),s},this._removeItem=function(t){var e=0;return 1===this.media.length?"NA"==this.media[0].mediaModel?0:(this.media[0]=this._prepareMedia({file:""}),0):(void 0===t||0>t||t>this.media.length-1?(this.media.pop(),e=this.media.length):(this.media.splice(t,1),e=t),this.env.loading===!1&&this._promote("scheduleModified",this.getItemCount()),e)},this._canPlay=function(t,e,i){var s=this,n=[],a=[],r=i||"http",o="object"==typeof e?e:[e],l=t?t.replace(/x-/,""):void 0,h=s._testMediaSupport();if($.each(o,function(t,e){$.each($.extend(h[r],h["*"]||[])||[],function(t,i){return null!=e&&t!=e?!0:(n=$.merge(n,this),!0)})}),0===n.length)return!1;switch(typeof l){case"undefined":return n.length>0;case"string":if("*"==l)return n;a.push(l);break;case"array":a=l}for(var u in a)if($p.mmap.hasOwnProperty(u)){if("string"!=typeof a[u])break;if($.inArray(a[u],n)>-1)return!0}return!1},this._prepareMedia=function(t){var e=this,i=[],s=[],n=[],a={},r={},o=[],l={},h=[],u=0;for(var c in $p.mmap)$p.mmap.hasOwnProperty(c)&&(platforms="object"==typeof $p.mmap[c].platform?$p.mmap[c].platform:[$p.mmap[c].platform],$.each(platforms,function(i,s){var n=0,o="http";for(var l in t.file)if(t.file.hasOwnProperty(l)){if("config"===l)continue;if(o=t.file[l].streamType||e.getConfig("streamType")||"http",e._canPlay($p.mmap[c].type,s,o)&&n++,0===n)continue;if($p.mmap[c].level=$.inArray(s,e.config._platforms),$p.mmap[c].level=0>$p.mmap[c].level?100:$p.mmap[c].level,h.push("."+$p.mmap[c].ext),a[$p.mmap[c].ext]||(a[$p.mmap[c].ext]=[]),a[$p.mmap[c].ext].push($p.mmap[c]),null===$p.mmap[c].streamType||"*"==$p.mmap[c].streamType||$.inArray(o||[],$p.mmap[c].streamType||"")>-1){r[$p.mmap[c].type]||(r[$p.mmap[c].type]=[]),n=-1;for(var u=0,d=r[$p.mmap[c].type].length;d>u;u++)if(r[$p.mmap[c].type][u].model==$p.mmap[c].model){n=u;break}-1===n&&r[$p.mmap[c].type].push($p.mmap[c])}}else;return!0}));h="^.*.("+h.join("|")+")$","string"==typeof t.file&&(t.file=[{src:t.file}],"string"==typeof t.type&&(t.file=[{src:t.file,type:t.type}])),($.isEmptyObject(t)||t.file===!1||null===t.file)&&(t.file=[{src:null}]);for(var d in t.file)if(t.file.hasOwnProperty(d)){if("config"==d)continue;if("string"==typeof t.file[d]&&(t.file[d]={src:t.file[d]}),null==t.file[d].src)continue;if(null!=t.file[d].type&&""!==t.file[d].type)try{var p=t.file[d].type.split(" ").join("").split(/[\;]codecs=.([a-zA-Z0-9\,]*)[\'|\"]/i);null!=p[1]&&(t.file[d].codec=p[1]),t.file[d].type=p[0].replace(/x-/,""),t.file[d].originalType=p[0]}catch(m){}else t.file[d].type=this._getTypeFromFileExtension(t.file[d].src);r[t.file[d].type]&&r[t.file[d].type].length>0&&(r[t.file[d].type].sort(function(t,e){return t.level-e.level}),o.push(r[t.file[d].type][0]))}0===o.length?o=r["none/none"]:(o.sort(function(t,e){return t.level-e.level}),u=o[0].level,o=$.grep(o,function(t){return t.level==u})),i=[],$.each(o||[],function(){i.push(this.type)});var f=o&&o.length>0?o[0]:{type:"none/none",model:"NA",errorCode:11};i=$p.utils.unique(i);for(d in t.file)if(t.file.hasOwnProperty(d)){if(null==t.file[d].type)continue;if(0>$.inArray(t.file[d].type.replace(/x-/,""),i)&&"none/none"!=f.type)continue;($.isEmptyObject(t.config)||null==t.config.streamType||-1==t.config.streamType.indexOf("rtmp"))&&(t.file[d].src=$p.utils.toAbsoluteURL(t.file[d].src)),null==t.file[d].quality&&(t.file[d].quality="default"),n.push(t.file[d].quality),s.push(t.file[d])}0===s.length&&s.push({src:null,quality:"default"});var g=[];return $.each(this.getConfig("playbackQualities"),function(){g.push(this.key||"default")}),l={ID:t.config.id||$p.utils.randomId(8),cat:t.config.cat||"clip",file:s,platform:f.platform,platforms:platforms,qualities:$p.utils.intersect($p.utils.unique(g),$p.utils.unique(n)),mediaModel:f.model||"NA",errorCode:f.errorCode||t.errorCode||7,config:t.config||{}}},this._modelUpdateListener=function(t,e){var i=this,s=this.playerModel;if(this.playerModel.init)switch("time"!=t&&"progress"!=t&&$p.utils.log("Update: '"+t,this.playerModel.getSrc(),this.playerModel.getModelName(),e),t){case"state":this._promote("state",e);var n=$.map(this.getDC().attr("class").split(" "),function(t){return-1===t.indexOf(i.getConfig("ns")+"state")?t:""});switch(n.push(this.getConfig("ns")+"state"+e.toLowerCase()),this.getDC().attr("class",n.join(" ")),e){case"AWAKENING":this._syncPlugins(function(){s.getState("AWAKENING")&&s.displayItem(!0)});break;case"ERROR":this._addGUIListeners();break;case"PAUSED":this.getConfig("disablePause")===!0&&this.playerModel.applyCommand("play",0);break;case"COMPLETED":if(this._currentItem+1>=this.media.length&&!this.getConfig("loop")&&(this._promote("done",{}),this.getConfig("leaveFullscreen")))return this.reset(),void 0;this.setActiveItem("next")}break;case"modelReady":this._maxElapsed=0,this._promote("item",i._currentItem);break;case"displayReady":this._promote("displayReady",!0),this._syncPlugins(function(){i._promote("ready"),i._addGUIListeners(),s.getState("IDLE")||s.start()});break;case"availableQualitiesChange":this.media[this._currentItem].qualities=e,this._promote("availableQualitiesChange",e);break;case"qualityChange":this.setConfig({playbackQuality:e}),this._promote("qualityChange",e);break;case"volume":this.setConfig({volume:e}),this._promote("volume",e),0>=e?(this.env.muted=!0,this._promote("mute",e)):this.env.muted===!0&&(this.env.muted=!1,this._promote("unmute",e));break;case"playlist":this.setFile(e.file,e.type);break;case"config":this.setConfig(e);break;case"time":if(e>this._maxElapsed){var a=Math.round(100*e/this.getDuration()),r=!1;25>a&&(a=25),a>25&&50>a&&(r="firstquartile",a=50),a>50&&75>a&&(r="midpoint",a=75),a>75&&100>a&&(r="thirdquartile",a=100),r!==!1&&this._promote(r,e),this._maxElapsed=this.getDuration()*a/100}this._promote(t,e);break;case"fullscreen":e===!0?(this.getDC().addClass("fullscreen"),this._enterFullViewport()):(this.getDC().removeClass("fullscreen"),this._exitFullViewport()),this._promote(t,e);break;case"error":this._promote(t,e),this.getConfig("skipTestcard")&&this.getItemCount()>1?this.setActiveItem("next"):(this.playerModel.applyCommand("error",e),this._addGUIListeners());break;case"streamTypeChange":"dvr"==e&&this.getDC().addClass(this.getNS()+"dvr"),this._promote(t,e);break;default:this._promote(t,e)}},this._syncPlugins=function(t){var e=this;this.env.loading=!0,function(){try{if(e._plugins.length>0)for(var i=0;e._plugins.length>i;i++)if(!e._plugins[i].isReady())return setTimeout(arguments.callee,50),void 0;e.env.loading=!1,e._promote("pluginsReady",{});try{t()}catch(s){}}catch(s){}}()},this._MD=function(t){projekktor("#"+t.currentTarget.id.replace(/_media$/,""))._playerFocusListener(t)},this._addGUIListeners=function(){var t=this;this._removeGUIListeners(),this.getDC().get(0).addEventListener?this.getDC().get(0).addEventListener("mousedown",this._MD,!0):this.getDC().mousedown(function(e){t._playerFocusListener(e)}),this.getDC().mousemove(function(e){t._playerFocusListener(e)}).mouseenter(function(e){t._playerFocusListener(e)}).mouseleave(function(e){t._playerFocusListener(e)}).focus(function(e){t._playerFocusListener(e)}).blur(function(e){t._playerFocusListener(e)}),$(window).bind("resize.projekktor"+this.getId(),function(){t.setSize()}).bind("touchstart",function(){t._windowTouchListener(event)}),this.config.enableKeyboard===!0&&($(document).unbind("keydown.pp"+this._id),$(document).bind("keydown.pp"+this._id,function(e){t._keyListener(e)}))},this._removeGUIListeners=function(){$("#"+this.getId()).unbind(),this.getDC().unbind(),this.getDC().get(0).removeEventListener?this.getDC().get(0).removeEventListener("mousedown",this._MD,!0):this.getDC().get(0).detachEvent("onmousedown",this._MD),$(window).unbind("resize.projekktor"+this.getId())},this._registerPlugins=function(){var plugins=$.merge($.merge([],this.config._plugins),this.config._addplugins),pluginName="",pluginObj=null;if(!(this._plugins.length>0||0===plugins.length))for(var i=0;plugins.length>i;i++){pluginName="projekktor"+plugins[i].charAt(0).toUpperCase()+plugins[i].slice(1);try{typeof eval(pluginName)}catch(e){alert("Projekktor Error: Plugin '"+plugins[i]+"' malicious or not available.");continue}pluginObj=$.extend(!0,{},new projekktorPluginInterface,eval(pluginName).prototype),pluginObj.name=plugins[i].toLowerCase(),pluginObj.pp=this,pluginObj.playerDom=this.env.playerDom,pluginObj._init(this.config["plugin_"+plugins[i].toLowerCase()]||{}),null==this.config["plugin_"+pluginObj.name]&&(this.config["plugin_"+pluginObj.name]={}),this.config["plugin_"+pluginObj.name]=$.extend(!0,{},pluginObj.config||{});for(var propName in pluginObj)propName.indexOf("Handler")>1&&(null==this._pluginCache[propName]&&(this._pluginCache[propName]=[]),this._pluginCache[propName].push(pluginObj));this._plugins.push(pluginObj)}},this.removePlugins=function(t){if(0!=this._plugins.length){var e=t||$.merge($.merge([],this.config._plugins),this.config._addplugins),i=this._plugins.length;for(var s=0;e.length>s;s++)for(var n=0;i>n;n++)if(void 0!=this._plugins[n]&&this._plugins[n].name==e[s].toLowerCase()){this._plugins[n].deconstruct(),this._plugins.splice(n,1);for(var a in this._pluginCache)for(var r=0;this._pluginCache[a].length>r;r++)this._pluginCache[a][r].name==e[s].toLowerCase()&&this._pluginCache[a].splice(r,1)}}},this.getPlugins=function(){var t=[];return $.each(this._plugins,function(){t.push({name:this.name,ver:this.version||"unknown"})}),t},this._promote=function(t,e){var i=this;this._enqueue(function(){try{i.__promote(t,e)}catch(s){}})},this.__promote=function(t,e){var i=t,s={};if("object"==typeof i){if(!i._plugin)return;i="plugin_"+i._plugin+$p.utils.capitalise(i._event.toUpperCase())}if("time"!=i&&"progress"!=i&&"mousemove"!=i&&$p.utils.log("Event: ["+i+"]",e,this.listeners),this._pluginCache[i+"Handler"]&&this._pluginCache[i+"Handler"].length>0)for(var n=0;this._pluginCache[i+"Handler"].length>n;n++)if(this.getConfig("debug"))try{this._pluginCache[i+"Handler"][n][i+"Handler"](e,this)}catch(a){$p.utils.log(a)}else this._pluginCache[i+"Handler"][n][i+"Handler"](e,this);if(this._pluginCache.eventHandler&&this._pluginCache.eventHandler.length>0)for(var n=0;this._pluginCache.eventHandler.length>n;n++)if(this.getConfig("debug"))try{this._pluginCache.eventHandler[n].eventHandler(i,e,this)}catch(a){$p.utils.log(a)}else this._pluginCache.eventHandler[n].eventHandler(i,e,this);if(this.listeners.length>0)for(var n=0;this.listeners.length>n;n++)if(this.listeners[n].event==i||"*"==this.listeners[n].event)if(this.getConfig("debug"))try{this.listeners[n].callback(e,this)}catch(a){$p.utils.log(a)}else this.listeners[n].callback(e,this)},this._detachplayerModel=function(){this._removeGUIListeners();try{this.playerModel.destroy(),this._promote("detach",{})}catch(t){}},this._windowTouchListener=function(t){t.touches&&t.touches.length>0&&(($(document.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY)).attr("id")||"").indexOf(this.getDC().attr("id"))>-1?(0==this.env.mouseIsOver&&this._promote("mouseenter",{}),this.env.mouseIsOver=!0,this._promote("mousemove",{}),t.stopPropagation()):this.env.mouseIsOver&&(this._promote("mouseleave",{}),this.env.mouseIsOver=!1))},this._playerFocusListener=function(t){var e=t.type.toLowerCase();switch(e){case"mousedown":if(0==this.env.mouseIsOver)break;if("|TEXTAREA|INPUT".indexOf("|"+t.target.tagName.toUpperCase())>-1)return;if(3==t.which){if($(t.target).hasClass("context"))break;$(document).bind("contextmenu",function(t){return $(document).unbind("contextmenu"),!1})}break;case"mousemove":if(this.env.mouseX!=t.clientX&&this.env.mouseY!=t.clientY&&(this.env.mouseIsOver=!0),this.env.clientX==t.clientX&&this.env.clientY==t.clientY)return;this.env.clientX=t.clientX,this.env.clientY=t.clientY;break;case"focus":case"mouseenter":this.env.mouseIsOver=!0;break;case"blur":case"mouseleave":this.env.mouseIsOver=!1}this._promote(e,t)},this._keyListener=function(t){if(this.env.mouseIsOver&&!("|TEXTAREA|INPUT".indexOf("|"+t.target.tagName.toUpperCase())>-1)){var e=this,i=this.getConfig("keys").length>0?this.getConfig("keys"):[{27:function(t){t.getInFullscreen()?t.setFullscreen(!1):t.setStop()},32:function(t,e){t.setPlayPause(),e.preventDefault()},70:function(t){t.setFullscreen()},39:function(t,e){t.setPlayhead("+5"),e.preventDefault()},37:function(t,e){t.setPlayhead("-5"),e.preventDefault()},38:function(t,e){t.setVolume("+0.05"),e.preventDefault()},40:function(t,e){t.setVolume("-0.05"),e.preventDefault()},68:function(t){t.setDebug()},67:function(t){$p.utils.log("Config Dump",t.config)},80:function(t){$p.utils.log("Schedule Dump",t.media)},84:function(t){$p.utils.log("Cuepoints Dump",t.getCuePoints())}}];this._promote("key",t),$.each(i||[],function(){try{this[t.keyCode](e,t)}catch(i){}try{this["*"](e)}catch(i){}})}},this._enterFullViewport=function(t){var e=this.getIframeParent()||$(window),i=this.getIframe()||this.getDC(),s=$(e[0].document.body).css("overflow");t&&(e=$(window),i=this.getDC()),i.data("fsdata",{scrollTop:e.scrollTop()||0,scrollLeft:e.scrollLeft()||0,targetStyle:i.attr("style")||"",targetWidth:i.width(),targetHeight:i.height(),bodyOverflow:"visible"==s?"auto":s,bodyOverflowX:$(e[0].document.body).css("overflow-x"),bodyOverflowY:$(e[0].document.body).css("overflow-y"),iframeWidth:i.attr("width")||0,iframeHeight:i.attr("height")||0}).css({position:"absolute",display:"block",top:0,left:0,width:"100%",height:"100%",zIndex:99999,margin:0,padding:0}),e.scrollTop(0).scrollLeft(0),$(e[0].document.body).css({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"})},this._exitFullViewport=function(t){var e=this.getIframeParent()||$(window),i=this.getIframe()||this.getDC(),s=i.data("fsdata")||null;t&&(e=$(window),i=this.getDC()),null!=s&&(e.scrollTop(s.scrollTop).scrollLeft(s.scrollLeft),$(e[0].document.body).css("overflow",s.bodyOverflow),$(e[0].document.body).css("overflow-x",s.bodyOverflowX),$(e[0].document.body).css("overflow-y",s.bodyOverflowY),s.iframeWidth>0&&!t?i.attr("width",s.iframeWidth+"px").attr("height",s.iframeHeight+"px"):i.width(s.targetWidth).height(s.targetHeight),i.attr("style",null==s.targetStyle?"":s.targetStyle).data("fsdata",null))},this.pluginAPI=function(){var t=Array.prototype.slice.call(arguments)||null,e=t.shift(),i=t.shift();if(null!=e&&null!=i)for(var s=0;this._plugins.length>s;s++)if(this._plugins[s].name==e)return this._plugins[s][i](t[0]),void 0},this.getPlayerVer=function(){return this.config._version},this.getIsLastItem=function(){return this._currentItem==this.media.length-1&&this.config._loop!==!0},this.getIsFirstItem=function(){return 0==this._currentItem&&this.config._loop!==!0},this.getItemConfig=function(t,e){return this.getConfig(t,e)},this.getConfig=function(t,e){var i=e||this._currentItem,s=null!=this.config["_"+t]?this.config["_"+t]:this.config[t];if(null==t)return this.media[i].config;if(null==this.config["_"+t])try{void 0!==this.media[i].config[t]&&(s=this.media[i].config[t])}catch(n){}if(t.indexOf("plugin_")>-1)try{this.media[i].config[t]&&(s=$.extend(!0,{},this.config[t],this.media[i].config[t]))}catch(n){}if(null==s)return null;if("object"==typeof s&&null===s.length?s=$.extend(!0,{},s||{}):"object"==typeof s&&(s=$.extend(!0,[],s||[])),"string"==typeof s)switch(s){case"true":s=!0;break;case"false":s=!1;break;case"NaN":case"undefined":case"null":s=null}return s},this.getDC=function(){return this.env.playerDom},this.getState=function(t){var e="IDLE";try{e=this.playerModel.getState()}catch(i){}return null!=t?e==t.toUpperCase():e},this.getLoadProgress=function(){try{return this.playerModel.getLoadProgress()}catch(t){return 0}},this.getKbPerSec=function(){try{return this.playerModel.getKbPerSec()}catch(t){return 0}},this.getItemCount=function(){return 1==this.media.length&&"na"==this.media[0].mediaModel?0:this.media.length},this.getItemId=function(t){return this.media[t||this._currentItem].ID||null},this.getItemIdx=function(){return this._currentItem},this.getPlaylist=function(){return this.getItem("*")},this.getItem=function(){if(1==this.media.length&&"na"==this.media[0].mediaModel)return null;switch(arguments[0]||"current"){case"next":return $.extend(!0,{},this.media[this._currentItem+1]||{});case"prev":return $.extend(!0,{},this.media[this._currentItem-1]||{});case"current":return $.extend(!0,{},this.media[this._currentItem]||{});case"*":return $.extend(!0,[],this.media||[]);default:return $.extend(!0,{},this.media[arguments[0]||this._currentItem]||{})}},this.getVolume=function(){return this.getConfig("fixedVolume")===!0?this.config.volume:this.getConfig("volume")},this.getTrackId=function(){return this.getConfig("trackId")?this.config.trackId:null!=this._playlistServer?"pl"+this._currentItem:null},this.getLoadPlaybackProgress=function(){try{return this.playerModel.getLoadPlaybackProgress()}catch(t){return 0}},this.getSource=function(){try{return this.playerModel.getSource()[0].src}catch(t){return!1}},this.getDuration=function(){try{return this.playerModel.getDuration()}catch(t){return 0}},this.getPosition=function(){try{return this.playerModel.getPosition()||0}catch(t){return 0}},this.getMaxPosition=function(){try{return this.playerModel.getMaxPosition()||0}catch(t){return 0}},this.getFrame=function(){try{return this.playerModel.getFrame()}catch(t){return 0}},this.getTimeLeft=function(){try{return this.playerModel.getDuration()-this.playerModel.getPosition()}catch(t){return this.media[this._currentItem].duration}},this.getInFullscreen=function(){return this.getNativeFullscreenSupport().isFullScreen()},this.getMediaContainer=function(){return null==this.env.mediaContainer&&(this.env.mediaContainer=$("#"+this.getMediaId())),0==this.env.mediaContainer.length&&(this.env.mediaContainer=this.env.playerDom.find("."+this.getNS()+"display").length>0?$(document.createElement("div")).attr({id:this.getId()+"_media"}).css({overflow:"hidden",height:"100%",width:"100%",top:0,left:0,padding:0,margin:0,display:"block"}).appendTo(this.env.playerDom.find("."+this.getNS()+"display")):$(document.createElement("div")).attr({id:this.getMediaId()}).css({width:"1px",height:"1px"}).appendTo($(document.body))),this.env.mediaContainer},this.getMediaId=function(){return this.getId()+"_media"},this.getMediaType=function(){try{return this._getTypeFromFileExtension(this.playerModel.getSrc())||"na/na"}catch(t){return"na/na"}},this.getUsesFlash=function(){return this.playerModel.modelId.indexOf("FLASH")>-1},this.getModel=function(){try{return this.media[this._currentItem].mediaModel.toUpperCase()}catch(t){return"NA"}},this.getIframeParent=this.getIframeWindow=function(){try{var t=!1;return this.config._iframe&&(t=parent.location.host||!1),t===!1?!1:$(parent.window)}catch(e){return!1}},this.getIframe=function(){try{var t=[];return this.config._iframe&&(t=window.$(frameElement)||[]),0==t.length?!1:t}catch(e){return!1}},this.getIframeAllowFullscreen=function(){var t=null;try{t=window.frameElement.attributes.allowFullscreen||window.frameElement.attributes.mozallowFullscreen||window.frameElement.attributes.webkitallowFullscreen||null}catch(e){t=!0}return null!=t?!0:!1},this.getPlaybackQuality=function(){var t="default";try{t=this.playerModel.getPlaybackQuality()}catch(e){}return"default"==t&&(t=this.getConfig("playbackQuality")),("default"==t||-1==$.inArray(t,this.getPlaybackQualities()))&&(t=this.getAppropriateQuality()),-1==$.inArray(t,this.getPlaybackQualities())&&(t="default"),t},this.getPlaybackQualities=function(){try{return $.extend(!0,[],this.media[this._currentItem].qualities||[])}catch(t){}return[]},this.getIsMobileClient=function(t){var e=navigator.userAgent.toLowerCase();var i=["android","windows ce","blackberry","palm","mobile"];for(var s=0;i.length>s;s++)if(e.indexOf(i[s])>-1)return t?i[s].toUpperCase()==t.toUpperCase():!0;return!1},this.getCanPlay=function(t,e,i){return this._canPlay(t,e,i)},this.getCanPlayNatively=function(t){return this._canPlay(t,"native")},this.getPlatform=function(){return this.media[this._currentItem].platform||"error"},this.getPlatforms=function(){var t=this,e=this._testMediaSupport(!0),i=this.getConfig("platforms"),s=[],n=[];try{for(var a in this.media[this._currentItem].file)if(this.media[this._currentItem].file.hasOwnProperty(a))for(var r in e)this._canPlay(this.media[this._currentItem].file[a].type.replace(/x-/,""),e[r].toLowerCase(),this.getConfig("streamType"))&&-1==$.inArray(e[r].toLowerCase(),n)&&n.push(e[r].toLowerCase())}catch(o){}return n.sort(function(t,e){return $.inArray(t,i)-$.inArray(e,i)}),n},this.getNativeFullscreenSupport=function(){var t=this,e={supportsFullScreen:"viewport",isFullScreen:function(){try{return t.getDC().hasClass("fullscreen")}catch(e){return!1}},requestFullScreen:function(){t.playerModel.applyCommand("fullscreen",!0)},cancelFullScreen:function(){t.playerModel.applyCommand("fullscreen",!1)},prefix:"",ref:this},i="webkit moz o ms khtml".split(" ");if(document.cancelFullScreen!==void 0)e.supportsFullScreen=!0;else for(var s=0,n=i.length;n>s;s++)if(e.prefix=i[s],document.createElement("video")[e.prefix+"EnterFullscreen"]!==void 0&&(e.supportsFullScreen="mediaonly"),document[e.prefix+"CancelFullScreen"]!==void 0&&(e.supportsFullScreen="dom","moz"==e.prefix&&document[e.prefix+"FullScreenEnabled"]===void 0&&(e.supportsFullScreen="viewport")),e.supportsFullScreen!==!1&&"viewport"!==e.supportsFullScreen)break;return"viewport"==e.supportsFullScreen||"dom"==e.supportsFullScreen&&this.getConfig("forceFullViewport")?e:"mediaonly"==e.supportsFullScreen?(e.requestFullScreen=function(e){t.playerModel.getMediaElement().get(0)[this.prefix+"EnterFullscreen"]()},e.dest={},e.cancelFullScreen=function(){},e):(e.isFullScreen=function(e){var i=t.getIframe()?parent.window.document:document;switch(this.prefix){case"":return i.fullScreen;case"webkit":return i.webkitIsFullScreen;case"moz":return i[this.prefix+"FullScreen"]||t.getDC().hasClass("fullscreen")&&e!==!0;default:return i[this.prefix+"FullScreen"]}},e.requestFullScreen=function(){if(!this.isFullScreen()){var e=t.getIframeParent()||$(window),i=t.getIframe()?t.getIframe().get(0):null||t.getDC().get(0),s=this,n=t.getIframe()?parent.window.document:document,e=t.getIframeParent()||$(window);e.data("fsdata",{scrollTop:e.scrollTop(),scrollLeft:e.scrollLeft()}),$(n).unbind(this.prefix+"fullscreenchange.projekktor"),""===this.prefix?i.requestFullScreen():i[this.prefix+"RequestFullScreen"](),s.ref.playerModel.applyCommand("fullscreen",!0),$(n).bind(this.prefix+"fullscreenchange.projekktor",function(t){if(s.isFullScreen(!0))s.ref.playerModel.applyCommand("fullscreen",!0);else{s.ref.playerModel.applyCommand("fullscreen",!1);var e=s.ref.getIframeParent()||$(window),i=e.data("fsdata");null!=i&&(e.scrollTop(i.scrollTop),e.scrollLeft(i.scrollLeft))}})}},e.cancelFullScreen=function(){var e=t.getIframe()?parent.window.document:document,i=t.getIframeParent()||$(window),s=i.data("fsdata");$(t.getIframe()?parent.window.document:document).unbind(this.prefix+"fullscreenchange.projekktor"),e.exitFullScreen?e.exitFullScreen():""==this.prefix?e.cancelFullScreen():e[this.prefix+"CancelFullScreen"](),null!=s&&(i.scrollTop(s.scrollTop),i.scrollLeft(s.scrollLeft)),t.playerModel.applyCommand("fullscreen",!1)},e)},this.getId=function(){return this._id},this.getHasGUI=function(){try{return this.playerModel.getHasGUI()}catch(t){return!1}},this.getCssPrefix=this.getNS=function(){return this.config._cssClassPrefix||this.config._ns||"pp"},this.getPlayerDimensions=function(){return{width:this.getDC().width(),height:this.getDC().height()}},this.getMediaDimensions=function(){return this.playerModel.getMediaDimensions()||{width:0,height:0}},this.getAppropriateQuality=function(t){var e=t||this.getPlaybackQualities()||[];if(0==e.length)return[];var i=this.env.playerDom.width(),s=this.env.playerDom.height(),n=$p.utils.roundNumber(i/s,2),a={};return $.each(this.getConfig("playbackQualities")||[],function(){if(0>$.inArray(this.key,e))return!0;if((this.minHeight||0)>s&&s>=a.minHeight)return!0;if((a.minHeight||0)>this.minHeight)return!0;if("number"==typeof this.minWidth){if(0===this.minWidth&&this.minHeight>s)return!0;if(this.minWidth>i)return!0;a=this}else if("object"==typeof this.minWidth){var t=this;$.each(this.minWidth,function(){return(this.ratio||100)>n?!0:this.minWidth>i?!0:(a=t,!0)})}return!0}),$.inArray("auto",this.getPlaybackQualities())>-1?"auto":a.key||"default"},this.getFromUrl=function(t,e,i,s,n){var a=null,r=this,o=!this.getIsMobileClient();if(e==r&&"_reelUpdate"==i&&this._promote("scheduleLoading",1+this.getItemCount()),"_"!=i.substr(0,1)?window[i]=function(t){try{delete window[i]}catch(s){}e[i](t)}:n.indexOf("jsonp")>-1&&(this["_jsonp"+i]=function(t){e[i](t)}),n){if(void 0==$.parseJSON&&n.indexOf("json")>-1)return this._raiseError("Projekktor requires at least jQuery 1.4.2 in order to handle JSON playlists."),this;n=n.indexOf("/")>-1?n.split("/")[1]:n}var l={url:t,complete:function(t,r){if(void 0==n)try{t.getResponseHeader("Content-Type").indexOf("xml")>-1&&(n="xml"),t.getResponseHeader("Content-Type").indexOf("json")>-1&&(n="json"),t.getResponseHeader("Content-Type").indexOf("html")>-1&&(n="html")}catch(o){}a=$p.utils.cleanResponse(t.responseText,n);try{a=s(a,t.responseText,e)}catch(o){}if("error"!=r&&"jsonp"!=n)try{e[i](a)}catch(o){}},error:function(t){e[i]&&"jsonp"!=n&&e[i](!1)},cache:!0,async:o,dataType:n,jsonpCallback:"_"!=i.substr(0,1)?!1:"projekktor('"+this.getId()+"')._jsonp"+i,jsonp:"_"!=i.substr(0,1)?!1:"callback"};return l.xhrFields={withCredentials:!0},l.beforeSend=function(t){t.withCredentials=!0},$.support.cors=!0,$.ajax(l),this},this.setActiveItem=function(t){var e=0,i=this._currentItem,s=this,n=!1;if("string"==typeof t)switch(t){case"same":e=this._currentItem;break;case"previous":e=this._currentItem-1;break;case"next":e=this._currentItem+1}else e="number"==typeof t?parseInt(t):0;if(e!=this._currentItem&&1==this.getConfig("disallowSkip")&&!this.getState("COMPLETED")&&!this.getState("IDLE"))return this;this._detachplayerModel(),this.env.loading=!1,0!==e||null!=i&&i!=e||!(this.config._autoplay===!0||"DESTROYING|AWAKENING".indexOf(this.getState())>-1)?this.getItemCount()>1&&e!=i&&null!=i&&this.config._continuous===!0&&this.getItemCount()>e&&(n=!0):n=!0,(e>=this.getItemCount()||0>e)&&(n=this.config._loop,e=0),this._currentItem=e;var a=this.getDC().hasClass("fullscreen");this.getDC().attr("class",this.env.className),a&&this.getDC().addClass("fullscreen");var r=this.media[this._currentItem].mediaModel.toUpperCase();return $p.models[r]?(null!=this.getConfig("className",null)&&this.getDC().addClass(this.getNS()+this.getConfig("className")),this.getDC().addClass(this.getNS()+(this.getConfig("streamType")||"http")),$p.utils.cssTransitions()||this.getDC().addClass("notransitions"),this.getIsMobileClient()&&this.getDC().addClass("mobile")):(r="NA",this.media[this._currentItem].mediaModel=r,this.media[this._currentItem].errorCode=8),this.playerModel=new playerModel,$.extend(this.playerModel,$p.models[r].prototype),this._promote("syncing","display"),this._enqueue(function(){try{s._applyCuePoints()}catch(t){}}),this.playerModel._init({media:$.extend(!0,{},this.media[this._currentItem]),model:r,pp:this,environment:$.extend(!0,{},this.env),autoplay:n,quality:this.getPlaybackQuality(),fullscreen:this.getInFullscreen()}),this},this.setPlay=function(){var t=this;return this.getConfig("thereCanBeOnlyOne")&&projekktor("*").each(function(){this.getId()!==t.getId()&&this.setStop()}),this._enqueue("play",!1),this},this.setPause=function(){return this._enqueue("pause",!1),this},this.setStop=function(t){var e=this;return this.getState("IDLE")?this:(t?this._enqueue(function(){e._currentItem=0,e.setActiveItem(0)}):this._enqueue("stop",!1),this)},this.setPlayPause=function(){return this.getState("PLAYING")?this.setPause():this.setPlay(),this},this.setVolume=function(t,e){var i=this.getVolume();if(1==this.getConfig("fixedVolume"))return this;switch(typeof t){case"string":var s=t.substr(0,1);switch(t=parseFloat(t.substr(1)),s){case"+":t=this.getVolume()+t;break;case"-":t=this.getVolume()-t;break;default:t=this.getVolume()}case"number":t=parseFloat(t),t=t>1?1:t,t=0>t?0:t;break;default:return this}if(t>i&&e){if(t-i>.03){for(var n=i;t>=n;n+=.03)this._enqueue("volume",n,e);return this._enqueue("volume",t,e),this}}else if(i>t&&e&&i-t>.03){for(var n=i;n>=t;n-=.03)this._enqueue("volume",n,e);return this._enqueue("volume",t,e),this}return this._enqueue("volume",t),this},this.setPlayhead=this.setSeek=function(t){if(1==this.getConfig("disallowSkip"))return this;if("string"==typeof t){var e=t.substr(0,1);t=parseFloat(t.substr(1)),t="+"==e?this.getPosition()+t:"-"==e?this.getPosition()-t:this.getPosition()}return"number"==typeof t&&this._enqueue("seek",Math.round(100*t)/100),this},this.setFrame=function(t){if(null==this.getConfig("fps"))return this;if(1==this.getConfig("disallowSkip"))return this;if("string"==typeof t){var e=t.substr(0,1);t=parseFloat(t.substr(1)),t="+"==e?this.getFrame()+t:"-"==e?this.getFrame()-t:this.getFrame()}return"number"==typeof t&&this._enqueue("frame",t),this },this.setPlayerPoster=function(t){var e=this;return this._enqueue(function(){e.setConfig({poster:t},0)}),this._enqueue(function(){e.playerModel.setPosterLive()}),this},this.setConfig=function(){var t=this,e=arguments;return this._enqueue(function(){t._setConfig(e[0]||null,e[1]||null)}),this},this._setConfig=function(){if(!arguments.length)return result;var confObj=arguments[0],dest="*",value=!1;if("object"!=typeof confObj)return this;dest="string"==arguments[1]||"number"==arguments[1]?arguments[1]:this._currentItem;for(var i in confObj)if(null==this.config["_"+i]){try{value=eval(confObj[i])}catch(e){value=confObj[i]}if("*"!=dest){if(void 0==this.media[dest])return this;null==this.media[dest].config&&(this.media[dest].config={}),this.media[dest].config[i]=value}else $.each(this.media,function(){null==this.config&&(this.config={}),this.config[i]=value})}return this},this.setFullscreen=function(t){var e=this.getNativeFullscreenSupport();return t=null==t?!e.isFullScreen():t,t===!0?e.requestFullScreen():e.cancelFullScreen(),this},this.setSize=function(t){var e=this.getIframe()||this.getDC(),i=e.data("fsdata")||null,s=t&&null!=t.width?t.width:null!=this.getConfig("width")?this.getConfig("width"):!1,n=t&&null!=t.height?t.height:null==this.getConfig("height")&&this.getConfig("ratio")?Math.round((s||this.getDC().width())/this.getConfig("ratio")):null!=this.getConfig("height")?this.getConfig("height"):!1;this.getInFullscreen()&&null!=i?(i.targetWidth=s,i.targetHeight=n,e.data("fsdata",i)):(s&&e.css({width:s+"px"}),n&&e.css({height:n+"px"}));try{this.playerModel.applyCommand("resize")}catch(a){}},this.setLoop=function(t){this.config._loop=t||!this.config._loop},this.setDebug=function(t){$p.utils.logging=t||!$p.utils.logging,$p.utils.logging&&$p.utils.log("DEBUG MODE for player #"+this.getId())},this.addListener=function(t,e){var i=this;return this._enqueue(function(){i._addListener(t,e)}),this},this._addListener=function(t,e){var i=t.indexOf(".")>-1?t.split("."):[t,"default"];return this.listeners.push({event:i[0],ns:i[1],callback:e}),this},this.removeListener=function(t,e){var i=this.listeners.length,s=t.indexOf(".")>-1?t.split("."):[t,"*"];for(var n=0;i>n;n++)void 0!=this.listeners[n]&&(this.listeners[n].event==s[0]||"*"===s[0])&&(this.listeners[n].ns!=s[1]&&"*"!==s[1]||this.listeners[n].callback!=e&&null!=e||this.listeners.splice(n,1));return this},this.setItem=function(){var t=arguments[0];var e=0;return this._clearqueue(),null==t?(e=this._removeItem(arguments[1]),e===this._currentItem&&this.setActiveItem("previous")):(e=this._addItem(this._prepareMedia({file:t,config:t.config||{}}),arguments[1],arguments[2]),e===this._currentItem&&this.setActiveItem(this._currentItem)),this},this.setFile=function(){var t=arguments[0]||"",e=arguments[1]||this._getTypeFromFileExtension(t),i=[];return this.env.loading===!0?this:(this._clearqueue(),this.env.loading=!0,this._detachplayerModel(),"object"==typeof t?($p.utils.log("Applying incoming JS Object",t),this._reelUpdate(t),this):(i[0]={},i[0].file={},i[0].file.src=t||"",i[0].file.type=e||this._getTypeFromFileExtension(splt[0]),i[0].file.type.indexOf("/xml")>-1||i[0].file.type.indexOf("/json")>-1?($p.utils.log("Loading external data from "+i[0].file.src+" supposed to be "+i[0].file.type),this._playlistServer=i[0].file.src,this.getFromUrl(i[0].file.src,this,"_reelUpdate",this.getConfig("reelParser"),i[0].file.type),this):($p.utils.log("Applying incoming single file:"+i[0].file.src,i),this._reelUpdate(i),this)))},this.setPlaybackQuality=function(t){var e=t||this.getAppropriateQuality();return $.inArray(e,this.media[this._currentItem].qualities||[])>-1&&(this.playerModel.applyCommand("quality",e),this.setConfig({playbackQuality:e})),this},this.openUrl=function(t){return t=t||{url:"",target:"",pause:!1},""==t.url?this:(t.pause===!0&&this.setPause(),window.open(t.url,t.target).focus(),this)},this.selfDestruct=this.destroy=function(){var t=this;return this._enqueue(function(){t._destroy()}),this},this._destroy=function(){var t=this;return $(this).unbind(),this.removePlugins(),this.playerModel.destroy(),this._removeGUIListeners(),$.each(projekktors,function(e){try{if(this.getId()==t.getId()||this.getId()==t.getId()||this.getParent()==t.getId())return projekktors.splice(e,1),void 0}catch(i){}}),this.env.playerDom.replaceWith(this.env.srcNode),this._promote("destroyed"),this.removeListener("*"),this},this.reset=function(){var t=this;return this._clearqueue(),this._enqueue(function(){t._reset()}),this},this._reset=function(){var t={},e=this;this.setFullscreen(!1),$(this).unbind(),$(this.getIframe()?parent.window.document:document).unbind(".projekktor"),$(window).unbind(".projekktor"+this.getId()),this.playerModel.destroy(),this.playerModel={},this.removePlugins(),this._removeGUIListeners(),this.env.mediaContainer=null,this._currentItem=null;for(var i in this.config)t["_"==i.substr(0,1)?i.substr(1):i]=this.config[i];return t.autoplay=!1,"function"==typeof this.env.onReady&&this._enqueue(e.env.onReady(e)),this._init(this.env.playerDom,t),this},this.setCuePoint=function(t,e){var i=void 0!==t.item?t.item:this.getItemIdx(),s=$.extend(!0,{offset:0},e),n=this,a={id:t.id||$p.utils.randomId(8),group:t.group||$p.utils.randomId(8),item:i,on:($p.utils.toSeconds(t.on)||0)+s.offset,off:($p.utils.toSeconds(t.off)||$p.utils.toSeconds(t.on)||0)+s.offset,value:t.value||null,callback:t.callback||function(){},precision:null==t.precision?1:t.precision,title:null==t.title?"":t.title,_listeners:[],_unlocked:!1,_active:!1,_lastTime:0,isAvailable:function(){return this._unlocked},_stateListener:function(t,e){if("STOPPED|COMPLETED|DESTROYING".indexOf(t)>-1){if(this._active)try{this.callback(!1,this,e)}catch(i){}this._active=!1,this._lastTime=-1}},_timeListener:function(t,e){if(e.getItemIdx()===this.item||"*"==this.item){var i=0==this.precision?Math.round(t):$p.utils.roundNumber(t,this.precision),s=this;if(this._unlocked===!1){var n=e.getDuration()*e.getLoadProgress()/100;if(!(n>=this.on||i>=this.on))return;$.each(this._listeners.unlock||[],function(){this(s,e)}),this._unlocked=!0}if(this._lastTime!=i){var a=1>=i-this._lastTime&&i-this._lastTime>0;if((i>=this.on&&this.off>=i||i>=this.on&&this.on==this.off&&this.on+1>=i)&&this._active!==!0){this._active=!0,$p.utils.log("Cue Point: [ON "+this.on+"] at "+i,this);try{this.callback({id:this.id,enabled:!0,value:this.value,seeked:!a,player:e})}catch(r){}}else if((this.on>i||i>this.off)&&this.off!=this.on&&1==this._active){this._active=!1,$p.utils.log("Cue Point: [OFF] at "+this.off,this);try{this.callback({id:this.id,enabled:!1,value:this.value,seeked:!a,player:e})}catch(r){}}this.off==this.on&&this._active&&new Number(i-this.on).toPrecision(this.precision)>=1&&(this._active=!1),this._lastTime=i}}},addListener:function(t,e){null==this._listeners[t]&&(this._listeners[t]=[]),this._listeners[t].push(e||function(){})}};return null!=t.unlockCallback&&a.addListener("unlock",t.unlockCallback),null==this._cuePoints[i]&&(this._cuePoints[i]=[]),this._cuePoints[i].push(a),this.getState("IDLE")||this._promote("cuepointAdded"),this},this.setGotoCuePoint=function(t,e){var i=this.getCuePoints(e);return this.setPlayhead(i[t].on),this},this.getCuePoints=function(t){return this._cuePoints[t||this.getItemIdx()]||this._cuePoints||{}},this.getCuePointById=function(t,e){var i=!1,s=this.getCuePoints(e);for(var n=0;s.length>n;n++)if(s.id==t){i=this;break}return i},this.removeCuePoints=function(t,e){var i=this.getCuePoints(t||0)||{},s=[];for(var n=0;i.length>n;n++)i[n].group==e&&(this.removeListener("time",i[n].timeEventHandler),this.removeListener("state",i[n].stateEventHandler),s.push(n));for(var a=0;s.length>a;a++)i.splice(s[a]-a,1);return this},this.syncCuePoints=function(){var t=this;return this._enqueue(function(){try{t._applyCuePoints()}catch(e){}}),this},this._applyCuePoints=function(t){var e=this;(null!=this._cuePoints[this._currentItem]||null!=this._cuePoints["*"])&&$.each($.merge(this._cuePoints[this._currentItem]||[],this._cuePoints["*"]||[]),function(t,i){try{e.removeListener("time",i.timeEventHandler),e.removeListener("state",i.stateEventHandler)}catch(s){}i.timeEventHandler=function(t,e){try{i._timeListener(t,e)}catch(s){}},i.stateEventHandler=function(t,e){try{i._stateListener(t,e)}catch(s){}},e.addListener("time",i.timeEventHandler),e.addListener("state",i.stateEventHandler),e.addListener("item",function(){e.removeListener("time",i.timeEventHandler),e.removeListener("state",i.stateEventHandler)})})},this._enqueue=function(t,e,i){null!=t&&(this._queue.push({command:t,params:e,delay:i}),this._processQueue())},this._clearqueue=function(t,e){this._isReady===!0&&(this._queue=[])},this._processQueue=function(){var t=this,e=!1;this._processing!==!0&&this.env.loading!==!0&&(this._processing=!0,function(){try{e=t.playerModel.getIsReady()}catch(i){}if(t.env.loading!==!0&&e){try{var s=t._queue.shift();null!=s&&("string"==typeof s.command?s.delay>0?setTimeout(function(){t.playerModel.applyCommand(s.command,s.params)},s.delay):t.playerModel.applyCommand(s.command,s.params):s.command(t))}catch(i){$p.utils.log("ERROR:",i)}return 0==t._queue.length?(t._isReady===!1&&(t._isReady=!0),t._processing=!1,void 0):(arguments.callee(),void 0)}setTimeout(arguments.callee,100)}())},this._getTypeFromFileExtension=function(t){var e="",i=[],s={},i=[],n=null,a=!0;for(var r in $p.mmap)if($p.mmap.hasOwnProperty(r)){n=$p.mmap[r].platform,"object"!=typeof n&&(n=[n]),a=!0;for(var o=0;n.length>o;o++)null!=n[o]&&(this.getConfig("enable"+n[o].toUpperCase()+"Platform")===!1||-1===$.inArray(n[o],this.getConfig("platforms")))&&(a=!1);if(a===!1)continue;i.push("\\."+$p.mmap[r].ext),s[$p.mmap[r].ext]=$p.mmap[r]}i="^.*.("+i.join("|")+")";try{e=t.match(RegExp(i))[1],e=e?e.replace(".",""):"NaN"}catch(l){e="NaN"}return s[e].type},this._testMediaSupport=function(t){var e={},i=[],s="",n=this;if(t){if(null!=$p._platformTableCache)return $p._platformTableCache}else if(null!=$p._compTableCache)return $p._compTableCache;for(var a=0;$p.mmap.length>a;a++)$p.mmap.hasOwnProperty(a)&&(platforms="object"==typeof $p.mmap[a].platform?$p.mmap[a].platform:[$p.mmap[a].platform],$.each(platforms,function(t,r){return null==r?!0:(s=$p.mmap[a].streamType||["http"],$.each(s,function(t,s){if(null==e[s]&&(e[s]={}),null==e[s][r]&&(e[s][r]=[]),$.inArray($p.mmap[a].type,e[s][r])>-1)return!0;var o=""+($p.models[$p.mmap[a].model.toUpperCase()].prototype[r.toLowerCase()+"Version"]||"1");try{if($p.utils.versionCompare($p.platforms[r.toUpperCase()]($p.mmap[a].type),o))return 0!=n.getConfig("enable"+r.toUpperCase()+"Platform")&&$.inArray(r.toLowerCase(),n.getConfig("platforms"))>-1&&(e[s][r].push($p.mmap[a].type),-1==$.inArray(r.toUpperCase(),i)&&i.push(r.toUpperCase())),!0}catch(l){$p.utils.log("ERROR","platform "+r+" not defined")}return!0}),!0)}));return $p._compTableCache=e,$p._platformTableCache=i,t?$p._platformTableCache:$p._compTableCache},this._readMediaTag=function(t){var e={},i="",s=[],n=this;if(-1=="VIDEOAUDIO".indexOf(t[0].tagName.toUpperCase()))return!1;this.getConfig("ignoreAttributes")||(e={autoplay:void 0===t.attr("autoplay")&&void 0===t.prop("autoplay")||t.prop("autoplay")===!1?!1:!0,controls:void 0===t.attr("controls")&&void 0===t.prop("controls")||t.prop("controls")===!1?!1:!0,loop:void 0===t.attr("autoplay")&&void 0===t.prop("loop")||t.prop("loop")===!1?!1:!0,title:void 0!==t.attr("title")&&t.attr("title")!==!1?t.attr("title"):"",poster:void 0!==t.attr("poster")&&t.attr("poster")!==!1?t.attr("poster"):"",width:void 0!==t.attr("width")&&t.attr("width")!==!1?t.attr("width"):null,height:void 0!==t.attr("height")&&t.attr("height")!==!1?t.attr("height"):null}),i=$($("
").html($(t).clone())).html(),s=["autoplay","controls","loop"];for(var a=0;s.length>a;a++)-1!=i.indexOf(s[a])&&(e[s[a]]=!0);if(e.playlist=[],e.playlist[0]=[],e.playlist[0].config={tracks:[]},t.attr("src")&&e.playlist[0].push({src:t.attr("src"),type:t.attr("type")||this._getTypeFromFileExtension(t.attr("src"))}),!$("