(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.substring(0,Q)||"*";
var S=O.substring(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()).substring(2,10)
}var G=function(P,R,Q){var S=this;
var T={};
var 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.substring(0,W.length-1);
var V="onBefore"+W.substring(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 Q={};
var U=this;
var 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(W,X,V){if(W=="onUpdate"){var Z=S._api().fp_getPlugin(T);
if(!Z){return 
}F(U,Z);
delete U.methods;
if(!O){B(Z.methods,function(){var a=""+this;
U[a]=function(){var c=[].slice.call(arguments);
var b=S._api().fp_invoke(T,a,c);
return b==="undefined"||b===undefined?U:b
}
});
O=true
}}var Y=Q[W];
if(Y){Y.apply(U,X);
if(W.substring(0,1)=="_"){delete Q[W]
}}}})
};
function M(V,c,W){var e=this,X=null,Y,b,T=[],d={},S={},P,a,Z,O,U,R;
F(e,{id:function(){return P
},isLoaded:function(){return(X!==null)
},getParent:function(){return V
},hide:function(f){if(f){V.style.height="0px"
}if(X){X.style.height="0px"
}return e
},show:function(){V.style.height=R+"px";
if(X){X.style.height=U+"px"
}return e
},isHidden:function(){return X&&parseInt(X.style.height,10)===0
},load:function(f){if(!X&&e._fireEvent("onBeforeLoad")!==false){B(N,function(){this.unload()
});
Y=V.innerHTML;
if(Y&&!flashembed.isSupported(c.version)){V.innerHTML=""
}flashembed(V,c,{config:W});
if(f){f.cached=true;
E(S,"onLoad",f)
}}return e
},unload:function(){try{if(!X||X.fp_isFullscreen()){return e
}}catch(f){return e
}if(Y.replace(/\s/g,"")!==""){if(e._fireEvent("onBeforeUnload")===false){return e
}X.fp_close();
X=null;
V.innerHTML=Y;
e._fireEvent("onUnload")
}return e
},getClip:function(f){if(f===undefined){f=O
}return T[f]
},getCommonClip:function(){return b
},getPlaylist:function(){return T
},getPlugin:function(h){var f=d[h];
if(!f&&e.isLoaded()){var g=e._api().fp_getPlugin(h);
if(g){f=new C(h,g,e);
d[h]=f
}}return f
},getScreen:function(){return e.getPlugin("screen")
},getControls:function(){return e.getPlugin("controls")
},getConfig:function(f){return f?D(W):W
},getFlashParams:function(){return c
},loadPlugin:function(i,j,g,h){if(typeof g=="function"){h=g;
g={}
}var k=h?J():"_";
e._api().fp_loadPlugin(i,j,g,k);
var l={};
l[k]=h;
var f=new C(i,null,e,l);
d[i]=f;
return f
},getState:function(){return X?X.fp_getState():-1
},play:function(g,h){function f(){if(g!==undefined){e._api().fp_play(g,h)
}else{e._api().fp_play()
}}if(X){f()
}else{e.load(function(){f()
})
}return e
},getVersion:function(){var f="flowplayer.js 3.1.2";
if(X){var g=X.fp_getVersion();
g.push(f);
return g
}return f
},_api:function(){if(!X){throw"Flowplayer "+e.id()+" not loaded when calling an API method"
}return X
},setClip:function(f){e.setPlaylist([f]);
return e
},getIndex:function(){return Z
}});
B(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var g="on"+this;
if(g.indexOf("*")!=-1){g=g.substring(0,g.length-1);
var f="onBefore"+g.substring(2);
e[f]=function(h){E(S,f,h);
return e
}
}e[g]=function(h){E(S,g,h);
return e
}
});
B(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip").split(","),function(){var f=this;
e[f]=function(h,i){if(!X){return e
}var g=null;
if(h!==undefined&&i!==undefined){g=X["fp_"+f](h,i)
}else{g=(h===undefined)?X["fp_"+f]():X["fp_"+f](h)
}return g==="undefined"||g===undefined?e:g
}
});
e._fireEvent=function(g){if(typeof g=="string"){g=[g]
}var f=g[0],i=g[1],k=g[2],l=g[3],m=0;
if(W.debug){H(g)
}if(!X&&f=="onLoad"&&i=="player"){X=X||L(a);
U=X.clientHeight;
B(T,function(){this._fireEvent("onLoad")
});
B(d,function(r,q){q._fireEvent("onUpdate")
});
b._fireEvent("onLoad")
}if(f=="onLoad"&&i!="player"){return 
}if(f=="onError"){if(typeof i=="string"||(typeof i=="number"&&typeof k=="number")){i=k;
k=l
}}if(f=="onContextMenu"){B(W.contextMenu[i],function(r,q){q.call(e)
});
return 
}if(f=="onPluginEvent"){var p=i.name||i;
var o=d[p];
if(o){o._fireEvent("onUpdate",i);
o._fireEvent(k,g.slice(3))
}return 
}if(f=="onPlaylistReplace"){T=[];
var j=0;
B(i,function(){T.push(new G(this,j++,e))
})
}if(f=="onClipAdd"){if(i.isInStream){return 
}i=new G(i,k,e);
T.splice(k,0,i);
for(m=k+1;
m<T.length;
m++){T[m].index++
}}var h=true;
if(typeof i=="number"&&i<T.length){O=i;
var n=T[i];
if(n){h=n._fireEvent(f,k,l)
}if(!n||h!==false){h=b._fireEvent(f,k,l,n)
}}B(S[f],function(){h=this.call(e,i,k);
if(this.cached){S[f].splice(m,1)
}if(h===false){return false
}m++
});
return h
};
function Q(){if($f(V)){$f(V).getParent().innerHTML="";
Z=$f(V).getIndex();
N[Z]=e
}else{N.push(e);
Z=N.length-1
}R=parseInt(V.style.height,10)||V.clientHeight;
if(typeof c=="string"){c={src:c}
}P=V.id||"fp"+J();
a=c.id||P+"_api";
c.id=a;
W.playerId=P;
if(typeof W=="string"){W={clip:{url:W}}
}if(typeof W.clip=="string"){W.clip={url:W.clip}
}W.clip=W.clip||{};
if(V.getAttribute("href",2)&&!W.clip.url){W.clip.url=V.getAttribute("href",2)
}b=new G(W.clip,-1,e);
W.playlist=W.playlist||[W.clip];
var g=0;
B(W.playlist,function(){var h=this;
if(typeof h=="object"&&h.length){h={url:""+h}
}B(W.clip,function(j,i){if(i!==undefined&&h[j]===undefined&&typeof i!="function"){h[j]=i
}});
W.playlist[g]=h;
h=new G(h,g,e);
T.push(h);
g++
});
B(W,function(i,h){if(typeof h=="function"){if(b[i]){b[i](h)
}else{E(S,i,h)
}delete W[i]
}});
B(W.plugins,function(i,h){if(h){d[i]=new C(i,h,e)
}});
if(!W.plugins||W.plugins.controls===undefined){d.controls=new C("controls",null,e)
}d.canvas=new C("canvas",null,e);
c.bgcolor=c.bgcolor||"#000000";
c.version=c.version||[9,0];
c.expressInstall="http://www.flowplayer.org/swf/expressinstall.swf";
function f(h){if(!e.isLoaded()&&e._fireEvent("onBeforeClick")!==false){e.load()
}return I(h)
}Y=V.innerHTML;
if(Y.replace(/\s/g,"")!==""){if(V.addEventListener){V.addEventListener("click",f,false)
}else{if(V.attachEvent){V.attachEvent("onclick",f)
}}}else{if(V.addEventListener){V.addEventListener("click",I,false)
}e.load()
}}if(typeof V=="string"){flashembed.domReady(function(){var f=L(V);
if(!f){throw"Flowplayer cannot access element: "+V
}else{V=f;
Q()
}})
}else{Q()
}}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 Q=arguments[1];
var R=(arguments.length==3)?arguments[2]:{};
if(typeof T=="string"){if(T.indexOf(".")!=-1){var O=[];
B(A(T),function(){O.push(new M(this,D(Q),D(R)))
});
return new K(O)
}else{var P=L(T);
return new M(P!==null?P:T,Q,R)
}}else{if(T){return new M(T,Q,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.prototype.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 E=typeof jQuery=="function";
function A(){if(G.done){return false
}var J=document;
if(J&&J.getElementsByTagName&&J.getElementById&&J.body){clearInterval(G.timer);
G.timer=null;
for(var K=0;
K<G.ready.length;
K++){G.ready[K].call()
}G.ready=null;
G.done=true
}}var G=E?jQuery:function(J){if(G.done){return J()
}if(G.timer){G.ready.push(J)
}else{G.ready=[J];
G.timer=setInterval(A,13)
}};
function D(J,K){if(K){for(key in K){if(K.hasOwnProperty(key)){J[key]=K[key]
}}}return J
}function C(L){switch(B(L)){case"string":L=L.replace(new RegExp('(["\\\\])',"g"),"\\$1");
L=L.replace(/^\s?(\d+)%/,"$1pct");
return'"'+L+'"';
case"array":return"["+H(L,function(M){return C(M)
}).join(",")+"]";
case"function":return'"function()"';
case"object":var K=[];
for(var J in L){if(L.hasOwnProperty(J)){K.push('"'+J+'":'+C(L[J]))
}}return"{"+K.join(",")+"}"
}return String(L).replace(/\s/g," ").replace(/\'/g,'"')
}function B(J){if(J===null||J===undefined){return false
}var K=typeof J;
return(K=="object"&&J.push)?"array":K
}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){}
})
}function H(M,J){var K=[];
for(var L in M){if(M.hasOwnProperty(L)){K[L]=J(M[L])
}}return K
}function I(O,M){var P=D({},O);
var N=document.all;
var J='<object width="'+P.width+'" height="'+P.height+'"';
if(N&&!P.id){P.id="_"+(""+Math.random()).substring(9)
}if(P.id){J+=' id="'+P.id+'"'
}P.src+=((P.src.indexOf("?")!=-1?"&":"?")+Math.random());
if(P.w3c||!N){J+=' data="'+P.src+'" type="application/x-shockwave-flash"'
}else{J+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
}J+=">";
if(P.w3c||N){J+='<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){J+='<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"?C(M[K]):M[K])+"&"
}}Q=Q.substring(0,Q.length-1);
J+='<param name="flashvars" value=\''+Q+"' />"
}J+="</object>";
return J
}function F(K,P,L){var M=flashembed.getVersion();
D(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 I(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=I(P,L)
}else{if(O&&N&&flashembed.isSupported([6,65])){D(P,{src:N});
L={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};
K.innerHTML=I(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 J=P.onFail.call(this);
if(typeof J=="string"){K.innerHTML=J
}}if(document.all){window[P.id]=document.getElementById(P.id)
}}window.flashembed=function(L,K,M){if(typeof L=="string"){var J=document.getElementById(L);
if(J){L=J
}else{G(function(){flashembed(L,K,M)
});
return 
}}if(!L){return 
}var N={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false};
if(typeof K=="string"){K={src:K}
}D(N,K);
return new F(L,N,M)
};
D(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 J=parseInt(L.replace(/^(.*)\..*$/,"$1"),10);
var N=/r/.test(L)?parseInt(L.replace(/^.*r(.*)$/,"$1"),10):0;
K=[J,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(L){var J=flashembed.getVersion();
var K=(J[0]>L[0])||(J[0]==L[0]&&J[1]>=L[1]);
return K
},domReady:G,asString:C,getHTML:I});
if(E){jQuery.tools=jQuery.tools||{version:{}};
jQuery.tools.version.flashembed="1.0.3";
jQuery.fn.flashembed=function(K,L){var J=null;
this.each(function(){J=flashembed(this,K,L)
});
return K.api===false?this:J
}
}})();