--- a/src/ldt/ldt/static/ldt/js/LdtPlayer.min.js Mon Feb 13 15:47:26 2012 +0100
+++ b/src/ldt/ldt/static/ldt/js/LdtPlayer.min.js Mon Feb 13 15:50:26 2012 +0100
@@ -16,147 +16,153 @@
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
-(function(a){function b(w,F){var I=/^\w+\:\/\//;if(/^\/\/\/?/.test(w))w=location.protocol+w;else if(!I.test(w)&&w.charAt(0)!="/")w=(F||"")+w;return I.test(w)?w:(w.charAt(0)=="/"?L:D)+w}function d(w,F){for(var I in w)if(w.hasOwnProperty(I))F[I]=w[I];return F}function h(w,F,I,N){w.onload=w.onreadystatechange=function(){if(!(w.readyState&&w.readyState!="complete"&&w.readyState!="loaded"||F[I])){w.onload=w.onreadystatechange=null;N()}}}function f(w){w.ready=w.finished=true;for(var F=0;F<w.finished_listeners.length;F++)w.finished_listeners[F]();
-w.ready_listeners=[];w.finished_listeners=[]}function l(w,F,I,N,V){setTimeout(function(){var c,e=F.real_src,j;if("item"in K){if(!K[0]){setTimeout(arguments.callee,25);return}K=K[0]}c=document.createElement("script");if(F.type)c.type=F.type;if(F.charset)c.charset=F.charset;if(V)if(g){w[m]&&G("start script preload: "+e);I.elem=c;if(v){c.preload=true;c.onpreload=N}else c.onreadystatechange=function(){c.readyState=="loaded"&&N()};c.src=e}else if(V&&e.indexOf(L)==0&&w[z]){j=new XMLHttpRequest;w[m]&&G("start script preload (xhr): "+
-e);j.onreadystatechange=function(){if(j.readyState==4){j.onreadystatechange=function(){};I.text=j.responseText+"\n//@ sourceURL="+e;N()}};j.open("GET",e);j.send()}else{w[m]&&G("start script preload (cache): "+e);c.type="text/cache-script";h(c,I,"ready",function(){K.removeChild(c);N()});c.src=e;K.insertBefore(c,K.firstChild)}else{if(B){w[m]&&G("start script load (ordered async): "+e);c.async=false}else w[m]&&G("start script load: "+e);h(c,I,"finished",N);c.src=e;K.insertBefore(c,K.firstChild)}},0)}
-function p(){function w(k,o,r){function A(){if(E!=null){E=null;f(r)}}var E;if(!e[o.src].finished){if(!k[s])e[o.src].finished=true;E=r.elem||document.createElement("script");if(o.type)E.type=o.type;if(o.charset)E.charset=o.charset;h(E,r,"finished",A);if(r.elem)r.elem=null;else if(r.text){E.onload=E.onreadystatechange=null;E.text=r.text}else E.src=o.real_src;K.insertBefore(E,K.firstChild);r.text&&A()}}function F(k,o,r,A){var E,O,S=function(){o.ready_cb(o,function(){w(k,o,E)})},U=function(){o.finished_cb(o,
-r)};o.src=b(o.src,k[x]);o.real_src=o.src+(k[q]?(/\?.*$/.test(o.src)?"&_":"?_")+~~(Math.random()*1E9)+"=":"");e[o.src]||(e[o.src]={items:[],finished:false});O=e[o.src].items;if(k[s]||O.length==0){E=O[O.length]={ready:false,finished:false,ready_listeners:[S],finished_listeners:[U]};l(k,o,E,A?function(){E.ready=true;for(var Q=0;Q<E.ready_listeners.length;Q++)E.ready_listeners[Q]();E.ready_listeners=[]}:function(){f(E)},A)}else{E=O[0];E.finished?U():E.finished_listeners.push(U)}}function I(){function k(M,
-J){E[m]&&G("script preload finished: "+M.real_src);M.ready=true;M.exec_trigger=J;r()}function o(M,J){E[m]&&G("script execution finished: "+M.real_src);M.ready=M.finished=true;M.exec_trigger=null;for(var R=0;R<J.scripts.length;R++)if(!J.scripts[R].finished)return;J.finished=true;r()}function r(){for(;S<O.length;)if(Object.prototype.toString.call(O[S])=="[object Function]"){E[m]&&G("$LAB.wait() executing: "+O[S]);try{O[S++]()}catch(M){E[m]&&y("$LAB.wait() error caught: ",M)}}else{if(!O[S].finished){for(var J=
-O[S],R=false,T=0;T<J.scripts.length;T++)if(J.scripts[T].ready&&J.scripts[T].exec_trigger){R=true;J.scripts[T].exec_trigger();J.scripts[T].exec_trigger=null}if(R)continue;break}S++}if(S==O.length)Q=U=false}var A,E=d(N,{}),O=[],S=0,U=false,Q;A={script:function(){for(var M=0;M<arguments.length;M++)(function(J,R){var T;Object.prototype.toString.call(J)=="[object Array]"||(R=[J]);for(var W=0;W<R.length;W++){if(!Q||!Q.scripts)O.push(Q={scripts:[],finished:true});J=R[W];if(Object.prototype.toString.call(J)==
-"[object Function]")J=J();if(J)if(Object.prototype.toString.call(J)=="[object Array]"){T=[].slice.call(J);T.unshift(W,1);[].splice.apply(R,T);W--}else{if(typeof J=="string")J={src:J};J=d(J,{ready:false,ready_cb:k,finished:false,finished_cb:o});Q.finished=false;Q.scripts.push(J);F(E,J,Q,V&&U);U=true;E[n]&&A.wait()}}})(arguments[M],arguments[M]);return A},wait:function(){if(arguments.length>0){for(var M=0;M<arguments.length;M++)O.push(arguments[M]);Q=O[O.length-1]}else Q=false;r();return A}};return{script:A.script,
-wait:A.wait,setOptions:function(M){d(M,E);return A}}}var N={},V=g||P,c=[],e={},j;N[z]=true;N[n]=false;N[s]=false;N[q]=false;N[m]=false;N[x]="";return j={setGlobalDefaults:function(k){d(k,N);return j},setOptions:function(){return I().setOptions.apply(null,arguments)},script:function(){return I().script.apply(null,arguments)},wait:function(){return I().wait.apply(null,arguments)},queueScript:function(){c[c.length]={type:"script",args:[].slice.call(arguments)};return j},queueWait:function(){c[c.length]=
-{type:"wait",args:[].slice.call(arguments)};return j},runQueue:function(){for(var k=j,o=c.length,r;--o>=0;){r=c.shift();k=k[r.type].apply(null,r.args)}return k},noConflict:function(){a.$LAB=u;return j},sandbox:function(){return p()}}}var u=a.$LAB,z="UseLocalXHR",n="AlwaysPreserveOrder",s="AllowDuplicates",q="CacheBust",m="Debug",x="BasePath",D=/^[^?#]*\//.exec(location.href)[0],L=/^\w+\:\/\/\/?[^\/]+/.exec(D)[0],K=document.head||document.getElementsByTagName("head"),H=a.opera&&Object.prototype.toString.call(a.opera)==
-"[object Opera]"||"MozAppearance"in document.documentElement.style,G=function(){},y=G,C=document.createElement("script"),v=typeof C.preload=="boolean",g=v||C.readyState&&C.readyState=="uninitialized",B=!g&&C.async===true,P=!g&&!B&&!H;if(a.console&&a.console.log){if(!a.console.error)a.console.error=a.console.log;G=function(w){a.console.log(w)};y=function(w,F){a.console.error(w,F)}}a.$LAB=p();(function(w,F,I){if(document.readyState==null&&document[w]){document.readyState="loading";document[w](F,I=function(){document.removeEventListener(F,
+(function(a){function b(x,F){var I=/^\w+\:\/\//;if(/^\/\/\/?/.test(x))x=location.protocol+x;else if(!I.test(x)&&x.charAt(0)!="/")x=(F||"")+x;return I.test(x)?x:(x.charAt(0)=="/"?L:D)+x}function c(x,F){for(var I in x)if(x.hasOwnProperty(I))F[I]=x[I];return F}function g(x,F,I,N){x.onload=x.onreadystatechange=function(){if(!(x.readyState&&x.readyState!="complete"&&x.readyState!="loaded"||F[I])){x.onload=x.onreadystatechange=null;N()}}}function h(x){x.ready=x.finished=true;for(var F=0;F<x.finished_listeners.length;F++)x.finished_listeners[F]();
+x.ready_listeners=[];x.finished_listeners=[]}function k(x,F,I,N,V){setTimeout(function(){var d,e=F.real_src,j;if("item"in J){if(!J[0]){setTimeout(arguments.callee,25);return}J=J[0]}d=document.createElement("script");if(F.type)d.type=F.type;if(F.charset)d.charset=F.charset;if(V)if(f){x[m]&&G("start script preload: "+e);I.elem=d;if(v){d.preload=true;d.onpreload=N}else d.onreadystatechange=function(){d.readyState=="loaded"&&N()};d.src=e}else if(V&&e.indexOf(L)==0&&x[z]){j=new XMLHttpRequest;x[m]&&G("start script preload (xhr): "+
+e);j.onreadystatechange=function(){if(j.readyState==4){j.onreadystatechange=function(){};I.text=j.responseText+"\n//@ sourceURL="+e;N()}};j.open("GET",e);j.send()}else{x[m]&&G("start script preload (cache): "+e);d.type="text/cache-script";g(d,I,"ready",function(){J.removeChild(d);N()});d.src=e;J.insertBefore(d,J.firstChild)}else{if(B){x[m]&&G("start script load (ordered async): "+e);d.async=false}else x[m]&&G("start script load: "+e);g(d,I,"finished",N);d.src=e;J.insertBefore(d,J.firstChild)}},0)}
+function p(){function x(l,o,r){function A(){if(E!=null){E=null;h(r)}}var E;if(!e[o.src].finished){if(!l[s])e[o.src].finished=true;E=r.elem||document.createElement("script");if(o.type)E.type=o.type;if(o.charset)E.charset=o.charset;g(E,r,"finished",A);if(r.elem)r.elem=null;else if(r.text){E.onload=E.onreadystatechange=null;E.text=r.text}else E.src=o.real_src;J.insertBefore(E,J.firstChild);r.text&&A()}}function F(l,o,r,A){var E,O,S=function(){o.ready_cb(o,function(){x(l,o,E)})},U=function(){o.finished_cb(o,
+r)};o.src=b(o.src,l[w]);o.real_src=o.src+(l[q]?(/\?.*$/.test(o.src)?"&_":"?_")+~~(Math.random()*1E9)+"=":"");e[o.src]||(e[o.src]={items:[],finished:false});O=e[o.src].items;if(l[s]||O.length==0){E=O[O.length]={ready:false,finished:false,ready_listeners:[S],finished_listeners:[U]};k(l,o,E,A?function(){E.ready=true;for(var Q=0;Q<E.ready_listeners.length;Q++)E.ready_listeners[Q]();E.ready_listeners=[]}:function(){h(E)},A)}else{E=O[0];E.finished?U():E.finished_listeners.push(U)}}function I(){function l(M,
+K){E[m]&&G("script preload finished: "+M.real_src);M.ready=true;M.exec_trigger=K;r()}function o(M,K){E[m]&&G("script execution finished: "+M.real_src);M.ready=M.finished=true;M.exec_trigger=null;for(var R=0;R<K.scripts.length;R++)if(!K.scripts[R].finished)return;K.finished=true;r()}function r(){for(;S<O.length;)if(Object.prototype.toString.call(O[S])=="[object Function]"){E[m]&&G("$LAB.wait() executing: "+O[S]);try{O[S++]()}catch(M){E[m]&&y("$LAB.wait() error caught: ",M)}}else{if(!O[S].finished){for(var K=
+O[S],R=false,T=0;T<K.scripts.length;T++)if(K.scripts[T].ready&&K.scripts[T].exec_trigger){R=true;K.scripts[T].exec_trigger();K.scripts[T].exec_trigger=null}if(R)continue;break}S++}if(S==O.length)Q=U=false}var A,E=c(N,{}),O=[],S=0,U=false,Q;A={script:function(){for(var M=0;M<arguments.length;M++)(function(K,R){var T;Object.prototype.toString.call(K)=="[object Array]"||(R=[K]);for(var W=0;W<R.length;W++){if(!Q||!Q.scripts)O.push(Q={scripts:[],finished:true});K=R[W];if(Object.prototype.toString.call(K)==
+"[object Function]")K=K();if(K)if(Object.prototype.toString.call(K)=="[object Array]"){T=[].slice.call(K);T.unshift(W,1);[].splice.apply(R,T);W--}else{if(typeof K=="string")K={src:K};K=c(K,{ready:false,ready_cb:l,finished:false,finished_cb:o});Q.finished=false;Q.scripts.push(K);F(E,K,Q,V&&U);U=true;E[n]&&A.wait()}}})(arguments[M],arguments[M]);return A},wait:function(){if(arguments.length>0){for(var M=0;M<arguments.length;M++)O.push(arguments[M]);Q=O[O.length-1]}else Q=false;r();return A}};return{script:A.script,
+wait:A.wait,setOptions:function(M){c(M,E);return A}}}var N={},V=f||P,d=[],e={},j;N[z]=true;N[n]=false;N[s]=false;N[q]=false;N[m]=false;N[w]="";return j={setGlobalDefaults:function(l){c(l,N);return j},setOptions:function(){return I().setOptions.apply(null,arguments)},script:function(){return I().script.apply(null,arguments)},wait:function(){return I().wait.apply(null,arguments)},queueScript:function(){d[d.length]={type:"script",args:[].slice.call(arguments)};return j},queueWait:function(){d[d.length]=
+{type:"wait",args:[].slice.call(arguments)};return j},runQueue:function(){for(var l=j,o=d.length,r;--o>=0;){r=d.shift();l=l[r.type].apply(null,r.args)}return l},noConflict:function(){a.$LAB=u;return j},sandbox:function(){return p()}}}var u=a.$LAB,z="UseLocalXHR",n="AlwaysPreserveOrder",s="AllowDuplicates",q="CacheBust",m="Debug",w="BasePath",D=/^[^?#]*\//.exec(location.href)[0],L=/^\w+\:\/\/\/?[^\/]+/.exec(D)[0],J=document.head||document.getElementsByTagName("head"),H=a.opera&&Object.prototype.toString.call(a.opera)==
+"[object Opera]"||"MozAppearance"in document.documentElement.style,G=function(){},y=G,C=document.createElement("script"),v=typeof C.preload=="boolean",f=v||C.readyState&&C.readyState=="uninitialized",B=!f&&C.async===true,P=!f&&!B&&!H;if(a.console&&a.console.log){if(!a.console.error)a.console.error=a.console.log;G=function(x){a.console.log(x)};y=function(x,F){a.console.error(x,F)}}a.$LAB=p();(function(x,F,I){if(document.readyState==null&&document[x]){document.readyState="loading";document[x](F,I=function(){document.removeEventListener(F,
I,false);document.readyState="complete"},false)}})("addEventListener","DOMContentLoaded")})(this);
-var Mustache=function(){function a(n){return String(n).replace(/&(?!\w+;)|[<>"']/g,function(s){return p[s]||s})}var b=Object.prototype.toString;Array.isArray=Array.isArray||function(n){return b.call(n)=="[object Array]"};var d=String.prototype.trim,h;if(d)h=function(n){return n==null?"":d.call(n)};else{var f,l;if(/\S/.test("\u00a0")){f=/^[\s\xA0]+/;l=/[\s\xA0]+$/}else{f=/^\s+/;l=/\s+$/}h=function(n){return n==null?"":n.toString().replace(f,"").replace(l,"")}}var p={"&":"&","<":"<",">":">",
-'"':""","'":"'"},u={},z=function(){};z.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},context:{},render:function(n,s,q,m){if(!m){this.context=s;this.buffer=[]}if(!this.includes("",n))if(m)return n;else{this.send(n);return}n=this.render_pragmas(n);var x=this.render_section(n,s,q);if(x===false)x=this.render_tags(n,s,q,m);if(m)return x;else this.sendLines(x)},send:function(n){n!==""&&this.buffer.push(n)},sendLines:function(n){if(n){n=n.split("\n");
-for(var s=0;s<n.length;s++)this.send(n[s])}},render_pragmas:function(n){if(!this.includes("%",n))return n;var s=this,q=this.getCachedRegex("render_pragmas",function(m,x){return RegExp(m+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+x,"g")});return n.replace(q,function(m,x,D){if(!s.pragmas_implemented[x])throw{message:"This implementation of mustache doesn't understand the '"+x+"' pragma"};s.pragmas[x]={};if(D){m=D.split("=");s.pragmas[x][m[0]]=m[1]}return""})},render_partial:function(n,s,q){n=h(n);if(!q||q[n]===
-undefined)throw{message:"unknown_partial '"+n+"'"};if(!s||typeof s[n]!="object")return this.render(q[n],s,q,true);return this.render(q[n],s[n],q,true)},render_section:function(n,s,q){if(!this.includes("#",n)&&!this.includes("^",n))return false;var m=this,x=this.getCachedRegex("render_section",function(D,L){return RegExp("^([\\s\\S]*?)"+D+"(\\^|\\#)\\s*(.+)\\s*"+L+"\n*([\\s\\S]*?)"+D+"\\/\\s*\\3\\s*"+L+"\\s*([\\s\\S]*)$","g")});return n.replace(x,function(D,L,K,H,G,y){D=L?m.render_tags(L,s,q,true):
-"";y=y?m.render(y,s,q,true):"";var C;H=m.find(H,s);if(K==="^")C=!H||Array.isArray(H)&&H.length===0?m.render(G,s,q,true):"";else if(K==="#")C=Array.isArray(H)?m.map(H,function(v){return m.render(G,m.create_context(v),q,true)}).join(""):m.is_object(H)?m.render(G,m.create_context(H),q,true):typeof H=="function"?H.call(s,G,function(v){return m.render(v,s,q,true)}):H?m.render(G,s,q,true):"";return D+C+y})},render_tags:function(n,s,q,m){var x=this,D=function(){return x.getCachedRegex("render_tags",function(G,
-y){return RegExp(G+"(=|!|>|&|\\{|%)?([^#\\^]+?)\\1?"+y+"+","g")})},L=D(),K=function(G,y,C){switch(y){case "!":return"";case "=":x.set_delimiters(C);L=D();return"";case ">":return x.render_partial(C,s,q);case "{":case "&":return x.find(C,s);default:return a(x.find(C,s))}};n=n.split("\n");for(var H=0;H<n.length;H++){n[H]=n[H].replace(L,K,this);m||this.send(n[H])}if(m)return n.join("\n")},set_delimiters:function(n){n=n.split(" ");this.otag=this.escape_regex(n[0]);this.ctag=this.escape_regex(n[1])},escape_regex:function(n){if(!arguments.callee.sRE)arguments.callee.sRE=
-RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","g");return n.replace(arguments.callee.sRE,"\\$1")},find:function(n,s){function q(D){return D===false||D===0||D}n=h(n);var m;if(n.match(/([a-z_]+)\./ig)){var x=this.walk_context(n,s);if(q(x))m=x}else if(q(s[n]))m=s[n];else if(q(this.context[n]))m=this.context[n];if(typeof m=="function")return m.apply(s);if(m!==undefined)return m;return""},walk_context:function(n,s){for(var q=n.split("."),m=s[q[0]]!=undefined?s:this.context,x=m[q.shift()];x!=
-undefined&&q.length>0;){m=x;x=x[q.shift()]}if(typeof x=="function")return x.apply(m);return x},includes:function(n,s){return s.indexOf(this.otag+n)!=-1},create_context:function(n){if(this.is_object(n))return n;else{var s=".";if(this.pragmas["IMPLICIT-ITERATOR"])s=this.pragmas["IMPLICIT-ITERATOR"].iterator;var q={};q[s]=n;return q}},is_object:function(n){return n&&typeof n=="object"},map:function(n,s){if(typeof n.map=="function")return n.map(s);else{for(var q=[],m=n.length,x=0;x<m;x++)q.push(s(n[x]));
-return q}},getCachedRegex:function(n,s){var q=u[this.otag];q||(q=u[this.otag]={});var m=q[this.ctag];m||(m=q[this.ctag]={});(q=m[n])||(q=m[n]=s(this.otag,this.ctag));return q}};return{name:"mustache.js",version:"0.5.0-dev",to_html:function(n,s,q,m){var x=new z;if(m)x.send=m;x.render(n,s||{},q);if(!m)return x.buffer.join("\n")}}}();
-(function(){function a(c,e,j){if(c===e)return c!==0||1/c==1/e;if(c==null||e==null)return c===e;if(c._chain)c=c._wrapped;if(e._chain)e=e._wrapped;if(c.isEqual&&g.isFunction(c.isEqual))return c.isEqual(e);if(e.isEqual&&g.isFunction(e.isEqual))return e.isEqual(c);var k=n.call(c);if(k!=n.call(e))return false;switch(k){case "[object String]":return c==String(e);case "[object Number]":return c!=+c?e!=+e:c==0?1/c==1/e:c==+e;case "[object Date]":case "[object Boolean]":return+c==+e;case "[object RegExp]":return c.source==
-e.source&&c.global==e.global&&c.multiline==e.multiline&&c.ignoreCase==e.ignoreCase}if(typeof c!="object"||typeof e!="object")return false;for(var o=j.length;o--;)if(j[o]==c)return true;j.push(c);o=0;var r=true;if(k=="[object Array]"){if(o=c.length,r=o==e.length)for(;o--;)if(!(r=o in c==o in e&&a(c[o],e[o],j)))break}else{if("constructor"in c!="constructor"in e||c.constructor!=e.constructor)return false;for(var A in c)if(s.call(c,A)&&(o++,!(r=s.call(e,A)&&a(c[A],e[A],j))))break;if(r){for(A in e)if(s.call(e,
-A)&&!o--)break;r=!o}}j.pop();return r}var b=this,d=b._,h={},f=Array.prototype,l=Object.prototype,p=f.slice,u=f.concat,z=f.unshift,n=l.toString,s=l.hasOwnProperty,q=f.forEach,m=f.map,x=f.reduce,D=f.reduceRight,L=f.filter,K=f.every,H=f.some,G=f.indexOf,y=f.lastIndexOf;l=Array.isArray;var C=Object.keys,v=Function.prototype.bind,g=function(c){return new I(c)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=g;exports._=g}else typeof define==="function"&&
-define.amd?define("underscore",function(){return g}):b._=g;g.VERSION="1.2.3";var B=g.each=g.forEach=function(c,e,j){if(c!=null)if(q&&c.forEach===q)c.forEach(e,j);else if(c.length===+c.length)for(var k=0,o=c.length;k<o;k++){if(k in c&&e.call(j,c[k],k,c)===h)break}else for(k in c)if(s.call(c,k)&&e.call(j,c[k],k,c)===h)break};g.map=function(c,e,j){var k=[];if(c==null)return k;if(m&&c.map===m)return c.map(e,j);B(c,function(o,r,A){k[k.length]=e.call(j,o,r,A)});return k};g.reduce=g.foldl=g.inject=function(c,
-e,j,k){var o=arguments.length>2;c==null&&(c=[]);if(x&&c.reduce===x)return k&&(e=g.bind(e,k)),o?c.reduce(e,j):c.reduce(e);B(c,function(r,A,E){o?j=e.call(k,j,r,A,E):(j=r,o=true)});if(!o)throw new TypeError("Reduce of empty array with no initial value");return j};g.reduceRight=g.foldr=function(c,e,j,k){var o=arguments.length>2;c==null&&(c=[]);if(D&&c.reduceRight===D)return k&&(e=g.bind(e,k)),o?c.reduceRight(e,j):c.reduceRight(e);var r=g.toArray(c).reverse();k&&!o&&(e=g.bind(e,k));return o?g.reduce(r,
-e,j,k):g.reduce(r,e)};g.find=g.detect=function(c,e,j){var k;P(c,function(o,r,A){if(e.call(j,o,r,A))return k=o,true});return k};g.filter=g.select=function(c,e,j){var k=[];if(c==null)return k;if(L&&c.filter===L)return c.filter(e,j);B(c,function(o,r,A){e.call(j,o,r,A)&&(k[k.length]=o)});return k};g.reject=function(c,e,j){var k=[];if(c==null)return k;B(c,function(o,r,A){e.call(j,o,r,A)||(k[k.length]=o)});return k};g.every=g.all=function(c,e,j){var k=true;if(c==null)return k;if(K&&c.every===K)return c.every(e,
-j);B(c,function(o,r,A){if(!(k=k&&e.call(j,o,r,A)))return h});return k};var P=g.some=g.any=function(c,e,j){e||(e=g.identity);var k=false;if(c==null)return k;if(H&&c.some===H)return c.some(e,j);B(c,function(o,r,A){if(k||(k=e.call(j,o,r,A)))return h});return!!k};g.include=g.contains=function(c,e){var j=false;if(c==null)return j;return G&&c.indexOf===G?c.indexOf(e)!=-1:j=P(c,function(k){return k===e})};g.invoke=function(c,e){var j=p.call(arguments,2);return g.map(c,function(k){return(e.call?e||k:k[e]).apply(k,
-j)})};g.pluck=function(c,e){return g.map(c,function(j){return j[e]})};g.max=function(c,e,j){if(!e&&g.isArray(c))return Math.max.apply(Math,c);if(!e&&g.isEmpty(c))return-Infinity;var k={computed:-Infinity};B(c,function(o,r,A){r=e?e.call(j,o,r,A):o;r>=k.computed&&(k={value:o,computed:r})});return k.value};g.min=function(c,e,j){if(!e&&g.isArray(c))return Math.min.apply(Math,c);if(!e&&g.isEmpty(c))return Infinity;var k={computed:Infinity};B(c,function(o,r,A){r=e?e.call(j,o,r,A):o;r<k.computed&&(k={value:o,
-computed:r})});return k.value};g.shuffle=function(c){var e=[],j;B(c,function(k,o){o==0?e[0]=k:(j=Math.floor(Math.random()*(o+1)),e[o]=e[j],e[j]=k)});return e};g.sortBy=function(c,e,j){return g.pluck(g.map(c,function(k,o,r){return{value:k,criteria:e.call(j,k,o,r)}}).sort(function(k,o){var r=k.criteria,A=o.criteria;return r<A?-1:r>A?1:0}),"value")};g.groupBy=function(c,e){var j={},k=g.isFunction(e)?e:function(o){return o[e]};B(c,function(o,r){var A=k(o,r);(j[A]||(j[A]=[])).push(o)});return j};g.sortedIndex=
-function(c,e,j){j||(j=g.identity);for(var k=0,o=c.length;k<o;){var r=k+o>>1;j(c[r])<j(e)?k=r+1:o=r}return k};g.toArray=function(c){return!c?[]:c.toArray?c.toArray():g.isArray(c)?p.call(c):g.isArguments(c)?p.call(c):g.values(c)};g.size=function(c){return g.toArray(c).length};g.first=g.head=function(c,e,j){return e!=null&&!j?p.call(c,0,e):c[0]};g.initial=function(c,e,j){return p.call(c,0,c.length-(e==null||j?1:e))};g.last=function(c,e,j){return e!=null&&!j?p.call(c,Math.max(c.length-e,0)):c[c.length-
-1]};g.rest=g.tail=function(c,e,j){return p.call(c,e==null||j?1:e)};g.compact=function(c){return g.filter(c,function(e){return!!e})};g.flatten=function(c,e){return g.reduce(c,function(j,k){if(g.isArray(k))return j.concat(e?k:g.flatten(k));j[j.length]=k;return j},[])};g.without=function(c){return g.difference(c,p.call(arguments,1))};g.uniq=g.unique=function(c,e,j){j=j?g.map(c,j):c;var k=[];g.reduce(j,function(o,r,A){if(0==A||(e===true?g.last(o)!=r:!g.include(o,r))){o[o.length]=r;k[k.length]=c[A]}return o},
-[]);return k};g.union=function(){return g.uniq(g.flatten(arguments,true))};g.intersection=g.intersect=function(c){var e=p.call(arguments,1);return g.filter(g.uniq(c),function(j){return g.every(e,function(k){return g.indexOf(k,j)>=0})})};g.difference=function(c){var e=g.flatten(p.call(arguments,1));return g.filter(c,function(j){return!g.include(e,j)})};g.zip=function(){for(var c=p.call(arguments),e=g.max(g.pluck(c,"length")),j=Array(e),k=0;k<e;k++)j[k]=g.pluck(c,""+k);return j};g.indexOf=function(c,
-e,j){if(c==null)return-1;var k;if(j)return j=g.sortedIndex(c,e),c[j]===e?j:-1;if(G&&c.indexOf===G)return c.indexOf(e);j=0;for(k=c.length;j<k;j++)if(j in c&&c[j]===e)return j;return-1};g.lastIndexOf=function(c,e){if(c==null)return-1;if(y&&c.lastIndexOf===y)return c.lastIndexOf(e);for(var j=c.length;j--;)if(j in c&&c[j]===e)return j;return-1};g.range=function(c,e,j){arguments.length<=1&&(e=c||0,c=0);j=arguments[2]||1;for(var k=Math.max(Math.ceil((e-c)/j),0),o=0,r=Array(k);o<k;){r[o++]=c;c+=j}return r};
-var w=function(){};g.bind=function(c,e){var j,k;if(c.bind===v&&v)return v.apply(c,p.call(arguments,1));if(!g.isFunction(c))throw new TypeError;k=p.call(arguments,2);return j=function(){if(!(this instanceof j))return c.apply(e,k.concat(p.call(arguments)));w.prototype=c.prototype;var o=new w,r=c.apply(o,k.concat(p.call(arguments)));return Object(r)===r?r:o}};g.bindAll=function(c){var e=p.call(arguments,1);e.length==0&&(e=g.functions(c));B(e,function(j){c[j]=g.bind(c[j],c)});return c};g.memoize=function(c,
-e){var j={};e||(e=g.identity);return function(){var k=e.apply(this,arguments);return s.call(j,k)?j[k]:j[k]=c.apply(this,arguments)}};g.delay=function(c,e){var j=p.call(arguments,2);return setTimeout(function(){return c.apply(c,j)},e)};g.defer=function(c){return g.delay.apply(g,[c,1].concat(p.call(arguments,1)))};g.throttle=function(c,e){var j,k,o,r,A,E=g.debounce(function(){A=r=false},e);return function(){j=this;k=arguments;o||(o=setTimeout(function(){o=null;A&&c.apply(j,k);E()},e));r?A=true:c.apply(j,
-k);E();r=true}};g.debounce=function(c,e){var j;return function(){var k=this,o=arguments;clearTimeout(j);j=setTimeout(function(){j=null;c.apply(k,o)},e)}};g.once=function(c){var e=false,j;return function(){if(e)return j;e=true;return j=c.apply(this,arguments)}};g.wrap=function(c,e){return function(){var j=u.apply([c],arguments);return e.apply(this,j)}};g.compose=function(){var c=arguments;return function(){for(var e=arguments,j=c.length-1;j>=0;j--)e=[c[j].apply(this,e)];return e[0]}};g.after=function(c,
-e){return c<=0?e():function(){if(--c<1)return e.apply(this,arguments)}};g.keys=C||function(c){if(c!==Object(c))throw new TypeError("Invalid object");var e=[],j;for(j in c)s.call(c,j)&&(e[e.length]=j);return e};g.values=function(c){return g.map(c,g.identity)};g.functions=g.methods=function(c){var e=[],j;for(j in c)g.isFunction(c[j])&&e.push(j);return e.sort()};g.extend=function(c){B(p.call(arguments,1),function(e){for(var j in e)e[j]!==void 0&&(c[j]=e[j])});return c};g.defaults=function(c){B(p.call(arguments,
-1),function(e){for(var j in e)c[j]==null&&(c[j]=e[j])});return c};g.clone=function(c){return!g.isObject(c)?c:g.isArray(c)?c.slice():g.extend({},c)};g.tap=function(c,e){e(c);return c};g.isEqual=function(c,e){return a(c,e,[])};g.isEmpty=function(c){if(g.isArray(c)||g.isString(c))return c.length===0;for(var e in c)if(s.call(c,e))return false;return true};g.isElement=function(c){return!!(c&&c.nodeType==1)};g.isArray=l||function(c){return n.call(c)=="[object Array]"};g.isObject=function(c){return c===
-Object(c)};g.isArguments=function(c){return n.call(c)=="[object Arguments]"};if(!g.isArguments(arguments))g.isArguments=function(c){return!(!c||!s.call(c,"callee"))};g.isFunction=function(c){return n.call(c)=="[object Function]"};g.isString=function(c){return n.call(c)=="[object String]"};g.isNumber=function(c){return n.call(c)=="[object Number]"};g.isNaN=function(c){return c!==c};g.isBoolean=function(c){return c===true||c===false||n.call(c)=="[object Boolean]"};g.isDate=function(c){return n.call(c)==
-"[object Date]"};g.isRegExp=function(c){return n.call(c)=="[object RegExp]"};g.isNull=function(c){return c===null};g.isUndefined=function(c){return c===void 0};g.noConflict=function(){b._=d;return this};g.identity=function(c){return c};g.times=function(c,e,j){for(var k=0;k<c;k++)e.call(j,k)};g.escape=function(c){return(""+c).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};g.mixin=function(c){B(g.functions(c),function(e){V(e,
-g[e]=c[e])})};var F=0;g.uniqueId=function(c){var e=F++;return c?c+e:e};g.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};g.template=function(c,e){var j=g.templateSettings;j="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+c.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(j.escape,function(o,r){return"',_.escape("+r.replace(/\\'/g,"'")+"),'"}).replace(j.interpolate,function(o,r){return"',"+r.replace(/\\'/g,
-"'")+",'"}).replace(j.evaluate||null,function(o,r){return"');"+r.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";var k=new Function("obj","_",j);return e?k(e,g):function(o){return k.call(this,o,g)}};var I=function(c){this._wrapped=c};g.prototype=I.prototype;var N=function(c,e){return e?g(c).chain():c},V=function(c,e){I.prototype[c]=function(){var j=p.call(arguments);z.call(j,this._wrapped);return N(e.apply(g,
-j),this._chain)}};g.mixin(g);B("pop,push,reverse,shift,sort,splice,unshift".split(","),function(c){var e=f[c];I.prototype[c]=function(){e.apply(this._wrapped,arguments);return N(this._wrapped,this._chain)}});B(["concat","join","slice"],function(c){var e=f[c];I.prototype[c]=function(){return N(e.apply(this._wrapped,arguments),this._chain)}});I.prototype.chain=function(){this._chain=true;return this};I.prototype.value=function(){return this._wrapped}}).call(this);
+var Mustache=function(){function a(n){return String(n).replace(/&(?!\w+;)|[<>"']/g,function(s){return p[s]||s})}var b=Object.prototype.toString;Array.isArray=Array.isArray||function(n){return b.call(n)=="[object Array]"};var c=String.prototype.trim,g;if(c)g=function(n){return n==null?"":c.call(n)};else{var h,k;if(/\S/.test("\u00a0")){h=/^[\s\xA0]+/;k=/[\s\xA0]+$/}else{h=/^\s+/;k=/\s+$/}g=function(n){return n==null?"":n.toString().replace(h,"").replace(k,"")}}var p={"&":"&","<":"<",">":">",
+'"':""","'":"'"},u={},z=function(){};z.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},context:{},render:function(n,s,q,m){if(!m){this.context=s;this.buffer=[]}if(!this.includes("",n))if(m)return n;else{this.send(n);return}n=this.render_pragmas(n);var w=this.render_section(n,s,q);if(w===false)w=this.render_tags(n,s,q,m);if(m)return w;else this.sendLines(w)},send:function(n){n!==""&&this.buffer.push(n)},sendLines:function(n){if(n){n=n.split("\n");
+for(var s=0;s<n.length;s++)this.send(n[s])}},render_pragmas:function(n){if(!this.includes("%",n))return n;var s=this,q=this.getCachedRegex("render_pragmas",function(m,w){return RegExp(m+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+w,"g")});return n.replace(q,function(m,w,D){if(!s.pragmas_implemented[w])throw{message:"This implementation of mustache doesn't understand the '"+w+"' pragma"};s.pragmas[w]={};if(D){m=D.split("=");s.pragmas[w][m[0]]=m[1]}return""})},render_partial:function(n,s,q){n=g(n);if(!q||q[n]===
+undefined)throw{message:"unknown_partial '"+n+"'"};if(!s||typeof s[n]!="object")return this.render(q[n],s,q,true);return this.render(q[n],s[n],q,true)},render_section:function(n,s,q){if(!this.includes("#",n)&&!this.includes("^",n))return false;var m=this,w=this.getCachedRegex("render_section",function(D,L){return RegExp("^([\\s\\S]*?)"+D+"(\\^|\\#)\\s*(.+)\\s*"+L+"\n*([\\s\\S]*?)"+D+"\\/\\s*\\3\\s*"+L+"\\s*([\\s\\S]*)$","g")});return n.replace(w,function(D,L,J,H,G,y){D=L?m.render_tags(L,s,q,true):
+"";y=y?m.render(y,s,q,true):"";var C;H=m.find(H,s);if(J==="^")C=!H||Array.isArray(H)&&H.length===0?m.render(G,s,q,true):"";else if(J==="#")C=Array.isArray(H)?m.map(H,function(v){return m.render(G,m.create_context(v),q,true)}).join(""):m.is_object(H)?m.render(G,m.create_context(H),q,true):typeof H=="function"?H.call(s,G,function(v){return m.render(v,s,q,true)}):H?m.render(G,s,q,true):"";return D+C+y})},render_tags:function(n,s,q,m){var w=this,D=function(){return w.getCachedRegex("render_tags",function(G,
+y){return RegExp(G+"(=|!|>|&|\\{|%)?([^#\\^]+?)\\1?"+y+"+","g")})},L=D(),J=function(G,y,C){switch(y){case "!":return"";case "=":w.set_delimiters(C);L=D();return"";case ">":return w.render_partial(C,s,q);case "{":case "&":return w.find(C,s);default:return a(w.find(C,s))}};n=n.split("\n");for(var H=0;H<n.length;H++){n[H]=n[H].replace(L,J,this);m||this.send(n[H])}if(m)return n.join("\n")},set_delimiters:function(n){n=n.split(" ");this.otag=this.escape_regex(n[0]);this.ctag=this.escape_regex(n[1])},escape_regex:function(n){if(!arguments.callee.sRE)arguments.callee.sRE=
+RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","g");return n.replace(arguments.callee.sRE,"\\$1")},find:function(n,s){function q(D){return D===false||D===0||D}n=g(n);var m;if(n.match(/([a-z_]+)\./ig)){var w=this.walk_context(n,s);if(q(w))m=w}else if(q(s[n]))m=s[n];else if(q(this.context[n]))m=this.context[n];if(typeof m=="function")return m.apply(s);if(m!==undefined)return m;return""},walk_context:function(n,s){for(var q=n.split("."),m=s[q[0]]!=undefined?s:this.context,w=m[q.shift()];w!=
+undefined&&q.length>0;){m=w;w=w[q.shift()]}if(typeof w=="function")return w.apply(m);return w},includes:function(n,s){return s.indexOf(this.otag+n)!=-1},create_context:function(n){if(this.is_object(n))return n;else{var s=".";if(this.pragmas["IMPLICIT-ITERATOR"])s=this.pragmas["IMPLICIT-ITERATOR"].iterator;var q={};q[s]=n;return q}},is_object:function(n){return n&&typeof n=="object"},map:function(n,s){if(typeof n.map=="function")return n.map(s);else{for(var q=[],m=n.length,w=0;w<m;w++)q.push(s(n[w]));
+return q}},getCachedRegex:function(n,s){var q=u[this.otag];q||(q=u[this.otag]={});var m=q[this.ctag];m||(m=q[this.ctag]={});(q=m[n])||(q=m[n]=s(this.otag,this.ctag));return q}};return{name:"mustache.js",version:"0.5.0-dev",to_html:function(n,s,q,m){var w=new z;if(m)w.send=m;w.render(n,s||{},q);if(!m)return w.buffer.join("\n")}}}();
+(function(){function a(d,e,j){if(d===e)return d!==0||1/d==1/e;if(d==null||e==null)return d===e;if(d._chain)d=d._wrapped;if(e._chain)e=e._wrapped;if(d.isEqual&&f.isFunction(d.isEqual))return d.isEqual(e);if(e.isEqual&&f.isFunction(e.isEqual))return e.isEqual(d);var l=n.call(d);if(l!=n.call(e))return false;switch(l){case "[object String]":return d==String(e);case "[object Number]":return d!=+d?e!=+e:d==0?1/d==1/e:d==+e;case "[object Date]":case "[object Boolean]":return+d==+e;case "[object RegExp]":return d.source==
+e.source&&d.global==e.global&&d.multiline==e.multiline&&d.ignoreCase==e.ignoreCase}if(typeof d!="object"||typeof e!="object")return false;for(var o=j.length;o--;)if(j[o]==d)return true;j.push(d);o=0;var r=true;if(l=="[object Array]"){if(o=d.length,r=o==e.length)for(;o--;)if(!(r=o in d==o in e&&a(d[o],e[o],j)))break}else{if("constructor"in d!="constructor"in e||d.constructor!=e.constructor)return false;for(var A in d)if(s.call(d,A)&&(o++,!(r=s.call(e,A)&&a(d[A],e[A],j))))break;if(r){for(A in e)if(s.call(e,
+A)&&!o--)break;r=!o}}j.pop();return r}var b=this,c=b._,g={},h=Array.prototype,k=Object.prototype,p=h.slice,u=h.concat,z=h.unshift,n=k.toString,s=k.hasOwnProperty,q=h.forEach,m=h.map,w=h.reduce,D=h.reduceRight,L=h.filter,J=h.every,H=h.some,G=h.indexOf,y=h.lastIndexOf;k=Array.isArray;var C=Object.keys,v=Function.prototype.bind,f=function(d){return new I(d)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=f;exports._=f}else typeof define==="function"&&
+define.amd?define("underscore",function(){return f}):b._=f;f.VERSION="1.2.3";var B=f.each=f.forEach=function(d,e,j){if(d!=null)if(q&&d.forEach===q)d.forEach(e,j);else if(d.length===+d.length)for(var l=0,o=d.length;l<o;l++){if(l in d&&e.call(j,d[l],l,d)===g)break}else for(l in d)if(s.call(d,l)&&e.call(j,d[l],l,d)===g)break};f.map=function(d,e,j){var l=[];if(d==null)return l;if(m&&d.map===m)return d.map(e,j);B(d,function(o,r,A){l[l.length]=e.call(j,o,r,A)});return l};f.reduce=f.foldl=f.inject=function(d,
+e,j,l){var o=arguments.length>2;d==null&&(d=[]);if(w&&d.reduce===w)return l&&(e=f.bind(e,l)),o?d.reduce(e,j):d.reduce(e);B(d,function(r,A,E){o?j=e.call(l,j,r,A,E):(j=r,o=true)});if(!o)throw new TypeError("Reduce of empty array with no initial value");return j};f.reduceRight=f.foldr=function(d,e,j,l){var o=arguments.length>2;d==null&&(d=[]);if(D&&d.reduceRight===D)return l&&(e=f.bind(e,l)),o?d.reduceRight(e,j):d.reduceRight(e);var r=f.toArray(d).reverse();l&&!o&&(e=f.bind(e,l));return o?f.reduce(r,
+e,j,l):f.reduce(r,e)};f.find=f.detect=function(d,e,j){var l;P(d,function(o,r,A){if(e.call(j,o,r,A))return l=o,true});return l};f.filter=f.select=function(d,e,j){var l=[];if(d==null)return l;if(L&&d.filter===L)return d.filter(e,j);B(d,function(o,r,A){e.call(j,o,r,A)&&(l[l.length]=o)});return l};f.reject=function(d,e,j){var l=[];if(d==null)return l;B(d,function(o,r,A){e.call(j,o,r,A)||(l[l.length]=o)});return l};f.every=f.all=function(d,e,j){var l=true;if(d==null)return l;if(J&&d.every===J)return d.every(e,
+j);B(d,function(o,r,A){if(!(l=l&&e.call(j,o,r,A)))return g});return l};var P=f.some=f.any=function(d,e,j){e||(e=f.identity);var l=false;if(d==null)return l;if(H&&d.some===H)return d.some(e,j);B(d,function(o,r,A){if(l||(l=e.call(j,o,r,A)))return g});return!!l};f.include=f.contains=function(d,e){var j=false;if(d==null)return j;return G&&d.indexOf===G?d.indexOf(e)!=-1:j=P(d,function(l){return l===e})};f.invoke=function(d,e){var j=p.call(arguments,2);return f.map(d,function(l){return(e.call?e||l:l[e]).apply(l,
+j)})};f.pluck=function(d,e){return f.map(d,function(j){return j[e]})};f.max=function(d,e,j){if(!e&&f.isArray(d))return Math.max.apply(Math,d);if(!e&&f.isEmpty(d))return-Infinity;var l={computed:-Infinity};B(d,function(o,r,A){r=e?e.call(j,o,r,A):o;r>=l.computed&&(l={value:o,computed:r})});return l.value};f.min=function(d,e,j){if(!e&&f.isArray(d))return Math.min.apply(Math,d);if(!e&&f.isEmpty(d))return Infinity;var l={computed:Infinity};B(d,function(o,r,A){r=e?e.call(j,o,r,A):o;r<l.computed&&(l={value:o,
+computed:r})});return l.value};f.shuffle=function(d){var e=[],j;B(d,function(l,o){o==0?e[0]=l:(j=Math.floor(Math.random()*(o+1)),e[o]=e[j],e[j]=l)});return e};f.sortBy=function(d,e,j){return f.pluck(f.map(d,function(l,o,r){return{value:l,criteria:e.call(j,l,o,r)}}).sort(function(l,o){var r=l.criteria,A=o.criteria;return r<A?-1:r>A?1:0}),"value")};f.groupBy=function(d,e){var j={},l=f.isFunction(e)?e:function(o){return o[e]};B(d,function(o,r){var A=l(o,r);(j[A]||(j[A]=[])).push(o)});return j};f.sortedIndex=
+function(d,e,j){j||(j=f.identity);for(var l=0,o=d.length;l<o;){var r=l+o>>1;j(d[r])<j(e)?l=r+1:o=r}return l};f.toArray=function(d){return!d?[]:d.toArray?d.toArray():f.isArray(d)?p.call(d):f.isArguments(d)?p.call(d):f.values(d)};f.size=function(d){return f.toArray(d).length};f.first=f.head=function(d,e,j){return e!=null&&!j?p.call(d,0,e):d[0]};f.initial=function(d,e,j){return p.call(d,0,d.length-(e==null||j?1:e))};f.last=function(d,e,j){return e!=null&&!j?p.call(d,Math.max(d.length-e,0)):d[d.length-
+1]};f.rest=f.tail=function(d,e,j){return p.call(d,e==null||j?1:e)};f.compact=function(d){return f.filter(d,function(e){return!!e})};f.flatten=function(d,e){return f.reduce(d,function(j,l){if(f.isArray(l))return j.concat(e?l:f.flatten(l));j[j.length]=l;return j},[])};f.without=function(d){return f.difference(d,p.call(arguments,1))};f.uniq=f.unique=function(d,e,j){j=j?f.map(d,j):d;var l=[];f.reduce(j,function(o,r,A){if(0==A||(e===true?f.last(o)!=r:!f.include(o,r))){o[o.length]=r;l[l.length]=d[A]}return o},
+[]);return l};f.union=function(){return f.uniq(f.flatten(arguments,true))};f.intersection=f.intersect=function(d){var e=p.call(arguments,1);return f.filter(f.uniq(d),function(j){return f.every(e,function(l){return f.indexOf(l,j)>=0})})};f.difference=function(d){var e=f.flatten(p.call(arguments,1));return f.filter(d,function(j){return!f.include(e,j)})};f.zip=function(){for(var d=p.call(arguments),e=f.max(f.pluck(d,"length")),j=Array(e),l=0;l<e;l++)j[l]=f.pluck(d,""+l);return j};f.indexOf=function(d,
+e,j){if(d==null)return-1;var l;if(j)return j=f.sortedIndex(d,e),d[j]===e?j:-1;if(G&&d.indexOf===G)return d.indexOf(e);j=0;for(l=d.length;j<l;j++)if(j in d&&d[j]===e)return j;return-1};f.lastIndexOf=function(d,e){if(d==null)return-1;if(y&&d.lastIndexOf===y)return d.lastIndexOf(e);for(var j=d.length;j--;)if(j in d&&d[j]===e)return j;return-1};f.range=function(d,e,j){arguments.length<=1&&(e=d||0,d=0);j=arguments[2]||1;for(var l=Math.max(Math.ceil((e-d)/j),0),o=0,r=Array(l);o<l;){r[o++]=d;d+=j}return r};
+var x=function(){};f.bind=function(d,e){var j,l;if(d.bind===v&&v)return v.apply(d,p.call(arguments,1));if(!f.isFunction(d))throw new TypeError;l=p.call(arguments,2);return j=function(){if(!(this instanceof j))return d.apply(e,l.concat(p.call(arguments)));x.prototype=d.prototype;var o=new x,r=d.apply(o,l.concat(p.call(arguments)));return Object(r)===r?r:o}};f.bindAll=function(d){var e=p.call(arguments,1);e.length==0&&(e=f.functions(d));B(e,function(j){d[j]=f.bind(d[j],d)});return d};f.memoize=function(d,
+e){var j={};e||(e=f.identity);return function(){var l=e.apply(this,arguments);return s.call(j,l)?j[l]:j[l]=d.apply(this,arguments)}};f.delay=function(d,e){var j=p.call(arguments,2);return setTimeout(function(){return d.apply(d,j)},e)};f.defer=function(d){return f.delay.apply(f,[d,1].concat(p.call(arguments,1)))};f.throttle=function(d,e){var j,l,o,r,A,E=f.debounce(function(){A=r=false},e);return function(){j=this;l=arguments;o||(o=setTimeout(function(){o=null;A&&d.apply(j,l);E()},e));r?A=true:d.apply(j,
+l);E();r=true}};f.debounce=function(d,e){var j;return function(){var l=this,o=arguments;clearTimeout(j);j=setTimeout(function(){j=null;d.apply(l,o)},e)}};f.once=function(d){var e=false,j;return function(){if(e)return j;e=true;return j=d.apply(this,arguments)}};f.wrap=function(d,e){return function(){var j=u.apply([d],arguments);return e.apply(this,j)}};f.compose=function(){var d=arguments;return function(){for(var e=arguments,j=d.length-1;j>=0;j--)e=[d[j].apply(this,e)];return e[0]}};f.after=function(d,
+e){return d<=0?e():function(){if(--d<1)return e.apply(this,arguments)}};f.keys=C||function(d){if(d!==Object(d))throw new TypeError("Invalid object");var e=[],j;for(j in d)s.call(d,j)&&(e[e.length]=j);return e};f.values=function(d){return f.map(d,f.identity)};f.functions=f.methods=function(d){var e=[],j;for(j in d)f.isFunction(d[j])&&e.push(j);return e.sort()};f.extend=function(d){B(p.call(arguments,1),function(e){for(var j in e)e[j]!==void 0&&(d[j]=e[j])});return d};f.defaults=function(d){B(p.call(arguments,
+1),function(e){for(var j in e)d[j]==null&&(d[j]=e[j])});return d};f.clone=function(d){return!f.isObject(d)?d:f.isArray(d)?d.slice():f.extend({},d)};f.tap=function(d,e){e(d);return d};f.isEqual=function(d,e){return a(d,e,[])};f.isEmpty=function(d){if(f.isArray(d)||f.isString(d))return d.length===0;for(var e in d)if(s.call(d,e))return false;return true};f.isElement=function(d){return!!(d&&d.nodeType==1)};f.isArray=k||function(d){return n.call(d)=="[object Array]"};f.isObject=function(d){return d===
+Object(d)};f.isArguments=function(d){return n.call(d)=="[object Arguments]"};if(!f.isArguments(arguments))f.isArguments=function(d){return!(!d||!s.call(d,"callee"))};f.isFunction=function(d){return n.call(d)=="[object Function]"};f.isString=function(d){return n.call(d)=="[object String]"};f.isNumber=function(d){return n.call(d)=="[object Number]"};f.isNaN=function(d){return d!==d};f.isBoolean=function(d){return d===true||d===false||n.call(d)=="[object Boolean]"};f.isDate=function(d){return n.call(d)==
+"[object Date]"};f.isRegExp=function(d){return n.call(d)=="[object RegExp]"};f.isNull=function(d){return d===null};f.isUndefined=function(d){return d===void 0};f.noConflict=function(){b._=c;return this};f.identity=function(d){return d};f.times=function(d,e,j){for(var l=0;l<d;l++)e.call(j,l)};f.escape=function(d){return(""+d).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};f.mixin=function(d){B(f.functions(d),function(e){V(e,
+f[e]=d[e])})};var F=0;f.uniqueId=function(d){var e=F++;return d?d+e:e};f.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};f.template=function(d,e){var j=f.templateSettings;j="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+d.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(j.escape,function(o,r){return"',_.escape("+r.replace(/\\'/g,"'")+"),'"}).replace(j.interpolate,function(o,r){return"',"+r.replace(/\\'/g,
+"'")+",'"}).replace(j.evaluate||null,function(o,r){return"');"+r.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";var l=new Function("obj","_",j);return e?l(e,f):function(o){return l.call(this,o,f)}};var I=function(d){this._wrapped=d};f.prototype=I.prototype;var N=function(d,e){return e?f(d).chain():d},V=function(d,e){I.prototype[d]=function(){var j=p.call(arguments);z.call(j,this._wrapped);return N(e.apply(f,
+j),this._chain)}};f.mixin(f);B("pop,push,reverse,shift,sort,splice,unshift".split(","),function(d){var e=h[d];I.prototype[d]=function(){e.apply(this._wrapped,arguments);return N(this._wrapped,this._chain)}});B(["concat","join","slice"],function(d){var e=h[d];I.prototype[d]=function(){return N(e.apply(this._wrapped,arguments),this._chain)}});I.prototype.chain=function(){this._chain=true;return this};I.prototype.value=function(){return this._wrapped}}).call(this);
if(window.IriSP===undefined&&window.__IriSP===undefined)__IriSP=IriSP={};IriSP._=window._.noConflict();IriSP.underscore=IriSP._;
-IriSP.loadLibs=function(a,b,d,h){IriSP.jQuery=null;var f=$LAB.script(a.jQuery).script(a.swfObject).wait().script(a.jQueryUI);if(b.player.type==="jwplayer")f=f.script(a.jwplayer);else{f=f.script(a.popcorn).script(a["popcorn.code"]);if(b.player.type==="youtube")f=f.script(a["popcorn.youtube"]);if(b.player.type==="vimeo")f=f.script(a["popcorn.vimeo"])}for(var l in b.gui.widgets){if(b.gui.widgets[l].type==="PolemicWidget"||b.gui.widgets[l].type==="StackGraphWidget")f.script(a.raphael);b.gui.widgets[l].type===
-"SparklineWidget"&&f.script(a.jquery_sparkline)}f.wait(function(){IriSP.jQuery=window.jQuery.noConflict(true);var p=IriSP.jQuery("<link>",{rel:"stylesheet",type:"text/css",href:a.cssjQueryUI,"class":"dynamic_css"}),u=IriSP.jQuery("<link>",{rel:"stylesheet",type:"text/css",href:b.gui.css,"class":"dynamic_css"});p.appendTo("head");u.appendTo("head");IriSP.setupDataLoader();IriSP.__dataloader.get(d,function(z){IriSP.__jsonMetadata=z;h.call(window)})})};IriSP.SparklineWidget_template="<div class='Ldt-sparklineWidget' style='width: {{width}}px; height: {{height}}px'> <div class='Ldt-sparkLinePositionMarker' style='width: 0px; height: {{height}}px'></div> <div class='Ldt-sparkLineClickOverlay' style='width: {{width}}px; height: {{height}}px'></div> <div class='Ldt-sparkLine' style='width: {{width}}px; height: {{height}}px'>Loading</div></div>";
-IriSP.annotation_template="{{! template for an annotation displayed in a segmentWidget }}<div title='{{divTitle}}' id='{{id}}'\tclass='Ldt-iri-chapter' \tstyle='left: {{startPixel}}px; width: {{pxWidth}}px; background-color:#{{hexa_color}};' \t></div>";IriSP.annotationWidget_template="{{! template for the annotation widget }}<div class='Ldt-AnnotationsWidget'> <!-- ugly div because we want to have a double border --\> <div class='Ldt-Annotation-DoubleBorder'> <div class='Ldt-AnnotationContent'> <div class='Ldt-AnnotationShareIcons'> <a target='_blank' class='Ldt-fbShare' title='share on facebook'></a> <a target='_blank' class='Ldt-TwShare' title='share on twitter'></a> <a target='_blank' class='Ldt-GplusShare' title='share on google+'></a> </div>\t\t <div class='Ldt-SaTitle'></div>\t \t<div class='Ldt-SaDescription'></div> </div> </div></div>";
-IriSP.annotation_loading_template="{{! template shown while the annotation widget is loading }}<div id='Ldt-load-container'><div id='Ldt-loader'> </div> Chargement... </div>";IriSP.annotationsListWidget_template="{{! template for the annotation list widget }}<div class='Ldt-AnnotationsListWidget'> <!-- ugly div because we want to have a double border --\> <div class='Ldt-Annotation-DoubleBorder'> <ul> {{#annotations}} <li> {{! if the url is not present, it means that the annotation exists in the current project }} {{^url}} <a href='#id={{id}}'> {{/url}} {{! otherwise link to url }} {{#url}} <a href='{{url}}#id={{id}}'> {{/url}} <div style='overflow: auto; margin-top: 5px; margin-bottom: 5px;'> <div class='Ldt-AnnotationsList-Caption'> <img src='http://i.imgur.com/aoUlC.jpg'></img> </div> <div class='Ldt-AnnotationsList-Duration'>{{begin}} - {{end}}</div> <div class='Ldt-AnnotationsList-Title'>{{title}}</div> <div class='Ldt-AnnotationsList-Description'>{{desc}}</div> </div> </a> </li> {{/annotations}} </ul> </div></div>";
-IriSP.arrowWidget_template="<div class='Ldt-arrowWidget'></div>";IriSP.createAnnotationWidget_template="{{! template for the annotation creation widget }}<div class='Ldt-createAnnotationWidget'> <!-- ugly div because we want to have a double border --\> <div class='Ldt-createAnnotation-DoubleBorder'> <div class='Ldt-createAnnotation-startScreen'> <div style='margin-bottom: 7px; overflow: auto;'> <div class='Ldt-createAnnotation-Title'></div> <div class='Ldt-createAnnotation-TimeFrame'></div> {{^cinecast_version}} <div class='Ldt-createAnnotation-Minimize' title='Cancel'></img> {{/cinecast_version}} </div> <div class='Ldt-createAnnotation-Container'> <textarea class='Ldt-createAnnotation-Description'></textarea> <div class='Ldt-createAnnotation-profileArrow'> </div> <div class='Ldt-createAnnotation-userAvatar'> {{^user_avatar}} <img src='https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png'></img> {{/user_avatar}} {{#user_avatar}} <img src='{{ user_avatar }}'></img> {{/user_avatar}} </div> </div> <div class='Ldt-createAnnotation-submitButton'> <div style='position: absolute; bottom: 5px; right: 5px;'>Submit</div> </div> <div class='Ldt-createAnnotation-keywords'> Add keywords : </div> {{#polemic_mode}} <div class='Ldt-createAnnotation-polemics'> Add polemic keywords </div> {{/polemic_mode}} </div> <div class='Ldt-createAnnotation-waitScreen' style='display: none; text-align: center'> <img src='{{img_dir}}/spinner.gif'></img> Please wait while your request is being processed... </div> <div class='Ldt-createAnnotation-endScreen' style='display: none'> Thank you, your annotation has been saved.<br> Would you like to share it on social networks ? <div style='margin-top: 12px; text-align: center;'> <a target='_blank' class='Ldt-createAnnotation-endScreen-TweetLink'><img src='{{img_dir}}/tweet_button.png' style='margin-right: 20px;'></img></a> <a target='_blank' class='Ldt-createAnnotation-endScreen-FbLink'><img src='{{img_dir}}/facebook_button.png' style='margin-right: 20px;'></img></a> <a target='_blank' class='Ldt-createAnnotation-endScreen-GplusLink'><img src='{{img_dir}}/gplus_button.png' style='margin-right: 20px;'></img></a> </div> </div> </div></div>";
+IriSP.loadLibs=function(a,b,c,g){IriSP.jQuery=null;var h=$LAB.script(a.jQuery).script(a.swfObject).wait().script(a.jQueryUI);if(b.player.type==="jwplayer")h=h.script(a.jwplayer);else{h=h.script(a.popcorn).script(a["popcorn.code"]);if(b.player.type==="youtube")h=h.script(a["popcorn.youtube"]);if(b.player.type==="vimeo")h=h.script(a["popcorn.vimeo"])}for(var k in b.gui.widgets){if(b.gui.widgets[k].type==="PolemicWidget"||b.gui.widgets[k].type==="StackGraphWidget")h.script(a.raphael);b.gui.widgets[k].type===
+"SparklineWidget"&&h.script(a.jquery_sparkline)}h.wait(function(){IriSP.jQuery=window.jQuery.noConflict(true);var p=IriSP.jQuery("<link>",{rel:"stylesheet",type:"text/css",href:a.cssjQueryUI,"class":"dynamic_css"}),u=IriSP.jQuery("<link>",{rel:"stylesheet",type:"text/css",href:b.gui.css,"class":"dynamic_css"});p.appendTo("head");u.appendTo("head");IriSP.setupDataLoader();IriSP.__dataloader.get(c,function(z){IriSP.__jsonMetadata=z;g.call(window)})})};IriSP.SparklineWidget_template="<div class='Ldt-sparklineWidget' style='width: {{width}}px; height: {{height}}px'> <div class='Ldt-sparkLinePositionMarker' style='width: 0px; height: {{height}}px'></div> <div class='Ldt-sparkLineClickOverlay' style='width: {{width}}px; height: {{height}}px'></div> <div class='Ldt-sparkLine' style='width: {{width}}px; height: {{height}}px'>Loading</div></div>";
+IriSP.annotation_template="{{! template for an annotation displayed in a segmentWidget }}<div title='{{divTitle}}' id='{{id}}'\tclass='Ldt-iri-chapter' \tstyle='left: {{startPixel}}px; width: {{pxWidth}}px; background-color:#{{hexa_color}};' \t></div>";IriSP.annotationWidget_template="{{! template for the annotation widget }}<div class='Ldt-AnnotationsWidget'> <!-- ugly div because we want to have a double border --\> <div class='Ldt-Annotation-DoubleBorder'> <div class='Ldt-AnnotationContent'> <div class='Ldt-AnnotationShareIcons'> <a target='_blank' class='Ldt-fbShare' title='share on facebook'></a> <a target='_blank' class='Ldt-TwShare' title='share on twitter'></a> <a target='_blank' class='Ldt-GplusShare' title='share on google+'></a> </div> <div class='Ldt-SaTitle'></div> <div class='Ldt-SaDescription'></div> <div class='Ldt-SaKeywords'></div> </div> </div></div>";
+IriSP.annotation_loading_template="{{! template shown while the annotation widget is loading }}<div id='Ldt-load-container'><div id='Ldt-loader'> </div> Chargement... </div>";IriSP.annotationsListWidget_template="{{! template for the annotation list widget }}<div class='Ldt-AnnotationsListWidget'> <!-- ugly div because we want to have a double border --\> <div class='Ldt-Annotation-DoubleBorder'> <ul> {{#annotations}} <li> {{! if the url is not present, it means that the annotation exists in the current project }} {{^url}} <a href='#id={{id}}'> {{/url}} {{! otherwise link to url }} {{#url}} <a href='{{url}}#id={{id}}'> {{/url}} <div style='overflow: auto; margin-top: 5px; margin-bottom: 5px;'> <div class='Ldt-AnnotationsList-Caption'> <img src='{{img_dir}}/video_sequence.png'></img> </div> <div class='Ldt-AnnotationsList-Duration'>{{begin}} - {{end}}</div> <div class='Ldt-AnnotationsList-Title'>{{title}}</div> <div class='Ldt-AnnotationsList-Description'>{{desc}}</div> </div> </a> </li> {{/annotations}} </ul> </div></div>";
+IriSP.arrowWidget_template="<div class='Ldt-arrowWidget'></div>";IriSP.createAnnotationWidget_template="{{! template for the annotation creation widget }}<div class='Ldt-createAnnotationWidget'> <!-- ugly div because we want to have a double border --\> <div class='Ldt-createAnnotation-DoubleBorder'> <div class='Ldt-createAnnotation-startScreen'> <div style='margin-bottom: 7px; overflow: auto;'> <div class='Ldt-createAnnotation-Title'></div> <div class='Ldt-createAnnotation-TimeFrame'></div> {{^cinecast_version}} <div class='Ldt-createAnnotation-Minimize' title='Cancel'></div> {{/cinecast_version}} </div> <div class='Ldt-createAnnotation-Container'> <textarea class='Ldt-createAnnotation-Description'></textarea> <div class='Ldt-createAnnotation-profileArrow'> </div> <div class='Ldt-createAnnotation-userAvatar'> {{^user_avatar}} <img src='https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png'></img> {{/user_avatar}} {{#user_avatar}} <img src='{{ user_avatar }}'></img> {{/user_avatar}} </div> </div> <div class='Ldt-createAnnotation-submitButton'> <div style='position: absolute; bottom: 5px; right: 5px;'>Submit</div> </div> <div class='Ldt-createAnnotation-keywords'> Add keywords : </div> {{#polemic_mode}} <div class='Ldt-createAnnotation-polemics'> Add polemic keywords </div> {{/polemic_mode}} </div> <div class='Ldt-createAnnotation-waitScreen' style='display: none; text-align: center'> <img src='{{img_dir}}/spinner.gif'></img> Please wait while your request is being processed... </div> <div class='Ldt-createAnnotation-errorScreen' style='display: none; text-align: center'> <div class='Ldt-createAnnotation-Minimize' title='Hide'></div> An error happened while contacting the server. Your annotation has not been saved. </div> <div class='Ldt-createAnnotation-endScreen' style='display: none'> <div class='Ldt-createAnnotation-Minimize' title='Hide'></div> Thank you, your annotation has been saved.<br> Would you like to share it on social networks ? <div style='margin-top: 12px; text-align: center;'> <a target='_blank' class='Ldt-createAnnotation-endScreen-TweetLink'><img src='{{img_dir}}/tweet_button.png' style='margin-right: 20px;'></img></a> <a target='_blank' class='Ldt-createAnnotation-endScreen-FbLink'><img src='{{img_dir}}/facebook_button.png' style='margin-right: 20px;'></img></a> <a target='_blank' class='Ldt-createAnnotation-endScreen-GplusLink'><img src='{{img_dir}}/gplus_button.png' style='margin-right: 20px;'></img></a> </div> </div> </div></div>";
IriSP.createAnnotationWidget_festivalCinecast_template="{{! template for the annotation creation widget specific for the cinecast festival}}<div class='Ldt-createAnnotationWidget'> <!-- ugly div because we want to have a double border --\> <div class='Ldt-createAnnotation-DoubleBorder'> <div style='margin-bottom: 7px; overflow: auto;'> <div class='Ldt-createAnnotation-Title'></div> <div class='Ldt-createAnnotation-TimeFrame'></div> </div> <div class='Ldt-createAnnotation-Container'> <textarea class='Ldt-createAnnotation-Description'></textarea> <div class='Ldt-createAnnotation-profileArrow'> <img src='{{img_dir}}/annotate_arrow.png'></img> </div> <div class='Ldt-createAnnotation-userAvatar'> <img src='https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png'></img> </div> </div> <div class='Ldt-createAnnotation-keywords'> Add keywords : </div> <div class='Ldt-createAnnotation-submitButton'> <div style='position: absolute; bottom: 10pt; right: 11pt;'>Submit</div> </div> <div class='Ldt-createAnnotation-endScreen' style='display: none'> Thank you, your annotation has been saved.<br> Would you like to share it on social networks ? <div style='margin-top: 12px; text-align: center;'> <a target='_blank' class='Ldt-createAnnotation-endScreen-TweetLink'><img src='{{img_dir}}/tweet_button.png' style='margin-right: 20px;'></img></a> <a target='_blank' class='Ldt-createAnnotation-endScreen-FbLink'><img src='{{img_dir}}/facebook_button.png' style='margin-right: 20px;'></img></a> <a target='_blank' class='Ldt-createAnnotation-endScreen-GplusLink'><img src='{{img_dir}}/gplus_button.png' style='margin-right: 20px;'></img></a> </div> </div> </div></div>";
IriSP.createAnnotation_errorMessage_template="<p class='Ldt-createAnnotation-errorMessage'> You must enter text to submit an annotation</p>";IriSP.overlay_marker_template="{{! the template for the small bars which is z-indexed over our segment widget }}<div class='Ldt-SegmentPositionMarker' style='background-color: #F7268E;'></div>";IriSP.player_template="{{! template for the radio player }}<div class='Ldt-controler demo'>\t<div class='Ldt-LeftPlayerControls'> <div class='Ldt-button Ldt-CtrlPlay' title='Play/Pause'></div>\t\t<div class='Ldt-button Ldt-CtrlAnnotate' title='Annotate'></div> <div class='Ldt-button Ldt-CtrlSearch' title='Search'></div> <div class='LdtSearch'> <input class='LdtSearchInput' style='margin-top: 2px; margin-bottom: 2px;'></input> </div> \t</div>\t<div class='Ldt-RightPlayerControls'> <div class='Ldt-Time'> <div class='Ldt-ElapsedTime' title='Elapsed time'>00:00</div> <div class='Ldt-TimeSeparator'>/</div> <div class='Ldt-TotalTime' title='Total time'>00:00</div> </div>\t\t<div class='Ldt-button Ldt-CtrlSound' title='Mute/Unmute'></div>\t</div></div>";
-IriSP.search_template="{{! template for the search container }}<div class='LdtSearchContainer'\tstyle='margin-left: {{margin_left}}; position: absolute; margin-top: -60px;'>\t<div class='LdtSearch'\t\tstyle='display: none; background-color: #EEE; width: 165px; boder: 1px; border-color: #CFCFCF; position: absolute; text-align: center;'>\t\t<input class='LdtSearchInput'\t\t\tstyle='margin-top: 2px; margin-bottom: 2px;' />\t</div></div><div class='cleaner'></div>";IriSP.share_template="{{! social network sharing template }}<a onclick='__IriSP.MyApiPlayer.share('delicious');' title='partager avec delicious'><span class='share shareDelicious'> </span></a>\t\t<a onclick='__IriSP.MyApiPlayer.share('facebook');' title='partager avec facebook'> <span class='share shareFacebook'> </span></a><a onclick='__IriSP.MyApiPlayer.share('twitter');' title='partager avec twitter'> <span class='share shareTwitter'> </span></a><a onclick='__IriSP.MyApiPlayer.share('myspace');' title='partager avec Myspace'> <span class='share shareMySpace'> </span></a>";
+IriSP.search_template="{{! template for the search container }}<div class='LdtSearchContainer'\tstyle='margin-left: {{margin_left}}; position: absolute; margin-top: -60px;'>\t<div class='LdtSearch'\t\tstyle='display: none; background-color: #EEE; width: 165px; border-color: #CFCFCF; position: absolute; text-align: center;'>\t\t<input class='LdtSearchInput'\t\t\tstyle='margin-top: 1px; margin-bottom: 2px;' />\t</div></div><div class='cleaner'></div>";IriSP.share_template="{{! social network sharing template }}<a onclick='__IriSP.MyApiPlayer.share('delicious');' title='partager avec delicious'><span class='share shareDelicious'> </span></a>\t\t<a onclick='__IriSP.MyApiPlayer.share('facebook');' title='partager avec facebook'> <span class='share shareFacebook'> </span></a><a onclick='__IriSP.MyApiPlayer.share('twitter');' title='partager avec twitter'> <span class='share shareTwitter'> </span></a><a onclick='__IriSP.MyApiPlayer.share('myspace');' title='partager avec Myspace'> <span class='share shareMySpace'> </span></a>";
IriSP.sliceWidget_template="{{! template for the slice widget }}<div class='Ldt-sliceWidget'> {{! the whole bar }} <div class='Ldt-sliceBackground'></div> <div class='Ldt-sliceLeftHandle'></div> {{! the zone which represents our slice }} <div class='Ldt-sliceZone'></div> <div class='Ldt-sliceRightHandle'></div></div>";IriSP.sliderWidget_template="{{! template for the slider widget - it's composed of two divs we one overlayed on top of the other }}<div class='Ldt-sliderBackground'></div><div class='Ldt-sliderForeground'></div><div class='Ldt-sliderPositionMarker'></div>";
IriSP.tooltip_template="{{! template used by the jquery ui tooltip }}<div class='Ldt-tooltip'> <div class='title'>{{title}}</div> <div class='time'>{{begin}} : {{end}} </div> <div class='description'>{{description}}</div></div>";IriSP.tooltipWidget_template="{{! template for the tooltip widget }}<div class='tip'>\t<div class='tipcolor' style='height:10px;width:10px'></div>\t<div class='tiptext'></div>";IriSP.tweetWidget_template="{{! template for the tweet widget }}<div class='Ldt-tweetWidget'> <div class='Ldt-tweet-DoubleBorder'> <div class='Ldt-tweetWidgetKeepOpen' title='dont minimize automatically'></div> <div class='Ldt-tweetWidgetMinimize' title='minimize window'></div> <div class='Ldt-tweetAvatar'></div> <div class='Ldt-tweetAvatar-profileArrow'></div> <div class='Ldt-tweetContents'></div> <a href='' target='_blank' class='Ldt-Retweet'><div class='Ldt-RetweetIcon'></div> - Retweet </a> <a href='' target='_blank' class='Ldt-TweetReply'><div class='Ldt-TweetReplyIcon'></div> - Reply</a> </div></div>";
-IriSP.traceNum=0;IriSP.trace=function(){};IriSP.wrap=function(a,b){return function(){var d=Array.prototype.slice.call(arguments,0);return b.apply(a,d)}};IriSP.timeToPourcent=function(a,b){a=Math.abs(a);b=Math.abs(b);return Math.floor(a/b*100)};IriSP.padWithZeros=function(a){return Math.abs(a)<10?"0"+a.toString():a.toString()};IriSP.msToTime=function(a){return IriSP.secondsToTime(a/1E3)};
-IriSP.secondsToTime=function(a){var b=Math.abs(parseInt(a/3600)%24),d=Math.abs(parseInt(a/60)%60);a=parseFloat(Math.abs(a%60).toFixed(0));return{hours:b,minutes:d,seconds:a,toString:function(){var h="";if(b>0)h=IriSP.padWithZeros(this.hours)+":";h+=IriSP.padWithZeros(this.minutes)+":"+IriSP.padWithZeros(this.seconds);return h}}};
-IriSP.formatTweet=function(a){var b=[[/((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)/gi,"<a href='$1'>$1</a>"],[/@(\w+)/gi,"<a href='http://twitter.com/$1'>@$1</a>"],[/#(\w+)/gi,"<a href='http://twitter.com/search?q=%23$1'>#$1</a>"],[/(\+\+)/gi,"<span class='Ldt-PolemicPlusPlus'>$1</span>"],[/(--)/gi,"<span class='Ldt-PolemicMinusMinus'>$1</span>"],[/(==)/gi,"<span class='Ldt-PolemicEqualEqual'>$1</span>"],[/(\?\?)/gi,"<span class='Ldt-PolemicQuestion'>$1</span>"]],d=0;for(d=0;d<b.length;d++)a=
-a.replace(b[d][0],b[d][1]);return a};IriSP.countProperties=function(a){var b=0;for(var d in a)a.hasOwnProperty(d)&&++b;return b};IriSP.DEC_HEXA_COLOR=function(a){a=(+a).toString(16);var b="";if(a.length<6)for(var d=0;d<6-a.length;d++)b+="0";return b+a};IriSP.templToHTML=function(a,b){var d=IriSP.jQuery.extend(IriSP.default_templates_vars,b);return Mustache.to_html(a,d)};
+IriSP.traceNum=0;IriSP.trace=function(){};IriSP.wrap=function(a,b){return function(){var c=Array.prototype.slice.call(arguments,0);return b.apply(a,c)}};IriSP.timeToPourcent=function(a,b){a=Math.abs(a);b=Math.abs(b);return Math.floor(a/b*100)};IriSP.padWithZeros=function(a){return Math.abs(a)<10?"0"+a.toString():a.toString()};IriSP.msToTime=function(a){return IriSP.secondsToTime(a/1E3)};
+IriSP.secondsToTime=function(a){var b=Math.abs(parseInt(a/3600)%24),c=Math.abs(parseInt(a/60)%60);a=parseFloat(Math.abs(a%60).toFixed(0));return{hours:b,minutes:c,seconds:a,toString:function(){var g="";if(b>0)g=IriSP.padWithZeros(this.hours)+":";g+=IriSP.padWithZeros(this.minutes)+":"+IriSP.padWithZeros(this.seconds);return g}}};
+IriSP.formatTweet=function(a){var b=[[/((https?:\/\/)?[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?)/gi,"<a href='$1'>$1</a>"],[/@(\w+)/gi,"<a href='http://twitter.com/$1'>@$1</a>"],[/#(\w+)/gi,"<a href='http://twitter.com/search?q=%23$1'>#$1</a>"],[/(\+\+)/gi,"<span class='Ldt-PolemicPlusPlus'>$1</span>"],[/(--)/gi,"<span class='Ldt-PolemicMinusMinus'>$1</span>"],[/(==)/gi,"<span class='Ldt-PolemicEqualEqual'>$1</span>"],[/(\?\?)/gi,"<span class='Ldt-PolemicQuestion'>$1</span>"]],c=0;for(c=0;c<b.length;c++)a=
+a.replace(b[c][0],b[c][1]);return a};IriSP.countProperties=function(a){var b=0;for(var c in a)a.hasOwnProperty(c)&&++b;return b};IriSP.DEC_HEXA_COLOR=function(a){a=(+a).toString(16);var b="";if(a.length<6)for(var c=0;c<6-a.length;c++)b+="0";return b+a};IriSP.templToHTML=function(a,b){var c=IriSP.jQuery.extend(IriSP.default_templates_vars,b);return Mustache.to_html(a,c)};
IriSP.encodeURI=function(a){return encodeURIComponent(a).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")};IriSP.__guidCounter=0;IriSP.guid=function(a){IriSP.__guidCounter+=1;return a+IriSP.__guidCounter};IriSP.mkFbUrl=function(a,b){if(typeof b==="undefined")b="I'm watching ";return"http://www.facebook.com/share.php?u="+IriSP.encodeURI(b)+IriSP.shorten_url(a)};
IriSP.mkTweetUrl=function(a,b){if(typeof b==="undefined")b="I'm watching ";return"http://twitter.com/home?status="+IriSP.encodeURI(b)+IriSP.shorten_url(a)};IriSP.mkGplusUrl=function(a){return"https://plusone.google.com/_/+1/confirm?hl=en&url="+IriSP.shorten_url(a)};IriSP.null_or_undefined=function(a){return typeof a==="undefined"||a===null};IriSP.shorten_url=function(a){if(IriSP.config.shortener.hasOwnProperty("shortening_function"))return IriSP.config.shortener.shortening_function(a);return a};
-IriSP.clean_substr=function(a,b,d){a=a.substr(b,d).substr(b,d).split(" ");a.pop();return a.join(" ")};IriSP.PopcornReplacement={};IriSP.PopcornReplacement.player=function(a){this.callbacks={onReady:IriSP.wrap(this,this.__initApi),onTime:IriSP.wrap(this,this.__timeHandler),onPlay:IriSP.wrap(this,this.__playHandler),onPause:IriSP.wrap(this,this.__pauseHandler),onSeek:IriSP.wrap(this,this.__seekHandler)};this.media={paused:true,muted:false};this.container=a.slice(1);this.msgPump={};this.__codes=[]};
-IriSP.PopcornReplacement.player.prototype.listen=function(a,b){this.msgPump.hasOwnProperty(a)||(this.msgPump[a]=[]);this.msgPump[a].push(b)};IriSP.PopcornReplacement.player.prototype.trigger=function(a,b){if(this.msgPump.hasOwnProperty(a))for(var d=this.msgPump[a],h=0;h<d.length;h++)d[h].call(window,b)};
-IriSP.PopcornReplacement.player.prototype.guid=function(a){var b="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(d){var h=Math.random()*16|0;return(d=="x"?h:h&3|8).toString(16)});return a+b};IriSP.PopcornReplacement.player.prototype.__initApi=function(){this.trigger("loadedmetadata");this.media.muted=this.playerFns.getMute();var a=0;for(a=0;a<this.__codes.length;a++){var b=this.__codes[a];0==b.start&&b.onStart();0==b.end&&b.onEnd()}};
+IriSP.clean_substr=function(a,b,c){a=a.substr(b,c).substr(b,c).split(" ");a.pop();return a.join(" ")};IriSP.PopcornReplacement={};
+IriSP.PopcornReplacement.player=function(a,b){this.callbacks={onReady:IriSP.wrap(this,this.__initApi),onTime:IriSP.wrap(this,this.__timeHandler),onPlay:IriSP.wrap(this,this.__playHandler),onPause:IriSP.wrap(this,this.__pauseHandler),onSeek:IriSP.wrap(this,this.__seekHandler)};this.media={paused:true,muted:false};this.container=a.slice(1);this.msgPump={};this.__codes=[];this._options=b};
+IriSP.PopcornReplacement.player.prototype.listen=function(a,b){this.msgPump.hasOwnProperty(a)||(this.msgPump[a]=[]);this.msgPump[a].push(b)};IriSP.PopcornReplacement.player.prototype.trigger=function(a,b){if(this.msgPump.hasOwnProperty(a))for(var c=this.msgPump[a],g=0;g<c.length;g++)c[g].call(window,b)};
+IriSP.PopcornReplacement.player.prototype.guid=function(a){var b="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var g=Math.random()*16|0;return(c=="x"?g:g&3|8).toString(16)});return a+b};IriSP.PopcornReplacement.player.prototype.__initApi=function(){this.trigger("loadedmetadata");this.media.muted=this.playerFns.getMute();var a=0;for(a=0;a<this.__codes.length;a++){var b=this.__codes[a];0==b.start&&b.onStart();0==b.end&&b.onEnd()}};
IriSP.PopcornReplacement.player.prototype.currentTime=function(a){if(typeof a==="undefined")return this.playerFns.getPosition();else{a=+a;this.playerFns.seek(a);return a}};IriSP.PopcornReplacement.player.prototype.play=function(){this.media.paused=false;this.trigger("play");this.playerFns.play()};IriSP.PopcornReplacement.player.prototype.pause=function(){if(!this.media.paused){this.media.paused=true;this.trigger("pause");this.playerFns.pause()}};
IriSP.PopcornReplacement.player.prototype.muted=function(a){if(typeof a!=="undefined")if(this.playerFns.getMute()!==a){if(a){this.playerFns.setMute(true);this.media.muted=true}else{this.playerFns.setMute(false);this.media.muted=false}this.trigger("volumechange")}return this.playerFns.getMute()};IriSP.PopcornReplacement.player.prototype.mute=IriSP.PopcornReplacement.player.prototype.muted;IriSP.PopcornReplacement.player.prototype.code=function(a){this.__codes.push(a);return this};
-IriSP.PopcornReplacement.player.prototype.__timeHandler=function(a){a=a.position;var b=0;for(b=0;b<this.__codes.length;b++){var d=this.__codes[b];a>=d.start&&a<d.end&&a-1<=d.start&&d.onStart();a>d.start&&a>d.end&&a-1<=d.end&&d.onEnd()}this.trigger("timeupdate")};
-IriSP.PopcornReplacement.player.prototype.__seekHandler=function(a){var b=0;for(b=0;b<this.__codes.length;b++){var d=this.__codes[b];a.position>=d.start&&a.position<d.end&&d.onEnd()}for(b=0;b<this.__codes.length;b++){d=this.__codes[b];if(typeof a.offset==="undefined")a.offset=0;a.offset>=d.start&&a.offset<d.end&&d.onStart()}this.trigger("seeked",a.offset)};IriSP.PopcornReplacement.player.prototype.__playHandler=function(){this.media.paused=false;this.trigger("play")};
+IriSP.PopcornReplacement.player.prototype.__timeHandler=function(a){a=a.position;var b=0;for(b=0;b<this.__codes.length;b++){var c=this.__codes[b];a>=c.start&&a<c.end&&a-1<=c.start&&c.onStart();a>c.start&&a>c.end&&a-1<=c.end&&c.onEnd()}this.trigger("timeupdate")};
+IriSP.PopcornReplacement.player.prototype.__seekHandler=function(a){var b=0;for(b=0;b<this.__codes.length;b++){var c=this.__codes[b];a.position>=c.start&&a.position<c.end&&c.onEnd()}for(b=0;b<this.__codes.length;b++){c=this.__codes[b];if(typeof a.offset==="undefined")a.offset=0;a.offset>=c.start&&a.offset<c.end&&c.onStart()}this.trigger("seeked",a.offset)};IriSP.PopcornReplacement.player.prototype.__playHandler=function(){this.media.paused=false;this.trigger("play")};
IriSP.PopcornReplacement.player.prototype.__pauseHandler=function(){this.media.paused=true;this.trigger("pause")};IriSP.PopcornReplacement.player.prototype.roundTime=function(){var a=this.currentTime();return Math.round(a)};IriSP.DataLoader=function(){this._cache={};this._callbacks={}};
-IriSP.DataLoader.prototype.get=function(a,b){var d=a.split("&")[0];if(this._cache.hasOwnProperty(d))b(this._cache[d]);else if(this._callbacks.hasOwnProperty(d))this._callbacks[d].push(b);else{this._callbacks[d]=[];this._callbacks[d].push(b);var h=function(f){this._cache[d]=f;for(f=f=0;f<this._callbacks[d].length;f++)this._callbacks[d][f](this._cache[d])};a.indexOf(document.location.hostname)===-1&&a.indexOf("http://")!==-1?IriSP.jQuery.get(a,{},IriSP.wrap(this,h),"jsonp"):IriSP.jQuery.get(a,IriSP.wrap(this,
-h))}};IriSP.Serializer=function(a,b){this._DataLoader=a;this._url=b;this._data=[]};IriSP.Serializer.prototype.serialize=function(){};IriSP.Serializer.prototype.deserialize=function(){};IriSP.Serializer.prototype.currentMedia=function(){};IriSP.Serializer.prototype.sync=function(a){a.call(this,this._data)};IriSP.SerializerFactory=function(a){this._dataloader=a};
-IriSP.SerializerFactory.prototype.getSerializer=function(a){if(a===undefined)return IriSP.Serializer("","");switch(a.type){case "json":return new IriSP.JSONSerializer(this._dataloader,a.src);case "dummy":return new IriSP.MockSerializer(this._dataloader,a.src);case "empty":return new IriSP.Serializer("","empty");default:return}};IriSP.defaults={};IriSP.lib={};IriSP.widgetsDefaults={};IriSP.paths={};IriSP.libdir="/mdp/src/js/libs/";IriSP.jwplayer_swf_path="/mdp/test/libs/player.swf";
-IriSP.platform_url="http://localhost/pf";IriSP.default_templates_vars={};
+IriSP.DataLoader.prototype.get=function(a,b){var c=a.split("&")[0];if(this._cache.hasOwnProperty(c))b(this._cache[c]);else if(this._callbacks.hasOwnProperty(c))this._callbacks[c].push(b);else{this._callbacks[c]=[];this._callbacks[c].push(b);var g=function(h){this._cache[c]=h;for(h=h=0;h<this._callbacks[c].length;h++)this._callbacks[c][h](this._cache[c])};a.indexOf(document.location.hostname)===-1&&a.indexOf("http://")!==-1?IriSP.jQuery.get(a,{},IriSP.wrap(this,g),"jsonp"):IriSP.jQuery.get(a,IriSP.wrap(this,
+g))}};IriSP.Serializer=function(a,b){this._DataLoader=a;this._url=b;this._data=[]};IriSP.Serializer.prototype.serialize=function(){};IriSP.Serializer.prototype.deserialize=function(){};IriSP.Serializer.prototype.currentMedia=function(){};IriSP.Serializer.prototype.sync=function(a){a.call(this,this._data)};IriSP.SerializerFactory=function(a){this._dataloader=a};
+IriSP.SerializerFactory.prototype.getSerializer=function(a){if(a===undefined)return IriSP.Serializer("","");switch(a.type){case "json":return new IriSP.JSONSerializer(this._dataloader,a.src);case "dummy":return new IriSP.MockSerializer(this._dataloader,a.src);case "empty":return new IriSP.Serializer("","empty");default:return}};IriSP.defaults={};IriSP.lib={};IriSP.widgetsDefaults={};IriSP.paths={};IriSP.libdir="";IriSP.jwplayer_swf_path="";IriSP.platform_url="";IriSP.default_templates_vars={};
IriSP.defaults.lib=function(a){if(IriSP.null_or_undefined(a))a=IriSP.libdir;return{jQuery:"http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js",jQueryUI:"http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.js",jQueryToolTip:"http://cdn.jquerytools.org/1.2.4/all/jquery.tools.min.js",swfObject:"http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js",cssjQueryUI:"http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css",popcorn:a+"popcorn.js",jwplayer:a+
"jwplayer.js",popcornReplacement:a+"pop.js",raphael:a+"raphael.js",jquery_sparkline:a+"jquery.sparkline.js","popcorn.mediafragment":a+"popcorn.mediafragment.js","popcorn.code":a+"popcorn.code.js","popcorn.jwplayer":a+"popcorn.jwplayer.js","popcorn.youtube":a+"popcorn.youtube.js"}};IriSP.config={};IriSP.config.shortener={};
IriSP.defaults.widgetsDefaults=function(a){if(IriSP.null_or_undefined(a))a=IriSP.platform_url;return{LayoutManager:{spacer_div_height:"0px"},PlayerWidget:{},AnnotationsWidget:{share_text:"I'm watching ",fb_link:"http://www.facebook.com/share.php?u=",tw_link:"http://twitter.com/home?status=",gplus_link:""},TweetsWidget:{default_profile_picture:"https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png",tweet_display_period:1E4},SliderWidget:{minimize_period:850},createAnnotationWidget:{keywords:["#faux-raccord",
-"#mot-clef"],polemic_mode:true,polemics:{"++":"positive","--":"negative","==":"reference","??":"question"},cinecast_version:true},SparklineWidget:{column_width:10},Main:{autoplay:true},AnnotationsListWidget:{ajax_mode:true,ajax_url:a+"/ldtplatform/api/ldt/segments/{media}/{begin}/{end}",ajax_granularity:1E4,project_url:a+"/ldtplatform/ldt/front/player/"}}};IriSP.defaults.paths={imgs:"/mdp/src/css/imgs"};IriSP.user={name:"loic",avatar:"http://a1.twimg.com/profile_images/39270812/loicempuria_normal.jpg"};
+"#mot-clef"],polemic_mode:true,polemics:{"++":"positive","--":"negative","==":"reference","??":"question"},cinecast_version:true},SparklineWidget:{column_width:10},Main:{autoplay:true},AnnotationsListWidget:{ajax_mode:true,ajax_url:a+"/ldtplatform/api/ldt/segments/{media}/{begin}/{end}",ajax_granularity:1E4,project_url:a+"/ldtplatform/ldt/front/player/"}}};IriSP.defaults.user=function(){return{name:"Anonymous user",avatar:IriSP.paths.imgs+"/user_default_icon.png"}};IriSP.defaults.paths={imgs:""};
IriSP.defaults.default_templates_vars=function(){return{img_dir:IriSP.paths.imgs}};
-IriSP.Widget=function(a,b,d){if(b===undefined||b===null)b={};this._Popcorn=a;this._config=b;this._serializer=d;if(b.hasOwnProperty("container")){this._id=b.container;this.selector=IriSP.jQuery("#"+this._id)}if(b.hasOwnProperty("spacer")){this._spacerId=b.spacer;this.spacer=IriSP.jQuery("#"+this._spacerId)}if(b.hasOwnProperty("width"))this.width=b.width;if(b.hasOwnProperty("height"))this.height=b.height;if(b.hasOwnProperty("heightmax"))this.heightmax=b.heightmax;if(b.hasOwnProperty("widthmax"))this.widthmax=
-b.widthmax;if(b.hasOwnProperty("layoutManager"))this.layoutManager=b.layoutManager};IriSP.Widget.prototype.draw=function(){};IriSP.Widget.prototype.redraw=function(){};IriSP.Module=function(a,b,d){if(b===undefined||b===null)b={};this._Popcorn=a;this._config=b;this._serializer=d};
+IriSP.Widget=function(a,b,c){if(b===undefined||b===null)b={};this._Popcorn=a;this._config=b;this._serializer=c;if(b.hasOwnProperty("container")){this._id=b.container;this.selector=IriSP.jQuery("#"+this._id)}if(b.hasOwnProperty("spacer")){this._spacerId=b.spacer;this.spacer=IriSP.jQuery("#"+this._spacerId)}if(b.hasOwnProperty("width"))this.width=b.width;if(b.hasOwnProperty("height"))this.height=b.height;if(b.hasOwnProperty("heightmax"))this.heightmax=b.heightmax;if(b.hasOwnProperty("widthmax"))this.widthmax=
+b.widthmax;if(b.hasOwnProperty("layoutManager"))this.layoutManager=b.layoutManager};IriSP.Widget.prototype.draw=function(){};IriSP.Widget.prototype.redraw=function(){};IriSP.Module=function(a,b,c){if(b===undefined||b===null)b={};this._Popcorn=a;this._config=b;this._serializer=c};
IriSP.LayoutManager=function(a){this._Popcorn=null;this._widgets=[];this._div="LdtPlayer";this._width=640;if(a===undefined)a={};if(a.hasOwnProperty("container"))this._div=a.container;if(a.hasOwnProperty("width"))this._width=a.width;if(a.hasOwnProperty("height"))this._height=a.height;this.selector=IriSP.jQuery("#"+this._div);this.selector.css("width",this._width);this._height!==undefined&&this.selector.css("height",this._height)};
IriSP.LayoutManager.prototype.setPopcornInstance=function(a){this._Popcorn=a};
-IriSP.LayoutManager.prototype.createDiv=function(a){if(typeof a==="undefined")a="";var b=IriSP.guid(this._div+"_widget_"+a+"_"),d=IriSP.guid("LdtPlayer_spacer_");this._widgets.push([a,b]);a=Mustache.to_html("<div id='{{id}}' style='width: {{width}}px; position: relative;'></div",{id:b,width:this._width});var h=Mustache.to_html("<div id='{{spacer_id}}' style='width: {{width}}px; position: relative; height: {{spacer_div_height}};'></div",{spacer_id:d,width:this._width,spacer_div_height:IriSP.widgetsDefaults.LayoutManager.spacer_div_height});
-this.selector.append(a);this.selector.append(h);return[b,d]};IriSP.setupDataLoader=function(){IriSP.__dataloader=new IriSP.DataLoader};
-IriSP.configurePopcorn=function(a,b){var d,h=a.createDiv()[0];switch(b.type){case "html5":var f=Popcorn.guid("video");IriSP.jQuery("#"+h).append("<video src='"+b.file+"' id='"+f+"'></video>");b.hasOwnProperty("width")&&IriSP.jQuery("#"+h).css("width",b.width);b.hasOwnProperty("height")&&IriSP.jQuery("#"+h).css("height",b.height);d=Popcorn("#"+f);break;case "jwplayer":f=IriSP.jQuery.extend({},b);delete f.container;delete f.type;if(b.provider==="rtmp"&&!f.hasOwnProperty("file")&&!f.hasOwnProperty("streamer")){if(typeof IriSP.__jsonMetadata===
-"undefined")break;f.file="";f.streamer="";d=IriSP.__jsonMetadata.medias[0].href.split("/");for(var l=0;l<d.length;l++)if(l<4)f.streamer+=d[l]+"/";else{f.file+=d[l];if(l<d.length-1)f.file+="/"}}if(!b.hasOwnProperty("flashplayer"))f.flashplayer=IriSP.jwplayer_swf_path;b.hasOwnProperty("controlbar.position")||(f["controlbar.position"]="none");d=new IriSP.PopcornReplacement.jwplayer("#"+h,f);break;case "youtube":f=IriSP.jQuery.extend({},b);delete f.container;f.controls=0;f.autostart=false;templ="width: {{width}}px; height: {{height}}px;";
-d=Mustache.to_html(templ,{width:f.width,height:f.height});IriSP.jQuery("#"+h).attr("style",d);d=Popcorn.youtube("#"+h,f.video,f);break;case "allocine":d=new IriSP.PopcornReplacement.allocine("#"+h,b);break;default:d=undefined}return d};IriSP.configureWidgets=function(a,b,d){var h=new IriSP.SerializerFactory(IriSP.__dataloader),f=[],l;for(l=0;l<d.widgets.length;l++){var p=IriSP.instantiateWidget(a,h,b,d.widgets[l]);f.push(p)}return f};
-IriSP.configureModules=function(a,b){var d=new IriSP.SerializerFactory(IriSP.__dataloader),h=[],f;for(f=0;f<b.length;f++){var l=b[f],p=d.getSerializer(l.metadata);l=new IriSP[l.type](a,l,p);h.push(l)}return h};
-IriSP.instantiateWidget=function(a,b,d,h){var f=IriSP.jQuery.extend({},h);if(!f.hasOwnProperty("container")){var l=d.createDiv(h.type),p=l[1];f.container=l[0];f.spacer=p;f.layoutManager=d}l=b.getSerializer(h.metadata);if(typeof l=="undefined")debugger;f=new IriSP[h.type](a,f,l);if(h.hasOwnProperty("requires"))for(p=p=0;p<h.requires.length;p++)f[h.requires[p].type]=IriSP.instantiateWidget(a,b,d,h.requires[p]);l.sync(IriSP.wrap(f,function(){this.draw()}));return f};
-IriSP.configureDefaults=function(a,b){IriSP.lib=IriSP.underscore.defaults(IriSP.lib,IriSP.defaults.lib(a));var d=IriSP.defaults.widgetsDefaults(b);for(var h in d){if(IriSP.null_or_undefined(IriSP.widgetsDefaults[h]))IriSP.widgetsDefaults[h]={};IriSP.widgetsDefaults[h]=IriSP.underscore.defaults(IriSP.widgetsDefaults[h],d[h])}IriSP.paths=IriSP.underscore.defaults(IriSP.paths,IriSP.defaults.paths);IriSP.default_templates_vars=IriSP.underscore.defaults(IriSP.default_templates_vars,IriSP.defaults.default_templates_vars())};
-IriSP.initPlayer=function(a,b,d,h){IriSP.configureDefaults(d,h);IriSP.loadLibs(IriSP.lib,a,b,function(){var f=new IriSP.LayoutManager(a.gui),l=IriSP.configurePopcorn(f,a.player);IriSP.configureWidgets(l,f,a.gui);IriSP.configureModules(l,a.modules)})};
-IriSP.PopcornReplacement.jwplayer=function(a,b){IriSP.PopcornReplacement.player.call(this,a,b);this.media.duration=b.duration;this.playerFns={play:function(){return jwplayer(this.container).play()},pause:function(){return jwplayer(this.container).pause()},getPosition:function(){return jwplayer(this.container).getPosition()},seek:function(d){return jwplayer(this.container).seek(d)},getMute:function(){return jwplayer(this.container).getMute()},setMute:function(d){return jwplayer(this.container).setMute(d)}};
+IriSP.LayoutManager.prototype.createDiv=function(a){if(typeof a==="undefined")a="";var b=IriSP.guid(this._div+"_widget_"+a+"_"),c=IriSP.guid("LdtPlayer_spacer_");this._widgets.push([a,b]);a=Mustache.to_html("<div id='{{id}}' style='width: {{width}}px; position: relative;'></div",{id:b,width:this._width});var g=Mustache.to_html("<div id='{{spacer_id}}' style='width: {{width}}px; position: relative; height: {{spacer_div_height}};'></div",{spacer_id:c,width:this._width,spacer_div_height:IriSP.widgetsDefaults.LayoutManager.spacer_div_height});
+this.selector.append(a);this.selector.append(g);return[b,c]};IriSP.setupDataLoader=function(){IriSP.__dataloader=new IriSP.DataLoader};
+IriSP.configurePopcorn=function(a,b){var c,g=a.createDiv(),h=g[0];IriSP.jQuery("#"+g[1]).css("height","1px");switch(b.type){case "html5":g=Popcorn.guid("video");IriSP.jQuery("#"+h).append("<video src='"+b.file+"' id='"+g+"'></video>");b.hasOwnProperty("width")&&IriSP.jQuery("#"+h).css("width",b.width);b.hasOwnProperty("height")&&IriSP.jQuery("#"+h).css("height",b.height);c=Popcorn("#"+g);break;case "jwplayer":g=IriSP.jQuery.extend({},b);delete g.container;delete g.type;if(b.provider==="rtmp"&&!g.hasOwnProperty("file")&&
+!g.hasOwnProperty("streamer")){if(typeof IriSP.__jsonMetadata==="undefined")break;g.file="";g.streamer="";c=IriSP.__jsonMetadata.medias[0].href.split("/");for(var k=0;k<c.length;k++)if(k<4)g.streamer+=c[k]+"/";else{g.file+=c[k];if(k<c.length-1)g.file+="/"}}if(!b.hasOwnProperty("flashplayer"))g.flashplayer=IriSP.jwplayer_swf_path;b.hasOwnProperty("controlbar.position")||(g["controlbar.position"]="none");c=new IriSP.PopcornReplacement.jwplayer("#"+h,g);break;case "youtube":g=IriSP.jQuery.extend({},
+b);delete g.container;g.controls=0;g.autostart=false;templ="width: {{width}}px; height: {{height}}px;";c=Mustache.to_html(templ,{width:g.width,height:g.height});IriSP.jQuery("#"+h).attr("style",c);c=Popcorn.youtube("#"+h,g.video,g);break;case "dailymotion":c=new IriSP.PopcornReplacement.dailymotion("#"+h,b);break;case "allocine":c=new IriSP.PopcornReplacement.allocine("#"+h,b);break;default:c=undefined}return c};
+IriSP.configureWidgets=function(a,b,c){var g=new IriSP.SerializerFactory(IriSP.__dataloader),h=[],k;for(k=0;k<c.widgets.length;k++){var p=IriSP.instantiateWidget(a,g,b,c.widgets[k]);h.push(p)}return h};IriSP.configureModules=function(a,b){if(!IriSP.null_or_undefined(b)){var c=new IriSP.SerializerFactory(IriSP.__dataloader),g=[],h;for(h=0;h<b.length;h++){var k=b[h],p=c.getSerializer(k.metadata);k=new IriSP[k.type](a,k,p);g.push(k)}return g}};
+IriSP.instantiateWidget=function(a,b,c,g){var h=IriSP.jQuery.extend({},g);if(!h.hasOwnProperty("container")){var k=c.createDiv(g.type),p=k[1];h.container=k[0];h.spacer=p;h.layoutManager=c}k=b.getSerializer(g.metadata);if(typeof k=="undefined")debugger;h=new IriSP[g.type](a,h,k);if(g.hasOwnProperty("requires"))for(p=p=0;p<g.requires.length;p++)h[g.requires[p].type]=IriSP.instantiateWidget(a,b,c,g.requires[p]);k.sync(IriSP.wrap(h,function(){this.draw()}));return h};
+IriSP.configureDefaults=function(a,b){IriSP.lib=IriSP.underscore.defaults(IriSP.lib,IriSP.defaults.lib(a));var c=IriSP.defaults.widgetsDefaults(b);for(var g in c){if(IriSP.null_or_undefined(IriSP.widgetsDefaults[g]))IriSP.widgetsDefaults[g]={};IriSP.widgetsDefaults[g]=IriSP.underscore.defaults(IriSP.widgetsDefaults[g],c[g])}IriSP.paths=IriSP.underscore.defaults(IriSP.paths,IriSP.defaults.paths);IriSP.default_templates_vars=IriSP.underscore.defaults(IriSP.default_templates_vars,IriSP.defaults.default_templates_vars());
+if(IriSP.null_or_undefined(IriSP.user))IriSP.user={};IriSP.user=IriSP.underscore.defaults(IriSP.user,IriSP.defaults.user())};IriSP.initPlayer=function(a,b,c,g){IriSP.configureDefaults(c,g);IriSP.loadLibs(IriSP.lib,a,b,function(){var h=new IriSP.LayoutManager(a.gui),k=IriSP.configurePopcorn(h,a.player);IriSP.configureWidgets(k,h,a.gui);IriSP.configureModules(k,a.modules)})};
+IriSP.PopcornReplacement.dailymotion=function(a,b){console.log("Calling");IriSP.PopcornReplacement.player.call(this,a,b);var c=this;this.playerFns={play:function(){return c.player?c.player.playVideo():false},pause:function(){return c.player?c.player.pauseVideo():false},getPosition:function(){return c.player?c.player.getCurrentTime():0},seek:function(g){return c.player?c.player.seekTo(g):false},getMute:function(){return c.player?c.player.isMuted():false},setMute:function(g){return c.player?g?c.player.mute():
+c.player.unMute():false}};window.onDailymotionPlayerReady=IriSP.wrap(this,this.ready);window.onDailymotionStateChange=IriSP.wrap(this,this.stateHandler);window.onDailymotionVideoProgress=IriSP.wrap(this,this.progressHandler);swfobject.embedSWF("http://www.dailymotion.com/swf?chromeless=1&enableApi=1",this.container,b.width,b.height,"8",null,null,{allowScriptAccess:"always",wmode:"opaque"},{id:this.container})};IriSP.PopcornReplacement.dailymotion.prototype=new IriSP.PopcornReplacement.player("",{});
+IriSP.PopcornReplacement.dailymotion.prototype.ready=function(){this.player=document.getElementById(this.container);this.player.addEventListener("onStateChange","onDailymotionStateChange");this.player.addEventListener("onVideoProgress","onDailymotionVideoProgress");this.player.cueVideoByUrl(this._options.video);this.callbacks.onReady()};IriSP.PopcornReplacement.dailymotion.prototype.progressHandler=function(a){this.callbacks.onTime({position:a.mediaTime})};
+IriSP.PopcornReplacement.dailymotion.prototype.stateHandler=function(a){switch(a){case 1:this.callbacks.onPlay();break;case 2:this.callbacks.onPause();break;case 3:this.callbacks.onSeek({position:this.player.getCurrentTime()});break}};
+IriSP.PopcornReplacement.jwplayer=function(a,b){IriSP.PopcornReplacement.player.call(this,a,b);this.media.duration=b.duration;this.playerFns={play:function(){return jwplayer(this.container).play()},pause:function(){return jwplayer(this.container).pause()},getPosition:function(){return jwplayer(this.container).getPosition()},seek:function(c){return jwplayer(this.container).seek(c)},getMute:function(){return jwplayer(this.container).getMute()},setMute:function(c){return jwplayer(this.container).setMute(c)}};
b.events=this.callbacks;jwplayer(this.container).setup(b)};IriSP.PopcornReplacement.jwplayer.prototype=new IriSP.PopcornReplacement.player("",{});
-IriSP.MediaFragment=function(a,b,d){IriSP.Module.call(this,a,b,d);this.mutex=false;this._Popcorn.listen("loadedmetadata",IriSP.wrap(this,this.advanceTime));this._Popcorn.listen("pause",IriSP.wrap(this,this.updateTime));this._Popcorn.listen("seeked",IriSP.wrap(this,this.updateTime));this._Popcorn.listen("IriSP.PolemicTweet.click",IriSP.wrap(this,this.updateAnnotation));this._Popcorn.listen("IriSP.SegmentsWidget.click",IriSP.wrap(this,this.updateAnnotation));window.onhashchange=IriSP.wrap(this,this.advanceTime)};
+IriSP.MediaFragment=function(a,b,c){IriSP.Module.call(this,a,b,c);this.mutex=false;this._Popcorn.listen("loadedmetadata",IriSP.wrap(this,this.advanceTime));this._Popcorn.listen("pause",IriSP.wrap(this,this.updateTime));this._Popcorn.listen("seeked",IriSP.wrap(this,this.updateTime));this._Popcorn.listen("IriSP.PolemicTweet.click",IriSP.wrap(this,this.updateAnnotation));this._Popcorn.listen("IriSP.SegmentsWidget.click",IriSP.wrap(this,this.updateAnnotation));window.onhashchange=IriSP.wrap(this,this.advanceTime)};
IriSP.MediaFragment.prototype=new IriSP.Module;
IriSP.MediaFragment.prototype.advanceTime=function(){var a=window.location.href;if(a.split("#")[1]!=null){pageoffset=a.split("#")[1];if(pageoffset.substring(0,2)==="t="){if(pageoffset.substring(2)!=null){a=pageoffset.substring(2);this._Popcorn.currentTime(parseFloat(a));this._Popcorn.trigger("seeked",parseFloat(a))}}else if(pageoffset.substring(0,3)==="id="){var b=pageoffset.substring(3);this._serializer.sync(IriSP.wrap(this,function(){this.lookupAnnotation.call(this,b)}))}}};
IriSP.MediaFragment.prototype.updateTime=function(a){if(this.mutex!==true){var b=window.history;if(!b.pushState)return false;a=IriSP.null_or_undefined(a)||typeof a!="number"?this._Popcorn.currentTime().toFixed(2):a.toFixed(2);splitArr=window.location.href.split("#");b.replaceState({},"",splitArr[0]+"#t="+a)}};
-IriSP.MediaFragment.prototype.updateAnnotation=function(a){var b=this;this.mutex=true;var d=window.history;if(!d.pushState)return false;splitArr=window.location.href.split("#");d.replaceState({},"",splitArr[0]+"#id="+a);window.setTimeout(function(){b.mutex=false},50)};
-IriSP.MediaFragment.prototype.lookupAnnotation=function(a){var b=this;this.mutex=true;var d=undefined,h=this._serializer._data.annotations,f;for(f=0;f<h.length;f++)if(h[f].id===a){d=h[f];break}if(typeof d!=="undefined"){this._Popcorn.currentTime(d.begin/1E3);this._Popcorn.trigger("seeked",d.begin/1E3);this._Popcorn.trigger("IriSP.Mediafragment.showAnnotation",a)}window.setTimeout(function(){b.mutex=false},50)};
-IriSP.AnnotationsListWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d);this.__counter=0;this.__oldList=[];this.ajax_mode=IriSP.widgetsDefaults.AnnotationsListWidget.ajax_mode;this.project_url=IriSP.widgetsDefaults.AnnotationsListWidget.project_url};IriSP.AnnotationsListWidget.prototype=new IriSP.Widget;IriSP.AnnotationsListWidget.prototype.clear=function(){};IriSP.AnnotationsListWidget.prototype.clearWidget=function(){};
+IriSP.MediaFragment.prototype.updateAnnotation=function(a){var b=this;this.mutex=true;var c=window.history;if(!c.pushState)return false;splitArr=window.location.href.split("#");c.replaceState({},"",splitArr[0]+"#id="+a);window.setTimeout(function(){b.mutex=false},50)};
+IriSP.MediaFragment.prototype.lookupAnnotation=function(a){var b=this;this.mutex=true;var c=undefined,g=this._serializer._data.annotations,h;for(h=0;h<g.length;h++)if(g[h].id===a){c=g[h];break}if(typeof c!=="undefined"){this._Popcorn.currentTime(c.begin/1E3);this._Popcorn.trigger("seeked",c.begin/1E3);this._Popcorn.trigger("IriSP.Mediafragment.showAnnotation",a)}window.setTimeout(function(){b.mutex=false},50)};
+IriSP.AnnotationsListWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c);this.__counter=0;this.__oldList=[];this.ajax_mode=IriSP.widgetsDefaults.AnnotationsListWidget.ajax_mode;this.project_url=IriSP.widgetsDefaults.AnnotationsListWidget.project_url};IriSP.AnnotationsListWidget.prototype=new IriSP.Widget;IriSP.AnnotationsListWidget.prototype.clear=function(){};IriSP.AnnotationsListWidget.prototype.clearWidget=function(){};
IriSP.AnnotationsListWidget.prototype.do_redraw=function(a){this.selector.html(IriSP.templToHTML(IriSP.annotationsListWidget_template,{annotations:a}))};
-IriSP.AnnotationsListWidget.prototype.drawList=function(a){var b=this._serializer.getContributions(),d=this._serializer._data.annotations,h=this._Popcorn.currentTime(),f=[];if(typeof b!=="undefined"){for(z=0;z<d.length;z++){var l=d[z];if(!(typeof l.meta!=="undefined"&&typeof l.meta["id-ref"]!=="undefined"&&l.meta["id-ref"]!==b))if(l.begin<=h*1E3&&l.end>h*1E3){var p=l,u={};u.id=p.id;u.title=p.content.title;u.desc=p.content.description;u.begin=IriSP.msToTime(l.begin);u.end=IriSP.msToTime(l.end);f.push(u)}}b=
-IriSP.underscore.pluck(f,"id").sort();b.length!==this.__oldList.length&&this.do_redraw(f);d=1;for(var z=0;z<b.length;){if(b[z]!==this.__oldList[z])d=0;break}this.__oldList=b;typeof a!=="undefined"&&this.do_redraw(f);d!==1&&this.do_redraw(f)}};
-IriSP.AnnotationsListWidget.prototype.ajaxRedraw=function(a){var b=IriSP.null_or_undefined(a)||typeof a!="number"?this._Popcorn.currentTime():a;a=IriSP.widgetsDefaults.AnnotationsListWidget.ajax_url.replace(/\{/g,"{{").replace(/\}/g,"}}");var d=this._serializer.currentMedia().id,h=+this._serializer.currentMedia().meta["dc:duration"],f=(Math.floor(b)-300)*1E3;if(f<0)f=0;b=(Math.floor(b)+300)*1E3;if(b>h)b=h;a=Mustache.to_html(a,{media:d,begin:f,end:b});var l=new IriSP.JSONSerializer(IriSP.__dataloader,
-a);l.sync(IriSP.wrap(this,function(p){this.processJson(p,l)}))};
-IriSP.AnnotationsListWidget.prototype.processJson=function(a,b){var d=b._data.annotations;if(!IriSP.null_or_undefined(d)){b.getIds("Contributions");var h=[],f=this._serializer.currentMedia().id;for(i=0;i<d.length;i++){var l=d[i],p=l,u={};u.id=p.id;u.title=p.content.title;u.desc=p.content.description;u.begin=IriSP.msToTime(l.begin);u.end=IriSP.msToTime(l.end);this.annotations_ids.hasOwnProperty(u.id)||(u.url=this.project_url+"/"+f+"/"+l.meta.project+"/"+l.meta["id-ref"]);h.push(u)}this.do_redraw(h)}};
+IriSP.AnnotationsListWidget.prototype.drawList=function(a){var b=this._serializer.getContributions(),c=this._serializer._data.annotations,g=this._Popcorn.currentTime(),h=[];if(typeof b!=="undefined"){for(z=0;z<c.length;z++){var k=c[z];if(!(typeof k.meta!=="undefined"&&typeof k.meta["id-ref"]!=="undefined"&&k.meta["id-ref"]!==b))if(k.begin<=g*1E3&&k.end>g*1E3){var p=k,u={};u.id=p.id;u.title=p.content.title;u.desc=p.content.description;u.begin=IriSP.msToTime(k.begin);u.end=IriSP.msToTime(k.end);h.push(u)}}b=
+IriSP.underscore.pluck(h,"id").sort();b.length!==this.__oldList.length&&this.do_redraw(h);c=1;for(var z=0;z<b.length;){if(b[z]!==this.__oldList[z])c=0;break}this.__oldList=b;typeof a!=="undefined"&&this.do_redraw(h);c!==1&&this.do_redraw(h)}};
+IriSP.AnnotationsListWidget.prototype.ajaxRedraw=function(a){var b=IriSP.null_or_undefined(a)||typeof a!="number"?this._Popcorn.currentTime():a;a=IriSP.widgetsDefaults.AnnotationsListWidget.ajax_url.replace(/\{/g,"{{").replace(/\}/g,"}}");var c=this._serializer.currentMedia().id,g=+this._serializer.currentMedia().meta["dc:duration"],h=(Math.floor(b)-300)*1E3;if(h<0)h=0;b=(Math.floor(b)+300)*1E3;if(b>g)b=g;a=Mustache.to_html(a,{media:c,begin:h,end:b});var k=new IriSP.JSONSerializer(IriSP.__dataloader,
+a);k.sync(IriSP.wrap(this,function(p){this.processJson(p,k)}))};
+IriSP.AnnotationsListWidget.prototype.processJson=function(a,b){var c=b._data.annotations;if(!IriSP.null_or_undefined(c)){var g=[],h=this._serializer.currentMedia().id;for(i=0;i<c.length;i++){var k=c[i],p=k,u={};u.id=p.id;u.title=p.content.title;u.desc=p.content.description;u.begin=IriSP.msToTime(k.begin);u.end=IriSP.msToTime(k.end);this.annotations_ids.hasOwnProperty(u.id)||(u.url=this.project_url+"/"+h+"/"+k.meta.project+"/"+k.meta["id-ref"]);g.push(u)}this.do_redraw(g)}};
IriSP.AnnotationsListWidget.prototype.draw=function(){this.annotations_ids={};var a=this._serializer._data.annotations,b=0;for(b=0;b<a.length;b++)this.annotations_ids[a[b].id]=1;this.drawList();if(this.ajax_mode){this._Popcorn.listen("seeked",IriSP.wrap(this,this.ajaxRedraw));this._Popcorn.listen("loadedmetadata",IriSP.wrap(this,this.ajaxRedraw));this._Popcorn.listen("paused",IriSP.wrap(this,this.ajaxRedraw));this._Popcorn.listen("IriSP.createAnnotationWidget.addedAnnotation",IriSP.wrap(this,this.ajaxRedraw))}else{this._Popcorn.listen("IriSP.createAnnotationWidget.addedAnnotation",
-IriSP.wrap(this,function(){this.drawList(true)}));this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.redraw))}};IriSP.AnnotationsListWidget.prototype.redraw=function(){this.drawList()};IriSP.AnnotationsWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d);this._hidden=false};IriSP.AnnotationsWidget.prototype=new IriSP.Widget;IriSP.AnnotationsWidget.prototype.clear=function(){this.selector.find(".Ldt-SaTitle").text("");this.selector.find(".Ldt-SaDescription").text("");this.selector.find(".Ldt-SaKeywordText").text("")};
-IriSP.AnnotationsWidget.prototype.displayAnnotation=function(a){var b=a.content.title,d=a.content.description,h=+a.begin/1E3,f=+a.end/1E3;this._serializer.currentMedia();b=Mustache.to_html("{{title}} - ( {{begin}} - {{end}} )",{title:b,begin:IriSP.secondsToTime(h),end:IriSP.secondsToTime(f)});this.selector.find(".Ldt-SaTitle").text(b);this.selector.find(".Ldt-SaDescription").text(d);d=IriSP.widgetsDefaults.AnnotationsWidget.share_text;a=document.location.href+"#id="+a.id;this.selector.find(".Ldt-fbShare").attr("href",
-IriSP.mkFbUrl(a,d));this.selector.find(".Ldt-TwShare").attr("href",IriSP.mkTweetUrl(a,d));this.selector.find(".Ldt-GplusShare").attr("href",IriSP.mkGplusUrl(a,d))};IriSP.AnnotationsWidget.prototype.clearWidget=function(){this.selector.find(".Ldt-SaTitle").text("");this.selector.find(".Ldt-SaDescription").text("");this.selector.find(".Ldt-SaKeywordText").html("");this.selector.find(".Ldt-ShowAnnotation").slideUp()};
-IriSP.AnnotationsWidget.prototype.draw=function(){var a=this;this.selector.append(IriSP.templToHTML(IriSP.annotationWidget_template));this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked",IriSP.wrap(this,this.handleAnnotateSignal));var b=[];if(typeof this._serializer.getChapitrage()!=="undefined")b.push(this._serializer.getChapitrage());else b=this._serializer.getNonTweetIds();var d=this._serializer._data.annotations,h;for(h in d){var f=d[h],l=Math.round(+f.begin/1E3),p=Math.round(+f.end/
-1E3);if(!(typeof f.meta!=="undefined"&&typeof f.meta["id-ref"]!=="undefined"&&!IriSP.underscore.include(b,f.meta["id-ref"])))this._Popcorn=this._Popcorn.code({start:l,end:p,onStart:function(u){return function(){a.displayAnnotation(u)}}(f),onEnd:function(){a.clearWidget.call(a)}})}};IriSP.AnnotationsWidget.prototype.handleAnnotateSignal=function(){if(this._hidden==false){this.selector.hide();this._hidden=true}else{this.selector.show();this._hidden=false}};
-IriSP.ArrowWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d);this._oldAnnotation=null;this._blockArrow=false};IriSP.ArrowWidget.prototype=new IriSP.Widget;IriSP.ArrowWidget.prototype.clear=function(){};IriSP.ArrowWidget.prototype.clearWidget=function(){};
+IriSP.wrap(this,function(){this.drawList(true)}));this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.redraw))}};IriSP.AnnotationsListWidget.prototype.redraw=function(){this.drawList()};IriSP.AnnotationsWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c);this._hidden=false};IriSP.AnnotationsWidget.prototype=new IriSP.Widget;IriSP.AnnotationsWidget.prototype.clear=function(){this.selector.find(".Ldt-SaTitle").text("");this.selector.find(".Ldt-SaDescription").text("");this.selector.find(".Ldt-SaKeywordText").text("")};
+IriSP.AnnotationsWidget.prototype.displayAnnotation=function(a){var b=a.content.title,c=a.content.description,g=+a.begin/1E3,h=+a.end/1E3;this._serializer.currentMedia();var k="";b=Mustache.to_html("{{title}} - ( {{begin}} - {{end}} )",{title:b,begin:IriSP.secondsToTime(g),end:IriSP.secondsToTime(h)});this.selector.find(".Ldt-SaTitle").text(b);this.selector.find(".Ldt-SaDescription").text(c);if(!IriSP.null_or_undefined(a.tags)&&!IriSP.null_or_undefined(this._serializer._data.tags)){c={};for(b=0;b<
+this._serializer._data.tags.length;b++)c[this._serializer._data.tags[b].id]=this._serializer._data.tags[b].meta["dc:title"];for(b=0;b<a.tags.length;b++)if(c.hasOwnProperty(a.tags[b]["id-ref"]))k+=c[a.tags[b]["id-ref"]]+", "}k="Keywords: "+k.slice(0,k.length-2);this.selector.find(".Ldt-SaKeywords").text(k);k=IriSP.widgetsDefaults.AnnotationsWidget.share_text;a=document.location.href+"#id="+a.id;this.selector.find(".Ldt-fbShare").attr("href",IriSP.mkFbUrl(a,k));this.selector.find(".Ldt-TwShare").attr("href",
+IriSP.mkTweetUrl(a,k));this.selector.find(".Ldt-GplusShare").attr("href",IriSP.mkGplusUrl(a,k))};IriSP.AnnotationsWidget.prototype.clearWidget=function(){this.selector.find(".Ldt-SaTitle").text("");this.selector.find(".Ldt-SaDescription").text("");this.selector.find(".Ldt-SaKeywordText").html("");this.selector.find(".Ldt-ShowAnnotation").slideUp()};
+IriSP.AnnotationsWidget.prototype.draw=function(){var a=this;this.selector.append(IriSP.templToHTML(IriSP.annotationWidget_template));this._Popcorn.listen("IriSP.AnnotationsWidget.show",IriSP.wrap(this,this.show));this._Popcorn.listen("IriSP.AnnotationsWidget.hide",IriSP.wrap(this,this.hide));var b=[];if(typeof this._serializer.getChapitrage()!=="undefined")b.push(this._serializer.getChapitrage());else b=this._serializer.getNonTweetIds();var c=this._serializer._data.annotations,g;for(g in c){var h=
+c[g],k=Math.round(+h.begin/1E3),p=Math.round(+h.end/1E3);if(!(typeof h.meta!=="undefined"&&typeof h.meta["id-ref"]!=="undefined"&&!IriSP.underscore.include(b,h.meta["id-ref"])))this._Popcorn=this._Popcorn.code({start:k,end:p,onStart:function(u){return function(){a.displayAnnotation(u)}}(h),onEnd:function(){a.clearWidget.call(a)}})}};IriSP.AnnotationsWidget.prototype.hide=function(){if(this._hidden==false){this.selector.hide();this._hidden=true}};
+IriSP.AnnotationsWidget.prototype.show=function(){if(this._hidden==true){this.selector.show();this._hidden=false}};IriSP.ArrowWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c);this._oldAnnotation=null;this._blockArrow=false};IriSP.ArrowWidget.prototype=new IriSP.Widget;IriSP.ArrowWidget.prototype.clear=function(){};IriSP.ArrowWidget.prototype.clearWidget=function(){};
IriSP.ArrowWidget.prototype.draw=function(){this.selector.append(Mustache.to_html(IriSP.arrowWidget_template,{}));this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.timeUpdateHandler));this._Popcorn.listen("IriSP.ArrowWidget.blockArrow",IriSP.wrap(this,this.blockArrow));this._Popcorn.listen("IriSP.ArrowWidget.releaseArrow",IriSP.wrap(this,this.releaseArrow))};
-IriSP.ArrowWidget.prototype.timeUpdateHandler=function(a){if(!this._blockArrow){a=this._Popcorn.currentTime();var b=this._serializer.currentChapitre(a);if(IriSP.null_or_undefined(b)){b=this._serializer.currentAnnotation(a);if(b.length!=0)b=b[0];else return}if(b!=this._oldAnnotation){a=+b.begin/1E3;var d=+b.end/1E3,h=+this._serializer.currentMedia().meta["dc:duration"]/1E3;a=(a+d)/2/h;d=this.selector.width();a=a*d-13.5;if(a%3!=0)a-=a%3-1;if(a<=0)a=0;if(a<=15){d=IriSP.templToHTML("url('{{img_dir}}/left_edge_arrow.png')");
-this.selector.children(".Ldt-arrowWidget").css("background-image",d)}else if(a>=d-25){d=IriSP.templToHTML("url('{{img_dir}}/right_edge_arrow.png')");this.selector.children(".Ldt-arrowWidget").css("background-image",d)}else{d=IriSP.templToHTML("url('{{img_dir}}/arrow.png')");this.selector.children(".Ldt-arrowWidget").css("background-image",d)}this.selector.children(".Ldt-arrowWidget").animate({left:a+"px"});this._oldAnnotation=b}}};
+IriSP.ArrowWidget.prototype.timeUpdateHandler=function(a){if(!this._blockArrow){a=this._Popcorn.currentTime();var b=this._serializer.currentChapitre(a);if(IriSP.null_or_undefined(b)){b=this._serializer.currentAnnotation(a);if(b.length!=0)b=b[0];else return}if(b!=this._oldAnnotation){a=+b.begin/1E3;var c=+b.end/1E3,g=+this._serializer.currentMedia().meta["dc:duration"]/1E3;a=(a+c)/2/g;c=this.selector.width();a=a*c-13.5;if(a%3!=0)a-=a%3-1;if(a<=0)a=0;if(a<=15){c=IriSP.templToHTML("url('{{img_dir}}/left_edge_arrow.png')");
+this.selector.children(".Ldt-arrowWidget").css("background-image",c)}else if(a>=c-25){c=IriSP.templToHTML("url('{{img_dir}}/right_edge_arrow.png')");this.selector.children(".Ldt-arrowWidget").css("background-image",c)}else{c=IriSP.templToHTML("url('{{img_dir}}/arrow.png')");this.selector.children(".Ldt-arrowWidget").css("background-image",c)}this.selector.children(".Ldt-arrowWidget").animate({left:a+"px"});this._oldAnnotation=b}}};
IriSP.ArrowWidget.prototype.blockArrow=function(){this._blockArrow=true};IriSP.ArrowWidget.prototype.releaseArrow=function(){this._blockArrow=false};
-IriSP.createAnnotationWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d);this._hidden=true;this.keywords=IriSP.widgetsDefaults.createAnnotationWidget.keywords;this.polemic_mode=IriSP.widgetsDefaults.createAnnotationWidget.polemic_mode;this.polemics=IriSP.widgetsDefaults.createAnnotationWidget.polemics;this.cinecast_version=IriSP.widgetsDefaults.createAnnotationWidget.cinecast_version;this.ids={};if(this.cinecast_version)this.sliceWidth=this.sliceLeft=0};IriSP.createAnnotationWidget.prototype=new IriSP.Widget;
+IriSP.createAnnotationWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c);this._hidden=true;this.keywords=IriSP.widgetsDefaults.createAnnotationWidget.keywords;this.polemic_mode=IriSP.widgetsDefaults.createAnnotationWidget.polemic_mode;this.polemics=IriSP.widgetsDefaults.createAnnotationWidget.polemics;this.cinecast_version=IriSP.widgetsDefaults.createAnnotationWidget.cinecast_version;this.ids={};if(this.cinecast_version)this.sliceWidth=this.sliceLeft=0};IriSP.createAnnotationWidget.prototype=new IriSP.Widget;
IriSP.createAnnotationWidget.prototype.clear=function(){this.selector.find(".Ldt-SaTitle").text("");this.selector.find(".Ldt-SaDescription").text("");this.selector.find(".Ldt-SaKeywordText").text("")};
-IriSP.createAnnotationWidget.prototype.draw=function(){var a=this,b={cinecast_version:this.cinecast_version,polemic_mode:this.polemic_mode};if(!IriSP.null_or_undefined(IriSP.user)&&!IriSP.null_or_undefined(IriSP.user.avatar))b.user_avatar=IriSP.user.avatar;this.selector.append(IriSP.templToHTML(IriSP.createAnnotationWidget_template,b));this.cinecast_version||this.selector.hide();for(b=0;b<this.keywords.length;b++){var d=this.keywords[b],h=IriSP.guid("button_"),f=IriSP.templToHTML("<button id={{id}} class='Ldt-createAnnotation-absent-keyword'>{{keyword}}</button>",
-{keyword:d,id:h});this.ids[d]=h;this.selector.find(".Ldt-createAnnotation-keywords").append(f);this.selector.find("#"+h).click(function(p){return function(){var u=a.selector.find(".Ldt-createAnnotation-Description").val();if(u.indexOf(p)!=-1){var z=u.replace(" "+p,"");if(z==u)z=u.replace(p,"")}else z=u===""?p:u+" "+p;a.selector.find(".Ldt-createAnnotation-Description").val(z);a.selector.find(".Ldt-createAnnotation-Description").trigger("js_mod")}}(d))}if(this.polemic_mode)for(var l in this.polemics){d=
-IriSP.templToHTML("Ldt-createAnnotation-polemic-{{classname}}",{classname:this.polemics[l]});f=IriSP.templToHTML("<button class='{{classname}} Ldt-createAnnotation-polemic-button'>{{polemic}}</button>",{classname:d,polemic:l});this.selector.find(".Ldt-createAnnotation-polemics").append(f);this.selector.find("."+d).click(function(p){return function(){var u=a.selector.find(".Ldt-createAnnotation-Description").val();if(u.indexOf(p)!=-1){var z=u.replace(" "+p,"");if(z==u)z=u.replace(p,"")}else z=u===
-""?p:u+" "+p;a.selector.find(".Ldt-createAnnotation-Description").val(z);a.selector.find(".Ldt-createAnnotation-Description").trigger("js_mod");a.handleTextChanges()}}(l))}this.selector.find(".Ldt-createAnnotation-Description").bind("propertychange keyup input paste",IriSP.wrap(this,this.handleTextChanges));this.cinecast_version&&this.selector.find(".Ldt-createAnnotation-Description").one("propertychange keyup input paste js_mod",function(){a._Popcorn.media.paused||a._Popcorn.pause()});if(this.cinecast_version){legal_id=
-typeof this._serializer.getChapitrage()!=="undefined"?this._serializer.getChapitrage():this._serializer.getNonTweetIds()[0];l=this._serializer._data.annotations;for(b in l){f=l[b];if(!(typeof f.meta!=="undefined"&&typeof f.meta["id-ref"]!=="undefined"&&legal_id!==f.meta["id-ref"])){code={start:f.begin/1E3,end:f.end/1E3,onStart:function(p){return function(){typeof p.content!=="undefined"&&a.selector.find(".Ldt-createAnnotation-Title").html(p.content.title);a._currentAnnotation=p;var u=IriSP.msToTime(p.begin),
-z=IriSP.msToTime(p.end);u=IriSP.templToHTML("- ({{begin}} - {{ end }})",{begin:u,end:z});a.selector.find(".Ldt-createAnnotation-TimeFrame").html(u)}}(f)};this._Popcorn.code(code)}}}this.selector.find(".Ldt-createAnnotation-submitButton").click(IriSP.wrap(this,this.handleButtonClick));if(!this.cinecast_version){this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked",IriSP.wrap(this,this.handleAnnotateSignal));this.selector.find(".Ldt-createAnnotation-Minimize").click(IriSP.wrap(this,function(){this._Popcorn.trigger("IriSP.PlayerWidget.AnnotateButton.clicked")}))}};
-IriSP.createAnnotationWidget.prototype.handleAnnotateSignal=function(){if(this._hidden==false){this.selector.hide();this._hidden=true;this._Popcorn.trigger("IriSP.ArrowWidget.releaseArrow");this._Popcorn.trigger("IriSP.SliceWidget.hide")}else{this.showStartScreen();this.selector.show();this._hidden=false;var a=this._Popcorn.currentTime();this._Popcorn.trigger("IriSP.ArrowWidget.blockArrow");var b=+this._serializer.currentMedia().meta["dc:duration"];a=this._serializer.currentChapitre(a);if(typeof a===
-"undefined"){var d=this.selector.width()/2;b=this.selector.width()/10}else{d=a.begin/b*this.selector.width();b=a.end/b*this.selector.width()-d}this.sliceLeft=d;this.sliceWidth=b;this._Popcorn.trigger("IriSP.SliceWidget.position",[d,b]);this._Popcorn.listen("IriSP.SliceWidget.zoneChange",IriSP.wrap(this,this.handleSliderChanges));this._Popcorn.trigger("IriSP.SliceWidget.show");this.selector.find(".Ldt-createAnnotation-Title").html(a.content.title);this._currentcurrentChapter=a;b=IriSP.msToTime(a.begin);
-a=IriSP.msToTime(a.end);a=IriSP.templToHTML("- ({{begin}} - {{ end }})",{begin:b,end:a});this.selector.find(".Ldt-createAnnotation-TimeFrame").html(a)}};
-IriSP.createAnnotationWidget.prototype.handleTextChanges=function(){var a=this.selector.find(".Ldt-createAnnotation-Description").val();for(var b in this.ids){var d=this.ids[b];if(a.indexOf(b)!=-1)this.selector.find("#"+d).hasClass("Ldt-createAnnotation-absent-keyword")&&this.selector.find("#"+d).removeClass("Ldt-createAnnotation-absent-keyword").addClass("Ldt-createAnnotation-present-keyword");else this.selector.find("#"+d).hasClass("Ldt-createAnnotation-present-keyword")&&this.selector.find("#"+
-d).removeClass("Ldt-createAnnotation-present-keyword").addClass("Ldt-createAnnotation-absent-keyword")}if(this.polemic_mode)for(var h in this.polemics){b="Ldt-createAnnotation-polemic-"+this.polemics[h];if(a.indexOf(h)!=-1)this.selector.find("."+b).addClass("Ldt-createAnnotation-polemic-active");else this.selector.find("."+b).addClass("Ldt-createAnnotation-polemic-active")&&this.selector.find("."+b).removeClass("Ldt-createAnnotation-polemic-active")}};
-IriSP.createAnnotationWidget.prototype.showStartScreen=function(){this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide();this.selector.find(".Ldt-createAnnotation-startScreen").show();this.selector.find("Ldt-createAnnotation-Description").val("Type your annotation here.")};IriSP.createAnnotationWidget.prototype.showWaitScreen=function(){this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide();this.selector.find(".Ldt-createAnnotation-waitScreen").show()};
-IriSP.createAnnotationWidget.prototype.showEndScreen=function(a){this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide();this.cinecast_version&&this.selector.find(".Ldt-createAnnotation-Title").parent().show();var b=document.location.href+"#id="+a.id;a=IriSP.mkTweetUrl(b);var d=IriSP.mkGplusUrl(b);b=IriSP.mkFbUrl(b);this.selector.find(".Ldt-createAnnotation-endScreen-TweetLink").attr("href",a);this.selector.find(".Ldt-createAnnotation-endScreen-FbLink").attr("href",b);this.selector.find(".Ldt-createAnnotation-endScreen-GplusLink").attr("href",
-d);this.selector.find(".Ldt-createAnnotation-endScreen").show()};
-IriSP.createAnnotationWidget.prototype.handleButtonClick=function(){var a=this,b=this.selector.find(".Ldt-createAnnotation-Description"),d=b.val();if(d===""){if(this.selector.find(".Ldt-createAnnotation-errorMessage").length===0){this.selector.find(".Ldt-createAnnotation-Container").after(IriSP.templToHTML(IriSP.createAnnotation_errorMessage_template));b.css("background-color","#d93c71")}else this.selector.find(".Ldt-createAnnotation-errorMessage").show();b.one("js_mod propertychange keyup input paste",
-IriSP.wrap(this,function(){if(b.val()!==""){this.selector.find(".Ldt-createAnnotation-errorMessage").hide();b.css("background-color","")}}))}else{this.showWaitScreen();this.sendLdtData(d,function(h){a.cinecast_version&&a._Popcorn.media.paused&&a._Popcorn.play();a.showEndScreen(h);a.cinecast_version&&window.setTimeout(IriSP.wrap(a,function(){this.showStartScreen()}),5E3);a.cinecast_version||a._Popcorn.trigger("IriSP.SliceWidget.hide")})}};
+IriSP.createAnnotationWidget.prototype.draw=function(){var a=this,b={cinecast_version:this.cinecast_version,polemic_mode:this.polemic_mode};if(!IriSP.null_or_undefined(IriSP.user)&&!IriSP.null_or_undefined(IriSP.user.avatar))b.user_avatar=IriSP.user.avatar;this.selector.append(IriSP.templToHTML(IriSP.createAnnotationWidget_template,b));this.cinecast_version||this.selector.hide();for(b=0;b<this.keywords.length;b++){var c=this.keywords[b],g=IriSP.guid("button_"),h=IriSP.templToHTML("<button id={{id}} class='Ldt-createAnnotation-absent-keyword'>{{keyword}}</button>",
+{keyword:c,id:g});this.ids[c]=g;this.selector.find(".Ldt-createAnnotation-keywords").append(h);this.selector.find("#"+g).click(function(p){return function(){var u=a.selector.find(".Ldt-createAnnotation-Description").val();if(u.indexOf(p)!=-1){var z=u.replace(" "+p,"");if(z==u)z=u.replace(p,"")}else z=u===""?p:u+" "+p;a.selector.find(".Ldt-createAnnotation-Description").val(z);a.selector.find(".Ldt-createAnnotation-Description").trigger("js_mod")}}(c))}if(this.polemic_mode)for(var k in this.polemics){c=
+IriSP.templToHTML("Ldt-createAnnotation-polemic-{{classname}}",{classname:this.polemics[k]});h=IriSP.templToHTML("<button class='{{classname}} Ldt-createAnnotation-polemic-button'>{{polemic}}</button>",{classname:c,polemic:k});this.selector.find(".Ldt-createAnnotation-polemics").append(h);this.selector.find("."+c).click(function(p){return function(){var u=a.selector.find(".Ldt-createAnnotation-Description").val();if(u.indexOf(p)!=-1){var z=u.replace(" "+p,"");if(z==u)z=u.replace(p,"")}else z=u===
+""?p:u+" "+p;a.selector.find(".Ldt-createAnnotation-Description").val(z);a.selector.find(".Ldt-createAnnotation-Description").trigger("js_mod");a.handleTextChanges()}}(k))}this.selector.find(".Ldt-createAnnotation-Description").bind("propertychange keyup input paste",IriSP.wrap(this,this.handleTextChanges));this.cinecast_version&&this.selector.find(".Ldt-createAnnotation-Description").one("propertychange keyup input paste js_mod",function(){a._Popcorn.media.paused||a._Popcorn.pause()});if(this.cinecast_version){legal_id=
+typeof this._serializer.getChapitrage()!=="undefined"?this._serializer.getChapitrage():this._serializer.getNonTweetIds()[0];k=this._serializer._data.annotations;for(b in k){h=k[b];if(!(typeof h.meta!=="undefined"&&typeof h.meta["id-ref"]!=="undefined"&&legal_id!==h.meta["id-ref"])){code={start:h.begin/1E3,end:h.end/1E3,onStart:function(p){return function(){typeof p.content!=="undefined"&&a.selector.find(".Ldt-createAnnotation-Title").html(p.content.title);a._currentAnnotation=p;var u=IriSP.msToTime(p.begin),
+z=IriSP.msToTime(p.end);u=IriSP.templToHTML("- ({{begin}} - {{ end }})",{begin:u,end:z});a.selector.find(".Ldt-createAnnotation-TimeFrame").html(u)}}(h)};this._Popcorn.code(code)}}}this.selector.find(".Ldt-createAnnotation-submitButton").click(IriSP.wrap(this,this.handleButtonClick));if(!this.cinecast_version){this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked",IriSP.wrap(this,this.handleAnnotateSignal));this.selector.find(".Ldt-createAnnotation-Minimize").click(IriSP.wrap(this,function(){this._Popcorn.trigger("IriSP.PlayerWidget.AnnotateButton.clicked")}))}};
+IriSP.createAnnotationWidget.prototype.handleAnnotateSignal=function(){if(this._hidden==false&&this._state=="startScreen"){this.selector.hide();this._hidden=true;this._Popcorn.trigger("IriSP.ArrowWidget.releaseArrow");this._Popcorn.trigger("IriSP.SliceWidget.hide");this._Popcorn.trigger("IriSP.AnnotationsWidget.show")}else{this._Popcorn.trigger("IriSP.AnnotationsWidget.hide");this.showStartScreen();this.selector.show();this._hidden=false;var a=this._Popcorn.currentTime();this._Popcorn.trigger("IriSP.ArrowWidget.blockArrow");
+var b=+this._serializer.currentMedia().meta["dc:duration"];a=this._serializer.currentChapitre(a);if(IriSP.null_or_undefined(a)){var c=this.selector.width()/2;b=this.selector.width()/10}else{c=a.begin/b*this.selector.width();b=a.end/b*this.selector.width()-c}this.sliceLeft=c/this.selector.width()*100;this.sliceWidth=b/this.selector.width()*100;this._Popcorn.trigger("IriSP.SliceWidget.position",[c,b]);this._Popcorn.listen("IriSP.SliceWidget.zoneChange",IriSP.wrap(this,this.handleSliderChanges));this._Popcorn.trigger("IriSP.SliceWidget.show");
+if(!IriSP.null_or_undefined(a)){this.selector.find(".Ldt-createAnnotation-Title").html(a.content.title);this._currentcurrentChapter=a;b=IriSP.msToTime(a.begin);a=IriSP.msToTime(a.end);a=IriSP.templToHTML("- ({{begin}} - {{ end }})",{begin:b,end:a});this.selector.find(".Ldt-createAnnotation-TimeFrame").html(a)}}};
+IriSP.createAnnotationWidget.prototype.handleTextChanges=function(){var a=this.selector.find(".Ldt-createAnnotation-Description").val();for(var b in this.ids){var c=this.ids[b];if(a.indexOf(b)!=-1)this.selector.find("#"+c).hasClass("Ldt-createAnnotation-absent-keyword")&&this.selector.find("#"+c).removeClass("Ldt-createAnnotation-absent-keyword").addClass("Ldt-createAnnotation-present-keyword");else this.selector.find("#"+c).hasClass("Ldt-createAnnotation-present-keyword")&&this.selector.find("#"+
+c).removeClass("Ldt-createAnnotation-present-keyword").addClass("Ldt-createAnnotation-absent-keyword")}if(this.polemic_mode)for(var g in this.polemics){b="Ldt-createAnnotation-polemic-"+this.polemics[g];if(a.indexOf(g)!=-1)this.selector.find("."+b).addClass("Ldt-createAnnotation-polemic-active");else this.selector.find("."+b).addClass("Ldt-createAnnotation-polemic-active")&&this.selector.find("."+b).removeClass("Ldt-createAnnotation-polemic-active")}};
+IriSP.createAnnotationWidget.prototype.showStartScreen=function(){this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide();this.selector.find(".Ldt-createAnnotation-startScreen").show();this.selector.find(".Ldt-createAnnotation-Description").val("Type your annotation here.");this._state="startScreen"};
+IriSP.createAnnotationWidget.prototype.showWaitScreen=function(){this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide();this.selector.find(".Ldt-createAnnotation-waitScreen").show();this._state="waitScreen"};IriSP.createAnnotationWidget.prototype.showErrorScreen=function(){this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide();this.selector.find(".Ldt-createAnnotation-errorScreen").show();this._state="errorScreen"};
+IriSP.createAnnotationWidget.prototype.showEndScreen=function(a){this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide();this.cinecast_version&&this.selector.find(".Ldt-createAnnotation-Title").parent().show();var b=document.location.href+"#id="+a.id;a=IriSP.mkTweetUrl(b);var c=IriSP.mkGplusUrl(b);b=IriSP.mkFbUrl(b);this.selector.find(".Ldt-createAnnotation-endScreen-TweetLink").attr("href",a);this.selector.find(".Ldt-createAnnotation-endScreen-FbLink").attr("href",b);this.selector.find(".Ldt-createAnnotation-endScreen-GplusLink").attr("href",
+c);this.selector.find(".Ldt-createAnnotation-endScreen").show();this._state="endScreen"};
+IriSP.createAnnotationWidget.prototype.handleButtonClick=function(){var a=this,b=this.selector.find(".Ldt-createAnnotation-Description"),c=b.val();if(c===""){if(this.selector.find(".Ldt-createAnnotation-errorMessage").length===0){this.selector.find(".Ldt-createAnnotation-Container").after(IriSP.templToHTML(IriSP.createAnnotation_errorMessage_template));b.css("background-color","#d93c71")}else this.selector.find(".Ldt-createAnnotation-errorMessage").show();b.one("js_mod propertychange keyup input paste",
+IriSP.wrap(this,function(){if(b.val()!==""){this.selector.find(".Ldt-createAnnotation-errorMessage").hide();b.css("background-color","")}}))}else{this.showWaitScreen();this.sendLdtData(c,function(g){a.cinecast_version&&a._Popcorn.media.paused&&a._Popcorn.play();if(a._state=="waitScreen"){a.showEndScreen(g);a.cinecast_version&&window.setTimeout(IriSP.wrap(a,function(){this.showStartScreen()}),5E3)}a.cinecast_version||a._Popcorn.trigger("IriSP.SliceWidget.hide")})}};
IriSP.createAnnotationWidget.prototype.handleSliderChanges=function(a){this.sliceLeft=a[0];this.sliceWidth=a[1]};
-IriSP.createAnnotationWidget.prototype.sendLdtData=function(a,b){var d=this,h={annotations:[{}],meta:{}},f=h.annotations[0];f.media=this._serializer.currentMedia().id;var l=Math.round(this._serializer.currentMedia().meta["dc:duration"]/20);if(this.cinecast_version){f.begin=Math.round(this._Popcorn.currentTime()*1E3-l);f.end=Math.round(this._Popcorn.currentTime()*1E3+l);if(f.begin<0)f.begin=0;if(f.end>this._serializer.currentMedia().meta["dc:duration"])f.end=this._serializer.currentMedia().meta["dc:duration"]}else{l=
-+this._serializer.currentMedia().meta["dc:duration"];f.begin=+(l*(this.sliceLeft/100)).toFixed(0);f.end=+(l*((this.sliceWidth+this.sliceLeft)/100)).toFixed(0)}f.type=this._serializer.getContributions();if(typeof f.type==="undefined")f.type="";f.type_title="Contributions";f.content={};f.content.data=a;var p=h.meta;p.creator=!IriSP.null_or_undefined(IriSP.user)&&!IriSP.null_or_undefined(IriSP.user.name)?IriSP.user.name:"An User";p.created=Date().toString();f.tags=[];for(l=0;l<this.keywords.length;l++){var u=
-this.keywords[l];a.indexOf(u)!=-1&&f.tags.push(u)}var z=JSON.stringify(h),n=Mustache.to_html("{{platf_url}}/ldtplatform/api/ldt/projects/{{id}}.json",{platf_url:IriSP.platform_url,id:this._serializer._data.meta.id});IriSP.jQuery.ajax({url:n,type:"PUT",contentType:"application/json",data:z,success:IriSP.wrap(this,function(s){typeof this._serializer.getContributions()==="undefined"&&this._serializer._data["annotation-types"].push({"dc:contributor":"perso","dc:creator":"perso","dc:title":"Contributions",
-id:s.annotations[0].type});delete f.tags;f.content.description=f.content.data;f.content.title="";delete f.content.data;f.id=s.annotations[0].id;f.meta=p;f.meta["id-ref"]=s.annotations[0].type;d._serializer._data.annotations.push(f);d._Popcorn.trigger("IriSP.createAnnotationWidget.addedAnnotation",f);b(f)}),error:function(s,q){console.log("an error occured while contacting "+n+" and sending "+z+q)}})};IriSP.HelloWorldWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d)};
-IriSP.HelloWorldWidget.prototype=new IriSP.Widget;IriSP.HelloWorldWidget.prototype.draw=function(){this.selector.html("Hello, world").css({"text-align":"center",padding:"10px 0","font-size":"14px"});console.log(this)};IriSP.PlayerWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d);this._searchBlockOpen=false;this._searchLastValue=""};IriSP.PlayerWidget.prototype=new IriSP.Widget;
+IriSP.createAnnotationWidget.prototype.sendLdtData=function(a,b){var c=this,g={annotations:[{}],meta:{}},h=g.annotations[0];h.media=this._serializer.currentMedia().id;var k=Math.round(this._serializer.currentMedia().meta["dc:duration"]/20);if(this.cinecast_version){h.begin=Math.round(this._Popcorn.currentTime()*1E3-k);h.end=Math.round(this._Popcorn.currentTime()*1E3+k)}else{k=+this._serializer.currentMedia().meta["dc:duration"];h.begin=+(k*(this.sliceLeft/100)).toFixed(0);h.end=+(k*((this.sliceWidth+
+this.sliceLeft)/100)).toFixed(0)}if(h.begin<0)h.begin=0;if(h.end>this._serializer.currentMedia().meta["dc:duration"])h.end=this._serializer.currentMedia().meta["dc:duration"];h.type=this._serializer.getContributions();if(typeof h.type==="undefined")h.type="";h.type_title="Contributions";h.content={};h.content.data=a;var p=g.meta;p.creator=!IriSP.null_or_undefined(IriSP.user)&&!IriSP.null_or_undefined(IriSP.user.name)?IriSP.user.name:"An User";p.created=Date().toString();h.tags=[];for(k=0;k<this.keywords.length;k++){var u=
+this.keywords[k];a.indexOf(u)!=-1&&h.tags.push(u)}var z=JSON.stringify(g),n=Mustache.to_html("{{platf_url}}/ldtplatform/api/ldt/annotations/{{id}}.json",{platf_url:IriSP.platform_url,id:this._serializer._data.meta.id});IriSP.jQuery.ajax({url:n,type:"PUT",contentType:"application/json",data:z,success:IriSP.wrap(this,function(s){typeof this._serializer.getContributions()==="undefined"&&this._serializer._data["annotation-types"].push({"dc:contributor":"perso","dc:creator":"perso","dc:title":"Contributions",
+id:s.annotations[0].type});delete h.tags;h.content.description=h.content.data;h.content.title="";delete h.content.data;h.id=s.annotations[0].id;h.meta=p;h.meta["id-ref"]=s.annotations[0].type;c._serializer._data.annotations.push(h);c._Popcorn.trigger("IriSP.createAnnotationWidget.addedAnnotation",h);b(h)}),error:function(s,q){console.log("an error occured while contacting "+n+" and sending "+z+q);c.showErrorScreen()}})};IriSP.HelloWorldWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c)};
+IriSP.HelloWorldWidget.prototype=new IriSP.Widget;IriSP.HelloWorldWidget.prototype.draw=function(){this.selector.html("Hello, world").css({"text-align":"center",padding:"10px 0","font-size":"14px"});console.log(this)};IriSP.PlayerWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c);this._searchBlockOpen=false;this._searchLastValue=""};IriSP.PlayerWidget.prototype=new IriSP.Widget;
IriSP.PlayerWidget.prototype.draw=function(){var a=this;this.selector.append(IriSP.templToHTML(IriSP.player_template,{share_template:IriSP.share_template}));this.selector.children(".Ldt-controler").show();this._Popcorn.listen("play",IriSP.wrap(this,this.playButtonUpdater));this._Popcorn.listen("pause",IriSP.wrap(this,this.playButtonUpdater));this._Popcorn.listen("volumechange",IriSP.wrap(this,this.muteButtonUpdater));this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.timeDisplayUpdater));this._Popcorn.listen("loadedmetadata",
IriSP.wrap(this,this.timeDisplayUpdater));this._Popcorn.listen("IriSP.search.matchFound",IriSP.wrap(this,this.searchMatch));this._Popcorn.listen("IriSP.search.noMatchFound",IriSP.wrap(this,this.searchNoMatch));this._Popcorn.listen("IriSP.search.triggeredSearch",IriSP.wrap(this,this.triggeredSearch));this.selector.find(".Ldt-CtrlPlay").click(function(){a.playHandler.call(a)});this.selector.find(".Ldt-CtrlAnnotate").click(function(){a._Popcorn.trigger("IriSP.PlayerWidget.AnnotateButton.clicked")});
this.selector.find(".Ldt-CtrlSearch").click(function(){a.searchButtonHandler.call(a)});this.selector.find(".Ldt-CtrlSound").click(function(){a.muteHandler.call(a)});this.selector.find(".Ldt-CtrlPlay").attr("style","background-color:#CD21C24;");this.selector.hover(function(){a._Popcorn.trigger("IriSP.PlayerWidget.MouseOver")},function(){a._Popcorn.trigger("IriSP.PlayerWidget.MouseOut")});this.muteButtonUpdater()};
@@ -169,88 +175,90 @@
IriSP.PlayerWidget.prototype.searchButtonHandler=function(){if(this._searchBlockOpen==false){this.showSearchBlock();this.selector.find(".LdtSearchInput").attr("value",this._searchLastValue);this._Popcorn.trigger("IriSP.search",this._searchLastValue)}else this.hideSearchBlock()};
IriSP.PlayerWidget.prototype.searchHandler=function(){this._searchLastValue=this.selector.find(".LdtSearchInput").attr("value");this._positiveMatch=false;if(this._searchLastValue==""){this._Popcorn.trigger("IriSP.search.cleared");this.selector.find(".LdtSearchInput").css("background-color","")}else this._Popcorn.trigger("IriSP.search",this._searchLastValue)};IriSP.PlayerWidget.prototype.searchMatch=function(){this._positiveMatch=true;this.selector.find(".LdtSearchInput").css("background-color","#e1ffe1")};
IriSP.PlayerWidget.prototype.searchNoMatch=function(){this._positiveMatch!==true&&this.selector.find(".LdtSearchInput").css("background-color","#d62e3a")};IriSP.PlayerWidget.prototype.triggeredSearch=function(a){this.showSearchBlock();this.selector.find(".LdtSearchInput").attr("value",a);this._Popcorn.trigger("IriSP.search",a)};
-IriSP.PolemicWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d);this.userPol=[];this.userNoPol=[];this.userst=[];this.numberOfTweet=0;this.yMax=this.height;this.tweets=[];this.svgElements={};this.oldSearchMatches=[]};IriSP.PolemicWidget.prototype=new IriSP.Widget;
-IriSP.PolemicWidget.prototype.draw=function(){function a(y){if(y=="Q"){L+=1;return 2}else if(y=="REF"){K+=1;return 4}else if(y=="OK"){H+=1;return 1}else if(y=="KO"){G+=1;return 3}else if(y==""){D+=1;return 5}}function b(y){var C=this._serializer.getTweets();if(typeof C==="undefined"){C=this._serializer.getTweetIds()[0];if(typeof C==="undefined"){var v=y.views[0];if(typeof v.annotation_types!=="undefined")if(v.annotation_types.length===2&&typeof this._serializer.getContributions()==="undefined")C=
-v.annotation_types[1];else{console.log("PolemicWidget: invalid file - minimizing");return}}}this.paper=Raphael(document.getElementById(this._id),this._config.width,this._config.height);this._Popcorn.listen("IriSP.search",IriSP.wrap(this,function(I){this.searchHandler(I)}));this._Popcorn.listen("IriSP.search.closed",IriSP.wrap(this,this.searchFieldClosedHandler));this._Popcorn.listen("IriSP.search.cleared",IriSP.wrap(this,this.searchFieldClearedHandler));this.selector.mouseleave(IriSP.wrap(this,function(){h.TooltipWidget.hide.call(h.TooltipWidget)}));
-this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.sliderUpdater));this._Popcorn.listen("IriSP.Mediafragment.showAnnotation",IriSP.wrap(this,this.showAnnotation));for(v=0;v<y.annotations.length;v++){var g=y.annotations[v],B=Math.floor(g.begin/n*p),P=Math.floor(B/p*s);if(typeof g.meta!=="undefined"&&typeof g.meta["id-ref"]!=="undefined"&&g.meta["id-ref"]===C){var w={};if(typeof g.meta["dc:source"]!=="undefined")w=JSON.parse(g.meta["dc:source"].content);if(g.content.polemics!=undefined&&g.content.polemics[0]!=
-null)for(var F=0;F<g.content.polemics.length;F++){this.tweets[z]={id:v,qualification:a(g.content.polemics[F]),yIndicator:B,yframe:P,title:g.content.title,timeframe:g.begin,userId:w.id,userScreenName:w.screen_name,tsource:w,cinecast_id:g.id};z+=1}else{this.tweets[z]={id:v,qualification:a(""),yIndicator:B,yframe:P,title:g.content.title,timeframe:g.begin,userId:w.id,userScreenName:w.screen_name,tsource:w,cinecast_id:g.id};z+=1}}}d.call(this)}function d(){z=this.tweets.length;for(var y=0;y<u;y++)for(var C=
-0;C<z;C++)if(y==this.tweets[C].yframe){var v=this.tweets[C].qualification;if(m[y]==undefined)m[y]={id:y,qualifVol:[],mytweetsID:[]};m[y].mytweetsID.push(this.tweets[C]);if(m[y].qualifVol[v]==undefined)m[y].qualifVol[v]=1;else m[y].qualifVol[v]+=1}for(y=v=0;y<u;y++){var g=0;for(C=0;C<6;C++)if(m[y]!=undefined)if(m[y].qualifVol[C]!=undefined)g+=m[y].qualifVol[C];if(g>v)v=g}y=5*v+10;if(y>this.height){this.paper.setSize(this.width,y);this.height=y;console.log("resizeing")}for(y=0;y<u;y++){g=5;if(m[y]!=
-undefined)for(C=6;C>-1;C--)if(m[y].qualifVol[C]!=undefined)for(v=0;v<m[y].mytweetsID.length;v++)if(m[y].mytweetsID[v].qualification==C){var B=y*f,P=this.height-g;if(this.yMax>P)this.yMax=P;if(!this.svgElements.hasOwnProperty(m[y].mytweetsID[v].cinecast_id)){B=this.paper.rect(B,P,f-l,5).attr({stroke:"#00","stroke-width":0.1,fill:q[C]});g+=5;B.color=q[C];B.time=m[y].mytweetsID[v].timeframe;B.title=m[y].mytweetsID[v].title;B.id=m[y].mytweetsID[v].cinecast_id;P=IriSP.jQuery(B.node).offset();B.x=P.left;
-B.y=P.top;this.svgElements[B.id]=B;IriSP.jQuery(B.node).mouseenter(function(w){return function(F){h.TooltipWidget.show.call(h.TooltipWidget,w.title,w.attr("fill"),F.pageX-106,F.pageY-160);w.displayed=true}}(B)).mousedown(function(w){return function(){h._Popcorn.currentTime(w.time/1E3);h._Popcorn.trigger("IriSP.PolemicTweet.click",w.id)}}(B));IriSP.jQuery(B.node).attr("id","t"+v+"");IriSP.jQuery(B.node).attr("title",m[y].mytweetsID[v].title);IriSP.jQuery(B.node).attr("begin",m[y].mytweetsID[v].timeframe)}}}this.paperBackground=
+IriSP.PolemicWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c);this.userPol=[];this.userNoPol=[];this.userst=[];this.numberOfTweet=0;this.yMax=this.height;this.tweets=[];this.svgElements={};this.oldSearchMatches=[]};IriSP.PolemicWidget.prototype=new IriSP.Widget;
+IriSP.PolemicWidget.prototype.draw=function(){function a(y){if(y=="Q"){L+=1;return 2}else if(y=="REF"){J+=1;return 4}else if(y=="OK"){H+=1;return 1}else if(y=="KO"){G+=1;return 3}else if(y==""){D+=1;return 5}}function b(y){var C=this._serializer.getTweets();if(typeof C==="undefined"){C=this._serializer.getTweetIds()[0];if(typeof C==="undefined"){var v=y.views[0];if(typeof v.annotation_types!=="undefined")if(v.annotation_types.length===2&&typeof this._serializer.getContributions()==="undefined")C=
+v.annotation_types[1];else{console.log("PolemicWidget: invalid file - minimizing");return}}}this.paper=Raphael(document.getElementById(this._id),this._config.width,this._config.height);this._Popcorn.listen("IriSP.search",IriSP.wrap(this,function(I){this.searchHandler(I)}));this._Popcorn.listen("IriSP.search.closed",IriSP.wrap(this,this.searchFieldClosedHandler));this._Popcorn.listen("IriSP.search.cleared",IriSP.wrap(this,this.searchFieldClearedHandler));this.selector.mouseleave(IriSP.wrap(this,function(){g.TooltipWidget.hide.call(g.TooltipWidget)}));
+this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.sliderUpdater));this._Popcorn.listen("IriSP.Mediafragment.showAnnotation",IriSP.wrap(this,this.showAnnotation));for(v=0;v<y.annotations.length;v++){var f=y.annotations[v],B=Math.floor(f.begin/n*p),P=Math.floor(B/p*s);if(typeof f.meta!=="undefined"&&typeof f.meta["id-ref"]!=="undefined"&&f.meta["id-ref"]===C){var x={};if(typeof f.meta["dc:source"]!=="undefined")x=JSON.parse(f.meta["dc:source"].content);if(f.content.polemics!=undefined&&f.content.polemics[0]!=
+null)for(var F=0;F<f.content.polemics.length;F++){this.tweets[z]={id:v,qualification:a(f.content.polemics[F]),yIndicator:B,yframe:P,title:f.content.title,timeframe:f.begin,userId:x.id,userScreenName:x.screen_name,tsource:x,cinecast_id:f.id};z+=1}else{this.tweets[z]={id:v,qualification:a(""),yIndicator:B,yframe:P,title:f.content.title,timeframe:f.begin,userId:x.id,userScreenName:x.screen_name,tsource:x,cinecast_id:f.id};z+=1}}}c.call(this)}function c(){z=this.tweets.length;for(var y=0;y<u;y++)for(var C=
+0;C<z;C++)if(y==this.tweets[C].yframe){var v=this.tweets[C].qualification;if(m[y]==undefined)m[y]={id:y,qualifVol:[],mytweetsID:[]};m[y].mytweetsID.push(this.tweets[C]);if(m[y].qualifVol[v]==undefined)m[y].qualifVol[v]=1;else m[y].qualifVol[v]+=1}for(y=v=0;y<u;y++){var f=0;for(C=0;C<6;C++)if(m[y]!=undefined)if(m[y].qualifVol[C]!=undefined)f+=m[y].qualifVol[C];if(f>v)v=f}y=5*v+10;if(y>this.height){this.paper.setSize(this.width,y);this.height=y;console.log("resizeing")}for(y=0;y<u;y++){f=5;if(m[y]!=
+undefined)for(C=6;C>-1;C--)if(m[y].qualifVol[C]!=undefined)for(v=0;v<m[y].mytweetsID.length;v++)if(m[y].mytweetsID[v].qualification==C){var B=y*h,P=this.height-f;if(this.yMax>P)this.yMax=P;if(!this.svgElements.hasOwnProperty(m[y].mytweetsID[v].cinecast_id)){B=this.paper.rect(B,P,h-k,5).attr({stroke:"#00","stroke-width":0.1,fill:q[C]});f+=5;B.color=q[C];B.time=m[y].mytweetsID[v].timeframe;B.title=m[y].mytweetsID[v].title;B.id=m[y].mytweetsID[v].cinecast_id;P=IriSP.jQuery(B.node).offset();B.x=P.left;
+B.y=P.top;this.svgElements[B.id]=B;IriSP.jQuery(B.node).mouseenter(function(x){return function(F){g.TooltipWidget.show.call(g.TooltipWidget,x.title,x.attr("fill"),F.pageX-106,F.pageY-160);x.displayed=true}}(B)).mousedown(function(x){return function(){g._Popcorn.currentTime(x.time/1E3);g._Popcorn.trigger("IriSP.PolemicTweet.click",x.id)}}(B));IriSP.jQuery(B.node).attr("id","t"+v+"");IriSP.jQuery(B.node).attr("title",m[y].mytweetsID[v].title);IriSP.jQuery(B.node).attr("begin",m[y].mytweetsID[v].timeframe)}}}this.paperBackground=
this.paper.rect(0,0,this.width,this.height).attr({fill:"#F8F8F8","stroke-width":0.1,opacity:1});this.outerBorders=[];this.outerBorders.push(this.paper.rect(0,this.height-1,this.width,1).attr({fill:"#ababab",stroke:"none",opacity:1}));this.outerBorders.push(this.paper.rect(0,0,this.width,1).attr({fill:"#ababab",stroke:"none",opacity:1}));this.innerBorders=[];this.innerBorders.push(this.paper.rect(1,this.height-2,this.width,1).attr({fill:"#efefef",stroke:"none",opacity:1}));this.innerBorders.push(this.paper.rect(1,
1,this.width,1).attr({fill:"#efefef",stroke:"none",opacity:1}));this.innerBorders.push(this.paper.rect(1,1,1,this.height-2).attr({fill:"#d0d1d1",stroke:"none",opacity:0.8}));this.innerBorders.push(this.paper.rect(this.width-2,1,1,this.height-2).attr({fill:"#efefef",stroke:"none",opacity:1}));this.paperSlider=this.paper.rect(0,0,0,this.height).attr({fill:"#D4D5D5",stroke:"none",opacity:1});this.sliderTip=this.paper.rect(0,0,1,this.height).attr({fill:"#fc00ff",stroke:"none",opacity:1});this.paperSlider.toBack();
-this.paperBackground.toBack();this.sliderTip.toFront()}var h=this,f=5,l=1,p=this.width,u=p/f,z=0,n=+this._serializer.currentMedia().meta["dc:duration"],s=p/f,q=Array("","#1D973D","#C5A62D","#CE0A15","#036AAE","#585858"),m=Array(s),x=function(){};x=function(){};x.prototype.draw=function(){};x.prototype.zoom=function(){};x.prototype.inside=function(){};x=function(){};x=function(){};var D=0,L=0,K=0,H=0,G=0;this._serializer.sync(function(y){b.call(h,y)})};
+this.paperBackground.toBack();this.sliderTip.toFront()}var g=this,h=5,k=1,p=this.width,u=p/h,z=0,n=+this._serializer.currentMedia().meta["dc:duration"],s=p/h,q=Array("","#1D973D","#C5A62D","#CE0A15","#036AAE","#585858"),m=Array(s),w=function(){};w=function(){};w.prototype.draw=function(){};w.prototype.zoom=function(){};w.prototype.inside=function(){};w=function(){};w=function(){};var D=0,L=0,J=0,H=0,G=0;this._serializer.sync(function(y){b.call(g,y)})};
IriSP.PolemicWidget.prototype.sliderUpdater=function(){var a=+this._Popcorn.currentTime(),b=+this._serializer.currentMedia().meta["dc:duration"];this.paperSlider.attr("width",a*(this.width/(b/1E3)));this.sliderTip.attr("x",a*(this.width/(b/1E3)))};
-IriSP.PolemicWidget.prototype.searchHandler=function(a){if(a!=""){a=this._serializer.searchTweetsOccurences(a);IriSP.countProperties(a)>0?this._Popcorn.trigger("IriSP.search.matchFound"):this._Popcorn.trigger("IriSP.search.noMatchFound");for(var b in this.svgElements){var d=this.svgElements[b];d.attr({fill:d.color,opacity:0.4})}for(b in a)this.svgElements.hasOwnProperty(b)&&this.svgElements[b].attr({fill:"#fc00ff",opacity:1});this.oldSearchMatches=a}};
+IriSP.PolemicWidget.prototype.searchHandler=function(a){if(a!=""){a=this._serializer.searchTweetsOccurences(a);IriSP.countProperties(a)>0?this._Popcorn.trigger("IriSP.search.matchFound"):this._Popcorn.trigger("IriSP.search.noMatchFound");for(var b in this.svgElements){var c=this.svgElements[b];c.attr({fill:c.color,opacity:0.4})}for(b in a)this.svgElements.hasOwnProperty(b)&&this.svgElements[b].attr({fill:"#fc00ff",opacity:1});this.oldSearchMatches=a}};
IriSP.PolemicWidget.prototype.searchFieldClearedHandler=function(){for(var a in this.svgElements){var b=this.svgElements[a];b.attr({fill:b.color,opacity:1})}};IriSP.PolemicWidget.prototype.searchFieldClosedHandler=function(){for(var a in this.svgElements){var b=this.svgElements[a];b.attr({fill:b.color,opacity:1})}};IriSP.PolemicWidget.prototype.showAnnotation=function(a){if(this.svgElements.hasOwnProperty(a)){a=this.svgElements[a];this.TooltipWidget.show(a.title,a.attr("fill"),a.x-103,a.y-160)}};
-IriSP.SegmentsWidget=function(a,b,d){var h=this;IriSP.Widget.call(this,a,b,d);this.oldSearchMatches=[];this._Popcorn.listen("IriSP.search",function(f){h.searchHandler.call(h,f)});this._Popcorn.listen("IriSP.search.closed",function(){h.searchFieldClosedHandler.call(h)});this._Popcorn.listen("IriSP.search.cleared",function(){h.searchFieldClearedHandler.call(h)})};IriSP.SegmentsWidget.prototype=new IriSP.Widget;
-IriSP.SegmentsWidget.prototype.segmentToPixel=function(a){var b=Math.round(+a.begin/1E3);a=Math.round(+a.end/1E3);var d=this._serializer.currentMedia().meta["dc:duration"]/1E3;b=IriSP.timeToPourcent(b,d);this.selector.parent().width();b=Math.floor(IriSP.timeToPourcent(a,d)-b);return Math.floor(this.selector.parent().width()*(b/100))};IriSP.SegmentsWidget.prototype.segmentsLength=function(a){for(var b=0,d=0;d<a.length;d++)b+=this.segmentToPixel(a[d].annotation);return b};
-IriSP.SegmentsWidget.prototype.draw=function(){var a=this,b=this._serializer._data.annotations;this.selector.addClass("Ldt-SegmentsWidget");this.selector.append(Mustache.to_html(IriSP.overlay_marker_template));var d=this._serializer.getChapitrage();if(typeof d==="undefined")d=this._serializer.getNonTweetIds()[0];this.positionMarker=this.selector.children(":first");this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.positionUpdater));var h=0,f=[];for(h=0;h<b.length;h++){var l=b[h];d!=""&&typeof l.meta!==
-"undefined"&&typeof l.meta["id-ref"]!=="undefined"&&l.meta["id-ref"]!=d||f.push(l)}this.selector.width();b=IriSP.underscore.max(f,function(m){return m.end});for(h=0;h<f.length;h++){l=f[h];d=+l.begin;var p=+l.end,u=this._serializer.currentMedia().meta["dc:duration"],z=l.id,n=Math.floor(this.selector.parent().width()*(d/u));p=Math.floor(this.selector.parent().width()*(p/u));p=l.id!==b.id?p-n-1:p-n;u=IriSP.clean_substr(l.content.title+" -<br>"+l.content.description,0,132)+"...";var s=typeof l.content.color!==
-"undefined"?l.content.color:l.color,q=IriSP.DEC_HEXA_COLOR(s);if(q.length==4)q+="00";this.selector.append(Mustache.to_html(IriSP.annotation_template,{divTitle:u,id:z,startPixel:n,pxWidth:p,hexa_color:q,seekPlace:Math.round(d/1E3)}));if(l.id===b.id){this.selector.find("#"+z).addClass("Ldt-lastSegment");this.selector.find(".Ldt-lastSegment").css("border-color","#"+q)}IriSP.jQuery("#"+z).fadeTo(0,0.3);IriSP.jQuery("#"+z).mouseover(function(m){return function(){IriSP.jQuery(this).animate({opacity:0.6},
-5);var x=IriSP.jQuery(this).offset(),D=IriSP.jQuery(this).outerWidth()/2;D=x.left+D-106;if(D<0)D=0;a.TooltipWidget.show(m,s,D,x.top-160)}}(u)).mouseout(function(){IriSP.jQuery(this).animate({opacity:0.3},5);a.TooltipWidget.hide()});IriSP.jQuery("#"+z).click(function(m,x){return function(){m.clickHandler(x)}}(this,l))}};IriSP.SegmentsWidget.prototype.clear=function(){this.selector.children(".Ldt-iri-chapter").animate({opacity:0.3},100)};
-IriSP.SegmentsWidget.prototype.clickHandler=function(a){this._Popcorn.trigger("IriSP.SegmentsWidget.click",a.id);this._Popcorn.currentTime(Math.round(+a.begin/1E3))};
-IriSP.SegmentsWidget.prototype.searchHandler=function(a){if(a!=""){a=this._serializer.searchOccurences(a);IriSP.countProperties(a)>0?this._Popcorn.trigger("IriSP.search.matchFound"):this._Popcorn.trigger("IriSP.search.noMatchFound");this.selector.children(".Ldt-iri-chapter").css("opacity",0.1);for(var b in a){var d=0.5+a[b]*0.2;this.selector.find("#"+b).dequeue();this.selector.find("#"+b).animate({opacity:d},200)}this.oldSearchMatches=a}};IriSP.SegmentsWidget.prototype.searchFieldClearedHandler=function(){this.clear()};
-IriSP.SegmentsWidget.prototype.searchFieldClosedHandler=function(){this.clear()};IriSP.SegmentsWidget.prototype.positionUpdater=function(){var a=this._serializer.currentMedia().meta["dc:duration"]/1E3;this.positionMarker.css("left",(this._Popcorn.currentTime()/a*100).toFixed(2)+"%")};IriSP.SliceWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d)};IriSP.SliceWidget.prototype=new IriSP.Widget;
-IriSP.SliceWidget.prototype.draw=function(){this.selector.append(Mustache.to_html(IriSP.sliceWidget_template));this.sliceZone=this.selector.find(".Ldt-sliceZone");this.zoneWidth=this.zoneLeft=0;this.leftHandle=this.selector.find(".Ldt-sliceLeftHandle");this.rightHandle=this.selector.find(".Ldt-sliceRightHandle");this.leftHandle.draggable({axis:"x",drag:IriSP.wrap(this,this.leftHandleDragged),containment:"parent"});this.rightHandle.draggable({axis:"x",drag:IriSP.wrap(this,this.rightHandleDragged),
-containment:"parent"});this.leftHandle.css("position","absolute");this.rightHandle.css("position","absolute");this._Popcorn.listen("IriSP.SliceWidget.position",IriSP.wrap(this,this.positionSliceHandler));this._Popcorn.listen("IriSP.SliceWidget.show",IriSP.wrap(this,this.show));this._Popcorn.listen("IriSP.SliceWidget.hide",IriSP.wrap(this,this.hide));this.selector.hide()};
+IriSP.SegmentsWidget=function(a,b,c){var g=this;IriSP.Widget.call(this,a,b,c);this.oldSearchMatches=[];this._Popcorn.listen("IriSP.search",function(h){g.searchHandler.call(g,h)});this._Popcorn.listen("IriSP.search.closed",function(){g.searchFieldClosedHandler.call(g)});this._Popcorn.listen("IriSP.search.cleared",function(){g.searchFieldClearedHandler.call(g)})};IriSP.SegmentsWidget.prototype=new IriSP.Widget;
+IriSP.SegmentsWidget.prototype.segmentToPixel=function(a){var b=Math.round(+a.begin/1E3);a=Math.round(+a.end/1E3);var c=this._serializer.currentMedia().meta["dc:duration"]/1E3;b=IriSP.timeToPourcent(b,c);this.selector.parent().width();b=Math.floor(IriSP.timeToPourcent(a,c)-b);return Math.floor(this.selector.parent().width()*(b/100))};IriSP.SegmentsWidget.prototype.segmentsLength=function(a){for(var b=0,c=0;c<a.length;c++)b+=this.segmentToPixel(a[c].annotation);return b};
+IriSP.SegmentsWidget.prototype.draw=function(){var a=this,b=this._serializer._data.annotations;this.selector.addClass("Ldt-SegmentsWidget");this.selector.append(Mustache.to_html(IriSP.overlay_marker_template));var c=this._serializer.getChapitrage();if(typeof c==="undefined")c=this._serializer.getNonTweetIds()[0];this.positionMarker=this.selector.children(":first");this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.positionUpdater));var g=0,h=[];for(g=0;g<b.length;g++){var k=b[g];c!=""&&typeof k.meta!==
+"undefined"&&typeof k.meta["id-ref"]!=="undefined"&&k.meta["id-ref"]!=c||h.push(k)}this.selector.width();b=IriSP.underscore.max(h,function(m){return m.end});for(g=0;g<h.length;g++){k=h[g];c=+k.begin;var p=+k.end,u=this._serializer.currentMedia().meta["dc:duration"],z=k.id,n=Math.floor(this.selector.parent().width()*(c/u));p=Math.floor(this.selector.parent().width()*(p/u));p=k.id!==b.id?p-n-1:p-n;u=IriSP.clean_substr(k.content.title+" -<br>"+k.content.description,0,132)+"...";var s=typeof k.content.color!==
+"undefined"?k.content.color:k.color,q=IriSP.DEC_HEXA_COLOR(s);if(q.length==4)q+="00";this.selector.append(Mustache.to_html(IriSP.annotation_template,{divTitle:u,id:z,startPixel:n,pxWidth:p,hexa_color:q,seekPlace:Math.round(c/1E3)}));if(k.id===b.id){this.selector.find("#"+z).addClass("Ldt-lastSegment");this.selector.find(".Ldt-lastSegment").css("border-color","#"+q)}IriSP.jQuery("#"+z).fadeTo(0,0.3);IriSP.jQuery("#"+z).mouseover(function(m){return function(){IriSP.jQuery(this).animate({opacity:0.6},
+5);var w=IriSP.jQuery(this).offset(),D=IriSP.jQuery(this).outerWidth()/2;D=w.left+D-106;if(D<0)D=0;a.TooltipWidget.show(m,s,D,w.top-160)}}(u)).mouseout(function(){IriSP.jQuery(this).animate({opacity:0.3},5);a.TooltipWidget.hide()});this._Popcorn.listen("IriSP.Mediafragment.showAnnotation",function(m,w){return function(D){if(D===m){var L=IriSP.jQuery("#"+m);L.animate({opacity:0.6},5);D=L.offset();var J=L.outerWidth()/2;J=D.left+J-106;if(J<0)J=0;a.TooltipWidget.show(w,s,J,D.top-160);IriSP.jQuery(document).one("mousemove",
+function(){L.animate({opacity:0.3},5);a.TooltipWidget.hide()})}}}(z,u));IriSP.jQuery("#"+z).click(function(m,w){return function(){m.clickHandler(w)}}(this,k))}};IriSP.SegmentsWidget.prototype.clear=function(){this.selector.children(".Ldt-iri-chapter").animate({opacity:0.3},100)};IriSP.SegmentsWidget.prototype.clickHandler=function(a){this._Popcorn.trigger("IriSP.SegmentsWidget.click",a.id);this._Popcorn.currentTime(Math.round(+a.begin/1E3))};
+IriSP.SegmentsWidget.prototype.searchHandler=function(a){if(a!=""){a=this._serializer.searchOccurences(a);IriSP.countProperties(a)>0?this._Popcorn.trigger("IriSP.search.matchFound"):this._Popcorn.trigger("IriSP.search.noMatchFound");this.selector.children(".Ldt-iri-chapter").css("opacity",0.1);for(var b in a){var c=0.5+a[b]*0.2;this.selector.find("#"+b).dequeue();this.selector.find("#"+b).animate({opacity:c},200)}this.oldSearchMatches=a}};IriSP.SegmentsWidget.prototype.searchFieldClearedHandler=function(){this.clear()};
+IriSP.SegmentsWidget.prototype.searchFieldClosedHandler=function(){this.clear()};IriSP.SegmentsWidget.prototype.positionUpdater=function(){var a=this._serializer.currentMedia().meta["dc:duration"]/1E3;this.positionMarker.css("left",(this._Popcorn.currentTime()/a*100).toFixed(2)+"%")};IriSP.SegmentsWidget.prototype.showAnnotation=function(){};IriSP.SliceWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c)};IriSP.SliceWidget.prototype=new IriSP.Widget;
+IriSP.SliceWidget.prototype.draw=function(){this.selector.append(Mustache.to_html(IriSP.sliceWidget_template));this.sliceZone=this.selector.find(".Ldt-sliceZone");this.zoneWidth=this.zoneLeft=0;this.leftHandle=this.selector.find(".Ldt-sliceLeftHandle");this.rightHandle=this.selector.find(".Ldt-sliceRightHandle");var a=this.selector.offset().left,b=this.selector.offset().top;if(IriSP.jQuery.browser.mozilla){c=[a-16,b,this.selector.width()+a-8,b];this.leftHandle.draggable({axis:"x",drag:IriSP.wrap(this,
+this.leftHandleDragged),containment:c});c=[a,b,this.selector.width()+a-8,b]}else{var c=[a-8,b,this.selector.width()+a,b];this.leftHandle.draggable({axis:"x",drag:IriSP.wrap(this,this.leftHandleDragged),containment:c});c=[a,b,this.selector.width()+a,b]}this.rightHandle.draggable({axis:"x",drag:IriSP.wrap(this,this.rightHandleDragged),containment:c});this.leftHandle.css("position","absolute");this.rightHandle.css("position","absolute");this._Popcorn.listen("IriSP.SliceWidget.position",IriSP.wrap(this,
+this.positionSliceHandler));this._Popcorn.listen("IriSP.SliceWidget.show",IriSP.wrap(this,this.show));this._Popcorn.listen("IriSP.SliceWidget.hide",IriSP.wrap(this,this.hide));this.selector.hide()};
IriSP.SliceWidget.prototype.positionSliceHandler=function(a){left=a[0];width=a[1];this.zoneLeft=left;this.zoneWidth=width;this.sliceZone.css("left",left+"px");this.sliceZone.css("width",width+"px");this.leftHandle.css("left",left-7+"px");this.rightHandle.css("left",left+width+"px");this._leftHandleOldLeft=left-7;this._rightHandleOldLeft=left+width};
-IriSP.SliceWidget.prototype.leftHandleDragged=function(a,b){this.leftHandle.position();var d=Math.floor(this.rightHandle.position().left);if(Math.floor(b.position.left)>=d-7)b.position.left=d-7;this.zoneWidth=d-Math.floor(b.position.left)-7;this.zoneLeft=Math.floor(b.position.left)+8;this.sliceZone.css("width",this.zoneWidth);this.sliceZone.css("left",this.zoneLeft+"px");this._leftHandleOldLeft=Math.floor(this._leftHandleOldLeft);this.broadcastChanges()};
-IriSP.SliceWidget.prototype.rightHandleDragged=function(a,b){this.leftHandle.position();var d=Math.floor(this.leftHandle.position().left);if(Math.floor(b.position.left)<d+7)b.position.left=d+7;this.zoneWidth=Math.floor(b.position.left)-(d+7);this.sliceZone.css("width",this.zoneWidth);this._rightHandleOldLeft=Math.floor(this._rightHandleOldLeft);this.broadcastChanges()};
-IriSP.SliceWidget.prototype.broadcastChanges=function(){var a=this.zoneLeft/this.selector.width()*100,b=this.zoneWidth/this.selector.width()*100;this._Popcorn.trigger("IriSP.SliceWidget.zoneChange",[a,b])};IriSP.SliceWidget.prototype.show=function(){this.selector.show()};IriSP.SliceWidget.prototype.hide=function(){this.selector.hide()};IriSP.SliderWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d)};IriSP.SliderWidget.prototype=new IriSP.Widget;
+IriSP.SliceWidget.prototype.leftHandleDragged=function(a,b){this.leftHandle.offset();var c=Math.floor(this.rightHandle.position().left);this.selector.offset();if(Math.floor(b.position.left)>=c-7)b.position.left=c-7;this.zoneWidth=c-Math.floor(b.position.left)-7;this.zoneLeft=Math.floor(b.position.left)+8;this.sliceZone.css("width",this.zoneWidth);this.sliceZone.css("left",this.zoneLeft+"px");this._leftHandleOldLeft=b.position.left;this.broadcastChanges()};
+IriSP.SliceWidget.prototype.rightHandleDragged=function(a,b){this.leftHandle.position();var c=Math.floor(this.leftHandle.position().left);this.selector.offset();this.selector.width();if(Math.floor(b.position.left)<c+7)b.position.left=c+7;this.zoneWidth=Math.floor(b.position.left)-(c+7);this.sliceZone.css("width",this.zoneWidth);this._rightHandleOldLeft=Math.floor(this._rightHandleOldLeft);this.broadcastChanges()};
+IriSP.SliceWidget.prototype.broadcastChanges=function(){var a=this.zoneLeft/this.selector.width()*100,b=this.zoneWidth/this.selector.width()*100;this._Popcorn.trigger("IriSP.SliceWidget.zoneChange",[a,b])};IriSP.SliceWidget.prototype.show=function(){this.selector.show()};IriSP.SliceWidget.prototype.hide=function(){this.selector.hide()};IriSP.SliderWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c)};IriSP.SliderWidget.prototype=new IriSP.Widget;
IriSP.SliderWidget.prototype.draw=function(){var a=this;this.selector.append(Mustache.to_html(IriSP.sliderWidget_template,{}));this.selector.addClass("Ldt-SliderMinimized");this.sliderBackground=this.selector.find(".Ldt-sliderBackground");this.sliderForeground=this.selector.find(".Ldt-sliderForeground");this.positionMarker=this.selector.find(".Ldt-sliderPositionMarker");this.sliderMaximized=this.draggingOngoing=false;this.timeOutId=null;this.positionMarker.draggable({axis:"x",start:IriSP.wrap(this,
this.positionMarkerDraggingStartedHandler),stop:IriSP.wrap(this,this.positionMarkerDraggedHandler),containment:"parent"});this.positionMarker.css("position","absolute");this.sliderBackground.click(function(b){a.backgroundClickHandler.call(a,b)});this.sliderForeground.click(function(b){a.foregroundClickHandler.call(a,b)});this.selector.hover(IriSP.wrap(this,this.mouseOverHandler),IriSP.wrap(this,this.mouseOutHandler));this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.sliderUpdater));this._Popcorn.listen("IriSP.PlayerWidget.MouseOver",
IriSP.wrap(this,this.mouseOverHandler));this._Popcorn.listen("IriSP.PlayerWidget.MouseOut",IriSP.wrap(this,this.mouseOutHandler))};
-IriSP.SliderWidget.prototype.sliderUpdater=function(){if(!(this.draggingOngoing||this._disableUpdate)){var a=this._Popcorn.currentTime(),b=this._serializer.currentMedia().meta["dc:duration"]/1E3;b=a/b;a=this.selector.width();b=Math.floor(this.selector.width()*b);var d=this.positionMarker.width()/2,h=b-d;if(h<=0)h=0;if(b+1*d>=a)h=a-1*d-1;this.sliderForeground.css("width",b+"px");this.positionMarker.css("left",h+"px")}};
-IriSP.SliderWidget.prototype.backgroundClickHandler=function(a){var b=this.sliderBackground.parent().offset(),d=this.sliderBackground.width();a=a.pageX-b.left;b=this._serializer.currentMedia().meta["dc:duration"]/1E3;this._Popcorn.currentTime((a/d*b).toFixed(2))};
-IriSP.SliderWidget.prototype.foregroundClickHandler=function(a){var b=this.sliderForeground.parent().offset(),d=this.sliderBackground.width();a=a.pageX-b.left;b=this._serializer.currentMedia().meta["dc:duration"]/1E3;this._Popcorn.currentTime((a/d*b).toFixed(2))};
+IriSP.SliderWidget.prototype.sliderUpdater=function(){if(!(this.draggingOngoing||this._disableUpdate)){var a=this._Popcorn.currentTime(),b=this._serializer.currentMedia().meta["dc:duration"]/1E3;b=a/b;a=this.selector.width();b=Math.floor(this.selector.width()*b);var c=this.positionMarker.width()/2,g=b-c;if(g<=0)g=0;if(b+1*c>=a)g=a-1*c-1;this.sliderForeground.css("width",b+"px");this.positionMarker.css("left",g+"px")}};
+IriSP.SliderWidget.prototype.backgroundClickHandler=function(a){var b=this.sliderBackground.parent().offset(),c=this.sliderBackground.width();a=a.pageX-b.left;b=this._serializer.currentMedia().meta["dc:duration"]/1E3;this._Popcorn.currentTime((a/c*b).toFixed(2))};
+IriSP.SliderWidget.prototype.foregroundClickHandler=function(a){var b=this.sliderForeground.parent().offset(),c=this.sliderBackground.width();a=a.pageX-b.left;b=this._serializer.currentMedia().meta["dc:duration"]/1E3;this._Popcorn.currentTime((a/c*b).toFixed(2))};
IriSP.SliderWidget.prototype.mouseOverHandler=function(){this.timeOutId!==null&&window.clearTimeout(this.timeOutId);this.sliderMaximized=true;this.sliderBackground.animate({height:"9px"},100);this.sliderForeground.animate({height:"9px"},100);this.positionMarker.animate({height:"9px",width:"9px"},100)};IriSP.SliderWidget.prototype.mouseOutHandler=function(){this.timeOutId=window.setTimeout(IriSP.wrap(this,this.minimizeOnTimeout),IriSP.widgetsDefaults.SliderWidget.minimize_period)};
IriSP.SliderWidget.prototype.minimizeOnTimeout=function(){this.sliderBackground.animate({height:"5px"},100);this.sliderForeground.animate({height:"5px"},100);this.positionMarker.animate({height:"5px",width:"5px"},100);this.positionMarker.css("margin-top","0px");this.sliderMinimized=true};IriSP.SliderWidget.prototype.positionMarkerDraggingStartedHandler=function(){this.draggingOngoing=true};
-IriSP.SliderWidget.prototype.positionMarkerDraggedHandler=function(a){this._disableUpdate=true;window.setTimeout(IriSP.wrap(this,function(){this._disableUpdate=false}),500);var b=this.sliderForeground.parent().offset(),d=this.sliderBackground.width();a=a.pageX-b.left;b=this._serializer.currentMedia().meta["dc:duration"]/1E3;this._Popcorn.currentTime((a/d*b).toFixed(2));this.draggingOngoing=false};
-IriSP.SparklineWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d);this._oldAnnotation=null;this._results=[]};IriSP.SparklineWidget.prototype=new IriSP.Widget;IriSP.SparklineWidget.prototype.clear=function(){};
-IriSP.SparklineWidget.prototype.draw=function(){var a=Mustache.to_html(IriSP.SparklineWidget_template,{width:this.width,height:this.height}),b=this._serializer._data.views,d;if(!IriSP.null_or_undefined(b)){var h;for(h=0;h<b.length;h++){var f=b[h];if(f.id==="stat"){d=f;break}}}if(IriSP.null_or_undefined(d)){console.log("sparklinewidget : computing stats ourselves");b=this.selector.width()/IriSP.widgetsDefaults.SparklineWidget.column_width;d=+this._serializer.currentMedia().meta["dc:duration"]/b;u=
-[];for(f=h=0;f<b&&h<this._serializer._data.annotations.length;f++){for(var l=0,p=+this._serializer._data.annotations[h].begin;p>=f*d&&p<=(f+1)*d;){l++;h++;if(h>=this._serializer._data.annotations.length)break;p=+this._serializer._data.annotations[h].begin}u.push(l)}}else{console.log("sparklinewidget : using stats embedded in the json");var u=d.meta.stat.split(",")}this._results=u;this.selector.append(a);this.selector.find(".Ldt-sparkLine").css("background","#c7c8cc");this.selector.find(".Ldt-sparkLine").sparkline(u,
+IriSP.SliderWidget.prototype.positionMarkerDraggedHandler=function(a){this._disableUpdate=true;window.setTimeout(IriSP.wrap(this,function(){this._disableUpdate=false}),500);var b=this.sliderForeground.parent().offset(),c=this.sliderBackground.width();a=a.pageX-b.left;b=this._serializer.currentMedia().meta["dc:duration"]/1E3;this._Popcorn.currentTime((a/c*b).toFixed(2));this.draggingOngoing=false};
+IriSP.SparklineWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c);this._oldAnnotation=null;this._results=[]};IriSP.SparklineWidget.prototype=new IriSP.Widget;IriSP.SparklineWidget.prototype.clear=function(){};
+IriSP.SparklineWidget.prototype.draw=function(){var a=Mustache.to_html(IriSP.SparklineWidget_template,{width:this.width,height:this.height}),b=this._serializer._data.views,c;if(!IriSP.null_or_undefined(b)){var g;for(g=0;g<b.length;g++){var h=b[g];if(h.id==="stat"){c=h;break}}}if(IriSP.null_or_undefined(c)){console.log("sparklinewidget : computing stats ourselves");b=this.selector.width()/IriSP.widgetsDefaults.SparklineWidget.column_width;c=+this._serializer.currentMedia().meta["dc:duration"]/b;u=
+[];for(h=g=0;h<b&&g<this._serializer._data.annotations.length;h++){for(var k=0,p=+this._serializer._data.annotations[g].begin;p>=h*c&&p<=(h+1)*c;){k++;g++;if(g>=this._serializer._data.annotations.length)break;p=+this._serializer._data.annotations[g].begin}u.push(k)}}else{console.log("sparklinewidget : using stats embedded in the json");var u=c.meta.stat.split(",")}this._results=u;this.selector.append(a);this.selector.find(".Ldt-sparkLine").css("background","#c7c8cc");this.selector.find(".Ldt-sparkLine").sparkline(u,
{lineColor:"#7492b4",fillColor:"#aeaeb8",spotColor:"#b70056",width:this.width,height:this.height});this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.timeUpdateHandler));this._Popcorn.listen("IriSP.createAnnotationWidget.addedAnnotation",IriSP.wrap(this,this.handleNewAnnotation));IriSP.jQuery(".Ldt-sparkLineClickOverlay").click(IriSP.wrap(this,this.clickHandler))};
IriSP.SparklineWidget.prototype.timeUpdateHandler=function(){var a=this._Popcorn.currentTime(),b=+this._serializer.currentMedia().meta["dc:duration"]/1E3;a=(a/b*100).toFixed(4);IriSP.jQuery(".Ldt-sparkLinePositionMarker").css("width",a+"%")};
-IriSP.SparklineWidget.prototype.clickHandler=function(a){var b=this.selector.offset(),d=this.selector.width();a=a.pageX-b.left;b=this._serializer.currentMedia().meta["dc:duration"]/1E3;d=(a/d*b).toFixed(2);this._Popcorn.trigger("IriSP.SparklineWidget.clicked",d);this._Popcorn.currentTime(d)};
-IriSP.SparklineWidget.prototype.handleNewAnnotation=function(a){var b=this._results.length,d=+this._serializer.currentMedia().meta["dc:duration"];this._results[Math.floor(+a.begin/Math.round(d/b))]++;this.selector.find(".Ldt-sparkLine").sparkline(this._results,{lineColor:"#7492b4",fillColor:"#aeaeb8",spotColor:"#b70056",width:this.width,height:this.height})};IriSP.StackGraphWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d)};IriSP.StackGraphWidget.prototype=new IriSP.Widget;
+IriSP.SparklineWidget.prototype.clickHandler=function(a){var b=this.selector.offset(),c=this.selector.width();a=a.pageX-b.left;b=this._serializer.currentMedia().meta["dc:duration"]/1E3;c=(a/c*b).toFixed(2);this._Popcorn.trigger("IriSP.SparklineWidget.clicked",c);this._Popcorn.currentTime(c)};
+IriSP.SparklineWidget.prototype.handleNewAnnotation=function(a){var b=this._results.length,c=+this._serializer.currentMedia().meta["dc:duration"];b=Math.round(c/b);c=+a.end;a=Math.floor(+a.begin/b);b=Math.floor(c/b);for(a=a;a<Math.min(b,this._results.length);a++)this._results[a]++;this.selector.find(".Ldt-sparkLine").sparkline(this._results,{lineColor:"#7492b4",fillColor:"#aeaeb8",spotColor:"#b70056",width:this.width,height:this.height})};
+IriSP.StackGraphWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c)};IriSP.StackGraphWidget.prototype=new IriSP.Widget;
IriSP.StackGraphWidget.prototype.draw=function(){var a=[{keywords:["++"],description:"positif",color:"#1D973D"},{keywords:["--"],description:"negatif",color:"#CE0A15"},{keywords:["=="],description:"reference",color:"#C5A62D"},{keywords:["??"],description:"question",color:"#036AAE"}],b="#585858";this.height=this._config.height||50;this.width=this.selector.width();this.isStreamGraph=this._config.streamgraph||false;this.sliceCount=this._config.slices||~~(this.width/(this.isStreamGraph?20:5));this.tagconf=
-this._config.tags?this._config.tags:a;IriSP._(this.tagconf).each(function(v){v.regexp=RegExp(v.keywords.map(function(g){return g.replace(/([\W])/gm,"\\$1")}).join("|"),"im")});this.defaultcolorconf=this._config.defaultcolor?this._config.defaultcolor:b;this.paper=new Raphael(this.selector[0],this.width,this.height);this.groups=[];this.duration=this._serializer.currentMedia().meta["dc:duration"];this._serializer.getTweets();var d=~~(this.duration/this.sliceCount),h=this._serializer._data.annotations,
-f=IriSP._.range(this.sliceCount).map(function(v){return h.filter(function(g){return g.begin<=(1+v)*d&&g.end>=v*d})}),l=IriSP._(f).max(function(v){return v.length}).length,p=this.height/l,u=this.width/this.sliceCount;_showTitle=!this._config.excludeTitle;_showDescription=!this._config.excludeDescription;var z=this.tagconf.map(function(){return[]});z.push([]);for(var n=0;n<this.sliceCount;n++){var s=f[n];if(s){for(var q=this.tagconf.map(function(){return 0}),m=0;m<s.length;m++){var x=(_showTitle?s[m].content.title:
-"")+" "+(_showDescription?s[m].content.description:""),D=this.tagconf.map(function(v){return x.search(v.regexp)==-1?0:1}),L=D.reduce(function(v,g){return v+g},0);L&&IriSP._(D).each(function(v,g){q[g]+=v/L})}L=q.reduce(function(v,g){return v+g},0);var K=s.length-L,H=K*p,G=this.height-H;this.isStreamGraph||this.paper.rect(n*u,G,u-1,H).attr({stroke:"none",fill:this.defaultcolorconf});z[0].push(G);for(m=0;m<this.tagconf.length;m++){H=q[m]*p;G-=H;this.isStreamGraph||this.paper.rect(n*u,G,u-1,H).attr({stroke:"none",
-fill:this.tagconf[m].color});z[m+1].push(G)}this.groups.push(q.map(function(v){return v/s.length}))}else{for(m=0;m<z.length;m++)z[m].push(this.height);this.groups.push(this.tagconf.map(function(){return 0}))}}if(this.isStreamGraph)for(m=z.length-1;m>=0;m--){var y=z[m].reduce(function(v,g,B){return v+(B?"C"+B*u+" "+z[m][B-1]+" "+B*u+" "+g+" "+(B+0.5)*u+" "+g:"M0 "+g+"L"+0.5*u+" "+g)},"")+"L"+this.width+" "+z[m][z[m].length-1]+"L"+this.width+" "+this.height+"L0 "+this.height;this.paper.path(y).attr({stroke:"none",
+this._config.tags?this._config.tags:a;IriSP._(this.tagconf).each(function(v){v.regexp=RegExp(v.keywords.map(function(f){return f.replace(/([\W])/gm,"\\$1")}).join("|"),"im")});this.defaultcolorconf=this._config.defaultcolor?this._config.defaultcolor:b;this.paper=new Raphael(this.selector[0],this.width,this.height);this.groups=[];this.duration=this._serializer.currentMedia().meta["dc:duration"];this._serializer.getTweets();var c=~~(this.duration/this.sliceCount),g=this._serializer._data.annotations,
+h=IriSP._.range(this.sliceCount).map(function(v){return g.filter(function(f){return f.begin<=(1+v)*c&&f.end>=v*c})}),k=IriSP._(h).max(function(v){return v.length}).length,p=this.height/k,u=this.width/this.sliceCount;_showTitle=!this._config.excludeTitle;_showDescription=!this._config.excludeDescription;var z=this.tagconf.map(function(){return[]});z.push([]);for(var n=0;n<this.sliceCount;n++){var s=h[n];if(s){for(var q=this.tagconf.map(function(){return 0}),m=0;m<s.length;m++){var w=(_showTitle?s[m].content.title:
+"")+" "+(_showDescription?s[m].content.description:""),D=this.tagconf.map(function(v){return w.search(v.regexp)==-1?0:1}),L=D.reduce(function(v,f){return v+f},0);L&&IriSP._(D).each(function(v,f){q[f]+=v/L})}L=q.reduce(function(v,f){return v+f},0);var J=s.length-L,H=J*p,G=this.height-H;this.isStreamGraph||this.paper.rect(n*u,G,u-1,H).attr({stroke:"none",fill:this.defaultcolorconf});z[0].push(G);for(m=0;m<this.tagconf.length;m++){H=q[m]*p;G-=H;this.isStreamGraph||this.paper.rect(n*u,G,u-1,H).attr({stroke:"none",
+fill:this.tagconf[m].color});z[m+1].push(G)}this.groups.push(q.map(function(v){return v/s.length}))}else{for(m=0;m<z.length;m++)z[m].push(this.height);this.groups.push(this.tagconf.map(function(){return 0}))}}if(this.isStreamGraph)for(m=z.length-1;m>=0;m--){var y=z[m].reduce(function(v,f,B){return v+(B?"C"+B*u+" "+z[m][B-1]+" "+B*u+" "+f+" "+(B+0.5)*u+" "+f:"M0 "+f+"L"+0.5*u+" "+f)},"")+"L"+this.width+" "+z[m][z[m].length-1]+"L"+this.width+" "+this.height+"L0 "+this.height;this.paper.path(y).attr({stroke:"none",
fill:m?this.tagconf[m-1].color:this.defaultcolorconf})}this.rectangleFocus=this.paper.rect(0,0,u,this.height).attr({stroke:"none",fill:"#ff00ff",opacity:0});this.rectangleProgress=this.paper.rect(0,0,0,this.height).attr({stroke:"none",fill:"#808080",opacity:0.3});this.ligneProgress=this.paper.path("M0 0L0 "+this.height).attr({stroke:"#ff00ff","line-width":2});this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.timeUpdateHandler));var C=this;this.selector.click(IriSP.wrap(this,this.clickHandler)).mousemove(function(v){C.updateTooltip(v);
-v=v.pageX-C.selector.offset().left;var g=C._serializer.currentMedia().meta["dc:duration"];v=(v/C.width*g).toFixed(2);C._Popcorn.trigger("IriSP.StackGraphWidget.mouseOver",v)}).mouseout(function(){C.TooltipWidget.hide();C.rectangleFocus.attr({opacity:0})})};IriSP.StackGraphWidget.prototype.timeUpdateHandler=function(){var a=this._Popcorn.currentTime(),b=1E3*a/this.duration*this.width;this.rectangleProgress.attr({width:b});this.ligneProgress.attr({path:"M"+b+" 0L"+b+" "+this.height})};
+v=v.pageX-C.selector.offset().left;var f=C._serializer.currentMedia().meta["dc:duration"];v=(v/C.width*f).toFixed(2);C._Popcorn.trigger("IriSP.StackGraphWidget.mouseOver",v)}).mouseout(function(){C.TooltipWidget.hide();C.rectangleFocus.attr({opacity:0})})};IriSP.StackGraphWidget.prototype.timeUpdateHandler=function(){var a=this._Popcorn.currentTime(),b=1E3*a/this.duration*this.width;this.rectangleProgress.attr({width:b});this.ligneProgress.attr({path:"M"+b+" 0L"+b+" "+this.height})};
IriSP.StackGraphWidget.prototype.clickHandler=function(a){a=((a.pageX-this.selector.offset().left)/this.width*this.duration/1E3).toFixed(2);this._Popcorn.trigger("IriSP.StackGraphWidget.clicked",a);this._Popcorn.currentTime(a)};
-IriSP.StackGraphWidget.prototype.updateTooltip=function(a){var b=~~(this.sliceCount*(a.pageX-this.selector.offset().left)/this.width),d=this.groups[b],h=this.width/this.sliceCount,f='<ul style="list-style: none; margin: 0; padding: 0;">'+this.tagconf.map(function(l,p){return'<li style="clear: both;"><span style="float: left; width: 10px; height: 10px; margin: 2px; background: '+l.color+';"></span>'+~~(100*d[p])+"% de "+l.description+"</li>"}).join("")+"</ul>";this.TooltipWidget._shown=false;this.TooltipWidget.show("",
-"",a.pageX-105,a.pageY-160);this.TooltipWidget.selector.find(".tip").html(f);this.rectangleFocus.attr({x:b*h,opacity:0.4})};IriSP.TagCloudWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d)};IriSP.TagCloudWidget.prototype=new IriSP.Widget;
-IriSP.TagCloudWidget.prototype.draw=function(){var a=["aussi","and","avec","aux","car","cette","comme","dans","donc","des","elle","est","\u00eatre","eux","fait","ici","ils","les","leur","leurs","mais","mes","m\u00eame","mon","notre","non","nos","nous","ont","par","pas","peu","pour","que","qui","ses","son","sont","sur","tes","tr\u00e8s","the","ton","tous","tout","une","votre","vos","vous"],b=/[^\s\.&;,'"!\?\d\(\)\+\[\]\\\\u2026\-\u00ab\u00bb:\/]{3,}/g,d={},h=!this._config.excludeTitle,f=!this._config.excludeDescription,
-l=this._config.tagCount||30;IriSP._(this._serializer._data.annotations).each(function(q){if(q.content&&q.content.description){var m=(h?q.content.title:"")+" "+(f?q.content.description:"");IriSP._(m.toLowerCase().match(b)).each(function(x){if(a.indexOf(x)==-1)d[x]=1+(d[x]||0)})}});d=IriSP._(d).chain().map(function(q,m){return{word:m,count:q}}).filter(function(q){return q.count>2}).sortBy(function(q){return-q.count}).first(l).value();var p=d[0].count,u=Math.min(d[d.length-1].count,p-1),z=16/Math.sqrt(p-
-u),n=this,s="<ul>"+IriSP._(d).chain().shuffle().map(function(q){var m=10+z*Math.sqrt(q.count-u);return'<li style="font-size:'+m+'px;">'+q.word+"</li>"}).value().join("")+"</ul>";this.selector.addClass("Ldt-TagCloud").html(s);this.selector.find("li").click(function(){var q=this.textContent.replace(/(^[\s]+|[\s]+$)/g,"");n._Popcorn.trigger("IriSP.search.triggeredSearch",q)});this._Popcorn.listen("IriSP.search",IriSP.wrap(this,function(q){var m=RegExp("("+q.replace(/(\W)/g,"\\$1")+")","gi");this.selector.find("li").each(function(x,
+IriSP.StackGraphWidget.prototype.updateTooltip=function(a){var b=~~(this.sliceCount*(a.pageX-this.selector.offset().left)/this.width),c=this.groups[b],g=this.width/this.sliceCount,h='<ul style="list-style: none; margin: 0; padding: 0;">'+this.tagconf.map(function(k,p){return'<li style="clear: both;"><span style="float: left; width: 10px; height: 10px; margin: 2px; background: '+k.color+';"></span>'+~~(100*c[p])+"% de "+k.description+"</li>"}).join("")+"</ul>";this.TooltipWidget._shown=false;this.TooltipWidget.show("",
+"",a.pageX-105,a.pageY-160);this.TooltipWidget.selector.find(".tip").html(h);this.rectangleFocus.attr({x:b*g,opacity:0.4})};IriSP.TagCloudWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c)};IriSP.TagCloudWidget.prototype=new IriSP.Widget;
+IriSP.TagCloudWidget.prototype.draw=function(){var a=["aussi","and","avec","aux","car","cette","comme","dans","donc","des","elle","est","\u00eatre","eux","fait","ici","ils","les","leur","leurs","mais","mes","m\u00eame","mon","notre","non","nos","nous","ont","par","pas","peu","pour","que","qui","ses","son","sont","sur","tes","tr\u00e8s","the","ton","tous","tout","une","votre","vos","vous"],b=/[^\s\.&;,'"!\?\d\(\)\+\[\]\\\\u2026\-\u00ab\u00bb:\/]{3,}/g,c={},g=!this._config.excludeTitle,h=!this._config.excludeDescription,
+k=this._config.tagCount||30;IriSP._(this._serializer._data.annotations).each(function(q){if(q.content&&q.content.description){var m=(g?q.content.title:"")+" "+(h?q.content.description:"");IriSP._(m.toLowerCase().match(b)).each(function(w){if(a.indexOf(w)==-1)c[w]=1+(c[w]||0)})}});c=IriSP._(c).chain().map(function(q,m){return{word:m,count:q}}).filter(function(q){return q.count>2}).sortBy(function(q){return-q.count}).first(k).value();var p=c[0].count,u=Math.min(c[c.length-1].count,p-1),z=16/Math.sqrt(p-
+u),n=this,s="<ul>"+IriSP._(c).chain().shuffle().map(function(q){var m=10+z*Math.sqrt(q.count-u);return'<li style="font-size:'+m+'px;">'+q.word+"</li>"}).value().join("")+"</ul>";this.selector.addClass("Ldt-TagCloud").html(s);this.selector.find("li").click(function(){var q=this.textContent.replace(/(^[\s]+|[\s]+$)/g,"");n._Popcorn.trigger("IriSP.search.triggeredSearch",q)});this._Popcorn.listen("IriSP.search",IriSP.wrap(this,function(q){var m=RegExp("("+q.replace(/(\W)/g,"\\$1")+")","gi");this.selector.find("li").each(function(w,
D){D.innerHTML=q.length?D.textContent.replace(m,'<span class="Ldt-TagCloud-actif">$1</span>'):D.textContent})}));this._Popcorn.listen("IriSP.search.closed",IriSP.wrap(this,this.endsearch));this._Popcorn.listen("IriSP.search.cleared",IriSP.wrap(this,this.endsearch))};IriSP.TagCloudWidget.prototype.endsearch=function(){this.selector.find("li").each(function(a,b){b.innerHTML=b.textContent})};
-IriSP.TooltipWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d);this._shown=false;this._displayedText="";this._hideTimeout=-1};IriSP.TooltipWidget.prototype=new IriSP.Widget;IriSP.TooltipWidget.prototype.draw=function(){var a=Mustache.to_html(IriSP.tooltipWidget_template);this.selector.css("position","static");this.selector.append(a);this.hide()};IriSP.TooltipWidget.prototype.clear=function(){this.selector.find(".tiptext").html("")};
-IriSP.TooltipWidget.prototype.show=function(a,b,d,h){if(!(this._displayedText==a&&this._shown)){this.selector.find(".tipcolor").css("background-color",b);this._displayedText=a;this.selector.find(".tiptext").html(a);if(d<0)d=0;if(h<0)h=0;this.selector.find(".tip").css("left",d).css("top",h);this.selector.find(".tip").show();this._shown=true}};IriSP.TooltipWidget.prototype.hide=function(){this.selector.find(".tip").hide();this._shown=false};
-IriSP.TweetsWidget=function(a,b,d){IriSP.Widget.call(this,a,b,d);this._displayingTweet=false;this._timeoutId=undefined;this._hidden=false};IriSP.TweetsWidget.prototype=new IriSP.Widget;
-IriSP.TweetsWidget.prototype.drawTweet=function(a){if(!this._hidden){var b=IriSP.formatTweet(a.content.title),d=a.content.img.src;if(typeof d==="undefined"||d===""||d==="None")d=IriSP.widgetsDefaults.TweetsWidget.default_profile_picture;var h=IriSP.templToHTML("<img src='{{src}}' alt='user image'></img>",{src:d});if(typeof a.meta["dc:source"].content!=="undefined"){var f=JSON.parse(a.meta["dc:source"].content),l=f.user.screen_name,p=f.user.name;h=IriSP.templToHTML("<a href='http://twitter.com/{{creator}}'><img src='{{src}}' alt='user image'></img></a>",
-{src:d,creator:l});d=(new Date(f.created_at)).toLocaleDateString();b=IriSP.templToHTML("<a class='Ldt-tweet_userHandle' href='http://twitter.com/{{creator}}'>@{{creator}}</a> - <div class='Ldt-tweet_realName'>{{real_name}}</div><div class='Ldt-tweet_tweetContents'>{{{ contents }}}</div><div class='Ldt-tweet_date'>{{ date }}</div>",{creator:l,real_name:p,contents:b,date:d});this.selector.find(".Ldt-TweetReply").attr("href","http://twitter.com/home?status=@"+l+":%20");a=Mustache.to_html("http://twitter.com/home?status=RT @{{creator}}: {{text}}",
-{creator:l,text:IriSP.encodeURI(a.content.title)});this.selector.find(".Ldt-Retweet").attr("href",a)}this.selector.find(".Ldt-tweetContents").html(b);this.selector.find(".Ldt-tweetAvatar").html(h);this.selector.show("blind",250)}};IriSP.TweetsWidget.prototype.displayTweet=function(a){if(this._displayingTweet===false)this._displayingTweet=true;else window.clearTimeout(this._timeoutId);this.drawTweet(a);this._Popcorn.currentTime();this._timeoutId=window.setTimeout(IriSP.wrap(this,this.clearPanel),IriSP.widgetsDefaults.TweetsWidget.tweet_display_period)};
+IriSP.TooltipWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c);this._shown=false;this._displayedText="";this._hideTimeout=-1};IriSP.TooltipWidget.prototype=new IriSP.Widget;IriSP.TooltipWidget.prototype.draw=function(){var a=Mustache.to_html(IriSP.tooltipWidget_template);this.selector.css("position","static");this.selector.append(a);this.hide()};IriSP.TooltipWidget.prototype.clear=function(){this.selector.find(".tiptext").html("")};
+IriSP.TooltipWidget.prototype.show=function(a,b,c,g){if(!(this._displayedText==a&&this._shown)){this.selector.find(".tipcolor").css("background-color",b);this._displayedText=a;this.selector.find(".tiptext").html(a);if(c<0)c=0;if(g<0)g=0;this.selector.find(".tip").css("left",c).css("top",g);this.selector.find(".tip").show();this._shown=true}};IriSP.TooltipWidget.prototype.hide=function(){this.selector.find(".tip").hide();this._shown=false};
+IriSP.TweetsWidget=function(a,b,c){IriSP.Widget.call(this,a,b,c);this._displayingTweet=false;this._timeoutId=undefined;this._hidden=false};IriSP.TweetsWidget.prototype=new IriSP.Widget;
+IriSP.TweetsWidget.prototype.drawTweet=function(a){if(!this._hidden){var b=IriSP.formatTweet(a.content.title),c=a.content.img.src;if(typeof c==="undefined"||c===""||c==="None")c=IriSP.widgetsDefaults.TweetsWidget.default_profile_picture;var g=IriSP.templToHTML("<img src='{{src}}' alt='user image'></img>",{src:c});if(typeof a.meta["dc:source"].content!=="undefined"){var h=JSON.parse(a.meta["dc:source"].content),k=h.user.screen_name,p=h.user.name;g=IriSP.templToHTML("<a href='http://twitter.com/{{creator}}'><img src='{{src}}' alt='user image'></img></a>",
+{src:c,creator:k});c=(new Date(h.created_at)).toLocaleDateString();b=IriSP.templToHTML("<a class='Ldt-tweet_userHandle' href='http://twitter.com/{{creator}}'>@{{creator}}</a> - <div class='Ldt-tweet_realName'>{{real_name}}</div><div class='Ldt-tweet_tweetContents'>{{{ contents }}}</div><div class='Ldt-tweet_date'>{{ date }}</div>",{creator:k,real_name:p,contents:b,date:c});this.selector.find(".Ldt-TweetReply").attr("href","http://twitter.com/home?status=@"+k+":%20");a=Mustache.to_html("http://twitter.com/home?status=RT @{{creator}}: {{text}}",
+{creator:k,text:IriSP.encodeURI(a.content.title)});this.selector.find(".Ldt-Retweet").attr("href",a)}this.selector.find(".Ldt-tweetContents").html(b);this.selector.find(".Ldt-tweetAvatar").html(g);this.selector.show("blind",250)}};IriSP.TweetsWidget.prototype.displayTweet=function(a){if(this._displayingTweet===false)this._displayingTweet=true;else window.clearTimeout(this._timeoutId);this.drawTweet(a);this._Popcorn.currentTime();this._timeoutId=window.setTimeout(IriSP.wrap(this,this.clearPanel),IriSP.widgetsDefaults.TweetsWidget.tweet_display_period)};
IriSP.TweetsWidget.prototype.clearPanel=function(){this._displayingTweet=false;this._timeoutId=undefined;this.closePanel()};IriSP.TweetsWidget.prototype.closePanel=function(){if(this._timeoutId!=undefined){window.clearTimeout(this._timeoutId);this._timeoutId=null}this.selector.hide("blind",400)};IriSP.TweetsWidget.prototype.keepPanel=function(){if(this._timeoutId!=undefined){window.clearTimeout(this._timeoutId);this._timeoutId=null}};
IriSP.TweetsWidget.prototype.draw=function(){this.selector.append(IriSP.templToHTML(IriSP.tweetWidget_template,{share_template:IriSP.share_template}));this.selector.hide();this.selector.find(".Ldt-tweetWidgetMinimize").click(IriSP.wrap(this,this.closePanel));this.selector.find(".Ldt-tweetWidgetKeepOpen").click(IriSP.wrap(this,this.keepPanel));this._Popcorn.listen("IriSP.PolemicTweet.click",IriSP.wrap(this,this.PolemicTweetClickHandler));this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked",
-IriSP.wrap(this,this.handleAnnotateSignal))};IriSP.TweetsWidget.prototype.PolemicTweetClickHandler=function(a){var b,d;for(b in this._serializer._data.annotations){d=this._serializer._data.annotations[b];if(d.id===a)break}d.id===a&&this.displayTweet(d)};IriSP.TweetsWidget.prototype.handleAnnotateSignal=function(){if(this._hidden==false){this.selector.hide();this._hidden=true}else{this._displayingTweet!==false&&this.selector.show();this._hidden=false}};
+IriSP.wrap(this,this.handleAnnotateSignal))};IriSP.TweetsWidget.prototype.PolemicTweetClickHandler=function(a){var b,c;for(b in this._serializer._data.annotations){c=this._serializer._data.annotations[b];if(c.id===a)break}c.id===a&&this.displayTweet(c)};IriSP.TweetsWidget.prototype.handleAnnotateSignal=function(){if(this._hidden==false){this.selector.hide();this._hidden=true}else{this._displayingTweet!==false&&this.selector.show();this._hidden=false}};
IriSP.JSONSerializer=function(a,b){IriSP.Serializer.call(this,a,b)};IriSP.JSONSerializer.prototype=new IriSP.Serializer;IriSP.JSONSerializer.prototype.serialize=function(a){return JSON.stringify(a)};IriSP.JSONSerializer.prototype.deserialize=function(a){return JSON.parse(a)};
-IriSP.JSONSerializer.prototype.sync=function(a){var b=this;this._DataLoader.get(this._url,function(d){b._data=d;if(typeof b._data.annotations==="undefined"||b._data.annotations===null)b._data.annotations=[];b._data.annotations.sort(function(h,f){return+h.begin-+f.begin});a(d)})};IriSP.JSONSerializer.prototype.currentMedia=function(){return this._data.medias[0]};
-IriSP.JSONSerializer.prototype.searchAnnotations=function(a,b,d){var h;if(typeof this._data.views!=="undefined"&&this._data.views!==null)h=this._data.views[0];var f="";if(typeof h!=="undefined"&&typeof h.annotation_types!=="undefined"&&h.annotation_types.length>1)f=h.annotation_types[0];return this.searchAnnotationsFilter(a,b,d,function(l){return f!=""&&typeof l.meta!=="undefined"&&typeof l.meta["id-ref"]!=="undefined"&&l.meta["id-ref"]!==f?true:false})};
-IriSP.JSONSerializer.prototype.searchTweets=function(a,b,d){var h=this.getTweets();if(typeof h==="undefined"){var f;if(typeof this._data.views!=="undefined"&&this._data.views!==null)f=this._data.views[0];if(typeof f!=="undefined"&&typeof f.annotation_types!=="undefined"&&f.annotation_types.length>1)h=f.annotation_types[0]}return this.searchAnnotationsFilter(a,b,d,function(l){return h!=""&&typeof l.meta!=="undefined"&&typeof l.meta["id-ref"]!=="undefined"&&l.meta["id-ref"]===h?false:true})};
-IriSP.JSONSerializer.prototype.searchAnnotationsFilter=function(a,b,d,h){if(a=="")a=".*";if(b=="")b=".*";if(d=="")d=".*";a=RegExp(a,"i");b=RegExp(b,"i");RegExp(d,"i");d=[];var f;for(f in this._data.annotations){var l=this._data.annotations[f];h(l)||a.test(l.content.title)&&b.test(l.content.description)&&d.push(l)}return d};
-IriSP.JSONSerializer.prototype.searchOccurences=function(a){var b={};a=a.split(/\s+/);for(var d in a){var h=a[d],f=[];f=f.concat(this.searchAnnotations(h,"",""));f=f.concat(this.searchAnnotations("",h,""));for(var l in f){h=f[l];if(b.hasOwnProperty(h.id))b[h.id]+=1;else b[h.id]=1}}return b};
-IriSP.JSONSerializer.prototype.searchTweetsOccurences=function(a){var b={};a=a.split(/\s+/);for(var d in a){var h=a[d],f=[];f=f.concat(this.searchTweets(h,"",""));f=f.concat(this.searchTweets("",h,""));for(var l in f){h=f[l];if(b.hasOwnProperty(h.id))b[h.id]+=1;else b[h.id]=1}}return b};
-IriSP.JSONSerializer.prototype.currentAnnotations=function(a,b){var d=1E3*a,h=typeof b==="undefined"?this.getNonTweetIds():[b],f=[],l;for(l in this._data.annotations){var p=this._data.annotations[l];IriSP.underscore.include(h,p.meta["id-ref"])&&p.begin<=d&&p.end>=d&&f.push(p)}f==[]&&console.log("ret_array empty, ",h);return f};IriSP.JSONSerializer.prototype.currentChapitre=function(a){return this.currentAnnotations(a,this.getChapitrage())[0]};
+IriSP.JSONSerializer.prototype.sync=function(a){var b=this;this._DataLoader.get(this._url,function(c){if(c!==null){b._data=c;if(typeof b._data.annotations==="undefined"||b._data.annotations===null)b._data.annotations=[];b._data.annotations.sort(function(g,h){return+g.begin-+h.begin})}a(c)})};IriSP.JSONSerializer.prototype.currentMedia=function(){return this._data.medias[0]};
+IriSP.JSONSerializer.prototype.searchAnnotations=function(a,b,c){var g;if(typeof this._data.views!=="undefined"&&this._data.views!==null)g=this._data.views[0];var h="";if(typeof g!=="undefined"&&typeof g.annotation_types!=="undefined"&&g.annotation_types.length>1)h=g.annotation_types[0];return this.searchAnnotationsFilter(a,b,c,function(k){return h!=""&&typeof k.meta!=="undefined"&&typeof k.meta["id-ref"]!=="undefined"&&k.meta["id-ref"]!==h?true:false})};
+IriSP.JSONSerializer.prototype.searchTweets=function(a,b,c){var g=this.getTweets();if(typeof g==="undefined"){var h;if(typeof this._data.views!=="undefined"&&this._data.views!==null)h=this._data.views[0];if(typeof h!=="undefined"&&typeof h.annotation_types!=="undefined"&&h.annotation_types.length>1)g=h.annotation_types[0]}return this.searchAnnotationsFilter(a,b,c,function(k){return g!=""&&typeof k.meta!=="undefined"&&typeof k.meta["id-ref"]!=="undefined"&&k.meta["id-ref"]===g?false:true})};
+IriSP.JSONSerializer.prototype.searchAnnotationsFilter=function(a,b,c,g){if(a=="")a=".*";if(b=="")b=".*";if(c=="")c=".*";a=RegExp(a,"i");b=RegExp(b,"i");RegExp(c,"i");c=[];var h;for(h in this._data.annotations){var k=this._data.annotations[h];g(k)||a.test(k.content.title)&&b.test(k.content.description)&&c.push(k)}return c};
+IriSP.JSONSerializer.prototype.searchOccurences=function(a){var b={};a=a.split(/\s+/);for(var c in a){var g=a[c],h=[];h=h.concat(this.searchAnnotations(g,"",""));h=h.concat(this.searchAnnotations("",g,""));for(var k in h){g=h[k];if(b.hasOwnProperty(g.id))b[g.id]+=1;else b[g.id]=1}}return b};
+IriSP.JSONSerializer.prototype.searchTweetsOccurences=function(a){var b={};a=a.split(/\s+/);for(var c in a){var g=a[c],h=[];h=h.concat(this.searchTweets(g,"",""));h=h.concat(this.searchTweets("",g,""));for(var k in h){g=h[k];if(b.hasOwnProperty(g.id))b[g.id]+=1;else b[g.id]=1}}return b};
+IriSP.JSONSerializer.prototype.currentAnnotations=function(a,b){var c=1E3*a,g=typeof b==="undefined"?this.getNonTweetIds():[b],h=[],k;for(k in this._data.annotations){var p=this._data.annotations[k];IriSP.underscore.include(g,p.meta["id-ref"])&&p.begin<=c&&p.end>=c&&h.push(p)}h==[]&&console.log("ret_array empty, ",g);return h};IriSP.JSONSerializer.prototype.currentChapitre=function(a){return this.currentAnnotations(a,this.getChapitrage())[0]};
IriSP.JSONSerializer.prototype.getTweetIds=function(){if(IriSP.null_or_undefined(this._data.lists)||IriSP.null_or_undefined(this._data.lists)||IriSP.null_or_undefined(this._data.views)||IriSP.null_or_undefined(this._data.views[0]))return[];var a=this._data.views[0].annotation_types;if(IriSP.null_or_undefined(a)){a=this._data.views[0]["annotation-types"];if(IriSP.null_or_undefined(a)){console.log("neither view.annotation_types nor view.annotation-types are defined");return}}var b=this._data.annotation_types;
-if(IriSP.null_or_undefined(b)){b=this._data["annotation-types"];if(IriSP.null_or_undefined(b)){console.log("neither annotation_types nor annotation-types are defined");return}}for(var d=[],h=0;h<b.length;h++)/Tw/i.test(b[h]["dc:title"])&&d.push(b[h].id);return IriSP.underscore.intersection(a,d)};
+if(IriSP.null_or_undefined(b)){b=this._data["annotation-types"];if(IriSP.null_or_undefined(b)){console.log("neither annotation_types nor annotation-types are defined");return}}for(var c=[],g=0;g<b.length;g++)/Tw/i.test(b[g]["dc:title"])&&c.push(b[g].id);return IriSP.underscore.intersection(a,c)};
IriSP.JSONSerializer.prototype.getNonTweetIds=function(){if(IriSP.null_or_undefined(this._data.lists)||IriSP.null_or_undefined(this._data.lists)||IriSP.null_or_undefined(this._data.views)||IriSP.null_or_undefined(this._data.views[0]))return[];var a=this._data.views[0].annotation_types;if(IriSP.null_or_undefined(a)){a=this._data.views[0]["annotation-types"];if(IriSP.null_or_undefined(a)){console.log("neither view.annotation_types nor view.annotation-types are defined");return}}var b=this._data.annotation_types;
-if(IriSP.null_or_undefined(b)){b=this._data["annotation-types"];if(IriSP.null_or_undefined(b)){console.log("neither annotation_types nor annotation-types are defined");return}}for(var d=[],h=0;h<b.length;h++)/Tw/i.test(b[h]["dc:title"])||d.push(b[h].id);return IriSP.underscore.intersection(a,d)};
-IriSP.JSONSerializer.prototype.getId=function(a){if(!IriSP.null_or_undefined(this._data["annotation-types"])){a=a.toUpperCase();var b;b=IriSP.underscore.find(this._data["annotation-types"],function(d){return d["dc:title"].toUpperCase().indexOf(a)!==-1});if(typeof b!=="undefined")return b.id}};
-IriSP.JSONSerializer.prototype.getIds=function(a){if(!IriSP.null_or_undefined(this._data["annotation-types"])){a=a.toUpperCase();var b=[];b=IriSP.underscore.filter(this._data["annotation-types"],function(d){return d["dc:title"].toUpperCase().indexOf(a)!==-1});return IriSP.underscore.pluck(b,"id")}};
+if(IriSP.null_or_undefined(b)){b=this._data["annotation-types"];if(IriSP.null_or_undefined(b)){console.log("neither annotation_types nor annotation-types are defined");return}}for(var c=[],g=0;g<b.length;g++)/Tw/i.test(b[g]["dc:title"])||c.push(b[g].id);return IriSP.underscore.intersection(a,c)};
+IriSP.JSONSerializer.prototype.getId=function(a){if(!IriSP.null_or_undefined(this._data["annotation-types"])){a=a.toUpperCase();var b;b=IriSP.underscore.find(this._data["annotation-types"],function(c){if(IriSP.null_or_undefined(c["dc:title"]))return false;return c["dc:title"].toUpperCase().indexOf(a)!==-1});if(typeof b!=="undefined")return b.id}};
+IriSP.JSONSerializer.prototype.getIds=function(a){if(!IriSP.null_or_undefined(this._data["annotation-types"])){a=a.toUpperCase();var b=[];b=IriSP.underscore.filter(this._data["annotation-types"],function(c){return c["dc:title"].toUpperCase().indexOf(a)!==-1});return IriSP.underscore.pluck(b,"id")}};
IriSP.JSONSerializer.prototype.getChapitrage=function(){var a=this.getId("Chapitrage");if(typeof a==="undefined")a=this.getId("Chapter");if(typeof a==="undefined")a=this.getId("Chapit");if(typeof a==="undefined")a=this.getId("Chap");return a};
IriSP.JSONSerializer.prototype.getTweets=function(){var a=this.getId("Tweets");if(typeof a==="undefined")a=this.getId("Tweet");if(typeof a==="undefined")a=this.getId("Twitter");if(typeof a==="undefined")a=this.getId("twit");if(typeof a==="undefined")a=this.getId("Polemic");return a};
IriSP.JSONSerializer.prototype.getContributions=function(){var a=this.getId("Contribution");if(typeof a==="undefined")a=this.getId("Particip");if(typeof a==="undefined")a=this.getId("Contr");if(typeof a==="undefined")a=this.getId("Publ");return a};
\ No newline at end of file