summaryrefslogtreecommitdiff
path: root/lib/flowplayer-flash
diff options
context:
space:
mode:
authorshadlaws <shad@shadlaws.com>2013-03-04 19:14:47 +0100
committershadlaws <shad@shadlaws.com>2013-03-04 19:14:47 +0100
commit1544a83279853acccccdf179b6c96d044fee1cf6 (patch)
treea392db6f75d4ff1a29a6c4c3e55c158e9fa19e16 /lib/flowplayer-flash
parente77276736351700b3bbd1080369738620ff8be28 (diff)
Minify (and re-minify) JS libraries (in sync with gallery3-vendor).
- minified jQuery libraries. - re-minified flowplayer, json2-min, and extjs using new minimizer (more efficient, keeps copyrights).
Diffstat (limited to 'lib/flowplayer-flash')
-rw-r--r--lib/flowplayer-flash/flowplayer.js303
1 files changed, 75 insertions, 228 deletions
diff --git a/lib/flowplayer-flash/flowplayer.js b/lib/flowplayer-flash/flowplayer.js
index 83cd974f..04c47db1 100644
--- a/lib/flowplayer-flash/flowplayer.js
+++ b/lib/flowplayer-flash/flowplayer.js
@@ -1,228 +1,75 @@
-!function(){function log(args){console.log("$f.fireEvent",[].slice.call(args));}
-function clone(obj){if(!obj||typeof obj!='object'){return obj;}
-var temp=new obj.constructor();for(var key in obj){if(obj.hasOwnProperty(key)){temp[key]=clone(obj[key]);}}
-return temp;}
-function each(obj,fn){if(!obj){return;}
-var name,i=0,length=obj.length;if(length===undefined){for(name in obj){if(fn.call(obj[name],name,obj[name])===false){break;}}}else{for(var value=obj[0];i<length&&fn.call(value,i,value)!==false;value=obj[++i]){}}
-return obj;}
-function el(id){return document.getElementById(id);}
-function extend(to,from,skipFuncs){if(typeof from!='object'){return to;}
-if(to&&from){each(from,function(name,value){if(!skipFuncs||typeof value!='function'){to[name]=value;}});}
-return to;}
-function select(query){var index=query.indexOf(".");if(index!=-1){var tag=query.slice(0,index)||"*";var klass=query.slice(index+1,query.length);var els=[];each(document.getElementsByTagName(tag),function(){if(this.className&&this.className.indexOf(klass)!=-1){els.push(this);}});return els;}}
-function stopEvent(e){e=e||window.event;if(e.preventDefault){e.stopPropagation();e.preventDefault();}else{e.returnValue=false;e.cancelBubble=true;}
-return false;}
-function bind(to,evt,fn){to[evt]=to[evt]||[];to[evt].push(fn);}
-function queryescape(url){return url.replace(/&amp;/g,'%26').replace(/&/g,'%26').replace(/=/g,'%3D');}
-function makeId(){return"_"+(""+Math.random()).slice(2,10);}
-var Clip=function(json,index,player){var self=this,cuepoints={},listeners={};self.index=index;if(typeof json=='string'){json={url:json};}
-extend(this,json,true);each(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var evt="on"+this;if(evt.indexOf("*")!=-1){evt=evt.slice(0,evt.length-1);var before="onBefore"+evt.slice(2);self[before]=function(fn){bind(listeners,before,fn);return self;};}
-self[evt]=function(fn){bind(listeners,evt,fn);return self;};if(index==-1){if(self[before]){player[before]=self[before];}
-if(self[evt]){player[evt]=self[evt];}}});extend(this,{onCuepoint:function(points,fn){if(arguments.length==1){cuepoints.embedded=[null,points];return self;}
-if(typeof points=='number'){points=[points];}
-var fnId=makeId();cuepoints[fnId]=[points,fn];if(player.isLoaded()){player._api().fp_addCuepoints(points,index,fnId);}
-return self;},update:function(json){extend(self,json);if(player.isLoaded()){player._api().fp_updateClip(json,index);}
-var conf=player.getConfig();var clip=(index==-1)?conf.clip:conf.playlist[index];extend(clip,json,true);},_fireEvent:function(evt,arg1,arg2,target){if(evt=='onLoad'){each(cuepoints,function(key,val){if(val[0]){player._api().fp_addCuepoints(val[0],index,key);}});return false;}
-target=target||self;if(evt=='onCuepoint'){var fn=cuepoints[arg1];if(fn){return fn[1].call(player,target,arg2);}}
-if(arg1&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(evt)!=-1){extend(target,arg1);if(arg1.metaData){if(!target.duration){target.duration=arg1.metaData.duration;}else{target.fullDuration=arg1.metaData.duration;}}}
-var ret=true;each(listeners[evt],function(){ret=this.call(player,target,arg1,arg2);});return ret;}});if(json.onCuepoint){var arg=json.onCuepoint;self.onCuepoint.apply(self,typeof arg=='function'?[arg]:arg);delete json.onCuepoint;}
-each(json,function(key,val){if(typeof val=='function'){bind(listeners,key,val);delete json[key];}});if(index==-1){player.onCuepoint=this.onCuepoint;}};var Plugin=function(name,json,player,fn){var self=this,listeners={},hasMethods=false;if(fn){extend(listeners,fn);}
-each(json,function(key,val){if(typeof val=='function'){listeners[key]=val;delete json[key];}});extend(this,{animate:function(props,speed,fn){if(!props){return self;}
-if(typeof speed=='function'){fn=speed;speed=500;}
-if(typeof props=='string'){var key=props;props={};props[key]=speed;speed=500;}
-if(fn){var fnId=makeId();listeners[fnId]=fn;}
-if(speed===undefined){speed=500;}
-json=player._api().fp_animate(name,props,speed,fnId);return self;},css:function(props,val){if(val!==undefined){var css={};css[props]=val;props=css;}
-json=player._api().fp_css(name,props);extend(self,json);return self;},show:function(){this.display='block';player._api().fp_showPlugin(name);return self;},hide:function(){this.display='none';player._api().fp_hidePlugin(name);return self;},toggle:function(){this.display=player._api().fp_togglePlugin(name);return self;},fadeTo:function(o,speed,fn){if(typeof speed=='function'){fn=speed;speed=500;}
-if(fn){var fnId=makeId();listeners[fnId]=fn;}
-this.display=player._api().fp_fadeTo(name,o,speed,fnId);this.opacity=o;return self;},fadeIn:function(speed,fn){return self.fadeTo(1,speed,fn);},fadeOut:function(speed,fn){return self.fadeTo(0,speed,fn);},getName:function(){return name;},getPlayer:function(){return player;},_fireEvent:function(evt,arg,arg2){if(evt=='onUpdate'){var json=player._api().fp_getPlugin(name);if(!json){return;}
-extend(self,json);delete self.methods;if(!hasMethods){each(json.methods,function(){var method=""+this;self[method]=function(){var a=[].slice.call(arguments);var ret=player._api().fp_invoke(name,method,a);return ret==='undefined'||ret===undefined?self:ret;};});hasMethods=true;}}
-var fn=listeners[evt];if(fn){var ret=fn.apply(self,arg);if(evt.slice(0,1)=="_"){delete listeners[evt];}
-return ret;}
-return self;}});};function Player(wrapper,params,conf){var self=this,api=null,isUnloading=false,html,commonClip,playlist=[],plugins={},listeners={},playerId,apiId,playerIndex,activeIndex,swfHeight,wrapperHeight;extend(self,{id:function(){return playerId;},isLoaded:function(){return(api!==null&&api.fp_play!==undefined&&!isUnloading);},getParent:function(){return wrapper;},hide:function(all){if(all){wrapper.style.height="0px";}
-if(self.isLoaded()){api.style.height="0px";}
-return self;},show:function(){wrapper.style.height=wrapperHeight+"px";if(self.isLoaded()){api.style.height=swfHeight+"px";}
-return self;},isHidden:function(){return self.isLoaded()&&parseInt(api.style.height,10)===0;},load:function(fn){if(!self.isLoaded()&&self._fireEvent("onBeforeLoad")!==false){var onPlayersUnloaded=function(){if(html&&!flashembed.isSupported(params.version)){wrapper.innerHTML="";}
-if(fn){fn.cached=true;bind(listeners,"onLoad",fn);}
-flashembed(wrapper,params,{config:conf});};var unloadedPlayersNb=0;each(players,function(){this.unload(function(wasUnloaded){if(++unloadedPlayersNb==players.length){onPlayersUnloaded();}});});}
-return self;},unload:function(fn){if(html.replace(/\s/g,'')!==''){if(self._fireEvent("onBeforeUnload")===false){if(fn){fn(false);}
-return self;}
-isUnloading=true;try{if(api){if(api.fp_isFullscreen()){api.fp_toggleFullscreen();}
-api.fp_close();self._fireEvent("onUnload");}}catch(error){}
-var clean=function(){api=null;wrapper.innerHTML=html;isUnloading=false;if(fn){fn(true);}};if(/WebKit/i.test(navigator.userAgent)&&!/Chrome/i.test(navigator.userAgent)){setTimeout(clean,0);}else{clean();}}
-else if(fn){fn(false);}
-return self;},getClip:function(index){if(index===undefined){index=activeIndex;}
-return playlist[index];},getCommonClip:function(){return commonClip;},getPlaylist:function(){return playlist;},getPlugin:function(name){var plugin=plugins[name];if(!plugin&&self.isLoaded()){var json=self._api().fp_getPlugin(name);if(json){plugin=new Plugin(name,json,self);plugins[name]=plugin;}}
-return plugin;},getScreen:function(){return self.getPlugin("screen");},getControls:function(){return self.getPlugin("controls")._fireEvent("onUpdate");},getLogo:function(){try{return self.getPlugin("logo")._fireEvent("onUpdate");}catch(ignored){}},getPlay:function(){return self.getPlugin("play")._fireEvent("onUpdate");},getConfig:function(copy){return copy?clone(conf):conf;},getFlashParams:function(){return params;},loadPlugin:function(name,url,props,fn){if(typeof props=='function'){fn=props;props={};}
-var fnId=fn?makeId():"_";self._api().fp_loadPlugin(name,url,props,fnId);var arg={};arg[fnId]=fn;var p=new Plugin(name,null,self,arg);plugins[name]=p;return p;},getState:function(){return self.isLoaded()?api.fp_getState():-1;},play:function(clip,instream){var p=function(){if(clip!==undefined){self._api().fp_play(clip,instream);}else{self._api().fp_play();}};if(self.isLoaded()){p();}else if(isUnloading){setTimeout(function(){self.play(clip,instream);},50);}else{self.load(function(){p();});}
-return self;},getVersion:function(){var js="flowplayer.js 3.2.12";if(self.isLoaded()){var ver=api.fp_getVersion();ver.push(js);return ver;}
-return js;},_api:function(){if(!self.isLoaded()){throw"Flowplayer "+self.id()+" not loaded when calling an API method";}
-return api;},setClip:function(clip){each(clip,function(key,val){if(typeof val=='function'){bind(listeners,key,val);delete clip[key];}else if(key=='onCuepoint'){$f(wrapper).getCommonClip().onCuepoint(clip[key][0],clip[key][1]);}});self.setPlaylist([clip]);return self;},getIndex:function(){return playerIndex;},bufferAnimate:function(enable){api.fp_bufferAnimate(enable===undefined||enable);return self;},_swfHeight:function(){return api.clientHeight;}});each(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var name="on"+this;if(name.indexOf("*")!=-1){name=name.slice(0,name.length-1);var name2="onBefore"+name.slice(2);self[name2]=function(fn){bind(listeners,name2,fn);return self;};}
-self[name]=function(fn){bind(listeners,name,fn);return self;};});each(("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 name=this;self[name]=function(a1,a2){if(!self.isLoaded()){return self;}
-var ret=null;if(a1!==undefined&&a2!==undefined){ret=api["fp_"+name](a1,a2);}else{ret=(a1===undefined)?api["fp_"+name]():api["fp_"+name](a1);}
-return ret==='undefined'||ret===undefined?self:ret;};});self._fireEvent=function(a){if(typeof a=='string'){a=[a];}
-var evt=a[0],arg0=a[1],arg1=a[2],arg2=a[3],i=0;if(conf.debug){log(a);}
-if(!self.isLoaded()&&evt=='onLoad'&&arg0=='player'){api=api||el(apiId);swfHeight=self._swfHeight();each(playlist,function(){this._fireEvent("onLoad");});each(plugins,function(name,p){p._fireEvent("onUpdate");});commonClip._fireEvent("onLoad");}
-if(evt=='onLoad'&&arg0!='player'){return;}
-if(evt=='onError'){if(typeof arg0=='string'||(typeof arg0=='number'&&typeof arg1=='number')){arg0=arg1;arg1=arg2;}}
-if(evt=='onContextMenu'){each(conf.contextMenu[arg0],function(key,fn){fn.call(self);});return;}
-if(evt=='onPluginEvent'||evt=='onBeforePluginEvent'){var name=arg0.name||arg0;var p=plugins[name];if(p){p._fireEvent("onUpdate",arg0);return p._fireEvent(arg1,a.slice(3));}
-return;}
-if(evt=='onPlaylistReplace'){playlist=[];var index=0;each(arg0,function(){playlist.push(new Clip(this,index++,self));});}
-if(evt=='onClipAdd'){if(arg0.isInStream){return;}
-arg0=new Clip(arg0,arg1,self);playlist.splice(arg1,0,arg0);for(i=arg1+1;i<playlist.length;i++){playlist[i].index++;}}
-var ret=true;if(typeof arg0=='number'&&arg0<playlist.length){activeIndex=arg0;var clip=playlist[arg0];if(clip){ret=clip._fireEvent(evt,arg1,arg2);}
-if(!clip||ret!==false){ret=commonClip._fireEvent(evt,arg1,arg2,clip);}}
-each(listeners[evt],function(){ret=this.call(self,arg0,arg1);if(this.cached){listeners[evt].splice(i,1);}
-if(ret===false){return false;}
-i++;});return ret;};function init(){if($f(wrapper)){$f(wrapper).getParent().innerHTML="";playerIndex=$f(wrapper).getIndex();players[playerIndex]=self;}else{players.push(self);playerIndex=players.length-1;}
-wrapperHeight=parseInt(wrapper.style.height,10)||wrapper.clientHeight;playerId=wrapper.id||"fp"+makeId();apiId=params.id||playerId+"_api";params.id=apiId;html=wrapper.innerHTML;if(typeof conf=='string'){conf={clip:{url:conf}};}
-conf.playerId=playerId;conf.clip=conf.clip||{};if(wrapper.getAttribute("href",2)&&!conf.clip.url){conf.clip.url=wrapper.getAttribute("href",2);}
-if(conf.clip.url){conf.clip.url=queryescape(conf.clip.url);}
-commonClip=new Clip(conf.clip,-1,self);conf.playlist=conf.playlist||[conf.clip];var index=0;each(conf.playlist,function(){var clip=this;if(typeof clip=='object'&&clip.length){clip={url:""+clip};}
-if(clip.url){clip.url=queryescape(clip.url);}
-each(conf.clip,function(key,val){if(val!==undefined&&clip[key]===undefined&&typeof val!='function'){clip[key]=val;}});conf.playlist[index]=clip;clip=new Clip(clip,index,self);playlist.push(clip);index++;});each(conf,function(key,val){if(typeof val=='function'){if(commonClip[key]){commonClip[key](val);}else{bind(listeners,key,val);}
-delete conf[key];}});each(conf.plugins,function(name,val){if(val){plugins[name]=new Plugin(name,val,self);}});if(!conf.plugins||conf.plugins.controls===undefined){plugins.controls=new Plugin("controls",null,self);}
-plugins.canvas=new Plugin("canvas",null,self);html=wrapper.innerHTML;function doClick(e){if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(playlist[0].url)&&!checkForIpadSupport()){return true;}
-if(!self.isLoaded()&&self._fireEvent("onBeforeClick")!==false){self.load();}
-return stopEvent(e);}
-function checkForIpadSupport(){return self.hasiPadSupport&&self.hasiPadSupport();}
-function installPlayer(){if(html.replace(/\s/g,'')!==''){if(wrapper.addEventListener){wrapper.addEventListener("click",doClick,false);}else if(wrapper.attachEvent){wrapper.attachEvent("onclick",doClick);}}else{if(wrapper.addEventListener&&!checkForIpadSupport()){wrapper.addEventListener("click",stopEvent,false);}
-self.load();}}
-setTimeout(installPlayer,0);}
-if(typeof wrapper=='string'){var node=el(wrapper);if(!node){throw"Flowplayer cannot access element: "+wrapper;}
-wrapper=node;init();}else{init();}}
-var players=[];function Iterator(arr){this.length=arr.length;this.each=function(fn){each(arr,fn);};this.size=function(){return arr.length;};var self=this;for(name in Player.prototype){self[name]=function(){var args=arguments;self.each(function(){this[name].apply(this,args);});};}}
-window.flowplayer=window.$f=function(){var instance=null;var arg=arguments[0];if(!arguments.length){each(players,function(){if(this.isLoaded()){instance=this;return false;}});return instance||players[0];}
-if(arguments.length==1){if(typeof arg=='number'){return players[arg];}else{if(arg=='*'){return new Iterator(players);}
-each(players,function(){if(this.id()==arg.id||this.id()==arg||this.getParent()==arg){instance=this;return false;}});return instance;}}
-if(arguments.length>1){var params=arguments[1],conf=(arguments.length==3)?arguments[2]:{};if(typeof params=='string'){params={src:params};}
-params=extend({bgcolor:"#000000",version:[10,1],expressInstall:"http://releases.flowplayer.org/swf/expressinstall.swf",cachebusting:false},params);if(typeof arg=='string'){if(arg.indexOf(".")!=-1){var instances=[];each(select(arg),function(){instances.push(new Player(this,clone(params),clone(conf)));});return new Iterator(instances);}else{var node=el(arg);return new Player(node!==null?node:clone(arg),clone(params),clone(conf));}}else if(arg){return new Player(arg,clone(params),clone(conf));}}
-return null;};extend(window.$f,{fireEvent:function(){var a=[].slice.call(arguments);var p=$f(a[0]);return p?p._fireEvent(a.slice(1)):null;},addPlugin:function(name,fn){Player.prototype[name]=fn;return $f;},each:each,extend:extend});if(typeof jQuery=='function'){jQuery.fn.flowplayer=function(params,conf){if(!arguments.length||typeof arguments[0]=='number'){var arr=[];this.each(function(){var p=$f(this);if(p){arr.push(p);}});return arguments.length?arr[arguments[0]]:new Iterator(arr);}
-return this.each(function(){$f(this,clone(params),conf?clone(conf):{});});};}}();!function(){var IE=document.all,URL='http://get.adobe.com/flashplayer',JQUERY=typeof jQuery=='function',RE=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,GLOBAL_OPTS={width:'100%',height:'100%',id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:'always',quality:'high',version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};});}
-function extend(to,from){if(from){for(var key in from){if(from.hasOwnProperty(key)){to[key]=from[key];}}}
-return to;}
-function map(arr,func){var newArr=[];for(var i in arr){if(arr.hasOwnProperty(i)){newArr[i]=func(arr[i]);}}
-return newArr;}
-window.flashembed=function(root,opts,conf){if(typeof root=='string'){root=document.getElementById(root.replace("#",""));}
-if(!root){return;}
-if(typeof opts=='string'){opts={src:opts};}
-return new Flash(root,extend(extend({},GLOBAL_OPTS),opts),conf);};var f=extend(window.flashembed,{conf:GLOBAL_OPTS,getVersion:function(){var fo,ver;try{ver=navigator.plugins["Shockwave Flash"].description.slice(16);}catch(e){try{fo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");ver=fo&&fo.GetVariable("$version");}catch(err){try{fo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");ver=fo&&fo.GetVariable("$version");}catch(err2){}}}
-ver=RE.exec(ver);return ver?[1*ver[1],1*ver[(ver[1]*1>9?2:3)]*1]:[0,0];},asString:function(obj){if(obj===null||obj===undefined){return null;}
-var type=typeof obj;if(type=='object'&&obj.push){type='array';}
-switch(type){case'string':return string2JsonString(obj);case'array':return'['+map(obj,function(el){return f.asString(el);}).join(',')+']';case'function':return'"function()"';case'object':var str=[];for(var prop in obj){if(obj.hasOwnProperty(prop)){str.push('"'+prop+'":'+f.asString(obj[prop]));}}
-return'{'+str.join(',')+'}';}
-return String(obj).replace(/\s/g," ").replace(/\'/g,"\"");},getHTML:function(opts,conf){opts=extend({},opts);var html='<object width="'+opts.width+'" height="'+opts.height+'" id="'+opts.id+'" name="'+opts.id+'"';if(opts.cachebusting){opts.src+=((opts.src.indexOf("?")!=-1?"&":"?")+Math.random());}
-if(opts.w3c||!IE){html+=' data="'+opts.src+'" type="application/x-shockwave-flash"';}else{html+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';}
-html+='>';if(opts.w3c||IE){html+='<param name="movie" value="'+opts.src+'" />';}
-opts.width=opts.height=opts.id=opts.w3c=opts.src=null;opts.onFail=opts.version=opts.expressInstall=null;for(var key in opts){if(opts[key]){html+='<param name="'+key+'" value="'+opts[key]+'" />';}}
-var vars="";if(conf){for(var k in conf){if(conf[k]){var val=conf[k];vars+=encodeURIComponent(k)+'='
-+encodeURIComponent(/function|object/.test(typeof val)?f.asString(val):val)
-+'&';}}
-vars=vars.slice(0,-1);html+='<param name="flashvars" value="'+vars+'" />';}
-html+="</object>";return html;},isSupported:function(ver){return VERSION[0]>ver[0]||VERSION[0]==ver[0]&&VERSION[1]>=ver[1];}});var VERSION=f.getVersion();function Flash(root,opts,conf){if(f.isSupported(opts.version)){root.innerHTML=f.getHTML(opts,conf);}else if(opts.expressInstall&&f.isSupported([6,65])){root.innerHTML=f.getHTML(extend(opts,{src:opts.expressInstall}),{MMredirectURL:encodeURIComponent(location.href),MMplayerType:'PlugIn',MMdoctitle:document.title});}else{if(!root.innerHTML.replace(/\s/g,'')){root.innerHTML="<h2>Flash version "+opts.version+" or greater is required</h2>"+"<h3>"+
-(VERSION[0]>0?"Your version is "+VERSION:"You have no flash plugin installed")+"</h3>"+
-(root.tagName=='A'?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+URL+"'>here</a></p>");if(root.tagName=='A'||root.tagName=="DIV"){root.onclick=function(){location.href=URL;};}}
-if(opts.onFail){var ret=opts.onFail.call(this);if(typeof ret=='string'){root.innerHTML=ret;}}}
-if(IE){window[opts.id]=document.getElementById(opts.id);}
-extend(this,{getRoot:function(){return root;},getOptions:function(){return opts;},getConf:function(){return conf;},getApi:function(){return root.firstChild;}});}
-var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function string2JsonString(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
-if(JQUERY){jQuery.tools=jQuery.tools||{version:'@VERSION'};jQuery.tools.flashembed={conf:GLOBAL_OPTS};jQuery.fn.flashembed=function(opts,conf){return this.each(function(){$(this).data("flashembed",flashembed(this,opts,conf));});};}}();$f.addPlugin("ipad",function(options){var STATE_UNLOADED=-1;var STATE_LOADED=0;var STATE_UNSTARTED=1;var STATE_BUFFERING=2;var STATE_PLAYING=3;var STATE_PAUSED=4;var STATE_ENDED=5;var self=this;var currentVolume=1;var onStartFired=false;var stopping=false;var playAfterSeek=false;var activeIndex=0;var activePlaylist=[];var lastSecondTimer;var endTime=null;var startTime=0;var clipDefaults={accelerated:false,autoBuffering:false,autoPlay:true,baseUrl:null,bufferLength:3,connectionProvider:null,cuepointMultiplier:1000,cuepoints:[],controls:{},duration:0,extension:'',fadeInSpeed:1000,fadeOutSpeed:1000,image:false,linkUrl:null,linkWindow:'_self',live:false,metaData:{},originalUrl:null,position:0,playlist:[],provider:'http',scaling:'scale',seekableOnBegin:false,start:0,url:null,urlResolvers:[]};var currentState=STATE_UNLOADED;var previousState=STATE_UNLOADED;var isiDevice=/iPad|iPhone|iPod/i.test(navigator.userAgent);var video=null;function extend(to,from,includeFuncs){if(from){for(key in from){if(key){if(from[key]&&typeof from[key]=="function"&&!includeFuncs)
-continue;if(from[key]&&typeof from[key]=="object"&&from[key].length===undefined){var cp={};extend(cp,from[key]);to[key]=cp;}else{to[key]=from[key];}}}}
-return to;}
-var opts={simulateiDevice:false,controlsSizeRatio:1.5,controls:true,debug:false,validExtensions:'mov|m4v|mp4|avi|mp3|m4a|aac|m3u8|m3u|pls',posterExtensions:'png|jpg'};extend(opts,options);var validExtensions=opts.validExtensions?new RegExp('^\.('+opts.validExtensions+')$','i'):null;var posterExtensions=new RegExp('^\.('+opts.posterExtensions+')$','i');function log(){if(opts.debug){if(isiDevice){var str=[].splice.call(arguments,0).join(', ');console.log.apply(console,[str]);}else{console.log.apply(console,arguments);}}}
-function stateDescription(state){switch(state){case-1:return"UNLOADED";case 0:return"LOADED";case 1:return"UNSTARTED";case 2:return"BUFFERING";case 3:return"PLAYING";case 4:return"PAUSED";case 5:return"ENDED";}
-return"UNKOWN";}
-function actionAllowed(eventName){var ret=$f.fireEvent(self.id(),"onBefore"+eventName,activeIndex);return ret!==false;}
-function stopEvent(e){e.stopPropagation();e.preventDefault();return false;}
-function setState(state,force){if(currentState==STATE_UNLOADED&&!force)
-return;previousState=currentState;currentState=state;stopPlayTimeTracker();if(state==STATE_PLAYING)
-startPlayTimeTracker();log(stateDescription(state));}
-function resetState(){video.fp_stop();onStartFired=false;stopping=false;playAfterSeek=false;setState(STATE_UNSTARTED);setState(STATE_UNSTARTED);}
-var _playTimeTracker=null;function startPlayTimeTracker(){if(_playTimeTracker)
-return;console.log("starting tracker");_playTimeTracker=setInterval(onTimeTracked,100);onTimeTracked();}
-function stopPlayTimeTracker(){clearInterval(_playTimeTracker);_playTimeTracker=null;}
-function onTimeTracked(){var currentTime=Math.floor(video.fp_getTime()*10)*100;var duration=Math.floor(video.duration*10)*100;var fireTime=(new Date()).time;function fireCuePointsIfNeeded(time,cues){time=time>=0?time:duration-Math.abs(time);for(var i=0;i<cues.length;i++){if(cues[i].lastTimeFired>fireTime){cues[i].lastTimeFired=-1;}else if(cues[i].lastTimeFired+500>fireTime){continue;}else{if(time==currentTime||(currentTime-500<time&&currentTime>time)){cues[i].lastTimeFired=fireTime;$f.fireEvent(self.id(),'onCuepoint',activeIndex,cues[i].fnId,cues[i].parameters);}}}}
-$f.each(self.getCommonClip().cuepoints,fireCuePointsIfNeeded);$f.each(activePlaylist[activeIndex].cuepoints,fireCuePointsIfNeeded);}
-function replay(){resetState();playAfterSeek=true;video.fp_seek(0);}
-function scaleVideo(clip){}
-function addAPI(){console.log(video);function fixClip(clip){var extendedClip={};extend(extendedClip,clipDefaults);extend(extendedClip,self.getCommonClip());extend(extendedClip,clip);if(extendedClip.ipadUrl)
-url=decodeURIComponent(extendedClip.ipadUrl);else if(extendedClip.url)
-url=extendedClip.url;if(url&&url.indexOf('://')==-1&&extendedClip.ipadBaseUrl)
-url=extendedClip.ipadBaseUrl+'/'+url;else if(url&&url.indexOf('://')==-1&&extendedClip.baseUrl)
-url=extendedClip.baseUrl+'/'+url;extendedClip.originalUrl=extendedClip.url;extendedClip.completeUrl=url;extendedClip.extension=extendedClip.completeUrl.substr(extendedClip.completeUrl.lastIndexOf('.'));var queryIndex=extendedClip.extension.indexOf('?');if(queryIndex>-1)
-extendedClip.extension=extendedClip.extension.substr(0,queryIndex);extendedClip.type='video';delete extendedClip.index;log("fixed clip",extendedClip);return extendedClip;}
-video.fp_play=function(clip,inStream,forcePlay,poster){var url=null;var autoBuffering=true;var autoPlay=true;log("Calling play() "+clip,clip);if(inStream){log("ERROR: inStream clips not yet supported");return;}
-if(clip!==undefined){if(typeof clip=="number"){if(activeIndex>=activePlaylist.length)
-return;activeIndex=clip;clip=activePlaylist[activeIndex];}else{if(typeof clip=="string"){clip={url:clip};}
-video.fp_setPlaylist(clip.length!==undefined?clip:[clip]);}
-if(activeIndex==0&&activePlaylist.length>1&&posterExtensions.test(activePlaylist[activeIndex].extension)){var poster=activePlaylist[activeIndex].url;console.log("Poster image available with url "+poster);++activeIndex;console.log("Not last clip in the playlist, moving to next one");video.fp_play(activeIndex,false,true,poster);return;}
-if(validExtensions&&!validExtensions.test(activePlaylist[activeIndex].extension)){return;}
-clip=activePlaylist[activeIndex];url=clip.completeUrl;if(clip.autoBuffering!==undefined&&clip.autoBuffering===false)
-autoBuffering=false;if(clip.autoPlay===undefined||clip.autoPlay===true||forcePlay===true){autoBuffering=true;autoPlay=true;}else{autoPlay=false;}}else{log("clip was not given, simply calling video.play, if not already buffering");if(currentState!=STATE_BUFFERING){video.play();}
-return;}
-log("about to play "+url,autoBuffering,autoPlay);resetState();if(url){log("Changing SRC attribute"+url);video.setAttribute('src',url);}
-if(autoBuffering){if(!actionAllowed('Begin'))
-return false;if(poster){autoPlay=clip.autoPlay;video.setAttribute('poster',poster);video.setAttribute('preload',"none");}
-$f.fireEvent(self.id(),'onBegin',activeIndex);log("calling video.load()");video.load();}
-if(autoPlay){log("calling video.play()");video.play();}}
-video.fp_pause=function(){log("pause called");if(!actionAllowed('Pause'))
-return false;video.pause();};video.fp_resume=function(){log("resume called");if(!actionAllowed('Resume'))
-return false;video.play();};video.fp_stop=function(){log("stop called");if(!actionAllowed('Stop'))
-return false;stopping=true;video.pause();try{video.currentTime=0;}catch(ignored){}};video.fp_seek=function(position){log("seek called "+position);if(!actionAllowed('Seek'))
-return false;var seconds=0;var position=position+"";if(position.charAt(position.length-1)=='%'){var percentage=parseInt(position.substr(0,position.length-1))/100;var duration=video.duration;seconds=duration*percentage;}else{seconds=position;}
-try{video.currentTime=seconds;}catch(e){log("Wrong seek time");}};video.fp_getTime=function(){return video.currentTime;};video.fp_mute=function(){log("mute called");if(!actionAllowed('Mute'))
-return false;currentVolume=video.volume;video.volume=0;};video.fp_unmute=function(){if(!actionAllowed('Unmute'))
-return false;video.volume=currentVolume;};video.fp_getVolume=function(){return video.volume*100;};video.fp_setVolume=function(volume){if(!actionAllowed('Volume'))
-return false;video.volume=volume/100;};video.fp_toggle=function(){log('toggle called');if(self.getState()==STATE_ENDED){replay();return;}
-if(video.paused)
-video.fp_play();else
-video.fp_pause();};video.fp_isPaused=function(){return video.paused;};video.fp_isPlaying=function(){return!video.paused;};video.fp_getPlugin=function(name){if(name=='canvas'||name=='controls'){var config=self.getConfig();return config['plugins']&&config['plugins'][name]?config['plugins'][name]:null;}
-log("ERROR: no support for "+name+" plugin on iDevices");return null;};video.fp_close=function(){setState(STATE_UNLOADED);video.parentNode.removeChild(video);video=null;};video.fp_getStatus=function(){var bufferStart=0;var bufferEnd=0;try{bufferStart=video.buffered.start();bufferEnd=video.buffered.end();}catch(ignored){}
-return{bufferStart:bufferStart,bufferEnd:bufferEnd,state:currentState,time:video.fp_getTime(),muted:video.muted,volume:video.fp_getVolume()};};video.fp_getState=function(){return currentState;};video.fp_startBuffering=function(){if(currentState==STATE_UNSTARTED)
-video.load();};video.fp_setPlaylist=function(playlist){log("Setting playlist");activeIndex=0;for(var i=0;i<playlist.length;i++)
-playlist[i]=fixClip(playlist[i]);activePlaylist=playlist;$f.fireEvent(self.id(),'onPlaylistReplace',playlist);};video.fp_addClip=function(clip,index){clip=fixClip(clip);activePlaylist.splice(index,0,clip);$f.fireEvent(self.id(),'onClipAdd',clip,index);};video.fp_updateClip=function(clip,index){extend(activePlaylist[index],clip);return activePlaylist[index];};video.fp_getVersion=function(){return'3.2.3';}
-video.fp_isFullscreen=function(){var isfullscreen=video.webkitDisplayingFullscreen;if(isfullscreen!==undefined)
-return isfullscreen;return false;}
-video.fp_toggleFullscreen=function(){if(video.fp_isFullscreen())
-video.webkitExitFullscreen();else
-video.webkitEnterFullscreen();}
-video.fp_addCuepoints=function(points,index,fnId){var clip=index==-1?self.getCommonClip():activePlaylist[index];clip.cuepoints=clip.cuepoints||{};points=points instanceof Array?points:[points];for(var i=0;i<points.length;i++){var time=typeof points[i]=="object"?(points[i]['time']||null):points[i];if(time==null)continue;time=Math.floor(time/100)*100;var parameters=time;if(typeof points[i]=="object"){parameters=extend({},points[i],false);if(parameters['time']===undefined)delete parameters['time'];if(parameters['parameters']!==undefined){extend(parameters,parameters['parameters'],false);delete parameters['parameters'];}}
-clip.cuepoints[time]=clip.cuepoints[time]||[];clip.cuepoints[time].push({fnId:fnId,lastTimeFired:-1,parameters:parameters});}}
-$f.each(("toggleFullscreen,stopBuffering,reset,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled,css,animate,showPlugin,hidePlugin,togglePlugin,fadeTo,invoke,loadPlugin").split(","),function(){var name=this;video["fp_"+name]=function(){log("ERROR: unsupported API on iDevices "+name);return false;};});}
-function addListeners(){var events=['abort','canplay','canplaythrough','durationchange','emptied','ended','error','loadeddata','loadedmetadata','loadstart','pause','play','playing','progress','ratechange','seeked','seeking','stalled','suspend','volumechange','waiting'];var eventsLogger=function(e){log("Got event "+e.type,e);}
-for(var i=0;i<events.length;i++)
-video.addEventListener(events[i],eventsLogger,false);var onBufferEmpty=function(e){log("got onBufferEmpty event "+e.type)
-setState(STATE_BUFFERING);$f.fireEvent(self.id(),'onBufferEmpty',activeIndex);};video.addEventListener('emptied',onBufferEmpty,false);video.addEventListener('waiting',onBufferEmpty,false);var onBufferFull=function(e){if(previousState==STATE_UNSTARTED||previousState==STATE_BUFFERING){}else{log("Restoring old state "+stateDescription(previousState));setState(previousState);}
-$f.fireEvent(self.id(),'onBufferFull',activeIndex);};video.addEventListener('canplay',onBufferFull,false);video.addEventListener('canplaythrough',onBufferFull,false);var onMetaData=function(e){var clipDuration;startTime=activePlaylist[activeIndex].start;if(activePlaylist[activeIndex].duration>0){clipDuration=activePlaylist[activeIndex].duration;endTime=clipDuration+startTime;}else{clipDuration=video.duration;endTime=null;}
-video.fp_updateClip({duration:clipDuration,metaData:{duration:video.duration}},activeIndex);activePlaylist[activeIndex].duration=video.duration;activePlaylist[activeIndex].metaData={duration:video.duration};$f.fireEvent(self.id(),'onMetaData',activeIndex,activePlaylist[activeIndex]);};video.addEventListener('loadedmetadata',onMetaData,false);video.addEventListener('durationchange',onMetaData,false);var onTimeUpdate=function(e){if(endTime&&video.currentTime>endTime){video.fp_seek(startTime);resetState();return stopEvent(e);}};video.addEventListener("timeupdate",onTimeUpdate,false);var onStart=function(e){if(currentState==STATE_PAUSED){if(!actionAllowed('Resume')){log("Resume disallowed, pausing");video.fp_pause();return stopEvent(e);}
-$f.fireEvent(self.id(),'onResume',activeIndex);}
-setState(STATE_PLAYING);if(!onStartFired){onStartFired=true;$f.fireEvent(self.id(),'onStart',activeIndex);}};video.addEventListener('playing',onStart,false);var onPlay=function(e){startLastSecondTimer();}
-video.addEventListener('play',onPlay,false);var onFinish=function(e){if(!actionAllowed('Finish')){if(activePlaylist.length==1){log("Active playlist only has one clip, onBeforeFinish returned false. Replaying");replay();}else if(activeIndex!=(activePlaylist.length-1)){log("Not the last clip in the playlist, but onBeforeFinish returned false. Returning to the beginning of current clip");video.fp_seek(0);}else{log("Last clip in playlist, but onBeforeFinish returned false, start again from the beginning");video.fp_play(0);}
-return stopEvent(e);}
-setState(STATE_ENDED);$f.fireEvent(self.id(),'onFinish',activeIndex);if(activePlaylist.length>1&&activeIndex<(activePlaylist.length-1)){log("Not last clip in the playlist, moving to next one");video.fp_play(++activeIndex,false,true);}};video.addEventListener('ended',onFinish,false);var onError=function(e){setState(STATE_LOADED,true);$f.fireEvent(self.id(),'onError',activeIndex,201);if(opts.onFail&&opts.onFail instanceof Function)
-opts.onFail.apply(self,[]);};video.addEventListener('error',onError,false);var onPause=function(e){log("got pause event from player"+self.id());if(stopping)
-return;if(currentState==STATE_BUFFERING&&previousState==STATE_UNSTARTED){log("forcing play");setTimeout(function(){video.play();},0);return;}
-if(!actionAllowed('Pause')){video.fp_resume();return stopEvent(e);}
-stopLastSecondTimer();setState(STATE_PAUSED);$f.fireEvent(self.id(),'onPause',activeIndex);}
-video.addEventListener('pause',onPause,false);var onSeek=function(e){$f.fireEvent(self.id(),'onBeforeSeek',activeIndex);};video.addEventListener('seeking',onSeek,false);var onSeekDone=function(e){if(stopping){stopping=false;$f.fireEvent(self.id(),'onStop',activeIndex);}
-else
-$f.fireEvent(self.id(),'onSeek',activeIndex);log("seek done, currentState",stateDescription(currentState));if(playAfterSeek){playAfterSeek=false;video.fp_play();}else if(currentState!=STATE_PLAYING)
-video.fp_pause();};video.addEventListener('seeked',onSeekDone,false);var onVolumeChange=function(e){$f.fireEvent(self.id(),'onVolume',video.fp_getVolume());};video.addEventListener('volumechange',onVolumeChange,false);}
-function startLastSecondTimer(){lastSecondTimer=setInterval(function(){if(video.fp_getTime()>=video.duration-1){$f.fireEvent(self.id(),'onLastSecond',activeIndex);stopLastSecondTimer();}},100);}
-function stopLastSecondTimer(){clearInterval(lastSecondTimer);}
-function onPlayerLoaded(){video.fp_play(0);}
-function installControlbar(){}
-if(isiDevice||opts.simulateiDevice){if(!window.flashembed.__replaced){var realFlashembed=window.flashembed;window.flashembed=function(root,opts,conf){if(typeof root=='string'){root=document.getElementById(root.replace("#",""));}
-if(!root){return;}
-var style=window.getComputedStyle(root,null);var width=parseInt(style.width);var height=parseInt(style.height);while(root.firstChild)
-root.removeChild(root.firstChild);var container=document.createElement('div');var api=document.createElement('video');container.appendChild(api);root.appendChild(container);container.style.height=height+'px';container.style.width=width+'px';container.style.display='block';container.style.position='relative';container.style.background='-webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.7)))';container.style.cursor='default';container.style.webkitUserDrag='none';api.style.height='100%';api.style.width='100%';api.style.display='block';api.id=opts.id;api.name=opts.id;api.style.cursor='pointer';api.style.webkitUserDrag='none';api.type="video/mp4";api.playerConfig=conf.config;$f.fireEvent(conf.config.playerId,'onLoad','player');};flashembed.getVersion=realFlashembed.getVersion;flashembed.asString=realFlashembed.asString;flashembed.isSupported=function(){return true;}
-flashembed.__replaced=true;}
-var __fireEvent=self._fireEvent;self._fireEvent=function(a){if(a[0]=='onLoad'&&a[1]=='player'){video=self.getParent().querySelector('video');if(opts.controls)
-video.controls="controls";addAPI();addListeners();setState(STATE_LOADED,true);video.fp_setPlaylist(video.playerConfig.playlist);onPlayerLoaded();__fireEvent.apply(self,[a]);}
-var shouldFireEvent=currentState!=STATE_UNLOADED;if(currentState==STATE_UNLOADED&&typeof a=='string')
-shouldFireEvent=true;if(shouldFireEvent)
-return __fireEvent.apply(self,[a]);}
-self._swfHeight=function(){return parseInt(video.style.height);}
-self.hasiPadSupport=function(){return true;}}
-return self;}); \ No newline at end of file
+/*!
+ * flowplayer.js 3.2.12. The Flowplayer API
+ *
+ * Copyright 2009-2011 Flowplayer Oy
+ *
+ * This file is part of Flowplayer.
+ *
+ * Flowplayer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Flowplayer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Flowplayer. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Date: 2013-03-04
+ * Revision: 3.2.12, patched for use with Gallery 3
+ */
+!function(){function m(a){if(!a||"object"!=typeof a)return a;var e=new a.constructor,d;for(d in a)a.hasOwnProperty(d)&&(e[d]=m(a[d]));return e}function l(a,e){if(a){var d,f=0,b=a.length;if(void 0===b)for(d in a){if(!1===e.call(a[d],d,a[d]))break}else for(d=a[0];f<b&&!1!==e.call(d,f,d);d=a[++f]);return a}}function h(a,e,d){if("object"!=typeof e)return a;a&&e&&l(e,function(f,e){if(!d||"function"!=typeof e)a[f]=e});return a}function E(a){a=a||window.event;a.preventDefault?(a.stopPropagation(),a.preventDefault()):
+(a.returnValue=!1,a.cancelBubble=!0);return!1}function p(a,e,d){a[e]=a[e]||[];a[e].push(d)}function F(a){return a.replace(/&amp;/g,"%26").replace(/&/g,"%26").replace(/=/g,"%3D")}function s(){return"_"+(""+Math.random()).slice(2,10)}function r(a,e,d){var f=this,j=null,g=!1,k,C,n=[],A={},u={},q,r,t,c,y,J;h(f,{id:function(){return q},isLoaded:function(){return null!==j&&void 0!==j.fp_play&&!g},getParent:function(){return a},hide:function(B){B&&(a.style.height="0px");f.isLoaded()&&(j.style.height="0px");
+return f},show:function(){a.style.height=J+"px";f.isLoaded()&&(j.style.height=y+"px");return f},isHidden:function(){return f.isLoaded()&&0===parseInt(j.style.height,10)},load:function(B){if(!f.isLoaded()&&!1!==f._fireEvent("onBeforeLoad")){var c=0;l(b,function(){this.unload(function(){++c==b.length&&(k&&!flashembed.isSupported(e.version)&&(a.innerHTML=""),B&&(B.cached=!0,p(u,"onLoad",B)),flashembed(a,e,{config:d}))})})}return f},unload:function(B){if(""!==k.replace(/\s/g,"")){if(!1===f._fireEvent("onBeforeUnload"))return B&&
+B(!1),f;g=!0;try{j&&(j.fp_isFullscreen()&&j.fp_toggleFullscreen(),j.fp_close(),f._fireEvent("onUnload"))}catch(c){}var d=function(){j=null;a.innerHTML=k;g=!1;B&&B(!0)};/WebKit/i.test(navigator.userAgent)&&!/Chrome/i.test(navigator.userAgent)?setTimeout(d,0):d()}else B&&B(!1);return f},getClip:function(a){void 0===a&&(a=c);return n[a]},getCommonClip:function(){return C},getPlaylist:function(){return n},getPlugin:function(a){var c=A[a];if(!c&&f.isLoaded()){var d=f._api().fp_getPlugin(a);d&&(c=new z(a,
+d,f),A[a]=c)}return c},getScreen:function(){return f.getPlugin("screen")},getControls:function(){return f.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return f.getPlugin("logo")._fireEvent("onUpdate")}catch(a){}},getPlay:function(){return f.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(a){return a?m(d):d},getFlashParams:function(){return e},loadPlugin:function(a,c,d,e){"function"==typeof d&&(e=d,d={});var b=e?s():"_";f._api().fp_loadPlugin(a,c,d,b);c={};c[b]=
+e;e=new z(a,null,f,c);return A[a]=e},getState:function(){return f.isLoaded()?j.fp_getState():-1},play:function(a,c){var d=function(){void 0!==a?f._api().fp_play(a,c):f._api().fp_play()};f.isLoaded()?d():g?setTimeout(function(){f.play(a,c)},50):f.load(function(){d()});return f},getVersion:function(){if(f.isLoaded()){var a=j.fp_getVersion();a.push("flowplayer.js 3.2.12");return a}return"flowplayer.js 3.2.12"},_api:function(){if(!f.isLoaded())throw"Flowplayer "+f.id()+" not loaded when calling an API method";
+return j},setClip:function(c){l(c,function(d,f){if("function"==typeof f)p(u,d,f),delete c[d];else if("onCuepoint"==d)$f(a).getCommonClip().onCuepoint(c[d][0],c[d][1])});f.setPlaylist([c]);return f},getIndex:function(){return t},bufferAnimate:function(a){j.fp_bufferAnimate(void 0===a||a);return f},_swfHeight:function(){return j.clientHeight}});l("Click* Load* Unload* Keypress* Volume* Mute* Unmute* PlaylistReplace ClipAdd Fullscreen* FullscreenExit Error MouseOver MouseOut".split(" "),function(){var a=
+"on"+this;if(-1!=a.indexOf("*")){var a=a.slice(0,a.length-1),c="onBefore"+a.slice(2);f[c]=function(a){p(u,c,a);return f}}f[a]=function(c){p(u,a,c);return f}});l("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 a=this;f[a]=function(c,d){if(!f.isLoaded())return f;var e=
+null,e=void 0!==c&&void 0!==d?j["fp_"+a](c,d):void 0===c?j["fp_"+a]():j["fp_"+a](c);return"undefined"===e||void 0===e?f:e}});f._fireEvent=function(a){"string"==typeof a&&(a=[a]);var e=a[0],b=a[1],g=a[2],h=a[3],x=0;d.debug&&console.log("$f.fireEvent",[].slice.call(a));!f.isLoaded()&&("onLoad"==e&&"player"==b)&&(j=j||document.getElementById(r),y=f._swfHeight(),l(n,function(){this._fireEvent("onLoad")}),l(A,function(a,c){c._fireEvent("onUpdate")}),C._fireEvent("onLoad"));if(!("onLoad"==e&&"player"!=
+b)){if("onError"==e&&("string"==typeof b||"number"==typeof b&&"number"==typeof g))b=g,g=h;if("onContextMenu"==e)l(d.contextMenu[b],function(a,c){c.call(f)});else if("onPluginEvent"==e||"onBeforePluginEvent"==e){if(h=A[b.name||b])return h._fireEvent("onUpdate",b),h._fireEvent(g,a.slice(3))}else{if("onPlaylistReplace"==e){n=[];var D=0;l(b,function(){n.push(new v(this,D++,f))})}if("onClipAdd"==e){if(b.isInStream)return;b=new v(b,g,f);n.splice(g,0,b);for(x=g+1;x<n.length;x++)n[x].index++}var k=!0;if("number"==
+typeof b&&b<n.length&&(c=b,(a=n[b])&&(k=a._fireEvent(e,g,h)),!a||!1!==k))k=C._fireEvent(e,g,h,a);l(u[e],function(){k=this.call(f,b,g);this.cached&&u[e].splice(x,1);if(!1===k)return!1;x++});return k}}};if("string"==typeof a){var K=document.getElementById(a);if(!K)throw"Flowplayer cannot access element: "+a;a=K}var G=function(a){if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(n[0].url)&&(!f.hasiPadSupport||!f.hasiPadSupport()))return!0;!f.isLoaded()&&!1!==f._fireEvent("onBeforeClick")&&
+f.load();return E(a)};$f(a)?($f(a).getParent().innerHTML="",t=$f(a).getIndex(),b[t]=f):(b.push(f),t=b.length-1);J=parseInt(a.style.height,10)||a.clientHeight;q=a.id||"fp"+s();r=e.id||q+"_api";e.id=r;k=a.innerHTML;"string"==typeof d&&(d={clip:{url:d}});d.playerId=q;d.clip=d.clip||{};a.getAttribute("href",2)&&!d.clip.url&&(d.clip.url=a.getAttribute("href",2));d.clip.url&&(d.clip.url=F(d.clip.url));C=new v(d.clip,-1,f);d.playlist=d.playlist||[d.clip];var I=0;l(d.playlist,function(){var a=this;"object"==
+typeof a&&a.length&&(a={url:""+a});a.url&&(a.url=F(a.url));l(d.clip,function(c,d){void 0!==d&&(void 0===a[c]&&"function"!=typeof d)&&(a[c]=d)});d.playlist[I]=a;a=new v(a,I,f);n.push(a);I++});l(d,function(a,c){if("function"==typeof c){if(C[a])C[a](c);else p(u,a,c);delete d[a]}});l(d.plugins,function(a,c){c&&(A[a]=new z(a,c,f))});if(!d.plugins||void 0===d.plugins.controls)A.controls=new z("controls",null,f);A.canvas=new z("canvas",null,f);k=a.innerHTML;setTimeout(function(){""!==k.replace(/\s/g,"")?
+a.addEventListener?a.addEventListener("click",G,!1):a.attachEvent&&a.attachEvent("onclick",G):(a.addEventListener&&(!f.hasiPadSupport||!f.hasiPadSupport())&&a.addEventListener("click",E,!1),f.load())},0)}function t(a){this.length=a.length;this.each=function(d){l(a,d)};this.size=function(){return a.length};var e=this;for(name in r.prototype)e[name]=function(){var a=arguments;e.each(function(){this[name].apply(this,a)})}}var v=function(a,e,d){var f=this,b={},g={};f.index=e;"string"==typeof a&&(a={url:a});
+h(this,a,!0);l("Begin* Start Pause* Resume* Seek* Stop* Finish* LastSecond Update BufferFull BufferEmpty BufferStop".split(" "),function(){var a="on"+this;if(-1!=a.indexOf("*")){var a=a.slice(0,a.length-1),b="onBefore"+a.slice(2);f[b]=function(a){p(g,b,a);return f}}f[a]=function(d){p(g,a,d);return f};-1==e&&(f[b]&&(d[b]=f[b]),f[a]&&(d[a]=f[a]))});h(this,{onCuepoint:function(a,g){if(1==arguments.length)return b.embedded=[null,a],f;"number"==typeof a&&(a=[a]);var h=s();b[h]=[a,g];d.isLoaded()&&d._api().fp_addCuepoints(a,
+e,h);return f},update:function(a){h(f,a);d.isLoaded()&&d._api().fp_updateClip(a,e);var b=d.getConfig();h(-1==e?b.clip:b.playlist[e],a,!0)},_fireEvent:function(a,n,k,u){if("onLoad"==a)return l(b,function(a,c){c[0]&&d._api().fp_addCuepoints(c[0],e,a)}),!1;u=u||f;if("onCuepoint"==a){var q=b[n];if(q)return q[1].call(d,u,k)}n&&-1!="onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(a)&&(h(u,n),n.metaData&&(u.duration?u.fullDuration=n.metaData.duration:u.duration=n.metaData.duration));var m=!0;
+l(g[a],function(){m=this.call(d,u,n,k)});return m}});if(a.onCuepoint){var k=a.onCuepoint;f.onCuepoint.apply(f,"function"==typeof k?[k]:k);delete a.onCuepoint}l(a,function(d,b){"function"==typeof b&&(p(g,d,b),delete a[d])});-1==e&&(d.onCuepoint=this.onCuepoint)},z=function(a,b,d,f){var j=this,g={},k=!1;f&&h(g,f);l(b,function(a,d){"function"==typeof d&&(g[a]=d,delete b[a])});h(this,{animate:function(f,h,k){if(!f)return j;"function"==typeof h&&(k=h,h=500);if("string"==typeof f){var l=f;f={};f[l]=h;h=
+500}if(k){var q=s();g[q]=k}void 0===h&&(h=500);b=d._api().fp_animate(a,f,h,q);return j},css:function(f,g){if(void 0!==g){var k={};k[f]=g;f=k}b=d._api().fp_css(a,f);h(j,b);return j},show:function(){this.display="block";d._api().fp_showPlugin(a);return j},hide:function(){this.display="none";d._api().fp_hidePlugin(a);return j},toggle:function(){this.display=d._api().fp_togglePlugin(a);return j},fadeTo:function(b,f,e){"function"==typeof f&&(e=f,f=500);if(e){var h=s();g[h]=e}this.display=d._api().fp_fadeTo(a,
+b,f,h);this.opacity=b;return j},fadeIn:function(a,d){return j.fadeTo(1,a,d)},fadeOut:function(a,d){return j.fadeTo(0,a,d)},getName:function(){return a},getPlayer:function(){return d},_fireEvent:function(b,f){if("onUpdate"==b){var e=d._api().fp_getPlugin(a);if(!e)return;h(j,e);delete j.methods;k||(l(e.methods,function(){var b=""+this;j[b]=function(){var f=[].slice.call(arguments),f=d._api().fp_invoke(a,b,f);return"undefined"===f||void 0===f?j:f}}),k=!0)}return(e=g[b])?(e=e.apply(j,f),"_"==b.slice(0,
+1)&&delete g[b],e):j}})},b=[];window.flowplayer=window.$f=function(){var a=null,e=arguments[0];if(!arguments.length)return l(b,function(){if(this.isLoaded())return a=this,!1}),a||b[0];if(1==arguments.length){if("number"==typeof e)return b[e];if("*"==e)return new t(b);l(b,function(){if(this.id()==e.id||this.id()==e||this.getParent()==e)return a=this,!1});return a}if(1<arguments.length){var d=arguments[1],f=3==arguments.length?arguments[2]:{};"string"==typeof d&&(d={src:d});d=h({bgcolor:"#000000",version:[10,
+1],expressInstall:"http://releases.flowplayer.org/swf/expressinstall.swf",cachebusting:!1},d);if("string"==typeof e){if(-1!=e.indexOf(".")){var j=[],g;g=e.indexOf(".");if(-1!=g){var k=e.slice(0,g)||"*",p=e.slice(g+1,e.length),n=[];l(document.getElementsByTagName(k),function(){this.className&&-1!=this.className.indexOf(p)&&n.push(this)});g=n}else g=void 0;l(g,function(){j.push(new r(this,m(d),m(f)))});return new t(j)}g=document.getElementById(e);return new r(null!==g?g:m(e),m(d),m(f))}if(e)return new r(e,
+m(d),m(f))}return null};h(window.$f,{fireEvent:function(){var a=[].slice.call(arguments),b=$f(a[0]);return b?b._fireEvent(a.slice(1)):null},addPlugin:function(a,b){r.prototype[a]=b;return $f},each:l,extend:h});"function"==typeof jQuery&&(jQuery.fn.flowplayer=function(a,b){if(!arguments.length||"number"==typeof arguments[0]){var d=[];this.each(function(){var a=$f(this);a&&d.push(a)});return arguments.length?d[arguments[0]]:new t(d)}return this.each(function(){$f(this,m(a),b?m(b):{})})})}();
+!function(){function m(b,a){if(a)for(var e in a)a.hasOwnProperty(e)&&(b[e]=a[e]);return b}function l(b,a,e){if(r.isSupported(a.version))b.innerHTML=r.getHTML(a,e);else if(a.expressInstall&&r.isSupported([6,65]))b.innerHTML=r.getHTML(m(a,{src:a.expressInstall}),{MMredirectURL:encodeURIComponent(location.href),MMplayerType:"PlugIn",MMdoctitle:document.title});else{if(!b.innerHTML.replace(/\s/g,"")&&(b.innerHTML="<h2>Flash version "+a.version+" or greater is required</h2><h3>"+(0<t[0]?"Your version is "+
+t:"You have no flash plugin installed")+"</h3>"+("A"==b.tagName?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+E+"'>here</a></p>"),"A"==b.tagName||"DIV"==b.tagName))b.onclick=function(){location.href=E};if(a.onFail){var d=a.onFail.call(this);"string"==typeof d&&(b.innerHTML=d)}}h&&(window[a.id]=document.getElementById(a.id));m(this,{getRoot:function(){return b},getOptions:function(){return a},getConf:function(){return e},getApi:function(){return b.firstChild}})}
+var h=document.all,E="http://get.adobe.com/flashplayer",p="function"==typeof jQuery,F=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,s={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};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}});window.flashembed=function(b,a,e){"string"==typeof b&&
+(b=document.getElementById(b.replace("#","")));if(b)return"string"==typeof a&&(a={src:a}),new l(b,m(m({},s),a),e)};var r=m(window.flashembed,{conf:s,getVersion:function(){var b,a;try{a=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(e){try{a=(b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"))&&b.GetVariable("$version")}catch(d){try{a=(b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"))&&b.GetVariable("$version")}catch(f){}}}return(a=F.exec(a))?[1*a[1],1*a[9<1*a[1]?2:3]]:
+[0,0]},asString:function(b){if(null===b||void 0===b)return null;var a=typeof b;"object"==a&&b.push&&(a="array");switch(a){case "string":return v.lastIndex=0,v.test(b)?'"'+b.replace(v,function(a){var b=z[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+b+'"';case "array":var e=[],d;for(d in b)b.hasOwnProperty(d)&&(e[d]=r.asString(b[d]));return"["+e.join(",")+"]";case "function":return'"function()"';case "object":d=[];for(e in b)b.hasOwnProperty(e)&&d.push('"'+
+e+'":'+r.asString(b[e]));return"{"+d.join(",")+"}"}return String(b).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(b,a){b=m({},b);var e='<object width="'+b.width+'" height="'+b.height+'" id="'+b.id+'" name="'+b.id+'"';b.cachebusting&&(b.src+=(-1!=b.src.indexOf("?")?"&":"?")+Math.random());e=b.w3c||!h?e+(' data="'+b.src+'" type="application/x-shockwave-flash"'):e+' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';e+=">";if(b.w3c||h)e+='<param name="movie" value="'+b.src+'" />';b.width=
+b.height=b.id=b.w3c=b.src=null;b.onFail=b.version=b.expressInstall=null;for(var d in b)b[d]&&(e+='<param name="'+d+'" value="'+b[d]+'" />');d="";if(a){for(var f in a)if(a[f]){var j=a[f];d+=encodeURIComponent(f)+"="+encodeURIComponent(/function|object/.test(typeof j)?r.asString(j):j)+"&"}d=d.slice(0,-1);e+='<param name="flashvars" value="'+d+'" />'}return e+"</object>"},isSupported:function(b){return t[0]>b[0]||t[0]==b[0]&&t[1]>=b[1]}}),t=r.getVersion(),v=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+z={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};p&&(jQuery.tools=jQuery.tools||{version:"@VERSION"},jQuery.tools.flashembed={conf:s},jQuery.fn.flashembed=function(b,a){return this.each(function(){$(this).data("flashembed",flashembed(this,b,a))})})}();
+$f.addPlugin("ipad",function(m){function l(a,c,b){if(c)for(key in c)if(key&&(!c[key]||"function"!=typeof c[key]||b))if(c[key]&&"object"==typeof c[key]&&void 0===c[key].length){var d={};l(d,c[key]);a[key]=d}else a[key]=c[key];return a}function h(){if(y.debug)if(M){var a=[].splice.call(arguments,0).join(", ");console.log.apply(console,[a])}else console.log.apply(console,arguments)}function E(a){switch(a){case -1:return"UNLOADED";case 0:return"LOADED";case 1:return"UNSTARTED";case 2:return"BUFFERING";
+case 3:return"PLAYING";case 4:return"PAUSED";case 5:return"ENDED"}return"UNKOWN"}function p(c){return!1!==$f.fireEvent(a.id(),"onBefore"+c,g)}function F(a){a.stopPropagation();a.preventDefault();return!1}function s(a,c){if(q!=v||c)H=q,q=a,clearInterval(G),G=null,a==b&&(G||(console.log("starting tracker"),G=setInterval(t,100),t())),h(E(a))}function r(){c.fp_stop();j=f=d=!1;s(z);s(z)}function t(){function b(c,x){c=0<=c?c:f-Math.abs(c);for(var D=0;D<x.length;D++)if(x[D].lastTimeFired>e)x[D].lastTimeFired=
+-1;else if(!(x[D].lastTimeFired+500>e)&&(c==d||d-500<c&&d>c))x[D].lastTimeFired=e,$f.fireEvent(a.id(),"onCuepoint",g,x[D].fnId,x[D].parameters)}var d=100*Math.floor(10*c.fp_getTime()),f=100*Math.floor(10*c.duration),e=(new Date).time;$f.each(a.getCommonClip().cuepoints,b);$f.each(k[g].cuepoints,b)}var v=-1,z=1,b=3,a=this,e=1,d=!1,f=!1,j=!1,g=0,k=[],C,n=null,A=0,u={accelerated:!1,autoBuffering:!1,autoPlay:!0,baseUrl:null,bufferLength:3,connectionProvider:null,cuepointMultiplier:1E3,cuepoints:[],controls:{},
+duration:0,extension:"",fadeInSpeed:1E3,fadeOutSpeed:1E3,image:!1,linkUrl:null,linkWindow:"_self",live:!1,metaData:{},originalUrl:null,position:0,playlist:[],provider:"http",scaling:"scale",seekableOnBegin:!1,start:0,url:null,urlResolvers:[]},q=v,H=v,M=/iPad|iPhone|iPod/i.test(navigator.userAgent),c=null,y={simulateiDevice:!1,controlsSizeRatio:1.5,controls:!0,debug:!1,validExtensions:"mov|m4v|mp4|avi|mp3|m4a|aac|m3u8|m3u|pls",posterExtensions:"png|jpg"};l(y,m);var J=y.validExtensions?RegExp("^.("+
+y.validExtensions+")$","i"):null,K=RegExp("^.("+y.posterExtensions+")$","i"),G=null;if(M||y.simulateiDevice){window.flashembed.__replaced||(m=window.flashembed,window.flashembed=function(a,c,b){"string"==typeof a&&(a=document.getElementById(a.replace("#","")));if(a){for(var d=window.getComputedStyle(a,null),f=parseInt(d.width),d=parseInt(d.height);a.firstChild;)a.removeChild(a.firstChild);var e=document.createElement("div"),g=document.createElement("video");e.appendChild(g);a.appendChild(e);e.style.height=
+d+"px";e.style.width=f+"px";e.style.display="block";e.style.position="relative";e.style.background="-webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.7)))";e.style.cursor="default";e.style.webkitUserDrag="none";g.style.height="100%";g.style.width="100%";g.style.display="block";g.id=c.id;g.name=c.id;g.style.cursor="pointer";g.style.webkitUserDrag="none";g.type="video/mp4";g.playerConfig=b.config;$f.fireEvent(b.config.playerId,"onLoad","player")}},flashembed.getVersion=
+m.getVersion,flashembed.asString=m.asString,flashembed.isSupported=function(){return!0},flashembed.__replaced=!0);var I=a._fireEvent;a._fireEvent=function(m){if("onLoad"==m[0]&&"player"==m[1]){c=a.getParent().querySelector("video");y.controls&&(c.controls="controls");var t=function(c){var b={};l(b,u);l(b,a.getCommonClip());l(b,c);b.ipadUrl?url=decodeURIComponent(b.ipadUrl):b.url&&(url=b.url);url&&-1==url.indexOf("://")&&b.ipadBaseUrl?url=b.ipadBaseUrl+"/"+url:url&&(-1==url.indexOf("://")&&b.baseUrl)&&
+(url=b.baseUrl+"/"+url);b.originalUrl=b.url;b.completeUrl=url;b.extension=b.completeUrl.substr(b.completeUrl.lastIndexOf("."));c=b.extension.indexOf("?");-1<c&&(b.extension=b.extension.substr(0,c));b.type="video";delete b.index;h("fixed clip",b);return b};console.log(c);c.fp_play=function(b,d,f,e){var j=null,l=!0,m=!0;h("Calling play() "+b,b);if(d)h("ERROR: inStream clips not yet supported");else if(void 0!==b){if("number"==typeof b){if(g>=k.length)return;g=b}else"string"==typeof b&&(b={url:b}),c.fp_setPlaylist(void 0!==
+b.length?b:[b]);if(0==g&&1<k.length&&K.test(k[g].extension))e=k[g].url,console.log("Poster image available with url "+e),++g,console.log("Not last clip in the playlist, moving to next one"),c.fp_play(g,!1,!0,e);else if(!J||J.test(k[g].extension)){b=k[g];j=b.completeUrl;void 0!==b.autoBuffering&&!1===b.autoBuffering&&(l=!1);m=void 0===b.autoPlay||!0===b.autoPlay||!0===f?l=!0:!1;h("about to play "+j,l,m);r();j&&(h("Changing SRC attribute"+j),c.setAttribute("src",j));if(l){if(!p("Begin"))return!1;e&&
+(m=b.autoPlay,c.setAttribute("poster",e),c.setAttribute("preload","none"));$f.fireEvent(a.id(),"onBegin",g);h("calling video.load()");c.load()}m&&(h("calling video.play()"),c.play())}}else h("clip was not given, simply calling video.play, if not already buffering"),2!=q&&c.play()};c.fp_pause=function(){h("pause called");if(!p("Pause"))return!1;c.pause()};c.fp_resume=function(){h("resume called");if(!p("Resume"))return!1;c.play()};c.fp_stop=function(){h("stop called");if(!p("Stop"))return!1;f=!0;c.pause();
+try{c.currentTime=0}catch(a){}};c.fp_seek=function(a){h("seek called "+a);if(!p("Seek"))return!1;var b=0;a+="";"%"==a.charAt(a.length-1)?(a=parseInt(a.substr(0,a.length-1))/100,b=c.duration*a):b=a;try{c.currentTime=b}catch(d){h("Wrong seek time")}};c.fp_getTime=function(){return c.currentTime};c.fp_mute=function(){h("mute called");if(!p("Mute"))return!1;e=c.volume;c.volume=0};c.fp_unmute=function(){if(!p("Unmute"))return!1;c.volume=e};c.fp_getVolume=function(){return 100*c.volume};c.fp_setVolume=
+function(a){if(!p("Volume"))return!1;c.volume=a/100};c.fp_toggle=function(){h("toggle called");5==a.getState()?(r(),j=!0,c.fp_seek(0)):c.paused?c.fp_play():c.fp_pause()};c.fp_isPaused=function(){return c.paused};c.fp_isPlaying=function(){return!c.paused};c.fp_getPlugin=function(b){if("canvas"==b||"controls"==b){var c=a.getConfig();return c.plugins&&c.plugins[b]?c.plugins[b]:null}h("ERROR: no support for "+b+" plugin on iDevices");return null};c.fp_close=function(){s(v);c.parentNode.removeChild(c);
+c=null};c.fp_getStatus=function(){var a=0,b=0;try{a=c.buffered.start(),b=c.buffered.end()}catch(d){}return{bufferStart:a,bufferEnd:b,state:q,time:c.fp_getTime(),muted:c.muted,volume:c.fp_getVolume()}};c.fp_getState=function(){return q};c.fp_startBuffering=function(){q==z&&c.load()};c.fp_setPlaylist=function(b){h("Setting playlist");for(var c=g=0;c<b.length;c++)b[c]=t(b[c]);k=b;$f.fireEvent(a.id(),"onPlaylistReplace",b)};c.fp_addClip=function(b,c){b=t(b);k.splice(c,0,b);$f.fireEvent(a.id(),"onClipAdd",
+b,c)};c.fp_updateClip=function(a,b){l(k[b],a);return k[b]};c.fp_getVersion=function(){return"3.2.3"};c.fp_isFullscreen=function(){var a=c.webkitDisplayingFullscreen;return void 0!==a?a:!1};c.fp_toggleFullscreen=function(){c.fp_isFullscreen()?c.webkitExitFullscreen():c.webkitEnterFullscreen()};c.fp_addCuepoints=function(b,c,d){c=-1==c?a.getCommonClip():k[c];c.cuepoints=c.cuepoints||{};b=b instanceof Array?b:[b];for(var e=0;e<b.length;e++){var f="object"==typeof b[e]?b[e].time||null:b[e];if(null!=f){var g=
+f=100*Math.floor(f/100);"object"==typeof b[e]&&(g=l({},b[e],!1),void 0===g.time&&delete g.time,void 0!==g.parameters&&(l(g,g.parameters,!1),delete g.parameters));c.cuepoints[f]=c.cuepoints[f]||[];c.cuepoints[f].push({fnId:d,lastTimeFired:-1,parameters:g})}}};$f.each("toggleFullscreen stopBuffering reset playFeed setKeyboardShortcutsEnabled isKeyboardShortcutsEnabled css animate showPlugin hidePlugin togglePlugin fadeTo invoke loadPlugin".split(" "),function(){var a=this;c["fp_"+a]=function(){h("ERROR: unsupported API on iDevices "+
+a);return!1}});for(var w="abort canplay canplaythrough durationchange emptied ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend volumechange waiting".split(" "),G=function(a){h("Got event "+a.type,a)},L=0;L<w.length;L++)c.addEventListener(w[L],G,!1);w=function(b){h("got onBufferEmpty event "+b.type);s(2);$f.fireEvent(a.id(),"onBufferEmpty",g)};c.addEventListener("emptied",w,!1);c.addEventListener("waiting",w,!1);w=function(){H==z||
+2==H||(h("Restoring old state "+E(H)),s(H));$f.fireEvent(a.id(),"onBufferFull",g)};c.addEventListener("canplay",w,!1);c.addEventListener("canplaythrough",w,!1);w=function(){var b;A=k[g].start;0<k[g].duration?(b=k[g].duration,n=b+A):(b=c.duration,n=null);c.fp_updateClip({duration:b,metaData:{duration:c.duration}},g);k[g].duration=c.duration;k[g].metaData={duration:c.duration};$f.fireEvent(a.id(),"onMetaData",g,k[g])};c.addEventListener("loadedmetadata",w,!1);c.addEventListener("durationchange",w,!1);
+c.addEventListener("timeupdate",function(a){if(n&&c.currentTime>n)return c.fp_seek(A),r(),F(a)},!1);c.addEventListener("playing",function(e){if(4==q){if(!p("Resume"))return h("Resume disallowed, pausing"),c.fp_pause(),F(e);$f.fireEvent(a.id(),"onResume",g)}s(b);d||(d=!0,$f.fireEvent(a.id(),"onStart",g))},!1);c.addEventListener("play",function(){C=setInterval(function(){c.fp_getTime()>=c.duration-1&&($f.fireEvent(a.id(),"onLastSecond",g),clearInterval(C))},100)},!1);c.addEventListener("ended",function(b){if(!p("Finish"))return 1==
+k.length?(h("Active playlist only has one clip, onBeforeFinish returned false. Replaying"),r(),j=!0,c.fp_seek(0)):g!=k.length-1?(h("Not the last clip in the playlist, but onBeforeFinish returned false. Returning to the beginning of current clip"),c.fp_seek(0)):(h("Last clip in playlist, but onBeforeFinish returned false, start again from the beginning"),c.fp_play(0)),F(b);s(5);$f.fireEvent(a.id(),"onFinish",g);1<k.length&&g<k.length-1&&(h("Not last clip in the playlist, moving to next one"),c.fp_play(++g,
+!1,!0))},!1);c.addEventListener("error",function(){s(0,!0);$f.fireEvent(a.id(),"onError",g,201);y.onFail&&y.onFail instanceof Function&&y.onFail.apply(a,[])},!1);c.addEventListener("pause",function(b){h("got pause event from player"+a.id());if(!f)if(2==q&&H==z)h("forcing play"),setTimeout(function(){c.play()},0);else{if(!p("Pause"))return c.fp_resume(),F(b);clearInterval(C);s(4);$f.fireEvent(a.id(),"onPause",g)}},!1);c.addEventListener("seeking",function(){$f.fireEvent(a.id(),"onBeforeSeek",g)},!1);
+c.addEventListener("seeked",function(){f?(f=!1,$f.fireEvent(a.id(),"onStop",g)):$f.fireEvent(a.id(),"onSeek",g);h("seek done, currentState",E(q));j?(j=!1,c.fp_play()):q!=b&&c.fp_pause()},!1);c.addEventListener("volumechange",function(){$f.fireEvent(a.id(),"onVolume",c.fp_getVolume())},!1);s(0,!0);c.fp_setPlaylist(c.playerConfig.playlist);c.fp_play(0);I.apply(a,[m])}w=q!=v;q==v&&"string"==typeof m&&(w=!0);if(w)return I.apply(a,[m])};a._swfHeight=function(){return parseInt(c.style.height)};a.hasiPadSupport=
+function(){return!0}}return a});