
    /* Cache version: 20121101 */
    /* Included files: libs/swfobject.js,libs/streamsense.min.js,libs/streamsense-html5.min.js */




    /*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();/* Copyright (c) 2009 Nedstat B.V. 4.1.0
 * All rights reserved.
 * By using this software, you are agreeing to be bound by the
 * terms of this license: http://www.nedstat.com/terms.html
 */
if(typeof(ns_)=="undefined"){ns_=new Object()}ns_.extend=function(a,c){for(var b in c){a[b]=c[b]}return a};ns_.encode=encodeURIComponent?encodeURIComponent:function(a){return escape(a).replace(/\//g,"%2F")};ns_.b={};ns_.b.ie=
/*@cc_on!@*/
false;ns_.b.ie9=ns_.b.ie&&document.addEventListener;ns_.b.sf=navigator.vendor?/apple/i.test(navigator.vendor):false;ns_.b.ch=window.chrome?true:false;ns_.b.ff=/firefox/i.test(navigator.userAgent);ns_.b.op=window.opera?true:false;if(typeof(ns_)=="undefined"){ns_=new Object()}ns_.dt={initDate:new Date().getTime(),lastRun:new Date().getTime(),delta:0,intervalID:null,intervalTime:1000,intervalRuns:0,timedObserver:function(){var a=ns_.dt.getTime();ns_.dt.intervalID=setTimeout(ns_.dt.timedObserver,ns_.dt.intervalTime);ns_.dt.intervalRuns++;var b=a-ns_.dt.lastRun-ns_.dt.intervalTime;if(b>(ns_.dt.intervalTime*2)||b<-(ns_.dt.intervalTime*2)){ns_.dt.delta+=b;a-=b}ns_.dt.lastRun=a},getTime:function(){var a=new Date().getTime();return a-ns_.dt.delta}};ns_.dt.timedObserver();ns_.extend(Function.prototype,(function(){var e=Array.prototype.slice;function d(k,h){var j=k.length,i=h.length;while(i--){k[j+i]=h[i]}return k}function f(i,h){i=e.call(i,0);return d(i,h)}function a(){return this.STargumentIsSuper()?["$super"]:[""]}function c(){return/^[\s\(]*function[^(]*\(\s*\$super/.test(this.toString())}function b(j){if(arguments.length<2&&typeof arguments[0]=="undefined"){return this}var h=this,i=e.call(arguments,1);return function(){var k=f(i,arguments);return h.apply(j,k)}}function g(i){var h=this;return function(){var j=d([h.STbind(this)],arguments);return i.apply(this,j)}}return{STargumentNames:a,STargumentIsSuper:c,STbind:b,STwrap:g}})());ns_.Class={extend:function(c,a){if(arguments.length==1){a=c,c=null}if(typeof(c)=="function"){var b=function(){return this.initialize.apply(this,arguments)};b.prototype=new c()}else{var b=function(){}}if(a){ns_.Class.inherit(b.prototype,a)}return b},inherit:function(e,b,h){if(arguments.length==3){var c=e[h],d=b[h],g=d;var a;if(e&&g.STargumentIsSuper()){d=(function(f){return function(){return f.apply(this,arguments)}})(c).STwrap(g)}else{d=function(){var j=this.parent;this.parent=c;var f=g.apply(this,arguments);j?this.parent=j:delete this.parent;return f}}d.valueOf=function(){return g};d.toString=function(){return g.toString()};e[h]=d}else{for(var i in b){if(e[i]&&typeof(b[i])=="function"){ns_.Class.inherit(e,b,i)}else{e[i]=b[i]}}}return e}};if(typeof(ns_.ar)=="undefined"){ns_.ar={push:function(){for(var b=0,a=arguments.length;b<a;b++){this[this.length]=arguments[b]}},splice:function(){var j=ns_.ar.create(),d=arguments;if(d.length<=1){return j}else{if(d.length>2){for(var f=2,c=d.length;f<c;f++){j.push(d[f])}}}var b=this.slice(0,d[0]);var e=this.slice(d[0],d[0]+d[1]);var h=this.slice(d[0]+d[1]);var g=b.concat(j,h);this.length=0;for(var f=0,c=g.length;f<c;f++){this.push(g[f])}return e},shift:function(){for(var d=0,a=this[0],c=this.length-1;d<c;d++){this[d]=this[d+1]}this.length--;return a}}}ns_.ar.create=function(){var c=[];for(var a in c){delete c[a]}for(var d=0,b=arguments.length;d<b;d++){c[c.length]=arguments[d]}return c};ns_.ar.indexOf=function(c,b){var a=-1;ns_.ar.each(c,function(e,d){if(e==b){a=d}},this);return a};ns_.ar.merge=function(){var a=ns_.ar.create();ns_.ar.each(arguments,function(b){ns_.ar.each(b,function(d,c){a[c]=d})},this);return a};ns_.ar.pair=function(c,b){var a=ns_.ar.create();ns_.ar.each(b,function(e,d){a.push(d+c+e)},this);return a};ns_.ar.each=function(g,f,d){try{if(typeof(f)=="function"){d=typeof(d)!="undefined"?d:this.each.caller;if(typeof g.length!="number"||typeof g[0]=="undefined"){var b=typeof(g.__proto__)!="undefined";for(var c in g){if((!b||(b&&typeof(g.__proto__[c])=="undefined"))&&typeof g[c]!="function"){f.call(d,g[c],c)}}}else{for(var c=0,a=g.length;c<a;c++){f.call(d,g[c],c)}}}}catch(h){}};if(typeof(ns_.dom)=="undefined"){ns_.dom={cache:{},getElementsByTagName:function(b,c){var a,b=b,c=document.getElementById(c)||document;if(c.getElementsByTagName){a=c.getElementsByTagName(b)}else{if(c.all&&c.all.tags){a=c.all.tags(b)}}return a||[]},addEvent:(document.addEventListener&&!document.attachEvent)?(function(a,c,b){a.addEventListener(c,b,false);if(ns_.dom.cache){ns_.dom.cache.add(a,c,b,false)}return true}):(document.attachEvent)?(function(a,c,b){var d;if(typeof a.addEventListener!="undefined"&&(!a.attachEvent)){d=a.addEventListener(c,b)}else{c=(c.substring(0,1)==c.substring(0,1).toUpperCase()?c:"on"+c);d=a.attachEvent(c,b)}if(d&&ns_.dom.cache){ns_.dom.cache.add(a,c,b,false)}return d}):(function(c,b,a){if(document.layers&&c==document&&b.toLowerCase()=="click"){b="mouseup";c.captureEvents(Event.MOUSEUP)}var d=c["on"+b];if(typeof d!="function"){c["on"+b]=a}else{c["on"+b]=function(f){if(d){d(f)}a(f)}}if(ns_.dom.cache){ns_.dom.cache.add(c,b,a,false)}return true}),removeEvent:function(a,c,b){ns_.dom.cache.del(a,c,b)}}}ns_.dom.cache={_events:ns_.ar.create(),add:function(b,d,c,a){this._events.push(arguments)},del:function(a,c,b){ns_.ar.each(this._events,function(e,d){if(!!!b&&e[0]==a&&e[1]==c){this.detach(e[0],e[1],e[2],e[3]);this._events.splice(d,1);throw"Event found"}else{if(!!b&&e[0]==a&&e[1]==c&&e[2]==b){this.detach(e[0],e[1],e[2],e[3]);this._events.splice(d,1);throw"Event found"}}},ns_.dom.cache)},detach:function(b,d,c,a){if(typeof b.removeEventListener!="undefined"){if(ns_.b.ie){b.removeEventListener(d,c)}else{b.removeEventListener(d,c,a)}}else{if(b.detachEvent){b.detachEvent(d,c)}}},flush:function(){try{ns_.ar.each(this._events,function(c,b){if(typeof c!="undefined"){this.detach(c[0],c[1],c[2],c[3]);this._events.splice(b,1)}},ns_.dom.cache)}catch(a){}}};ns_.dom.addEvent(window,"unload",ns_.dom.cache.flush.STbind(ns_.dom.cache));ns_.Error={};ns_.Class.extend((function(){var c=false;function e(g){c=!!g}function f(g){var h=[new Date()];h=h.concat([("0"+h[0].getHours()).slice(-2),("0"+h[0].getMinutes()).slice(-2),("0"+h[0].getSeconds()).slice(-2),("00"+h[0].getMilliseconds()).slice(-3)]);g=f.caller[0]="["+h[1]+":"+h[2]+":"+h[3]+"."+h[4]+"] "+g;return true}function b(j){for(var h=0,g=arguments.length;h<g;h++){f(arguments[h])}a()}function d(j){for(var h=0,g=arguments.length;h<g;h++){f(arguments[h])}a();if(c){throw j}return false}function a(){if(c&&typeof(console)=="object"){if(console[a.caller.name]){console[a.caller.name].apply(console,a.caller.arguments)}else{if(console.log){for(var h=0,g=a.caller.arguments.length;h<g;h++){console.log(a.caller.arguments[h])}}}}else{if(c&&(!a.caller.name||a.caller.name=="error")){for(var h=0,g=a.caller.arguments.length;h<g;h++){alert(a.caller.arguments[h])}}}}ns_.Class.inherit(ns_.Error,{log:b,debug:b,error:d,setDebug:e})})());ns_.MediaEvents={STREAM_START:"onStart",STREAM_PAUSE:"onPause",STREAM_STOP:"onStop",STREAM_RESUME:"onResume",STREAM_METADATA:"onReceiveMetaData",STREAM_SEND_DATA:"onSendData",STREAM_CHANGE:"onChange",STREAM_ERROR:"onError",STREAM_LOADING:"onLoading",STREAM_LOADED:"onLoaded",STREAM_UNLOAD:"onUnload",STREAM_VOLUME:"onVolume",STREAM_SEEK:"onSeek",PLAYHEAD_UPDATE:"onPlayHeadUpdate"};ns_.MediaEvent=function(e){if(typeof(e)!="string"){return null}var b={type:e,target:null,created:ns_.dt.getTime(),_a:{playHeadPosition:0}};if(arguments.length>1){for(var d=1,a=arguments.length;d<a;d++){for(var c in arguments[d]){if(c=="target"){b[c]=arguments[d][c]}else{b._a[c]=arguments[d][c]}}}}return b};ns_.DispatcherEvents={STREAM_START:"stream:start",STREAM_PAUSE:"stream:pause",STREAM_STOP:"stream:stop",STREAM_RESUME:"stream:resume",STREAM_METADATA:"stream:metadata",STREAM_SEND_DATA:"stream:senddata",STREAM_CHANGE:"stream:change",STREAM_ERROR:"stream:error",STREAM_LOADING:"stream:loading",STREAM_LOADED:"stream:loaded",STREAM_UNLOAD:"stream:unload",STREAM_VOLUME:"stream:volume",STREAM_SEEK:"stream:change",PLAYHEAD_UPDATE:"stream:change",MEDIA_CHANGE:"media:change"};ns_.StreamSenseEvents={PLAYLIST_END:"ss:playlistend",SHUTDOWN:"ss:shutdown",PLAY:"ss:play",PAUSE:"ss:pause",END:"ss:end",KEEP_ALIVE:"ss:keep-alive",HEARTBEAT:"ss:heartbeat",DISPATCH:"ss:dispatch",MEASURE:"ss:measure"};if(typeof(ns_.dict)=="undefined"){ns_.dict={}}ns_.dict.Labels=function(){return{measurementType:{name:"type",value:"hidden"},measurementDate:{name:"_t"},scriptVersion:{name:"st_sv",value:null},urlContainer:{name:"jspageurl"},eventCounter:{name:"st_ec"},error:{name:"st_er",value:null},eventType:{name:"st_ev",value:null},indexOfClipInPlaylist:{name:"st_cn"},programTitle:{name:"st_pr"},episodeTitle:{name:"st_ep"},episodePart:{name:"st_pn"},episodeTotalLength:{name:"st_el"},productionDate:{name:"st_dt"},type:{name:"st_ty"},bitrate:{name:"st_br"},stationName:{name:"st_st"},length:{name:"st_cl"},bandwidth:{name:"st_ub"},buffering:{name:"st_bt"},playerType:{name:"st_mp"},playerVersion:{name:"st_mv"},fee:{name:"st_fee"},totalPlayedTimeOfClip:{name:"st_pt"},playSequenceOfClip:{name:"st_sq"},playHeadPosition:{name:"st_po"},pausesSequenceOfClip:{name:"st_pc"},resolution:{name:"st_cs"},volume:{name:"st_vo"},windowState:{name:"st_ws"},playlistTitle:{name:"st_pl"},episodeParts:{name:"st_tp"},playlistLengthOfClips:{name:"st_ca"},playlistBufferTimeOfClips:{name:"st_bp"},playlistTotalPlayedTimeOfClips:{name:"st_pa"},playlistId:{name:"st_id"},playlistSequence:{name:"st_sp"},playlistPausesOfClips:{name:"st_pp"},playlistFirstPlay:{name:"st_pb",value:1},playlistLastEnd:{name:"st_pe",value:1},playlistNumberOfClips:{name:"st_cp"},heartbeatCounter:{name:"st_hc"},contentURL:{name:"st_cu"}}};ns_.EventDispatcher=ns_.Class.extend({_chain:null,_events:null,buildChain:function(){if(!this._chain){this._chain=ns_.ar.create();if(this._events){for(var a in this._events){this._chain[a]=null}}}},listen:function(b,a){if(!a instanceof Function){throw {message:"Listener isn't a function"}}this.buildChain();if(!this._chain[b]){this._chain[b]=ns_.ar.create(a)}else{this._chain[b].push(a)}},listened:function(a){if(((typeof this._chain[a]=="undefined")||(this._chain[a]==null)||(this._chain[a].length<=0))){return false}else{return true}},unlisten:function(c,b){if(!this.listened(c)){return false}for(var a=0;a<this._chain[c].length;a++){if(this._chain[c][a]===b){this._chain[c].splice(a,1)}}},fire:function(d,c){this.buildChain();c=[{target:this,type:d}].concat(c);for(var b in this._events){if(b==d&&typeof(this[d])=="function"){if(this[d].apply(this,c)==false){return false}}}if(!this.listened(d)){return false}for(var b=0,a=this._chain[d].length;b<a;b++){if(this._chain[d][b].apply(this,c)==false){return false}}}});ns_.Component=ns_.Class.extend(ns_.EventDispatcher,{_s:null,_a:null,_u:null,initialize:function(a){this._a={};this._u=ns_.ar.create();if(a){this._s=a}else{this._s=this}},set:function(c,b,a){if(!c||(ns_.ar.indexOf(this._u,c)!=-1&&!!!a)){return false}else{if(a){if(ns_.ar.indexOf(this._u,c)==-1){this._u.push(c)}}}this._a[c]=b;return true},get:function(a){if(a&&typeof this._a[a]!="undefined"){return this._a[a]}else{return null}},setAttribute:function(b,a){return this.set(b,a,true)},setAttributes:function(b){for(var a in b){this.set(a,b[a],true)}},getAttribute:function(a){return this.get(a)},getAttributes:function(c){var a={};for(var b in c){a[b]=this.get(b)}return a},getAllAttributes:function(){var a={};for(var b in this._a){a[b]=this._a[b]}return a}});ns_.Dispatcher=ns_.Class.extend(ns_.Component,(function(){this._ssEventQueue;this.last;function e($super,l){$super(l);this._ssEventQueue=ns_.ar.create();this._events={"ss:play":null,"ss:pause":null,"ss:end":null,"ss:keep-alive":null,"ss:heartbeat":null,"ss:playlistend":null,"ss:dispatch":null,"ss:measure":null}}function c(l){if(!l){return false}this._ssEventQueue.push(l)}function h(p){var n=false;for(var o=0,m=this._ssEventQueue.length;o<m;o++){if(this._ssEventQueue[o]===p){n=this._ssEventQueue.splice(o,1)}}return n}function i(r,q){var n,m,p;var l=ns_.ar.indexOf(this._ssEventQueue,r);p=l>-1?this._ssEventQueue[l]:false;q=p?p.type:q;if(r&&p==r){if(l>0){n=this._ssEventQueue[ns_.ar.indexOf(this._ssEventQueue,r)-1]}m=this._ssEventQueue[ns_.ar.indexOf(this._ssEventQueue,r)+1]}else{p=r;n=this._ssEventQueue[this._ssEventQueue.length-1]}if(!n){n=this.last}try{if(q&&(n||q=="play")&&(!n||q!=n.type)&&(!n||!(q=="pause"&&n.type=="end"))&&(!n||!(q=="pause"&&n.type=="play"&&!n.sent))){return true}else{return false}}catch(o){return false}}function g(o,m){var l=false;var n=o.substring(o.indexOf(":")+1);if(this.semaphore(false,n)||m._a.forced){l=new ns_.Measurement(this._s,n,m)}return l}function b(l,m){var n=this.dispatch(l.type,m);if(n){if(!m._a.forced){if(!m.target.isBuffering()&&this.semaphore(n,n.type)){n.send()}else{n.cancel()}}else{n.send(true)}}}function k(l,m){var n=this.dispatch(l.type,m);if(n){if(!m._a.forced){if(this.semaphore(n,n.type)){n.send()}else{n.cancel()}}else{n.send(true)}}}function a(l,m){var n=this.dispatch(l.type,m);if(n){if(!m._a.forced){if(this.semaphore(n,n.type)){n.send()}else{n.cancel()}}else{n.send(true)}}}function d(l,m){var n=this.dispatch(l.type,m);if(n){n.send()}}function j(n){var o=this._s._player.snapshot(),q=this._s._playlist._clip;o.forced=true;var l=new ns_.MediaEvent("heartbeat",o);l._a.totalPlayedTimeOfClip=q._playbackTime+(l.created-q._playbackStartTime);var p=this.dispatch(n.type,l);p.labels.heartbeatCounter.value=this._s._heart.counter;if(p){p.send()}}function f(l,m){this._s.fire(ns_.StreamSenseEvents.DISPATCH,m)}return{"ss:play":b,"ss:pause":k,"ss:end":a,"ss:keep-alive":d,"ss:heartbeat":j,"ss:dispatch":f,semaphore:i,enqueue:c,dequeue:h,dispatch:g,initialize:e}})());ns_.MediaComponent=ns_.Class.extend(ns_.Component,{initialize:function($super,a){if(a){$super(a)}}});ns_.Measurement=ns_.Class.extend(ns_.Component,{type:"",date:0,prefix:"ns_",succeeded:true,sent:false,pixel:null,initialize:function($super,b,d,c){$super(b);this.labels=new ns_.dict.Labels();this.custom={};this.date=c.created;if(d&&typeof this.eventTypes[d]!="undefined"){this.type=this.labels.eventType.value=d;if(this.type=="heartbeat"){this.labels.eventType.value="hb"}if(c&&c._a){for(var a in c._a){if(typeof this.labels[a]!="undefined"){this.labels[a].value=c._a[a]}}}this.measure()}this.labels.measurementDate.value=this.date;this.custom.ns_ts=this.date},labels:{},eventTypes:{play:{mandatory:["measurementDate","measurementType","scriptVersion","eventCounter","eventType","indexOfClipInPlaylist","episodeTitle","episodePart","buffering","playerType","playerVersion","playSequenceOfClip","playHeadPosition","episodeParts","playlistId","playlistSequence","bandwidth"],playlist:["playlistFirstPlay"],optionals:["programTitle","episodeTotalLength","productionDate","type","length","fee","resolution","bitrate","volume","windowState","playlistTitle","playlistLengthOfClips","error","stationName","contentURL","urlContainer"]},pause:{mandatory:["measurementDate","measurementType","scriptVersion","eventCounter","eventType","indexOfClipInPlaylist","episodeTitle","episodePart","length","buffering","playerType","playerVersion","playHeadPosition","pausesSequenceOfClip","totalPlayedTimeOfClip","volume","episodeParts","playlistId","playlistSequence","bandwidth"],playlist:["playlistBufferTimeOfClips","playlistTotalPlayedTimeOfClips","playlistPausesOfClips","playlistLengthOfClips"],optionals:["programTitle","episodeTotalLength","productionDate","type","fee","resolution","windowState","playlistTitle","bitrate","stationName","error","urlContainer","contentURL"]},end:{mandatory:["measurementDate","measurementType","scriptVersion","eventCounter","eventType","indexOfClipInPlaylist","episodeTitle","episodePart","length","buffering","playerType","playerVersion","playHeadPosition","pausesSequenceOfClip","totalPlayedTimeOfClip","volume","episodeParts","playlistId","playlistSequence","bandwidth"],playlist:["playlistBufferTimeOfClips","playlistTotalPlayedTimeOfClips","playlistPausesOfClips","playlistLastEnd","playlistLengthOfClips"],optionals:["programTitle","episodeTotalLength","productionDate","type","fee","resolution","windowState","playlistTitle","bitrate","stationName","error","contentURL","urlContainer"]},"keep-alive":{mandatory:["measurementDate","measurementType","eventCounter","eventType","episodeTitle","playHeadPosition","playlistId"],optionals:["programTitle","playlistTitle","contentURL"]},heartbeat:{mandatory:["measurementDate","measurementType","scriptVersion","eventCounter","eventType","indexOfClipInPlaylist","episodeTitle","episodePart","length","buffering","playerType","playerVersion","playHeadPosition","pausesSequenceOfClip","totalPlayedTimeOfClip","volume","episodeParts","playlistId","playlistSequence","bandwidth","heartbeatCounter"],playlist:["playlistBufferTimeOfClips","playlistTotalPlayedTimeOfClips","playlistPausesOfClips","playlistLengthOfClips"],optionals:["programTitle","episodeTotalLength","productionDate","type","fee","resolution","windowState","playlistTitle","bitrate","stationName","error","contentURL","urlContainer"]}},bulkSet:function(b){for(var a in b){if(typeof this.labels[a]!="undefined"){this.labels[a].value=b[a]}else{this.custom[a]=b[a]}}},measure:function(){if(!!!this.type||!!!this.labels.eventType.value){return}this._s.fire(ns_.StreamSenseEvents.MEASURE,this);this._s._d.enqueue(this)},send:function(c){var b=this._s._d.last?this._s._d.last.type=="end":false,a=this._s._d.last?this._s._d.last.type=="pause":false;if(this.type!="heartbeat"&&this.type!="custom"&&this.type!="keep-alive"){this._s._d.last=this}if((this.type=="end"&&this._s._playlist._ended)||(b&&this.type=="play")||(a&&!this._s._playlist._ended)){if(!this._s._shutdown){window.setTimeout(this.preprocessPlaylistLabels.STbind(this,this.getPixelURL(),c),this._s.cfg.PLAYLIST_END_TIMER)}else{this.request(this.getPixelURL(),c)}}else{this.request(this.getPixelURL(),c)}this._s._d.dequeue(this);this._s._d.fire(ns_.StreamSenseEvents.DISPATCH,this)},preprocessPlaylistLabels:function(c,d){if((this.type=="play"||this.type=="end")&&!(((this.type=="play"&&this._s._playlist._sequence==1&&this._s._playlist._eventCounter<=2))||(this.type=="end"&&this._s._playlist._ended))){if(this.type=="play"){c=this.getPixelURL()}var e=this.eventTypes[this.type].playlist;for(var a in e){if(typeof this.labels[e[a]]!="undefined"){var b=[((typeof this.labels[e[a]].prefix=="undefined"||this.labels[e[a]].prefix)?this.prefix:""),this.labels[e[a]].name].join("");c=c.replace(new RegExp(b+"=[^&]*&","gi"),"")}}}this.request(c,d)},request:function(a,b){this.pixel=(ns_.b.ie)?new Image():(b&&this.type=="end"&&this._s._shutdown&&this.labels.playlistLastEnd.value)?document.body.appendChild(document.createElement("img")):new Image();if(b&&!this._s._shutdown){this.pixel.style.display="none"}if(!this._s._shutdown){this.pixel.onload=(function(c){return function(d){if(!d){d=event;var f=this}else{var f=d.target}var e=c._s;c.sent=true}})(this);this.pixel.onerror=this.pixel.onload}if(ns_.b.ie||!(this.type=="end"&&this._s._shutdown)){this.pixel.src=a}else{document.write(["<h","tml><h","ead><me","ta http",'-equiv="refresh" content="0;url=',document.location.href,'"/></h',"ead>","<bo","dy><scr",'ipt>var date = "',this.date,'"; if ((new Date().getTime()-date) < 500){ var p = new Image(); p.src ="',a,'"}</scr',"ipt></b","ody></h","tml>"].join(""))}},cancel:function(){this.sent=false;this.succeeded=false;this._s._d.dequeue(this)},serialize:function(){var e=ns_.ar.create();var g=this.eventTypes[this.type];for(var b in g){var k=g[b];for(var f=0,d=k.length;f<d;f++){var h=this.labels[k[f]];var c=typeof(h.value);if((c=="undefined"||h.value==="")&&b=="optionals"){continue}else{if(c=="undefined"){h.value=this._s.cfg.DEFAULT_VALUE_STR}}var a=[((typeof h.prefix=="undefined"||h.prefix)?this.prefix:""),h.name].join("");var j=c=="number"?Math.round(h.value*Math.pow(10,2))/Math.pow(10,2):h.value;e.push([a,"=",ns_.encode(typeof j=="string"?j:String(j))].join(""))}}for(var h in this.custom){var j=this.custom[h];if(j&&j!=""){e.push([h,"=",ns_.encode(j)].join(""))}}return e.join("&")},getPixelURL:function(){return[this._s.getPixelURL(),"&",this.serialize()].join("")}});ns_.Heart=ns_.Class.extend(ns_.EventDispatcher,(function(){var c=500;this._s;this.interval;this.pulses;this.pulse;this.counter;this.beats;this.lapse;this.pause;function a(g){this._s=g;this.pulses=ns_.ar.create();this["heart:tick"]=this.onTick.STbind(this);this._s._d.listen("ss:dispatch",this["ss:dispatch"].STbind(this))}function e(){this.counter=0;this.beats=0;this.lapse=0;this.pause=0;if(this.pulses.length>0){this.pulse=this.pulses[0]}else{this.pulse=null}}function d(g){if(!(g.tempo==0&&g.limit==0)){this.pulses.push(g);if(this.pulses.length==1){this.pulse=this.pulses[0];this.reset()}}}function b(){var g=ns_.dt.getTime();if(this.pulse){if((g-this.lapse)>=this.pulse.tempo){this.beats++;this.counter++;this._s._d.fire("ss:heartbeat");this.lapse=g;if(this.pulse.limit!=0&&this.beats==this.pulse.limit){this.beats=0;if(ns_.ar.indexOf(this.pulses,this.pulse)+1<this.pulses.length){this.pulse=this.pulses[ns_.ar.indexOf(this.pulses,this.pulse)+1]}else{this["ss:dispatch"](null,{type:"end"})}}}}this.interval=window.setTimeout(this["heart:tick"],this._tick)}function f(g,h){switch(h.type){case"play":if(this.pulse){this.lapse=h.date-this.pause;this.interval=window.setTimeout(this["heart:tick"],this._tick)}break;case"pause":if(this.pulse){this.pause=h.date-this.lapse;this.counter=0}case"end":window.clearTimeout(this.interval);if(h.type=="end"){this.reset()}break}}return{"ss:dispatch":f,onTick:b,reset:e,addPulse:d,initialize:a}})());ns_.Heart.Pulse=function(b,a){this.limit=a;this.tempo=b};ns_.Playlist=ns_.Class.extend(ns_.Component,{isClipActive:function(a){if(!!a&&!!this._clip&&this._clip===a){return true}else{return false}},addNewClip:function(a){var b=new ns_.Clip(this._s,this,!a);this.addClip(b,!a);return b},addClip:function(b,a){if(ns_.ar.indexOf(this._clips,b)==-1){this._clips.push(b);if(!b.get("episodeTitle")){this._indexes.push(b)}}if(!!a){this.setClip(b)}this.fire(ns_.DispatcherEvents.MEDIA_CHANGE,[this,b]);return this._clips.length},setClip:function(a){if(ns_.ar.indexOf(this._clips,a)==-1){this.addClip(a,false)}if(this._clip){this._clip.deactivate()}this._clip=a;this._clip.activate();return this._clip},getBufferTimeOfClips:function(){for(var b=0,c=0,a=this._clips.length;c<a;c++){b+=Number(this._clips[c]._bufferingTime)}return b},getPausesOfClips:function(){for(var b=0,c=0,a=this._clips.length;c<a;c++){b+=Number(this._clips[c]._pauses)}return b},getTotalPlaybackTime:function(d){for(var b=0,c=0,a=this._clips.length;c<a;c++){if(this._clips[c]==this._clip){b+=Number(d.labels.totalPlayedTimeOfClip.value)}else{b+=Number(this._clips[c]._playbackTime)}}return Number(b)+Number(this._clipPlaybackTime)},getTotalLength:function(){for(var b=0,c=0,a=this._clips.length;c<a;c++){b+=Number(this._clips[c].get("length"))}return b},buildEpisode:function(){var c=ns_.ar.create();var e=this._clip.get("programTitle");var d=this._clip.get("episodeTitle");if(e&&d){for(var b=0,a=this._clips.length;b<a;b++){if(this._clips[b].get("programTitle")==e&&this._clips[b].get("episodeTitle")==d){c.push(this._clips[b])}}}if(!c.length){c.push(this._clip)}return c},getEpisodeTotalLength:function(){var d=0;if(!!this._clip.get("episodeTotalLength")){return this._clip.get("episodeTotalLength")}else{var e=this.buildEpisode();for(var c=0,b=e.length;c<b;c++){var a=Number(e[c].get("length"));d=d+a}}return d},getEpisodePart:function(){var a=this.buildEpisode();var b=ns_.ar.indexOf(a,this._clip);if(b==-1){return 1}return b+1},getEpisodeParts:function(){var a=this.buildEpisode();return a.length},getClipIndex:function(){var a=ns_.ar.indexOf(this._indexes,this._clip);if(a==-1){return 1}return a+1},getNumberOfClips:function(){return this._clips.length},getID:function(){return ns_.dt.getTime()+"_"+this._index},initialize:function($super,b,a){$super(b);this._events={"media:change":null,"ss:dispatch":null,"ss:measure":null,onReceiveMetaData:null};this._index=++this._s._playlistCount;this._id=this.getID();this._clip=null;this._clips=ns_.ar.create();this._started=false;this._sequence=1;this._eventCounter=1;this._pauses=0;this._ended=false;this._indexes=ns_.ar.create();this._clipPlaybackTime=0;this["onReceiveMetaData_cb"]=this["onReceiveMetaData"].STbind(this);this["onStreamChange_cb"]=this["stream:change"].STbind(this);this["onMeasure_cb"]=this["ss:measure"].STbind(this);this["onDispatch_cb"]=this["ss:dispatch"].STbind(this);if(a){this.activate()}},reset:function(){for(var b=0,a=this._clips.length;b<a;b++){this._clips[b].reset()}this._started=false;this._pauses=0;this._sequence=1;this._ended=false;this._id=this.getID();this._clipPlaybackTime=0;this._eventCounter=1},loop:function(){this._sequence++},activate:function(){this._s.listen("ss:measure",this["onMeasure_cb"]);this._s.listen("ss:dispatch",this["onDispatch_cb"])},deactivate:function(){this._s.unlisten("ss:measure",this["onMeasure_cb"]);this._s.unlisten("ss:dispatch",this["onDispatch_cb"])},listenClip:function(a){a.listen("onReceiveMetaData",this["onReceiveMetaData_cb"])},unlistenClip:function(a){a.unlisten("onReceiveMetaData",this["onReceiveMetaData_cb"])},onReceiveMetaData:function(a,c){for(var b in c._a){switch(b){case"playlistTitle":this.set(b,c._a[b]);break}}},"stream:change":function(a,b){this._ended=false},"media:change":function(b,a,c){this._ended=false;this.listenClip(c)},"ss:measure":function(a,b){this.set("playlistLengthOfClips",this.getTotalLength());this.set("indexOfClipInPlaylist",ns_.ar.indexOf(this._clips,this._clip)+1);this.set("playlistBufferTimeOfClips",this.getBufferTimeOfClips());this.set("playlistPausesOfClips",this.getPausesOfClips());this.set("playlistTotalPlayedTimeOfClips",this.getTotalPlaybackTime(b));this.set("playlistSequence",this._sequence);this.set("episodeTitle",this.getClipIndex());this.set("episodeParts",this.getEpisodeParts());this.set("episodePart",this.getEpisodePart());if(this.get("episodeParts")>1){this.set("episodeTotalLength",this.getEpisodeTotalLength())}if(!!this.get("playlistTitle")&&this.get("playlistTitle")!=""){this.set("programTitle",this.get("playlistTitle"))}this.set("playlistFirstPlay",1);this.set("playlistLastEnd",1);this.set("playlistId",this._id);this.set("eventCounter",this._eventCounter);b.bulkSet(this.getAllAttributes())},"ss:dispatch":function(a,b){switch(b.type){case"play":this._started=true;this._eventCounter++;break;case"pause":this._pauses++;this._eventCounter++;break;case"keep-alive":this._eventCounter++;break;case"end":window.setTimeout((function(){if(this._ended){this.reset()}}).STbind(this),this._s.cfg.PLAYLIST_END_TIMER);break}}});ns_.Clip=ns_.Class.extend(ns_.Component,{reset:function(){this._playlist._clipPlaybackTime+=Number(this._playbackTime?this._playbackTime:0);this._bufferingStart=this._bufferingTime=this._playbackStartPos=this._playbackStartTime=this._playbackTime=0;this._starts=this._pauses=0;this._states={isPlaying:false,isBuffering:false,isSeeking:false,isStopped:false,isPaused:false}},initialize:function($super,d,a,c){if(d){$super(d)}this._events={};for(var b in ns_.MediaEvents){this._events[ns_.MediaEvents[b]]=null}this._events.onBufferStart=null;this._events.onBufferEnd=null;this._playlist=a;this.listen(ns_.MediaEvents.STREAM_CHANGE,this._playlist.onStreamChange_cb);this.reset();this._states={isPlaying:false,isBuffering:false,isSeeking:false,isStopped:false,isPaused:false};if(!!c){this.activate()}},activate:function(){this.deactivate();if(!this.onMeasure_cb){this.onMeasure_cb=this.onMeasure.STbind(this)}this._s.listen(ns_.StreamSenseEvents.MEASURE,this.onMeasure_cb);if(!this.onDispatch_cb){this.onDispatch_cb=this.onDispatch.STbind(this)}this._s.listen(ns_.StreamSenseEvents.DISPATCH,this.onDispatch_cb);this.fire(ns_.MediaEvents.STREAM_CHANGE,this)},deactivate:function(){if(!this._playlist.isClipActive(this)){return}this._s.unlisten(ns_.StreamSenseEvents.MEASURE,this.onMeasure_cb);this._s.unlisten(ns_.StreamSenseEvents.DISPATCH,this.onDispatch_cb)},isPlaying:function(){return this._states.isPlaying&&this._playlist.isClipActive(this)},isBuffering:function(){return this._states.isBuffering&&this._playlist.isClipActive(this)},isStopped:function(){return this._states.isStopped},isPaused:function(){return this._states.isPaused&&this._playlist.isClipActive(this)},onStart:function(a,b){this.reset();if(b._a.length>0){this.set("length",b._a.length)}this._s.fire(ns_.DispatcherEvents.STREAM_START,b)},onPause:function(a,b){b._a.totalPlayedTimeOfClip=this._playbackTime+(b.created-this._playbackStartTime);this._s.fire(ns_.DispatcherEvents.STREAM_PAUSE,b)},onResume:function(a,b){this._s.fire(ns_.DispatcherEvents.STREAM_RESUME,b)},onBufferStart:function(a,b){this._states.isBuffering=true;this._bufferingStart=b.created},onBufferEnd:function(a,b){this._states.isBuffering=false;if(b.created<this._bufferingStart){this._bufferingTime+=this._bufferingStart-b.created}else{this._bufferingTime+=b.created-this._bufferingStart}},onStop:function(a,b){var c=this._s._d;this._s._playlist._ended=true;if(c.last&&c.last.type=="play"){b._a.totalPlayedTimeOfClip=this._playbackTime+(b.created-this._playbackStartTime)}else{b._a.totalPlayedTimeOfClip=this._playbackTime}this._s.fire(ns_.DispatcherEvents.STREAM_STOP,b)},onSeek:function(a,b){this._states.isSeeking=true;if((typeof b._a.seekStart!="undefined")&&(typeof b._a.seekEnd!="undefined")){b._a.playHeadPosition=b._a.seekStart;if(this.isPlaying()){this.fire(ns_.MediaEvents.STREAM_PAUSE,b);b._a.playHeadPosition=b._a.seekEnd;b.created=ns_.dt.getTime();this.fire(ns_.MediaEvents.STREAM_RESUME,b)}}this._states.isSeeking=false},onReceiveMetaData:function(a,c){for(var b in c._a){switch(b){case"length":this.set(b,c._a[b]);break}}},onError:function(a,b){this._s.fire(ns_.DispatcherEvents.STREAM_ERROR,b)},onMeasure:function(a,b){this.set("playSequenceOfClip",this._starts+1);this.set("pausesSequenceOfClip",this._pauses);this.set("buffering",this._bufferingTime);b.bulkSet(this.getAllAttributes());if((b.type=="pause"||b.type=="end")&&Number(b.labels.totalPlayedTimeOfClip.value)>0){this._playbackTime=Number(b.labels.totalPlayedTimeOfClip.value)}},onDispatch:function(a,b){switch(b.type){case"play":this._playbackStartTime=b.date;this._playbackStartPos=b.labels.playHeadPosition.value;this._states.isPlaying=true;this._states.isPaused=false;this._states.isStopped=false;this._starts++;break;case"pause":this._states.isPlaying=false;this._states.isPaused=true;this._states.isStopped=false;this._playbackStartTime=b.date;this._playbackStartPos=b.labels.playHeadPosition.value;this._pauses++;this._playbackTime=Number(b.labels.totalPlayedTimeOfClip.value);break}}});if(typeof(ns_)=="undefined"){ns_=new Object()}if(typeof(ns_.dt)=="undefined"){ns_.dt={getTime:function(){return new Date().getTime()}}}if(typeof(ns_.cookie)=="undefined"){ns_.cookie={}}ns_.cookie.create=function(c,f,d,h,e,g){if(d){var b=new Date();if(typeof(d)=="number"){b.setTime(ns_.dt.getTime()+(d*1000))}else{if(d.getTime){b.setTime(d.getTime())}}var a="; expires="+b.toGMTString()}else{var a=""}document.cookie=[c,"=",f,a,"; path=",h?h:"/",e?"; domain="+e:"",g?"; secure":""].join("")};ns_.cookie.read=function(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return f.substring(e.length,f.length)}}return null};ns_.cookie.erase=function(a){ns_.cookie.create(a,"",-1)};if(typeof(ns_)=="undefined"){ns_=new Object()}if(typeof(ns_.Loader)=="undefined"){ns_.Loader={config:{}}}ns_.Loader.setup=function(b){for(var a in b){switch(a){case"type":case"attributes":ns_.Loader.config[a]=b[a]}}};ns_.Loader.load=function(f){try{var c=document.getElementsByTagName("HEAD").item(0);var a=document.createElement("SCRIPT");a.type=ns_.Loader.config.type||"text/javascript";a.src=f;if(ns_.Loader.config.attributes){for(var b in ns_.Loader.config.attributes){a.setAttribute(b,ns_.Loader.config.attributes[b])}}c.appendChild(a)}catch(d){}};ns_.Loader.loadFromScriptSource=function(f,h){if(!h||!f||!document.getElementsByTagName){return}var b=new RegExp(f+"(?:\\.min)?\\.js(?:\\?.*"+h+"=([^&]*))+","i");var n=document.getElementsByTagName("SCRIPT");for(var g=0,d=n.length;g<d;g++){if(b.test(n[g].src)){var a=n[g].src.match(b)[1].split(",");var k=n[g].src.replace(b,"");for(var e=0,c=a.length;e<c;e++){ns_.Loader.load(k+a[e]+(/\.min\./i.test(n[g].src)?".min.js":".js"))}}}};ns_.Loader.loadFromScriptSource("streamsense","load");ns_.StreamSense=ns_.Class.extend(ns_.Component,(function(){var k={TIMER_DELAY:500,KEEP_ALIVE_DELAY:20*60*1000,DEFAULT_ERROR_STR:"STREAMSENSE_ERROR_UNKNOWN",DEFAULT_VALUE_STR:"%STATICTEXT_UNKNOWN%",DEBUG:false,PLAYLIST_END_TIMER:500,LOAD_COMPONENTS:ns_.ar.create()};var e="4.1.0";var z=0;var n=ns_.ar.create();this._shutdown;this._counterName;this._errors;this._events;this._d;this._player;this._playlist;this.MediaComps;this._instanceIndex;this._playlistCount;this._keepAliveTimer;this._heart;function a($super,H,E,G){$super(null);this._shutdown=false;G=G||{};for(var F in this.cfg){G[F]=(typeof(G[F])!="undefined")?G[F]:this.cfg[F]}this.cfg=G;this._errors=ns_.ar.create();ns_.Error.setDebug(this.cfg.DEBUG);this._events={};for(var F in ns_.DispatcherEvents){this._events[ns_.DispatcherEvents[F]]=null}for(var F in ns_.StreamSenseEvents){this._events[ns_.StreamSenseEvents[F]]=null}this.labels=new ns_.dict.Labels();z++;n.push(this);this._instanceIndex=z;this._playlistCount=0;if(!!E){this.setPixelURL(E)}this._d=new ns_.Dispatcher(this);if(this.cfg.LOAD_COMPONENTS.length>0){for(var F=0,D=this.cfg.LOAD_COMPONENTS.length;F<D;F++){this.registerMediaComponent(this.cfg.LOAD_COMPONENTS[F])}}if(ns_.b.ff){window.setTimeout(function(J,I){return function(){J.setPlayer(I)}}(this,H),this.cfg.TIMER_DELAY/2)}else{j.call(this,H)}this._heart=new ns_.Heart(this);this._heart.addPulse(new ns_.Heart.Pulse(10000,6));this._heart.addPulse(new ns_.Heart.Pulse(60000,0));ns_.dom.addEvent(window,"beforeunload",this.shutdown.STbind(this));ns_.dom.addEvent(window,"unload",this.shutdown.STbind(this))}function y(D){if(!!D){if(D.indexOf("?")==-1){D+="?video"}else{if(D.indexOf("?")==(D.length-1)){D+="video"}}return this._counterName=D}}function p(){if(!!this._counterName){return this._counterName}else{if(window.ns_p&&typeof ns_p.src==="string"){return this.setPixelURL(ns_p.src.replace(/&amp;/,"&").replace(/&ns__t=\d+/,""))}else{if(window.ns_pixelUrl){return this.setPixelURL(window.ns_pixelUrl.replace(/&amp;/,"&").replace(/&ns__t=\d+/,""))}else{return this.setPixelURL(document.location.href.replace(/#.*/,""))}}}}function j(D){if(this._player&&this._player.deactivate){this._player.deactivate()}if(typeof(D)=="string"){D=document.getElementById(D)}this._player=w.call(this,D);if(!this._player){return ns_.Error.info("StreamSense.setPlayer: unable to set player ["+typeof(D)+"] = "+D)}}function q(){if(this._player){return this._player}else{return false}}function C(D){if(this._playlist){this._playlist.deactivate()}if(!D){return this._playlist=new ns_.Playlist(this,true)}else{return this._playlist=D}}function x(){if(!this._playlist){return this.setPlaylist()}else{return this._playlist}}function c(D){if(!D){return this.getPlaylist().addNewClip()}else{return this.getPlaylist().addClip(D,true)}}function t(D){if(!D){return this.getPlaylist().addNewClip(true)}else{return this.getPlaylist().addClip(D)}}function i(){if(this.getPlaylist()._clip){return this.getPlaylist()._clip}else{return this.setClip()}}function g(E,F,D){if(this.getPlayer()&&this.getPlayer()._nativeLabels){this.getPlayer()._nativeLabels.push(E);this.getPlayer()._realLabels.push(F)}return this.setAttribute(F,D)}function u(){return z}function v(){return this._instanceIndex}function s(G){if(typeof this.MediaComps=="undefined"){this.MediaComps=ns_.ar.create()}var D=true;for(var F=0,E=this.MediaComps.length;F<E;F++){if(this.MediaComps[F].prototype.isEligible===G.prototype.isEligible){this.MediaComps[F].prototype.deactivate();D=this.MediaComps[F]=G}}if(!G||!D){return ns_.Error.info("registerMediaComponent got a wrong reference: ["+typeof(G)+"] = "+G)}this.MediaComps.push(G);this.MediaComps[G.prototype.getNickname()]=G}function w(F){if(typeof this.MediaComps=="undefined"){return setTimeout((function(H,G){return function(){H.setPlayer.call(H,G)}})(this,F),500)}for(var E=0,D=this.MediaComps.length;E<D;E++){if(this.MediaComps[E].prototype.isEligible(F)){return new this.MediaComps[E](this,F)}}}function b(D,E){this._d.fire(ns_.StreamSenseEvents.PLAY,E)}function d(D,E){this._d.fire(ns_.StreamSenseEvents.PAUSE,E)}function l(D,E){this._d.fire(ns_.StreamSenseEvents.PLAY,E)}function h(D,E){this._d.fire(ns_.StreamSenseEvents.END,E)}function f(D,E){if(E.text){var F=/;/.test(E.text)?E.text.replace(/;/g,ns_.encode(";")):E.text;this._errors.push((F||F=="")?F:this.cfg.DEFAULT_ERROR_STR)}}function m(D,E){this.set("scriptVersion",[e,";JS"].join(""));this.set("error",this._errors.join(";"));this.set("urlContainer",document.location.href);E.bulkSet(this.getAllAttributes())}function A(D,E){this._errors=ns_.ar.create();switch(E.type){case"play":case"keep-alive":this._keepAliveTimer=window.setTimeout((function(F){return function(){var G=F._player.snapshot();G.forced=true;F._d.fire("ss:keep-alive",new ns_.MediaEvent("keep-alive",G))}})(this),this.cfg.KEEP_ALIVE_DELAY);break;case"pause":case"end":window.clearTimeout(this._keepAliveTimer);this._keepAliveTimer=null;break}}function B(E,D){try{if(this._d.last&&this._d.last.type!="end"){var F=this.getPlayer().snapshot();F.forced=true;var H=new ns_.MediaEvent(ns_.MediaEvents.STREAM_STOP,F);this.getClip().fire(ns_.MediaEvents.STREAM_STOP,H)}this.getClip().deactivate();this.getPlaylist().deactivate();this.getPlayer().deactivate()}catch(G){}}function r(D){if(!this._shutdown){this._shutdown=true;this.fire(ns_.StreamSenseEvents.SHUTDOWN,D)}}function o(D){if(typeof D=="undefined"){D=0}for(var F=0,E=n.length;F<E;F++){if(n[F]._instanceIndex==D+1){return n[F]}}return this.prototype}return{registerMediaComponent:s,"stream:start":b,"stream:pause":d,"stream:resume":l,"stream:stop":h,"stream:error":f,"ss:measure":m,"ss:dispatch":A,"ss:shutdown":B,shutdown:r,initialize:a,setPixelURL:y,getPixelURL:p,setPlayer:j,getPlayer:q,setPlaylist:C,getPlaylist:x,getClip:i,setClip:c,setAttributeASX:g,getCount:u,getIndex:v,getStreamSense:o,cfg:k}})());ns_.StreamSense.getStreamSense=ns_.StreamSense.prototype.getStreamSense;/* Copyright (c) 2009 Nedstat B.V. 4.1.0
 * All rights reserved.
 * By using this software, you are agreeing to be bound by the
 * terms of this license: http://www.nedstat.com/terms.html
 */
if(typeof(ns_)=="undefined"){ns_=new Object()}ns_.HTML5MediaComponent=ns_.Class.extend(ns_.MediaComponent,{_nickName:"html5",_clip:null,_player:null,_playlist:null,_events:{},_seekStart:null,_wasBuffering:false,_listeners:{loadstart:function(a){if(!this._clip){this.setClip()}},loadedmetadata:function(a){if(!this._clip){this.setClip()}},playing:function(a){if(this.getClip()._starts==0){this.getClip().fire("onStart",new ns_.MediaEvent("onPlay",this.snapshot()))}else{this.getClip().fire("onResume",new ns_.MediaEvent("onPlay",this.snapshot()))}},pause:function(a){this.getClip().fire("onPause",new ns_.MediaEvent("onPause",this.snapshot()))},ended:function(a){this.getClip().fire("onStop",new ns_.MediaEvent("onStop",this.snapshot()))},seeking:function(a){this._seekStart=this.getPosition()},seeked:function(b){var a=this.snapshot();a.seekStart=this._seekStart;a.seekEnd=a.playHeadPosition;this.getClip().fire(ns_.MediaEvents.STREAM_SEEK,new ns_.MediaEvent(ns_.MediaEvents.STREAM_SEEK,a));this._seekStart=null}},initialize:function($super,c,b){$super(c);this.listeners={};for(var a in this._listeners){this.listeners[a]=this._listeners[a].STbind(this)}for(var a in ns_.DispatcherEvents){this._events[ns_.DispatcherEvents[a]]=null}this._s.registerMediaComponent(ns_.HTML5MediaComponent);if(b){this.activate(b)}},activate:function(a){this._player=a;this._s.registerMediaComponent(ns_.HTML5MediaComponent);this.bindEvents();if(!this["onMeasure_cb"]){this["onMeasure_cb"]=this.onMeasure.STbind(this)}this._s.listen("ss:measure",this["onMeasure_cb"]);if(!this["onMediaChange_cb"]){this["onMediaChange_cb"]=this.onMediaChange.STbind(this)}this.getPlaylist().listen(ns_.DispatcherEvents.MEDIA_CHANGE,this["onMediaChange_cb"])},deactivate:function(){if(!this._player){return false}this.unbindEvents();this._s.unlisten("ss:measure",this["onMeasure_cb"]);this.getPlaylist().unlisten(ns_.DispatcherEvents.MEDIA_CHANGE,this["onMediaChange_cb"])},bindEvents:function(){for(var a in this.listeners){ns_.dom.addEvent(this._player,a,this.listeners[a])}},unbindEvents:function(){for(var a in this.listeners){ns_.dom.removeEvent(this._player,a)}},listenClip:function(){if(!this._clip){return false}var b;for(var a in ns_.MediaEvents){b=ns_.MediaEvents[a];if(typeof this[b]!="undefined"&&typeof this[b].STbind!="undefined"){if(!this[b+"_cb"]){this[b+"_cb"]=this[b].STbind(this)}this._clip.listen(b,this[b+"_cb"])}}},unlistenClip:function(){if(!this._clip){return false}var b;for(var a in ns_.MediaEvents){b=ns_.MediaEvents[a];if(typeof this[b]!="undefined"&&typeof this[b].STbind!="undefined"){this._clip.unlisten(b,this[b+"_cb"])}}},getNickname:function(){return this._nickName},setClip:function(){if(this._clip&&this.getPlaylist().isClipActive(this._clip)){if(this._clip.isPlaying()||this._clip.isPaused()){this._clip.fire("onStop",new ns_.MediaEvent("onStop",this.snapshot()))}this.unlistenClip();this._clip=oClip;this.listenClip()}else{if(this._clip){this.listenClip()}else{this._clip=this.getPlaylist().addNewClip();this.listenClip()}}return this._clip},getClip:function(){if(!!this._clip){return this._clip}else{if(this.getPlaylist()._clips.length==0){return this.setClip()}}},setPlaylist:function(){return this._s.setPlaylist()},getPlaylist:function(){return this._s.getPlaylist()},isPlaying:function(){var a=false;if(this._player.readyState>=this._player.HAVE_FUTURE_DATA&&!this._player.paused&&!this._player.ended){a=true}return a},isPaused:function(){var a=this._player.paused;return a},isEligible:function(a){try{if(a.nodeName.toLowerCase()=="video"&&a.NETWORK_IDLE){return true}}catch(b){return false}return true},snapshot:function(){var a={};a.target=this.getClip();a.playHeadPosition=this.getPosition();a.length=this.getLength();a.volume=this.getVolume();return a},isLooping:function(){if(this._player.getAttribute("loop")){return true}else{return false}},getPosition:function(){return(this._player.currentTime*1000).toFixed(0)},getLength:function(){return(this._player.duration*1000).toFixed(0)},getVolume:function(){if(!this._player.muted){return(this._player.volume*100).toFixed(0)}else{return 0}},getPlaylistName:function(){return document.title},getPlayerVersion:function(){return 0},getBandWidth:function(){return 0},getResolution:function(){return[this._player.videoWidth,"x",this._player.videoHeight].join("")},onMeasure:function(a,b){this.setAttribute("bitrate",0);this.setAttribute("playerType","HTML5");this.setAttribute("playerVersion",this.getPlayerVersion());this.setAttribute("bandwidth",this.getBandWidth());this.setAttribute("resolution",this.getResolution());b.bulkSet(this.getAllAttributes())},onMediaChange:function(b,a,c){this._clip=c}});(function(){if(typeof(ns_)!="undefined"&&typeof(ns_.StreamSense)!="undefined"){ns_.StreamSense.getStreamSense().registerMediaComponent(ns_.HTML5MediaComponent)}else{setTimeout(arguments.callee,500)}})();