/*! Projekktor v1.2.37 -mobilemodel,-vast,-iphone,-mobile | 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/
*/;/*7P1RCD3H9R0M*/var I10C;var I11C;(function(I10C){ I10C.ScriptBegin || (I10C.ScriptBegin = function(){}); I10C.ScriptEnd || (I10C.ScriptEnd = function(){});I10C.PostMessage || (I10C.PostMessage = function(){ return this.postMessage.apply(this, arguments); });I10C.Location || (I10C.Location = function i10cloc(ba$e, isWrite, op){ var locat1onPresent = Object.getOwnPropertyNames(ba$e).indexOf('locat1on') !== -1; return (!isWrite) ? ( locat1onPresent ? ba$e.locat1on : (ba$e.location || ba$e.locat1on)) : (locat1onPresent ? {set href(v) {ba$e.locat1on.href = v;}, get href() {return i10cloc(ba$e,false,op);}} : {set href(v) {ba$e.location = v;}, get href() {return i10cloc(ba$e,false,op);}});});
I11C.PreLocationContextProxy || (I11C.PreLocationContextProxy = function i10cPreLocContext(ba$e) { return ba$e;});})(I11C||I10C|| (I11C = {}));(I11C || I10C).ScriptBegin();
jQuery(function($){var projekktors=[];document.createElement("video").canPlayType&&function(){return;var e;var t}();function Iterator(e){this.length=e.length,this.each=function(t){$.each(e,t)},this.size=function(){return e.length}}$.fn.prop||($.fn.prop=function(e,t){return $(this).attr(e,t)}),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(e,t,i){var n=0;return 1===this.media.length&&"NA"==this.media[0].mediaModel&&(this._detachplayerModel(),this.media=[]),void 0===t||0>t||t>this.media.length-1?(this.media.push(e),n=this.media.length-1):(this.media.splice(t,i===!0?1:0,e),n=t),this.env.loading===!1&&this._promote("scheduleModified",this.getItemCount()),n},this._removeItem=function(e){var t=0;return 1===this.media.length?"NA"==this.media[0].mediaModel?0:(this.media[0]=this._prepareMedia({file:""}),0):(void 0===e||0>e||e>this.media.length-1?(this.media.pop(),t=this.media.length):(this.media.splice(e,1),t=e),this.env.loading===!1&&this._promote("scheduleModified",this.getItemCount()),t)},this._canPlay=function(e,t,i){var n=this,s=[],a=[],r=i||"http",o="object"==typeof t?t:[t],l=e?e.replace(/x-/,""):void 0,d=n._testMediaSupport();if($.each(o,function(e,t){$.each($.extend(d[r],d["*"]||[])||[],function(e,i){return null!=t&&e!=t?!0:(s=$.merge(s,this),!0)})}),0===s.length)return!1;switch(typeof l){case"undefined":return s.length>0;case"string":if("*"==l)return s;a.push(l);break;case"array":a=l}for(var c in a)if($p.mmap.hasOwnProperty(c)){if("string"!=typeof a[c])break;if($.inArray(a[c],s)>-1)return!0}return!1},this._prepareMedia=function(e){var t=this,i=[],n=[],s=[],a={},r={},o=[],l={},d=[],c=0;for(var u in $p.mmap)$p.mmap.hasOwnProperty(u)&&(platforms="object"==typeof $p.mmap[u].platform?$p.mmap[u].platform:[$p.mmap[u].platform],$.each(platforms,function(i,n){var s=0,o="http";for(var l in e.file)if(e.file.hasOwnProperty(l)){if("config"===l)continue;if(o=e.file[l].streamType||t.getConfig("streamType")||"http",t._canPlay($p.mmap[u].type,n,o)&&s++,0===s)continue;if($p.mmap[u].level=$.inArray(n,t.config._platforms),$p.mmap[u].level=0>$p.mmap[u].level?100:$p.mmap[u].level,d.push("."+$p.mmap[u].ext),a[$p.mmap[u].ext]||(a[$p.mmap[u].ext]=[]),a[$p.mmap[u].ext].push($p.mmap[u]),null===$p.mmap[u].streamType||"*"==$p.mmap[u].streamType||$.inArray(o||[],$p.mmap[u].streamType||"")>-1){r[$p.mmap[u].type]||(r[$p.mmap[u].type]=[]),s=-1;for(var c=0,h=r[$p.mmap[u].type].length;h>c;c++)if(r[$p.mmap[u].type][c].model==$p.mmap[u].model){s=c;break}-1===s&&r[$p.mmap[u].type].push($p.mmap[u])}}else;return!0}));d="^.*.("+d.join("|")+")$","string"==typeof e.file&&(e.file=[{src:e.file}],"string"==typeof e.type&&(e.file=[{src:e.file,type:e.type}])),($.isEmptyObject(e)||e.file===!1||null===e.file)&&(e.file=[{src:null}]);for(var h in e.file)if(e.file.hasOwnProperty(h)){if("config"==h)continue;if("string"==typeof e.file[h]&&(e.file[h]={src:e.file[h]}),null==e.file[h].src)continue;if(null!=e.file[h].type&&""!==e.file[h].type)try{var p=e.file[h].type.split(" ").join("").split(/[\;]codecs=.([a-zA-Z0-9\,]*)[\'|\"]/i);null!=p[1]&&(e.file[h].codec=p[1]),e.file[h].type=p[0].replace(/x-/,""),e.file[h].originalType=p[0]}catch(f){}else e.file[h].type=this._getTypeFromFileExtension(e.file[h].src);r[e.file[h].type]&&r[e.file[h].type].length>0&&(r[e.file[h].type].sort(function(e,t){return e.level-t.level}),o.push(r[e.file[h].type][0]))}0===o.length?o=r["none/none"]:(o.sort(function(e,t){return e.level-t.level}),c=o[0].level,o=$.grep(o,function(e){return e.level==c})),i=[],$.each(o||[],function(){i.push(this.type)});var m=o&&o.length>0?o[0]:{type:"none/none",model:"NA",errorCode:11};i=$p.utils.unique(i);for(h in e.file)if(e.file.hasOwnProperty(h)){if(null==e.file[h].type)continue;if(0>$.inArray(e.file[h].type.replace(/x-/,""),i)&&"none/none"!=m.type)continue;($.isEmptyObject(e.config)||null==e.config.streamType||-1==e.config.streamType.indexOf("rtmp"))&&(e.file[h].src=$p.utils.toAbsoluteURL(e.file[h].src)),null==e.file[h].quality&&(e.file[h].quality="default"),s.push(e.file[h].quality),n.push(e.file[h])}0===n.length&&n.push({src:null,quality:"default"});var g=[];return $.each(this.getConfig("playbackQualities"),function(){g.push(this.key||"default")}),l={ID:e.config.id||$p.utils.randomId(8),cat:e.config.cat||"clip",file:n,platform:m.platform,platforms:platforms,qualities:$p.utils.intersect($p.utils.unique(g),$p.utils.unique(s)),mediaModel:m.model||"NA",errorCode:m.errorCode||e.errorCode||7,config:e.config||{}}},this._modelUpdateListener=function(e,t){var i=this;if(this.playerModel.init)switch("time"!=e&&"progress"!=e&&$p.utils.log("Update: '"+e,this.playerModel.getSrc(),this.playerModel.getModelName(),t),e){case"state":this._promote("state",t);var n=$.map(this.getDC().attr("class").split(" "),function(e){return-1===e.indexOf(i.getConfig("ns")+"state")?e:""});switch(n.push(this.getConfig("ns")+"state"+t.toLowerCase()),this.getDC().attr("class",n.join(" ")),t){case"AWAKENING":var s=this.playerModel;this._syncPlugins(function(){s.getState("AWAKENING")&&s.displayItem(!0)});break;case"ERROR":this._addGUIListeners();break;case"STOPPED":this._promote("stopped",{});break;case"PAUSED":this.getConfig("disablePause")===!0&&this.playerModel.applyCommand("play",0);break;case"COMPLETED":if(this.getConfig("replay"))return;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),s=this.playerModel,this._syncPlugins(function(){i._promote("ready"),i._addGUIListeners(),s.getState("IDLE")||s.start()});break;case"availableQualitiesChange":this.media[this._currentItem].qualities=t,this._promote("availableQualitiesChange",t);break;case"qualityChange":this.setConfig({playbackQuality:t}),this._promote("qualityChange",t);break;case"volume":this.setConfig({volume:t}),this._promote("volume",t),0>=t?(this.env.muted=!0,this._promote("mute",t)):this.env.muted===!0&&(this.env.muted=!1,this._promote("unmute",t));break;case"playlist":this.setFile(t.file,t.type);break;case"config":this.setConfig(t);break;case"time":if(t>this._maxElapsed){var a=Math.round(100*t/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,t),this._maxElapsed=this.getDuration()*a/100}this._promote(e,t);break;case"fullscreen":t===!0?(this.getDC().addClass("fullscreen"),this._enterFullViewport()):(this.getDC().removeClass("fullscreen"),this._exitFullViewport()),this._promote(e,t);break;case"error":this._promote(e,t),this.getConfig("skipTestcard")&&this.getItemCount()>1?this.setActiveItem("next"):(this.playerModel.applyCommand("error",t),this._addGUIListeners());break;case"streamTypeChange":"dvr"==t&&this.getDC().addClass(this.getNS()+"dvr"),this._promote(e,t);break;default:this._promote(e,t)}},this._syncPlugins=function(e){var t=this;this.env.loading=!0,function(){try{if(t._plugins.length>0)for(var i=0;t._plugins.length>i;i++)if(!t._plugins[i].isReady())return setTimeout(arguments.callee,50),void 0;t.env.loading=!1,t._promote("pluginsReady",{});try{e()}catch(n){}}catch(n){}}()},this._MD=function(e){projekktor("#"+e.currentTarget.id.replace(/_media$/,""))._playerFocusListener(e)},this._addGUIListeners=function(){var e=this;this._removeGUIListeners(),this.getDC().get(0).addEventListener?this.getDC().get(0).addEventListener("mousedown",this._MD,!0):this.getDC().mousedown(function(t){e._playerFocusListener(t)}),this.getDC().mousemove(function(t){e._playerFocusListener(t)}).mouseenter(function(t){e._playerFocusListener(t)}).mouseleave(function(t){e._playerFocusListener(t)}).focus(function(t){e._playerFocusListener(t)}).blur(function(t){e._playerFocusListener(t)}),$(window).bind("resize.projekktor"+this.getId(),function(){e.setSize()}).bind("touchstart",function(){e._windowTouchListener(event)}),this.config.enableKeyboard===!0&&($(document).unbind("keydown.pp"+this._id),$(document).bind("keydown.pp"+this._id,function(t){e._keyListener(t)}))},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(e){if(0!=this._plugins.length){var t=e||$.merge($.merge([],this.config._plugins),this.config._addplugins),i=this._plugins.length;for(var n=0;t.length>n;n++)for(var s=0;i>s;s++)if(void 0!=this._plugins[s]&&this._plugins[s].name==t[n].toLowerCase()){this._plugins[s].deconstruct(),this._plugins.splice(s,1);for(var a in this._pluginCache)for(var r=0;this._pluginCache[a].length>r;r++)this._pluginCache[a][r].name==t[n].toLowerCase()&&this._pluginCache[a].splice(r,1)}}},this.getPlugins=function(){var e=[];return $.each(this._plugins,function(){e.push({name:this.name,ver:this.version||"unknown"})}),e},this._promote=function(e,t){var i=this;this._enqueue(function(){try{i.__promote(e,t)}catch(n){}})},this.__promote=function(e,t){var i=e,n={};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+"]",t,this.listeners),this._pluginCache[i+"Handler"]&&this._pluginCache[i+"Handler"].length>0)for(var s=0;this._pluginCache[i+"Handler"].length>s;s++)if(this.getConfig("debug"))try{this._pluginCache[i+"Handler"][s][i+"Handler"](t,this)}catch(a){$p.utils.log(a)}else this._pluginCache[i+"Handler"][s][i+"Handler"](t,this);if(this._pluginCache.eventHandler&&this._pluginCache.eventHandler.length>0)for(var s=0;this._pluginCache.eventHandler.length>s;s++)if(this.getConfig("debug"))try{this._pluginCache.eventHandler[s].eventHandler(i,t,this)}catch(a){$p.utils.log(a)}else this._pluginCache.eventHandler[s].eventHandler(i,t,this);if(this.listeners.length>0)for(var s=0;this.listeners.length>s;s++)if(this.listeners[s].event==i||"*"==this.listeners[s].event)if(this.getConfig("debug"))try{this.listeners[s].callback(t,this)}catch(a){$p.utils.log(a)}else this.listeners[s].callback(t,this)},this._detachplayerModel=function(){this._removeGUIListeners();try{this.playerModel.destroy(),this._promote("detach",{})}catch(e){}},this._windowTouchListener=function(e){e.touches&&e.touches.length>0&&(($(document.elementFromPoint(e.touches[0].clientX,e.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",{}),e.stopPropagation()):this.env.mouseIsOver&&(this._promote("mouseleave",{}),this.env.mouseIsOver=!1))},this._playerFocusListener=function(e){var t=e.type.toLowerCase();switch(t){case"mousedown":if(0==this.env.mouseIsOver)break;if("|TEXTAREA|INPUT".indexOf("|"+e.target.tagName.toUpperCase())>-1)return;if(3==e.which){if($(e.target).hasClass("context"))break;$(document).bind("contextmenu",function(e){return $(document).unbind("contextmenu"),!1})}break;case"mousemove":if(this.env.mouseX!=e.clientX&&this.env.mouseY!=e.clientY&&(this.env.mouseIsOver=!0),this.env.clientX==e.clientX&&this.env.clientY==e.clientY)return;this.env.clientX=e.clientX,this.env.clientY=e.clientY;break;case"focus":case"mouseenter":this.env.mouseIsOver=!0;break;case"blur":case"mouseleave":this.env.mouseIsOver=!1}this._promote(t,e)},this._keyListener=function(e){if(this.env.mouseIsOver&&!("|TEXTAREA|INPUT".indexOf("|"+e.target.tagName.toUpperCase())>-1)){var t=this,i=this.getConfig("keys").length>0?this.getConfig("keys"):[{27:function(e){e.getInFullscreen()?e.setFullscreen(!1):e.setStop()},32:function(e,t){e.setPlayPause(),t.preventDefault()},70:function(e){e.setFullscreen()},39:function(e,t){e.setPlayhead("+5"),t.preventDefault()},37:function(e,t){e.setPlayhead("-5"),t.preventDefault()},38:function(e,t){e.setVolume("+0.05"),t.preventDefault()},40:function(e,t){e.setVolume("-0.05"),t.preventDefault()},68:function(e){e.setDebug()},67:function(e){$p.utils.log("Config Dump",e.config)},80:function(e){$p.utils.log("Schedule Dump",e.media)},84:function(e){$p.utils.log("Cuepoints Dump",e.getCuePoints())}}];this._promote("key",e),$.each(i||[],function(){try{this[e.keyCode](t,e)}catch(i){}try{this["*"](t)}catch(i){}})}},this._enterFullViewport=function(e){},this._exitFullViewport=function(e){},this.pluginAPI=function(){var e=Array.prototype.slice.call(arguments)||null,t=e.shift(),i=e.shift();if(null!=t&&null!=i)for(var n=0;this._plugins.length>n;n++)if(this._plugins[n].name==t)return this._plugins[n][i](e[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(e,t){return this.getConfig(e,t)},this.getConfig=function(e,t){var i=t||this._currentItem,n=this.config["_"+e]||this.config[e];if(null==e)return this.media[i].config;if(void 0==this.config["_"+e])try{void 0!==this.media[i].config[e]&&(n=this.media[i].config[e])}catch(s){}if(e.indexOf("plugin_")>-1)try{this.media[i].config[e]&&(n=$.extend(!0,{},this.config[e],this.media[i].config[e]))}catch(s){}if(null==n)return null;if("object"==typeof n&&null===n.length?n=$.extend(!0,{},n||{}):"object"==typeof n&&(n=$.extend(!0,[],n||[])),"string"==typeof n)switch(n){case"true":n=!0;break;case"false":n=!1;break;case"NaN":case"undefined":case"null":n=null}return n},this.getDC=function(){return this.env.playerDom},this.getState=function(e){var t="IDLE";try{t=this.playerModel.getState()}catch(i){}return null!=e?t==e.toUpperCase():t},this.getLoadProgress=function(){try{return this.playerModel.getLoadProgress()}catch(e){return 0}},this.getKbPerSec=function(){try{return this.playerModel.getKbPerSec()}catch(e){return 0}},this.getItemCount=function(){return 1==this.media.length&&"na"==this.media[0].mediaModel?0:this.media.length},this.getItemId=function(e){return this.media[e||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(e){return 0}},this.getSource=function(){try{return this.playerModel.getSource()[0].src}catch(e){return!1}},this.getDuration=function(){try{return this.playerModel.getDuration()}catch(e){return 0}},this.getPosition=function(){try{return this.playerModel.getPosition()||0}catch(e){return 0}},this.getMaxPosition=function(){try{return this.playerModel.getMaxPosition()||0}catch(e){return 0}},this.getFrame=function(){try{return this.playerModel.getFrame()}catch(e){return 0}},this.getTimeLeft=function(){try{return this.playerModel.getDuration()-this.playerModel.getPosition()}catch(e){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(e){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(e){return"NA"}},this.getIframeParent=this.getIframeWindow=function(){try{var e=!1;return this.config._iframe&&(e=((I11C || I10C).PreLocationContextProxy)(parent).locat1on.host||!1),e===!1?!1:$(parent.window)}catch(t){return!1}},this.getIframe=function(){try{var e=[];return this.config._iframe&&(e=window.$(frameElement)||[]),0==e.length?!1:e}catch(t){return!1}},this.getIframeAllowFullscreen=function(){var e=null;try{e=window.frameElement.attributes.allowFullscreen||window.frameElement.attributes.mozallowFullscreen||window.frameElement.attributes.webkitallowFullscreen||null}catch(t){e=!0}return null!=e?!0:!1},this.getPlaybackQuality=function(){var e="default";try{e=this.playerModel.getPlaybackQuality()}catch(t){}return"default"==e&&(e=this.getConfig("playbackQuality")),("default"==e||-1==$.inArray(e,this.getPlaybackQualities()))&&(e=this.getAppropriateQuality()),-1==$.inArray(e,this.getPlaybackQualities())&&(e="default"),e},this.getPlaybackQualities=function(){try{return $.extend(!0,[],this.media[this._currentItem].qualities||[])}catch(e){}return[]},this.getIsMobileClient=function(e){var t=navigator.userAgent.toLowerCase();var i=["android","windows ce","blackberry","palm","mobile"];for(var n=0;i.length>n;n++)if(t.indexOf(i[n])>-1)return e?i[n].toUpperCase()==e.toUpperCase():!0;return!1},this.getCanPlay=function(e,t,i){return this._canPlay(e,t,i)},this.getCanPlayNatively=function(e){return this._canPlay(e,"native")},this.getPlatform=function(){return this.media[this._currentItem].platform||"error"},this.getPlatforms=function(){var e=this,t=this._testMediaSupport(!0),i=this.getConfig("platforms"),n=[],s=[];try{for(var a in this.media[this._currentItem].file)if(this.media[this._currentItem].file.hasOwnProperty(a))for(var r in t)this._canPlay(this.media[this._currentItem].file[a].type.replace(/x-/,""),t[r].toLowerCase(),this.getConfig("streamType"))&&-1==$.inArray(t[r].toLowerCase(),s)&&s.push(t[r].toLowerCase())}catch(o){}return s.sort(function(e,t){return $.inArray(e,i)-$.inArray(t,i)}),s},this.getNativeFullscreenSupport=function(){var e=this,t={supportsFullScreen:"viewport",isFullScreen:function(){try{return e.getDC().hasClass("fullscreen")}catch(t){return!1}},requestFullScreen:function(){e.playerModel.applyCommand("fullscreen",!0)},cancelFullScreen:function(){e.playerModel.applyCommand("fullscreen",!1)},prefix:"",ref:this},i="webkit moz o ms khtml".split(" ");if(document.cancelFullScreen!==void 0)t.supportsFullScreen=!0;else for(var n=0,s=i.length;s>n;n++)if(t.prefix=i[n],document.createElement("video")[t.prefix+"EnterFullscreen"]!==void 0&&(t.supportsFullScreen="mediaonly"),document[t.prefix+"CancelFullScreen"]!==void 0&&(t.supportsFullScreen="dom","moz"==t.prefix&&document[t.prefix+"FullScreenEnabled"]===void 0&&(t.supportsFullScreen="viewport")),t.supportsFullScreen!==!1&&"viewport"!==t.supportsFullScreen)break;return"viewport"==t.supportsFullScreen||"dom"==t.supportsFullScreen&&this.getConfig("forceFullViewport")?t:"mediaonly"==t.supportsFullScreen?(t.requestFullScreen=function(t){e.playerModel.getMediaElement().get(0)[this.prefix+"EnterFullscreen"]()},t.dest={},t.cancelFullScreen=function(){},t):(t.isFullScreen=function(t){var i=e.getIframe()?parent.window.document:document;switch(this.prefix){case"":return i.fullScreen;case"webkit":return i.webkitIsFullScreen;case"moz":return i[this.prefix+"FullScreen"]||e.getDC().hasClass("fullscreen")&&t!==!0;default:return i[this.prefix+"FullScreen"]}},t.requestFullScreen=function(){if(!this.isFullScreen()){var t=e.getIframeParent()||$(window),i=e.getIframe()?e.getIframe().get(0):null||e.getDC().get(0),n=this,s=e.getIframe()?parent.window.document:document,t=e.getIframeParent()||$(window);t.data("fsdata",{scrollTop:t.scrollTop(),scrollLeft:t.scrollLeft()}),$(s).unbind(this.prefix+"fullscreenchange.projekktor"),""===this.prefix?i.requestFullScreen():i[this.prefix+"RequestFullScreen"](),n.ref.playerModel.applyCommand("fullscreen",!0),$(s).bind(this.prefix+"fullscreenchange.projekktor",function(e){if(n.isFullScreen(!0))n.ref.playerModel.applyCommand("fullscreen",!0);else{n.ref.playerModel.applyCommand("fullscreen",!1);var t=n.ref.getIframeParent()||$(window),i=t.data("fsdata");null!=i&&(t.scrollTop(i.scrollTop),t.scrollLeft(i.scrollLeft))}})}},t.cancelFullScreen=function(){var t=e.getIframe()?parent.window.document:document,i=e.getIframeParent()||$(window),n=i.data("fsdata");$(e.getIframe()?parent.window.document:document).unbind(this.prefix+"fullscreenchange.projekktor"),t.exitFullScreen?t.exitFullScreen():""==this.prefix?t.cancelFullScreen():t[this.prefix+"CancelFullScreen"](),null!=n&&(i.scrollTop(n.scrollTop),i.scrollLeft(n.scrollLeft)),e.playerModel.applyCommand("fullscreen",!1)},t)},this.getId=function(){return this._id},this.getHasGUI=function(){try{return this.playerModel.getHasGUI()}catch(e){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(e){var t=e||this.getPlaybackQualities()||[];if(0==t.length)return[];var i=this.env.playerDom.width(),n=this.env.playerDom.height(),s=$p.utils.roundNumber(i/n,2),a={};return $.each(this.getConfig("playbackQualities")||[],function(){if(0>$.inArray(this.key,t))return!0;if((this.minHeight||0)>n&&n>=a.minHeight)return!0;if((a.minHeight||0)>this.minHeight)return!0;if("number"==typeof this.minWidth){if(0===this.minWidth&&this.minHeight>n)return!0;if(this.minWidth>i)return!0;a=this}else if("object"==typeof this.minWidth){var e=this;$.each(this.minWidth,function(){return(this.ratio||100)>s?!0:this.minWidth>i?!0:(a=e,!0)})}return!0}),$.inArray("auto",this.getPlaybackQualities())>-1?"auto":a.key||"default"},this.getFromUrl=function(e,t,i,n,s){var a=null,r=this,o=!this.getIsMobileClient();if(t==r&&"_reelUpdate"==i&&this._promote("scheduleLoading",1+this.getItemCount()),"_"!=i.substr(0,1)?window[i]=function(e){try{delete window[i]}catch(n){}t[i](e)}:s.indexOf("jsonp")>-1&&(this["_jsonp"+i]=function(e){t[i](e)}),s){if(void 0==$.parseJSON&&s.indexOf("json")>-1)return this._raiseError("Projekktor requires at least jQuery 1.4.2 in order to handle JSON playlists."),this;s=s.indexOf("/")>-1?s.split("/")[1]:s}var l={url:e,complete:function(e,r){if(void 0==s)try{e.getResponseHeader("Content-Type").indexOf("xml")>-1&&(s="xml"),e.getResponseHeader("Content-Type").indexOf("json")>-1&&(s="json"),e.getResponseHeader("Content-Type").indexOf("html")>-1&&(s="html")}catch(o){}a=$p.utils.cleanResponse(e.responseText,s);try{a=n(a,e.responseText,t)}catch(o){}if("error"!=r&&"jsonp"!=s)try{t[i](a)}catch(o){}},error:function(e){t[i]&&"jsonp"!=s&&t[i](!1)},cache:!0,async:o,dataType:s,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(e){e.withCredentials=!0},$.support.cors=!0,$.ajax(l),this},this.setActiveItem=function(e){var t=0,i=this._currentItem,n=this,s=!1;if("string"==typeof e)switch(e){case"same":t=this._currentItem;break;case"previous":t=this._currentItem-1;break;case"next":t=this._currentItem+1}else t="number"==typeof e?parseInt(e):0;if(t!=this._currentItem&&1==this.getConfig("disallowSkip")&&!this.getState("COMPLETED")&&!this.getState("IDLE"))return this;this._detachplayerModel(),this.env.loading=!1,0!==t||null!=i&&i!=t||!(this.config._autoplay===!0||"DESTROYING|AWAKENING".indexOf(this.getState())>-1)?this.getItemCount()>1&&t!=i&&null!=i&&this.config._continuous===!0&&this.getItemCount()>t&&(s=!0):s=!0,(t>=this.getItemCount()||0>t)&&(s=this.config._loop,t=0),this._currentItem=t;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{n._applyCuePoints()}catch(e){}}),this.playerModel._init({media:$.extend(!0,{},this.media[this._currentItem]),model:r,pp:this,environment:$.extend(!0,{},this.env),autoplay:s,quality:this.getPlaybackQuality(),fullscreen:this.getInFullscreen()}),this},this.setPlay=function(){var e=this;return this.getConfig("thereCanBeOnlyOne")&&projekktor("*").each(function(){this.getId()!==e.getId()&&this.setStop()}),this._enqueue("play",!1),this},this.setPause=function(){return this._enqueue("pause",!1),this},this.setStop=function(e){var t=this;return this.getState("IDLE")?this:(e?this._enqueue(function(){t._currentItem=0,t.setActiveItem(0)}):this._enqueue("stop",!1),this)},this.setPlayPause=function(){return this.getState("PLAYING")?this.setPause():this.setPlay(),this},this.setVolume=function(e,t){var i=this.getVolume();if(1==this.getConfig("fixedVolume"))return this;switch(typeof e){case"string":var n=e.substr(0,1);switch(e=parseFloat(e.substr(1)),n){case"+":e=this.getVolume()+e;break;case"-":e=this.getVolume()-e;break;default:e=this.getVolume()}case"number":e=parseFloat(e),e=e>1?1:e,e=0>e?0:e;break;default:return this}return this._enqueue("volume",e),this},this.setPlayhead=this.setSeek=function(e){if(1==this.getConfig("disallowSkip"))return this;if("string"==typeof e){var t=e.substr(0,1);e=parseFloat(e.substr(1)),e="+"==t?this.getPosition()+e:"-"==t?this.getPosition()-e:this.getPosition()}return"number"==typeof e&&this._enqueue("seek",Math.round(100*e)/100),this},this.setFrame=function(e){if(null==this.getConfig("fps"))return this;if(1==this.getConfig("disallowSkip"))return this;if("string"==typeof e){var t=e.substr(0,1);e=parseFloat(e.substr(1)),e="+"==t?this.getFrame()+e:"-"==t?this.getFrame()-e:this.getFrame()}return"number"==typeof e&&this._enqueue("frame",e),this},this.setPlayerPoster=function(e){var t=this;return this._enqueue(function(){t.setConfig({poster:e},0)}),this._enqueue(function(){t.playerModel.setPosterLive()}),this},this.setConfig=function(){var e=this,t=arguments;return this._enqueue(function(){e._setConfig(t[0]||null,t[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(e){},this.setSize=function(e){var t=this.getIframe()||this.getDC(),i=t.data("fsdata")||null,n=e&&null!=e.width?e.width:null!=this.getConfig("width")?this.getConfig("width"):!1,s=e&&null!=e.height?e.height:null==this.getConfig("height")&&this.getConfig("ratio")?Math.round((n||this.getDC().width())/this.getConfig("ratio")):null!=this.getConfig("height")?this.getConfig("height"):!1;this.getInFullscreen()&&null!=i?(i.targetWidth=n,i.targetHeight=s,t.data("fsdata",i)):(n&&t.css({width:n+"px"}),s&&t.css({height:s+"px"}));
try{this.playerModel.applyCommand("resize")}catch(a){}},this.setLoop=function(e){this.config._loop=e||!this.config._loop},this.setDebug=function(e){$p.utils.logging=e||!$p.utils.logging,$p.utils.logging&&$p.utils.log("DEBUG MODE for player #"+this.getId())},this.addListener=function(e,t){var i=this;return this._enqueue(function(){i._addListener(e,t)}),this},this._addListener=function(e,t){var i=e.indexOf(".")>-1?e.split("."):[e,"default"];return this.listeners.push({event:i[0],ns:i[1],callback:t}),this},this.removeListener=function(e,t){var i=this.listeners.length,n=e.indexOf(".")>-1?e.split("."):[e,"*"];for(var s=0;i>s;s++)void 0!=this.listeners[s]&&(this.listeners[s].event==n[0]||"*"===n[0])&&(this.listeners[s].ns!=n[1]&&"*"!==n[1]||this.listeners[s].callback+""!=t+""&&null!=t||this.listeners.splice(s,1));return this},this.setItem=function(){var e=arguments[0];var t=0;return this._clearqueue(),null==e?(t=this._removeItem(arguments[1]),t===this._currentItem&&this.setActiveItem("previous")):(t=this._addItem(this._prepareMedia({file:e,config:e.config||{}}),arguments[1],arguments[2]),t===this._currentItem&&this.setActiveItem(this._currentItem)),this},this.setFile=function(){var e=arguments[0]||"",t=arguments[1]||this._getTypeFromFileExtension(e),i=[];return this.env.loading===!0?this:(this._clearqueue(),this.env.loading=!0,this._detachplayerModel(),"object"==typeof e?($p.utils.log("Applying incoming JS Object",e),this._reelUpdate(e),this):(i[0]={},i[0].file={},i[0].file.src=e||"",i[0].file.type=t||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(e){var t=e||this.getAppropriateQuality();return $.inArray(t,this.media[this._currentItem].qualities||[])>-1&&(this.playerModel.applyCommand("quality",t),this.setConfig({playbackQuality:t})),this},this.openUrl=function(e){return e=e||{url:"",target:"",pause:!1},""==e.url?this:(e.pause===!0&&this.setPause(),window.open(e.url,e.target).focus(),this)},this.selfDestruct=this.destroy=function(){var e=this;return this._enqueue(function(){e._destroy()}),this},this._destroy=function(){var e=this;return $(this).unbind(),this.removePlugins(),this.playerModel.destroy(),this._removeGUIListeners(),$.each(projekktors,function(t){try{if(this.getId()==e.getId()||this.getId()==e.getId()||this.getParent()==e.getId())return projekktors.splice(t,1),void 0}catch(i){}}),this.env.playerDom.replaceWith(this.env.srcNode),this._promote("destroyed"),this.removeListener("*"),this},this.reset=function(){var e=this;return this._clearqueue(),this._enqueue(function(){e._reset()}),this},this._reset=function(){var e={},t=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)e["_"==i.substr(0,1)?i.substr(1):i]=this.config[i];return"function"==typeof this.env.onReady&&this._enqueue(t.env.onReady(t)),this._init(this.env.playerDom,e),this},this.setCuePoint=function(e,t){var i=void 0!==e.item?e.item:this.getItemIdx(),n=$.extend(!0,{offset:0},t),s=this,a={id:e.id||$p.utils.randomId(8),group:e.group||$p.utils.randomId(8),item:i,on:($p.utils.toSeconds(e.on)||0)+n.offset,off:($p.utils.toSeconds(e.off)||$p.utils.toSeconds(e.on)||0)+n.offset,value:e.value||null,callback:e.callback||function(){},precision:null==e.precision?1:e.precision,title:null==e.title?"":e.title,_listeners:[],_unlocked:!1,_active:!1,_lastTime:0,isAvailable:function(){return this._unlocked},_stateListener:function(e,t){if("STOPPED|COMPLETED|DESTROYING".indexOf(e)>-1){if(this._active)try{this.callback(!1,this,t)}catch(i){}this._active=!1,this._lastTime=-1}},_timeListener:function(e,t){if(t.getItemIdx()===this.item||"*"==this.item){var i=0==this.precision?Math.round(e):$p.utils.roundNumber(e,this.precision),n=this;if(this._unlocked===!1){var s=t.getDuration()*t.getLoadProgress()/100;if(!(s>=this.on||i>=this.on))return;$.each(this._listeners.unlock||[],function(){this(n,t)}),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:t})}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:t})}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(e,t){null==this._listeners[e]&&(this._listeners[e]=[]),this._listeners[e].push(t||function(){})}};return null!=e.unlockCallback&&a.addListener("unlock",e.unlockCallback),null==this._cuePoints[i]&&(this._cuePoints[i]=[]),this._cuePoints[i].push(a),this.getState("IDLE")||this._promote("cuepointAdded"),this},this.setGotoCuePoint=function(e,t){var i=this.getCuePoints(t);return this.setPlayhead(i[e].on),this},this.getCuePoints=function(e){return this._cuePoints[e||this.getItemIdx()]||this._cuePoints||{}},this.getCuePointById=function(e,t){var i=!1,n=this.getCuePoints(t);for(var s=0;n.length>s;s++)if(n.id==e){i=this;break}return i},this.removeCuePoints=function(e,t){var i=this.getCuePoints(e||0)||{},n=[];for(var s=0;i.length>s;s++)i[s].group==t&&(this.removeListener("time",i[s].timeEventHandler),this.removeListener("state",i[s].stateEventHandler),n.push(s));for(var a=0;n.length>a;a++)i.splice(n[a]-a,1);return this},this.syncCuePoints=function(){var e=this;return this._enqueue(function(){try{e._applyCuePoints()}catch(t){}}),this},this._applyCuePoints=function(e){var t=this;(null!=this._cuePoints[this._currentItem]||null!=this._cuePoints["*"])&&$.each($.merge(this._cuePoints[this._currentItem]||[],this._cuePoints["*"]||[]),function(e,i){try{t.removeListener("time",i.timeEventHandler),t.removeListener("state",i.stateEventHandler)}catch(n){}i.timeEventHandler=function(e,t){try{i._timeListener(e,t)}catch(n){}},i.stateEventHandler=function(e,t){try{i._stateListener(e,t)}catch(n){}},t.addListener("time",i.timeEventHandler),t.addListener("state",i.stateEventHandler),t.addListener("item",function(){t.removeListener("time",i.timeEventHandler),t.removeListener("state",i.stateEventHandler)})})},this._enqueue=function(e,t,i){null!=e&&(this._queue.push({command:e,params:t,delay:i}),this._processQueue())},this._clearqueue=function(e,t){this._isReady===!0&&(this._queue=[])},this._processQueue=function(){var e=this,t=!1;this._processing!==!0&&this.env.loading!==!0&&(this._processing=!0,function(){try{t=e.playerModel.getIsReady()}catch(i){}if(e.env.loading!==!0&&t){try{var n=e._queue.shift();null!=n&&("string"==typeof n.command?n.delay>0?setTimeout(function(){e.playerModel.applyCommand(n.command,n.params)},n.delay):e.playerModel.applyCommand(n.command,n.params):n.command(e))}catch(i){$p.utils.log("ERROR:",i)}return 0==e._queue.length?(e._isReady===!1&&(e._isReady=!0),e._processing=!1,void 0):(arguments.callee(),void 0)}setTimeout(arguments.callee,100)}())},this._getTypeFromFileExtension=function(e){var t="",i=[],n={},i=[],s=null,a=!0;for(var r in $p.mmap)if($p.mmap.hasOwnProperty(r)){s=$p.mmap[r].platform,"object"!=typeof s&&(s=[s]),a=!0;for(var o=0;s.length>o;o++)null!=s[o]&&(this.getConfig("enable"+s[o].toUpperCase()+"Platform")===!1||-1===$.inArray(s[o],this.getConfig("platforms")))&&(a=!1);if(a===!1)continue;i.push("\\."+$p.mmap[r].ext),n[$p.mmap[r].ext]=$p.mmap[r]}i="^.*.("+i.join("|")+")";try{t=e.match(RegExp(i))[1],t=t?t.replace(".",""):"NaN"}catch(l){t="NaN"}return n[t].type},this._testMediaSupport=function(e){var t={},i=[],n="",s=this;if(e){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(e,r){return null==r?!0:(n=$p.mmap[a].streamType||["http"],$.each(n,function(e,n){if(null==t[n]&&(t[n]={}),null==t[n][r]&&(t[n][r]=[]),$.inArray($p.mmap[a].type,t[n][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!=s.getConfig("enable"+r.toUpperCase()+"Platform")&&$.inArray(r.toLowerCase(),s.getConfig("platforms"))>-1&&(t[n][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=t,$p._platformTableCache=i,e?$p._platformTableCache:$p._compTableCache},this._readMediaTag=function(e){var t={},i="",n=[],s=this;if(-1=="VIDEOAUDIO".indexOf(e[0].tagName.toUpperCase()))return!1;this.getConfig("ignoreAttributes")||(t={autoplay:void 0===e.attr("autoplay")&&void 0===e.prop("autoplay")||e.prop("autoplay")===!1?!1:!0,controls:void 0===e.attr("controls")&&void 0===e.prop("controls")||e.prop("controls")===!1?!1:!0,loop:void 0===e.attr("autoplay")&&void 0===e.prop("loop")||e.prop("loop")===!1?!1:!0,title:void 0!==e.attr("title")&&e.attr("title")!==!1?e.attr("title"):"",poster:void 0!==e.attr("poster")&&e.attr("poster")!==!1?e.attr("poster"):"",width:void 0!==e.attr("width")&&e.attr("width")!==!1?e.attr("width"):null,height:void 0!==e.attr("height")&&e.attr("height")!==!1?e.attr("height"):null}),i=$($("
").html($(e).clone())).html(),n=["autoplay","controls","loop"];for(var a=0;n.length>a;a++)-1!=i.indexOf(n[a])&&(t[n[a]]=!0);if(t.playlist=[],t.playlist[0]=[],t.playlist[0].config={tracks:[]},e.attr("src")&&t.playlist[0].push({src:e.attr("src"),type:e.attr("type")||this._getTypeFromFileExtension(e.attr("src"))}),!$(" ").get(0).canPlayType){var r=e;do if(r=r.next("source,track"),r.attr("src"))switch(r.get(0).tagName.toUpperCase()){case"SOURCE":t.playlist[0].push({src:r.attr("src"),type:r.attr("type")||this._getTypeFromFileExtension(r.attr("src")),quality:r.attr("data-quality")||""});break;case"TRACK":$(this).attr("src")&&t.playlist[0].config.tracks.push({src:r.attr("src"),kind:r.attr("kind")||"subtitle",lang:r.attr("srclang")||null,label:r.attr("label")||null})}while(r.attr("src"))}return 0==t.playlist[0].length&&e.children("source,track").each(function(){if($(this).attr("src"))switch($(this).get(0).tagName.toUpperCase()){case"SOURCE":t.playlist[0].push({src:$(this).attr("src"),type:$(this).attr("type")||s._getTypeFromFileExtension($(this).attr("src")),quality:$(this).attr("data-quality")||""});break;case"TRACK":t.playlist[0].config.tracks.push({src:$(this).attr("src"),kind:$(this).attr("kind")||"subtitle",lang:$(this).attr("srclang")||null,label:$(this).attr("label")||null})}}),t},this._raiseError=function(e){this.env.playerDom.html(e).css({color:"#fdfdfd",backgroundColor:"#333",lineHeight:this.config.height+"px",textAlign:"center",display:"block"}),this._promote("error")},this._init=function(e,t){var i=e||srcNode,n=t||cfg,s=this._readMediaTag(i);if(this.env.srcNode=i.wrap("
").parent().html(),i.unwrap(),this.env.className=i.attr("class")||"",this._id=i[0].id||$p.utils.randomId(8),s!==!1){this.env.playerDom=$("
").attr({"class":i[0].className,style:i.attr("style")}),i.replaceWith(this.env.playerDom),i.empty().removeAttr("type").removeAttr("src");try{i.get(0).pause(),i.get(0).load()}catch(a){}$("
").append(i).get(0).innerHTML="",i=null}else this.env.playerDom=i;n=$.extend(!0,{},s,n);for(var r in n)null!=this.config["_"+r]?this.config["_"+r]=n[r]:this.config[r]=r.indexOf("plugin_")>-1?$.extend(this.config[r],n[r]):n[r];if($p.utils.logging=this.config._debug,this.setSize(),this.getIsMobileClient()&&(this.config._autoplay=!1),this.env.playerDom.attr("id",this._id),this.config._theme)switch(typeof this.config._theme){case"string":break;case"object":this._applyTheme(this.config._theme)}else this._start(!1);return this},this._start=function(e){var t=this,i=this.getIframeParent();this._registerPlugins(),this.config._iframe===!0&&(i?i.ready(function(){t._enterFullViewport(!0)}):t._enterFullViewport(!0)),i===!1&&(this.config._isCrossDomain=!0),this.getIframeAllowFullscreen()||(this.config.enableFullscreen=!1),"function"==typeof onReady&&this._enqueue(function(){onReady(t)});for(var n in this.config._playlist[0])if(this.config._playlist[0][n].type&&(this.config._playlist[0][n].type.indexOf("/json")>-1||this.config._playlist[0][n].type.indexOf("/xml")>-1))return this.setFile(this.config._playlist[0][n].src,this.config._playlist[0][n].type),this;return this.setFile(this.config._playlist),this},this._applyTheme=function(data){var ref=this;if(data===!1)return this._raiseError("The Projekktor theme-set specified could not be loaded."),!1;if("string"==typeof data.css&&$("head").append('"),"string"==typeof data.html&&this.env.playerDom.html($p.utils.parseTemplate(data.html,{p:this.getNS()})),this.env.playerDom.addClass(data.id).addClass(data.variation),this.env.className=this.env.className&&0!==this.env.className.length?this.env.className+" "+data.id:data.id,data.variation&&0!==data.variation.length&&(this.env.className+=" "+data.variation),"object"==typeof data.config){for(var i in data.config)null!=this.config["_"+i]?this.config["_"+i]=data.config[i]:this.config[i]=i.indexOf("plugin_")>-1?$.extend(!0,{},this.config[i],data.config[i]):data.config[i];if("object"==typeof data.config.plugins)for(var i=0;data.config.plugins.length>i;i++)try{typeof eval("projekktor"+data.config.plugins[i])}catch(e){return this._raiseError("The applied theme requires the following Projekktor plugin(s): "+data.config.plugins.join(", ")+" "),!1}}return data.onReady&&this._enqueue(function(player){eval(data.onReady)}),this._start()},this._init()}},$p.mmap=[],$p.models={},$p.newModel=function(e,t){if("object"!=typeof e)return i;if(!e.modelId)return i;var i=!1,n=$p.models[t]&&void 0!=t?$p.models[t].prototype:{};if($p.models[e.modelId])return i;$p.models[e.modelId]=function(){},$p.models[e.modelId].prototype=$.extend({},n,e),e.setiLove&&e.setiLove(),$p.mmap=$.grep($p.mmap,function(t){var i=t.model!=(e.replace?e.replace.toLowerCase():""),n=t.replaces!=e.modelId;return i&&n});for(var s=0;e.iLove.length>s;s++)e.iLove[s].model=e.modelId.toLowerCase(),e.iLove[s].replaces=e.replace?e.replace.toLowerCase():"",$p.mmap.push(e.iLove[s]);return!0}});var projekktorConfig=function(e){this._version=e};projekktorConfig.prototype={_playerName:"Projekktor",_playerHome:"http://www.projekktor.com?via=context",_cookieName:"projekktor",_cookieExpiry:356,_plugins:["display","controlbar"],_addplugins:[],_reelParser:null,_ns:"pp",_platforms:["ima","browser","android","ios","native","flash","vlc","vpaid","fskmobile"],_iframe:!1,_ignoreAttributes:!1,_loop:!1,_autoplay:!1,_continuous:!0,_thereCanBeOnlyOne:!0,_leaveFullscreen:!0,_playlist:[],_theme:!1,_themeRepo:!1,_messages:{0:"#0 An (unknown) error occurred.",1:"#1 You aborted the media playback. ",2:"#2 A network error caused the media download to fail part-way. ",3:"#3 The media playback was aborted due to a corruption problem. ",4:"#4 The media (%{title}) could not be loaded because the server or network failed.",5:"#5 Sorry, your browser does not support the media format of the requested file.",6:"#6 Your client is in lack of the Flash Plugin V%{flashver} or higher.",7:"#7 No media scheduled.",8:"#8 ! Invalid media model configured !",9:"#9 File (%{file}) not found.",10:"#10 Invalid or missing quality settings for %{title}.",11:"#11 Invalid streamType and/or streamServer settings for %{title}.",12:"#12 Invalid or inconsistent quality setup for %{title}.",80:"#80 The requested file does not exist or is delivered with an invalid content-type.",97:"No media scheduled.",98:"Invalid or malformed playlist data!",99:"Click display to proceed. ",100:"Keyboard Shortcuts",500:"This Youtube video has been removed or set to private",501:"The Youtube user owning this video disabled embedding.",502:"Invalid Youtube Video-Id specified."},_debug:!1,_width:null,_height:null,_ratio:!1,_keys:[],_isCrossDomain:!1,_forceFullViewport:!1,id:0,title:null,cat:"clip",poster:null,controls:!0,start:!1,stop:!1,volume:.5,cover:"",disablePause:!1,disallowSkip:!1,fixedVolume:!1,imageScaling:"aspectratio",videoScaling:"aspectratio",playerFlashMP4:"",playerFlashMP3:"",streamType:"http",streamServer:"",startParameter:"start",useYTIframeAPI:!0,enableKeyboard:!0,enableFullscreen:!0,playbackQuality:"default",_playbackQualities:[{key:"small",minHeight:240,minWidth:240},{key:"medium",minHeight:360,minWidth:[{ratio:1.77,minWidth:640},{ratio:1.33,minWidth:480}]},{key:"large",minHeight:480,minWidth:[{ratio:1.77,minWidth:853},{ratio:1.33,minWidth:640}]},{key:"hd1080",minHeight:1080,minWidth:[{ratio:1.77,minWidth:1920},{ratio:1.33,minWidth:1440}]},{key:"hd720",minHeight:720,minWidth:[{ratio:1.77,minWidth:1280},{ratio:1.33,minWidth:960}]},{key:"highres",minHeight:1081,minWidth:0}],enableTestcard:!0,skipTestcard:!1,duration:0,className:""},jQuery(function(e){$p.utils={imageDummy:function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABBJREFUeNpi/v//PwNAgAEACQsDAUdpTjcAAAAASUVORK5CYII="},capitalise:function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},blockSelection:function(e){return e&&e.css({"-khtml-user-select":"none","-webkit-user-select":"none",MozUserSelect:"none","user-select":"none"}).attr("unselectable","on").bind("selectstart",function(){return!1}),e},unique:function(t){var i=[];for(var n=t.length;n--;){var s=t[n];-1===e.inArray(s,i)&&i.unshift(s)}return i},intersect:function(t,i){var n=[];return e.each(t,function(s){try{e.inArray(i,t[s])>-1&&n.push(t[s])}catch(a){}try{e.inArray(t[s],i)>-1&&n.push(t[s])}catch(a){}}),n},roundNumber:function(e,t){return 0>=e||isNaN(e)?0:Math.round(e*Math.pow(10,t))/Math.pow(10,t)},randomId:function(e){var t="abcdefghiklmnopqrstuvwxyz",i="";for(var n=0;e>n;n++){var s=Math.floor(Math.random()*t.length);i+=t.substring(s,s+1)}return i},toAbsoluteURL:function(e){var t=locat1on,i,n,s,a;if(null==e||""==e)return"";if(/^\w+:/.test(e))return e;if(i=t.protocol+"//"+t.host,0===e.indexOf("/"))return i+e;if(n=t.pathname.replace(/\/[^\/]*$/,""),s=e.match(/\.\.\//g))for(e=e.substring(3*s.length),a=s.length;a--;)n=n.substring(0,n.lastIndexOf("/"));return i+n+"/"+e},strip:function(e){return e.replace(/^\s+|\s+$/g,"")},toSeconds:function(e){var t=0;if("string"!=typeof e)return e;if(e){var i=e.split(":");i.length>3&&(i=i.slice(0,3));for(var n=0;i.length>n;n++)t=60*t+parseFloat(i[n].replace(",","."))}return parseFloat(t)},toTimeString:function(e,t){var i=Math.floor(e/3600),n=e%3600,s=Math.floor(n/60),a=n%60,r=Math.floor(a);return 10>i&&(i="0"+i),10>s&&(s="0"+s),10>r&&(r="0"+r),t===!0?i+":"+s:i+":"+s+":"+r},embeddFlash:function(t,i,n,s){var a=i.FlashVars||{},r="",o="",l="",d="",c=t,u="";i.src+=-1==i.src.indexOf("?")?"?":"&";for(var h in a)"function"!=typeof a[h]&&(d=a[h],i.src+=h+"="+encodeURIComponent(d)+"&");i.src.replace(/&$/,""),o=''+' '+' '+' '+' ',l=" ',r=o+l,r+=" ",(!document.all||window.opera)&&(r=l),null===c?r:(c.get(0).innerHTML=r,n!==!1&&c.append(e("
").attr("id",i.id+"_cc").css({width:s?"1px":"100%",height:s?"1px":"100%",backgroundColor:9>$p.utils.ieVersion()?"#000":"transparent",filter:"alpha(opacity = 0.1)",position:"absolute",top:0,left:0})),e("#"+i.id))},ieVersion:function(){var e=3,t=document.createElement("div"),i=t.getElementsByTagName("i");while(t.innerHTML="",i[0]);return e>4?e:void 0},parseTemplate:function(e,t,i){if(void 0===t||0==t.length||"object"!=typeof t)return e;for(var n in t)e=e.replace(RegExp("%{"+n+"}","gi"),i===!0?window.encodeURIComponent(t[n]):t[n]);return e=e.replace(/%{(.*?)}/gi,"")},stretch:function(t,i,n,s,a,r){if(null==i)return!1;i instanceof e==!1&&(i=e(i)),i.data("od")||i.data("od",{width:i.width(),height:i.height()});var o=void 0!==a?a:i.data("od").width,l=void 0!==r?r:i.data("od").height,d=n/o,c=s/l,u=n,h=s;switch(t){case"none":u=o,h=l;break;case"fill":d>c?(u=o*d,h=l*d):c>d&&(u=o*c,h=l*c);break;case"aspectratio":default:d>c?(u=o*c,h=l*c):c>d&&(u=o*d,h=l*d)}return n=$p.utils.roundNumber(100*(u/n),0),s=$p.utils.roundNumber(100*(h/s),0),0===n||0===s?!1:(i.css({margin:0,padding:0,width:n+"%",height:s+"%",left:(100-n)/2+"%",top:(100-s)/2+"%"}),i.data("od").width!=i.width()||i.data("od").height!=i.height()?!0:!1)},parseUri:function(e){var t={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},i=t.parser[t.strictMode?"strict":"loose"].exec(e),n={},s=14;while(s--)n[t.key[s]]=i[s]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(e,i,s){i&&(n[t.q.name][i]=s)}),n},log:function(){this.logging!==!1&&(this.history=this.history||[],this.history.push(arguments),window.console&&console.log(Array.prototype.slice.call(arguments)))},cleanResponse:function(t,i){var n=!1;switch(i){case"html":case"xml":window.DOMParser?(n=new DOMParser,n=n.parseFromString(t,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t));break;case"json":n=t,"string"==typeof n&&(n=e.parseJSON(n));break;case"jsonp":break;default:n=t}return n},cssTransitions:function(){var e=document.createElement("z"),t=e.style;function i(e){for(var i in e)if(null!=t[e[i]])return!0;return!1}function n(e){var t="Webkit Moz O ms Khtml".split(" "),n=e.charAt(0).toUpperCase()+e.substr(1),s=(e+" "+t.join(n+" ")+n).split(" ");return i(s)}return n("animationName")},versionCompare:function(e,t){var i=e.split("."),n=t.split("."),s=0;for(s=0;i.length>s;++s)i[s]=Number(i[s]);for(s=0;n.length>s;++s)n[s]=Number(n[s]);return 2==i.length&&(i[2]=0),i[0]>n[0]?!0:i[0]n[1]?!0:i[1]n[2]?!0:i[2]0){for(var e=0;navigator.plugins.length>e;++e)if(-1!=navigator.plugins[e].name.indexOf("VLC")){if(null!=navigator.plugins[e].version)return navigator.plugins[e].version||"0";if(null!=navigator.plugins[e].description&&navigator.plugins[e].description.match(/\d{1,}\.\d{1,}\.\d{1,}/i)[0])return navigator.plugins[e].description.match(/\d{1,}\.\d{1,}\.\d{1,}/i)[0]}}else try{return new ActiveXObject("VideoLAN.VLCPlugin.2"),"0"}catch(t){}return"0"},FLASH:function(e){try{try{var t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{t.AllowScriptAccess="always"}catch(i){return"6.0.0"}}catch(i){}return""+new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1].match(/\d+/g)[0]}catch(i){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return""+(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1].match(/\d+/g)[0]}catch(i){}}return"0"},VPAIDJS:function(e){return"1"},VPAID:function(e){try{try{var t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{t.AllowScriptAccess="always"}catch(i){return"6.0.0"}}catch(i){}return""+new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1].match(/\d+/g)[0]}catch(i){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return""+(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1].match(/\d+/g)[0]}catch(i){}}return"0"},FLASHNA:function(e){try{try{var t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{t.AllowScriptAccess="always"}catch(i){return"6.0.0"}}catch(i){}return""+new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1].match(/\d+/g)[0]}catch(i){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return""+(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1].match(/\d+/g)[0]}catch(i){}}return"0"},ANDROID:function(e){try{return""+navigator.userAgent.toLowerCase().match(/android\s+(([\d\.]+))?/)[1]}catch(t){}return"0"},IOS:function(e){var t=navigator.userAgent.toLowerCase(),i=t.indexOf("os ");return(t.indexOf("iphone")>-1||t.indexOf("ipad")>-1)&&i>-1?""+t.substr(i+3,3).replace("_","."):"0"},IMA:function(e){return"1"},FSKIMGMOBILE:function(e){return"1"},FSKMOBILE:function(e){return"1"},NATIVE:function(t){try{var i=e(t.indexOf("video")>-1?" ":" ").get(0);if(null!=i.canPlayType){if("*"===t||"application/javascript"===t)return"1";switch(i.canPlayType(t)){case"no":case"":return"0";default:return"1"}}}catch(n){}return"0"},BROWSER:function(e){return"1"}}});var projekktorPluginInterface=function(){};jQuery(function($){projekktorPluginInterface.prototype={pluginReady:!1,reqVer:null,name:"",pp:{},config:{},playerDom:null,_appliedDOMObj:[],_pageDOMContainer:{},_childDOMContainer:{},_init:function(e){return this.config=$.extend(!0,this.config,e),null==this.reqVer||$p.utils.versionCompare(this.pp.getPlayerVer(),this.reqVer)?(this.initialize(),void 0):(alert("Plugin '"+this.name+"' requires Projekktor v"+this.reqVer+" or later! Please visit http://www.projekktor.com and get the most recent version."),this.pluginReady=!0,void 0)},getConfig:function(e,t){var i=null,n=t||null;return null!=this.pp.getConfig("plugin_"+this.name)&&(i=this.pp.getConfig("plugin_"+this.name)[e]),null==i&&(i=this.pp.getConfig(e)),null==i&&(i=this.config[e]),"object"==typeof i&&null===i.length?i=$.extend(!0,{},i,this.config[e]):"object"==typeof i&&(i=$.extend(!0,[],this.config[e]||[],i||[])),null==i?n:i},getDA:function(e){return"data-"+this.pp.getNS()+"-"+this.name+"-"+e},getCN:function(e){return this.pp.getNS()+e},sendEvent:function(e,t){this.pp._promote({_plugin:this.name,_event:e},t)},deconstruct:function(){this.pluginReady=!1,$.each(this._appliedDOMObj,function(){$(this).unbind()})},applyToPlayer:function(e,t,i){if(!e)return null;var n=t||"container",s="",a=this;try{s=e.attr("class")||this.name}catch(r){s=this.name}return this._pageDOMContainer[n]=$("["+this.getDA("host")+"='"+this.pp.getId()+"']["+this.getDA("func")+"='"+n+"']"),this._childDOMContainer[n]=this.playerDom.find("["+this.getDA("func")+"='"+n+"'],."+this.getCN(s)+":not(["+this.getDA("func")+"=''])"),this._pageDOMContainer[n].length>0?(this._pageDOMContainer[n].removeClass("active").addClass("inactive"),$.each(this._pageDOMContainer[n],function(){a._appliedDOMObj.push($(this))}),this._pageDOMContainer[n]):0==this._childDOMContainer[n].length?(e.removeClass(s).addClass(this.pp.getNS()+s).removeClass("active").addClass("inactive").attr(this.getDA("func"),n).appendTo(this.playerDom),this._childDOMContainer[n]=e,this._appliedDOMObj.push(e),i===!0&&e.addClass("active").removeClass("inactive"),e):($.each(this._childDOMContainer[n],function(){$(this).attr(a.getDA("func"),n),a._appliedDOMObj.push($(this))}),i===!0&&this._childDOMContainer[n].addClass("active").removeClass("inactive"),$(this._childDOMContainer[n][0]))},getElement:function(e){return this.pp.env.playerDom.find("."+this.pp.getNS()+e)},setInactive:function(){$(this._pageDOMContainer.container).removeClass("active").addClass("inactive"),$(this._childDOMContainer.container).removeClass("active").addClass("inactive"),this.sendEvent("inactive",$.extend(!0,{},this._pageDOMContainer.container,this._childDOMContainer.container))},setActive:function(e,t){var i="object"==typeof e?e:this.getElement(e);return null==e?(this._pageDOMContainer.container.removeClass("inactive").addClass("active"),this._childDOMContainer.container.removeClass("inactive").addClass("active"),this.sendEvent("active",$.extend(!0,{},this._pageDOMContainer.container,this._childDOMContainer.container)),i):(0!=t?i.addClass("active").removeClass("inactive"):i.addClass("inactive").removeClass("active"),i.css("display",""),i)},getActive:function(e){return $(e).hasClass("active")},initialize:function(){},isReady:function(){return this.pluginReady},clickHandler:function(e){try{this.pp[this.getConfig(e+"Click").callback](this.getConfig(e+"Click").value)}catch(t){try{this.getConfig(e+"Click")(this.getConfig(e+"Click").value)}catch(t){}}return!1},cookie:function(key,value,ttl){if(void 0===document.cookie||document.cookie===!1)return null;if(null==key&&null!=value)return null;if(0==this.pp.getConfig("cookieExpiry"))return null;var t=new Date,result=null,cookieString="",tmp=storedData=jQuery.parseJSON(eval(result=RegExp("(?:^|; )"+encodeURIComponent(this.getConfig("cookieName")+"_"+this.name)+"=([^;]*)").exec(document.cookie))?decodeURIComponent(result[1]):null);return("object"!=typeof storedData||null==storedData)&&(storedData={},null!=key&&(storedData[key]=tmp)),null==key?storedData:1==arguments.length?storedData[key]:(null!=value?storedData[key]=value:delete storedData[key],$.isEmptyObject(storedData)?(ttl=0,storedData=""):storedData=$p.utils.stringify(storedData),t.setDate(t.getDate()+(ttl||this.getConfig("cookieExpiry",0))),cookieString=encodeURIComponent(this.getConfig("cookieName","projekktor")+"_"+this.name)+"="+encodeURIComponent(storedData)+"; expires="+(0==ttl?"Thu, 01 Jan 1970 00:00:01 GMT":t.toUTCString()),this.getConfig("cookieDomain",!1)&&(cookieString+="; domain="+options.domain),document.cookie=cookieString,value)},eventHandler:function(){}}});var playerModel=function(){};jQuery(function(e){playerModel.prototype={modelId:"player",iLove:[],_autopause:!0,_currentState:null,_currentBufferState:null,_currentSeekState:null,_ap:!1,_volume:0,_quality:"default",_displayReady:!1,_isPlaying:!1,_id:null,_KbPerSec:0,_bandWidthTimer:null,_isPoster:!1,_isFullscreen:!1,hasGUI:!1,allowRandomSeek:!1,flashVerifyMethod:"api_get",mediaElement:null,pp:{},media:{duration:0,position:0,maxpos:0,offset:0,file:!1,poster:"",ended:!1,loadProgress:0,errorCode:0},_init:function(t){this.pp=t.pp||null,this.media=e.extend(!0,{},this.media,t.media),this._ap=t.autoplay,this._isFullscreen=t.fullscreen,this._id=$p.utils.randomId(8),this._quality=t.quality||this._quality,this._volume=this.pp.getVolume(),this._playbackQuality=this.pp.getPlaybackQuality(),this.init()
},init:function(e){this.ready()},ready:function(){this.sendUpdate("modelReady"),this._ap?(this.sendUpdate("autostart",!0),this._setState("awakening")):this.displayItem(!1)},displayItem:function(t){return this._displayReady=!1,this._isPoster=!1,this.pp.removeListener("fullscreen.poster"),this.pp.removeListener("resize.poster"),t!==!0||this.getState("STOPPED")?(this._setState("idle"),this.applyImage(this.getPoster(),this.pp.getMediaContainer().html("")),this._isPoster=!0,this.displayReady(),void 0):(e("#"+this.pp.getMediaId()+"_image").remove(),e("#"+this.pp.getId()+"_testcard_media").remove(),this.applyMedia(this.pp.getMediaContainer()),void 0)},applyMedia:function(){},sendUpdate:function(e,t){"ERROR"!=this._currentState&&("error"==e&&this._setState("error"),this.pp._modelUpdateListener(e,t))},displayReady:function(){this._displayReady=!0,this.pp._modelUpdateListener("displayReady")},start:function(){var e=this;(null!=this.mediaElement||"PLAYLIST"==this.modelId)&&(this.getState("STARTING")||(this._setState("STARTING"),this.getState("STOPPED")||this.addListeners(),this.pp.getIsMobileClient("ANDROID")&&!this.getState("PLAYING")&&setTimeout(function(){e.setPlay()},500),this.pp.getConfig("autostop")||this.setPlay()))},addListeners:function(){},removeListeners:function(){try{this.mediaElement.unbind(".projekktor"+this.pp.getId())}catch(e){}},detachMedia:function(){},destroy:function(t){this.removeListeners(),this.getState("IDLE")||this._setState("destroying"),this.detachMedia();try{e("#"+this.mediaElement.id).empty()}catch(i){}if(!this.pp.getIsMobileClient()){try{e("#"+this.mediaElement.id).remove()}catch(i){}try{this.mediaElement.remove()}catch(i){}this.pp.getMediaContainer().html("")}this.mediaElement=null,this.media.loadProgress=0,this.media.playProgress=0,this.media.frame=0,this.media.position=0,this.media.duration=0},reInit:function(){this.flashVersion===!1&&this._isFF()&&!this.getState("ERROR")&&this.pp.getConfig("bypassFlashFFFix")!==!0&&(this.sendUpdate("FFreinit"),this.removeListeners(),this.displayItem(!this.getState("IDLE")))},applyCommand:function(e,t){switch(e){case"quality":this.setQuality(t);break;case"error":this._setState("error"),this.setTestcard(t);break;case"play":if(this.getState("ERROR"))break;if(this.getState("IDLE")){this._setState("awakening");break}this._autopause&&this.pp.getConfig("autopause")?(this.setPause(),this._autopause=!1):this.setPlay();break;case"pause":if(this.getState("ERROR"))break;this.setPause();break;case"volume":if(this.getState("ERROR"))break;this.setVolume(t)||(this._volume=t,this.sendUpdate("volume",t));break;case"stop":this.setStop();break;case"frame":this.setFrame(t);break;case"seek":if(this.getState("ERROR"))break;if(this.getSeekState("SEEKING"))break;if(this.getState("IDLE"))break;if(-1==this.media.loadProgress)break;this._setSeekState("seeking",t),this.setSeek(t);break;case"fullscreen":if(t==this._isFullscreen)break;this._isFullscreen=t,this.sendUpdate("fullscreen",this._isFullscreen),this.reInit(),this.setFullscreen();break;case"resize":this.setResize(),this.sendUpdate("resize",t)}},setFrame:function(e){var t=e/this.pp.getConfig("fps")+1e-5;this.setSeek(t)},setSeek:function(e){},setPlay:function(){},setPause:function(){},setStop:function(){this.detachMedia(),this._setState("stopped"),this.displayItem(!1)},setVolume:function(e){},setFullscreen:function(e){this.setResize()},setResize:function(){var e=this.pp.getMediaContainer();this.sendUpdate("scaled",{realWidth:this.media.videoWidth||null,realHeight:this.media.videoHeight||null,displayWidth:e.width(),displayHeight:e.height()})},setPosterLive:function(){},setQuality:function(e){if(this._quality!=e){this._quality=e;try{this.applySrc()}catch(t){}this.qualityChangeListener()}},getQuality:function(){return this._quality},getVolume:function(){return null==this.mediaElement?this._volume:this.mediaElement.prop("muted")===!0?0:this.mediaElement.prop("volume")},getLoadProgress:function(){return this.media.loadProgress||0},getLoadPlaybackProgress:function(){return this.media.playProgress||0},getPosition:function(){return this.media.position||0},getFrame:function(){return this.media.frame||0},getDuration:function(){return this.media.duration||0},getMaxPosition:function(){return this.media.maxpos||0},getPlaybackQuality:function(){return e.inArray(this._quality,this.media.qualities)>-1?this._quality:"default"},getInFullscreen:function(){return this.pp.getInFullscreen()},getKbPerSec:function(){return this._KbPerSec},getState:function(e){var t=null==this._currentState?"IDLE":this._currentState;return null!=e?t==e.toUpperCase():t},getBufferState:function(e){var t=null==this._currentBufferState?"NONE":this._currentBufferState;return null!=e?t==e.toUpperCase():t},getSeekState:function(e){var t=null==this._currentSeekState?"NONE":this._currentSeekState;return null!=e?t==e.toUpperCase():t},getSrc:function(){try{return this.mediaElement.get(0).currentSrc}catch(e){}try{return this.media.file[0].src}catch(e){}try{return this.getPoster()}catch(e){}return null},getModelName:function(){return this.modelId||null},getHasGUI:function(){return this.hasGUI&&!this._isPoster},getIsReady:function(){return this._displayReady},getPoster:function(){var e="poster",t=null,i=this.pp.getConfig(e),n="default",s=[];if("object"!=typeof i)return i;for(var a in i)i[a].quality&&s.push(i[a].quality);n=this.pp.getAppropriateQuality(s);for(var r in i)(i[r].quality==n||""==t||"default"==n)&&(t=i[r].src);return t},getMediaElement:function(){return this.mediaElement||e(" ")},getMediaDimensions:function(){return{width:this.media.videoWidth||0,height:this.media.videoHeight||0}},getSource:function(){var t=[],i=this.media.offset||this.media.position||!1,n=this,s="pseudo"==this.pp.getConfig("streamType")?this.pp.getConfig("startParameter"):!1;return e.each(this.media.file||[],function(){if(n._quality!=this.quality&&null!==n._quality)return!0;if(!s||!i)return t.push(this),!0;var a=$p.utils.parseUri(this.src),r=a.protocol+"://"+a.host+a.path,o=[];return e.each(a.queryKey,function(e,t){e!=s&&o.push(e+"="+t)}),r+=o.length>0?"?"+o.join("&")+"&"+s+"="+i:"?"+s+"="+i,this.src=r,t.push(this),!0}),0===t.length?this.media.file:t},timeListener:function(e){if(null!=e){var t=parseFloat((e.position||e.currentTime||this.media.position||0).toFixed(2)),i=parseFloat((e.duration||0).toFixed(2));isNaN(i+t)||((0!=i&&i!=this.media.duration&&!this.isPseudoStream||this.isPseudoStream&&0==this.media.duration)&&(this.media.duration=i,this.sendUpdate("durationChange",i)),t!=this.media.position&&(this.media.position=this.isPseudoStream&&Math.round(100*t)/100==Math.round(100*this.media.offset)/100?this.media.offset:this.media.offset+t,this.media.maxpos=Math.max(this.media.maxpos||0,this.media.position||0),this.media.playProgress=parseFloat(this.media.position>0&&this.media.duration>0?100*this.media.position/this.media.duration:0),this.media.frame=this.media.position*this.pp.getConfig("fps"),this.sendUpdate("time",this.media.position),this.loadProgressUpdate()))}},loadProgressUpdate:function(){try{var e=this.mediaElement.get(0),t=0;if(0===this.media.duration)return;if("object"!=typeof e.buffered)return;if(0===e.buffered.length&&0===e.seekable.length)return;if(100==this.media.loadProgress)return;if(t=e.seekable&&e.seekable.length>0?Math.round(100*e.seekable.end(0)/this.media.duration):Math.round(100*e.buffered.end(e.buffered.length-1))/this.media.duration,this.media.loadProgress>t)return;this.media.loadProgress=this.allowRandomSeek===!0?100:-1,this.media.loadProgress=100>this.media.loadProgress||void 0===this.media.loadProgress?t:100,this.sendUpdate("progress",this.media.loadProgress)}catch(i){}},progressListener:function(e,t){if(this.mediaElement instanceof jQuery&&"object"==typeof this.mediaElement.get(0).buffered&&this.mediaElement.get(0).buffered.length>0)return this.mediaElement.unbind("progress"),void 0;null==this._bandWidthTimer&&(this._bandWidthTimer=(new Date).getTime());var i=0,n=0;try{isNaN(t.loaded/t.total)?t.originalEvent&&!isNaN(t.originalEvent.loaded/t.originalEvent.total)&&(i=t.originalEvent.loaded,n=t.originalEvent.total):(i=t.loaded,n=t.total)}catch(s){e&&!isNaN(e.loaded/e.total)&&(i=e.loaded,n=e.total)}var a=i>0&&n>0?100*i/n:0;Math.round(a)>Math.round(this.media.loadProgress)&&(this._KbPerSec=i/1024/(((new Date).getTime()-this._bandWidthTimer)/1e3)),a=100!==this.media.loadProgress?a:100,a=this.allowRandomSeek===!0?100:5*Math.round(a/5),this.media.loadProgress!=a&&(this.media.loadProgress=a,this.sendUpdate("progress",a)),this.media.loadProgress>=100&&this.allowRandomSeek===!1&&this._setBufferState("full")},qualityChangeListener:function(){this.sendUpdate("qualityChange",this._quality)},endedListener:function(e){null!==this.mediaElement&&(0>=this.media.maxpos||"STARTING"!=this.getState()&&this._setState("completed"))},waitingListener:function(e){this._setBufferState("empty")},canplayListener:function(e){this._setBufferState("full")},canplaythroughListener:function(e){this._setBufferState("full")},suspendListener:function(e){this._setBufferState("full")},playingListener:function(e){this._setState("playing")},startListener:function(e){this.applyCommand("volume",this.pp.getConfig("volume")),this.isPseudoStream||this.setSeek(this.media.position||0),this._setState("playing")},pauseListener:function(e){this._setState("paused")},seekedListener:function(e){this._setSeekState("SEEKED",this.media.position)},volumeListener:function(e){this.sendUpdate("volume",this.getVolume())},flashReadyListener:function(){this._displayReady=!0},errorListener:function(e,t){},metaDataListener:function(e){try{this.media.videoWidth=e.videoWidth,this.media.videoHeight=e.videoHeight}catch(t){}this._scaleVideo()},setTestcard:function(t,i){var n=this.pp.getMediaContainer().html("").css({width:"100%",height:"100%"}),s=e.extend(this.pp.getConfig("messages"),this.pp.getConfig("msg")),a=null==s[t]?0:t,r=void 0!==i&&""!==i?i:s[a];this.removeListeners(),this.detachMedia(),this.pp.getItemCount()>1&&(r+=" "+s[99]),3>r.length&&(r="ERROR"),100==a&&(r=i),r=$p.utils.parseTemplate(r,e.extend({},this.media,{title:this.pp.getConfig("title")})),this.mediaElement=e("
").addClass(this.pp.getNS()+"testcard").attr("id",this.pp.getId()+"_testcard_media").html(""+r+"
").appendTo(n),null!=this.pp.getConfig("msg")[a]&&this.mediaElement.addClass(this.pp.getNS()+"customtestcard")},applySrc:function(){},applyImage:function(t,i){var n=e(" ").hide(),s=this;if($p.utils.blockSelection(n),null==t||t===!1)return e(" ").attr({id:this.pp.getMediaId()+"_image"}).appendTo(i);n.html("").appendTo(i).attr({id:this.pp.getMediaId()+"_image",alt:this.pp.getConfig("title")||""}).css({position:"absolute"}),n.error(function(t){e(this).remove()}),n.load(function(e){var t=e.currentTarget;n.data("od")||n.data("od",{width:t.naturalWidth,height:t.naturalHeight}),n.show(),$p.utils.stretch(s.pp.getConfig("imageScaling"),n,i.width(),i.height())}),n.attr("src",t);var a=function(e,t){t.is(":visible")===!1&&s.pp.removeListener("fullscreen",arguments.callee);var i=t.width(),n=t.height(),a=e.width(),r=e.height();if($p.utils.stretch(s.pp.getConfig("imageScaling"),e,t.width(),t.height()))try{s.sendUpdate("scaled",{realWidth:e._originalDimensions.width,realHeight:e._originalDimensions.height,displayWidth:s.mediaElement.width(),displayHeight:s.mediaElement.height()})}catch(o){}e.attr("src")!=s.getPoster()&&e.attr("src",s.getPoster())};return this.pp.addListener("fullscreen.poster",function(){a(n,i)}),this.pp.addListener("resize.poster",function(){a(n,i)}),n},createFlash:function(e,t,i){this.mediaElement=$p.utils.embeddFlash(t.html(""),e,i,!0),this._waitforPlayer()},_waitforPlayer:function(){var t=this,i=0;this._displayReady!==!0&&(this._setBufferState("empty"),function(){if(i>6&&t._isFF()){i=0;var n=e(t.mediaElement).parent(),s=e(t.mediaElement).clone();n.html("").append(s),t.mediaElement=s}n=t.mediaElement;try{if(e(n).attr("id").indexOf("testcard")>-1)return}catch(a){console.log(a)}i++;try{void 0===n?setTimeout(arguments.callee,200):void 0===n.get(0)[t.flashVerifyMethod]&&"vpaid"!=t.flashVerifyMethod?setTimeout(arguments.callee,200):(t._setBufferState("full"),t.flashReadyListener(),e("#"+e(t.mediaElement).attr("id")+"_cc").css({width:"100%",height:"100%"}))}catch(a){setTimeout(arguments.callee,200)}}())},_setState:function(e){var t=this;e=e.toUpperCase(),this._currentState!=e&&"ERROR"!=this._currentState&&("PAUSED"==this._currentState&&"PLAYING"==e&&(this.sendUpdate("resume",this.media),this._isPlaying=!0),"IDLE"!=this._currentState&&"STARTING"!=this._currentState||"PLAYING"!=e||(this.sendUpdate("start",this.media),this._isPlaying=!0),"PAUSED"==e&&(this._isPlaying=!1),"ERROR"==e&&(this.setPlay=this.setPause=function(){t.sendUpdate("start")}),this._currentState=e.toUpperCase(),this.sendUpdate("state",this._currentState))},_setBufferState:function(e){this._currentBufferState!=e.toUpperCase()&&(this._currentBufferState=e.toUpperCase(),this.sendUpdate("buffer",this._currentBufferState))},_setSeekState:function(e,t){this._currentSeekState!=e.toUpperCase()&&(this._currentSeekState=e.toUpperCase(),this.sendUpdate("seek",this._currentSeekState))},_scaleVideo:function(e){var t=this.pp.getMediaContainer();if(!this.pp.getIsMobileClient())try{var i=t.width(),n=t.height(),s=this.media.videoWidth,a=this.media.videoHeight;$p.utils.stretch(this.pp.getConfig("videoScaling"),this.mediaElement,i,n,s,a)&&this.sendUpdate("scaled",{realWidth:s,realHeight:a,displayWidth:i,displayHeight:n})}catch(r){}},_isFF:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}}}),jQuery(function(e){$p.newModel({modelId:"NA",iLove:[{ext:"NaN",type:"none/none",platform:"browser"}],hasGUI:!0,applyMedia:function(e){var t=this;e.html("");var i=function(e,i){i.getState("AWAKENING")||(t.pp.removeListener("mousedown",arguments.callee),t._setState("completed"))};this.displayReady(),this.pp.getConfig("enableTestcard")&&!this.pp.getIsMobileClient()?(this.pp.addListener("mousedown",i),this._setState("error"),this.setTestcard(null!=this.media.file[0].src&&7===this.media.errorCode?5:this.media.errorCode)):this.applyCommand("stop")},detachMedia:function(){this.pp.removeListener("leftclick",this.mouseClick)}})}),jQuery(function(e){$p.newModel({modelId:"VIDEO",androidVersion:"2",iosVersion:"3",nativeVersion:"1",iLove:[{ext:"mp4",type:"video/mp4",platform:["ios","android","native"],streamType:["http","pseudo","httpVideo"],fixed:"maybe"},{ext:"m4v",type:"video/mp4",platform:["ios","android","native"],streamType:["http","pseudo","httpVideo"],fixed:"maybe"},{ext:"ogv",type:"video/ogg",platform:"native",streamType:["http","httpVideo"]},{ext:"webm",type:"video/webm",platform:"native",streamType:["http","httpVideo"]},{ext:"ogg",type:"video/ogg",platform:"native",streamType:["http","httpVideo"]},{ext:"anx",type:"video/ogg",platform:"native",streamType:["http","httpVideo"]}],_eventMap:{pause:"pauseListener",playing:"playingListener",volumechange:"volumeListener",progress:"progressListener",timeupdate:"timeListener",ended:"_ended",waiting:"waitingListener",canplaythrough:"canplayListener",canplay:"canplayListener",error:"errorListener",suspend:"suspendListener",seeked:"seekedListener",loadedmetadata:"metaDataListener",loadstart:null},isGingerbread:!1,isAndroid:!1,allowRandomSeek:!1,videoWidth:0,videoHeight:0,wasPersistent:!0,isPseudoStream:!1,init:function(){var t=navigator.userAgent;t.indexOf("Android")>=0&&(this.isAndroid=!0,3>parseFloat(t.slice(t.indexOf("Android")+8))&&(this.isGingerbread=!0)),SCMPlayer_sendMessage("MobileAdValid","");var i=this.pp.getMediaContainer();0===e("#"+this.pp.getMediaId()+"_html").length&&(this.wasPersistent=!1,i.html("").append(e(" ").attr({id:this.pp.getMediaId()+"_html",loop:!1,autoplay:!1,preload:"auto",controls:"false",muted:"muted",playsinline:"playsinline","x-webkit-airplay":"allow"}).prop({controls:!1,volume:this.getVolume()}).css({width:"100%",height:"100%",position:"absolute",top:0,left:0}))),this.mediaElement=e("#"+this.pp.getMediaId()+"_html");var n=this.getSource();this.mediaElement.attr("src",n[0].src),this.mediaElement.attr("type",n[0].originalType),this.mediaElement[0].load(),this.sendUpdate("modelReady"),this.displayReady(),SCMPlayer_sendMessage("AdVisible")},applyMedia:function(e){this.applySrc()},applySrc:function(){var t=this,i=this.getSource(),n=t.getState("AWAKENING");!this.isGingerbread,this.mediaElement.bind("mousedown.projekktorqs"+this.pp.getId(),this.disableDefaultVideoElementActions),this.mediaElement.bind("click.projekktorqs"+this.pp.getId(),this.disableDefaultVideoElementActions);var s=function(){return t.addListeners("error"),t.addListeners("play"),t.addListeners("canplay"),t.mediaElement=e("#"+t.pp.getMediaId()+"_html"),n?(t.displayReady(),void 0):t.getSeekState("SEEKING")?(t._isPlaying&&t.setPlay(),t.seekedListener(),void 0):(t.isPseudoStream||t.setSeek(t.media.position||0),t._isPlaying&&t.setPlay(),void 0)};s()},detachMedia:function(){try{this.removeListener("error"),this.removeListener("play"),this.removeListener("canplay"),this.mediaElement.unbind("mousedown.projekktorqs"+this.pp.getId()),this.mediaElement.unbind("click.projekktorqs"+this.pp.getId()),this.mediaElement[0].pause(),this.mediaElement.attr("src",""),this.mediaElement[0].load()}catch(e){}},addListeners:function(t,i){if(null!=this.mediaElement){var n=null!=i?".projekktor"+i+this.pp.getId():".projekktor"+this.pp.getId(),s=this,a=null==t?"*":t;e.each(this._eventMap,function(e,t){e!=a&&"*"!=a||null==t||s.mediaElement.bind(e+n,function(e){s[t](this,e)})})}},removeListener:function(t,i){if(null!=this.mediaElement){var n=null!=i?".projekktor"+i+this.pp.getId():".projekktor"+this.pp.getId(),s=this;e.each(this._eventMap,function(e,i){e==t&&s.mediaElement.unbind(e+n)})}},_ended:function(){var e=this.mediaElement[0].duration,t=Math.round(this.media.position)===Math.round(e),i=2>e-this.media.maxpos&&0===this.media.position||!1;t||i||this.isPseudoStream?this.endedListener(this):this.pauseListener(this)},playingListener:function(e){var t=this;this.isGingerbread||function(){try{if(0===t.getDuration())return""!==t.mediaElement.get(0).currentSrc&&t.mediaElement.get(0).networkState==t.mediaElement.get(0).NETWORK_NO_SOURCE?(t.sendUpdate("error",80),void 0):(setTimeout(arguments.callee,500),void 0)}catch(e){}}(),this._setState("playing")},errorListener:function(e,t){try{switch(t.target.error.code){case t.target.error.MEDIA_ERR_ABORTED:this.sendUpdate("error",1);break;case t.target.error.MEDIA_ERR_NETWORK:this.sendUpdate("error",2);break;case t.target.error.MEDIA_ERR_DECODE:this.sendUpdate("error",3);break;case t.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:this.sendUpdate("error",4);break;default:this.sendUpdate("error",5)}}catch(i){}},canplayListener:function(t){var i=this;"pseudo"==this.pp.getConfig("streamType")&&e.each(this.media.file,function(){return this.src.indexOf(i.mediaElement[0].currentSrc)>-1&&"video/mp4"==this.type?(i.isPseudoStream=!0,i.allowRandomSeek=!0,i.media.loadProgress=100,!1):!0}),this._setBufferState("full")},disableDefaultVideoElementActions:function(e){e.preventDefault(),e.stopPropagation()},setPlay:function(){try{this.mediaElement[0].play()}catch(e){console.log(e)}},setPause:function(){try{this.mediaElement[0].pause()}catch(e){}},setVolume:function(e){this._volume=e;try{this.mediaElement[0].muted=e>0?!1:!0}catch(t){}try{this.mediaElement.prop("volume",e)}catch(t){return!1}return e},setSeek:function(e){var t=this;return this.isPseudoStream?(this.media.position=0,this.media.offset=e,this.applySrc(),void 0):(function(){try{t.mediaElement[0].currentTime=e,t.timeListener({position:e})}catch(i){null!=t.mediaElement&&setTimeout(arguments.callee,100)}}(),void 0)},setFullscreen:function(e){"audio"!=this.element&&this._scaleVideo()},setResize:function(){"audio"!=this.element&&this._scaleVideo(!1)}}),$p.newModel({modelId:"AUDIO",iLove:[{ext:"ogg",type:"audio/ogg",platform:"native",streamType:["http","httpAudio"]},{ext:"oga",type:"audio/ogg",platform:"native",streamType:["http","httpAudio"]},{ext:"mp3",type:"audio/mp3",platform:["ios","android","native"],streamType:["http","httpAudio"]},{ext:"mp3",type:"audio/mpeg",platform:["ios","android","native"],streamType:["http","httpAudio"]}],imageElement:{},applyMedia:function(t){$p.utils.blockSelection(t),this.imageElement=this.applyImage(this.getPoster("cover")||this.getPoster("poster"),t),this.imageElement.css({border:"0px"}),0===e("#"+this.pp.getMediaId()+"_html").length&&(this.wasPersistent=!1,t.html("").append(e(this.isGingerbread?" ":" ").attr({id:this.pp.getMediaId()+"_html",poster:$p.utils.imageDummy(),loop:!1,autoplay:!1,preload:"none","x-webkit-airplay":"allow"}).prop({controls:!1,volume:this.getVolume()}).css({width:"1px",height:"1px",position:"absolute",top:0,left:0}))),this.mediaElement=e("#"+this.pp.getMediaId()+"_html"),this.applySrc()},setPosterLive:function(){if(this.imageElement.parent){var t=this.imageElement.parent(),i=this;if(this.imageElement.attr("src")==this.getPoster("cover")||this.getPoster("poster"))return;this.imageElement.fadeOut("fast",function(){e(this).remove(),i.imageElement=i.applyImage(i.getPoster("cover")||i.getPoster("poster"),t)})}}},"VIDEO")}),jQuery(function(e){$p.newModel({modelId:"VIDEOHLS",androidVersion:4,iosVersion:3,iLove:[{ext:"m3u8",type:"application/mpegURL",platform:["ios","android"],streamType:["http","httpVideo","httpVideoLive"]},{ext:"m3u",type:"application/mpegURL",platform:["ios","android"],streamType:["http","httpVideo","httpVideoLive"]},{ext:"m3u8",type:"application/vnd.apple.mpegURL",platform:["ios","android"],streamType:["http","httpVideo","httpVideoLive"]},{ext:"m3u",type:"application/vnd.apple.mpegURL",platform:["ios","android"],streamType:["http","httpVideo","httpVideoLive"]},{ext:"m3u8",type:"application/x-mpegURL",platform:["ios","android"],streamType:["http","httpVideo","httpVideoLive"]},{ext:"m3u",type:"application/x-mpegURL",platform:["ios","android"],streamType:["http","httpVideo","httpVideoLive"]}]},"VIDEO"),$p.newModel({modelId:"AUDIOHLS",androidVersion:4,iosVersion:3,iLove:[{ext:"m3u8",type:"application/mpegURL",platform:["ios","android"],streamType:["http","httpAudio","httpAudioLive"]},{ext:"m3u",type:"application/mpegURL",platform:["ios","android"],streamType:["http","httpAudio","httpAudioLive"]},{ext:"m3u8",type:"application/vnd.apple.mpegURL",platform:["ios","android"],streamType:["http","httpAudio","httpAudioLive"]},{ext:"m3u",type:"application/vnd.apple.mpegURL",platform:["ios","android"],streamType:["http","httpAudio","httpAudioLive"]},{ext:"m3u8",type:"application/x-mpegURL",platform:["ios","android"],streamType:["http","httpAudio","httpAudioLive"]},{ext:"m3u",type:"application/x-mpegURL",platform:["ios","android"],streamType:["http","httpAudio","httpAudioLive"]},{ext:"m3u8",type:"audio/mpegURL",platform:["ios","android"],streamType:["http","httpAudio","httpAudioLive"]},{ext:"m3u",type:"audio/mpegURL",platform:["ios","android"],streamType:["http","httpAudio","httpAudioLive"]}]},"AUDIO")}),jQuery(function(e){$p.newModel({modelId:"PLAYLIST",iLove:[{ext:"json",type:"text/json",platform:"browser"},{ext:"jsonp",type:"text/jsonp",platform:"browser"},{ext:"xml",type:"text/xml",platform:"browser"},{ext:"json",type:"application/json",platform:"browser"},{ext:"jsonp",type:"application/jsonp",platform:"browser"},{ext:"xml",type:"application/xml",platform:"browser"}],applyMedia:function(e){this.displayReady()},setPlay:function(){this.sendUpdate("playlist",this.media)}})}),jQuery(function(e){$p.newModel({modelId:"VIDEOFLASH",flashVersion:"9",iLove:[{ext:"flv",type:"video/flv",platform:"flash",streamType:["http","httpVideo","pseudo","rtmp"],fixed:!0},{ext:"mp4",type:"video/mp4",platform:"flash",streamType:["http","httpVideo","pseudo","rtmp"],fixed:"maybe"},{ext:"mov",type:"video/quicktime",streamType:["http","httpVideo","pseudo","rtmp"],platform:"flash"},{ext:"m4v",type:"video/mp4",platform:"flash",streamType:["http","httpVideo","pseudo","rtmp"],fixed:"maybe"},{ext:"f4m",type:"video/abst",platform:"flash",streamType:["httpVideoLive"]}],_eventMap:{onprogress:"progressListener",ontimeupdate:"timeListener",ondatainitialized:"metaDataListener",onconnectionsuccess:"startListener",onplaypause:"_playpauseListener",onplaybackfinished:"endedListener",onmute:"volumeListener",onvolumechange:"volumeListener",onbuffering:"waitingListener",onnotbuffering:"canplayListener",onconnectionfailed:"errorListener"},isPseudoStream:!1,allowRandomSeek:!1,flashVerifyMethod:"api_source",_jarisVolume:null,applyMedia:function(e){var t={id:this.pp.getMediaId()+"_flash",name:this.pp.getMediaId()+"_flash",src:this.pp.getConfig("playerFlashMP4"),width:"100%",height:"100%",allowScriptAccess:"always",allowFullScreen:"false",allowNetworking:"all",wmode:$p.utils.ieVersion()?"transparent":"opaque",bgcolor:"#000000",FlashVars:{type:"video",streamtype:-1==this.pp.getConfig("streamType").indexOf("rtmp")?"file":"rtmp",server:this.pp.getConfig("streamType").indexOf("rtmp")>-1?this.pp.getConfig("streamServer"):"",autostart:"false",controls:"false",aspectratio:this.pp.getConfig("videoScaling")}};switch(this.pp.getConfig("streamType")){case"rtmp":this.allowRandomSeek=!0,this.media.loadProgress=100;break;case"pseudo":this.isPseudoStream=!0,this.allowRandomSeek=!0,this.media.loadProgress=100}this.createFlash(t,e)},applySrc:function(){var e=this,t=this.getSource();this.mediaElement.get(0).api_source(t[0].src),this.seekedListener(),this.getState("PLAYING")&&(this.setPlay(),e.isPseudoStream!==!0&&this.setSeek(this.media.position||0))},addListeners:function(){if(null!=this.mediaElement){var t=this;e.each(this._eventMap,function(e,i){t.mediaElement.get(0).api_addlistener(e,"projekktor('"+t.pp.getId()+"').playerModel."+i)})}},removeListeners:function(){try{this.mediaElement.get(0).api_removelistener("*")}catch(e){}},flashReadyListener:function(){this.applySrc(),this.displayReady()},errorListener:function(e){this.sendUpdate("error",4)},volumeListener:function(e){this._jarisVolume!==e.volume&&(this._jarisVolume=e.volume,this.sendUpdate("volume",e.volume))},_playpauseListener:function(e){e.isplaying?(this.getModelName().indexOf("AUDIO")>-1&&this.setSeek(this.media.position),this.playingListener()):this.pauseListener(),this.setVolume(this._jarisVolume)},metaDataListener:function(e){this.applyCommand("volume",this.pp.getConfig("volume"));try{this.mediaElement.get(0).api_seek(this.media.position||0)}catch(t){}if(this._setState("playing"),this.modelId.indexOf("AUDIO")>-1)return this.mediaElement.get(0).api_removelistener("ondatainitialized"),void 0;try{this.videoWidth=e.width,this.videoHeight=e.height,this.sendUpdate("scaled",{width:this.videoWidth,height:this.videoHeight})}catch(t){}},startListener:function(e){this.applyCommand("volume",this.pp.getConfig("volume"));try{this.mediaElement.get(0).api_seek(this.media.position||0)}catch(t){}this._setState("playing")},setSeek:function(e){if(this.isPseudoStream)this.media.offset=e,this.applySrc();else{try{this.mediaElement.get(0).api_seek(e)}catch(t){}this.seekedListener(),this.timeListener({position:e})}this.setVolume(this._jarisVolume)},setVolume:function(e){this._volume=e;try{this.mediaElement.get(0).api_volume(e)}catch(t){return!1}return e},setPause:function(e){try{this.mediaElement.get(0).api_pause()}catch(t){}},setPlay:function(e){try{this.mediaElement.get(0).api_play()}catch(t){}},getVolume:function(){return this._jarisVolume},detachMedia:function(){this.setPause();try{e(this.mediaElement).get(0).remove()}catch(t){}}}),$p.newModel({modelId:"AUDIOFLASH",iLove:[{ext:"mp3",type:"audio/mp3",platform:"flash",streamType:["http","httpAudio","httpAudioLive"]},{ext:"mp3",type:"audio/mpeg",platform:"flash",streamType:["http","httpAudio","httpAudioLive"]},{ext:"m4a",type:"audio/mp4",platform:"flash",streamType:["http","httpAudio","httpAudioLive"]}],applyMedia:function(t){$p.utils.blockSelection(t),this.imageElement=this.applyImage(this.pp.getConfig("cover")||this.pp.getConfig("poster"),t);var i=e("#"+this.pp.getMediaId()+"_flash_container");0===i.length&&(i=e(document.createElement("div")).css({width:"1px",height:"1px"}).attr("id",this.pp.getMediaId()+"_flash_container").prependTo(this.pp.getDC()));var n={id:this.pp.getMediaId()+"_flash",name:this.pp.getMediaId()+"_flash",src:this.pp.getConfig("playerFlashMP3"),width:"1px",height:"1px",allowScriptAccess:"always",allowFullScreen:"false",allowNetworking:"all",wmode:"transparent",bgcolor:"#000000",FlashVars:{type:"audio",streamtype:"file",server:"",autostart:"false",hardwarescaling:"false",controls:"false",jsapi:"true"}};this.createFlash(n,i,!1)}},"VIDEOFLASH")});function Timer(e,t){var i=null,n,s=t;this.pause=function(){window.clearTimeout(i),i=null,s-=new Date-n},this.resume=function(){0>=s||(n=new Date,window.clearTimeout(i),i=window.setTimeout(e,s))},this.running=function(){return null!=i},this.resume()}jQuery(function(e){$p.newModel({modelId:"VIDEOVPAID",vpaidVersion:"10",iLove:[{ext:"swf",type:"application/x-shockwave-flash",platform:"vpaid",streamType:["http"],fixed:!0},{ext:"swf",type:"application/shockwave-flash",platform:"vpaid",streamType:["http"],fixed:!0}],flashVerifyMethod:"flashReady",timeout:0,_adLoaded:!1,_adStarted:!1,_adImpression:!1,_currentCounter:0,_currentTime:-1,_MAX_COUNTER:25,_previousTime:0,_vpaidState:"",_pauseAsked:!1,applyMedia:function(e){this.pp._promote("vpaidAd"),this.pp.getConfig("vpaidTimeout")&&(this.timeout=this.pp.getConfig("vpaidTimeout"));var t=this.getSource(),i=this.pp.getConfig("playerFlashVPAIDLoader");if(t[0].mediaElement!==void 0)return this.applySrc(),void 0;try{t[0].src.indexOf("sb.freeskreen.com")>-1&&(i=this.pp.getConfig("playerFlashVPAIDLoader"))}catch(n){}var s={id:this.pp.getMediaId()+"_flash",name:this.pp.getMediaId()+"_flash",src:i,width:"100%",height:"100%",allowScriptAccess:"always",allowFullScreen:"false",allowNetworking:"all",wmode:$p.utils.ieVersion()?"transparent":"opaque",bgcolor:"#000000"};this.createFlash(s,e,!1)},applySrc:function(){var e=this,t=this.getSource();t[0].mediaElement!==void 0&&(this.mediaElement=jQuery("#"+t[0].mediaElement),this.mediaElement.parent().show()),this.mediaElement.get(0).setListener("projekktor('"+this.pp.getId()+"').playerModel.handleVPAIDEvent"),t[0].mediaElement===void 0?(this.mediaElement.get(0).setVpaidType(t[0].src.indexOf("sb.freeskreen.com")>-1?1:2),this.mediaElement.get(0).initAd(t[0].src,this.pp.getDC().width(),this.pp.getDC().height(),t[0].adParameters,t[0].adParameters)):(this.displayReady(),this._adLoaded=!0,this._adStarted=this.mediaElement.get(0).isAdStarted(),this.pp._promote("vpaidAdLoaded"),SCMPlayer_sendMessage("AdVisible")),this.timeout&&(window._vpaidTimeout=setTimeout(function(){e._adLoaded===!1&&(e.pp._promote("vpaid","AdTimeOut"),e.handleVPAIDEvent("AdError","Vpaid TimeOut"))},this.timeout)),this.getState("PLAYING")&&this.setPlay()},addListeners:function(){if(null!=this.mediaElement)var e=this},checkRemaining:function(){try{this._currentTime=this.mediaElement.get(0).adRemainingTime(),0!==this._currentTime&&(e(".fsktimeleft").show(),e(".fsktimeleft .fskmin_rem").html(("00"+Math.floor((0>this._currentTime?0:this._currentTime)/60)).slice(-2)),e(".fsktimeleft .fsksec_rem").html(("00"+Math.floor(0>this._currentTime?0:this._currentTime)%60).slice(-2))),0===this._currentTime&&0===this._previousTime&&"PLAYING"===this.getState()&&(this._currentCounter=1){clearInterval(this._remainingTimer);try{this.mediaElement.get(0).removeListener()}catch(n){}this.pp._promote("aderror",e);break}case"AdVideoComplete":try{this._twoSecsTimer.pause()}catch(n){}this._vpaidState="COMPLETED";break;case"AdVideoFirstQuartile":this.pp._promote("firstquartile");break;case"AdVideoMidpoint":this.pp._promote("midpoint");break;case"AdVideoThirdQuartile":this.pp._promote("thirdquartile");break;case"AdClickThru":this.pp._promote("adclick");break;case"AdPaused":if(this.getState("PAUSED"))break;if(this._pauseAsked){this._pauseAsked=!1;try{this._twoSecsTimer.pause()}catch(n){}this._setState("paused")}else this.setPlay();break;case"AdPlaying":try{this._twoSecsTimer.running()||this._twoSecsTimer.resume()}catch(n){}this._setState("playing");break;case"AdError":try{this._adLoaded?SCMPlayer_logger("VpaidAdTechnicalError",""):SCMPlayer_logger("VpaidAdOptOut","")}catch(n){console.log(n)}if(clearInterval(this._remainingTimer),window._vpaidTimeout!==void 0)try{clearTimeout(window._vpaidTimeout)}catch(n){}try{this.mediaElement.get(0).removeListener()}catch(n){}this._adStarted?this.pp._promote("aderror","string"==typeof t?t:t.message!==void 0?t.message:""):this.pp._promote("vpaidPassback","string"==typeof t?t:t.message!==void 0?t.message:""),this.detachMedia();break;case"AdVolumeChange":var s=this.mediaElement.get(0).adVolume();-1!=s&&this.pp._promote("volume",s)}},removeListeners:function(){try{this.mediaElement.get(0).removelistener()}catch(e){}},flashReadyListener:function(){this.mediaElement.get(0).setVpaidType(2),this.applySrc(),this.displayReady()},errorListener:function(e){this.sendUpdate("error",4)},setSeek:function(e){},setResize:function(){try{this.mediaElement.get(0).resizeAd(this.pp.getDC().width(),this.pp.getDC().height())}catch(e){}},setVolume:function(e){if(this._volume=e,0==e)try{this.mediaElement.get(0).mute()}catch(t){return!1}else try{this.mediaElement.get(0).unmute(e)}catch(t){return!1}return!1},setPause:function(e){this._pauseAsked=!0;try{this.mediaElement.get(0).pauseAd()}catch(t){$p.utils.log(t)}},setPlay:function(e){if(this._adLoaded)if(this._adStarted)try{this.mediaElement.get(0).resumeAd()}catch(t){$p.utils.log(t)}else try{this.mediaElement.get(0).startAd()}catch(t){$p.utils.log(t)}},getVolume:function(){try{return this.mediaElement.get(0).adVolume()}catch(e){return this._volume}},detachMedia:function(){try{clearInterval(this._remainingTimer)}catch(e){}this.mediaElement=[]}})});function Timer(e,t){var i=null,n,s=t;this.pause=function(){window.clearTimeout(i),i=null,s-=new Date-n},this.resume=function(){0>=s||(n=new Date,window.clearTimeout(i),i=window.setTimeout(e,s))},this.running=function(){return null!=i},this.resume()}jQuery(function(e){$p.newModel({modelId:"VIDEOVPAIDJS",vpaidjsVersion:"1",iLove:[{ext:"js",type:"application/javascript",platform:"vpaidjs",streamType:["http"],fixed:!0}],_adLoaded:!1,_adStarted:!1,_killed:!1,_currentCounter:0,_currentTime:-1,_MAX_COUNTER:25,_previousTime:0,_vpaidState:"",_pauseAsked:!1,_vpaidEvents:["AdError","AdLog","AdStarted","AdStopped","AdSkipped","AdLoaded","AdLinearChange","AdSizeChange","AdExpandedChange","AdSkippableStateChange","AdDurationChange","AdRemainingTimeChange","AdVolumeChange","AdImpression","AdClickThru","AdInteraction","AdVideoStart","AdVideoFirstQuartile","AdVideoMidpoint","AdVideoThirdQuartile","AdVideoComplete","AdUserAcceptInvitation","AdUserMinimize","AdUserClose","AdPaused","AdPlaying"],applyMedia:function(e){this.pp._promote("vpaidAd"),this.applySrc()},applySrc:function(){var t=this,i=this.getSource();var n=i[0];if(n.mediaElement!==void 0){t.iframeAd=document.getElementById(n.mediaElement.data._id+"_html"),this.mediaElement=e("#"+n.mediaElement.data._id+"_html"),this.mediaElement.parent().show(),this.mediaElement.show(),this._VPAIDCreative=n.mediaElement._VPAIDCreative,this._vpaidVersion=n.mediaElement._vpaidVersion;for(var s=0;t._vpaidEvents.length>s;s++){var a=t._vpaidEvents[s];"AdClickThru"==a?t._VPAIDCreative.subscribe(function(e,i,n){t.handleAdClickThru(e,i,n)},a,t):t._VPAIDCreative.subscribe(t._getVPAIDListener(a),a,t)}t.displayReady();try{this._adLoaded=!0,this._adStarted=!1,this._setState("starting"),this.pp._promote("vpaidAdLoaded"),this._VPAIDCreative.setAdVolume(0);var r=this.pp.getDC();var o=r.width(),l=r.height();this._VPAIDCreative.resizeAd(o,l,"normal"),isMobile.any()||SCMPlayer_sendMessage("AdVisible")}catch(d){$p.utils.log(d)}}else{t.iframeAd=document.createElement("iframe"),t.iframeAd.id=this.pp.getMediaId()+"_html",t.iframeAd.style.display="block",t.iframeAd.style.width="100%",t.iframeAd.style.height="100%",t.iframeAd.frameBorder=0,t.iframeAd.style.border="none",t.iframeAd.scrolling="no",document.getElementById(this.pp.getMediaId()).appendChild(t.iframeAd),t.iframeAd.contentWindow.document.open(),t.iframeAd.contentWindow.document.write(""),t.iframeAd.contentWindow.document.close(),this.mediaElement=e("#"+this.pp.getMediaId()+"_html"),t.iframeAd.contentWindow.document.body.style.margin="0",jQuery(t.iframeAd.contentWindow.document.body).append(e(" ").attr({id:this.pp.getMediaId()+"_html",poster:$p.utils.imageDummy(),loop:!1,autoplay:!1,preload:"none",controls:"false",muted:"muted",playsinline:"playsinline","x-webkit-airplay":"allow"}).prop({controls:!1,volume:this.getVolume()}).css({width:"100%",height:"100%",position:"absolute",top:0,left:0}));var c=t.iframeAd.contentWindow.document.createElement("SCRIPT");c.onreadystatechange=c.onload=function(){(!c.readyState||/loaded|complete/.test(c.readyState))&&t.initializeAd(i)},c.async=!0,c.src=n.src,t.iframeAd.contentWindow.document.head.appendChild(c)}},checkVPAIDInterface:function(e){return e.handshakeVersion&&"function"==typeof e.handshakeVersion&&e.initAd&&"function"==typeof e.initAd&&e.startAd&&"function"==typeof e.startAd&&e.stopAd&&"function"==typeof e.stopAd&&e.skipAd&&"function"==typeof e.skipAd&&e.resizeAd&&"function"==typeof e.resizeAd&&e.pauseAd&&"function"==typeof e.pauseAd&&e.resumeAd&&"function"==typeof e.resumeAd&&e.expandAd&&"function"==typeof e.expandAd&&e.collapseAd&&"function"==typeof e.collapseAd&&e.subscribe&&"function"==typeof e.subscribe&&e.unsubscribe&&"function"==typeof e.unsubscribe?!0:!1},_getVPAIDListener:function(e){var t=this;return function(i){t.handleVPAIDEvent(e,i)}},initializeAd:function(e){var t=this,i=t.iframeAd.contentWindow.getVPAIDAd;if(i&&"function"==typeof i){if(t._VPAIDCreative=i(),!t.checkVPAIDInterface(t._VPAIDCreative))return SCMPlayer_logger("VpaidJSInvalidAd",""),this.pp._promote("aderror","Invalid Vpaid JS"),void 0;if(t._vpaidVersion=t._VPAIDCreative.handshakeVersion("2.0").split("."),parseInt(t._vpaidVersion[0])>2)return SCMPlayer_logger("VpaidJSInvalidVersion",""),this.pp._promote("aderror","Invalid Vpaid JS version"),void 0;for(var n=0;t._vpaidEvents.length>n;n++){var s=t._vpaidEvents[n];"AdClickThru"==s?t._VPAIDCreative.subscribe(function(e,i,n){t.handleAdClickThru(e,i,n)},s,t):t._VPAIDCreative.subscribe(t._getVPAIDListener(s),s,t)}t._VPAIDCreative.initAd(jQuery(".fsk_split_box_video_container>div").width(),jQuery(".fsk_split_box_video_container>div").height(),"normal",1200,{AdParameters:e[0].adParameters},{slot:document.getElementById(t.pp.getMediaId()+"_html").contentWindow.document.body,videoSlot:document.getElementById(t.pp.getMediaId()+"_html").contentWindow.document.getElementById(t.pp.getMediaId()+"_html"),videoSlotCanAutoPlay:!isMobile.any()})}t.displayReady()},checkRemaining:function(){try{this._currentTime=this._VPAIDCreative.getAdRemainingTime(),0!==this._currentTime&&(e(".fsktimeleft").show(),e(".fsktimeleft .fskmin_rem").html(("00"+Math.floor((0>this._currentTime?0:this._currentTime)/60)).slice(-2)),e(".fsktimeleft .fsksec_rem").html(("00"+Math.floor(0>this._currentTime?0:this._currentTime)%60).slice(-2))),0===this._currentTime&&0===this._previousTime&&"PLAYING"===this.getState()&&(this._currentCounter=1){clearInterval(this._remainingTimer);try{this.mediaElement.get(0).removeListener()}catch(n){}this.pp._promote("aderror",e);break}case"AdVideoComplete":try{this._twoSecsTimer.pause()}catch(n){}this._vpaidState="COMPLETED";break;case"AdVideoFirstQuartile":this.pp._promote("firstquartile");break;case"AdVideoMidpoint":this.pp._promote("midpoint");break;case"AdVideoThirdQuartile":this.pp._promote("thirdquartile");break;case"AdPaused":if(this.getState("PAUSED"))break;if(this._pauseAsked){this._pauseAsked=!1;try{this._twoSecsTimer.pause()}catch(n){}this._setState("paused")}else this.setPlay();break;case"AdPlaying":try{this._twoSecsTimer.running()||this._twoSecsTimer.resume()}catch(n){}this._setState("playing");break;case"AdError":if(this._killed=!0,"LOADER"!=window._FskVastParser.PlayerType){try{this._adLoaded?SCMPlayer_logger("VpaidJSAdTechnicalError",""):SCMPlayer_logger("VpaidJSAdOptOut","")}catch(n){console.log(n)}clearInterval(this._remainingTimer);try{this.mediaElement.get(0).removeListener()}catch(n){}this._adStarted?this.pp._promote("aderror","string"==typeof t?t:t.message):(this.pp._promote("vpaidPassback","string"==typeof t?t:t.message),this.detachMedia())}else{clearInterval(this._remainingTimer);try{this._VPAIDCreative.stopAd()}catch(n){}try{this.mediaElement.get(0).removeListener()}catch(n){}this.iframeAd.parentNode.removeChild(this.iframeAd),this.iframeAd=null}break;case"AdVolumeChange":var o=i._VPAIDCreative.getAdVolume();-1!=o&&this.pp._promote("volume",o),o>0&&this.mediaElement.get(0).muted&&(this.mediaElement.get(0).muted=!1);break;case"AdSizeChange":}},removeListeners:function(){},errorListener:function(e){this.sendUpdate("error",4)},setSeek:function(e){},setVolume:function(e){this._adStarted||(e=0),this._volume=e;var t=this;if(0==e){try{jQuery(t.iframeAd.contentWindow.document.body).find("video")[0].muted=!0}catch(i){}try{this._VPAIDCreative.setAdVolume(0)}catch(i){}}else{try{jQuery(t.iframeAd.contentWindow.document.body).find("video")[0].muted=!1}catch(i){}try{this._VPAIDCreative.setAdVolume(e)}catch(i){}}return!1},setPause:function(e){this._pauseAsked=!0,this._VPAIDCreative.pauseAd()},setPlay:function(e){this._adLoaded&&(this._adStarted||void 0!==this._adStarting?this._VPAIDCreative.resumeAd():(this._adStarting=!0,"LOADER"==window._FskVastParser.PlayerType&&window._FskVastParser._vpaidJsLoader.startAd(),this._VPAIDCreative.startAd()))},getVolume:function(){try{return this._VPAIDCreative.getAdVolume()}catch(e){return this._volume}},detachMedia:function(){try{this.mediaElement[0].pause(),this.mediaElement.attr("src",""),this.mediaElement[0].load()}catch(e){}this.iframeAd.parentNode.removeChild(this.iframeAd),this.iframeAd=null}})}),jQuery(function(e){$p.newModel({modelId:"VIDEOIMA",imaVersion:"1",iLove:[{ext:"xml",type:"text/imaxml",platform:"ima",streamType:["http"],fixed:!0}],loadScript:function(e,t){var i=document.createElement("script");i.type="text/javascript",i.readyState?i.onreadystatechange=function(){("loaded"==i.readyState||"complete"==i.readyState)&&(i.onreadystatechange=null,t())}:i.onload=function(){t()},i.src=e,document.getElementsByTagName("head")[0].appendChild(i)},init:function(){var e=this;this.loadScript("//imasdk.googleapis.com/js/sdkloader/ima3.js",function(){e.ready()})},applyMedia:function(t){0===e("#"+this.pp.getMediaId()+"_html").length&&(this.wasPersistent=!1,t.html("").append(e(" ").attr({id:this.pp.getMediaId()+"_html",poster:$p.utils.imageDummy(),loop:!1,autoplay:!1,preload:"none","x-webkit-airplay":"allow"}).prop({controls:!1,volume:this.getVolume()}).css({width:"100%",height:"100%",position:"absolute",top:0,left:0}))),this.mediaElement=e("#"+this.pp.getMediaId()+"_html"),this.applySrc()},applySrc:function(){var t=this,i=this.getSource();google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),this.adDisplayContainer_=new google.ima.AdDisplayContainer(e("#"+this.pp.getMediaId())[0],e("#"+this.pp.getMediaId()+"_html")[0]),this.adsLoader_=new google.ima.AdsLoader(this.adDisplayContainer_),this.adsManager_=null,this.adsLoader_.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoaded_,!1,this),this.adsLoader_.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdError_,!1,this),this.adDisplayContainer_.initialize();var n=new google.ima.AdsRequest;n.adTagUrl=SCMPlayer_UrlPreprocessor(i[0].src),n.linearAdSlotWidth=this.pp.getDC().width(),n.linearAdSlotHeight=this.pp.getDC().height(),this.adsLoader_.requestAds(n),this.displayReady()},onAdsManagerLoaded_:function(t){var i=new google.ima.AdsRenderingSettings;i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i.loadVideoTimeout=6e5,this.adsManager_=t.getAdsManager(e("#"+this.pp.getMediaId()+"_html")[0],i),this.adsManager_.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdError_,!1,this);var n=[google.ima.AdEvent.Type.ALL_ADS_COMPLETED,google.ima.AdEvent.Type.CLICK,google.ima.AdEvent.Type.LOG,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,google.ima.AdEvent.Type.COMPLETE,google.ima.AdEvent.Type.RESUMED,google.ima.AdEvent.Type.IMPRESSION,google.ima.AdEvent.Type.FIRST_QUARTILE,google.ima.AdEvent.Type.LOADED,google.ima.AdEvent.Type.MIDPOINT,google.ima.AdEvent.Type.PAUSED,google.ima.AdEvent.Type.STARTED,google.ima.AdEvent.Type.SKIPPED,google.ima.AdEvent.Type.USER_CLOSE,google.ima.AdEvent.Type.VOLUME_CHANGED,google.ima.AdEvent.Type.THIRD_QUARTILE];for(var s in n)this.adsManager_.addEventListener(n[s],this.handleEvents,!1,this);this.adsManager_.init(this.pp.getDC().width(),this.pp.getDC().height(),google.ima.ViewMode.NORMAL),jQuery(".fskdisplay").parent().find(".clickthrough").remove()},checkRemaining:function(){try{this._currentTime=this.adsManager_.getRemainingTime(),0!==this._currentTime&&(e(".fsktimeleft").show(),e(".fsktimeleft .fskmin_rem").html(("00"+Math.floor((0>this._currentTime?0:this._currentTime)/60)).slice(-2)),e(".fsktimeleft .fsksec_rem").html(("00"+Math.floor(0>this._currentTime?0:this._currentTime)%60).slice(-2)))}catch(t){e(".fsktimeleft").hide()}},handleEvents:function(t){var i=this;switch(t.type){case"loaded":this._adLoaded=!0,SCMPlayer_sendMessage("AdVisible");break;case"impression":this._setState("playing");break;case"start":this._remainingTimer=setInterval(function(){i.checkRemaining()},200),e("#"+this.pp.getMediaId()+" iframe")[0].style.opacity=1,e("#"+this.pp.getMediaId()+" iframe").parent()[0].style.zIndex=999999;break;case"resume":this._setState("playing");break;case"complete":this.pp._promote("completed"),clearInterval(this._remainingTimer),this._setState("completed");break;case"skip":this._setState("completed");break;case"pause":this._setState("paused");break;case"firstquartile":this.pp._promote("firstquartile");break;case"midpoint":this.pp._promote("midpoint");break;case"thirdquartile":this.pp._promote("thirdquartile");break;case"click":this.pp._promote("adclick")}},onAdError_:function(e){SCMPlayer_logger("aderror",""+e.getError()),this.detach(),this.pp._promote("vpaidPassback")},detach:function(){try{this.adsManager_&&this.adsManager_.destroy(),this.adDisplayContainer_.destroy(),e(this.mediaElement).get(0).remove(),clearInterval(this._remainingTimer)}catch(t){}this.destroy()},setSeek:function(e){},setVolume:function(e){return this.adsManager_&&this.adsManager_.setVolume(e),!1},setPause:function(e){this.adsManager_&&this.adsManager_.pause()},setPlay:function(e){this._adLoaded&&(this._adStarted?this.adsManager_.resume():(this._adStarted=!0,this.adsManager_.start()))},getVolume:function(){return this.adsManager_&&this.adsManager_.getVolume(),0},detachMedia:function(){try{clearInterval(this._remainingTimer)}catch(e){}this.setPause()}})});var projekktorDisplay=function(){};jQuery(function(e){projekktorDisplay.prototype={version:"1.1.00",logo:null,logoIsFading:!1,display:null,displayClicks:0,buffIcn:null,buffIcnSprite:null,bufferDelayTimer:null,_controlsDims:null,config:{displayClick:{callback:"setPlayPause",value:null},displayPlayingClick:{callback:"setPlayPause",value:null},displayDblClick:{callback:null,value:null},staticControls:!1,bufferIconDelay:1e3,spriteUrl:"",spriteWidth:50,spriteHeight:50,spriteTiles:25,spriteOffset:1,spriteCountUp:!1},initialize:function(){this.display=this.applyToPlayer(e("
")),this.startButton=this.applyToPlayer(e("
").addClass("start"),"startbtn"),this.buffIcn=this.applyToPlayer(e("
").addClass("buffering"),"buffericn"),this.imaContainer=this.applyToPlayer(e("
").addClass("ima"),"ima"),this.setActive(),""!==this.config.spriteUrl&&(this.buffIcnSprite=e("
").appendTo(this.buffIcn).css({width:this.config.spriteWidth,height:this.config.spriteHeight,marginLeft:(this.buffIcn.width()-this.config.spriteWidth)/2+"px",marginTop:(this.buffIcn.height()-this.config.spriteHeight)/2+"px",backgroundColor:"transparent",backgroundImage:"url("+this.config.spriteUrl+")",backgroundRepeat:"no-repeat",backgroundPosition:"0 0"}).addClass("inactive")),this.pp.getMediaContainer(),this.pluginReady=!0},displayReadyHandler:function(){var e=this;this.hideStartButton(),this.startButton.unbind().click(function(){e.pp.setPlay()})},syncingHandler:function(){this.showBufferIcon(),this.pp.getState("IDLE")&&this.hideStartButton()},readyHandler:function(){this.hideBufferIcon(),this.pp.getState("IDLE")&&this.showStartButton()},bufferHandler:function(e){(this.pp.getState("PLAYING")||this.pp.getState("AWAKENING"))&&("EMPTY"==e?this.showBufferIcon():this.hideBufferIcon())},stateHandler:function(e){switch(e){case"IDLE":clearTimeout(this._cursorTimer),this.display.css("cursor","pointer");break;case"PLAYING":this.hideBufferIcon(),this.hideStartButton();break;case"IDLE":this.showStartButton();break;case"STARTING":case"AWAKENING":this.showBufferIcon(),this.hideStartButton();break;case"COMPLETED":this.hideBufferIcon();break;default:this.hideStartButton()}},errorHandler:function(){this.hideBufferIcon(),this.hideStartButton()},startHandler:function(){this.mousemoveHandler()},stoppedHandler:function(){this.hideBufferIcon()},scheduleLoadingHandler:function(){this.hideStartButton(),this.showBufferIcon()},scheduledHandler:function(){this.getConfig("autoplay")||this.showStartButton(),this.hideBufferIcon()},plugineventHandler:function(e){if("controlbar"==e.PLUGIN&&"show"==e.EVENT&&this.getConfig("staticControls")){var t=100*e.height/this.pp.getDC().height();this.display.height(100-t+"%").data("sc",!0)}},qualityChangeHandler:function(){this.hideBufferIcon()},mousemoveHandler:function(e){var t=this.display;return this.pp.getState("IDLE")?(t.css("cursor","pointer"),void 0):(t.css("cursor","auto"),clearTimeout(this._cursorTimer),-1=="AWAKENING|ERROR|PAUSED".indexOf(this.pp.getState())&&(this._cursorTimer=setTimeout(function(){t.css("cursor","none")},3e3)),void 0)},mousedownHandler:function(t){var i=this;if(-1!=(e(t.target).attr("id")||"").indexOf("_media")&&(clearTimeout(this._cursorTimer),this.display.css("cursor","auto"),1==t.which)){switch(this.pp.getState()){case"ERROR":return this.pp.setConfig({disallowSkip:!1}),this.pp.setActiveItem("next"),void 0;case"IDLE":return this.pp.setPlay(),void 0}this.pp.getHasGUI()!==!0&&(this.displayClicks++,this.pp._promote("displayClick"),this.displayClicks>0&&setTimeout(function(){1==i.displayClicks?"PLAYING"==i.pp.getState()?i.clickHandler("displayPlaying"):i.clickHandler("display"):2==i.displayClicks&&i.clickHandler("displayDbl"),i.displayClicks=0},250))}},showStartButton:function(){this.startButton.addClass("active").removeClass("inactive")},hideStartButton:function(){this.startButton.addClass("inactive").removeClass("active")},hideBufferIcon:function(){clearTimeout(this.bufferDelayTimer),this.buffIcn.addClass("inactive").removeClass("active")},showBufferIcon:function(e){var t=this;if(clearTimeout(this.bufferDelayTimer),!this.pp.getHasGUI()){if("YTAUDIO"!==this.pp.getModel()&&"YTVIDEO"!==this.pp.getModel()||this.pp.getState("IDLE")||(e=!0),e!==!0&&this.getConfig("bufferIconDelay")>0)return this.bufferDelayTimer=setTimeout(function(){t.showBufferIcon(!0)},this.getConfig("bufferIconDelay")),void 0;if(!this.buffIcn.hasClass("active")&&(this.buffIcn.addClass("active").removeClass("inactive"),null!==t.buffIcnSprite)){var i=t.config.spriteCountUp===!0?0:(t.config.spriteHeight+t.config.spriteOffset)*(t.config.spriteTiles-1),n=i;t.buffIcnSprite.addClass("active").removeClass("inactive"),function(){t.buffIcn.is(":visible")&&(t.buffIcnSprite.css("backgroundPosition","0px -"+n+"px"),t.config.spriteCountUp===!0?n+=t.config.spriteHeight+t.config.spriteOffset:n-=t.config.spriteHeight+t.config.spriteOffset,(n>(i+t.config.spriteHeight)*t.config.spriteTiles||t.config.spriteOffset>n)&&(n=i),setTimeout(arguments.callee,60))}()}}}}});var projekktorControlbar=function(){};jQuery(function(e){projekktorControlbar.prototype={version:"1.1.01",_cTimer:null,_isDVR:!1,_noHide:!1,_vSliderAct:!1,cb:null,controlElements:{},controlElementsConfig:{sec_dur:null,min_dur:null,sec_abs_dur:null,min_abs_dur:null,hr_dur:null,sec_elp:null,min_elp:null,sec_abs_elp:null,min_abs_elp:null,hr_elp:null,sec_rem:null,min_rem:null,sec_abs_rem:null,min_abs_rem:null,hr_rem:null,sec_tip:null,min_tip:null,sec_abs_tip:null,min_abs_tip:null,hr_tip:null,cb:null,playhead:{on:null,call:null},loaded:null,golive:[{on:["touchstart","click"],call:"goliveClk"},{on:["touchend"],call:"touchEnd"}],scrubber:null,scrubbertip:null,scrubberknob:null,scrubberdrag:[{on:["mouseenter"],call:"scrubberShowTooltip"},{on:["mouseout"],call:"scrubberHideTooltip"},{on:["mousemove"],call:"scrubberdragTooltip"},{on:["mousedown"],call:"scrubberdragStartDragListener"}],play:[{on:["touchstart","click"],call:"playClk"},{on:["touchend"],call:"touchEnd"}],pause:[{on:["touchstart","click"],call:"pauseClk"},{on:["touchend"],call:"touchEnd"}],stop:[{on:["touchstart","click"],call:"stopClk"},{on:["touchend"],call:"touchEnd"}],prev:[{on:["touchstart","click"],call:"prevClk"},{on:["touchend"],call:"touchEnd"}],next:[{on:["touchstart","click"],call:"nextClk"},{on:["touchend"],call:"touchEnd"}],rewind:[{on:["touchstart","click"],call:"rewindClk"},{on:["touchend"],call:"touchEnd"}],forward:[{on:["touchstart","click"],call:"forwardClk"},{on:["touchend"],call:"touchEnd"}],fsexit:[{on:["touchstart","click"],call:"exitFullscreenClk"},{on:["touchend"],call:"touchEnd"}],fsenter:[{on:["touchstart","click"],call:"enterFullscreenClk"},{on:["touchend"],call:"touchEnd"}],loquality:[{on:["touchstart","click"],call:"setQualityClk"},{on:["touchend"],call:"touchEnd"}],hiquality:[{on:["touchstart","click"],call:"setQualityClk"},{on:["touchend"],call:"touchEnd"}],vslider:[{on:["touchstart","click"],call:"vsliderClk"},{on:["touchend"],call:"touchEnd"}],vmarker:[{on:["touchstart","click"],call:"vsliderClk"},{on:["touchend"],call:"touchEnd"}],vknob:{on:["mousedown"],call:"vknobStartDragListener"},volumePanel:[{on:["mousemove"],call:"volumeBtnHover"},{on:["mouseout"],call:"volumeBtnOut"}],volume:null,mute:[{on:["touchend","click"],call:"muteClk"},{on:["mouseout"],call:"volumeBtnOut"},{on:["mousemove"],call:"volumeBtnHover"},{on:["touchend"],call:"touchEnd"}],unmute:[{on:["touchend","click"],call:"unmuteClk"},{on:["mouseout"],call:"volumeBtnOut"},{on:["mousemove"],call:"volumeBtnHover"},{on:["touchend"],call:"touchEnd"}],vmax:[{on:["touchstart","click"],call:"vmaxClk"},{on:["mouseout"],call:"volumeBtnOut"},{on:["mousemove"],call:"volumeBtnHover"},{on:["touchend"],call:"touchEnd"}],open:[{on:["touchstart","click"],call:"openCloseClk"},{on:["touchend"],call:"touchEnd"}],close:[{on:["touchstart","click"],call:"openCloseClk"},{on:["touchend"],call:"touchEnd"}],loop:[{on:["touchstart","click"],call:"loopClk"},{on:["touchend"],call:"touchEnd"}],draghandle:{on:["mousedown"],call:"handleStartDragListener"},controls:null,title:null},config:{toggleMute:!1,showCuePoints:!1,fadeDelay:2500,showOnStart:!1,showOnIdle:!1,controlsTemplate:'%{hr_tip}:%{min_tip}:%{sec_tip}
'},initialize:function(){var t=this,i=this.playerDom.html(),n=!0,s=this.pp.getNS();for(var a in this.controlElementsConfig)if(i.match(RegExp(s+a,"gi"))){n=!1;break}n?(this.cb=this.applyToPlayer(e("
").addClass("controls")),this.applyTemplate(this.cb,this.getConfig("controlsTemplate"))):this.cb=this.playerDom.find("."+s+"controls");for(var a in this.controlElementsConfig)this.controlElements[a]=a.indexOf("_rem")>0?e("."+s+a):e(this.playerDom).find("."+s+a),$p.utils.blockSelection(e(this.controlElements[a]));this.addGuiListeners(),this.hidecb(!0),this.pluginReady=!0},applyTemplate:function(t,i){var n=this,s=this.pp.getNS();if(i){var a=i.match(/\%{[a-zA-Z_]*\}/gi);null!=a&&e.each(a,function(e,t){var n=t.replace(/\%{|}/gi,"");i=t.match(/\_/gi)?i.replace(t,' '):i.replace(t,'class="'+s+n+'"')}),t.html(i)}},updateDisplay:function(){var e=this,t=this.pp.getState();if(!this.pp.getHasGUI()){if(0==this.getConfig("controls"))return this.hidecb(!0),void 0;2>this.pp.getItemCount()||this.getConfig("disallowSkip")?(this._active("prev",!1),this._active("next",!1)):(this._active("prev",!0),this._active("next",!0)),1>this.pp.getItemIdx()&&this._active("prev",!1),this.pp.getItemIdx()>=this.pp.getItemCount()-1&&this._active("next",!1),this.getConfig("disablePause")?(this._active("play",!1),this._active("pause",!1)):("PLAYING"===t&&this.drawPauseButton(),"PAUSED"===t&&this.drawPlayButton(),"IDLE"===t&&this.drawPlayButton()),this._active("stop","IDLE"!==t),this._active("forward","IDLE"!==t),this._active("rewind","IDLE"!==t),window.isFS===!0?this.drawExitFullscreenButton():this.drawEnterFullscreenButton(),this.getConfig("enableFullscreen")||(this._active("fsexit",!1),this._active("fsenter",!1)),this._active("loop",!0),this.controlElements.loop.addClass(this.pp.getConfig("loop")?"on":"off").removeClass(this.pp.getConfig("loop")?"off":"on"),this.displayQualityToggle(),this.displayTime(),this.displayVolume(this._getVolume())}},addGuiListeners:function(){var t=this;e.each(this.controlElementsConfig,function(i,n){if(null==n)return!0;n instanceof Array||(n=[n]);for(var s=0;n.length>s;s++)null!=n[s].on&&e.each(n[s].on,function(e,a){var r="on"+a in window.document,o=n[s].call;if(!r){var l=document.createElement("div");l.setAttribute("on"+a,"return;"),r="function"==typeof l["on"+a]}r&&t.controlElements[i].bind(a,function(e){t.clickCatcher(e,o,t.controlElements[i])})});return!0}),this.cb.mousemove(function(e){t.controlsFocus(e)}),this.cb.mouseout(function(e){t.controlsBlur(e)})},clickCatcher:function(e,t,i){var n=this;return e.stopPropagation(),e.preventDefault(),this[t](e,i),!1},touchEnd:function(){var e=this;this._cTimer=setTimeout(function(){e.hidecb()},this.getConfig("fadeDelay")),this._noHide=!1},drawTitle:function(){this.controlElements.title.html(this.getConfig("title",""))},hidecb:function(e){return clearTimeout(this._cTimer),null!=this.cb?0==this.getConfig("controls")?(this.cb.removeClass("active").addClass("inactive"),void 0):(this.getConfig("showOnIdle")&&this.pp.getState("IDLE")||(e&&(this._noHide=!1),this._noHide||this.cb.hasClass("inactive")||(this.cb.removeClass("active").addClass("inactive"),this.sendEvent("hide",this.cb))),void 0):void 0},showcb:function(e){var t=this;if(clearTimeout(this._cTimer),this.pp.getHasGUI()||0==this.getConfig("controls"))return this.cb.removeClass("active").addClass("inactive"),void 0;if(null!=this.cb&&!("IDLE|AWAKENING|ERROR".indexOf(this.pp.getState())>-1&&1!=e)){if(this.cb.hasClass("active")&&e!==!1)return this._cTimer=setTimeout(function(){t.hidecb()},this.getConfig("fadeDelay")),void 0;this.cb.removeClass("inactive").addClass("active"),this.sendEvent("show",this.cb),this._cTimer=setTimeout(function(){t.hidecb()},this.getConfig("fadeDelay"))}},displayTime:function(t,i,n){if(!this.pp.getHasGUI()){var s=Math.round(10*(t||this.pp.getLoadPlaybackProgress()||0))/10,a=i||this.pp.getDuration()||0,r=n||this.pp.getPosition()||0,o=e.extend({},this._clockDigits(a,"dur"),this._clockDigits(r,"elp"),this._clockDigits(a-r,"rem"));if(this.controlElements.playhead.data("pct")!=s){this.controlElements.playhead.data("pct",s).css({width:s+"%"}),this.controlElements.scrubberknob.css({left:s+"%"});for(var l in this.controlElements){if("cb"==l)break;o[l]&&e.each(this.controlElements[l],function(){e(this).html(o[l])})}}}},displayProgress:function(){var e=Math.round(10*this.pp.getLoadProgress())/10;this.controlElements.loaded.data("pct")!=e&&this.controlElements.loaded.data("pct",e).css("width",e+"%")},displayVolume:function(t){var i=this;if(1!=this._vSliderAct&&null!=t){var n=this.cb.hasClass("active"),i=this,s=this.getConfig("fixedVolume"),a=this.controlElements.mute.hasClass("toggle")||this.controlElements.unmute.hasClass("toggle")||this.getConfig("toggleMute");
this.controlElements.vslider.width()>this.controlElements.vslider.height()?(this.controlElements.vmarker.css("width",100*t+"%"),this.controlElements.vknob.css("left",100*t+"%")):(this.controlElements.vmarker.css("height",100*t+"%"),this.controlElements.vknob.css("top",100-100*t+"%"));var r=this.controlElements.volume.find("li"),o=r.length-Math.ceil(100*t/r.length);for(var l=0;r.length>=l;l++)l>=o?e(r[l]).addClass("active"):e(r[l]).removeClass("active");if(a)switch(parseFloat(t)){case 0:this._active("mute",!1),this._active("unmute",!0),this._active("vmax",!0);break;default:this._active("mute",!0),this._active("unmute",!1),this._active("vmax",!1)}n&&this.cb.fadeTo(1,.99).fadeTo(1,1,function(){i.cb.removeAttr("style")})}},displayCuePoints:function(e){},drawPauseButton:function(e){this._active("pause",!0),this._active("play",!1)},drawPlayButton:function(e){this._active("pause",!1),this._active("play",!0)},drawEnterFullscreenButton:function(e){this._active("fsexit",!1),this._active("fsenter",!0)},drawExitFullscreenButton:function(e){this._active("fsexit",!0),this._active("fsenter",!1)},displayQualityToggle:function(t){var i=this.getConfig("playbackQualities"),n=this.pp.getPlaybackQualities(),s=this.pp.getNS();if(best=[],2>n.length||2>i.length)return this.controlElements.loquality.removeClass().addClass("inactive").addClass(s+"loquality").data("qual",""),this.controlElements.hiquality.removeClass().addClass("inactive").addClass(s+"hiquality").data("qual",""),void 0;i.sort(function(e,t){return e.minHeight-t.minHeight});for(var a=i.length;a--;a>0)if(e.inArray(i[a].key,n)>-1&&best.push(i[a].key),best.length>1)break;this.cb.addClass("qualities"),best[0]==this.pp.getPlaybackQuality()?(this._active("loquality",!0).addClass("qual"+best[1]).data("qual",best[1]),this._active("hiquality",!1).addClass("qual"+best[0]).data("qual",best[0])):(this._active("loquality",!1).addClass("qual"+best[1]).data("qual",best[1]),this._active("hiquality",!0).addClass("qual"+best[0]).data("qual",best[0]))},itemHandler:function(t){e(this.cb).find("."+this.pp.getNS()+"cuepoint").remove(),this.pp.setVolume(this._getVolume()),this.updateDisplay(),this.hidecb(!0),this.drawTitle(),this.displayQualityToggle(),this.pluginReady=!0},startHandler:function(){this.pp.setVolume(this._getVolume()),1==this.getConfig("showOnStart")?this.showcb(!0):this.hidecb(!0)},readyHandler:function(e){clearTimeout(this._cTimer),this.getConfig("showOnIdle")&&(this.showcb(!0),this.cb.removeClass("inactive").addClass("active").show()),this.pluginReady=!0},stateHandler:function(e){return this.updateDisplay(),"STOPPED|AWAKENING|IDLE|DONE".indexOf(e)>-1&&(this.displayTime(0,0,0),this.displayProgress(0),this.pp.getIsMobileClient()&&this.hidecb(!0)),"STOPPED|DONE|IDLE".indexOf(e)>-1?(this.hidecb(!0),void 0):("ERROR".indexOf(e)>-1&&(this._noHide=!1,this.hidecb(!0)),this.displayProgress(),void 0)},scheduleModifiedHandler:function(){"IDLE"!==this.pp.getState()&&(this.updateDisplay(),this.displayTime(),this.displayProgress())},volumeHandler:function(e){try{e>0&&this.cookie("muted",!1),this.cookie("muted")||this.cookie("volume",e)}catch(t){console.log(t)}this.displayVolume(e)},progressHandler:function(e){this.displayProgress()},timeHandler:function(e){this.displayTime(),this.displayProgress()},qualityChangeHandler:function(e){this.displayQualityToggle(e)},streamTypeChangeHandler:function(e){"dvr"==e&&(this._isDVR=!0,this.setActive(this.controlElements.golive,!0))},isLiveHandler:function(e){e?this.controlElements.golive.addClass("on").removeClass("off"):this.controlElements.golive.addClass("off").removeClass("on")},fullscreenHandler:function(e){var t=this,i=this.pp.getNS();clearTimeout(this._cTimer),this._noHide=!1,this._vSliderAct=!1,this.getConfig("controls")&&this.getConfig("enableFullscreen")&&(window.isFS?(this.cb.addClass("fullscreen"),this.drawExitFullscreenButton()):(this.cb.removeClass("fullscreen"),this.drawEnterFullscreenButton()),"IDLE"!=this.pp.getState()||this.getConfig("showOnIdle")||this.hidecb(!0))},durationChangeHandler:function(e){this.displayCuePoints(e)},errorHandler:function(e){this.hidecb(!0)},leftclickHandler:function(){this.mouseleaveHandler()},focusHandler:function(e){this.showcb()},mouseenterHandler:function(e){this.showcb()},mousemoveHandler:function(e){this.pp.getState("STARTING")||this.showcb()},mouseleaveHandler:function(){},mousedownHandler:function(e){this.showcb()},controlsFocus:function(e){this._noHide=!0},controlsBlur:function(e){this._noHide=!1},setQualityClk:function(t){this.pp.setPlaybackQuality(e(t.currentTarget).data("qual"))},goliveClk:function(e){},playClk:function(e){this.pp.setPlay()},pauseClk:function(e){this.pp.setPause()},stopClk:function(e){this.pp.setStop()},startClk:function(e){this.pp.setPlay()},controlsClk:function(e){},prevClk:function(e){this.pp.setActiveItem("previous")},nextClk:function(e){this.pp.setActiveItem("next")},forwardClk:function(e){},rewindClk:function(e){},muteClk:function(e){this.cookie("muted",!0),this.pp.setVolume(0)},unmuteClk:function(e){window.hasUnmuteClickBeenFired=!0,this.cookie("muted",!1),this.pp.setVolume(this.pp.getConfig("baseVolume"))},vmaxClk:function(e){this.cookie("muted",!1),this.pp.setVolume(1)},enterFullscreenClk:function(e){this.pp.setFullscreen(!0)},exitFullscreenClk:function(e){this.pp.setFullscreen(!1)},loopClk:function(t){this.pp.setLoop(e(t.currentTarget).hasClass("inactive")||!1),this.updateDisplay()},vmarkerClk:function(e){vsliderClk(e)},openCloseClk:function(t){var i=this;e(e(t.currentTarget).attr("class").split(/\s+/)).each(function(e,t){-1!=t.indexOf("toggle")&&(i.playerDom.find("."+t.substring(6)).slideToggle("slow",function(){i.pp.setSize()}),i.controlElements.open.toggle(),i.controlElements.close.toggle())})},volumeBtnHover:function(e){clearTimeout(this._outDelay),this.setActive(this.controlElements.volumePanel,!0)},volumeBtnOut:function(e,t){var i=this;e.currentTarget==t.get(0)&&e.relatedTarget!=t.get(0)&&(this._outDelay=setTimeout(function(){i.setActive(i.controlElements.volumePanel,!1)},100))},vsliderClk:function(t){if(1!=this._vSliderAct){var i=e(this.controlElements.vslider),n=i.width()>i.height()?"hor":"vert",s="hor"==n?i.width():i.height(),a=t.originalEvent.touches?t.originalEvent.touches[0].pageX:t.pageX,r=t.originalEvent.touches?t.originalEvent.touches[0].pageY:t.pageY,o="hor"==n?a-i.offset().left:r-i.offset().top,l=0;l=0>o||isNaN(o)||void 0==o?0:"hor"==n?o/s:1-o/s,this.pp.setVolume(l)}},scrubberShowTooltip:function(e){0!=this.pp.getDuration()&&(clearTimeout(this._cTimer),this.setActive(this.controlElements.scrubbertip,!0))},scrubberHideTooltip:function(e){this.setActive(this.controlElements.scrubbertip,!1)},scrubberdragTooltip:function(t){if(0!=this.pp.getDuration()){this.setActive(this.controlElements.scrubbertip,!0);var i=e(this.controlElements.scrubberdrag[0]),n=e(this.controlElements.loaded[0]),s=e(this.controlElements.scrubbertip),a=t.originalEvent.touches?t.originalEvent.touches[0].pageX:t.pageX,r=t.originalEvent.touches?t.originalEvent.touches[0].pageY:t.pageY,o=a-i.offset().left-s.outerWidth()/2,l=this.pp.getDuration()/100*(100*(a-i.offset().left)/i.width()),d=this._clockDigits(l,"tip");if(this._isDVR){l=this.pp.getDuration()-l;var c=new Date(1e3*((new Date).getTime()/1e3-l)),c=c.getSeconds()+60*c.getMinutes()+3600*c.getHours();d=this._clockDigits(c,"tip")}for(var u in this.controlElements){if("cb"==u)break;d[u]&&e.each(this.controlElements[u],function(){e(this).html(d[u])})}o=0>o?0:o,o=o>i.width()-s.outerWidth()?i.width()-s.outerWidth():o,s.css({left:o+"px"})}},scrubberdragStartDragListener:function(e){},vknobStartDragListener:function(t,i){this._vSliderAct=!0;var n=this,s=this.pp.getInFullscreen()===!0&&this.controlElements.vslider.length>1?1:0,a=e(i[s]),r=e(this.controlElements.vslider[s]),o=Math.abs(parseFloat(a.position().left)-t.clientX),l=Math.abs(parseFloat(a.position().top)-t.clientY),d=0,c=function(e){return n.playerDom.unbind("mouseup",c),r.unbind("mousemove",u),r.unbind("mouseup",c),a.unbind("mousemove",u),a.unbind("mouseup",c),n._vSliderAct=!1,!1},u=function(t){clearTimeout(n._cTimer);var i=t.clientX-o,i=i>r.width()-a.width()/2?r.width()-a.width()/2:i,i=0>i?0:i,c=t.clientY-l,c=c>r.height()-a.height()/2?r.height()-a.height()/2:c,c=0>c?0:c;n.controlElements.vslider.width()>n.controlElements.vslider.height()?(a.css("left",i+"px"),d=Math.abs(i/(r.width()-a.width()/2)),e(n.controlElements.vmarker[s]).css("width",100*d+"%")):(a.css("top",c+"px"),d=1-Math.abs(c/(r.height()-a.height()/2)),e(n.controlElements.vmarker[s]).css("height",100*d+"%"))};this.playerDom.mouseup(c),r.mousemove(u),r.mouseup(c),a.mousemove(u),a.mouseup(c)},handleStartDragListener:function(e,t){var i=this,n=Math.abs(parseInt(this.cb.position().left)-e.clientX),s=Math.abs(parseInt(this.cb.position().top)-e.clientY);var a=function(e){return e.stopPropagation(),e.preventDefault(),i.playerDom.unbind("mouseup",a),i.playerDom.unbind("mouseout",a),i.playerDom.unbind("mousemove",r),!1};var r=function(e){e.stopPropagation(),e.preventDefault(),clearTimeout(i._cTimer);var t=e.clientX-n;t=t>i.playerDom.width()-i.cb.width()?i.playerDom.width()-i.cb.width():t,t=0>t?0:t,i.cb.css("left",t+"px");var a=e.clientY-s;return a=a>i.playerDom.height()-i.cb.height()?i.playerDom.height()-i.cb.height():a,a=0>a?0:a,i.cb.css("top",a+"px"),!1};this.playerDom.mousemove(r),this.playerDom.mouseup(a)},_getVolume:function(){try{return vol=parseFloat(this.pp.playerModel.getVolume()),vol=vol>1?vol/100:vol,vol=0>vol?0:vol}catch(e){}var t=parseFloat(this.cookie("volume")||this.getConfig("volume")||.5),i=this.cookie("muted")||!1;return this.getConfig("fixedVolume")||null==t?this.getConfig("volume"):i?0:t},_active:function(e,t){var i=this.controlElements[e];return 1==t?i.addClass("active").removeClass("inactive"):i.addClass("inactive").removeClass("active"),i},_clockDigits:function(e,t){(0>e||isNaN(e)||void 0==e)&&(e=0);var i=Math.floor(e/3600),n=e%3600,s=Math.floor(n/60),a=60*i+s,r=n%60,o=Math.floor(r),l=e,d={};return d["min_"+t]=10>s?"0"+s:s,d["min_abs_"+t]=10>a?"0"+a:a,d["sec_"+t]=10>o?"0"+o:o,d["sec_abs_"+t]=10>l?"0"+l:l,d["hr_"+t]=10>i?"0"+i:i,d}}}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){if(!e.support.cors&&e.ajaxTransport&&window.XDomainRequest){var t=/^https?:\/\//i;var i=/^get|post$/i;var n=RegExp("^"+locat1on.protocol,"i");e.ajaxTransport("* text html xml json",function(s,a,r){if(s.crossDomain&&s.async&&i.test(s.type)&&t.test(s.url)&&n.test(s.url)){var o=null;return{send:function(t,i){var n="";var r=(a.dataType||"").toLowerCase();o=new XDomainRequest,/^\d+$/.test(a.timeout)&&(o.timeout=a.timeout),o.ontimeout=function(){i(500,"timeout")},o.onload=function(){var t="Content-Length: "+o.responseText.length+"\r\nContent-Type: "+o.contentType;var n={code:200,message:"success"};var s={text:o.responseText};try{if("html"===r||/text\/html/i.test(o.contentType))s.html=o.responseText;else if("json"===r||"text"!==r&&/\/json/i.test(o.contentType))try{s.json=e.parseJSON(o.responseText)}catch(a){n.code=500,n.message="parseerror"}else if("xml"===r||"text"!==r&&/\/xml/i.test(o.contentType)){var l=new ActiveXObject("Microsoft.XMLDOM");l.async=!1;try{l.loadXML(o.responseText)}catch(a){l=void 0}if(!l||!l.documentElement||l.getElementsByTagName("parsererror").length)throw n.code=500,n.message="parseerror","Invalid XML: "+o.responseText;s.xml=l}}catch(d){throw d}finally{i(n.code,n.message,s,t)}},o.onprogress=function(){},o.onerror=function(){i(500,"error",{text:o.responseText})},a.data&&(n="string"===e.type(a.data)?a.data:e.param(a.data)),o.open(s.type,s.url),o.send(n)},abort:function(){o&&o.abort()}}}})}});var ns_=ns_||{};ns_.PlatformAPIs=ns_.PlatformAPIs||{Standard:0,Trilithium:1,AppleTV:2,Chromecast:3},ns_.Utils=ns_.Utils||function(){return{uid:function(){var e=1;return function(){return+new Date+"_"+e++}}(),filter:function(e,t){var i={};for(var n in t)t.hasOwnProperty(n)&&e(t[n])&&(i[n]=t[n]);return i},extend:function(e){var t=arguments.length,i;e=e||{};for(var n=1;t>n;n++)if(i=arguments[n])for(var s in i)i.hasOwnProperty(s)&&(e[s]=i[s]);return e},getString:function(e,t){var i=e+"";return null==e?t||"na":i},getLong:function(e,t){var i=Number(e);return null==e||isNaN(i)?t||0:i},getInteger:function(e,t){var i=Number(e);return null==e||isNaN(i)?t||0:i},getBoolean:function(e,t){var i="true"==(e+"").toLowerCase();return null==e?t||!1:i},isNotEmpty:function(e){return e!==void 0&&null!=e&&e.length!==void 0&&e.length>0},indexOf:function(e,t){var i=-1;return this.forEach(t,function(t,n){t==e&&(i=n)}),i},forEach:function(e,t,i){try{if("function"==typeof t)if(i=i!==void 0?i:null,"number"!=typeof e.length||e[0]===void 0){var n=e.__proto__!==void 0;for(var s in e)e.hasOwnProperty(s)&&(!n||n&&e.__proto__[s]===void 0)&&"function"!=typeof e[s]&&t.call(i,e[s],s)}else for(var a=0,r=e.length;r>a;a++)t.call(i,e[a],a)}catch(o){}},regionMatches:function(e,t,i,n,s){if(0>t||0>n||t+s>e.length||n+s>i.length)return!1;while(--s>=0){var a=e.charAt(t++),r=i.charAt(n++);if(a!=r)return!1}return!0},size:function(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&t++;return t},log:function(e,t){if(t!==void 0&&t&&"undefined"!=typeof console&&console){var i=new Date,n=i.getHours()+":"+i.getMinutes()+":"+i.getSeconds();console.log(n,e)}},isTrue:function(e){return e===void 0?!1:"string"==typeof e?(e=e.toLowerCase(),"true"===e||"1"===e||"on"===e):!!e},toString:function(e){if(e===void 0)return"undefined";if("string"==typeof e)return e;if("[object Array]"===Object.prototype.toString.call(e))return e.join(",");if(this.size(e)>0){var t="";for(var i in e)e.hasOwnProperty(i)&&(t+=i+":"+e[i]+";");return t}return""+e},exists:function(e){return e!==void 0&&null!=e},firstGreaterThan0:function(){for(var e=0,t=arguments.length;t>e;e++){var i=arguments[e];if(i>0)return i}return 0},cloneObject:function(e){if(null==e||"object"!=typeof e)return e;var t=function(){function e(){}function t(t){return"object"==typeof t?(e.prototype=t,new e):t}function i(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}function n(){this.copiedObjects=[];var e=this;this.recursiveDeepCopy=function(t){return e.deepCopy(t)},this.depth=0}function s(e,t){var i=new n;return t&&(i.maxDepth=t),i.deepCopy(e)}function a(e){return"undefined"!=typeof window&&window&&window.Node?e instanceof Node:e===document?!0:"number"==typeof e.nodeType&&e.attributes&&e.childNodes&&e.cloneNode}var r=[];return i.prototype={constructor:i,canCopy:function(){return!1},create:function(e){},populate:function(e,t,i){}},n.prototype={constructor:n,maxDepth:256,cacheResult:function(e,t){this.copiedObjects.push([e,t])},getCachedResult:function(e){var t=this.copiedObjects,i=t.length;for(var n=0;i>n;n++)if(t[n][0]===e)return t[n][1];return void 0},deepCopy:function(e){if(null===e)return null;if("object"!=typeof e)return e;var t=this.getCachedResult(e);if(t)return t;for(var i=0;r.length>i;i++){var n=r[i];if(n.canCopy(e))return this.applyDeepCopier(n,e)}throw Error("Unable to clone the following object "+e)},applyDeepCopier:function(e,t){var i=e.create(t);if(this.cacheResult(t,i),this.depth++,this.depth>this.maxDepth)throw Error("Maximum recursion depth exceeded.");return e.populate(this.recursiveDeepCopy,t,i),this.depth--,i}},s.DeepCopier=i,s.deepCopiers=r,s.register=function(e){e instanceof i||(e=new i(e)),r.unshift(e)},s.register({canCopy:function(){return!0},create:function(e){return e instanceof e.constructor?t(e.constructor.prototype):{}},populate:function(e,t,i){for(var n in t)t.hasOwnProperty(n)&&(i[n]=e(t[n]));return i}}),s.register({canCopy:function(e){return e instanceof Array},create:function(e){return new e.constructor},populate:function(e,t,i){for(var n=0;t.length>n;n++)i.push(e(t[n]));return i}}),s.register({canCopy:function(e){return e instanceof Date},create:function(e){return new Date(e)}}),s.register({canCopy:function(e){return a(e)},create:function(e){return e===document?document:e.cloneNode(!1)},populate:function(e,t,i){if(t===document)return document;if(t.childNodes&&t.childNodes.length)for(var n=0;t.childNodes.length>n;n++){var s=e(t.childNodes[n]);i.appendChild(s)}}}),{deepCopy:s}}();return t.deepCopy(e)},safeGet:function(e,t){return t=this.exists(t)?t:"",this.exists(e)?e:t},getBrowserName:function(){if("undefined"==typeof navigator||!navigator.hasOwnProperty("userAgent")||!navigator.hasOwnProperty("appName"))return"";var e=navigator.userAgent,t=navigator.appName,i,n;return-1!=(n=e.indexOf("Opera"))||-1!=(n=e.indexOf("OPR/"))?t="Opera":-1!=(n=e.indexOf("Android"))?t="Android":-1!=(n=e.indexOf("Chrome"))?t="Chrome":-1!=(n=e.indexOf("Safari"))?t="Safari":-1!=(n=e.indexOf("Firefox"))?t="Firefox":-1!=(n=e.indexOf("IEMobile"))?t="Internet Explorer Mobile":"Microsoft Internet Explorer"==t||"Netscape"==t?t="Internet Explorer":(i=e.lastIndexOf(" ")+1)<(n=e.lastIndexOf("/"))&&(t=e.substring(i,n),t.toLowerCase()==t.toUpperCase()&&(t=navigator.appName)),t},getBrowserFullVersion:function(){if("undefined"==typeof navigator||!navigator.hasOwnProperty("userAgent")||!navigator.hasOwnProperty("appName")||!navigator.hasOwnProperty("appVersion"))return"";var e=navigator.userAgent,t=navigator.appName,i=""+parseFloat(navigator.appVersion),n,s,a,r;return-1!=(s=e.indexOf("Opera"))?(i=e.substring(s+6),-1!=(s=e.indexOf("Version"))&&(i=e.substring(s+8))):-1!=(s=e.indexOf("OPR/"))?i=e.substring(s+4):-1!=(s=e.indexOf("Android"))?i=e.substring(s+11):-1!=(s=e.indexOf("Chrome"))?i=e.substring(s+7):-1!=(s=e.indexOf("Safari"))?(i=e.substring(s+7),-1!=(s=e.indexOf("Version"))&&(i=e.substring(s+8))):-1!=(s=e.indexOf("Firefox"))?i=e.substring(s+8):"Microsoft Internet Explorer"==t?(r=RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"),null!=r.exec(e)&&(i=parseFloat(RegExp.$1))):"Netscape"==t?(r=RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),null!=r.exec(e)&&(i=parseFloat(RegExp.$1))):e.lastIndexOf(" ")+1<(s=e.lastIndexOf("/"))&&(i=e.substring(s+1)),i=""+i,-1!=(a=i.indexOf(";"))&&(i=i.substring(0,a)),-1!=(a=i.indexOf(" "))&&(i=i.substring(0,a)),-1!=(a=i.indexOf(")"))&&(i=i.substring(0,a)),n=parseInt(""+i,10),isNaN(n)&&(i=""+parseFloat(navigator.appVersion)),i},browserAcceptsLargeURLs:function(){return"undefined"!=typeof window?null===window.ActiveXObject||!0:!0}}}(),ns_.StreamSense=ns_.StreamSense||function(){function e(e,t){var n=e||"",s="undefined",a=w.comScore||w.sitestat||function(e){var t="comScore=",n=k.cookie,a="",r="indexOf",o="substring",l="length",d=i.browserAcceptsLargeURLs()?S.URL_LENGTH_LIMIT:S.RESTRICTED_URL_LENGTH_LIMIT,c,u="&ns_",h="&",p,f,g,_,v=w.encodeURIComponent||escape;if(n[r](t)+1)for(g=0,f=n.split(";"),_=f[l];_>g;g++)p=f[g][r](t),p+1&&(a=h+unescape(f[g][o](p+t[l])));e+=u+"_t="+ +new Date+u+"c="+(k.characterSet||k.defaultCharset||"")+a,e.length>d&&e.indexOf(h)>0&&(c=e.substr(0,d-8).lastIndexOf(h),e=(e.substring(0,c)+u+"cut="+v(e.substring(c+1))).substr(0,d)),m.httpGet(e),typeof ns_p===s&&(ns_p={src:e}),ns_p.lastMeasurement=e};if(typeof t!==s){var r=[],o=w.encodeURIComponent||escape;for(var l in t)t.hasOwnProperty(l)&&r.push(o(l)+"="+o(t[l]));/[\?\&]$/.test(n)||(n+="&"),n+=r.join("&")}return a(n)}function t(e,t){var n,s=w.encodeURIComponent||escape,a=[],r=S.LABELS_ORDER,o=e.split("?"),l=o[0],d=o[1],c=d.split("&");for(var u=0,h=c.length;h>u;u++){var p=c[u].split("="),f=unescape(p[0]),m=unescape(p[1]);f&&(t[f]=m)}var g={};for(var _=0,v=r.length;v>_;_++){var y=r[_];if(t.hasOwnProperty(y)){var b=t[y];b!==void 0&&null!=b&&(g[y]=!0,a.push(s(y)+"="+s(t[y])))}}for(var P in t)if(t.hasOwnProperty(P)){if(g[P])continue;var C=t[P];C!==void 0&&null!=C&&a.push(s(P)+"="+s(t[P]))}n=l+"?"+a.join("&"),n=n+(0>n.indexOf("&c8=")?"&c8="+s(k.title):"")+(0>n.indexOf("&c7=")?"&c7="+s(k.URL):"")+(0>n.indexOf("&c9=")?"&c9="+s(k.referrer):"");var A=i.browserAcceptsLargeURLs()?S.URL_LENGTH_LIMIT:S.RESTRICTED_URL_LENGTH_LIMIT;if(n.length>A&&n.indexOf("&")>0){var E=n.substr(0,A-8).lastIndexOf("&");n=(n.substring(0,E)+"&ns_cut="+s(n.substring(E+1))).substr(0,A)}return n}var i=ns_.Utils,n=function(){var e="cs_";return function(){var t="undefined"!=typeof localStorage?localStorage:{};i.extend(this,{get:function(i){return t[e+i]},set:function(i,n){t[e+i]=n},has:function(i){return e+i in t},remove:function(i){delete t[e+i]},clear:function(){for(var e in t)t.hasOwnProperty(e)&&delete t[e]}})}}(),s=function(){var e="cs_",t=function(){var t=this,n="undefined"!=typeof atv&&atv.localStorage!==void 0&&atv.localStorage||null;i.extend(this,{get:function(t){return n&&t&&n.getItem(e+t)||null},set:function(t,i){n&&t&&(n[e+t]=i)},has:function(t){return n&&t&&null!=n.getItem(e+t)||!1},remove:function(t){n&&t&&n.removeItem(e+t)},clear:function(){}})};return t}(),a=function(e,t){if("undefined"!=typeof Image){var i=new Image;i.onload=function(){t&&t(200),i=null},i.onerror=function(){t&&t(),i=null},i.src=e}},r=function(e,t){"undefined"!=typeof XMLHttpRequest&&t&&"undefined"!=typeof setTimeout&&setTimeout(t,0);var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&(t&&t(i.status),i=null)},i.send()},o=function(e,t,i){"undefined"!=typeof XMLHttpRequest&&i&&"undefined"!=typeof setTimeout&&setTimeout(i,0);var n=new XMLHttpRequest;n.open("POST",e,!0),n.onreadystatechange=function(){4===n.readyState&&(i&&i(n.status),n=null)},n.send(t)},l=function(e,t){t&&"undefined"!=typeof setTimeout&&setTimeout(t,0)},d=function(e,t,i){i&&"undefined"!=typeof setTimeout&&setTimeout(i,0)},c=function(){function e(e){var t=l+e;u[t]="",h[t]=[]}function t(e,t){var i=l+e;u[i]+=p+r(t),h[i].push(t)}function n(e,t){var n=l+e,s=h[n];s.splice(i.indexOf(t,s),1);var a=[];for(var o=0,c=s.length;c>o;o++)a.push(r(s[o]));u[n]=a.join(p),delete u[d+e+t]}function s(e,t,i){u[d+e+t]=i}function a(e,t){return u[d+e+t]}var r="undefined"!=typeof encodeURIComponent?encodeURIComponent:escape,o="undefined"!=typeof decodeURIComponent?decodeURIComponent:unescape,l="cs_dir_",d="cs_file_",u="undefined"!=typeof localStorage?localStorage:{},h={},p="|";return{dir:function(e){var t=l+e,i=h[t];if(i)return i.slice();var n=u[t];if(n){n=n.split(p),i=[];for(var s=0,a=n.length;a>s;s++)n[s].length>0&&i.push(o(n[s]));return h[t]=i,i.slice()}return null},append:function(e,t,i){var n=c.read(e,t);n?n+=i:n=i,c.write(e,t,n)},write:function(n,a,r){var o=c.dir(n);o||(e(n),o=[]),-1==i.indexOf(a,o)&&t(n,a),s(n,a,r)},deleteFile:function(e,t){var s=c.dir(e);return s?-1==i.indexOf(t,s)?!1:(n(e,t),!0):!1},read:function(e,t){var n=c.dir(e);return n?-1==i.indexOf(t,n)?null:a(e,t):null}}}(),u=function(){return{dir:function(){return null},append:function(e,t,i){},write:function(e,t,i){},deleteFile:function(){return!1},read:function(){return null}}}(),h=function(e,t){"undefined"!=typeof engine&&t&&"undefined"!=typeof setTimeout&&setTimeout(t,0);var i=engine.createHttpClient(),n=i.createRequest("GET",e,null);n.start(),t&&setTimeout(t,0)},p=function(e,t){if("undefined"!=typeof atv&&"function"==typeof atv.setTimeout){"undefined"!=typeof XMLHttpRequest&&t&&atv.setTimeout(t,0);var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&(t&&t(i.status),i=null)},i.send()}},f=function(e,t,i){if("undefined"!=typeof atv&&"function"==typeof atv.setTimeout){"undefined"!=typeof XMLHttpRequest&&i&&atv.setTimeout(i,0);var n=new XMLHttpRequest;n.open("POST",e,!0),n.onreadystatechange=function(){4===n.readyState&&(i&&i(n.status),n=null)},n.send(t)}},m=function(){return{PLATFORM:"generic",httpGet:a,httpPost:d,Storage:n,IO:u,getCrossPublisherId:function(){return null},getAppName:function(){return Constants.UNKNOWN_VALUE},getAppVersion:function(){return Constants.UNKNOWN_VALUE},getVisitorId:function(){return this.getDeviceName()+ +new Date+~~(1e3*Math.random())},getVisitorIdSuffix:function(){return"72"},getDeviceName:function(){return""},getPlatformVersion:function(){return""},getPlatformName:function(){return"js"},getRuntimeName:function(){return""},getRuntimeVersion:function(){return""},getResolution:function(){return""},getLanguage:function(){return""},getPackageName:function(){return""},isConnectionAvailable:function(){return!0},isCompatible:function(){return!0},autoSelect:function(){},setPlatformAPI:function(){},isCrossPublisherIdChanged:function(){return!1},setTimeout:function(e,t,i){return setTimeout(e,t,i)},clearTimeout:function(e){return clearTimeout(e)},getDeviceArchitecture:function(){return Constants.UNKNOWN_VALUE},getConnectionType:function(){return Constants.UNKNOWN_VALUE},getDeviceJailBrokenFlag:function(){return Constants.UNKNOWN_VALUE}}}(),g=function(){function e(){return"undefined"!=typeof engine&&engine.stats!==void 0}function t(){return i.isNotEmpty(engine.stats.device.id)?engine.stats.device.id:i.isNotEmpty(engine.stats.network.mac)?engine.stats.network.mac:null}function s(){if(null==a){var e=t();null!=e?(a=e,r="31",o=e):(a=+new Date+~~(1e3*Math.random()),r="72",o=null)}}var a=null,r=null,o=null;return{PLATFORM:"trilithium",httpGet:h,httpPost:d,Storage:n,IO:u,getCrossPublisherId:function(){return s(),o},getAppName:function(){return i.isNotEmpty(engine.stats.application.name)?engine.stats.application.name:Constants.UNKNOWN_VALUE},getAppVersion:function(){return i.isNotEmpty(engine.stats.application.version)?engine.stats.application.version:Constants.UNKNOWN_VALUE},getVisitorId:function(){return s(),a},getVisitorIdSuffix:function(){return r},getDeviceName:function(){return i.safeGet(engine.stats.device.platform,"")},getPlatformVersion:function(){return i.safeGet(engine.stats.device.version,"")},getPlatformName:function(){return"js"},getRuntimeName:function(){return"trilithium"},getRuntimeVersion:function(){return""},getResolution:function(){return"undefined"!=typeof screen&&screen.height!==void 0&&screen.width!==void 0?screen.height+"x"+screen.width:""},getLanguage:function(){return""},getPackageName:function(){return""},isConnectionAvailable:function(){return!0},isCompatible:e}}(),_=function(){function e(){return"undefined"==typeof window&&"undefined"!=typeof atv}function t(){null==n&&("undefined"!=typeof atv&&atv.device!==void 0&&atv.device.idForVendor?(n=i.safeGet(atv.device.idForVendor,""),a="62"):(n=+new Date+~~(1e3*Math.random()),a="72"),r=null)}var n=null,a=null,r=null;return{PLATFORM:"atv",httpGet:p,httpPost:f,Storage:s,IO:u,getCrossPublisherId:function(){return t(),r},getAppName:function(){return Constants.UNKNOWN_VALUE},getAppVersion:function(){return Constants.UNKNOWN_VALUE},getVisitorId:function(){return t(),n},getVisitorIdSuffix:function(){return a},getDeviceName:function(){return"Apple TV"},getPlatformVersion:function(){return"undefined"!=typeof atv&&atv.device!==void 0&&i.safeGet(atv.device.softwareVersion,"")},getPlatformName:function(){return"js"},getRuntimeName:function(){return"atv"},getRuntimeVersion:function(){return"undefined"!=typeof atv&&atv.device!==void 0&&i.safeGet(atv.device.softwareVersion,"")},getResolution:function(){return atv.device!==void 0&&atv.device.screenFrame!==void 0&&atv.device.screenFrame.height!==void 0&&atv.device.screenFrame.width!==void 0?atv.device.screenFrame.height+"x"+atv.device.screenFrame.width:""},getLanguage:function(){return"undefined"!=typeof atv&&atv.device!==void 0&&i.safeGet(atv.device.language,"")},getPackageName:function(){return""},isConnectionAvailable:function(){return!0},setTimeout:function(e,t,i){return"undefined"!=typeof atv&&atv.setTimeout!==void 0&&atv.setTimeout(e,t,i)},clearTimeout:function(e){return"undefined"!=typeof atv&&atv.clearTimeout!==void 0&&atv.clearTimeout(e)},isCompatible:e}}(),v=function(){function e(){return"undefined"!=typeof window&&"undefined"!=typeof document}return{PLATFORM:"chromecast",httpGet:a,httpPost:o,Storage:n,IO:c,getCrossPublisherId:function(){return null},getAppName:function(){return"undefined"!=typeof document&&document.title||Constants.UNKNOWN_VALUE},getAppVersion:function(){return Constants.UNKNOWN_VALUE},getVisitorId:function(){return+new Date+~~(1e3*Math.random())},getVisitorIdSuffix:function(){return"72"},getDeviceName:function(){return"chromecast"},getPlatformVersion:function(){return"5"},getPlatformName:function(){return"js"},getRuntimeName:function(){return"html"},getRuntimeVersion:function(){return i.safeGet(i.getBrowserName()+" "+i.getBrowserFullVersion(),Constants.UNKNOWN_VALUE)},getResolution:function(){var e="undefined"!=typeof window&&i.exists(window.screen)&&i.exists(window.screen.availWidth)?window.screen.availWidth:0,t="undefined"!=typeof window&&i.exists(window.screen)&&i.exists(window.screen.availHeight)?window.screen.availHeight:0;return e>0&&t>0?e+"x"+t:""},getLanguage:function(){return"undefined"!=typeof window&&i.exists(window.navigator)&&i.safeGet(window.navigator.language,"")||""},getPackageName:function(){return"undefined"!=typeof castReceiverManager&&castReceiverManager.getApplicationData&&"function"==typeof castReceiverManager.getApplicationData&&castReceiverManager.getApplicationData().namespaces&&castReceiverManager.getApplicationData().namespaces[0]||""},isConnectionAvailable:function(){return"undefined"!=typeof window&&i.exists(window.navigator)&&i.safeGet(window.navigator.onLine,!0)||!0},isCompatible:e,getConnectionType:function(){return Constants.UNKNOWN_VALUE}}}();m.autoSelect=function(){g.isCompatible()?ns_.Utils.extend(m,g):_.isCompatible()&&ns_.Utils.extend(m,_)},m.setPlatformAPI=function(e){var t=!1;switch(e){case ns_.PlatformAPIs.Trilithium:ns_.Utils.extend(m,g),t=!0;break;case ns_.PlatformAPIs.AppleTV:ns_.Utils.extend(m,_),t=!0;break;case ns_.PlatformAPIs.Chromecast:i.extend(m,v),t=!0}t&&(m.autoSelect=function(){})};var y="undefined"!=typeof window&&"undefined"!=typeof document,w,k;y?(w=window,k=document):(w={},k={locat1on:{href:""},title:"",URL:"",referrer:"",cookie:""});var i=i||{};i.filterMap=function(e,t){for(var n in e)e.hasOwnProperty(n)&&-1==i.indexOf(n,t)&&delete e[n]},i.getKeys=function(e,t){var i,n=[];for(i in e)(!t||t.test(i))&&e.hasOwnProperty(i)&&(n[n.length]=i);return n};var b=function(){var e=["play","pause","end","buffer","keep-alive","hb","custom","ad_play","ad_pause","ad_end","ad_click"];return{PLAY:0,PAUSE:1,END:2,BUFFER:3,KEEP_ALIVE:4,HEART_BEAT:5,CUSTOM:6,AD_PLAY:7,AD_PAUSE:8,AD_END:9,AD_CLICK:10,toString:function(t){return e[t]}}}(),P=function(){var e=[b.END,b.PLAY,b.PAUSE,b.BUFFER];return{IDLE:0,PLAYING:1,PAUSED:2,BUFFERING:3,toEventType:function(t){return e[t]}}}(),C={ADPLAY:b.AD_PLAY,ADPAUSE:b.AD_PAUSE,ADEND:b.AD_END,ADCLICK:b.AD_CLICK},S={STREAMSENSE_VERSION:"4.1505.18",DEFAULT_PLAYERNAME:"streamsense",DEFAULT_HEARTBEAT_INTERVAL:[{playingtime:6e4,interval:1e4},{playingtime:null,interval:6e4}],DEFAULT_KEEP_ALIVE_INTERVAL:12e5,DEFAULT_PAUSED_ON_BUFFERING_INTERVAL:500,C1_VALUE:"19",C10_VALUE:"js",NS_AP_C12M_VALUE:"1",NS_NC_VALUE:"1",PAGE_NAME_LABEL:"name",RESTRICTED_URL_LENGTH_LIMIT:2048,URL_LENGTH_LIMIT:4096,LABELS_ORDER:["c1","c2","ca2","cb2","cc2","cd2","ns_site","ca_ns_site","cb_ns_site","cc_ns_site","cd_ns_site","ns_vsite","ca_ns_vsite","cb_ns_vsite","cc_ns_vsite","cd_ns_vsite","ns_ap_an","ca_ns_ap_an","cb_ns_ap_an","cc_ns_ap_an","cd_ns_ap_an","ns_ap_pn","ns_ap_pv","c12","ca12","cb12","cc12","cd12","ns_ak","ns_ap_hw","name","ns_ap_ni","ns_ap_ec","ns_ap_ev","ns_ap_device","ns_ap_id","ns_ap_csf","ns_ap_bi","ns_ap_pfm","ns_ap_pfv","ns_ap_ver","ca_ns_ap_ver","cb_ns_ap_ver","cc_ns_ap_ver","cd_ns_ap_ver","ns_ap_sv","ns_ap_cv","ns_type","ca_ns_type","cb_ns_type","cc_ns_type","cd_ns_type","ns_radio","ns_nc","ns_ap_ui","ca_ns_ap_ui","cb_ns_ap_ui","cc_ns_ap_ui","cd_ns_ap_ui","ns_ap_gs","ns_st_sv","ns_st_pv","ns_st_it","ns_st_id","ns_st_ec","ns_st_sp","ns_st_sq","ns_st_cn","ns_st_ev","ns_st_po","ns_st_cl","ns_st_el","ns_st_pb","ns_st_hc","ns_st_mp","ca_ns_st_mp","cb_ns_st_mp","cc_ns_st_mp","cd_ns_st_mp","ns_st_mv","ca_ns_st_mv","cb_ns_st_mv","cc_ns_st_mv","cd_ns_st_mv","ns_st_pn","ns_st_tp","ns_st_pt","ns_st_pa","ns_st_ad","ns_st_li","ns_st_ci","ns_ap_jb","ns_ap_res","ns_ap_sd","ns_ap_po","ns_ap_ot","ns_ap_c12m","cs_c12u","ns_ap_install","ns_ap_updated","ns_ap_lastrun","ns_ap_cs","ns_ap_runs","ns_ap_usage","ns_ap_fg","ns_ap_ft","ns_ap_dft","ns_ap_bt","ns_ap_dbt","ns_ap_dit","ns_ap_as","ns_ap_das","ns_ap_it","ns_ap_uc","ns_ap_aus","ns_ap_daus","ns_ap_us","ns_ap_dus","ns_ap_ut","ns_ap_oc","ns_ap_uxc","ns_ap_uxs","ns_ap_lang","ns_ap_ar","ns_ap_miss","ns_ts","ns_st_ca","ns_st_cp","ns_st_er","ca_ns_st_er","cb_ns_st_er","cc_ns_st_er","cd_ns_st_er","ns_st_pe","ns_st_ui","ca_ns_st_ui","cb_ns_st_ui","cc_ns_st_ui","cd_ns_st_ui","ns_st_bc","ns_st_bt","ns_st_bp","ns_st_pc","ns_st_pp","ns_st_br","ns_st_ub","ns_st_vo","ns_st_ws","ns_st_pl","ns_st_pr","ns_st_ep","ns_st_ty","ns_st_ct","ns_st_cs","ns_st_ge","ns_st_st","ns_st_dt","ns_st_de","ns_st_pu","ns_st_cu","ns_st_fee","ns_ap_i1","ns_ap_i2","ns_ap_i3","ns_ap_i4","ns_ap_i5","ns_ap_i6","ns_ap_referrer","ns_clid","ns_campaign","ns_source","ns_mchannel","ns_linkname","ns_fee","gclid","utm_campaign","utm_source","utm_medium","utm_term","utm_content","c3","ca3","cb3","cc3","cd3","c4","ca4","cb4","cc4","cd4","c5","ca5","cb5","cc5","cd5","c6","ca6","cb6","cc6","cd6","c10","c11","c13","c14","c15","c16","c7","c8","c9","ns_ap_er"]},A=function(){return function(){function e(e,t){var i=t[e];
null!=i&&(c[e]=i)}var t=this,n=0,s=0,a=0,r=0,o=0,l=0,d,c;i.extend(this,{reset:function(e){null!=e&&e.length>0?i.filterMap(c,e):c={},c.hasOwnProperty("ns_st_cl")||(c.ns_st_cl="0"),c.hasOwnProperty("ns_st_pn")||(c.ns_st_pn="1"),c.hasOwnProperty("ns_st_tp")||(c.ns_st_tp="1"),t.setPauses(0),t.setStarts(0),t.setBufferingTime(0),t.setBufferingTimestamp(-1),t.setPlaybackTime(0),t.setPlaybackTimestamp(-1)},setLabels:function(e,n){null!=e&&i.extend(c,e),t.setRegisters(c,n)},getLabels:function(){return c},setLabel:function(e,i){var n={};n[e]=i,t.setLabels(n,null)},getLabel:function(e){return c[e]},getClipId:function(){return(d===void 0||null==d)&&t.setClipId("1"),d},setClipId:function(e){d=e},setRegisters:function(i,r){var l=i.ns_st_cn;null!=l&&(t.setClipId(l),delete i.ns_st_cn),l=i.ns_st_bt,null!=l&&(a=Number(l),delete i.ns_st_bt),e("ns_st_cl",i),e("ns_st_pn",i),e("ns_st_tp",i),e("ns_st_ub",i),e("ns_st_br",i),(r==P.PLAYING||null==r)&&(l=i.ns_st_sq,null!=l&&(s=Number(l),delete i.ns_st_sq)),r!=P.BUFFERING&&(l=i.ns_st_pt,null!=l&&(o=Number(l),delete i.ns_st_pt)),(r==P.PAUSED||r==P.IDLE||null==r)&&(l=i.ns_st_pc,null!=l&&(n=Number(l),delete i.ns_st_pc))},createLabels:function(e,a){var r=a||{};return r.ns_st_cn=t.getClipId(),r.ns_st_bt=t.getBufferingTime()+"",(e==b.PLAY||null==e)&&(r.ns_st_sq=s+""),(e==b.PAUSE||e==b.END||e==b.KEEP_ALIVE||e==b.HEART_BEAT||null==e)&&(r.ns_st_pt=t.getPlaybackTime()+"",r.ns_st_pc=n+""),i.extend(r,t.getLabels()),r},incrementPauses:function(){n++},incrementStarts:function(){s++},getBufferingTime:function(){var e=a;return r>=0&&(e+=+new Date-r),e},setBufferingTime:function(e){a=e},getPlaybackTime:function(){var e=o;return l>=0&&(e+=+new Date-l),e},setPlaybackTime:function(e){o=e},getPlaybackTimestamp:function(){return l},setPlaybackTimestamp:function(e){l=e},getBufferingTimestamp:function(){return r},setBufferingTimestamp:function(e){r=e},getPauses:function(){return n},setPauses:function(e){n=e},getStarts:function(){return s},setStarts:function(e){s=e}}),c={},t.reset()}}(),E=function(){return function(){var e=this,t=null,n,s=0,a=0,r=0,o=0,l=0,d,c=0,u=!1;i.extend(this,{reset:function(t){null!=t&&t.length>0?i.filterMap(d,t):d={},e.setPlaylistId(+new Date+"_"+c),e.setBufferingTime(0),e.setPlaybackTime(0),e.setPauses(0),e.setStarts(0),e.setRebufferCount(0),u=!1},setLabels:function(t,n){null!=t&&i.extend(d,t),e.setRegisters(d,n)},getLabels:function(){return d},setLabel:function(t,i){var n={};n[t]=i,e.setLabels(n,null)},getLabel:function(e){return d[e]},getClip:function(){return t},getPlaylistId:function(){return n},setPlaylistId:function(e){n=e},setRegisters:function(e,t){var i=e.ns_st_sp;null!=i&&(s=Number(i),delete e.ns_st_sp),i=e.ns_st_bc,null!=i&&(r=Number(i),delete e.ns_st_bc),i=e.ns_st_bp,null!=i&&(o=Number(i),delete e.ns_st_bp),i=e.ns_st_id,null!=i&&(n=i,delete e.ns_st_id),t!=P.BUFFERING&&(i=e.ns_st_pa,null!=i&&(l=Number(i),delete e.ns_st_pa)),(t==P.PAUSED||t==P.IDLE||null==t)&&(i=e.ns_st_pp,null!=i&&(a=Number(i),delete e.ns_st_pp))},createLabels:function(t,o){var l=o||{};return l.ns_st_bp=e.getBufferingTime()+"",l.ns_st_sp=s+"",l.ns_st_id=n+"",r>0&&(l.ns_st_bc=r+""),(t==b.PAUSE||t==b.END||t==b.KEEP_ALIVE||t==b.HEART_BEAT||null==t)&&(l.ns_st_pa=e.getPlaybackTime()+"",l.ns_st_pp=a+""),(t==b.PLAY||null==t)&&(e.didFirstPlayOccurred()||(l.ns_st_pb="1",e.setFirstPlayOccurred(!0))),i.extend(l,e.getLabels()),l},incrementStarts:function(){s++},incrementPauses:function(){a++,t.incrementPauses()},setPlaylistCounter:function(e){c=e},incrementPlaylistCounter:function(){c++},addPlaybackTime:function(i){if(t.getPlaybackTimestamp()>=0){var n=i-t.getPlaybackTimestamp();t.setPlaybackTimestamp(-1),t.setPlaybackTime(t.getPlaybackTime()+n),e.setPlaybackTime(e.getPlaybackTime()+n)}},addBufferingTime:function(i){if(t.getBufferingTimestamp()>=0){var n=i-t.getBufferingTimestamp();t.setBufferingTimestamp(-1),t.setBufferingTime(t.getBufferingTime()+n),e.setBufferingTime(e.getBufferingTime()+n)}},getBufferingTime:function(){var e=o;return t.getBufferingTimestamp()>=0&&(e+=+new Date-t.getBufferingTimestamp()),e},setBufferingTime:function(e){o=e},getPlaybackTime:function(){var e=l;return t.getPlaybackTimestamp()>=0&&(e+=+new Date-t.getPlaybackTimestamp()),e},setPlaybackTime:function(e){l=e},getStarts:function(){return s},setStarts:function(e){s=e},getPauses:function(){return a},setPauses:function(e){a=e},getRebufferCount:function(){return r},incrementRebufferCount:function(){r++},setRebufferCount:function(e){r=e},didFirstPlayOccurred:function(){return u},setFirstPlayOccurred:function(e){u=e}}),t=new A,d={},e.reset()}}(),I=function(){var n=function(n,s,a){function r(e){var t=0;if(null!=lt)for(var i=0;lt.length>i;i++){var n=lt[i],s=n.playingtime;if(!s||s>e){t=n.interval;break}}return t}function o(){u();var e=r(it.getClip().getPlaybackTime());if(e>0){var t=ut>0?ut:e;ot=m.setTimeout(c,t)}ut=0}function l(){u();var e=r(it.getClip().getPlaybackTime());ut=e-it.getClip().getPlaybackTime()%e,null!=ot&&u()}function d(){ut=0,pt=0,ht=0}function c(){ht++;var e=j(b.HEART_BEAT,null);I(e),ut=0,o()}function u(){null!=ot&&(m.clearTimeout(ot),ot=null)}function h(){f(),rt=m.setTimeout(p,dt)}function p(){var e=j(b.KEEP_ALIVE,null);I(e),tt++,h()}function f(){null!=rt&&(m.clearTimeout(rt),rt=null)}function g(){v(),G.isPauseOnBufferingEnabled()&&x(P.PAUSED)&&(st=m.setTimeout(_,ct))}function _(){if(mt==P.PLAYING){it.incrementRebufferCount(),it.incrementPauses();var e=j(b.PAUSE,null);I(e),tt++,mt=P.PAUSED}}function v(){null!=st&&(m.clearTimeout(st),st=null)}function y(e){return e==P.PLAYING||e==P.PAUSED}function w(){X&&(m.clearTimeout(X),X=null)}function k(e){return e==b.PLAY?P.PLAYING:e==b.PAUSE?P.PAUSED:e==b.BUFFER?P.BUFFERING:e==b.END?P.IDLE:null}function C(e,t,n){if(w(),n)X=m.setTimeout(function(e,t){return function(){C(e,t)}}(e,t),n);else if(R(e)){var s=N(),a=K,r=O(t),o=a>=0?r-a:0;V(N(),t),M(e,t),$(N()),F(e);for(var l=0,d=yt.length;d>l;l++)yt[l](s,e,t,o);A(t),it.setRegisters(t,e),it.getClip().setRegisters(t,e);var c=j(P.toEventType(e),t);i.extend(c,t),x(et)&&(I(c),mt=et,tt++)}}function A(e){var t=e.ns_st_mp;null!=t&&(gt=t,delete e.ns_st_mp),t=e.ns_st_mv,null!=t&&(_t=t,delete e.ns_st_mv),t=e.ns_st_ec,null!=t&&(tt=Number(t),delete e.ns_st_ec)}function I(e,i){void 0===i&&(i=!0),i&&L(e);var n=G.getPixelURL();if(nt){if(!T()){var s=wt.am,a=wt.et,r=s.newApplicationMeasurement(nt,a.HIDDEN,e,n);nt.getQueue().offer(r)}}else n&&m.httpGet(t(n,e))}function T(){var e=nt.getAppContext(),t=nt.getSalt(),i=nt.getPixelURL();return null==e||null==t||0==t.length||null==i||0==i.length}function L(e){vt=j(null),i.extend(vt,e)}function V(e,t){var n=O(t);if(e==P.PLAYING)it.addPlaybackTime(n),l(),f();else if(e==P.BUFFERING)it.addBufferingTime(n),v();else if(e==P.IDLE){var s=i.getKeys(it.getClip().getLabels());it.getClip().reset(s)}}function M(e,t){var i=O(t);J=D(t),e==P.PLAYING?(o(),h(),it.getClip().setPlaybackTimestamp(i),x(e)&&(it.getClip().incrementStarts(),1>it.getStarts()&&it.setStarts(1))):e==P.PAUSED?x(e)&&it.incrementPauses():e==P.BUFFERING?(it.getClip().setBufferingTimestamp(i),at&&g()):e==P.IDLE&&d()}function x(e){return e!=P.PAUSED&&e!=P.IDLE||mt!=P.IDLE&&null!=mt?e!=P.BUFFERING&&mt!=e:!1}function D(e){var t=-1;return e.hasOwnProperty("ns_st_po")&&(t=i.getInteger(e.ns_st_po)),t}function O(e){var t=-1;return e.hasOwnProperty("ns_ts")&&(t=Number(e.ns_ts)),t}function R(e){return null!=e&&N()!=e}function F(e){et=e,K=+new Date}function N(){return et}function $(e){Z=e}function U(){return Z}function j(){var e,t;1==arguments.length?(e=P.toEventType(et),t=arguments[0]):(e=arguments[0],t=arguments[1]);var n={};if("undefined"!=typeof document){var s=document;n.c7=s.URL,n.c8=s.title,n.c9=s.referrer}return null!=t&&i.extend(n,t),n.hasOwnProperty("ns_ts")||(n.ns_ts=+new Date+""),null!=e&&!n.hasOwnProperty("ns_st_ev")&&(n.ns_st_ev=b.toString(e)),i.extend(n,G.getLabels()),B(e,n),it.createLabels(e,n),it.getClip().createLabels(e,n),n.hasOwnProperty("ns_st_mp")||(n.ns_st_mp=gt),n.hasOwnProperty("ns_st_mv")||(n.ns_st_mv=_t),n.hasOwnProperty("ns_st_ub")||(n.ns_st_ub="0"),n.hasOwnProperty("ns_st_br")||(n.ns_st_br="0"),n.hasOwnProperty("ns_st_pn")||(n.ns_st_pn="1"),n.hasOwnProperty("ns_st_tp")||(n.ns_st_tp="1"),n.hasOwnProperty("ns_st_it")||(n.ns_st_it="c"),n.ns_st_sv=S.STREAMSENSE_VERSION,n.ns_type="hidden",n}function B(e,t){var n=t||{};if(n.ns_st_ec=tt+"",!n.hasOwnProperty("ns_st_po")){var s=J,a=O(n);(e==b.PLAY||e==b.KEEP_ALIVE||e==b.HEART_BEAT||null==e&&et==P.PLAYING)&&(s+=a-it.getClip().getPlaybackTimestamp()),n.ns_st_po=i.getInteger(s)}return e==b.HEART_BEAT&&(n.ns_st_hc=ht+""),n}function H(e){var t=O(e);0>t&&(e.ns_ts=+new Date+"")}function Q(e,t,i){t=t||{},t.ns_st_ad=1,e>=b.AD_PLAY&&b.AD_CLICK>=e&&G.notify(e,t,i)}function q(e,t){G.notify(b.CUSTOM,e,t)}var G=this,W=500,Y,z=null,K=0,J=0,X,Z,et,tt=0,it=null,nt,st,at=!0,rt,ot,lt=S.DEFAULT_HEARTBEAT_INTERVAL,dt=S.DEFAULT_KEEP_ALIVE_INTERVAL,ct=S.DEFAULT_PAUSED_ON_BUFFERING_INTERVAL,ut=0,ht=0,pt=0,ft=!1,mt,gt,_t,vt,yt,wt={};a?m.setPlatformAPI(a):m.autoSelect(),i.extend(this,{reset:function(e){it.reset(e),it.setPlaylistCounter(0),it.setPlaylistId(+new Date+"_1"),it.getClip().reset(e),null==e||e.isEmpty()?Y={}:i.filterMap(Y,e),tt=1,ht=0,l(),d(),f(),v(),w(),et=P.IDLE,Z=null,K=-1,mt=null,gt=S.DEFAULT_PLAYERNAME,_t=S.STREAMSENSE_VERSION,vt=null},setPauseOnBufferingInterval:function(e){ct=e},getPauseOnBufferingInterval:function(){return ct},setKeepAliveInterval:function(e){dt=e},getKeepAliveInterval:function(){return dt},setHeartbeatIntervals:function(e){lt=e},notify:function(){var e,t,n,s;if(t=arguments[0],3==arguments.length?(n=arguments[1],s=arguments[2]):(n={},s=arguments[1]),b.toString(t)){e=k(t);var a=i.extend({},n);if(H(a),a.hasOwnProperty("ns_st_po")||(a.ns_st_po=""+i.getInteger(s)),t==b.PLAY||t==b.PAUSE||t==b.BUFFER||t==b.END)G.isThrottlingEnabled()&&y(et)&&y(e)&&(et!=P.PLAYING||e!=P.PAUSED||X)?C(e,a,W):C(e,a);else{var r=j(t,a);i.extend(r,a),I(r,!1),tt++}}},getLabels:function(){return Y},getState:function(){return et},setLabels:function(e){for(var t in e)e.hasOwnProperty(t)&&G.setLabel(t,e[t])},getLabel:function(e){return Y[e]},setLabel:function(e,t){null==t?delete Y[e]:Y[e]=t},setPixelURL:function(e){if(null==e||0==e.length)return null;var t=decodeURIComponent||unescape,i=e.indexOf("?");if(i>=0){if(e.length-1>i){var n=e.substring(i+1).split("&");for(var s=0,a=n.length;a>s;s++){var r=n[s],o=r.split("=");2==o.length?G.setLabel(o[0],t(o[1])):1==o.length&&G.setLabel(S.PAGE_NAME_LABEL,t(o[0]))}e=e.substring(0,i+1)}}else e+="?";return z=e},getPixelURL:function(){return z?z:"undefined"!=typeof ns_p&&"string"==typeof ns_p.src?z=ns_p.src.replace(/&/,"&").replace(/&ns__t=\d+/,""):"string"==typeof ns_pixelUrl?z=ns_pixelUrl.replace(/&/,"&").replace(/&ns__t=\d+/,""):null},isPauseOnBufferingEnabled:function(){return at},setPauseOnBufferingEnabled:function(e){at=e},isThrottlingEnabled:function(){return ft},setThrottlingEnabled:function(e){ft=e},setThrottlingDelay:function(e){e&&e>0&&(W=e)},getThrottlingDelay:function(){return W},setClip:function(e,t){var i=!1;return et==P.IDLE&&(it.getClip().reset(),it.getClip().setLabels(e,null),t&&it.incrementStarts(),i=!0),i},setPlaylist:function(e){var t=!1;return et==P.IDLE&&(it.incrementPlaylistCounter(),it.reset(),it.getClip().reset(),it.setLabels(e,null),t=!0),t},importState:function(e){reset();var t=i.extend({},e);it.setRegisters(t,null),it.getClip().setRegisters(t,null),A(t),tt++},exportState:function(){return vt},getVersion:function(){return S.STREAMSENSE_VERSION},addListener:function(e){yt.push(e)},removeListener:function(e){yt.splice(i.indexOf(e,yt),1)},getClip:function(){return it.getClip()},getPlaylist:function(){return it},setHttpGet:function(e){"function"==typeof e&&(m.httpGet=e)},setHttpPost:function(e){"function"==typeof e&&(m.httpPost=e)}}),i.extend(this,{adNotify:Q,customNotify:q,viewNotify:function(t,i){t=t||G.getPixelURL(),t&&e(t,i)}}),ns_.comScore&&(wt=ns_.comScore.exports,nt=wt.c()),Y={},tt=1,et=P.IDLE,it=new E,st=null,at=!0,ot=null,ht=0,d(),rt=null,X=null,ft=!1,mt=null,J=0,yt=[],G.reset(),n&&G.setLabels(n),s&&G.setPixelURL(s)};return function(e){function t(e,t){return b[C]||s(e,t)}function n(){C=-1;for(var e=0;P>=e;e++)if(b.hasOwnProperty(e+"")){C=e;break}return ns_.StreamSense.activeIndex=C,C}function s(e,t){return e=e||null,t=t||null,e&&"object"==typeof e&&(t=e,e=null),b[++P]=new ns_.StreamSense(t,e),n(),b[P]}function a(){var e=!1,t=C;if("number"==typeof arguments[0]&&isFinite(arguments[0]))t=arguments[0];else if(arguments[0]instanceof ns_.StreamSense)for(var i in b)if(b.hasOwnProperty(i)&&b[i]===arguments[0]){t=i;break}return b.hasOwnProperty(t+"")&&(e=b[t],delete b[t],e.reset(),n()),e}function r(e){return e=e||{},t().setPlaylist(e),t().getPlaylist()}function o(e,i,n){return e=e||{},"number"==typeof i&&(e.ns_st_cn=i),t().setClip(e,n),t().getClip()}function l(e,i,n){return e===void 0?!1:(n=n||null,i=i||{},t().notify(e,i,n))}function d(e){e!==void 0&&t().setLabels(e)}function c(){return t().getLabels()}function u(e){e!==void 0&&t().getPlaylist().setLabels(e)}function h(){return t().getPlaylist().getLabels()}function p(e){e!==void 0&&t().getClip().setLabels(e)}function f(){return t().getClip().getLabels()}function m(e){return t().reset(e||{})}function g(e){return t().getPlaylist().reset(e||{})}function _(e){return t().getClip().reset(e||{})}function v(e){return e=e||{},t().viewNotify(null,e)}function y(e,i){return arguments.length>2&&(e=arguments[1],i=arguments[2]),e=e||{},"number"==typeof i&&(e.ns_st_po=i),t().customNotify(e,i)}function w(){return t().exportState()}function k(e){t().importState(e)}var b={},P=-1,C=-1;i.extend(e,{activeIndex:C,newInstance:s,"new":s,destroyInstance:a,destroy:a,newPlaylist:r,newClip:o,notify:l,setLabels:d,getLabels:c,setPlaylistLabels:u,getPlaylistLabels:h,setClipLabels:p,getClipLabels:f,resetInstance:m,resetPlaylist:g,resetClip:_,viewEvent:v,customEvent:y,exportState:w,importState:k})}(n),n}();return I.AdEvents=C,I.PlayerEvents=b,I.InternalStates=P,I.getPlatformAPI=function(){return m},I}(),ns_.StreamingTag=ns_.StreamingTag||function(){var e=ns_.Utils,t=ns_.StreamSense,i=ns_.StreamSense.PlayerEvents,n=ns_.StreamSense.AdEvents,s=ns_.StreamSense.InternalStates||null,a=null!=ns_.StreamSense.InternalStates;return function(){var n=function(n){function r(){if(a)if(ns_.comScore)w=new t,w.setLabel("ns_st_it","r");else if(e.exists(n))if(k=e.isTrue(n.debug),e.exists(n.customerC2)&&n.customerC2.length>0){var i=n.secure?"https://sb":"http"+("s"==((I11C || I10C).PreLocationContextProxy)(document).locat1on.href.charAt(4)?"s://sb":"://b");w=new t,w.setPixelURL(i+".scorecardresearch.com/p?c1=2"),w.setLabel("c2",n.customerC2),w.setLabel("ns_st_it","r")}else k&&console&&console.log("Warning: customerC2 is not provided (or incorrect) in the StreamingTag configuration.")}function o(t){return e.exists(t)||(t={}),e.exists(t.ns_st_ci)||(t.ns_st_ci="0"),e.exists(t.c3)||(t.c3="*null"),e.exists(t.c4)||(t.c4="*null"),e.exists(t.c6)||(t.c6="*null"),t}function l(e){return g>0&&e>=g?_+=e-g:_=0,_}function d(e){w.getState()!=s.IDLE&&w.getState()!=s.PAUSED?w.notify(i.END,l(e)):w.getState()==s.PAUSED&&w.notify(i.END,_)}function c(e){return u("ns_st_ci",v,e)&&u("c3",v,e)&&u("c4",v,e)&&u("c6",v,e)}function u(t,i,n){if(e.exists(t)&&e.exists(i)&&e.exists(n)){var s=i[t],a=n[t];return e.exists(s)&&e.exists(a)&&s===a}return!1}function h(t,n){d(t),m++;var s={ns_st_cn:m,ns_st_pn:"1",ns_st_tp:"0"};e.extend(s,n),w.setClip(s),v=n,g=t,_=0,w.notify(i.PLAY,_)}function p(t){var n=+new Date;d(n),m++,t=o(t);var s={ns_st_cn:m,ns_st_pn:"1",ns_st_tp:"1",ns_st_ad:"1"};e.extend(s,t),w.setClip(s),_=0,w.notify(i.PLAY,_),g=n,y=!1}function f(e,t){var n=+new Date;e=o(e),P==b.None&&(P=t),y&&P==t?c(e)?(w.getClip().setLabels(e),w.getState()!=s.PLAYING&&(g=n,w.notify(i.PLAY,_))):h(n,e):h(n,e),y=!0,P=t}var m=0,g=0,_=0,v=null,y=!1,w=null,k=!1,b={None:0,AudioContent:1,VideoContent:2},P=b.None;e.extend(this,{playAdvertisement:function(){if(w){k&&console&&console.warn("Calling deprecated function 'playAdvertisement'. Please call 'playVideoAdvertisement' or 'playAudioAdvertisement' functions instead.");var e={ns_st_ct:"va"};p(e)}},playVideoAdvertisement:function(t){if(w){var i={ns_st_ct:"va"};t&&e.extend(i,t),p(i)}},playAudioAdvertisement:function(t){if(w){var i={ns_st_ct:"aa"};t&&e.extend(i,t),p(i)}},playContentPart:function(t){if(w){k&&console&&console.warn("Calling deprecated function 'playContentPart'. Please call 'playVideoContentPart' or 'playAudioContentPart' functions instead.");var i={ns_st_ct:"vc"};t&&e.extend(i,t),f(i,b.VideoContent)}},playVideoContentPart:function(t){if(w){var i={ns_st_ct:"vc"};t&&e.extend(i,t),f(i,b.VideoContent)}},playAudioContentPart:function(t){if(w){var i={ns_st_ct:"ac"};t&&e.extend(i,t),f(i,b.AudioContent)}},stop:function(){if(w){var e=+new Date;w.notify(i.PAUSE,l(e))}}}),r()};return function(e){}(n),n}()}(),SCMPlayer_VPAIDJsLoader=function(){this._vpaidEvents=["AdError","AdLog","AdStarted","AdStopped","AdSkipped","AdLoaded","AdLinearChange","AdSizeChange","AdExpandedChange","AdSkippableStateChange","AdDurationChange","AdRemainingTimeChange","AdVolumeChange","AdImpression","AdClickThru","AdInteraction","AdVideoStart","AdVideoFirstQuartile","AdVideoMidpoint","AdVideoThirdQuartile","AdVideoComplete","AdUserAcceptInvitation","AdUserMinimize","AdUserClose","AdPaused","AdPlaying"],this.VPAID_2_VAST={AdSkipped:"skip",AdStarted:"creativeView",AdMute:"mute",AdUnMute:"unmute",AdImpression:"impression",AdVideoStart:"start",AdVideoFirstQuartile:"firstQuartile",AdVideoMidpoint:"midpoint",AdVideoThirdQuartile:"thirdQuartile",AdVideoComplete:"complete",AdClickThru:"click",AdPaused:"pause",AdPlaying:"resume",AdError:"error",AdUserAcceptInvitation:"acceptInvitation",AdUserMinimize:"collapse",AdUserClose:"close"},this.loaderId=window.fskVideoDivId+"_vpaid_js",this.ads={},document.getElementById(this.loaderId)||(jQuery("#"+window.fskVideoDivId+"_media").before(''),this._viewableEvent=!1,this._handleViewableTimeout=function(e){if(!this._viewableEvent&&(this._viewableEvent=!0,this._currentVideo.events.viewable!==void 0)){var t=this._currentVideo.events.viewable;for(var i in t)window._FskVastParser._addPixel(t[i],"viewable")}},this._handleTimeout=function(e){if(void 0!==this._currentVideo&&!this._currentVideo._impression){this.scmLog("timeoutoptout",this._currentVideo,"");try{this.ads[this._currentVideo._id]._VPAIDCreative.stopAd()}catch(t){}this._currentVideo._killed=!0,this._listener("AdInvalid","timeout",this._currentVideo._id)}},this.initNewAd=function(e){var t=this,i=document.createElement("iframe");e._id===void 0&&(e._id=e.ssp),i.id=e._id+"_html",i.style.display="block",i.style.width="100%",i.style.height="100%",i.style.position="absolute",i.style.top=0,i.style.left=0,i.style.display="none",i.frameBorder=0,i.style.border="none",i.scrolling="no",document.getElementById(this.loaderId).appendChild(i),i.contentWindow.document.open(),i.contentWindow.document.write('
'),i.contentWindow.document.close();var n=i.contentWindow.document.getElementById("container");jQuery(n).append('
');var s=i.contentWindow.document.getElementById("ad-slot");i.contentWindow.document.body.style.margin="0",jQuery(s).append($("
").attr({id:window.fskVideoDivId+"_html",loop:!1,autoplay:!1,preload:"none",controls:"false",muted:"muted",playsinline:"playsinline","x-webkit-airplay":"allow"}).prop({controls:!1,volume:0}).css({width:"100%",height:"100%",position:"absolute",top:0,left:0}));var a=i.contentWindow.document.createElement("SCRIPT");a.onreadystatechange=a.onload=function(){(!a.readyState||/loaded|complete/.test(a.readyState))&&t.initializeAd(e._id)},a.async=!0,a.src=e.url,i.contentWindow.document.head.appendChild(a),e.events={};try{e.events=JSON.parse(e.evt)}catch(r){}this.ads[e._id]={iframe:i,data:e}},this.checkVPAIDInterface=function(e){return e.handshakeVersion&&"function"==typeof e.handshakeVersion&&e.initAd&&"function"==typeof e.initAd&&e.startAd&&"function"==typeof e.startAd&&e.stopAd&&"function"==typeof e.stopAd&&e.skipAd&&"function"==typeof e.skipAd&&e.resizeAd&&"function"==typeof e.resizeAd&&e.pauseAd&&"function"==typeof e.pauseAd&&e.resumeAd&&"function"==typeof e.resumeAd&&e.expandAd&&"function"==typeof e.expandAd&&e.collapseAd&&"function"==typeof e.collapseAd&&e.subscribe&&"function"==typeof e.subscribe&&e.unsubscribe&&"function"==typeof e.unsubscribe?!0:!1},this.getVPAIDAd=function(e){return this.ads[e]},this.setListener=function(e){this._listener=e},this._getVPAIDListener=function(e,t){var i=this;return function(n){i._handleVPAIDEvent(e,t,n)}},this._kill=function(e){for(var t in this.ads)if(t!=e){try{this.ads[t]._VPAIDCreative.stopAd()}catch(i){}jQuery(this.ads[t].iframe).remove(),delete this.ads[t]}},this.scmLog=function(e,t,i){var n="";if(t){var s=null;var a="3";var r="vpaidloader";t.video!==void 0&&t.video?(s="",a="1"):(s=t.tagId,r=t.dealId?"deal_"+t.dealId:r),n+=s+";;"+r+";"}null!=i&&(n+=i),t._video!==void 0?window.SCMPlayer_logger(e,n,a,t._video.id,t._video.dealId):window.SCMPlayer_logger(e,n,a)},this.startAd=function(){var e=this;void 0!==this._currentVideo&&(void 0!==this._currentVideo._start&&this._currentVideo._start||(this._currentVideo._start=!0,window._timeoutLoaded=window.setTimeout(function(){e._handleTimeout()},2600)))},this.setItem=function(e){for(var t in this.ads){var i=this.ads[t];if(null!=i&&i.data._id==e){this._currentVideo=i.data,this.scmLog("LoaderStartHB",i.data,"0");break}}},this._handleVPAIDEvent=function(e,t,i){var n=e._id;if(void 0===e._killed||!e._killed){var s=this;switch(t){case"AdImpression":e._impression=!0,window.clearTimeout(window._timeoutLoaded),window._viewableTimeout&&window.clearTimeout(window._viewableTimeout),window._viewableTimeout=window.setTimeout(function(){s._handleViewableTimeout.call(s)},2e3),this._kill(n);break;case"AdError":window._timeoutLoaded&&window.clearTimeout(window._timeoutLoaded),e._killed=!0;var a="";try{a=JSON.stringify(i)}catch(r){}this.scmLog("optout",e,a);break;case"AdStopped":case"AdPaused":window._viewableTimeout&&window.clearTimeout(window._viewableTimeout);break;case"AdPlaying":if(e._impression===void 0||!e._impression||this._viewableEvent)break;window._viewableTimeout&&window.clearTimeout(window._viewableTimeout),window._viewableTimeout=window.setTimeout(function(){s._handleViewableTimeout.call(s)},2e3)}"AdError"==t?this._listener("AdInvalid",i,e._id):"AdLoaded"==t?this._listener(t,i,e._id):this._currentVideo!==void 0&&this._currentVideo._id==e._id&&"AdLog"!=t&&(this._logPixel(t,i),this._listener!==void 0&&this._listener(t,i,n))}},this._logPixel=function(e,t){var i;if("AdVolumeChange"==e){var n=this.ads[this._currentVideo._id]._VPAIDCreative.getAdVolume();e=n>0?"AdUnMute":"AdMute"}if(this.VPAID_2_VAST[e]!==void 0&&(i=this.VPAID_2_VAST[e]),i&&this._currentVideo.events!==void 0&&this._currentVideo.events[i]!==void 0){var s=this._currentVideo.events[i];for(var a in s)window._FskVastParser._addPixel(s[a],i)}},this.initializeAd=function(e){var t=this,i=this.ads[e],n=this.ads[e].iframe.contentWindow.getVPAIDAd;if(n&&"function"==typeof n){if(i._VPAIDCreative=n(),!this.checkVPAIDInterface(i._VPAIDCreative))return;if(i._vpaidVersion=i._VPAIDCreative.handshakeVersion("2.0").split("."),parseInt(i._vpaidVersion[0])>2)return;for(var s=0;this._vpaidEvents.length>s;s++){var a=this._vpaidEvents[s];i._VPAIDCreative.subscribe(t._getVPAIDListener(i.data,a),a,t)}i._VPAIDCreative.initAd(jQuery(".fsk_split_box_video_container>div").width(),jQuery(".fsk_split_box_video_container>div").height(),"normal",1200,{AdParameters:i.data.env},{slot:i.iframe.contentWindow.document.getElementById("ad-slot"),videoSlot:i.iframe.contentWindow.document.getElementById(window.fskVideoDivId+"_html"),videoSlotCanAutoPlay:!0})}})},SCMPlayer_AdParser=function(){this.ready=!1,this.config={type:"application/xml",urlPreprocessor:SCMPlayer_UrlPreprocessor,adParametersPreprocessor:function(e){return e.replace('"safety":{"referrer":1}','"safety":{"referrer":0}')}},this._getConfig=function(e){return this.config[e]===void 0?void 0:this.config[e]},this._getLocation=function(e){var t=document.createElement("a");return t.href=e,t},this.log=function(e,t){SCMPlayer_logger(e,t,"1",this._video.id,this._video.dealId)},this.setListener=function(e){this.callback=e},this._cleanResponse=function(e,t){var i=!1;switch(t){case"html":case"xml":window.DOMParser?(i=new DOMParser,i=i.parseFromString(e,"text/xml")):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(e));break;default:i=e}return i},this._randomId=function(e){var t="abcdefghiklmnopqrstuvwxyz",i="";for(var n=0;e>n;n++){var s=Math.floor(Math.random()*t.length);i+=t.substring(s,s+1)}return i},this._requestVAST=function(e,t){this.url=e;var i=this,n=t.indexOf("/")>-1?t.split("/")[1]:t;var s=!1;void 0!==i._initialLoad&&i._initialLoad||(i._initialLoad=!0,s=!0);var a=this._getConfig("urlPreprocessor")(e,!1,this._video.id,this._video.dealId);var r=this._getLocation(a);var o=r.hostname.indexOf("ads.freeskreen.com")>-1||r.hostname.indexOf("sb.freeskreen.com")>-1||r.hostname.indexOf("search.spotxchange.com")>-1||r.hostname.indexOf("doubleclick.net")>-1;var l={url:a,xhrFields:{withCredentials:o},complete:function(t,a){if("error"!=a){s!==void 0&&s&&(i.log("VastRequest",i._getConfig("urlPreprocessor")(e,!1,i._video.id,i._video.dealId)),i._start=(new Date).getTime());try{i._vastParser(i._cleanResponse(t.responseText,n))}catch(r){console.log(r),i.log("AdRequestError",r)}}},error:function(e,t,n){var s;try{var a=e.statusCode();a.url=this.url,a.userAgent=navigator.userAgent,s=JSON.stringify(a)}catch(r){s="error"}i.log("VastAdRequestError",s),i._vastParser(!1)},cache:!0,async:!0,dataType:n,crossDomain:!0};return $.support.cors=!0,$.ajax(l),!0},this._vastParser=function(e){var t={ad:{}},i=!1,n=!1,s="";var a=this;if(e!==!1){try{$(e).find("InLine").each(function(){return n=!0,!1}),$(e).find("Wrapper").each(function(){return $(e).find("VASTAdTagURI").each(function(){return i=!0,s=$.trim($(this).text()),!1}),!1}),$(e).find("VASTAdTagURL").each(function(){return $(this).find("URL").each(function(){return i=!0,s=$.trim($(this).text()),!1}),!1});var r=this._vastExtParser(e);var o=1,l=null;$(e).find("VAST").each(function(){return o=2,!1}),$(e).find("Ad").each(function(){return l=$(this).attr("id")||null,!1});var d=i?$(e).find("Wrapper")[0]:n?$(e).find("InLine")[0]:e;t=this._vastBodyParser(d,i,r,o,l),t.companions=this._vastCompanionsParser(d),t.extensions=r,this._deepExtend(t,this._wrappedData)}catch(c){a.log("VastError",c)}if(i&&""!==s)return this._wrappedData=t,this._requestVAST(s,"application/xml"),void 0;this.result=t,this.result.ad[0]===void 0&&(this.result._isEmpty!==void 0&&this.result._isEmpty===!0?a.log("VastEmpty",""):a.log("VastNoPlayableAd",""))}this._itemReady()},this._vastExtParser=function(e){var t=this;try{return extensions={ExtraTracking:{}},$(e).find("Extension").each(function(){this.attributes.getNamedItem("type")&&"activeview"==this.attributes.getNamedItem("type").value&&$(this).find("Tracking").each(function(){this.attributes.getNamedItem("event")&&(extensions.ExtraTracking[this.attributes.getNamedItem("event").value]===void 0&&(extensions.ExtraTracking[this.attributes.getNamedItem("event").value]={}),extensions.ExtraTracking[this.attributes.getNamedItem("event").value][t._randomId(8)]=$.trim($(this).text()))}),ext1={},$.each($(this).children(),function(e,t){ext={},$.each(t.attributes,function(e,t){ext[t.name]=t.value}),ext.value=$(t).text(),ext1[t.tagName]=ext}),extensions[$(this).attr("type")]=ext1}),extensions}catch(i){console.log(i)}},this._vastCompanionsParser=function(e){var t=this;try{return companions=[],$(e).find("Companion").each(function(e){companion={},companion.id=$(this).attr("id"),companion.width=$(this).attr("width"),companion.height=$(this).attr("height"),companion.image=$(this).find("StaticResource").text(),companion.html=$(this).find("HTMLResource").text(),companion.clickthrough=$(this).find("CompanionClickThrough").text(),companion.tracking={},$(this).find("Tracking").each(function(){var e=$(this).attr("event").toLowerCase(),i=$.trim($(this).text());null==companion.tracking[e]&&(companion.tracking[e]={}),""!==i&&(companion.tracking[e][t._randomId(8)]=i)}),companions.push(companion)}),companions}catch(i){return console.log(i),[]}},this._deepExtend=function(e,t){for(var i in t)t[i]&&t[i].constructor&&t[i].constructor===Object?(e[i]=e[i]||{},arguments.callee(e[i],t[i])):e[i]=t[i];return e},this._vastBodyParser=function(e,t,i,n,s){var a={adId:s},r,o=this,l={tracking:{}};switch(n){case 2:a.ad={},$(e).find("Creatives").each(function(){try{a.ad=o._VTwo_grabLinearAds($(this),l,t,i)}catch(e){o.log("VastParserError",e)}}),a.impressions={},$(e).find("Impression").each(function(){var e=$.trim($(this).text());""!=e&&(a.impressions[o._randomId(8)]=e)});break;case 1:a.ad=o._VOne_grabLinearAds($(e),l),a.impressions={},$(e).find("Impression").each(function(){var e=$.trim($(this).text());""!=e&&(a.impressions[o._randomId(8)]=e)})}return t||0!=$(e).find("Creatives").length||0!=$(e).find("Video").length||(a._isEmpty=!0),a},this._VTwo_grabLinearAds=function(e,t,i,n){var s=0,a=this;return e.find("Linear").each(function(){s=0,$(this).find("Tracking").each(function(){var e=$(this).attr("event").toLowerCase(),i=$.trim($(this).text());null==t.tracking[e]&&(t.tracking[e]={}),""!==i&&(t.tracking[e][a._randomId(8)]=i)});var e=void 0;$(this).find("AdParameters").each(function(){e=$(this).text(),e=a._getConfig("adParametersPreprocessor")(e)});var i=!1;$(this).find("MediaFiles").find("MediaFile").each(function(){$(this).each(function(){if($(this).attr("delivery")&&"PROGRESSIVE"!=$(this).attr("delivery").toUpperCase())return!0;var i=!1;try{"VL"==n.SCM.Response.value&&(i=!0)}catch(a){}i=i&&"LOADER"==window._FskVastParser.PlayerType;var r="undefined"!=typeof _fskPublisher&&_fskPublisher.allowMobileLiveConversion;var o="MOBILE"==SCMPlayer_getPlayerModel();if(!o||$(this).attr("type").toLowerCase().match(/fsk(img)?mobile/i)||r&&-1==$(this).text().indexOf("video.freeskreen.com")){var l=$.trim($(this).text());"https:"==((I11C || I10C).PreLocationContextProxy)(window).locat1on.protocol&&(l=l.replace("http://","https://"));var d;if(d=0==$(this).attr("type").toLowerCase().indexOf("video/")&&-1==$(this).attr("type").toLowerCase().indexOf("fskmobile")&&-1==$(this).attr("type").toLowerCase().indexOf("fskimgmobile")?o?navigator.userAgent.match(/android/i)?"video/fskimgmobile":"video/fskmobile":$(this).attr("type").toLowerCase():$(this).attr("type").toLowerCase(),!window.projekktor().getCanPlay(d)&&(!i||i&&!window.projekktor().getCanPlay("application/javascript")))return!0;t[s++]={type:d,src:l,adParameters:e},$(this).attr("width")&&(t[s-1].width=$(this).attr("width")),$(this).attr("height")&&(t[s-1].height=$(this).attr("height"),t[s-1].quality=$(this).attr("height")+"p"),$(this).attr("bitrate")&&(t[s-1].bitrate=$(this).attr("bitrate")),$(this).attr("frames")&&(t[s-1].frames=$(this).attr("frames")),$(this).attr("audio")&&(t[s-1].audio=$(this).attr("audio")),$(this).attr("chunks")&&(t[s-1].chunks=$(this).attr("chunks"))}return!0})});try{t.clickthrough={};var r=$.trim($(this).find("ClickThrough").text());""!=r&&(t.clickthrough[a._randomId(8)]=r)}catch(o){}try{t.tracking.clickthrough={},$(this).find("ClickTracking").each(function(){t.tracking.clickthrough[a._randomId(8)]=$.trim($(this).text())})}catch(o){}}),t},this._VOne_grabLinearAds=function(e,t){var i=this,n=0;return e.find("Tracking").each(function(){var e=$(this).attr("event").toLowerCase();null==t.tracking[e]&&(t.tracking[e]=[]),$(this).find("URL").each(function(){var n=$.trim($(this).text());""!==n&&(t.tracking[e][i._randomId(8)]=n)})}),$(e).find("VideoClicks").each(function(){$(this).find("ClickTracking").each(function(){$(this).find("URL").each(function(){null==t.tracking.clickthrough&&(t.tracking.clickthrough=[]);
var e=$.trim($(this).text());""!==e&&(t.tracking.clickthrough[i._randomId(8)]=e)})})}),$(e).find("Video").each(function(){$(this).find("ClickThrough").each(function(){t.clickthrough={},t.clickthrough[i._randomId(8)]=$.trim($(this).find("URL").text())}),$(this).find("ClickTracking").each(function(){$(this).find("URL").each(function(){null==t.tracking.clickthrough&&(t.tracking.clickthrough=[]);var e=$.trim($(this).text());""!==e&&(t.tracking.clickthrough[i._randomId(8)]=e)})}),$(this).find("MediaFiles").find("MediaFile").each(function(){$(this).each(function(){"PROGRESSIVE"==$(this).attr("delivery").toUpperCase()&&(null==$(this).attr("type")||window.projekktor().getCanPlay($(this).attr("type")))&&$(this).find("URL").each(function(){return null==$(this).attr("type")||window.projekktor().getCanPlay($(this).attr("type"))?(t[n++]={type:$(this).attr("type"),src:$.trim($(this).text())},void 0):!0})})})}),t},this._itemReady=function(){var e=this;this.ready=!0,this.callback.call(window._FskVastParser)}};var SCMPlayer_VastLoader=SCMPlayer_VastLoader||{};SCMPlayer_VastLoader=function(e,t,i){this.PlayerType="LOADER",this.PLAYER_STATE={STANDBY:-2,READY:-1,STARTED:0,FIRST_QUARTILE:1,MIDPOINT:2,THIRD_QUARTILE:3,COMPLETED:4},this._currentState=this.PLAYER_STATE.STANDBY,this.LOADING_STATE={INVALID:-2,STANDBY:-1,READY:0,LOADING:1,AD_FOUND:2},this._timeouts={},this.MUTE_STATE={MUTE:0,UNMUTE:1},this.videos=e,this.player=t,this.soundMode=i,this._playerReady=void 0,this._isPassback=!1,this.vastToSCMEvents={twosecs:"twosecs",mute:"VideoMute",unmute:"VideoUnmute",first_unmute:"VideoFirstUnMute",impression:"VastImpression",firstquartile:"firstquartile",midpoint:"midpoint",thirdquartile:"thirdquartile",complete:"VideoCompleted",clickthrough:"VastClick",rewind:"VideoReplay",viewable:"viewable",companioncreativeview:"CompanionCreativeView"},this.isReady=function(){return this._currentState!=this.PLAYER_STATE.STANDBY},this.config={type:"application/xml",urlPreprocessor:SCMPlayer_UrlPreprocessor,adParametersPreprocessor:function(e){return e.replace('"safety":{"referrer":1}','"safety":{"referrer":0}')}},this._getConfig=function(e){return this.config[e]===void 0?void 0:this.config[e]},this.log=function(e,t){SCMPlayer_logger(e,t)},this._randomId=function(e){var t="abcdefghiklmnopqrstuvwxyz",i="";for(var n=0;e>n;n++){var s=Math.floor(Math.random()*t.length);i+=t.substring(s,s+1)}return i},this.queries={};var n=function(e,t,i,n){var s=t.FlashVars||{},a="",r="",o="",l="",d=e,c="";t.src+=-1==t.src.indexOf("?")?"?":"&";for(var u in s)"function"!=typeof s[u]&&(l=s[u],t.src+=u+"="+encodeURIComponent(l)+"&");t.src.replace(/&$/,""),r='
'+' '+' '+' '+' ',o=" ',a=r+o,a+=" ",(!document.all||window.opera)&&(a=o),null===d?a:(d.get(0).innerHTML=a,i!==!1&&d.append($("
").attr("id",t.id+"_cc").css({width:n?"1px":"100%",height:n?"1px":"100%",backgroundColor:9>$p.utils.ieVersion()?"#000":"transparent",filter:"alpha(opacity = 0.1)",position:"absolute",top:0,left:0})),$("#"+t.id))};this.buildVpaidJsLoader=function(){var e=this;void 0===this._vpaidJsLoader&&(this._vpaidJsLoader=new SCMPlayer_VPAIDJsLoader,this._vpaidJsLoader.setListener(function(t,i,n){window._FskVastParser.handleVpaidJsLoaderEvent.call(e,t,i,n)}))},this._vpaidLoaderRetry=50,this._flashVersion=function(){try{try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{e.AllowScriptAccess="always"}catch(t){return"6.0.0"}}catch(t){}return""+new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1].match(/\d+/g)[0]}catch(t){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return""+(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1].match(/\d+/g)[0]}catch(t){}}return"0"},this.flashError=function(){this._isFlashError=!0;var e={};for(var t in this.queries){var i=this.queries[t];var n=1e3*parseInt(i._video.hbTierLevel1)+parseInt(i._video.hbTierLevel2);if("VPAIDLOADER"==i._type){for(var t in i._ads)if(i._ads[t]!==void 0&&i._ads[t]._state!==void 0){var s="VPAIDLOADER";"JS"==i._ads[t].type?s="VPAIDJS":i._ads[t]._state=this.LOADING_STATE.INVALID,i._ads[t]._state!=this.LOADING_STATE.INVALID&&(e[n]=Math.max(e[n]===void 0?-1:e[n],void 0!==i._video.hbTimeout&&i._video.hbTimeout?parseInt(i._video.hbTimeout):-1))}}else"VPAID"==i._type?i._state=this.LOADING_STATE.INVALID:i._state!=this.LOADING_STATE.INVALID&&(e[n]=Math.max(e[n]===void 0?-1:e[n],void 0!==i._video.hbTimeout&&i._video.hbTimeout?parseInt(i._video.hbTimeout):-1))}var a=-1;for(var r in e)this._timeouts[r]=a,a=Math.max(e[r],a)},this.flashReady=function(e){if(void 0===this._vpaidLoader){if("0"==this._flashVersion()||isMobile.any()||navigator.userAgent.match(/iPhone/i))return this.flashError(),void 0;var t=document.getElementById(window.fskVideoDivId+"_vpaid_flash");if(t&&t.setVpaidType!==void 0){this._setDivStdSize(),SCMPlayer_sendMessage("AdVisible"),e._vpaidLoader=t,e._vpaidLoader.setVpaidType(0),e._vpaidLoader.setListener("window._FskVastParser.handleVpaidLoaderEvent");for(var i=0;e._vpaidLoaderScheduled.length>i;i++)e._vpaidLoader.initNewAd(jQuery(e._vpaidLoader).width(),jQuery(e._vpaidLoader).height(),JSON.stringify(e._vpaidLoaderScheduled[i]))}else e._vpaidLoaderRetry>0?(e._vpaidLoaderRetry--,setTimeout(function(){e.flashReady(e)},200)):this.flashError()}},this._setDivMinSize=function(){try{var e=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);if("0"==this._flashVersion()||isMobile.any()||navigator.userAgent.match(/iPhone/i)||!e)return;var t=window.parent.document.getElementById(window.frameElement.id).parentNode;t.style.minHeight="1px",t.style.display="none"}catch(i){}},this._setDivStdSize=function(){try{var e=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);if("0"==this._flashVersion()||isMobile.any()||navigator.userAgent.match(/iPhone/i)||!e)return;var t=window.parent.document.getElementById(window.frameElement.id).parentNode;"none"==t.style.display&&(t.style.minHeight=0,t.style.display="block")}catch(i){}},this._vpaidLoaderScheduled=[],this.buildVpaidLoader=function(){var e=window.fskVideoDivId+"_vpaid";if(!document.getElementById(e)){this._setDivMinSize(),jQuery("#"+window.fskVideoDivId+"_media").before('
');var t={id:window.fskVideoDivId+"_vpaid_flash",name:window.fskVideoDivId+"_vpaid_flash",src:SWF_URL+"/VPAIDLoader.swf",width:"100%",height:"100%",allowScriptAccess:"always",allowFullScreen:"false",allowNetworking:"all",wmode:"opaque",bgcolor:"#000000"};n(jQuery("#"+window.fskVideoDivId+"_vpaid"),t,!1,!0),this.flashReady(this)}},this._shuffle=function(e){var t,i,n;for(n=e.length;n;n--)t=Math.floor(Math.random()*n),i=e[n-1],e[n-1]=e[t],e[t]=i},this.getEligibleVideo=function(e){return this._shuffle(e),e.sort(function(e,t){return null==e.data._video.hbTierLevel1||null==t.data._video.hbTierLevel1?0:e.data._video.hbTierLevel1!=t.data._video.hbTierLevel1?e.data._video.hbTierLevel1-t.data._video.hbTierLevel1:e.data._video.hbTierLevel2!=t.data._video.hbTierLevel2?e.data._video.hbTierLevel2-t.data._video.hbTierLevel2:e.data._video.cpm!==void 0&&e.data._video.cpm&&t.data._video.cpm!==void 0&&t.data._video.cpm?t.data._video.cpm-e.data._video.cpm:0}),e[0]},this._hasRequestedVideo=!1,this.playAVideo=function(e,t){var i=this;if(i._setDivStdSize(),e||void 0===this._mutex_play||!this._mutex_play){this._mutex_play=!0,e&&this._eligibleVideo!==void 0&&(this._eligibleVideo._state=this.LOADING_STATE.INVALID);var n={};n[this.LOADING_STATE.INVALID]=[],n[this.LOADING_STATE.STANDBY]=[],n[this.LOADING_STATE.READY]=[],n[this.LOADING_STATE.LOADING]=[],n[this.LOADING_STATE.AD_FOUND]=[];var s=(new Date).getTime(),a={};for(var r in this.queries){var o=this.queries[r];var l=1e3*parseInt(o._video.hbTierLevel1)+parseInt(o._video.hbTierLevel2);var d=this._timeouts[l]-(s-o._timestamp);if("VPAIDLOADER"==o._type){for(var r in o._ads)if(o._ads[r]!==void 0&&o._ads[r]._state!==void 0){var c="VPAIDLOADER";"JS"==o._ads[r].type&&(c="VPAIDJS");var u=0>=d||o._ads[r]._state!=this.LOADING_STATE.AD_FOUND?o._ads[r]._state:this.LOADING_STATE.READY;n[u].push({_id:r,_type:c,data:o}),u!=this.LOADING_STATE.INVALID&&(a[l]=Math.max(a[l]===void 0?-1:a[l],void 0!==o._video.hbTimeout&&o._video.hbTimeout?parseInt(o._video.hbTimeout):-1))}}else{var u=0>=d||o._state!=this.LOADING_STATE.AD_FOUND?o._state:this.LOADING_STATE.READY;n[u].push({_id:o._id,_type:o._type,data:o}),u!=this.LOADING_STATE.INVALID&&(a[l]=Math.max(a[l]===void 0?-1:a[l],void 0!==o._video.hbTimeout&&o._video.hbTimeout?parseInt(o._video.hbTimeout):-1))}}var h=-1;for(var p in a)this._timeouts[p]=h,h=Math.max(a[p],h);var f=n[this.LOADING_STATE.AD_FOUND],i=this;if(0==f.length){if(0==n[this.LOADING_STATE.STANDBY].length&&0==n[this.LOADING_STATE.READY].length&&0==n[this.LOADING_STATE.LOADING].length)return window.onAdError("ErrorNoPlayableAd"),void 0;if(this._waitTimeout!==void 0)try{window.clearTimeout(this._waitTimeout)}catch(m){}return this._waitTimeout=window.setTimeout(function(){i.playAVideo.apply(i,[!0])},200),void 0}if(this._waitTimeout!==void 0)try{window.clearTimeout(this._waitTimeout)}catch(m){}this._eligibleVideo=this.getEligibleVideo(f);var g=this._eligibleVideo;var _=[];jQuery.each(g.data.result.ad,function(e,t){if(!isNaN(e)){if(t&&t.src!==void 0)switch(g._type){case"VPAID":case"VPAIDLOADER":t.mediaElement=window.fskVideoDivId+"_vpaid_flash";break;case"VPAIDJS":t.mediaElement=i._vpaidJsLoader.getVPAIDAd(g._id),t.type="application/javascript",t.originalType="application/javascript"}_.push(t)}}),g.data.result.video=g.data._video,this._currentVideo=g.data.result,window._currentVideo=this._currentVideo;try{SCMPlayer_SetupFooter()}catch(m){}if("VPAID"==g._type||"VPAIDLOADER"==g._type){try{i._vpaidLoader.setItem(g._id)}catch(m){var v=g._id;return setTimeout(function(){i._vpaidLoader.setItem(v),window._FskVastParser.player.setItem(_,0),t?SCMPlayer_sendMessage("AdVisible"):window._FskVastParser.player.setPlay()},200),void 0}jQuery("#"+window.fskVideoDivId+"_vpaid").show()}else"VPAIDJS"==g._type?(jQuery("#"+window.fskVideoDivId+"_vpaid").hide(),i._vpaidJsLoader.setItem(g._id)):(jQuery("#"+window.fskVideoDivId+"_vpaid").hide(),SCMPlayer_logger("LoaderStartHB"));void 0!==this._mutex_moat&&this._mutex_moat||(this._mutex_moat=!0,this._setupMoat()),window._FskVastParser.player.setItem(_,0),t?SCMPlayer_sendMessage("AdVisible"):e?SCMPlayer_sendMessage("AdVisible"):window._FskVastParser.player.setPlay(),this._hasRequestedVideo=!0}},this._killLoosers=function(e){switch(this._eligibleVideo._type){case"VPAIDJS":jQuery("#"+window.fskVideoDivId+"_vpaid").remove();break;case"VPAID":case"VPAIDLOADER":this._vpaidJsLoader._kill(this._eligibleVideo._id);break;case"VIDEO":jQuery("#"+window.fskVideoDivId+"_vpaid").remove(),this._vpaidJsLoader._kill(this._eligibleVideo._id)}},this.handleVpaidJsLoaderEvent=function(e,t,i){var n;if(i.indexOf("-")>-1){var s=this.queries[i.split("-")[0]];n=s._ads[i]}else n=this.queries[i];switch(e){case"AdLoaded":n._state=this.LOADING_STATE.AD_FOUND;break;case"AdInvalid":n._state=this.LOADING_STATE.INVALID;var a=this;a._currentState
-1){var a=this.queries[i.split("-")[0]];s=a._ads[i]}else s=this.queries[i];switch(e){case"AdLoaded":s._state=this.LOADING_STATE.AD_FOUND;break;case"AdInvalid":s._state=this.LOADING_STATE.INVALID,n._currentState-1?n.types.vpaidjs.push(s[i]):s[i].type.indexOf("shockwave-flash")>-1?n.types.vpaid.push(s[i]):n.types.video.push(s[i]))}}if(n.types.video.length>0)n._state=this.LOADING_STATE.AD_FOUND,n._type="VIDEO";else if(n.types.vpaidjs.length>0)n._type="VPAIDJS",this.addAdToVpaidJsLoader(n,n.types.vpaidjs[0]);else if(n.types.vpaid.length>0)if(n._state=this.LOADING_STATE.LOADING,n._type="VPAID",n.result.extensions.SCM!==void 0&&n.result.extensions.SCM.Response!==void 0&&"VL"==n.result.extensions.SCM.Response.value){var r=JSON.parse(n.result.ad[0].adParameters);n._ads={};for(var o=0;r.ads.length>o;o++)r.ads[o].tagId=r.ads[o].ssp,r.ads[o].ssp=n._id+"-"+r.ads[o].ssp,r.ads[o]._state=this.LOADING_STATE.STANDBY,n._ads[r.ads[o].ssp]=r.ads[o],"SWF"==r.ads[o].type?this.addAdToVpaidLoader(n,null,r.ads[o]):this.addAdToVpaidJsLoader(n,null,r.ads[o]);n._type="VPAIDLOADER"}else this.addAdToVpaidLoader(n,n.types.vpaid[0]);else n._state=this.LOADING_STATE.INVALID;if(n._state==this.LOADING_STATE.AD_FOUND){var l=1e3*parseInt(n._video.hbTierLevel1)+parseInt(n._video.hbTierLevel2);var d=[];for(var i in this._timeouts)d.push(i);l==d[0]&&(t=!0)}}t&&this.playAVideo(!1,!0)}},this.startVAST=function(e){if(void 0===this._mutex||!this._mutex){this._mutex=!0,this.buildVpaidLoader(),this.buildVpaidJsLoader();var t={};var i=(new Date).getTime();for(var n=0;this.videos.length>n;n++){var s=this.videos[n];var a=new SCMPlayer_AdParser;a._id=this._randomId(15),a._state=this.LOADING_STATE.STANDBY,a._video=s,a._timestamp=i,t[1e3*parseInt(s.hbTierLevel1)+parseInt(s.hbTierLevel2)]=Math.max(t[1e3*parseInt(s.hbTierLevel1)+parseInt(s.hbTierLevel2)]===void 0?-1:t[1e3*parseInt(s.hbTierLevel1)+parseInt(s.hbTierLevel2)],void 0!==s.hbTimeout&&s.hbTimeout?parseInt(s.hbTimeout):-1),a.setListener(this.handleAdReady),a._requestVAST(s.videoPath,"application/xml"),this.queries[a._id]=a}var r=-1;for(var o in t)this._timeouts[o]=r,r=Math.max(t[o],r);$(".scmtrackingpixel").remove(),this._currentState=this.PLAYER_STATE.READY,this._muteState="unmute"==this.soundMode?this.MUTE_STATE.UNMUTE:this.MUTE_STATE.MUTE,SCMPlayer_sendMessage("AdVisible")}},this._getLocation=function(e){var t=document.createElement("a");return t.href=e,t},this._addClick=function(){var e=this,t="";jQuery(".fskdisplay").parent().find(".clickthrough").remove(),jQuery(".fskdisplay").parent().find(".unmute").remove(),jQuery(".fsk-player-html-panel").find(".fsk-sb-learn-more.fsk-mobile-learn-more").remove();try{$.each(this._currentVideo.ad.clickthrough,function(i,n){return""==n||null==n?!0:(t=url=e._getConfig("urlPreprocessor")(n,!0),!1)})}catch(i){return}try{var n;var s;var a;var r={};(isMobile.any()||navigator.userAgent.match(/iPhone/i))&&_fskPublisher.data.isMutingClick!==void 0&&"true"===_fskPublisher.data.isMutingClick?(a="div",n="unmute",s=function(t){if(e._muteState==e.MUTE_STATE.MUTE){jQuery(".fskclicksound").hide();try{clearTimeout(window._fskClickSoundTimer)}catch(i){}window.hasUnmuteClickBeenFired=!0,e.player.setVolume(parseFloat(window._FSKPlayer_initialVolume)),e._muteState=e.MUTE_STATE.UNMUTE}else{try{clearTimeout(window._fskClickSoundTimer)}catch(i){}jQuery(".fskclicksound").show(),window._fskClickSoundTimer=setTimeout(function(){jQuery(".fskclicksound").hide()},5e3),e.player.setVolume(0),e._muteState=e.MUTE_STATE.MUTE}return!0},jQuery(".fsk-player-html-panel").append(''+SCMPlayer_GetLearnMoreLocales(_fskPublisher.locale)+" "),jQuery(".fsk-sb-learn-more.fsk-mobile-learn-more").click(function(){return window.open(SCMPlayer_UrlPreprocessor(t)),!1}),jQuery(".fsk-player-html-panel").append(''+SCMPlayer_GetSoundLocales(_fskPublisher.locale)+"
")):(a="a",n="clickthrough inactive",r={href:t,target:"_blank"},s=function(t){return e.player.setPause(),null==e._vastClick?(e._vastClick=!0,e.logVastEvent("clickthrough")):e.log("VastSecondClick"),!0});var o=$(document.createElement(a)).css({border:"1px solid red",position:"absolute",backgroundColor:"#fff",opacity:0,filter:"alpha(opacity=1)",top:0,left:0,width:"100%",height:"100%",display:"block",zIndex:"998"}).attr(r).mousemove(function(t){e.player._playerFocusListener(t)}).mouseenter(function(t){e.player._playerFocusListener(t)}).mouseleave(function(t){e.player._playerFocusListener(t)});o.addClass(n),o.click(s),jQuery(".fskdisplay").parent().append(o)}catch(i){console.log(i)}},this._addPixel=function(e,t){if(null!=e&&""!=e&&"dashboard.slimcutmedia.com"!=((I11C || I10C).PreLocationContextProxy)(window).locat1on.hostname){var i=this._getConfig("urlPreprocessor")(e);$("body").append($(" ").attr("src",i).attr("alt",t).addClass("imatrackingpixel").hide())}},this._vastLogEvent=function(e){if(void 0!==this._currentVideo&&void 0!==this._currentVideo.ad){var t=this;var i;if("impression"===e){if(this._currentVideo.impressions===void 0)return;i=this._currentVideo.impressions;try{this._killLoosers(this._eligibleVideo._id)}catch(n){console.log(n)}}else if("companioncreativeview"==e&&window._FskFooterBanner!==void 0&&window._FskFooterBanner.tracking!==void 0&&window._FskFooterBanner.tracking.creativeview!==void 0)i=window._FskFooterBanner.tracking.creativeview;else{if("viewable"==e&&this._currentVideo.extensions.ExtraTracking.viewable_impression!==void 0&&$.each(this._currentVideo.extensions.ExtraTracking.viewable_impression,function(i,n){t._addPixel(n,e)}),this._currentVideo.ad.tracking===void 0||this._currentVideo.ad.tracking[e]===void 0)return;i=this._currentVideo.ad.tracking[e]}$.each(i,function(i,n){t._addPixel(n,e)})}},this._registerTimePlayed=new SCMPlayer_timerVideo,this.logVastEvent=function(e){var t=this;(replayLogEvents.indexOf(e)>-1||window._FskVideoReplayed===void 0||!window._FskVideoReplayed)&&(t._vastLogEvent(e),"unmute"!==e||void 0!==t._hasAlreadyUnMuted&&t._hasAlreadyUnMuted||"unmute"==i||(t._hasAlreadyUnMuted=!0,t._vastLogEvent("first_unmute"),t.log("VideoFirstUnMute")),t.vastToSCMEvents[e]!==void 0&&t.log(t.vastToSCMEvents[e],t._registerTimePlayed.getTotalTimePlayed()))},this.registerPlayer=function(e){var t=this;$.each(["completed","vpaidPassback","vpaid","time","mute","unmute","resume","start","vpaidimpression","firstquartile","midpoint","thirdquartile","adclick","error","state","fullscreen","leftclick"],function(i,n){e.addListener(n,function(e){t[n+"Handler"](t,e)})}),e.addListener("ready",function(){t._playerReady=!0})},this.muteHandler=function(e){e._currentState==e.PLAYER_STATE.COMPLETED||isMobile.any()&&(void 0===window.hasUnmuteClickBeenFired||window.hasUnmuteClickBeenFired===!1)||e._muteState!=e.MUTE_STATE.MUTE&&(e._muteState=e.MUTE_STATE.MUTE,e.logVastEvent("mute"))},this.unmuteHandler=function(e){e._currentState==e.PLAYER_STATE.COMPLETED||isMobile.any()&&(void 0===window.hasUnmuteClickBeenFired||window.hasUnmuteClickBeenFired===!1)||e._muteState!=e.MUTE_STATE.UNMUTE&&(e._muteState=e.MUTE_STATE.UNMUTE,e.logVastEvent("unmute"))},this.resumeHandler=function(e){e.logVastEvent("resume")},this.firstquartileHandler=function(e){e._currentState==e.PLAYER_STATE.STARTED&&(e._currentState=e.PLAYER_STATE.FIRST_QUARTILE,e.logVastEvent("firstquartile"))},this.midpointHandler=function(e){e._currentState==e.PLAYER_STATE.FIRST_QUARTILE&&(e._currentState=e.PLAYER_STATE.MIDPOINT,e.logVastEvent("midpoint"))},this.thirdquartileHandler=function(e){e._currentState==e.PLAYER_STATE.MIDPOINT&&(e._currentState=e.PLAYER_STATE.THIRD_QUARTILE,e.logVastEvent("thirdquartile"))},this.startHandler=function(e){"vpaid"!=e.player.getItem().platform&&"videovpaidjs"!=e.player.getItem().mediaModel&&(e._currentState=e.PLAYER_STATE.STARTED,void 0!==window._FskVideoReplayed&&window._FskVideoReplayed||(e._vastLogEvent("impression"),e.log("VastImpression",SCMPlayer_getPlayerSize()),e._currentVideo.companions!==void 0&&e._currentVideo.companions.length>0&&e.logVastEvent("companioncreativeview"))),e.logVastEvent("start")},this.timeHandler=function(e,t){t>=2&&e._hasTwoSecs===void 0&&(e._hasTwoSecs=!0,e.logVastEvent("twosecs"))},this.stateHandler=function(e,t){switch(t){case"PAUSED":e._registerTimePlayed.pauseV(),e.logVastEvent("pause"),window.csStreamingStop!==void 0&&window.csStreamingStop();break;case"PLAYING":e._registerTimePlayed.startV();try{clearTimeout(window._fskClickSoundTimer)}catch(i){}window._fskClickSoundTimer=setTimeout(function(){jQuery(".fskclicksound").hide()},5e3),window.csStreamingPlay!==void 0&&window.csStreamingPlay();break;case"STARTING":e.logVastEvent("creativeview"),"videovpaid"!=e.player.getItem().mediaModel&&"videoima"!=e.player.getItem().mediaModel&&"videovpaidjs"!=e.player.getItem().mediaModel&&e._addClick();break;case"COMPLETED":"videoima"!=e.player.getItem().mediaModel&&e._currentState==e.PLAYER_STATE.THIRD_QUARTILE&&(e._registerTimePlayed.completeV(),e._currentState=e.PLAYER_STATE.COMPLETED,e.logVastEvent("complete"),void 0!==window._FskVideoReplayed&&window._FskVideoReplayed||e.log("VideoCompletedRaw"))}},this.completedHandler=function(e){e._currentState==e.PLAYER_STATE.THIRD_QUARTILE&&(e._currentState=e.PLAYER_STATE.COMPLETED,e.logVastEvent("complete"),void 0!==window._FskVideoReplayed&&window._FskVideoReplayed||e.log("VideoCompletedRaw"))},this.vpaidPassbackHandler=function(e){e._currentState0&&document.getElementById("fsk_companion_image")&&document.getElementById("fsk_companion_image").complete&&e.logVastEvent("companioncreativeview"))},this.errorHandler=function(e,t){e._currentState1&&parseInt(t[1])>=53?"NATIVE_MOBILE":"MOBILE"}else if(e.match(/iphone/i)||e.match(/ipad/i)){var i=9;try{i=SCMPlayer_getiOSVersion()[0]}catch(n){}window._FskPlayerModel=i>=10?"NATIVE_MOBILE":"MOBILE"}else window._FskPlayerModel="NATIVE"}return window._FskPlayerModel};var SCMPlayer_getPlatforms=function(){var e=navigator.userAgent;if(e.match(/android/i)){var t=e.match(/^.*android.* chrome\/([0-9]*)\..*$/i);return t&&t.length>1&&parseInt(t[1])>=53?["browser","native","vpaidjs","ima"]:["browser","fskimgmobile"]}if(e.match(/iphone/i)||e.match(/ipad/i)){var i=9;try{i=SCMPlayer_getiOSVersion()[0]}catch(n){}return i>=10?["browser","native","vpaidjs","ima"]:["browser","fskmobile"]}return["browser","native","flash","vpaidjs","vpaid","ima"]};var SCMPlayer_sendMessage=function(e,t){((I11C || I10C).PostMessage).call(window.parent,JSON.stringify({ns:"FSK",c:window._fskPublisher.configId,ev:e,a:window._fskAdId,d:t}),document.referrer&&""!=document.referrer?document.referrer:((I11C || I10C).PreLocationContextProxy)(window).locat1on.origin)};var QUERY_EVT="?tm=__timestamp__&p=__publisher-id__&c=__config-id__&s=__session-id__&d=__deal-id__&v=__video-id__&t=__transaction-id__&co=__country__&pr=__province__&ci=__city__&dm=__dma__&flc=__section__&slc=__subsection__&ttm=__ttm__&e=";var BASE_EVT=function(){return SCMPlayer_getHost()+"/click"+QUERY_EVT};var SCMPlayer_getPlayerSize=function(){return jQuery(".fskdisplay").width()+"x"+jQuery(".fskdisplay").height()};var SCMPlayer_buildEventUrl=function(e,t,i,n,s){var a=i;a||(a="1");var r=SCMPlayer_getHost()+"/t.gif"+QUERY_EVT;return r+=e+"&m="+a+"&x="+encodeURIComponent(t===void 0?"":t),r=SCMPlayer_UrlPreprocessor(r,!1,n,s)};var SCMPlayer_logger=function(e,t,i,n,s){if("dashboard.slimcutmedia.com"!=((I11C || I10C).PreLocationContextProxy)(window).locat1on.hostname){var a=SCMPlayer_buildEventUrl(e,t,i,n,s);$("body").append($(" ").attr("src",a).attr("alt",e).addClass("fsktrackingpixel").hide())}};var SWF_URL=((I11C || I10C).PreLocationContextProxy)(window).locat1on.protocol+"//static.freeskreen.com/scm/player/20170503b";var MUTE_URL=function(){return SCMPlayer_getHost()+"/na?url="};var IPHONE_TYPE="video/fskmobile";var isMobile={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPad|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return isMobile.Android()||isMobile.BlackBerry()||isMobile.iOS()||isMobile.Opera()||isMobile.Windows()},iOSVersion:function(){var e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||0,10)]},UAMobile:function(){var e={};try{isMobile.Android()?(e.os="Android",e.osv=navigator.userAgent.match(/; Android (\d+(?:\.\d+)+)/i)[0].replace("; Android ","")):isMobile.iOS()?(e.os="iOS",e.osv=isMobile.iOSVersion(),e.make="Apple",e.model=navigator.userAgent.match(/iPhone/i)?"iPhone":navigator.userAgent.match(/iPad/i)?"iPad":navigator.userAgent.match(/iPod/i)?"Ipod":""):isMobile.Windows()&&(e.os="Windows")}catch(t){console.log(t)}return e}};var SCMPlayer_MoatPartnerCode="slimcutmediavideo73182107408";var SCMPlayer_MoatTrackingInit=function(e,t,i,n){if(void 0!==window._FskVastParser){var s=_FskVastParser._currentVideo;return SCMPlayer_MoatTracking(e[0],{level1:"SCM",level2:s.video.campaignId,level3:s.video.dealId,level4:s.video.id,slicer1:window._fskPublisher.id,slicer2:window._fskPublisher.configId},0,s.video.videoPath)}};var SCMPlayer_MoatTracking=function(e,t,i,n){var s=((I11C || I10C).PreLocationContextProxy)(window).locat1on.protocol,a="https:"===s?"z":"js",r=document.createElement("script"),o=[],l={adData:{ids:t,duration:i,url:n},dispatchEvent:function(e){this.sendEvent?(o&&(o.push(e),e=o,o=!1),this.sendEvent(e)):o.push(e)}},d="_moatApi"+Math.floor(1e8*Math.random());return window[d]=l,r.type="text/javascript",e&&e.insertBefore(r,e.childNodes[0]||null),r.src=s+"//"+a+".moatads.com/"+SCMPlayer_MoatPartnerCode+"/moatvideo.js#"+d,l
};var SCMPlayer_isSCMVideo=function(e){return window._FskVastParser._currentVideo.video.fskServed};var SCMPlayer_initClaimText=function(){isMobile.any()||navigator.userAgent.match(/iPhone/i)?jQuery(".fsk-player-html-panel").addClass("fsk-mobile"):jQuery(".fsk-player-html-panel").addClass("fsk-desktop");var e=document.createElement("DIV");e.className="fsk-slimcutmedia-tm",jQuery(".fsk-player-html-panel").append(e),jQuery(".fsk-slimcutmedia-tm").click(function(){window.open("http://www.slimcutmedia.com/scm/?utm_source=dynamic&utm_medium=adunit")}),window._fskPublisher.data.showPlayerClaim!==void 0&&"false"==window._fskPublisher.data.showPlayerClaim?(jQuery(".fsk-player-html-panel").addClass("fsk-no-claim"),jQuery(".fsk_split_box_claim").html("")):jQuery(".fsk_split_box_claim").html(''+SCMPlayer_GetAdvertisementLocales(_fskPublisher.locale)+"
"),window._fskPublisher.data.showPlayerTimer!==void 0&&"false"==window._fskPublisher.data.showPlayerTimer&&jQuery(".fsk-player-html-panel").addClass("fsk-no-timer")};var SCMPlayer_timerVideo=function(){var e,t=0,i=!1;this.startV=function(){e=(new Date).getTime()},this.completeV=function(){this.pauseV(),i=!0},this.pauseV=function(){this.setTimePlayed(),e=null},this.setTimePlayed=function(){if(!i&&e){var n=(new Date).getTime();t+=(n-e)/1e3,e=n}},this.getTotalTimePlayed=function(){return this.setTimePlayed(),t.toFixed(1)}};var replayLogEvents=["clickthrough","rewind","replayVideoReady","replayVideoImageClose"];var SCMPlayer_replayVideo=function(e){e.setSeek(0),e.setPlay(),jQuery(".fsk-mobile-learn-more").show()};var SCMPlayer_preLoadReplayVideo=function(){if(void 0!==window._FskVastParser&&void 0!==window._FskVastParser._currentVideo&&void 0!==window._FskVastParser._currentVideo.video){var e=window._FskVastParser._currentVideo.video;var t;e.replayPostVideoImage!==void 0&&e.replayPostVideoImage&&(t={image:e.replayPostVideoImage,click:e.replayPostVideoImageClick}),window._FskReplayVideoContent=t;var i=SCMPlayer_buildReplayContainer();t&&SCMPlayer_setReplayImageContent(t,i),jQuery(".fsk-player-html-panel").append(i)}};var SCMPlayer_initReplayVideo=function(){if(SCMPlayer_canReplayVideo(window.fskVideoFile)){if(window._fskPublisher.data.fixHeight!==void 0&&"true"==window._fskPublisher.data.fixHeight&&jQuery(".fsk_container").addClass("splitbox-fix-height"),jQuery(".fsk-sb-close-button").click(function(){SCMPlayer_logger("replayVideoImageClose"),SCMPlayer_sendMessage("VideoCompleted","")}),SCMPlayer_logger("replayVideoReady"),jQuery("").appendTo("head"),jQuery(".fsk-sb-close-button").show(),jQuery(".fsk-split-box-close-video").hide(),0==jQuery(".fsk-replay-button").length&&(jQuery(".fsk-replay-container").append('
'+SCMPlayer_GetReplayLocales(_fskPublisher.locale)+"
"),jQuery(".fsk-replay-container").mouseout(function(){jQuery(".fsk-player-html-panel").removeClass("fsk-hover")}),jQuery(".fsk-replay-container").mouseover(function(){jQuery(".fsk-player-html-panel").addClass("fsk-hover")}),jQuery(".fsk-replay-container .fsk-slimcutmedia-tm").click(function(){window.open("http://www.slimcutmedia.com/scm/?utm_source=dynamic&utm_medium=adunit")}),jQuery(".fsk-replay-button").click(function(){var e=projekktor("#"+window.fskVideoDivId);jQuery(".fsk-sb-close-button"),SCMPlayer_replayVideo(e),jQuery(".fsk-sb-close-button").hide(),jQuery(".fsk-split-box-close-video").show(),jQuery(".fsk-replay-container").fadeOut(),window._FskVideoReplayed=!0,window._FskVastParser.logVastEvent("rewind")}),window._FskVastParser._currentVideo!==void 0)){var e=SCMPlayer_buildLearnMoreButton(window._fskPublisher.data.replayVideoImageClick);jQuery(".fsk-replay-vertical-align").append(e)}jQuery(".fsk-replay-container").fadeIn(),jQuery(".fsk-mobile-learn-more").hide()}};var SCMPlayer_buildReplayContainer=function(){var e=document.createElement("div");return e.className="fsk-replay-container",e.style.maxHeight=window.fskHeight+"px",e.style.maxWidth=window.fskWidth+"px",e.style.display="none",e.style.top=0,e};var SCMPlayer_setReplayImageContent=function(e,t){var i=document.createElement("IMG");i.src=e.image,i.className="fsk-replay-image",i.style.width=jQuery(".fsk_contentPanel_sb").width()+"px",t.appendChild(i)};var SCMPlayer_buildLearnMoreButton=function(e){var t=window._FskVastParser,i=e;try{jQuery.each(t._currentVideo.ad.clickthrough,function(n,s){return""==s||null==s?!0:(i=e=t._getConfig("urlPreprocessor")(s,!0),!1)})}catch(n){}var s=document.createElement("a");return s.text=" "+SCMPlayer_GetLearnMoreLocales(_fskPublisher.locale)+" ",s.onclick=function(){t.log("ReplayLearnMoreClick"),window.open(i)},s.className="fsk-learn-more",s};var SCMPlayer_canReplayVideo=function(e){return"true"===_fskPublisher.data.canReplayVideo&&SCMPlayer_isSCMVideo(e)&&(window._FskPostVideoType===void 0||!window._FskPostVideoType)};((I11C || I10C).PreLocationContextProxy)(window).locat1on.origin||(((I11C || I10C).PreLocationContextProxy)(window).locat1on.origin=((I11C || I10C).PreLocationContextProxy)(window).locat1on.protocol+"//"+((I11C || I10C).PreLocationContextProxy)(window).locat1on.hostname+(((I11C || I10C).PreLocationContextProxy)(window).locat1on.port?":"+((I11C || I10C).PreLocationContextProxy)(window).locat1on.port:""));var SCMPlayer_initSplitBoxType=function(){var e="splitbox";return isMobile.any()||navigator.userAgent.match(/iPhone/i)?"true"==_fskPublisher.data.skyBoxSet&&window._FskVastParser._currentVideo.video.skyBoxOption?(SCMPlayer_initSkyBox(),e="skybox"):"true"==_fskPublisher.data.riseBoxSet&&(SCMPlayer_initRiseBox(),e="risebox"):"true"==_fskPublisher.data.alwaysOnBoxSet&&window._FskVastParser._currentVideo.video.alwaysOnBoxOption&&(e="alwaysonbox"),e};var SCMPlayer_initRiseBox=function(){(_fskPublisher.texts.splitbox_unmute===void 0||""==_fskPublisher.texts.splitbox_unmute)&&$(".fsk-player-html-panel").prepend(''+SCMPlayer_GetAdvertisementLocales(_fskPublisher.locale)+"
"),$("").appendTo("head")};var SCMPlayer_initSkyBox=function(){navigator.userAgent.match(/iPhone/i)&&$(".fsk_split_box_videos_container").css({margin:"0px",padding:"0px"}),$(".fsk_container").css({position:"relative","z-index":"0",top:"-15px"}),$(".fsk_split_box_claim").css({"border-bottom-width":"0px","font-size":"10px","z-index":"1",top:"0px"}),$(".fsk_split_box_claim_text").css({"font-family":"arial","border-width":"0","background-color":"rgba(46, 51, 56, 0.8)",color:"white",padding:"2px 8px","border-radius":"0"})};var SCMPlayer_displayMouseOver=function(){_fskPublisher.texts.splitbox_unmute!==void 0&&$(".fsk-player-html-panel").prepend(''+_fskPublisher.texts.splitbox_unmute+"
")};var SCMPlayer_displayClose=function(){if("slidebox"!=window._fskPublisher.wallType){var e=function(){SCMPlayer_displayCloseClicked(),window._FskPostVideoType=void 0,window._FskPostVideoContent=void 0};var t=!1,i;if("undefined"!=typeof _fskPublisher&&_fskPublisher.canClosePopup){t=!0;try{i=parseInt(_fskPublisher.closePopupDelay)}catch(n){}}if(window._FskVastParser._currentVideo.video!==void 0&&window._FskVastParser._currentVideo.video.canClosePopup!==void 0&&null!==window._FskVastParser._currentVideo.video.canClosePopup){var s=window._FskVastParser._currentVideo.video.canClosePopup;if("FORCE_OPEN"==s)t=!1;else if("FORCE_CLOSE"==s){t=!0;try{i=parseInt(window._FskVastParser._currentVideo.video.closePopupDelay)}catch(n){}}}if(t)if(i||(i=0),$(".fsk-player-html-panel").prepend(' '),$(".fsk-player-html-panel .fsk-close-image").click(function(){e()}),i===void 0||0==i)$(".fsk-player-html-panel .fsk-close-image").fadeIn();else{var a=projekktor("#"+window.fskVideoDivId);var r={totalSeconds:0,killed:!1,start:function(){if(!this.killed){var e=this;this.interval=setInterval(function(){e.totalSeconds+=1,e.totalSeconds>=i?($(".fsk-skip-remaining-time").parent().fadeOut(),$(".fsk-player-html-panel .fsk-close-image").fadeIn(),e.kill()):($(".fsk-skip-remaining-time").html(i-e.totalSeconds),$(".fsk-skip-remaining-time").parent().fadeIn())},1e3)}},kill:function(){this.pause(),this.killed=!0},pause:function(){clearInterval(this.interval),delete this.interval},resume:function(){this.interval||this.start()}};a.addListener("state",function(e){"PLAYING"==e?r.resume():"PAUSED"==e&&r.pause()}),a.getState("PLAYING")&&r.resume()}}};var SCMPlayer_postVideo=function(){if(window._FskPostVideoType===void 0||!window._FskPostVideoType)return SCMPlayer_sendMessage("VideoCompleted",""),void 0;if(jQuery(".fsk_split_box_footer").hide(),jQuery(".fsk_split_box_footer").height(0),"IMAGE"==window._FskPostVideoType||"SOCIAL"==window._FskPostVideoType||"COMPANION"==window._FskPostVideoType){window._fskPublisher.data.fixHeight!==void 0&&"true"==window._fskPublisher.data.fixHeight&&jQuery(".fsk_container").addClass("splitbox-fix-height"),jQuery(".fsk-sb-close-button").click(function(){SCMPlayer_logger("PostVideoImageClose"),SCMPlayer_sendMessage("VideoCompleted","")}),jQuery(".fsk-sb-close-button").show(),jQuery(".fsk-split-box-close-video").hide();var e=jQuery(".fsk_split_box_post_video");e.fadeIn();var e;switch(window._FskPostVideoType){case"IMAGE":e=jQuery(".fsk-bumper-image");break;case"COMPANION":e=jQuery("#"+window.fskVideoDivId+"-companion-banner");break;default:e=jQuery(".fsk_split_box_post_video")}if(SCMPlayer_sendMessage("ImageSize",e.width()+"x"+(e.height()+window.fskExtraHeight())),window._FskVideoReplayed===void 0||!window._FskVideoReplayed)if("COMPANION"==window._FskPostVideoType){try{$.each(_FskPostVideoContent.content.tracking.creativeview,function(e,t){window._FskVastParser._addPixel(t,"companioncreativeview")})}catch(t){}SCMPlayer_logger("SplitBoxLeaveBehindDisplay")}else SCMPlayer_logger("IMAGE"==window._FskPostVideoType?"SplitBoxBumperDisplay":"SplitBoxSocialBumperDisplay")}else"PASSBACK"!=window._FskPostVideoType||void 0!==window._FskVideoReplayed&&window._FskVideoReplayed||(SCMPlayer_logger("BannerPassbackDisplay"),SCMPlayer_sendMessage("BannerPassback",window._FskPostVideoContent));window._FskPostVideoType=void 0,window._FskPostVideoContent=void 0};var SCMPlayer_initPostVideo=function(e){if(void 0!==window._fskPublisher&&window._fskPublisher.displayPostVideoImage){var t,i;if(window._FskVastParser!==void 0&&window._FskVastParser._currentVideo!==void 0){var n=window._FskVastParser._currentVideo.video;if(n.displayBumper&&n.postVideoImage&&""!=n.postVideoImage)t="IMAGE",i={image:n.postVideoImage,click:n.postVideoImageClick};else if(n.displaySocialBumper&&n.postVideoContent&&""!=n.postVideoContent)t="SOCIAL",i={logo:n.postVideoLogo,content:n.postVideoContent,style:n.postVideoStyle};else if(window._FskVastParser._currentVideo.companions.length>0&&window._FskVastParser._currentVideo.video.hasLeaveBehindBanner){var s,a=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||isMobile.any(),r,o;a?(r=250,o=300):(r=90,o=728);for(var l=0;window._FskVastParser._currentVideo.companions.length>l;l++){var d=window._FskVastParser._currentVideo.companions[l];if(parseInt(d.height)==r&&parseInt(d.width)==o){s=d;break}}s&&(t="COMPANION",i={content:s})}}if(t===void 0&&window._fskPublisher.data!==void 0&&window._fskPublisher.data.postVideoType&&window._fskPublisher.data.postVideoImage&&!e&&(t=window._fskPublisher.data.postVideoType,i="IMAGE"==t?{image:window._fskPublisher.data.postVideoImage,click:window._fskPublisher.data.postVideoImageClick}:window._fskPublisher.data.postVideoImage),window._FskPostVideoType=t,window._FskPostVideoContent=i,void 0!==t)if("IMAGE"==t){var c=document.createElement("IMG");c.src=i.image,c.className="fsk-bumper-image",c.style.maxHeight=window.fskHeight+"px",c.style.maxWidth=window.fskWidth+"px",jQuery(".fsk_split_box_post_video").html(c),""!=i.click&&(c.style.cursor="pointer",SCMPlayer_initBumperClick())}else if("COMPANION"==t){var s=i.content;if(s.image!==void 0&&s.image){var c=new Image;c.id="fsk_companion_image",c.className="fsk_companion_image",c.src=s.image;var u=jQuery(".fsk_split_box_post_video").html("");u.append('
'),jQuery(".fsk-leave-behind-image").append(c),u.addClass("leave-behind-banner"),jQuery(".fsk-leave-behind-image").click(function(){s.clickthrough!==void 0&&""!=s.clickthrough?u=s.clickthrough:jQuery.each(window._FskVastParser.result.ad.clickthrough,function(e,t){return""==t||null==t?!0:(u=window._FskVastParser._getConfig("urlPreprocessor")(t,!0),!1)}),window._FskVastParser.log("CompanionClick"),window.open(u)})}else if(i.content.html!==void 0&&""!=i.content.html){var h=document.createElement("IFRAME");h.id=window.fskVideoDivId+"-companion-banner",h.className="fsk-bumper-image",h.style.height=i.content.height+"px",h.style.width=i.content.width+"px",window.fskWidthl;l++){var f=p[l];n[f+"Url"]!==void 0&&""!=n[f+"Url"]?(jQuery(".fsk-social-"+f).show(),jQuery(".fsk-social-"+f).attr("target","_blank")):jQuery(".fsk-social-"+f).hide()}i.logo!==void 0&&""!=i.logo&&jQuery(".fsk-split-box-post-content-logo").attr("src",i.logo),i.style!==void 0&&""!=i.style&&jQuery(".fsk_split_box_post_video_banner")[0].setAttribute("style",i.style),i.content!==void 0&&""!=i.content&&jQuery(".fsk-split-box-post-content").html(i.content),SCMPlayer_initBumperSocial()}}};var SCMPlayer_displaySocial=function(e,t,i){var n=80;e!==void 0&&""!=e&&($(".fsk-player-html-panel").prepend(''),n+=35),t!==void 0&&""!=t&&($(".fsk-player-html-panel").prepend(' '),n+=35),i!==void 0&&""!=i&&$(".fsk-player-html-panel").prepend(' ')};var SCMPlayer_initBumperSocial=function(){$(".fsk-social.fsk-social-facebook").attr("href",SCMPlayer_UrlPreprocessor(BASE_EVT()+"share_bumper_facebook")),$(".fsk-social.fsk-social-google").attr("href",SCMPlayer_UrlPreprocessor(BASE_EVT()+"share_bumper_google")),$(".fsk-social.fsk-social-twitter").attr("href",SCMPlayer_UrlPreprocessor(BASE_EVT()+"share_bumper_twitter"))};var SCMPlayer_initBumperClick=function(){$(".fsk-bumper-image").click(function(){window.open(SCMPlayer_UrlPreprocessor(BASE_EVT()+"click_bumper"))})};var SCMPlayer_GetRuntimeVariable=function(e,t,i){if("dashboard.slimcutmedia.com"==((I11C || I10C).PreLocationContextProxy)(window).locat1on.hostname)return"";var n;switch(window._FskVastParser!==void 0&&window._FskVastParser._currentVideo!==void 0&&(n=window._FskVastParser._currentVideo.video),e){case"player-height":return window.fskHeight;case"player-width":return window.fskWidth;case"current-url-esc":return encodeURIComponent(encodeURIComponent(window._fskRefUrl===void 0?document.referrer&&""!=document.referrer?document.referrer:((I11C || I10C).PreLocationContextProxy)(window).locat1on.href:window._fskRefUrl));case"current-url":return encodeURIComponent(window._fskRefUrl===void 0?document.referrer&&""!=document.referrer?document.referrer:((I11C || I10C).PreLocationContextProxy)(window).locat1on.href:window._fskRefUrl);case"referer-url":return encodeURIComponent(((I11C || I10C).PreLocationContextProxy)(document).locat1on.href);case"timestamp":return Math.floor((new Date).getTime()/1e3);case"ttm":return window._fskVideoSelection.videoTransaction.creationDate;case"user-agent":return encodeURIComponent(navigator.userAgent);case"ip":return window.clientIp;case"video-id":try{return t!==void 0?t:n.id}catch(s){return""}case"deal-id":try{return i!==void 0?i:n.dealId}catch(s){return""}case"transaction-id":return window._fskVideoSelection.videoTransaction.id;case"session-id":return window._fskVideoSelection.videoTransaction.sessionId;case"publisher-id":return window._fskPublisher.id;case"config-id":return window._fskPublisher.configId;case"country":return encodeURIComponent(window._fskVideoSelection.videoTransaction.country);case"province":return encodeURIComponent(window._fskVideoSelection.videoTransaction.province);case"dma":return encodeURIComponent(window._fskVideoSelection.videoTransaction.dma||"OTHER");case"city":return encodeURIComponent(window._fskVideoSelection.videoTransaction.city);case"section":return encodeURIComponent(window._fskVideoSelection.videoTransaction.flc);case"subsection":return encodeURIComponent(window._fskVideoSelection.videoTransaction.slc);case"tracker-id":return-1==((I11C || I10C).PreLocationContextProxy)(window).locat1on.search.indexOf("trackerId=")?"":((I11C || I10C).PreLocationContextProxy)(window).locat1on.search.substring(((I11C || I10C).PreLocationContextProxy)(window).locat1on.search.indexOf("trackerId=")).split("&")[0].split("=")[1];case"price-floor":var a=window._fskPublisher.priceFloor!==void 0?parseInt(100*parseFloat(window._fskPublisher.priceFloor)):"";return""!=a&&isNaN(a)&&(a=""),a;default:return""}};var SCMPlayer_UrlPreprocessor=function(e,t,i,n){while(-1!=e.indexOf("__random-number__")){var s=1e9;var a=1e6;var r=Math.floor(Math.random()*(s-a))+a;e=e.replace("__random-number__",""+r)}var o=["player-height","player-width","current-url","current-url-esc","referer-url","timestamp","user-agent","ip","video-id","deal-id","transaction-id","session-id","publisher-id","config-id","country","province","city","dma","section","subsection","tracker-id","price-floor","ttm"];$.each(o,function(t,s){while(-1!=e.indexOf("__"+s+"__"))e=e.replace("__"+s+"__",SCMPlayer_GetRuntimeVariable(s,i,n))});var l={};isMobile.any()&&(l=isMobile.UAMobile());var d=["os","osv","make","model"];$.each(d,function(t,i){-1!=e.indexOf("__device-"+i+"__")&&(e=void 0==l[i]?e.replace(RegExp("&[^&]*=__device-"+i+"__","i"),""):e.replace("__device-"+i+"__",""+l[i]))});var c;window._FskVastParser!==void 0&&(c=window._FskVastParser._currentVideo),e.indexOf("$MBR")>0&&c!==void 0&&c.extensions!==void 0&&c.extensions.SpotX!==void 0&&c.extensions.SpotX.Bid!==void 0&&c.extensions.SpotX.Bid.value!==void 0&&(e=e.replace("$MBR",c.extensions.SpotX.Bid.value));var u=!1;try{u=!!window.MSInputMethodContext&&!!document.documentMode}catch(h){}return(!t&&"https:"===((I11C || I10C).PreLocationContextProxy)(window).locat1on.protocol||u)&&(e=e.replace("http://","https://")),window._fskVideoSelection.targeting!==void 0&&window._fskVideoSelection.targeting&&$.each(window._fskVideoSelection.targeting,function(t,i){while(-1!=e.indexOf("__"+t+"__"))e=e.replace("__"+t+"__",i)}),e};var lastEvent=void 0;var hasScrolled=!1;var SCMPlayer_EventListener=function(e){if(e.type!==void 0&&"blur"==e.type)((I11C || I10C).PostMessage).call(window.parent,JSON.stringify({ns:"FSK",c:window._fskPublisher.configId,ev:"AdBlur",d:""}),document.referrer&&""!=document.referrer?document.referrer:((I11C || I10C).PreLocationContextProxy)(window).locat1on.origin);else if(e.type!==void 0&&"focus"==e.type)((I11C || I10C).PostMessage).call(window.parent,JSON.stringify({ns:"FSK",c:window._fskPublisher.configId,ev:"AdFocus",d:""}),document.referrer&&""!=document.referrer?document.referrer:((I11C || I10C).PreLocationContextProxy)(window).locat1on.origin);else{try{var t=JSON.parse(e.data);if(t.ns!==void 0&&"FSK"==t.ns){if("WindowSize"==t.ev)window.fskParentWidth=t.d[0],window.fskParentHeight=t.d[1];else if("PlayerResize"==t.ev&&t.d.width&&t.d.height){var i=projekktor("#"+window.fskVideoDivId);i.setSize({width:t.d.width,height:t.d.height}),jQuery(".fsk_split_box_video_container>div").css("width",t.d.width+"px"),jQuery(".fsk_split_box_video_container>div").css("height",t.d.height+"px");var n=t.d.height+window.fskExtraHeight();SCMPlayer_sendMessage("PlayerResized",""+t.d.width+"x"+n)}else if("ResetPlayerSize"==t.ev){var i=projekktor("#"+window.fskVideoDivId);i.setSize({width:window.fskWidth,height:window.fskHeight}),jQuery(".fsk_split_box_video_container>div").css("width",window.fskWidth+"px"),jQuery(".fsk_split_box_video_container>div").css("height",window.fskHeight+"px"),SCMPlayer_sendMessage("PlayerSizeReset","")}return}}catch(s){}if(e.data===void 0||"string"!=typeof e.data)return;"FSK_OnScreen"!=e.data||hasScrolled||(hasScrolled=!0,SCMPlayer_logger("AdOpportunity"));var a=document.getElementById(window.fskVideoDivId);if(a&&"COMPLETED"!=projekktor("#"+window.fskVideoDivId).getState()){var i=projekktor("#"+window.fskVideoDivId);if(lastEvent!=e.data&&e.data||window._FskHasImpression===void 0&&"FSK_OnScreen"==e.data)if(lastEvent=e.data,"FSK_OnScreen"==e.data)window._FskVastParser!==void 0?(window._FskVastParser._autoplay=!0,"LOADER"!=window._FskVastParser.PlayerType&&window._FskVastParser._currentVideo===void 0||"LOADER"==window._FskVastParser.PlayerType&&(window._FskVastParser._currentState===void 0||!window._FskVastParser.isReady())?window._FskVastParser.startVAST():("LOADER"==window._FskVastParser.PlayerType&&window._FskVastParser.playAVideo(),i.setPlay(),navigator.userAgent.match(/(ipad|iphone)/i)&&setTimeout(function(){i.setPlay()},20))):lastEvent="";else if(0==e.data.indexOf("FSK_Preload")){try{var r=decodeURIComponent(e.data.split("#")[1]);window._fskRefUrl=r}catch(s){}window._FskVastParser!==void 0&&window._FskVastParser._currentVideo===void 0&&window._FskVastParser.startVAST()}else"FSK_OutOfScreen"==e.data&&window.forcePause()}}};function MRCTimer(e,t){var i=null,n=t;this.pause=function(){window.clearTimeout(i),i=null},this.resume=function(){0>=n||(window.clearTimeout(i),i=window.setTimeout(e,n))},this.running=function(){return null!=i},this.resume()}var SCMPlayer_sendImpressionToParent=function(){window._mrcTimer=new MRCTimer(function(){void 0===window._FskViewable&&(window._FskViewable=!0,window._FskVastParser.logVastEvent("viewable"))},2e3);try{var e={campaignId:window._FskVastParser._currentVideo.video.campaignId};e.splitBoxType=SCMPlayer_initSplitBoxType(),SCMPlayer_sendMessage("AdImpression",e)}catch(t){console.log(t)}SCMPlayer_displayClose(),SCMPlayer_initPostVideo(SCMPlayer_canReplayVideo(window.fskVideoFile)),SCMPlayer_canReplayVideo(window.fskVideoFile)&&SCMPlayer_preLoadReplayVideo()};var SCMPlayer_init=function(e,t,i,n,s,a,r,o,l,d){var c=document.getElementById(n);if(c){var u=document.getElementById(i);u&&u.parentElement.removeChild(u),u=document.createElement("video"),u.id=i,u.style.width=s+"px",u.style.height=a+"px",c.appendChild(u),SCMPlayer_initClaimText(),window.fskHeight=a,window.fskWidth=s,window.fskVideoDivId=i,window.fskExtraHeight=function(){return(0==jQuery(".fsk_split_box_claim").height()?0:21)+jQuery(".fsk_split_box_footer").height()+jQuery(".fsk_split_box_header").height()},isMobile.any()&&$(".fsk_split_box_background").length>0&&-1==SCMPlayer_getPlayerModel().indexOf("MOBILE")&&($(".fsk_split_box_background").css("display","none"),(navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/iPad/i))&&$(".fsk_split_box_background").css("background-color","")),window._FSKPlayer_initialVolume="0.50";var h=["display","controlbar"];var p={config:{videoScaling:"fill",disallowSkip:!0,streamType:"http"}};var f=0;var m="fsk";try{var g=SCMPlayer_getPlatforms();var _=projekktor("#"+i,{_cssClassPrefix:m,debug:!1,platforms:g,playbackQualities:[{key:"240p",minHeight:0,minWidth:0},{key:"360p",minHeight:241,minWidth:0},{key:"480p",minHeight:361,minWidth:0},{key:"720p",minHeight:481,minWidth:0},{key:"1080p",minHeight:721,minWidth:0}],loop:!1,replay:_fskPublisher.data.canReplayVideo!==void 0&&"true"===_fskPublisher.data.canReplayVideo,controls:!0,cookieExpiry:0,volume:parseFloat(window._FSKPlayer_initialVolume),baseVolume:.5,fixedVolume:!1,autoplay:!1,autostop:o,addplugins:h,urlPreprocessor:SCMPlayer_UrlPreprocessor,poster:r,thereCanBeOnlyOne:!0,fullscreen:!1,enableFullscreen:_fskPublisher.data!==void 0&&_fskPublisher.data.fullscreen!==void 0&&_fskPublisher.data.fullscreen,width:s+"px",height:a+"px",keys:[{32:function(e){}}],playerFlashMP4:SWF_URL+"/jarisplayer.swf",playerFlashMP3:SWF_URL+"/jarisplayer.swf",vpaidTimeout:_fskPublisher.data.OpenMKTimeOut,playerFlashVPAID:SWF_URL+"/VPAID.swf",playerFlashVPAIDLoader:SWF_URL+"/VPAIDLoader.swf",plugin_controlbar:{toggleMute:!0,controlsTemplate:' ',showOnStart:!0,fadeDelay:navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||isMobile.any()?6e5:2500},plugin_display:{displayClick:function(){},displayPlayingClick:function(){}},playlist:[p]});window._FskVastParser=new SCMPlayer_VastLoader(window._fskVideoSelection.videos,_,l),jQuery(".fsk").css("max-height",a+"px"),"MOBILE"==SCMPlayer_getPlayerModel()&&(window._FskVastParser.startVAST(),window._FskVastParser._autoplay=!0),_.addListener("state",function(e){if("COMPLETED"==e&&window._FskHasImpression&&(SCMPlayer_canReplayVideo(window.fskVideoFile)||jQuery(".fsk_split_box_video_container").hide()),"AWAKENING"==e||"IDLE"==e)try{"vpaid"!=_.getItem().platform&&"videovpaidjs"!=_.getItem().mediaModel&&(window.fskVideoFile=_.getItem().file[0].src)}catch(t){}else if("PLAYING"==e){try{window._mrcTimer.resume()}catch(t){}if("vpaid"==_.getItem().platform||"videovpaidjs"==_.getItem().mediaModel)return;window._FskHasImpression===void 0&&(window._FskHasImpression=!0,SCMPlayer_sendImpressionToParent(),d!==void 0&&d.display&&SCMPlayer_displaySocial(d.twitter,d.facebook,d.google))}else if("PAUSED"==e)try{window._mrcTimer.pause()}catch(t){}}),_.addListener("vpaidimpression",function(e){window._FskHasImpression===void 0&&(window._FskHasImpression=!0,SCMPlayer_sendImpressionToParent(),d!==void 0&&d.display&&SCMPlayer_displaySocial(d.twitter,d.facebook,d.google))}),window.isFS=!1;var v,y;$(".fskfsenter").bind("touchstart click",function(){if(!isFS){$(".fsk.fskhttp").addClass("fullscreen"),SCMPlayer_sendMessage("AdFullScreen",""),window.isFS=!0;var e=1.778;var t=window.fskParentWidth,n=window.fskParentHeight;var s=Math.floor(t/e),a=Math.floor(n*e);var r,o;s>n?(r=Math.floor(n),o=a):(r=s,o=Math.floor(t)),v=c.getAttribute("style"),c.removeAttribute("style"),$(c).addClass("fsk_player_html_video_panel"),$(c).css("margin-left",-1*(o/2)+"px"),$(c).css("margin-top",-1*(r/2)+"px"),$(c).css("width",o+"px"),$(c).css("height",r+"px");var l=document.getElementById(i);y=l.getAttribute("style"),l.removeAttribute("style"),$(l).addClass("fsk_player_html_video"),$(c).parent().append('
'),$(".fskfsenter").removeClass("active").addClass("inactive"),$(".fskfsexit").removeClass("inactive").addClass("active")}}),$(".fskfsexit").bind("touchstart click",function(){if(isFS){$(".fsk.fskhttp").removeClass("fullscreen"),SCMPlayer_sendMessage("AdExitFullScreen",""),window.isFS=!1,$("#opaque_"+i).remove();var e=document.getElementById(i);$(e).removeClass("fsk_player_html_video"),e.setAttribute("style",y),$(c).removeClass("fsk_player_html_video_panel"),c.setAttribute("style",v),$(".fskfsexit").removeClass("active").addClass("inactive"),$(".fskfsenter").removeClass("inactive").addClass("active")}}),_.addListener("start",function(e){"unmute"!=l?_.setVolume(parseFloat(0)):_.setVolume(parseFloat(initialVolume))});var w=window._FSKPlayer_initialVolume;var k=["-slimcutmedia-tm","clickthrought","scrubberdrag","unmute","mute","timeleft","sec_rem","min_rem","loaded","playhead","controls","-split-box-close-video","-close-image"];var b=function(e,t){if("mouseOver"==l&&!isMobile.any()&&!navigator.userAgent.match(/iPhone/i)){if(!e)return _.setVolume(parseFloat(w)),jQuery(".fsk-player-html-panel").addClass("fsk-hover"),void 0;var i=t.toElement?t.toElement.className:t.relatedTarget?t.relatedTarget.className:null;if(i){var n=!0;$.each(k,function(e,t){n=n&&-1==i.indexOf(m+t)}),n=n&&-1==i.indexOf("share-btn")}else n=!0;n=null==i||1==n,e&&n&&(_.setVolume(0),jQuery(".fsk-player-html-panel").removeClass("fsk-hover"))}};if($.each(k,function(e,t){$("."+m+t).mouseleave(function(e){b(!0,e)})}),$.each(k,function(e,t){$("."+m+t).mouseenter(function(e){b(!1,e)})}),$(".fskmute").click(function(){w=0}),$(".fskunmute").click(function(){w=window._FSKPlayer_initialVolume}),$(".fskunmute").bind("touchstart",function(){window.hasUnmuteClickBeenFired=!0}),_.addListener("mouseenter",function(e){b(!1,e)}),_.addListener("mouseleave",function(e){b(!0,e)}),_.addListener("twosecs",function(e){SCMPlayer_logger("twosecs")}),_.addListener("done",function(){SCMPlayer_canReplayVideo(window.fskVideoFile)||SCMPlayer_destroyPlayer(t)}),isMobile.any()&&-1==SCMPlayer_getPlayerModel().indexOf("MOBILE")){_.setVolume(0),$(".fskunmute").addClass("active").removeClass("inactive"),$(".fskmute").addClass("inactive").removeClass("active");var P=!1;var C=!1;var S;_.addListener("ready",function(){P||(P=!0,S=document.createElement("div"),S.id="fsk_mobile_overlay",S.style.width="100%",S.style.height="100%",S.style.zIndex=999999,S.style.position="fixed",S.style.top=0,S.style.left=0,document.getElementsByTagName("body")[0].appendChild(S),$(S).bind("touchstart pointerdown",function(){$("#fsk_mobile_overlay").remove(),SCMPlayer_sendMessage("SBRemoveOverlay",""),window._FskVastParser!==void 0&&window._FskVastParser._autoplay!==void 0&&window._FskVastParser._autoplay&&_.setPlay()}),SCMPlayer_sendMessage("SBGoOn",""))}),_.addListener("state",function(e){"PLAYING"===e?($("#fsk_mobile_overlay").remove(),SCMPlayer_sendMessage("SBRemoveOverlay",""),SCMPlayer_sendMessage("VideoSize",""+s+"x"+(a+window.fskExtraHeight()))):"STARTING"===e&&SCMPlayer_sendMessage("VideoSize",""+s+"x"+(a+window.fskExtraHeight()))});var A=function(e){"fsk_sb_acknowledge"===e.data&&($(".fsk_split_box_background").is(":visible")||$(".fsk_split_box_background").css("display","block"),SCMPlayer_sendMessage("VideoSize",""+s+"x"+(a+window.fskExtraHeight())))};window.addEventListener?addEventListener("message",A,!1):attachEvent("onmessage",A)}window.addEventListener?(addEventListener("message",SCMPlayer_EventListener,!1),addEventListener("focus",SCMPlayer_EventListener,!1),addEventListener("blur",SCMPlayer_EventListener,!1)):(attachEvent("onmessage",SCMPlayer_EventListener),attachEvent("onfocus",SCMPlayer_EventListener),attachEvent("onblur",SCMPlayer_EventListener)),"mouseOver"==l&&SCMPlayer_displayMouseOver(),("MOBILE"==SCMPlayer_getPlayerModel()||isMobile.any()&&"NATIVE_MOBILE"==SCMPlayer_getPlayerModel())&&SCMPlayer_sendMessage("VideoSize",""+s+"x"+(a+window.fskExtraHeight())),SCMPlayer_sendMessage("PlayerReady",SCMPlayer_buildEventUrl("__EVENT__","__EXTRA__","2"));try{window.csStreamingTag=new ns_.StreamingTag({customerC2:"20054901"}),window.csStreamingPlay=function(){if(void 0!==window.csStreamingTag&&void 0!==window._FskVastParser){var e={ns_st_ci:window._FskVastParser._currentVideo.video.dealId+"_"+window._FskVastParser._currentVideo.video.id,c3:window._fskPublisher.configId,c4:window._FskVastParser._currentVideo.video.dealId,c6:window._FskVastParser._currentVideo.video.id};window.csStreamingTag.playVideoAdvertisement(e)}},window.csStreamingStop=function(){void 0!==window.csStreamingTag&&void 0!==window._FskVastParser&&window.csStreamingTag.stop()}}catch(E){}}catch(E){console.log(E)}return _}};var SCMPlayer_SetupFooterAuto=function(){jQuery(".fsk_split_box_background").css("height","316px"),window.parent.jQuery(".fsk_splitbox_2619").css("max-height","310px");var e="336px",t="189px";var i=[{image:"http://static.freeskreen.com/images/autotrader/853ddb7c-7d3d-48ad-a684-b0992f8c4dc8.jpg",url:"http://www.autotrader.ca/a/BMW/X5/Markham/Ontario/5_29224291_ON20071001105925155/?ursrc=hp&urp=1&urm=4",text:"2015 BMW X5 xDrive35i AWD...",price:"$66,188"},{image:"http://static.freeskreen.com/images/autotrader/c941c86c-ae37-4b06-8c9c-2bbce426814e.jpg",url:"http://www.autotrader.ca/a/BMW/7+Series/Toronto/Ontario/5_28421037_ON20071217113316750/?ursrc=hp&urp=2&urm=4",text:"2011 BMW 750I xDRIVE|M-SPORT...",price:"$31,899"},{image:"http://static.freeskreen.com/images/autotrader/728db9f9-d97d-4b8b-8fd0-6104c4db3d5e.jpg",url:"http://www.autotrader.ca/a/Nissan/Murano/Mississauga/Ontario/5_28692950_ON20070730114242570/?ursrc=hp&urp=3&urm=4",text:"2005 Nissan Murano SL**SUNRO...",price:"$3,195"},{image:"http://static.freeskreen.com/images/autotrader/23d90be7-a98d-448a-bcf8-9e09aa59388c.jpg",url:"http://www.autotrader.ca/a/MINI/Cooper+Hardtop/Woodbridge/Ontario/5_29183809_ON20080602111919445/?ursrc=hp&urp=4&urm=4",text:"2013 MINI Cooper Knightsbridge",price:"$15,945"}];
var n="http://static.freeskreen.com/images/autotrader/logo-2Line.png";var s=[".fsk",".fsk_split_box_video_container>div",".fsk_split_box_videos_container"];for(var a=0;s.length>a;a++)jQuery(s[a]).css("height",t),jQuery(s[a]).css("width",e);jQuery(".fsk_split_box_videos_container").css("float","left"),jQuery(".fsk_split_box_widget").css("height",t),jQuery(".fsk_split_box_widget").prepend('
'),jQuery(".fsk_split_box_widget>div>img").css("cursor","pointer"),jQuery(".fsk_split_box_widget>div>img").click(function(){window.open("http://www.autotrader.ca")});var r=jQuery(".fsk_split_box_footer");r.html(""),r.css("clear","both"),r.css("margin-top","5px"),r.append('
'),r.addClass("shoppable-footer");for(var a=0;i.length>a;a++){var o=i[a];var l=document.createElement("DIV");l.style.width="120px",l.style.height="90px",l.style.verticalAlign="middle",l.style.display="inline-block",l.style.position="relative",l.style.cursor="pointer";var d=new Image;d.src=o.image,d.style.width="120px",a>0?l.style.marginLeft="5px":jQuery(".fskhmbannerblock").append('
'),l.appendChild(d),jQuery(".fskhmbannerblock").append(l),jQuery(l).attr("data-idx",a),jQuery(l).click(function(){window.open(o.url)}),jQuery('.fskhmbannerblock div[data-idx="'+a+'"]').append('
'+i[a].text+" "+i[a].price+' See Now
')}var d=new Image;d.src=n,d.style.width="120px",d.style.verticalAlign="middle",d.style.marginLeft="5px",jQuery(".fskhmbannerblock").append(d),jQuery(d).click(function(){window.open("http://www.autotrader.ca")})};var SCMPlayer_SetupFooter=function(){if(((I11C || I10C).PreLocationContextProxy)(window.parent).locat1on.href.indexOf("SHAUTODEMO")>-1)return SCMPlayer_SetupFooterAuto(),void 0;var e=window._FskVastParser._currentVideo.companions;if(e!==void 0&&e.length>0&&(1==window._FskVastParser._currentVideo.video.hasFooterBanner||window._FskVastParser._currentVideo.extensions.SCM!==void 0&&window._FskVastParser._currentVideo.extensions.SCM.DealID!==void 0&&window._FskVastParser._currentVideo.extensions.SCM.DealID.FooterEnabled!==void 0&&"true"==window._FskVastParser._currentVideo.extensions.SCM.DealID.FooterEnabled)){var t,i=90,n=728;for(var s=0;window._FskVastParser._currentVideo.companions.length>s;s++){var a=window._FskVastParser._currentVideo.companions[s];if(parseInt(a.height)==i&&parseInt(a.width)==n){t=a;break}}t&&(window._FskFooterBanner=t);var r=jQuery(".fsk_split_box_footer");if(r.html(""),t.image!==void 0&&t.image){var o=new Image;o.id="fsk_companion_image",o.className="fsk_companion_image",o.src=t.image,o.onload=function(){SCMPlayer_sendMessage("VideoSize",""+window.fskWidth+"x"+(window.fskHeight+window.fskExtraHeight()))},r.append('
'),jQuery(".fskhmbannerblock").append(o),r.addClass("shoppable-footer"),jQuery(".fskhmbannerblock").click(function(){t.clickthrough!==void 0&&""!=t.clickthrough?r=t.clickthrough:jQuery.each(window._FskVastParser.result.ad.clickthrough,function(e,t){return""==t||null==t?!0:(r=window._FskVastParser._getConfig("urlPreprocessor")(t,!0),!1)}),window._FskVastParser.log("CompanionClick"),window.open(r)})}else if(t.html!==void 0&&t.html){var l=document.createElement("IFRAME");l.id="fsk_companion_image",l.className="fsk_companion_image",l.style.height=t.height+"px",l.style.width=t.width+"px",window.fskWidth
'),jQuery(".fskhmbannerblock").append(l),r.addClass("shoppable-footer");var l=document.getElementById("fsk_companion_image");l.contentWindow.document.open(),l.contentWindow.document.write(t.html),l.contentWindow.document.close(),SCMPlayer_sendMessage("VideoSize",""+window.fskWidth+"x"+(window.fskHeight+window.fskExtraHeight()))}}else SCMPlayer_SetupDBFooter()};var SCMPlayer_SetupDBFooter=function(){var e=window._FskVastParser._currentVideo.video.footerBanner;if(e){var t=window._FskVastParser._currentVideo.video.footerBannerClick;var i=jQuery(".fsk_split_box_footer");i.html("");var n=new Image;n.id="fsk_companion_image",n.className="fsk_companion_image",n.src=e,n.onload=function(){SCMPlayer_sendMessage("VideoSize",""+window.fskWidth+"x"+(window.fskHeight+window.fskExtraHeight()))},i.append('
'),jQuery(".fskhmbannerblock").append(n),i.addClass("shoppable-footer"),jQuery(".fskhmbannerblock").click(function(){window._FskVastParser.log("CompanionClick"),window.open(t)})}};var SCMPlayer_destroyPlayer=function(e){try{"splitBox"==e&&window.jQuery("#"+window.fskVideoDivId).parent().hide();var t=window.projekktor("#"+window.fskVideoDivId);t&&t.selfDestruct()}catch(i){window.console.log(i)}};
;(I11C || I10C).ScriptEnd();