(function(){function a(n){console.log("$f.fireEvent",[].slice.call(n))}function i(n){var r,t;if(!n||typeof n!="object")return n;r=new n.constructor;for(t in n)n.hasOwnProperty(t)&&(r[t]=i(n[t]));return r}function n(n,t){var u,r,f,i;if(n){if(r=0,f=n.length,f===undefined){for(u in n)if(t.call(n[u],u,n[u])===!1)break}else for(i=n[0];r<f&&t.call(i,r,i)!==!1;i=n[++r]);return n}}function c(n){return document.getElementById(n)}function t(t,i,r){return typeof i!="object"?t:(t&&i&&n(i,function(n,i){r&&typeof i=="function"||(t[n]=i)}),t)}function v(t){var i=t.indexOf(".");if(i!=-1){var u=t.slice(0,i)||"*",f=t.slice(i+1,t.length),r=[];return n(document.getElementsByTagName(u),function(){this.className&&this.className.indexOf(f)!=-1&&r.push(this)}),r}}function l(n){return n=n||window.event,n.preventDefault?(n.stopPropagation(),n.preventDefault()):(n.returnValue=!1,n.cancelBubble=!0),!1}function u(n,t,i){n[t]=n[t]||[],n[t].push(i)}function f(){return"_"+(""+Math.random()).slice(2,10)}function e(e,h,v){function ft(){function c(n){return/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(w[0].url)&&!i()?!0:(y.isLoaded()||y._fireEvent("onBeforeClick")===!1||y.load(),l(n))}function i(){return y.hasiPadSupport&&y.hasiPadSupport()}function a(){g.replace(/\s/g,"")!==""?e.addEventListener?e.addEventListener("click",c,!1):e.attachEvent&&e.attachEvent("onclick",c):(e.addEventListener&&!i()&&e.addEventListener("click",l,!1),y.load())}$f(e)?($f(e).getParent().innerHTML="",nt=$f(e).getIndex(),r[nt]=y):(r.push(y),nt=r.length-1),st=parseInt(e.style.height,10)||e.clientHeight,tt=e.id||"fp"+f(),ut=h.id||tt+"_api",h.id=ut,g=e.innerHTML,typeof v=="string"&&(v={clip:{url:v}}),v.playerId=tt,v.clip=v.clip||{},e.getAttribute("href",2)&&!v.clip.url&&(v.clip.url=e.getAttribute("href",2)),d=new s(v.clip,-1,y),v.playlist=v.playlist||[v.clip];var t=0;n(v.playlist,function(){var i=this;typeof i=="object"&&i.length&&(i={url:""+i}),n(v.clip,function(n,t){t!==undefined&&i[n]===undefined&&typeof t!="function"&&(i[n]=t)}),v.playlist[t]=i,i=new s(i,t,y),w.push(i),t++}),n(v,function(n,t){typeof t=="function"&&(d[n]?d[n](t):u(k,n,t),delete v[n])}),n(v.plugins,function(n,t){t&&(b[n]=new o(n,t,y))}),v.plugins&&v.plugins.controls!==undefined||(b.controls=new o("controls",null,y)),b.canvas=new o("canvas",null,y),g=e.innerHTML,setTimeout(a,0)}var y=this,p=null,it=!1,g,d,w=[],b={},k={},tt,ut,nt,et,ot,st,rt;if(t(y,{id:function(){return tt},isLoaded:function(){return p!==null&&p.fp_play!==undefined&&!it},getParent:function(){return e},hide:function(n){return n&&(e.style.height="0px"),y.isLoaded()&&(p.style.height="0px"),y},show:function(){return e.style.height=st+"px",y.isLoaded()&&(p.style.height=ot+"px"),y},isHidden:function(){return y.isLoaded()&&parseInt(p.style.height,10)===0},load:function(t){if(!y.isLoaded()&&y._fireEvent("onBeforeLoad")!==!1){var f=function(){g&&!flashembed.isSupported(h.version)&&(e.innerHTML=""),t&&(t.cached=!0,u(k,"onLoad",t)),flashembed(e,h,{config:v})},i=0;n(r,function(){this.unload(function(){++i==r.length&&f()})})}return y},unload:function(n){if(g.replace(/\s/g,"")!==""){if(y._fireEvent("onBeforeUnload")===!1)return n&&n(!1),y;it=!0;try{p&&(p.fp_isFullscreen()&&p.fp_toggleFullscreen(),p.fp_close(),y._fireEvent("onUnload"))}catch(i){}var t=function(){p=null,e.innerHTML=g,it=!1,n&&n(!0)};/WebKit/i.test(navigator.userAgent)&&!/Chrome/i.test(navigator.userAgent)?setTimeout(t,0):t()}else n&&n(!1);return y},getClip:function(n){return n===undefined&&(n=et),w[n]},getCommonClip:function(){return d},getPlaylist:function(){return w},getPlugin:function(n){var t=b[n],i;return!t&&y.isLoaded()&&(i=y._api().fp_getPlugin(n),i&&(t=new o(n,i,y),b[n]=t)),t},getScreen:function(){return y.getPlugin("screen")},getControls:function(){return y.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return y.getPlugin("logo")._fireEvent("onUpdate")}catch(n){}},getPlay:function(){return y.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(n){return n?i(v):v},getFlashParams:function(){return h},loadPlugin:function(n,t,i,r){var s,e,u;return typeof i=="function"&&(r=i,i={}),s=r?f():"_",y._api().fp_loadPlugin(n,t,i,s),e={},e[s]=r,u=new o(n,null,y,e),b[n]=u,u},getState:function(){return y.isLoaded()?p.fp_getState():-1},play:function(n,t){var i=function(){n!==undefined?y._api().fp_play(n,t):y._api().fp_play()};return y.isLoaded()?i():it?setTimeout(function(){y.play(n,t)},50):y.load(function(){i()}),y},getVersion:function(){var t="flowplayer.js 3.2.11",n;return y.isLoaded()?(n=p.fp_getVersion(),n.push(t),n):t},_api:function(){if(!y.isLoaded())throw"Flowplayer "+y.id()+" not loaded when calling an API method";return p},setClip:function(t){return n(t,function(n,i){if(typeof i=="function")u(k,n,i),delete t[n];else if(n=="onCuepoint")$f(e).getCommonClip().onCuepoint(t[n][0],t[n][1])}),y.setPlaylist([t]),y},getIndex:function(){return nt},bufferAnimate:function(n){return p.fp_bufferAnimate(n===undefined||n),y},_swfHeight:function(){return p.clientHeight}}),n("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut".split(","),function(){var n="on"+this,t;n.indexOf("*")!=-1&&(n=n.slice(0,n.length-1),t="onBefore"+n.slice(2),y[t]=function(n){return u(k,t,n),y}),y[n]=function(t){return u(k,n,t),y}}),n("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 n=this;y[n]=function(t,i){if(!y.isLoaded())return y;var r=null;return r=t!==undefined&&i!==undefined?p["fp_"+n](t,i):t===undefined?p["fp_"+n]():p["fp_"+n](t),r==="undefined"||r===undefined?y:r}}),y._fireEvent=function(t){var g,h,nt,f,o;typeof t=="string"&&(t=[t]);var r=t[0],i=t[1],u=t[2],l=t[3],e=0;if(v.debug&&a(t),y.isLoaded()||r!="onLoad"||i!="player"||(p=p||c(ut),ot=y._swfHeight(),n(w,function(){this._fireEvent("onLoad")}),n(b,function(n,t){t._fireEvent("onUpdate")}),d._fireEvent("onLoad")),r!="onLoad"||i=="player"){if(r=="onError"&&(typeof i=="string"||typeof i=="number"&&typeof u=="number")&&(i=u,u=l),r=="onContextMenu"){n(v.contextMenu[i],function(n,t){t.call(y)});return}if(r=="onPluginEvent"||r=="onBeforePluginEvent")return(g=i.name||i,h=b[g],h)?(h._fireEvent("onUpdate",i),h._fireEvent(u,t.slice(3))):void 0;if(r=="onPlaylistReplace"&&(w=[],nt=0,n(i,function(){w.push(new s(this,nt++,y))})),r=="onClipAdd"){if(i.isInStream)return;for(i=new s(i,u,y),w.splice(u,0,i),e=u+1;e<w.length;e++)w[e].index++}return f=!0,typeof i=="number"&&i<w.length&&(et=i,o=w[i],o&&(f=o._fireEvent(r,u,l)),o&&f===!1||(f=d._fireEvent(r,u,l,o))),n(k[r],function(){if(f=this.call(y,i,u),this.cached&&k[r].splice(e,1),f===!1)return!1;e++}),f}},typeof e=="string"){if(rt=c(e),!rt)throw"Flowplayer cannot access element: "+e;e=rt,ft()}else ft()}function h(t){this.length=t.length,this.each=function(i){n(t,i)},this.size=function(){return t.length};var i=this;for(name in e.prototype)i[name]=function(){var n=arguments;i.each(function(){this[name].apply(this,n)})}}var s=function(i,r,e){var o=this,c={},h={},s;o.index=r,typeof i=="string"&&(i={url:i}),t(this,i,!0),n("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop".split(","),function(){var n="on"+this,t;n.indexOf("*")!=-1&&(n=n.slice(0,n.length-1),t="onBefore"+n.slice(2),o[t]=function(n){return u(h,t,n),o}),o[n]=function(t){return u(h,n,t),o},r==-1&&(o[t]&&(e[t]=o[t]),o[n]&&(e[n]=o[n]))}),t(this,{onCuepoint:function(n,t){if(arguments.length==1)return c.embedded=[null,n],o;typeof n=="number"&&(n=[n]);var i=f();return c[i]=[n,t],e.isLoaded()&&e._api().fp_addCuepoints(n,r,i),o},update:function(n){t(o,n),e.isLoaded()&&e._api().fp_updateClip(n,r);var i=e.getConfig(),u=r==-1?i.clip:i.playlist[r];t(u,n,!0)},_fireEvent:function(i,u,f,s){var a,l;return i=="onLoad"?(n(c,function(n,t){t[0]&&e._api().fp_addCuepoints(t[0],r,n)}),!1):(s=s||o,i=="onCuepoint"&&(a=c[u],a))?a[1].call(e,s,f):(u&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(i)!=-1&&(t(s,u),u.metaData&&(s.duration?s.fullDuration=u.metaData.duration:s.duration=u.metaData.duration)),l=!0,n(h[i],function(){l=this.call(e,s,u,f)}),l)}}),i.onCuepoint&&(s=i.onCuepoint,o.onCuepoint.apply(o,typeof s=="function"?[s]:s),delete i.onCuepoint),n(i,function(n,t){typeof t=="function"&&(u(h,n,t),delete i[n])}),r==-1&&(e.onCuepoint=this.onCuepoint)},o=function(i,r,u,e){var o=this,s={},h=!1;e&&t(s,e),n(r,function(n,t){typeof t=="function"&&(s[n]=t,delete r[n])}),t(this,{animate:function(n,t,e){var c,h;return n?(typeof t=="function"&&(e=t,t=500),typeof n=="string"&&(c=n,n={},n[c]=t,t=500),e&&(h=f(),s[h]=e),t===undefined&&(t=500),r=u._api().fp_animate(i,n,t,h),o):o},css:function(n,f){if(f!==undefined){var e={};e[n]=f,n=e}return r=u._api().fp_css(i,n),t(o,r),o},show:function(){return this.display="block",u._api().fp_showPlugin(i),o},hide:function(){return this.display="none",u._api().fp_hidePlugin(i),o},toggle:function(){return this.display=u._api().fp_togglePlugin(i),o},fadeTo:function(n,t,r){if(typeof t=="function"&&(r=t,t=500),r){var e=f();s[e]=r}return this.display=u._api().fp_fadeTo(i,n,t,e),this.opacity=n,o},fadeIn:function(n,t){return o.fadeTo(1,n,t)},fadeOut:function(n,t){return o.fadeTo(0,n,t)},getName:function(){return i},getPlayer:function(){return u},_fireEvent:function(r,f){var c,l,a;if(r=="onUpdate"){if(c=u._api().fp_getPlugin(i),!c)return;t(o,c),delete o.methods,h||(n(c.methods,function(){var n=""+this;o[n]=function(){var r=[].slice.call(arguments),t=u._api().fp_invoke(i,n,r);return t==="undefined"||t===undefined?o:t}}),h=!0)}return(l=s[r],l)?(a=l.apply(o,f),r.slice(0,1)=="_"&&delete s[r],a):o}})},r=[];window.flowplayer=window.$f=function(){var s=null,u=arguments[0],f,o,a,l;if(!arguments.length)return n(r,function(){if(this.isLoaded())return s=this,!1}),s||r[0];if(arguments.length==1)return typeof u=="number"?r[u]:u=="*"?new h(r):(n(r,function(){if(this.id()==u.id||this.id()==u||this.getParent()==u)return s=this,!1}),s);if(arguments.length>1){if(f=arguments[1],o=arguments.length==3?arguments[2]:{},typeof f=="string"&&(f={src:f}),f=t({bgcolor:"#000000",version:[10,1],expressInstall:"http://releases.flowplayer.org/swf/expressinstall.swf",cachebusting:!1},f),typeof u=="string")return u.indexOf(".")!=-1?(a=[],n(v(u),function(){a.push(new e(this,i(f),i(o)))}),new h(a)):(l=c(u),new e(l!==null?l:i(u),i(f),i(o)));if(u)return new e(u,i(f),i(o))}return null},t(window.$f,{fireEvent:function(){var t=[].slice.call(arguments),n=$f(t[0]);return n?n._fireEvent(t.slice(1)):null},addPlugin:function(n,t){return e.prototype[n]=t,$f},each:n,extend:t}),typeof jQuery=="function"&&(jQuery.fn.flowplayer=function(n,t){if(!arguments.length||typeof arguments[0]=="number"){var r=[];return this.each(function(){var n=$f(this);n&&r.push(n)}),arguments.length?r[arguments[0]]:new h(r)}return this.each(function(){$f(this,i(n),t?i(t):{})})})})(),function(){function t(n,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n}function h(n,t){var r=[],i;for(i in n)n.hasOwnProperty(i)&&(r[i]=t(n[i]));return r}function e(r,e,o){if(n.isSupported(e.version))r.innerHTML=n.getHTML(e,o);else if(e.expressInstall&&n.isSupported([6,65]))r.innerHTML=n.getHTML(t(e,{src:e.expressInstall}),{MMredirectURL:encodeURIComponent(location.href),MMplayerType:"PlugIn",MMdoctitle:document.title});else if(r.innerHTML.replace(/\s/g,"")||(r.innerHTML="<h2>Flash version "+e.version+" or greater is required</h2><h3>"+(i[0]>0?"Your version is "+i:"You have no flash plugin installed")+"</h3>"+(r.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+f+"'>here</a></p>"),(r.tagName=="A"||r.tagName=="DIV")&&(r.onclick=function(){location.href=f})),e.onFail){var s=e.onFail.call(this);typeof s=="string"&&(r.innerHTML=s)}u&&(window[e.id]=document.getElementById(e.id)),t(this,{getRoot:function(){return r},getOptions:function(){return e},getConf:function(){return o},getApi:function(){return r.firstChild}})}var u=document.all,f="http://get.adobe.com/flashplayer",s=typeof jQuery=="function",o=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,r={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:!0,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:!1,cachebusting:!1},n,i;window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){},__flash_savedUnloadHandler=function(){}}),window.flashembed=function(n,i,u){if(typeof n=="string"&&(n=document.getElementById(n.replace("#",""))),n)return typeof i=="string"&&(i={src:i}),new e(n,t(t({},r),i),u)},n=t(window.flashembed,{conf:r,getVersion:function(){var t,n;try{n=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(u){try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),n=t&&t.GetVariable("$version")}catch(r){try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),n=t&&t.GetVariable("$version")}catch(i){}}}return n=o.exec(n),n?[1*n[1],1*n[n[1]*1>9?2:3]]:[0,0]},asString:function(t){var r,u,i;if(t===null||t===undefined)return null;r=typeof t,r=="object"&&t.push&&(r="array");switch(r){case"string":return t=t.replace(new RegExp('(["\\\\])',"g"),"\\$1"),t=t.replace(/^\s?(\d+\.?\d*)%/,"$1pct"),'"'+t+'"';case"array":return"["+h(t,function(t){return n.asString(t)}).join(",")+"]";case"function":return'"function()"';case"object":u=[];for(i in t)t.hasOwnProperty(i)&&u.push('"'+i+'":'+n.asString(t[i]));return"{"+u.join(",")+"}"}return String(t).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(i,r){var f,h,e,s,o;i=t({},i),f='<object width="'+i.width+'" height="'+i.height+'" id="'+i.id+'" name="'+i.id+'"',i.cachebusting&&(i.src+=(i.src.indexOf("?")!=-1?"&":"?")+Math.random()),f+=i.w3c||!u?' data="'+i.src+'" type="application/x-shockwave-flash"':' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"',f+=">",(i.w3c||u)&&(f+='<param name="movie" value="'+i.src+'" />'),i.width=i.height=i.id=i.w3c=i.src=null,i.onFail=i.version=i.expressInstall=null;for(h in i)i[h]&&(f+='<param name="'+h+'" value="'+i[h]+'" />');if(e="",r){for(s in r)r[s]&&(o=r[s],e+=s+"="+(/function|object/.test(typeof o)?n.asString(o):o)+"&");e=e.slice(0,-1),f+='<param name="flashvars" value=\''+e+"' />"}return f+="</object>"},isSupported:function(n){return i[0]>n[0]||i[0]==n[0]&&i[1]>=n[1]}}),i=n.getVersion(),s&&(jQuery.tools=jQuery.tools||{version:"3.2.11"},jQuery.tools.flashembed={conf:r},jQuery.fn.flashembed=function(n,t){return this.each(function(){$(this).data("flashembed",flashembed(this,n,t))})})}()