(function(){function H(O){console.log("$f.fireEvent",[].slice.call(O))
}function D(O){if(!O||typeof O!="object"){return O
}var Q=new O.constructor();
for(var P in O){if(O.hasOwnProperty(P)){Q[P]=D(O[P])
}}return Q
}function B(O,R){if(!O){return 
}var T,S=0,Q=O.length;
if(Q===undefined){for(T in O){if(R.call(O[T],T,O[T])===false){break
}}}else{for(var P=O[0];
S<Q&&R.call(P,S,P)!==false;
P=O[++S]){}}return O
}function L(O){return document.getElementById(O)
}function F(O,P,Q){if(typeof P!="object"){return O
}if(O&&P){B(P,function(S,R){if(!Q||typeof R!="function"){O[S]=R
}})
}return O
}function A(O){var Q=O.indexOf(".");
if(Q!=-1){var R=O.slice(0,Q)||"*";
var S=O.slice(Q+1,O.length);
var P=[];
B(document.getElementsByTagName(R),function(){if(this.className&&this.className.indexOf(S)!=-1){P.push(this)
}});
return P
}}function I(O){O=O||window.event;
if(O.preventDefault){O.stopPropagation();
O.preventDefault()
}else{O.returnValue=false;
O.cancelBubble=true
}return false
}function E(O,Q,P){O[Q]=O[Q]||[];
O[Q].push(P)
}function J(){return"_"+(""+Math.random()).slice(2,10)
}var G=function(P,R,Q){var S=this,T={},O={};
S.index=R;
if(typeof P=="string"){P={url:P}
}F(this,P,true);
B(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var W="on"+this;
if(W.indexOf("*")!=-1){W=W.slice(0,W.length-1);
var V="onBefore"+W.slice(2);
S[V]=function(X){E(O,V,X);
return S
}
}S[W]=function(X){E(O,W,X);
return S
};
if(R==-1){if(S[V]){Q[V]=S[V]
}if(S[W]){Q[W]=S[W]
}}});
F(this,{onCuepoint:function(V,W){if(arguments.length==1){T.embedded=[null,V];
return S
}if(typeof V=="number"){V=[V]
}var X=J();
T[X]=[V,W];
if(Q.isLoaded()){Q._api().fp_addCuepoints(V,R,X)
}return S
},update:function(W){F(S,W);
if(Q.isLoaded()){Q._api().fp_updateClip(W,R)
}var X=Q.getConfig();
var V=(R==-1)?X.clip:X.playlist[R];
F(V,W,true)
},_fireEvent:function(Y,a,X,W){if(Y=="onLoad"){B(T,function(c,b){if(b[0]){Q._api().fp_addCuepoints(b[0],R,c)
}});
return false
}W=W||S;
if(Y=="onCuepoint"){var Z=T[a];
if(Z){return Z[1].call(Q,W,X)
}}if(a&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(Y)!=-1){F(W,a);
if(a.metaData){if(!W.duration){W.duration=a.metaData.duration
}else{W.fullDuration=a.metaData.duration
}}}var V=true;
B(O[Y],function(){V=this.call(Q,W,a,X)
});
return V
}});
if(P.onCuepoint){var U=P.onCuepoint;
S.onCuepoint.apply(S,typeof U=="function"?[U]:U);
delete P.onCuepoint
}B(P,function(W,V){if(typeof V=="function"){E(O,W,V);
delete P[W]
}});
if(R==-1){Q.onCuepoint=this.onCuepoint
}};
var C=function(T,R,S,P){var U=this,Q={},O=false;
if(P){F(Q,P)
}B(R,function(W,V){if(typeof V=="function"){Q[W]=V;
delete R[W]
}});
F(this,{animate:function(Z,Y,V){if(!Z){return U
}if(typeof Y=="function"){V=Y;
Y=500
}if(typeof Z=="string"){var W=Z;
Z={};
Z[W]=Y;
Y=500
}if(V){var X=J();
Q[X]=V
}if(Y===undefined){Y=500
}R=S._api().fp_animate(T,Z,Y,X);
return U
},css:function(W,V){if(V!==undefined){var X={};
X[W]=V;
W=X
}R=S._api().fp_css(T,W);
F(U,R);
return U
},show:function(){this.display="block";
S._api().fp_showPlugin(T);
return U
},hide:function(){this.display="none";
S._api().fp_hidePlugin(T);
return U
},toggle:function(){this.display=S._api().fp_togglePlugin(T);
return U
},fadeTo:function(Y,V,W){if(typeof V=="function"){W=V;
V=500
}if(W){var X=J();
Q[X]=W
}this.display=S._api().fp_fadeTo(T,Y,V,X);
this.opacity=Y;
return U
},fadeIn:function(V,W){return U.fadeTo(1,V,W)
},fadeOut:function(V,W){return U.fadeTo(0,V,W)
},getName:function(){return T
},getPlayer:function(){return S
},_fireEvent:function(X,Y,W){if(X=="onUpdate"){var Z=S._api().fp_getPlugin(T);
if(!Z){return 
}F(U,Z);
delete U.methods;
if(!O){B(Z.methods,function(){var b=""+this;
U[b]=function(){var d=[].slice.call(arguments);
var c=S._api().fp_invoke(T,b,d);
return c==="undefined"||c===undefined?U:c
}
});
O=true
}}var V=Q[X];
if(V){var a=V.apply(U,Y);
if(X.slice(0,1)=="_"){delete Q[X]
}return a
}return U
}})
};
function M(d,S,X){var R=this,T=null,Z=false,V,Y,U=[],P={},Q={},W,b,f,a,g,e;
F(R,{id:function(){return W
},isLoaded:function(){return(T!==null&&T.fp_play!==undefined&&!Z)
},getParent:function(){return d
},hide:function(h){if(h){d.style.height="0px"
}if(R.isLoaded()){T.style.height="0px"
}return R
},show:function(){d.style.height=e+"px";
if(R.isLoaded()){T.style.height=g+"px"
}return R
},isHidden:function(){return R.isLoaded()&&parseInt(T.style.height,10)===0
},load:function(h){if(!R.isLoaded()&&R._fireEvent("onBeforeLoad")!==false){var j=function(){V=d.innerHTML;
if(V&&!flashembed.isSupported(S.version)){d.innerHTML=""
}if(h){h.cached=true;
E(Q,"onLoad",h)
}flashembed(d,S,{config:X})
};
var i=0;
B(N,function(){this.unload(function(k){if(++i==N.length){j()
}})
})
}return R
},unload:function(h){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent)){if(h){h(false)
}return R
}if(V.replace(/\s/g,"")!==""){if(R._fireEvent("onBeforeUnload")===false){if(h){h(false)
}return R
}Z=true;
try{if(T){T.fp_close();
R._fireEvent("onUnload")
}}catch(j){}var i=function(){T=null;
d.innerHTML=V;
Z=false;
if(h){h(true)
}};
setTimeout(i,50)
}else{if(h){h(false)
}}return R
},getClip:function(h){if(h===undefined){h=a
}return U[h]
},getCommonClip:function(){return Y
},getPlaylist:function(){return U
},getPlugin:function(j){var h=P[j];
if(!h&&R.isLoaded()){var i=R._api().fp_getPlugin(j);
if(i){h=new C(j,i,R);
P[j]=h
}}return h
},getScreen:function(){return R.getPlugin("screen")
},getControls:function(){return R.getPlugin("controls")._fireEvent("onUpdate")
},getLogo:function(){try{return R.getPlugin("logo")._fireEvent("onUpdate")
}catch(h){}},getPlay:function(){return R.getPlugin("play")._fireEvent("onUpdate")
},getConfig:function(h){return h?D(X):X
},getFlashParams:function(){return S
},loadPlugin:function(i,j,n,h){if(typeof n=="function"){h=n;
n={}
}var k=h?J():"_";
R._api().fp_loadPlugin(i,j,n,k);
var l={};
l[k]=h;
var m=new C(i,null,R,l);
P[i]=m;
return m
},getState:function(){return R.isLoaded()?T.fp_getState():-1
},play:function(i,j){var h=function(){if(i!==undefined){R._api().fp_play(i,j)
}else{R._api().fp_play()
}};
if(R.isLoaded()){h()
}else{if(Z){setTimeout(function(){R.play(i,j)
},50)
}else{R.load(function(){h()
})
}}return R
},getVersion:function(){var h="flowplayer.js 3.2.6";
if(R.isLoaded()){var i=T.fp_getVersion();
i.push(h);
return i
}return h
},_api:function(){if(!R.isLoaded()){throw"Flowplayer "+R.id()+" not loaded when calling an API method"
}return T
},setClip:function(h){R.setPlaylist([h]);
return R
},getIndex:function(){return f
},_swfHeight:function(){return T.clientHeight
}});
B(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var i="on"+this;
if(i.indexOf("*")!=-1){i=i.slice(0,i.length-1);
var h="onBefore"+i.slice(2);
R[h]=function(j){E(Q,h,j);
return R
}
}R[i]=function(j){E(Q,i,j);
return R
}
});
B(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled").split(","),function(){var h=this;
R[h]=function(j,k){if(!R.isLoaded()){return R
}var i=null;
if(j!==undefined&&k!==undefined){i=T["fp_"+h](j,k)
}else{i=(j===undefined)?T["fp_"+h]():T["fp_"+h](j)
}return i==="undefined"||i===undefined?R:i
}
});
R._fireEvent=function(i){if(typeof i=="string"){i=[i]
}var h=i[0],k=i[1],m=i[2],n=i[3],o=0;
if(X.debug){H(i)
}if(!R.isLoaded()&&h=="onLoad"&&k=="player"){T=T||L(b);
g=R._swfHeight();
B(U,function(){this._fireEvent("onLoad")
});
B(P,function(t,s){s._fireEvent("onUpdate")
});
Y._fireEvent("onLoad")
}if(h=="onLoad"&&k!="player"){return 
}if(h=="onError"){if(typeof k=="string"||(typeof k=="number"&&typeof m=="number")){k=m;
m=n
}}if(h=="onContextMenu"){B(X.contextMenu[k],function(t,s){s.call(R)
});
return 
}if(h=="onPluginEvent"||h=="onBeforePluginEvent"){var r=k.name||k;
var q=P[r];
if(q){q._fireEvent("onUpdate",k);
return q._fireEvent(m,i.slice(3))
}return 
}if(h=="onPlaylistReplace"){U=[];
var l=0;
B(k,function(){U.push(new G(this,l++,R))
})
}if(h=="onClipAdd"){if(k.isInStream){return 
}k=new G(k,m,R);
U.splice(m,0,k);
for(o=m+1;
o<U.length;
o++){U[o].index++
}}var j=true;
if(typeof k=="number"&&k<U.length){a=k;
var p=U[k];
if(p){j=p._fireEvent(h,m,n)
}if(!p||j!==false){j=Y._fireEvent(h,m,n,p)
}}B(Q[h],function(){j=this.call(R,k,m);
if(this.cached){Q[h].splice(o,1)
}if(j===false){return false
}o++
});
return j
};
function c(){if($f(d)){$f(d).getParent().innerHTML="";
f=$f(d).getIndex();
N[f]=R
}else{N.push(R);
f=N.length-1
}e=parseInt(d.style.height,10)||d.clientHeight;
W=d.id||"fp"+J();
b=S.id||W+"_api";
S.id=b;
X.playerId=W;
if(typeof X=="string"){X={clip:{url:X}}
}if(typeof X.clip=="string"){X.clip={url:X.clip}
}X.clip=X.clip||{};
if(d.getAttribute("href",2)&&!X.clip.url){X.clip.url=d.getAttribute("href",2)
}Y=new G(X.clip,-1,R);
X.playlist=X.playlist||[X.clip];
var i=0;
B(X.playlist,function(){var k=this;
if(typeof k=="object"&&k.length){k={url:""+k}
}B(X.clip,function(l,m){if(m!==undefined&&k[l]===undefined&&typeof m!="function"){k[l]=m
}});
X.playlist[i]=k;
k=new G(k,i,R);
U.push(k);
i++
});
B(X,function(l,k){if(typeof k=="function"){if(Y[l]){Y[l](k)
}else{E(Q,l,k)
}delete X[l]
}});
B(X.plugins,function(l,k){if(k){P[l]=new C(l,k,R)
}});
if(!X.plugins||X.plugins.controls===undefined){P.controls=new C("controls",null,R)
}P.canvas=new C("canvas",null,R);
V=d.innerHTML;
function h(k){var l=R.hasiPadSupport&&R.hasiPadSupport();
if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(U[0].url)&&!l){return true
}if(!R.isLoaded()&&R._fireEvent("onBeforeClick")!==false){R.load()
}return I(k)
}function j(){if(V.replace(/\s/g,"")!==""){if(d.addEventListener){d.addEventListener("click",h,false)
}else{if(d.attachEvent){d.attachEvent("onclick",h)
}}}else{if(d.addEventListener){d.addEventListener("click",I,false)
}R.load()
}}setTimeout(j,0)
}if(typeof d=="string"){var O=L(d);
if(!O){throw"Flowplayer cannot access element: "+d
}d=O;
c()
}else{c()
}}var N=[];
function K(O){this.length=O.length;
this.each=function(P){B(O,P)
};
this.size=function(){return O.length
}
}window.flowplayer=window.$f=function(){var S=null;
var T=arguments[0];
if(!arguments.length){B(N,function(){if(this.isLoaded()){S=this;
return false
}});
return S||N[0]
}if(arguments.length==1){if(typeof T=="number"){return N[T]
}else{if(T=="*"){return new K(N)
}B(N,function(){if(this.id()==T.id||this.id()==T||this.getParent()==T){S=this;
return false
}});
return S
}}if(arguments.length>1){var O=arguments[1],R=(arguments.length==3)?arguments[2]:{};
if(typeof O=="string"){O={src:O}
}O=F({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:false},O);
if(typeof T=="string"){if(T.indexOf(".")!=-1){var P=[];
B(A(T),function(){P.push(new M(this,D(O),D(R)))
});
return new K(P)
}else{var Q=L(T);
return new M(Q!==null?Q:T,O,R)
}}else{if(T){return new M(T,O,R)
}}}return null
};
F(window.$f,{fireEvent:function(){var P=[].slice.call(arguments);
var O=$f(P[0]);
return O?O._fireEvent(P.slice(1)):null
},addPlugin:function(P,O){M.prototype[P]=O;
return $f
},each:B,extend:F});
if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(O,P){if(!arguments.length||typeof arguments[0]=="number"){var Q=[];
this.each(function(){var R=$f(this);
if(R){Q.push(R)
}});
return arguments.length?Q[arguments[0]]:new K(Q)
}return this.each(function(){$f(this,D(O),P?D(P):{})
})
}
}})();
(function(){var F=typeof jQuery=="function";
var B={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false,cachebusting:false};
if(F){jQuery.tools=jQuery.tools||{};
jQuery.tools.flashembed={version:"1.0.4",conf:B}
}function A(){if(H.done){return false
}var K=document;
if(K&&K.getElementsByTagName&&K.getElementById&&K.body){clearInterval(H.timer);
H.timer=null;
for(var L=0;
L<H.ready.length;
L++){H.ready[L].call()
}H.ready=null;
H.done=true
}}var H=F?jQuery:function(K){if(H.done){return K()
}if(H.timer){H.ready.push(K)
}else{H.ready=[K];
H.timer=setInterval(A,13)
}};
function E(K,L){if(L){for(key in L){if(L.hasOwnProperty(key)){K[key]=L[key]
}}}return K
}function D(M){switch(C(M)){case"string":M=M.replace(new RegExp('(["\\\\])',"g"),"\\$1");
M=M.replace(/^\s?(\d+)%/,"$1pct");
return'"'+M+'"';
case"array":return"["+I(M,function(N){return D(N)
}).join(",")+"]";
case"function":return'"function()"';
case"object":var L=[];
for(var K in M){if(M.hasOwnProperty(K)){L.push('"'+K+'":'+D(M[K]))
}}return"{"+L.join(",")+"}"
}return String(M).replace(/\s/g," ").replace(/\'/g,'"')
}function C(K){if(K===null||K===undefined){return false
}var L=typeof K;
return(L=="object"&&K.push)?"array":L
}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){}
})
}function I(M,N){var K=[];
for(var L in M){if(M.hasOwnProperty(L)){K[L]=N(M[L])
}}return K
}function J(O,M){var P=E({},O);
var N=document.all;
var R='<object width="'+P.width+'" height="'+P.height+'"';
if(N&&!P.id){P.id="_"+(""+Math.random()).substring(9)
}if(P.id){R+=' id="'+P.id+'"'
}if(P.cachebusting){P.src+=((P.src.indexOf("?")!=-1?"&":"?")+Math.random())
}if(P.w3c||!N){R+=' data="'+P.src+'" type="application/x-shockwave-flash"'
}else{R+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
}R+=">";
if(P.w3c||N){R+='<param name="movie" value="'+P.src+'" />'
}P.width=P.height=P.id=P.w3c=P.src=null;
for(var L in P){if(P[L]!==null){R+='<param name="'+L+'" value="'+P[L]+'" />'
}}var Q="";
if(M){for(var K in M){if(M[K]!==null){Q+=K+"="+(typeof M[K]=="object"?D(M[K]):M[K])+"&"
}}Q=Q.substring(0,Q.length-1);
R+='<param name="flashvars" value=\''+Q+"' />"
}R+="</object>";
return R
}function G(K,P,L){var M=flashembed.getVersion();
E(this,{getContainer:function(){return K
},getConf:function(){return P
},getVersion:function(){return M
},getFlashvars:function(){return L
},getApi:function(){return K.firstChild
},getHTML:function(){return J(P,L)
}});
var O=P.version;
var N=P.expressInstall;
var Q=!O||flashembed.isSupported(O);
if(Q){P.onFail=P.version=P.expressInstall=null;
K.innerHTML=J(P,L)
}else{if(O&&N&&flashembed.isSupported([6,65])){E(P,{src:N});
L={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};
K.innerHTML=J(P,L)
}else{if(K.innerHTML.replace(/\s/g,"")!==""){}else{K.innerHTML="<h2>Flash version "+O+" or greater is required</h2><h3>"+(M[0]>0?"Your version is "+M:"You have no flash plugin installed")+"</h3>"+(K.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");
if(K.tagName=="A"){K.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"
}
}}}}if(!Q&&P.onFail){var R=P.onFail.call(this);
if(typeof R=="string"){K.innerHTML=R
}}if(document.all){window[P.id]=document.getElementById(P.id)
}}window.flashembed=function(L,K,M){if(typeof L=="string"){var O=document.getElementById(L);
if(O){L=O
}else{H(function(){flashembed(L,K,M)
});
return 
}}if(!L){return 
}if(typeof K=="string"){K={src:K}
}var N=E({},B);
E(N,K);
return new G(L,N,M)
};
E(window.flashembed,{getVersion:function(){var K=[0,0];
if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var L=navigator.plugins["Shockwave Flash"].description;
if(typeof L!="undefined"){L=L.replace(/^.*\s+(\S+\s+\S+$)/,"$1");
var R=parseInt(L.replace(/^(.*)\..*$/,"$1"),10);
var N=/r/.test(L)?parseInt(L.replace(/^.*r(.*)$/,"$1"),10):0;
K=[R,N]
}}else{if(window.ActiveXObject){try{var P=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")
}catch(O){try{P=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
K=[6,0];
P.AllowScriptAccess="always"
}catch(M){if(K[0]==6){return K
}}try{P=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")
}catch(Q){}}if(typeof P=="object"){L=P.GetVariable("$version");
if(typeof L!="undefined"){L=L.replace(/^\S+\s+(.*)$/,"$1").split(",");
K=[parseInt(L[0],10),parseInt(L[2],10)]
}}}}return K
},isSupported:function(M){var K=flashembed.getVersion();
var L=(K[0]>M[0])||(K[0]==M[0]&&K[1]>=M[1]);
return L
},domReady:H,asString:D,getHTML:J});
if(F){jQuery.fn.flashembed=function(L,M){var K=null;
this.each(function(){K=flashembed(this,L,M)
});
return L.api===false?this:K
}
}})();
