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