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

