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