--- a/src/ldt/ldt/static/ldt/js/LdtPlayer.min.js Thu Feb 02 15:35:47 2012 +0100
+++ b/src/ldt/ldt/static/ldt/js/LdtPlayer.min.js Thu Feb 02 16:12:17 2012 +0100
@@ -1,7 +1,7 @@
/*
*
- * Copyright 2010 Institut de recherche et d'innovation
- * contributor(s) : Samuel Huron
+ * Copyright 2010-2012 Institut de recherche et d'innovation
+ * contributor(s) : Karim Hamidou, Samuel Huron
*
* contact@iri.centrepompidou.fr
* http://www.iri.centrepompidou.fr
@@ -16,203 +16,241 @@
* 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 c(r,D){var F=/^\w+\:\/\//;if(/^\/\/\/?/.test(r))r=location.protocol+r;else if(!F.test(r)&&r.charAt(0)!="/")r=(D||"")+r;return F.test(r)?r:(r.charAt(0)=="/"?N:E)+r}function d(r,D){for(var F in r)if(r.hasOwnProperty(F))D[F]=r[F];return D}function i(r,D,F,L){r.onload=r.onreadystatechange=function(){if(!(r.readyState&&r.readyState!="complete"&&r.readyState!="loaded"||D[F])){r.onload=r.onreadystatechange=null;L()}}}function h(r){r.ready=r.finished=true;for(var D=0;D<r.finished_listeners.length;D++)r.finished_listeners[D]();
-r.ready_listeners=[];r.finished_listeners=[]}function m(r,D,F,L,U){setTimeout(function(){var b,e=D.real_src,g;if("item"in J){if(!J[0]){setTimeout(arguments.callee,25);return}J=J[0]}b=document.createElement("script");if(D.type)b.type=D.type;if(D.charset)b.charset=D.charset;if(U)if(f){r[o]&&H("start script preload: "+e);F.elem=b;if(B){b.preload=true;b.onpreload=L}else b.onreadystatechange=function(){b.readyState=="loaded"&&L()};b.src=e}else if(U&&e.indexOf(N)==0&&r[x]){g=new XMLHttpRequest;r[o]&&H("start script preload (xhr): "+
-e);g.onreadystatechange=function(){if(g.readyState==4){g.onreadystatechange=function(){};F.text=g.responseText+"\n//@ sourceURL="+e;L()}};g.open("GET",e);g.send()}else{r[o]&&H("start script preload (cache): "+e);b.type="text/cache-script";i(b,F,"ready",function(){J.removeChild(b);L()});b.src=e;J.insertBefore(b,J.firstChild)}else{if(z){r[o]&&H("start script load (ordered async): "+e);b.async=false}else r[o]&&H("start script load: "+e);i(b,F,"finished",L);b.src=e;J.insertBefore(b,J.firstChild)}},0)}
-function n(){function r(j,k,p){function w(){if(A!=null){A=null;h(p)}}var A;if(!e[k.src].finished){if(!j[q])e[k.src].finished=true;A=p.elem||document.createElement("script");if(k.type)A.type=k.type;if(k.charset)A.charset=k.charset;i(A,p,"finished",w);if(p.elem)p.elem=null;else if(p.text){A.onload=A.onreadystatechange=null;A.text=p.text}else A.src=k.real_src;J.insertBefore(A,J.firstChild);p.text&&w()}}function D(j,k,p,w){var A,M,R=function(){k.ready_cb(k,function(){r(j,k,A)})},T=function(){k.finished_cb(k,
-p)};k.src=c(k.src,j[v]);k.real_src=k.src+(j[s]?(/\?.*$/.test(k.src)?"&_":"?_")+~~(Math.random()*1E9)+"=":"");e[k.src]||(e[k.src]={items:[],finished:false});M=e[k.src].items;if(j[q]||M.length==0){A=M[M.length]={ready:false,finished:false,ready_listeners:[R],finished_listeners:[T]};m(j,k,A,w?function(){A.ready=true;for(var O=0;O<A.ready_listeners.length;O++)A.ready_listeners[O]();A.ready_listeners=[]}:function(){h(A)},w)}else{A=M[0];A.finished?T():A.finished_listeners.push(T)}}function F(){function j(K,
-G){A[o]&&H("script preload finished: "+K.real_src);K.ready=true;K.exec_trigger=G;p()}function k(K,G){A[o]&&H("script execution finished: "+K.real_src);K.ready=K.finished=true;K.exec_trigger=null;for(var P=0;P<G.scripts.length;P++)if(!G.scripts[P].finished)return;G.finished=true;p()}function p(){for(;R<M.length;)if(Object.prototype.toString.call(M[R])=="[object Function]"){A[o]&&H("$LAB.wait() executing: "+M[R]);try{M[R++]()}catch(K){A[o]&&u("$LAB.wait() error caught: ",K)}}else{if(!M[R].finished){for(var G=
-M[R],P=false,S=0;S<G.scripts.length;S++)if(G.scripts[S].ready&&G.scripts[S].exec_trigger){P=true;G.scripts[S].exec_trigger();G.scripts[S].exec_trigger=null}if(P)continue;break}R++}if(R==M.length)O=T=false}var w,A=d(L,{}),M=[],R=0,T=false,O;w={script:function(){for(var K=0;K<arguments.length;K++)(function(G,P){var S;Object.prototype.toString.call(G)=="[object Array]"||(P=[G]);for(var V=0;V<P.length;V++){if(!O||!O.scripts)M.push(O={scripts:[],finished:true});G=P[V];if(Object.prototype.toString.call(G)==
-"[object Function]")G=G();if(G)if(Object.prototype.toString.call(G)=="[object Array]"){S=[].slice.call(G);S.unshift(V,1);[].splice.apply(P,S);V--}else{if(typeof G=="string")G={src:G};G=d(G,{ready:false,ready_cb:j,finished:false,finished_cb:k});O.finished=false;O.scripts.push(G);D(A,G,O,U&&T);T=true;A[l]&&w.wait()}}})(arguments[K],arguments[K]);return w},wait:function(){if(arguments.length>0){for(var K=0;K<arguments.length;K++)M.push(arguments[K]);O=M[M.length-1]}else O=false;p();return w}};return{script:w.script,
-wait:w.wait,setOptions:function(K){d(K,A);return w}}}var L={},U=f||Q,b=[],e={},g;L[x]=true;L[l]=false;L[q]=false;L[s]=false;L[o]=false;L[v]="";return g={setGlobalDefaults:function(j){d(j,L);return g},setOptions:function(){return F().setOptions.apply(null,arguments)},script:function(){return F().script.apply(null,arguments)},wait:function(){return F().wait.apply(null,arguments)},queueScript:function(){b[b.length]={type:"script",args:[].slice.call(arguments)};return g},queueWait:function(){b[b.length]=
-{type:"wait",args:[].slice.call(arguments)};return g},runQueue:function(){for(var j=g,k=b.length,p;--k>=0;){p=b.shift();j=j[p.type].apply(null,p.args)}return j},noConflict:function(){a.$LAB=C;return g},sandbox:function(){return n()}}}var C=a.$LAB,x="UseLocalXHR",l="AlwaysPreserveOrder",q="AllowDuplicates",s="CacheBust",o="Debug",v="BasePath",E=/^[^?#]*\//.exec(location.href)[0],N=/^\w+\:\/\/\/?[^\/]+/.exec(E)[0],J=document.head||document.getElementsByTagName("head"),I=a.opera&&Object.prototype.toString.call(a.opera)==
-"[object Opera]"||"MozAppearance"in document.documentElement.style,H=function(){},u=H,y=document.createElement("script"),B=typeof y.preload=="boolean",f=B||y.readyState&&y.readyState=="uninitialized",z=!f&&y.async===true,Q=!f&&!z&&!I;if(a.console&&a.console.log){if(!a.console.error)a.console.error=a.console.log;H=function(r){a.console.log(r)};u=function(r,D){a.console.error(r,D)}}a.$LAB=n();(function(r,D,F){if(document.readyState==null&&document[r]){document.readyState="loading";document[r](D,F=function(){document.removeEventListener(D,
-F,false);document.readyState="complete"},false)}})("addEventListener","DOMContentLoaded")})(this);
-var Mustache=function(){function a(l){return String(l).replace(/&(?!\w+;)|[<>"']/g,function(q){return n[q]||q})}var c=Object.prototype.toString;Array.isArray=Array.isArray||function(l){return c.call(l)=="[object Array]"};var d=String.prototype.trim,i;if(d)i=function(l){return l==null?"":d.call(l)};else{var h,m;if(/\S/.test("\u00a0")){h=/^[\s\xA0]+/;m=/[\s\xA0]+$/}else{h=/^\s+/;m=/\s+$/}i=function(l){return l==null?"":l.toString().replace(h,"").replace(m,"")}}var n={"&":"&","<":"<",">":">",
-'"':""","'":"'"},C={},x=function(){};x.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},context:{},render:function(l,q,s,o){if(!o){this.context=q;this.buffer=[]}if(!this.includes("",l))if(o)return l;else{this.send(l);return}l=this.render_pragmas(l);var v=this.render_section(l,q,s);if(v===false)v=this.render_tags(l,q,s,o);if(o)return v;else this.sendLines(v)},send:function(l){l!==""&&this.buffer.push(l)},sendLines:function(l){if(l){l=l.split("\n");
-for(var q=0;q<l.length;q++)this.send(l[q])}},render_pragmas:function(l){if(!this.includes("%",l))return l;var q=this,s=this.getCachedRegex("render_pragmas",function(o,v){return RegExp(o+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+v,"g")});return l.replace(s,function(o,v,E){if(!q.pragmas_implemented[v])throw{message:"This implementation of mustache doesn't understand the '"+v+"' pragma"};q.pragmas[v]={};if(E){o=E.split("=");q.pragmas[v][o[0]]=o[1]}return""})},render_partial:function(l,q,s){l=i(l);if(!s||s[l]===
-undefined)throw{message:"unknown_partial '"+l+"'"};if(!q||typeof q[l]!="object")return this.render(s[l],q,s,true);return this.render(s[l],q[l],s,true)},render_section:function(l,q,s){if(!this.includes("#",l)&&!this.includes("^",l))return false;var o=this,v=this.getCachedRegex("render_section",function(E,N){return RegExp("^([\\s\\S]*?)"+E+"(\\^|\\#)\\s*(.+)\\s*"+N+"\n*([\\s\\S]*?)"+E+"\\/\\s*\\3\\s*"+N+"\\s*([\\s\\S]*)$","g")});return l.replace(v,function(E,N,J,I,H,u){E=N?o.render_tags(N,q,s,true):
-"";u=u?o.render(u,q,s,true):"";var y;I=o.find(I,q);if(J==="^")y=!I||Array.isArray(I)&&I.length===0?o.render(H,q,s,true):"";else if(J==="#")y=Array.isArray(I)?o.map(I,function(B){return o.render(H,o.create_context(B),s,true)}).join(""):o.is_object(I)?o.render(H,o.create_context(I),s,true):typeof I=="function"?I.call(q,H,function(B){return o.render(B,q,s,true)}):I?o.render(H,q,s,true):"";return E+y+u})},render_tags:function(l,q,s,o){var v=this,E=function(){return v.getCachedRegex("render_tags",function(H,
-u){return RegExp(H+"(=|!|>|&|\\{|%)?([^#\\^]+?)\\1?"+u+"+","g")})},N=E(),J=function(H,u,y){switch(u){case "!":return"";case "=":v.set_delimiters(y);N=E();return"";case ">":return v.render_partial(y,q,s);case "{":case "&":return v.find(y,q);default:return a(v.find(y,q))}};l=l.split("\n");for(var I=0;I<l.length;I++){l[I]=l[I].replace(N,J,this);o||this.send(l[I])}if(o)return l.join("\n")},set_delimiters:function(l){l=l.split(" ");this.otag=this.escape_regex(l[0]);this.ctag=this.escape_regex(l[1])},escape_regex:function(l){if(!arguments.callee.sRE)arguments.callee.sRE=
-RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","g");return l.replace(arguments.callee.sRE,"\\$1")},find:function(l,q){function s(E){return E===false||E===0||E}l=i(l);var o;if(l.match(/([a-z_]+)\./ig)){var v=this.walk_context(l,q);if(s(v))o=v}else if(s(q[l]))o=q[l];else if(s(this.context[l]))o=this.context[l];if(typeof o=="function")return o.apply(q);if(o!==undefined)return o;return""},walk_context:function(l,q){for(var s=l.split("."),o=q[s[0]]!=undefined?q:this.context,v=o[s.shift()];v!=
-undefined&&s.length>0;){o=v;v=v[s.shift()]}if(typeof v=="function")return v.apply(o);return v},includes:function(l,q){return q.indexOf(this.otag+l)!=-1},create_context:function(l){if(this.is_object(l))return l;else{var q=".";if(this.pragmas["IMPLICIT-ITERATOR"])q=this.pragmas["IMPLICIT-ITERATOR"].iterator;var s={};s[q]=l;return s}},is_object:function(l){return l&&typeof l=="object"},map:function(l,q){if(typeof l.map=="function")return l.map(q);else{for(var s=[],o=l.length,v=0;v<o;v++)s.push(q(l[v]));
-return s}},getCachedRegex:function(l,q){var s=C[this.otag];s||(s=C[this.otag]={});var o=s[this.ctag];o||(o=s[this.ctag]={});(s=o[l])||(s=o[l]=q(this.otag,this.ctag));return s}};return{name:"mustache.js",version:"0.5.0-dev",to_html:function(l,q,s,o){var v=new x;if(o)v.send=o;v.render(l,q||{},s);if(!o)return v.buffer.join("\n")}}}();
-(function(){function a(b,e,g){if(b===e)return b!==0||1/b==1/e;if(b==null||e==null)return b===e;if(b._chain)b=b._wrapped;if(e._chain)e=e._wrapped;if(b.isEqual&&f.isFunction(b.isEqual))return b.isEqual(e);if(e.isEqual&&f.isFunction(e.isEqual))return e.isEqual(b);var j=l.call(b);if(j!=l.call(e))return false;switch(j){case "[object String]":return b==String(e);case "[object Number]":return b!=+b?e!=+e:b==0?1/b==1/e:b==+e;case "[object Date]":case "[object Boolean]":return+b==+e;case "[object RegExp]":return b.source==
-e.source&&b.global==e.global&&b.multiline==e.multiline&&b.ignoreCase==e.ignoreCase}if(typeof b!="object"||typeof e!="object")return false;for(var k=g.length;k--;)if(g[k]==b)return true;g.push(b);k=0;var p=true;if(j=="[object Array]"){if(k=b.length,p=k==e.length)for(;k--;)if(!(p=k in b==k in e&&a(b[k],e[k],g)))break}else{if("constructor"in b!="constructor"in e||b.constructor!=e.constructor)return false;for(var w in b)if(q.call(b,w)&&(k++,!(p=q.call(e,w)&&a(b[w],e[w],g))))break;if(p){for(w in e)if(q.call(e,
-w)&&!k--)break;p=!k}}g.pop();return p}var c=this,d=c._,i={},h=Array.prototype,m=Object.prototype,n=h.slice,C=h.concat,x=h.unshift,l=m.toString,q=m.hasOwnProperty,s=h.forEach,o=h.map,v=h.reduce,E=h.reduceRight,N=h.filter,J=h.every,I=h.some,H=h.indexOf,u=h.lastIndexOf;m=Array.isArray;var y=Object.keys,B=Function.prototype.bind,f=function(b){return new F(b)};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}):c._=f;f.VERSION="1.2.3";var z=f.each=f.forEach=function(b,e,g){if(b!=null)if(s&&b.forEach===s)b.forEach(e,g);else if(b.length===+b.length)for(var j=0,k=b.length;j<k;j++){if(j in b&&e.call(g,b[j],j,b)===i)break}else for(j in b)if(q.call(b,j)&&e.call(g,b[j],j,b)===i)break};f.map=function(b,e,g){var j=[];if(b==null)return j;if(o&&b.map===o)return b.map(e,g);z(b,function(k,p,w){j[j.length]=e.call(g,k,p,w)});return j};f.reduce=f.foldl=f.inject=function(b,
-e,g,j){var k=arguments.length>2;b==null&&(b=[]);if(v&&b.reduce===v)return j&&(e=f.bind(e,j)),k?b.reduce(e,g):b.reduce(e);z(b,function(p,w,A){k?g=e.call(j,g,p,w,A):(g=p,k=true)});if(!k)throw new TypeError("Reduce of empty array with no initial value");return g};f.reduceRight=f.foldr=function(b,e,g,j){var k=arguments.length>2;b==null&&(b=[]);if(E&&b.reduceRight===E)return j&&(e=f.bind(e,j)),k?b.reduceRight(e,g):b.reduceRight(e);var p=f.toArray(b).reverse();j&&!k&&(e=f.bind(e,j));return k?f.reduce(p,
-e,g,j):f.reduce(p,e)};f.find=f.detect=function(b,e,g){var j;Q(b,function(k,p,w){if(e.call(g,k,p,w))return j=k,true});return j};f.filter=f.select=function(b,e,g){var j=[];if(b==null)return j;if(N&&b.filter===N)return b.filter(e,g);z(b,function(k,p,w){e.call(g,k,p,w)&&(j[j.length]=k)});return j};f.reject=function(b,e,g){var j=[];if(b==null)return j;z(b,function(k,p,w){e.call(g,k,p,w)||(j[j.length]=k)});return j};f.every=f.all=function(b,e,g){var j=true;if(b==null)return j;if(J&&b.every===J)return b.every(e,
-g);z(b,function(k,p,w){if(!(j=j&&e.call(g,k,p,w)))return i});return j};var Q=f.some=f.any=function(b,e,g){e||(e=f.identity);var j=false;if(b==null)return j;if(I&&b.some===I)return b.some(e,g);z(b,function(k,p,w){if(j||(j=e.call(g,k,p,w)))return i});return!!j};f.include=f.contains=function(b,e){var g=false;if(b==null)return g;return H&&b.indexOf===H?b.indexOf(e)!=-1:g=Q(b,function(j){return j===e})};f.invoke=function(b,e){var g=n.call(arguments,2);return f.map(b,function(j){return(e.call?e||j:j[e]).apply(j,
-g)})};f.pluck=function(b,e){return f.map(b,function(g){return g[e]})};f.max=function(b,e,g){if(!e&&f.isArray(b))return Math.max.apply(Math,b);if(!e&&f.isEmpty(b))return-Infinity;var j={computed:-Infinity};z(b,function(k,p,w){p=e?e.call(g,k,p,w):k;p>=j.computed&&(j={value:k,computed:p})});return j.value};f.min=function(b,e,g){if(!e&&f.isArray(b))return Math.min.apply(Math,b);if(!e&&f.isEmpty(b))return Infinity;var j={computed:Infinity};z(b,function(k,p,w){p=e?e.call(g,k,p,w):k;p<j.computed&&(j={value:k,
-computed:p})});return j.value};f.shuffle=function(b){var e=[],g;z(b,function(j,k){k==0?e[0]=j:(g=Math.floor(Math.random()*(k+1)),e[k]=e[g],e[g]=j)});return e};f.sortBy=function(b,e,g){return f.pluck(f.map(b,function(j,k,p){return{value:j,criteria:e.call(g,j,k,p)}}).sort(function(j,k){var p=j.criteria,w=k.criteria;return p<w?-1:p>w?1:0}),"value")};f.groupBy=function(b,e){var g={},j=f.isFunction(e)?e:function(k){return k[e]};z(b,function(k,p){var w=j(k,p);(g[w]||(g[w]=[])).push(k)});return g};f.sortedIndex=
-function(b,e,g){g||(g=f.identity);for(var j=0,k=b.length;j<k;){var p=j+k>>1;g(b[p])<g(e)?j=p+1:k=p}return j};f.toArray=function(b){return!b?[]:b.toArray?b.toArray():f.isArray(b)?n.call(b):f.isArguments(b)?n.call(b):f.values(b)};f.size=function(b){return f.toArray(b).length};f.first=f.head=function(b,e,g){return e!=null&&!g?n.call(b,0,e):b[0]};f.initial=function(b,e,g){return n.call(b,0,b.length-(e==null||g?1:e))};f.last=function(b,e,g){return e!=null&&!g?n.call(b,Math.max(b.length-e,0)):b[b.length-
-1]};f.rest=f.tail=function(b,e,g){return n.call(b,e==null||g?1:e)};f.compact=function(b){return f.filter(b,function(e){return!!e})};f.flatten=function(b,e){return f.reduce(b,function(g,j){if(f.isArray(j))return g.concat(e?j:f.flatten(j));g[g.length]=j;return g},[])};f.without=function(b){return f.difference(b,n.call(arguments,1))};f.uniq=f.unique=function(b,e,g){g=g?f.map(b,g):b;var j=[];f.reduce(g,function(k,p,w){if(0==w||(e===true?f.last(k)!=p:!f.include(k,p))){k[k.length]=p;j[j.length]=b[w]}return k},
-[]);return j};f.union=function(){return f.uniq(f.flatten(arguments,true))};f.intersection=f.intersect=function(b){var e=n.call(arguments,1);return f.filter(f.uniq(b),function(g){return f.every(e,function(j){return f.indexOf(j,g)>=0})})};f.difference=function(b){var e=f.flatten(n.call(arguments,1));return f.filter(b,function(g){return!f.include(e,g)})};f.zip=function(){for(var b=n.call(arguments),e=f.max(f.pluck(b,"length")),g=Array(e),j=0;j<e;j++)g[j]=f.pluck(b,""+j);return g};f.indexOf=function(b,
-e,g){if(b==null)return-1;var j;if(g)return g=f.sortedIndex(b,e),b[g]===e?g:-1;if(H&&b.indexOf===H)return b.indexOf(e);g=0;for(j=b.length;g<j;g++)if(g in b&&b[g]===e)return g;return-1};f.lastIndexOf=function(b,e){if(b==null)return-1;if(u&&b.lastIndexOf===u)return b.lastIndexOf(e);for(var g=b.length;g--;)if(g in b&&b[g]===e)return g;return-1};f.range=function(b,e,g){arguments.length<=1&&(e=b||0,b=0);g=arguments[2]||1;for(var j=Math.max(Math.ceil((e-b)/g),0),k=0,p=Array(j);k<j;){p[k++]=b;b+=g}return p};
-var r=function(){};f.bind=function(b,e){var g,j;if(b.bind===B&&B)return B.apply(b,n.call(arguments,1));if(!f.isFunction(b))throw new TypeError;j=n.call(arguments,2);return g=function(){if(!(this instanceof g))return b.apply(e,j.concat(n.call(arguments)));r.prototype=b.prototype;var k=new r,p=b.apply(k,j.concat(n.call(arguments)));return Object(p)===p?p:k}};f.bindAll=function(b){var e=n.call(arguments,1);e.length==0&&(e=f.functions(b));z(e,function(g){b[g]=f.bind(b[g],b)});return b};f.memoize=function(b,
-e){var g={};e||(e=f.identity);return function(){var j=e.apply(this,arguments);return q.call(g,j)?g[j]:g[j]=b.apply(this,arguments)}};f.delay=function(b,e){var g=n.call(arguments,2);return setTimeout(function(){return b.apply(b,g)},e)};f.defer=function(b){return f.delay.apply(f,[b,1].concat(n.call(arguments,1)))};f.throttle=function(b,e){var g,j,k,p,w,A=f.debounce(function(){w=p=false},e);return function(){g=this;j=arguments;k||(k=setTimeout(function(){k=null;w&&b.apply(g,j);A()},e));p?w=true:b.apply(g,
-j);A();p=true}};f.debounce=function(b,e){var g;return function(){var j=this,k=arguments;clearTimeout(g);g=setTimeout(function(){g=null;b.apply(j,k)},e)}};f.once=function(b){var e=false,g;return function(){if(e)return g;e=true;return g=b.apply(this,arguments)}};f.wrap=function(b,e){return function(){var g=C.apply([b],arguments);return e.apply(this,g)}};f.compose=function(){var b=arguments;return function(){for(var e=arguments,g=b.length-1;g>=0;g--)e=[b[g].apply(this,e)];return e[0]}};f.after=function(b,
-e){return b<=0?e():function(){if(--b<1)return e.apply(this,arguments)}};f.keys=y||function(b){if(b!==Object(b))throw new TypeError("Invalid object");var e=[],g;for(g in b)q.call(b,g)&&(e[e.length]=g);return e};f.values=function(b){return f.map(b,f.identity)};f.functions=f.methods=function(b){var e=[],g;for(g in b)f.isFunction(b[g])&&e.push(g);return e.sort()};f.extend=function(b){z(n.call(arguments,1),function(e){for(var g in e)e[g]!==void 0&&(b[g]=e[g])});return b};f.defaults=function(b){z(n.call(arguments,
-1),function(e){for(var g in e)b[g]==null&&(b[g]=e[g])});return b};f.clone=function(b){return!f.isObject(b)?b:f.isArray(b)?b.slice():f.extend({},b)};f.tap=function(b,e){e(b);return b};f.isEqual=function(b,e){return a(b,e,[])};f.isEmpty=function(b){if(f.isArray(b)||f.isString(b))return b.length===0;for(var e in b)if(q.call(b,e))return false;return true};f.isElement=function(b){return!!(b&&b.nodeType==1)};f.isArray=m||function(b){return l.call(b)=="[object Array]"};f.isObject=function(b){return b===
-Object(b)};f.isArguments=function(b){return l.call(b)=="[object Arguments]"};if(!f.isArguments(arguments))f.isArguments=function(b){return!(!b||!q.call(b,"callee"))};f.isFunction=function(b){return l.call(b)=="[object Function]"};f.isString=function(b){return l.call(b)=="[object String]"};f.isNumber=function(b){return l.call(b)=="[object Number]"};f.isNaN=function(b){return b!==b};f.isBoolean=function(b){return b===true||b===false||l.call(b)=="[object Boolean]"};f.isDate=function(b){return l.call(b)==
-"[object Date]"};f.isRegExp=function(b){return l.call(b)=="[object RegExp]"};f.isNull=function(b){return b===null};f.isUndefined=function(b){return b===void 0};f.noConflict=function(){c._=d;return this};f.identity=function(b){return b};f.times=function(b,e,g){for(var j=0;j<b;j++)e.call(g,j)};f.escape=function(b){return(""+b).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};f.mixin=function(b){z(f.functions(b),function(e){U(e,
-f[e]=b[e])})};var D=0;f.uniqueId=function(b){var e=D++;return b?b+e:e};f.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};f.template=function(b,e){var g=f.templateSettings;g="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+b.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(g.escape,function(k,p){return"',_.escape("+p.replace(/\\'/g,"'")+"),'"}).replace(g.interpolate,function(k,p){return"',"+p.replace(/\\'/g,
-"'")+",'"}).replace(g.evaluate||null,function(k,p){return"');"+p.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 j=new Function("obj","_",g);return e?j(e,f):function(k){return j.call(this,k,f)}};var F=function(b){this._wrapped=b};f.prototype=F.prototype;var L=function(b,e){return e?f(b).chain():b},U=function(b,e){F.prototype[b]=function(){var g=n.call(arguments);x.call(g,this._wrapped);return L(e.apply(f,
-g),this._chain)}};f.mixin(f);z("pop,push,reverse,shift,sort,splice,unshift".split(","),function(b){var e=h[b];F.prototype[b]=function(){e.apply(this._wrapped,arguments);return L(this._wrapped,this._chain)}});z(["concat","join","slice"],function(b){var e=h[b];F.prototype[b]=function(){return L(e.apply(this._wrapped,arguments),this._chain)}});F.prototype.chain=function(){this._chain=true;return this};F.prototype.value=function(){return this._wrapped}}).call(this);
-if(window.IriSP===undefined&&window.__IriSP===undefined)__IriSP=IriSP={};
-IriSP.loadLibs=function(a,c,d,i){IriSP.jQuery=null;var h=$LAB.script(a.jQuery).script(a.swfObject).wait().script(a.jQueryUI);if(c.player.type==="jwplayer")h=h.script(a.jwplayer);else{h=h.script(a.popcorn).script(a["popcorn.code"]);if(c.player.type==="youtube")h=h.script(a["popcorn.youtube"]);if(c.player.type==="vimeo")h=h.script(a["popcorn.vimeo"])}for(var m in c.gui.widgets){c.gui.widgets[m].type==="PolemicWidget"&&h.script(a.raphael);c.gui.widgets[m].type==="SparklineWidget"&&h.script(a.jquery_sparkline)}h.wait(function(){IriSP.jQuery=
-window.jQuery.noConflict(true);IriSP._=window._.noConflict();IriSP.underscore=IriSP._;var n=IriSP.jQuery("<link>",{rel:"stylesheet",type:"text/css",href:a.cssjQueryUI,"class":"dynamic_css"}),C=IriSP.jQuery("<link>",{rel:"stylesheet",type:"text/css",href:c.gui.css,"class":"dynamic_css"});n.appendTo("head");C.appendTo("head");IriSP.setupDataLoader();IriSP.__dataloader.get(d,function(x){IriSP.__jsonMetadata=x;i.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' href=''><img src='{{img_dir}}/facebook.png' alt='share on facebook'></img></a> <a target='_blank' class='Ldt-TwShare' href=''><img src='{{img_dir}}/twitter.png' alt='share on twitter'></img></a> <a target='_blank' class='Ldt-GplusShare' href=''><img src='{{img_dir}}/google.png' alt='share on google+'></img></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> <a href='#a={{id}}'> <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 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>";
+(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,
+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);
+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.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.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'> <img src='{{img_dir}}/minimize.png' class='Ldt-tweetWidgetKeepOpen' alt='dont minimize automatically'></img> <img src='{{img_dir}}/minimize.png' class='Ldt-tweetWidgetMinimize' alt='minimize window'></img> <div class='Ldt-tweetAvatar'></div> <img src='{{img_dir}}/profile_arrow.png' class='Ldt-tweetAvatar-profileArrow'></img> <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.PopcornReplacement={msgPump:{},__delay_seek_signal:false};IriSP.PopcornReplacement.media={paused:true,muted:false};IriSP.PopcornReplacement.listen=function(a,c){IriSP.PopcornReplacement.msgPump.hasOwnProperty(a)||(IriSP.PopcornReplacement.msgPump[a]=[]);IriSP.PopcornReplacement.msgPump[a].push(c)};IriSP.PopcornReplacement.trigger=function(a,c){if(IriSP.PopcornReplacement.msgPump.hasOwnProperty(a))for(var d=IriSP.PopcornReplacement.msgPump[a],i=0;i<d.length;i++)d[i].call(window,c)};
-IriSP.PopcornReplacement.guid=function(a){var c="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(d){var i=Math.random()*16|0;return(d=="x"?i:i&3|8).toString(16)});return a+c};
-IriSP.PopcornReplacement.__initApi=function(){IriSP.PopcornReplacement.trigger("loadedmetadata");IriSP.PopcornReplacement.media.muted=jwplayer(IriSP.PopcornReplacement._container).getMute();var a=0;for(a=0;a<IriSP.PopcornReplacement.__codes.length;a++){var c=IriSP.PopcornReplacement.__codes[a];0==c.start&&c.onStart();0==c.end&&c.onEnd()}};
-IriSP.PopcornReplacement.jwplayer=function(a,c){IriSP.PopcornReplacement._container=a.slice(1);c.events={onReady:IriSP.PopcornReplacement.__initApi,onTime:IriSP.PopcornReplacement.__timeHandler,onPlay:IriSP.PopcornReplacement.__playHandler,onPause:IriSP.PopcornReplacement.__pauseHandler,onSeek:IriSP.PopcornReplacement.__seekHandler};jwplayer(IriSP.PopcornReplacement._container).setup(c);IriSP.PopcornReplacement.media.duration=c.duration;return IriSP.PopcornReplacement};
-IriSP.PopcornReplacement.currentTime=function(a){if(typeof a==="undefined")return jwplayer(IriSP.PopcornReplacement._container).getPosition();else{a=+a;jwplayer(IriSP.PopcornReplacement._container).seek(a);IriSP.PopcornReplacement.__delay_seek_signal=true;return a}};IriSP.PopcornReplacement.play=function(){IriSP.PopcornReplacement.media.paused=false;IriSP.PopcornReplacement.trigger("play");jwplayer(IriSP.PopcornReplacement._container).play()};
-IriSP.PopcornReplacement.pause=function(){if(!IriSP.PopcornReplacement.media.paused){IriSP.PopcornReplacement.media.paused=true;IriSP.PopcornReplacement.trigger("pause");jwplayer(IriSP.PopcornReplacement._container).pause()}};
-IriSP.PopcornReplacement.muted=function(a){if(typeof a!=="undefined")if(jwplayer(IriSP.PopcornReplacement._container).getMute()!==a){if(a){jwplayer(IriSP.PopcornReplacement._container).setMute(true);IriSP.PopcornReplacement.media.muted=true}else{jwplayer(IriSP.PopcornReplacement._container).setMute(false);IriSP.PopcornReplacement.media.muted=false}IriSP.PopcornReplacement.trigger("volumechange")}return jwplayer(IriSP.PopcornReplacement._container).getMute()};IriSP.PopcornReplacement.mute=IriSP.PopcornReplacement.muted;
-IriSP.PopcornReplacement.__codes=[];IriSP.PopcornReplacement.code=function(a){IriSP.PopcornReplacement.__codes.push(a);return IriSP.PopcornReplacement};IriSP.PopcornReplacement.__timeHandler=function(a){a=a.position;var c=0;for(c=0;c<IriSP.PopcornReplacement.__codes.length;c++){var d=IriSP.PopcornReplacement.__codes[c];a>=d.start&&a<d.end&&a-1<=d.start&&d.onStart();a>d.start&&a>d.end&&a-1<=d.end&&d.onEnd()}IriSP.PopcornReplacement.trigger("timeupdate")};
-IriSP.PopcornReplacement.__seekHandler=function(a){var c=0;for(c=0;c<IriSP.PopcornReplacement.__codes.length;c++){var d=IriSP.PopcornReplacement.__codes[c];a.position>=d.start&&a.position<d.end&&d.onEnd()}for(c=0;c<IriSP.PopcornReplacement.__codes.length;c++){d=IriSP.PopcornReplacement.__codes[c];if(typeof a.offset==="undefined")a.offset=0;a.offset>=d.start&&a.offset<d.end&&d.onStart()}if(IriSP.PopcornReplacement.__delay_seek_signal===true){console.log(IriSP.PopcornReplacement.currentTime());IriSP.PopcornReplacement.trigger("seeked")}IriSP.PopcornReplacement.trigger("timeupdate")};
-IriSP.PopcornReplacement.__playHandler=function(){IriSP.PopcornReplacement.media.paused=false;IriSP.PopcornReplacement.trigger("play")};IriSP.PopcornReplacement.__pauseHandler=function(){IriSP.PopcornReplacement.media.paused=true;IriSP.PopcornReplacement.trigger("pause")};IriSP.PopcornReplacement.roundTime=function(){var a=IriSP.PopcornReplacement.currentTime();return Math.round(a)};IriSP.traceNum=0;IriSP.trace=function(){};
-IriSP.wrap=function(a,c){return function(){var d=Array.prototype.slice.call(arguments,0);return c.apply(a,d)}};IriSP.timeToPourcent=function(a,c){a=Math.abs(a);c=Math.abs(c);return Math.floor(a/c*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 c=Math.abs(parseInt(a/3600)%24),d=Math.abs(parseInt(a/60)%60);a=parseFloat(Math.abs(a%60).toFixed(0));return{hours:c,minutes:d,seconds:a,toString:function(){var i="";if(c>0)i=IriSP.padWithZeros(this.hours)+":";i+=IriSP.padWithZeros(this.minutes)+":"+IriSP.padWithZeros(this.seconds);return i}}};
-IriSP.formatTweet=function(a){var c=[[/((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<c.length;d++)a=
-a.replace(c[d][0],c[d][1]);return a};IriSP.countProperties=function(a){var c=0;for(var d in a)a.hasOwnProperty(d)&&++c;return c};IriSP.DEC_HEXA_COLOR=function(a){for(var c="",d;a>15;){d=a-Math.floor(a/16)*16;c="0123456789ABCDEF".charAt(d)+c;a=Math.floor(a/16)}return c="0123456789ABCDEF".charAt(a)+c};IriSP.templToHTML=function(a,c){var d=IriSP.jQuery.extend(IriSP.default_templates_vars,c);return Mustache.to_html(a,d)};
-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){return"http://www.facebook.com/share.php?u=I'm watching "+a};IriSP.mkTweetUrl=function(a){return"http://twitter.com/home?status=I'm sharing "+a};IriSP.mkGplusUrl=function(){return""};
-IriSP.DataLoader=function(){this._cache={};this._callbacks={}};
-IriSP.DataLoader.prototype.get=function(a,c){var d=a.split("&")[0];if(this._cache.hasOwnProperty(d))c(this._cache[d]);else if(this._callbacks.hasOwnProperty(d))this._callbacks[d].push(c);else{this._callbacks[d]=[];this._callbacks[d].push(c);var i=function(h){this._cache[d]=h;for(h=h=0;h<this._callbacks[d].length;h++)this._callbacks[d][h](this._cache[d])};a.indexOf(document.location.hostname)===-1&&a.indexOf("http://")!==-1?IriSP.jQuery.get(a,{},IriSP.wrap(this,i),"jsonp"):IriSP.jQuery.get(a,IriSP.wrap(this,
-i))}};IriSP.Serializer=function(a,c){this._DataLoader=a;this._url=c;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.libdir="/mdp/src/js/libs/";IriSP.jwplayer_swf_path="/mdp/test/libs/player.swf";
-IriSP.lib={jQuery:"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js",jQueryUI:"http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/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:IriSP.libdir+"popcorn.js",jwplayer:IriSP.libdir+"jwplayer.js",popcornReplacement:IriSP.libdir+"pop.js",
-raphael:IriSP.libdir+"raphael.js",jquery_sparkline:IriSP.libdir+"jquery.sparkline.js","popcorn.mediafragment":IriSP.libdir+"popcorn.mediafragment.js","popcorn.code":IriSP.libdir+"popcorn.code.js","popcorn.jwplayer":IriSP.libdir+"popcorn.jwplayer.js","popcorn.youtube":IriSP.libdir+"popcorn.youtube.js"};IriSP.config=undefined;
-IriSP.widgetsDefaults={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"],cinecast_version:true},Main:{autoplay:true}};
-IriSP.platform_url="http://localhost/pf";IriSP.paths={imgs:"/mdp/src/css/imgs"};IriSP.default_templates_vars={img_dir:IriSP.paths.imgs};IriSP.LdtShareTool=IriSP.share_template;
-IriSP.createPlayerChrome=function(){var a=IriSP.config.gui.width,c=IriSP.config.gui.height-20;IriSP.trace("__IriSP.createMyHtml",IriSP.config.gui.container);if(IriSP.config.gui.mode=="radio"){IriSP.jQuery("#"+IriSP.config.gui.container).before(IriSP.search_template);c=Mustache.to_html(IriSP.radio_template,{share_template:IriSP.share_template});IriSP.jQuery(c).appendTo("#"+IriSP.config.gui.container);if(IriSP.jQuery.browser.msie==true&&IriSP.jQuery.browser.version=="7.0"){IriSP.jQuery("#Ldt-Root").css("padding-top",
-"25px");IriSP.trace("__IriSP.createHtml","IE7 SPECIAL ")}}else if(IriSP.config.gui.mode=="video"){c=Mustache.to_html(IriSP.video_template,{share_template:IriSP.share_template,heightS:c});IriSP.jQuery(c).appendTo("#"+IriSP.config.gui.container)}IriSP.jQuery("#Ldt-Annotations").width(a-150);IriSP.jQuery("#Ldt-Show-Arrow-container").width(a-150);IriSP.jQuery("#Ldt-ShowAnnotation-audio").width(a-10);IriSP.jQuery("#Ldt-ShowAnnotation-video").width(a-10);IriSP.jQuery("#Ldt-SaKeyword").width(a-10);IriSP.jQuery("#Ldt-controler").width(a-
-10);IriSP.jQuery("#Ldt-Control").attr("z-index","100");IriSP.jQuery("#Ldt-controler").hide();IriSP.jQuery(IriSP.annotation_loading_template).appendTo("#Ldt-ShowAnnotation-audio");IriSP.config.gui.mode=="radio"&&IriSP.jQuery("#Ldt-load-container").attr("width",IriSP.config.gui.width);IriSP.config.gui.debug===true?IriSP.jQuery("#Ldt-output").show():IriSP.jQuery("#Ldt-output").hide()};
-IriSP.createInterface=function(a,c,d){IriSP.jQuery("#Ldt-controler").show();IriSP.trace("__IriSP.createInterface",a+","+c+","+d+",");IriSP.jQuery("#Ldt-ShowAnnotation").click(function(){});IriSP.jQuery("#Ldt-PlaceHolder").attr("top");IriSP.jQuery("#Ldt-PlaceHolder").attr("left");IriSP.jQuery("#slider-range-min").slider({value:0,min:1,max:d/1E3,step:0.1,slide:function(i,h){IriSP.MyApiPlayer.seek(h.value)}});IriSP.trace("__IriSP.createInterface","ICI");IriSP.jQuery("#amount").val(IriSP.jQuery("#slider-range-min").slider("value")+
-" s");IriSP.jQuery(".Ldt-Control1 button:first").button({icons:{primary:"ui-icon-play"},text:false}).next().button({icons:{primary:"ui-icon-seek-next"},text:false});IriSP.jQuery(".Ldt-Control2 button:first").button({icons:{primary:"ui-icon-search"},text:false}).next().button({icons:{primary:"ui-icon-volume-on"},text:false});IriSP.trace("__IriSP.createInterface","ICI2");IriSP.jQuery("#ldt-CtrlPlay").attr("style","background-color:#CD21C24;");IriSP.jQuery("#Ldt-load-container").hide();IriSP.config.gui.mode==
-"radio"&IriSP.jQuery.browser.msie!=true&&IriSP.jQuery("#Ldtplayer1").attr("height","0");IriSP.trace("__IriSP.createInterface","3");IriSP.trace("__IriSP.createInterface","END")};
-IriSP.Widget=function(a,c,d){if(c===undefined||c===null)c={};this._Popcorn=a;this._config=c;this._serializer=d;if(c.hasOwnProperty("container")){this._id=c.container;this.selector=IriSP.jQuery("#"+this._id)}if(c.hasOwnProperty("spacer")){this._spacerId=c.spacer;this.spacer=IriSP.jQuery("#"+this._spacerId)}if(c.hasOwnProperty("width"))this.width=c.width;if(c.hasOwnProperty("height"))this.height=c.height;if(c.hasOwnProperty("heightmax"))this.heightmax=c.heightmax;if(c.hasOwnProperty("widthmax"))this.widthmax=
-c.widthmax;if(c.hasOwnProperty("layoutManager"))this.layoutManager=c.layoutManager};IriSP.Widget.prototype.draw=function(){};IriSP.Widget.prototype.redraw=function(){};IriSP.Module=function(a,c,d){if(c===undefined||c===null)c={};this._Popcorn=a;this._config=c;this._serializer=d};
+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.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.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.__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.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"};
+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.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 c=IriSP.guid(this._div+"_widget_"+a+"_"),d=IriSP.guid("LdtPlayer_spacer_");this._widgets.push([a,c]);a=Mustache.to_html("<div id='{{id}}' style='width: {{width}}px; position: relative;'></div",{id:c,width:this._width});var i=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(i);return[c,d]};IriSP.setupDataLoader=function(){IriSP.__dataloader=new IriSP.DataLoader};
-IriSP.configurePopcorn=function(a,c){var d,i=a.createDiv()[0];switch(c.type){case "html5":var h=Popcorn.guid("video");IriSP.jQuery("#"+i).append("<video src='"+c.file+"' id='"+h+"'></video>");c.hasOwnProperty("width")&&IriSP.jQuery("#"+i).css("width",c.width);c.hasOwnProperty("height")&&IriSP.jQuery("#"+i).css("height",c.height);d=Popcorn("#"+h);break;case "jwplayer":h=IriSP.jQuery.extend({},c);delete h.container;delete h.type;if(c.provider==="rtmp"){if(typeof IriSP.__jsonMetadata==="undefined")break;
-h.streamer=IriSP.__jsonMetadata.medias[0].meta.item.value;h.file=IriSP.__jsonMetadata.medias[0].href.slice(h.streamer.length);console.log(h.streamer,h.file);h.streamer="rtmp://media.iri.centrepompidou.fr/ddc_player/video/ldtplatform/";h.file="laurentcantet_entrelesmurs.flv";console.log(h.streamer,h.file)}if(!c.hasOwnProperty("flashplayer"))h.flashplayer=IriSP.jwplayer_swf_path;c.hasOwnProperty("controlbar.position")||(h["controlbar.position"]="none");d=IriSP.PopcornReplacement.jwplayer("#"+i,h);break;
-case "youtube":h=IriSP.jQuery.extend({},c);delete h.container;h.controls=0;h.autostart=false;templ="width: {{width}}px; height: {{height}}px;";d=Mustache.to_html(templ,{width:h.width,height:h.height});IriSP.jQuery("#"+i).attr("style",d);d=Popcorn.youtube("#"+i,h.video,h);break;default:d=undefined}return d};IriSP.configureWidgets=function(a,c,d){var i=new IriSP.SerializerFactory(IriSP.__dataloader),h=[],m;for(m=0;m<d.widgets.length;m++){var n=IriSP.instantiateWidget(a,i,c,d.widgets[m]);h.push(n)}return h};
-IriSP.configureModules=function(a,c){var d=new IriSP.SerializerFactory(IriSP.__dataloader),i=[],h;for(h=0;h<c.length;h++){var m=c[h],n=d.getSerializer(m.metadata);m=new IriSP[m.type](a,m,n);i.push(m)}return i};
-IriSP.instantiateWidget=function(a,c,d,i){var h=IriSP.jQuery.extend({},i);if(!h.hasOwnProperty("container")){var m=d.createDiv(i.type),n=m[1];h.container=m[0];h.spacer=n;h.layoutManager=d}m=c.getSerializer(i.metadata);if(typeof m=="undefined")debugger;h=new IriSP[i.type](a,h,m);if(i.hasOwnProperty("requires"))for(n=n=0;n<i.requires.length;n++)h[i.requires[n].type]=IriSP.instantiateWidget(a,c,d,i.requires[n]);m.sync(IriSP.wrap(h,function(){this.draw()}));return h};
-IriSP.MediaFragment=function(a,c,d){IriSP.Module.call(this,a,c,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.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))}}else if(pageoffset.substring(0,2)==="a="){var c=pageoffset.substring(2);this._serializer.sync(IriSP.wrap(this,function(){this.lookupAnnotation.call(this,c)}))}}};
-IriSP.MediaFragment.prototype.updateTime=function(){if(this.mutex!==true){var a=window.history;if(!a.pushState)return false;splitArr=window.location.href.split("#");a.replaceState({},"",splitArr[0]+"#t="+this._Popcorn.currentTime().toFixed(2))}};
-IriSP.MediaFragment.prototype.updateAnnotation=function(a){var c=this;this.mutex=true;var d=window.history;if(!d.pushState)return false;splitArr=window.location.href.split("#");d.replaceState({},"",splitArr[0]+"#a="+a);window.setTimeout(function(){c.mutex=false},50)};
-IriSP.MediaFragment.prototype.lookupAnnotation=function(a){var c=this;this.mutex=true;var d=undefined,i=this._serializer._data.annotations,h;for(h=0;h<i.length;h++)if(i[h].id===a){d=i[h];break}typeof d!=="undefined"&&this._Popcorn.currentTime(d.begin/1E3);window.setTimeout(function(){c.mutex=false},50)};IriSP.AnnotationsListWidget=function(a,c,d){IriSP.Widget.call(this,a,c,d);this.__counter=0;this.__oldList=[]};IriSP.AnnotationsListWidget.prototype=new IriSP.Widget;
-IriSP.AnnotationsListWidget.prototype.clear=function(){};IriSP.AnnotationsListWidget.prototype.clearWidget=function(){};
-IriSP.AnnotationsListWidget.prototype.drawList=function(a){var c=this._serializer.getContributions(),d=this._serializer._data.annotations,i=this._Popcorn.currentTime(),h=[];if(typeof c==="undefined")console.log("no type suitable for display");else{for(x=0;x<d.length;x++){var m=d[x];if(!(typeof m.meta!=="undefined"&&typeof m.meta["id-ref"]!=="undefined"&&m.meta["id-ref"]!=c))if(m.begin<=i*1E3&&m.end>i*1E3){var n=m,C={};C.id=n.id;C.title=n.content.title;C.desc=n.content.description;C.begin=IriSP.msToTime(m.begin);
-C.end=IriSP.msToTime(m.end);h.push(C)}}c=IriSP.underscore.pluck(h,"id").sort();if(c.length!==this.__oldList.length){x=IriSP.templToHTML(IriSP.annotationsListWidget_template,{annotations:h});this.selector.html(x)}d=1;for(var x=0;x<c.length;){if(c[x]!==this.__oldList[x])d=0;break}this.__oldList=c;if(typeof a!=="undefined"){console.log("forced redraw");x=IriSP.templToHTML(IriSP.annotationsListWidget_template,{annotations:h});this.selector.html(x)}if(d!==1){x=IriSP.templToHTML(IriSP.annotationsListWidget_template,
-{annotations:h});this.selector.html(x)}}};IriSP.AnnotationsListWidget.prototype.draw=function(){this.drawList();this._Popcorn.listen("IriSP.createAnnotationWidget.addedAnnotation",IriSP.wrap(this,function(){this.redraw(true)}));this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.redraw))};IriSP.AnnotationsListWidget.prototype.redraw=function(){this.drawList()};IriSP.AnnotationsWidget=function(a,c,d){IriSP.Widget.call(this,a,c,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 c=a.content.title,d=a.content.description,i=+a.begin/1E3,h=+a.end/1E3;this._serializer.currentMedia();c=Mustache.to_html("{{title}} - ( {{begin}} - {{end}} )",{title:c,begin:IriSP.secondsToTime(i),end:IriSP.secondsToTime(h)});this.selector.find(".Ldt-SaTitle").text(c);this.selector.find(".Ldt-SaDescription").text(d);i=IriSP.widgetsDefaults.AnnotationsWidget;d=i.share_text;c=i.fb_link;i=i.tw_link;a=document.location.href+"#a="+a.id;
-this.selector.find(".Ldt-fbShare").attr("href",c+IriSP.encodeURI(d)+IriSP.encodeURI(a));this.selector.find(".Ldt-TwShare").attr("href",i+IriSP.encodeURI(d)+IriSP.encodeURI(a));this.selector.find(".Ldt-GplusShare").attr("href",c+IriSP.encodeURI(d)+IriSP.encodeURI(a))};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 c=[];if(typeof this._serializer.getChapitrage()!=="undefined")c.push(this._serializer.getChapitrage());else c=this._serializer.getNonTweetIds();var d=this._serializer._data.annotations,i;for(i in d){var h=d[i],m=Math.round(+h.begin/1E3),n=Math.round(+h.end/
-1E3);if(!(typeof h.meta!=="undefined"&&typeof h.meta["id-ref"]!=="undefined"&&!IriSP.underscore.include(c,h.meta["id-ref"])))this._Popcorn=this._Popcorn.code({start:m,end:n,onStart:function(C){return function(){a.displayAnnotation(C)}}(h),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,c,d){IriSP.Widget.call(this,a,c,d);this._oldAnnotation=null;this._blockArrow=false};IriSP.ArrowWidget.prototype=new IriSP.Widget;IriSP.ArrowWidget.prototype.clear=function(){};IriSP.ArrowWidget.prototype.clearWidget=function(){};
+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)}};
+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.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.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.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.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){var c=this._serializer.currentAnnotations(this._Popcorn.currentTime())[0];if(c!=this._oldAnnotation){a=+c.begin/1E3;var d=+c.end/1E3,i=+this._serializer.currentMedia().meta["dc:duration"]/1E3;a=(a+d)/2/i;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=c}}};IriSP.ArrowWidget.prototype.blockArrow=function(){this._blockArrow=true};IriSP.ArrowWidget.prototype.releaseArrow=function(){this._blockArrow=false};
-IriSP.createAnnotationWidget=function(a,c,d){IriSP.Widget.call(this,a,c,d);this._hidden=true;this.keywords=IriSP.widgetsDefaults.createAnnotationWidget.keywords;this.cinecast_version=IriSP.widgetsDefaults.createAnnotationWidget.cinecast_version;this.ids={}};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;this.selector.append(this.cinecast_version?IriSP.templToHTML(IriSP.createAnnotationWidget_festivalCinecast_template):IriSP.templToHTML(IriSP.createAnnotationWidget_template));this.selector.hide();for(var c=0;c<this.keywords.length;c++){var d=this.keywords[c],i=IriSP.guid("button_"),h=IriSP.templToHTML("<button id={{id}} class='Ldt-createAnnotation-absent-keyword'>{{keyword}}</button>",{keyword:d,id:i});this.ids[d]=i;this.selector.find(".Ldt-createAnnotation-keywords").append(h);
-this.selector.find("#"+i).click(function(m){return function(){var n=a.selector.find(".Ldt-createAnnotation-Description").val();n=n.indexOf(m)!=-1?n.replace(m,""):n+m;a.selector.find(".Ldt-createAnnotation-Description").val(n);a.selector.find(".Ldt-createAnnotation-Description").trigger("js_mod");a.handleTextChanges()}}(d))}this.selector.find(".Ldt-createAnnotation-Description").bind("propertychange keyup input paste",IriSP.wrap(this,this.handleTextChanges));this.selector.find(".Ldt-createAnnotation-submitButton").click(IriSP.wrap(this,
-this.handleButtonClick));this._Popcorn.listen("IriSP.PlayerWidget.AnnotateButton.clicked",IriSP.wrap(this,this.handleAnnotateSignal))};
-IriSP.createAnnotationWidget.prototype.handleAnnotateSignal=function(){if(this._hidden==false){this.selector.hide();this._hidden=true;this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().show();this.selector.find("Ldt-createAnnotation-Description").val("");this.selector.find(".Ldt-createAnnotation-endScreen").hide();this._Popcorn.trigger("IriSP.ArrowWidget.releaseArrow")}else{if(this.cinecast_version){var a=this._serializer.currentAnnotations(this._Popcorn.currentTime())[0],c=IriSP.msToTime(a.begin),
-d=IriSP.msToTime(a.end);this._currentAnnotation=a;typeof a.content!=="undefined"&&this.selector.find(".Ldt-createAnnotation-Title").html(a.content.title);a=IriSP.templToHTML("- ({{begin}} - {{ end }})",{begin:c,end:d});this.selector.find(".Ldt-createAnnotation-TimeFrame").html(a)}this.selector.show();this._hidden=false;this._Popcorn.trigger("IriSP.ArrowWidget.blockArrow")}};
-IriSP.createAnnotationWidget.prototype.handleTextChanges=function(){var a=this.selector.find(".Ldt-createAnnotation-Description").val();for(var c in this.ids){var d=this.ids[c];if(a.indexOf(c)!=-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")}};
-IriSP.createAnnotationWidget.prototype.handleButtonClick=function(){var a=this,c=this.selector.find(".Ldt-createAnnotation-Description"),d=c.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));c.css("background-color","#d93c71")}else this.selector.find(".Ldt-createAnnotation-errorMessage").show();c.bind("js_mod.tmp propertychange.tmp keyup.tmp input.tmp paste.tmp",
-IriSP.wrap(this,function(){var x=c.val();console.log(x);if(x!==""){this.selector.find(".Ldt-createAnnotation-errorMessage").hide();c.css("background-color","");c.unbind(".tmp")}}))}else{this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide();this.cinecast_version&&this.selector.find(".Ldt-createAnnotation-Title").parent().show();var i=IriSP.mkTweetUrl(document.location.href),h=IriSP.mkGplusUrl(document.location.href),m=IriSP.mkFbUrl(document.location.href);this.selector.find(".Ldt-createAnnotation-endScreen-TweetLink").attr("href",
-i);this.selector.find(".Ldt-createAnnotation-endScreen-FbLink").attr("href",m);this.selector.find(".Ldt-createAnnotation-endScreen-GplusLink").attr("href",h);this.selector.find(".Ldt-createAnnotation-endScreen").show();if(typeof this._currentAnnotation==="undefined")console.log("this._currentAnnotation undefined");else{i={annotations:[{}],meta:{}};var n=i.annotations[0];n.type_title="";n.media=this._serializer.currentMedia().id;n.begin=this._currentAnnotation.begin;n.end=this._currentAnnotation.end;
-n.type=this._serializer.getContributions();n.content={};n.content.data=d;var C=i.meta;C.creator="An User";C.created=Date().toString();n.tags=[];for(h=0;h<this.keywords.length;h++){m=this.keywords[h];d.indexOf(m)!=-1&&n.tags.push(m)}d=JSON.stringify(i);i=Mustache.to_html("{{platf_url}}/ldtplatform/api/ldt/projects/{{id}}.json",{platf_url:IriSP.platform_url,id:this._serializer._data.meta.id});console.log(i);IriSP.jQuery.ajax({url:i,type:"PUT",contentType:"application/json",data:d,dataType:"json",success:function(x){delete n.tags;
-n.content.description=n.content.data;delete n.content.data;n.id=x.annotations[0].id;n.title=a._currentAnnotation.content.title;n.meta=C;n.meta["id-ref"]=n.type;a._serializer._data.annotations.push(n);a._Popcorn.trigger("IriSP.createAnnotationWidget.addedAnnotation")},error:function(x,l,q){alert("ERROR = "+x.responseText+", "+q)}})}}};IriSP.PlayerWidget=function(a,c,d){IriSP.Widget.call(this,a,c,d);this._searchBlockOpen=false;this._searchLastValue=""};IriSP.PlayerWidget.prototype=new IriSP.Widget;
+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.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.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.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.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.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()};
-IriSP.PlayerWidget.prototype.timeDisplayUpdater=function(){if(this._previousSecond===undefined)this._previousSecond=this._Popcorn.roundTime();else if(this._Popcorn.roundTime()==this._previousSecond)return;var a=+this._serializer.currentMedia().meta["dc:duration"]/1E3;a=IriSP.secondsToTime(a);var c=IriSP.secondsToTime(this._Popcorn.currentTime());this.selector.find(".Ldt-ElapsedTime").html(c.toString());this.selector.find(".Ldt-TotalTime").html(a.toString());this._previousSecond=this._Popcorn.roundTime()};
+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()};
+IriSP.PlayerWidget.prototype.timeDisplayUpdater=function(){if(this._previousSecond===undefined)this._previousSecond=this._Popcorn.roundTime();else if(this._Popcorn.roundTime()==this._previousSecond)return;var a=+this._serializer.currentMedia().meta["dc:duration"]/1E3;a=IriSP.secondsToTime(a);var b=IriSP.secondsToTime(this._Popcorn.currentTime());this.selector.find(".Ldt-ElapsedTime").html(b.toString());this.selector.find(".Ldt-TotalTime").html(a.toString());this._previousSecond=this._Popcorn.roundTime()};
IriSP.PlayerWidget.prototype.playButtonUpdater=function(){if(this._Popcorn.media.paused==true){this.selector.find(".Ldt-CtrlPlay").attr("title","Play");var a=IriSP.templToHTML("url({{img_dir}}/play_sprite.png)")}else{this.selector.find(".Ldt-CtrlPlay").attr("title","Pause");a=IriSP.templToHTML("url({{img_dir}}/pause_sprite.png)")}this.selector.find(".Ldt-CtrlPlay").css("background-image",a)};
IriSP.PlayerWidget.prototype.playHandler=function(){this._Popcorn.media.paused==true?this._Popcorn.play():this._Popcorn.pause()};IriSP.PlayerWidget.prototype.muteHandler=function(){this._Popcorn.muted()?this._Popcorn.mute(false):this._Popcorn.mute(true)};
IriSP.PlayerWidget.prototype.muteButtonUpdater=function(){if(this._Popcorn.media.muted==true){this.selector.find(".Ldt-CtrlSound").attr("title","Unmute");var a=IriSP.templToHTML("url({{img_dir}}/sound_sprite.png)")}else{this.selector.find(".Ldt-CtrlSound").attr("title","Mute");a=IriSP.templToHTML("url({{img_dir}}/mute_sprite.png)")}this.selector.find(".Ldt-CtrlSound").css("background-image",a)};
-IriSP.PlayerWidget.prototype.searchButtonHandler=function(){var a=this;if(this._searchBlockOpen==false){this.selector.find(".LdtSearch").show("blind",{direction:"horizontal"},100);this.selector.find(".LdtSearchInput").css("background-color","#fff");this.selector.find(".LdtSearchInput").focus();this.selector.find(".LdtSearchInput").attr("value",this._searchLastValue);this._Popcorn.trigger("IriSP.search",this._searchLastValue);this._searchBlockOpen=true;this.selector.find(".LdtSearchInput").bind("keyup",
-null,function(){a.searchHandler.call(a)});this._positiveMatch=false;this._Popcorn.trigger("IriSP.search.open")}else{this._searchLastValue=this.selector.find(".LdtSearchInput").attr("value");this.selector.find(".LdtSearchInput").attr("value","");this.selector.find(".LdtSearch").hide("blind",{direction:"horizontal"},75);this.selector.find(".LdtSearchInput").unbind("keypress set");this._positiveMatch=this._searchBlockOpen=false;this._Popcorn.trigger("IriSP.search.closed")}};
+IriSP.PlayerWidget.prototype.showSearchBlock=function(){var a=this;if(this._searchBlockOpen==false){this.selector.find(".LdtSearch").show("blind",{direction:"horizontal"},100);this.selector.find(".LdtSearchInput").css("background-color","#fff");this._searchBlockOpen=true;this.selector.find(".LdtSearchInput").bind("keyup",null,function(){a.searchHandler.call(a)});this.selector.find(".LdtSearchInput").focus();this._positiveMatch=false;this._Popcorn.trigger("IriSP.search.open")}};
+IriSP.PlayerWidget.prototype.hideSearchBlock=function(){if(this._searchBlockOpen==true){this._searchLastValue=this.selector.find(".LdtSearchInput").attr("value");this.selector.find(".LdtSearchInput").attr("value","");this.selector.find(".LdtSearch").hide("blind",{direction:"horizontal"},75);this.selector.find(".LdtSearchInput").unbind("keypress set");this._positiveMatch=this._searchBlockOpen=false;this._Popcorn.trigger("IriSP.search.closed")}};
+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.PolemicWidget=function(a,c,d){IriSP.Widget.call(this,a,c,d);this.userPol=[];this.userNoPol=[];this.userst=[];this.numberOfTweet=0;this.yMax=this.height;this.tweets=[];this.svgElements={};this.oldSearchMatches=[];this.paper=Raphael(document.getElementById(this._id),c.width,c.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))};IriSP.PolemicWidget.prototype=new IriSP.Widget;
-IriSP.PolemicWidget.prototype.draw=function(){function a(u){if(u=="Q"){N+=1;return 2}else if(u=="REF"){J+=1;return 4}else if(u=="OK"){I+=1;return 1}else if(u=="KO"){H+=1;return 3}else if(u==""){E+=1;return 5}}function c(u){var y=this._serializer.getTweets();if(typeof y==="undefined"){y=this._serializer.getTweetIds()[0];if(typeof y==="undefined"){view=u.views[0];if(typeof view.annotation_types!=="undefined")if(view.annotation_types.length>=1)y=view.annotation_types[0];else console.log("PolemicWidget: invalid file")}}for(var B=
-0;B<u.annotations.length;B++){var f=u.annotations[B],z=Math.floor(f.begin/l*n),Q=Math.floor(z/n*q);if(typeof f.meta!=="undefined"&&typeof f.meta["id-ref"]!=="undefined"&&f.meta["id-ref"]===y){var r={};if(typeof f.meta["dc:source"]!=="undefined")r=JSON.parse(f.meta["dc:source"].content);if(f.content.polemics!=undefined&&f.content.polemics[0]!=null)for(var D=0;D<f.content.polemics.length;D++){this.tweets[x]={id:B,qualification:a(f.content.polemics[D]),yIndicator:z,yframe:Q,title:f.content.title,timeframe:f.begin,
-userId:r.id,userScreenName:r.screen_name,tsource:r,cinecast_id:f.id};x+=1}else{this.tweets[x]={id:B,qualification:a(""),yIndicator:z,yframe:Q,title:f.content.title,timeframe:f.begin,userId:r.id,userScreenName:r.screen_name,tsource:r,cinecast_id:f.id};x+=1}}}d.call(this)}function d(){x=this.tweets.length;for(var u=0;u<C;u++)for(var y=0;y<x;y++)if(u==this.tweets[y].yframe){var B=this.tweets[y].qualification;if(o[u]==undefined)o[u]={id:u,qualifVol:[],mytweetsID:[]};o[u].mytweetsID.push(this.tweets[y]);
-if(o[u].qualifVol[B]==undefined)o[u].qualifVol[B]=1;else o[u].qualifVol[B]+=1}for(u=B=0;u<C;u++){var f=0;for(y=0;y<6;y++)if(o[u]!=undefined)if(o[u].qualifVol[y]!=undefined)f+=o[u].qualifVol[y];if(f>B)B=f}u=5*B+10;if(u>this.height){this.paper.setSize(this.width,u);this.height=u;console.log("resizeing")}for(u=0;u<C;u++){f=5;if(o[u]!=undefined)for(y=6;y>-1;y--)if(o[u].qualifVol[y]!=undefined)for(B=0;B<o[u].mytweetsID.length;B++)if(o[u].mytweetsID[B].qualification==y){var z=u*h,Q=this.height-f;if(this.yMax>
-Q)this.yMax=Q;if(!this.svgElements.hasOwnProperty(o[u].mytweetsID[B].cinecast_id)){z=this.paper.rect(z,Q,h-m,5).attr({stroke:"#00","stroke-width":0.1,fill:s[y]});f+=5;z.color=s[y];z.time=o[u].mytweetsID[B].timeframe;z.title=o[u].mytweetsID[B].title;z.id=o[u].mytweetsID[B].cinecast_id;this.svgElements[z.id]=z;IriSP.jQuery(z.node).mouseenter(function(r){return function(D){i.TooltipWidget.show.call(i.TooltipWidget,r.title,r.attr("fill"),D.pageX-106,D.pageY-160);r.displayed=true}}(z)).mousedown(function(r){return function(){i._Popcorn.currentTime(r.time/
-1E3);i._Popcorn.trigger("IriSP.PolemicTweet.click",r.id)}}(z));IriSP.jQuery(z.node).attr("id","t"+B+"");IriSP.jQuery(z.node).attr("title",o[u].mytweetsID[B].title);IriSP.jQuery(z.node).attr("begin",o[u].mytweetsID[B].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 i=this,h=5,m=1,n=this.width,C=n/h,x=0,l=+this._serializer.currentMedia().meta["dc:duration"],q=n/h,s=Array("","#1D973D","#C5A62D","#CE0A15","#036AAE","#585858"),o=Array(q),v=function(){};v=function(){};
-v.prototype.draw=function(){};v.prototype.zoom=function(){};v.prototype.inside=function(){};v=function(){};v=function(){};var E=0,N=0,J=0,I=0,H=0;this._serializer.sync(function(u){c.call(i,u)});this.selector.mouseleave(IriSP.wrap(this,function(){i.TooltipWidget.hide.call(i.TooltipWidget)}));this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.sliderUpdater))};
-IriSP.PolemicWidget.prototype.sliderUpdater=function(){var a=+this._Popcorn.currentTime(),c=+this._serializer.currentMedia().meta["dc:duration"];this.paperSlider.attr("width",a*(this.width/(c/1E3)));this.sliderTip.attr("x",a*(this.width/(c/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 c in this.svgElements){var d=this.svgElements[c];d.attr({fill:d.color,opacity:0.4})}for(c in a)this.svgElements.hasOwnProperty(c)&&this.svgElements[c].attr({fill:"#fc00ff",opacity:1});this.oldSearchMatches=a}};
-IriSP.PolemicWidget.prototype.searchFieldClearedHandler=function(){for(var a in this.svgElements){var c=this.svgElements[a];c.attr({fill:c.color,opacity:1})}};IriSP.PolemicWidget.prototype.searchFieldClosedHandler=function(){for(var a in this.svgElements){var c=this.svgElements[a];c.attr({fill:c.color,opacity:1})}};
-IriSP.SegmentsWidget=function(a,c,d){var i=this;IriSP.Widget.call(this,a,c,d);this.oldSearchMatches=[];this._Popcorn.listen("IriSP.search",function(h){i.searchHandler.call(i,h)});this._Popcorn.listen("IriSP.search.closed",function(){i.searchFieldClosedHandler.call(i)});this._Popcorn.listen("IriSP.search.cleared",function(){i.searchFieldClearedHandler.call(i)})};IriSP.SegmentsWidget.prototype=new IriSP.Widget;
-IriSP.SegmentsWidget.prototype.segmentToPixel=function(a){var c=Math.round(+a.begin/1E3);a=Math.round(+a.end/1E3);var d=this._serializer.currentMedia().meta["dc:duration"]/1E3;c=IriSP.timeToPourcent(c,d);this.selector.parent().width();c=Math.floor(IriSP.timeToPourcent(a,d)-c);return Math.floor(this.selector.parent().width()*(c/100))};IriSP.SegmentsWidget.prototype.segmentsLength=function(a){for(var c=0,d=0;d<a.length;d++)c+=this.segmentToPixel(a[d].annotation);return c};
-IriSP.SegmentsWidget.prototype.draw=function(){var a=this,c=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 i=0,h=[];for(i=0;i<c.length;i++){var m=c[i];d!=""&&typeof m.meta!==
-"undefined"&&typeof m.meta["id-ref"]!=="undefined"&&m.meta["id-ref"]!=d||h.push(m)}this.selector.width();c=IriSP.underscore.max(h,function(o){return o.end});for(i=0;i<h.length;i++){m=h[i];d=+m.begin;var n=+m.end,C=this._serializer.currentMedia().meta["dc:duration"],x=m.id,l=Math.floor(this.selector.parent().width()*(d/C));n=Math.floor(this.selector.parent().width()*(n/C));n=m.id!==c.id?n-l-1:n-l;C=(m.content.title+" - "+m.content.description).substr(0,55);var q=typeof m.content.color!=="undefined"?
-m.content.color:m.color,s=IriSP.DEC_HEXA_COLOR(q);if(s==="FFCC00")s="333";if(s.length==4)s+="00";this.selector.append(Mustache.to_html(IriSP.annotation_template,{divTitle:C,id:x,startPixel:l,pxWidth:n,hexa_color:s,seekPlace:Math.round(d/1E3)}));if(m.id===c.id){this.selector.find("#"+x).addClass("Ldt-lastSegment");this.selector.find(".Ldt-lastSegment").css("border-color","#"+s)}IriSP.jQuery("#"+x).fadeTo(0,0.3);IriSP.jQuery("#"+x).mouseover(function(o){return function(){IriSP.jQuery(this).animate({opacity:0.6},
-5);var v=IriSP.jQuery(this).offset(),E=IriSP.jQuery(this).outerWidth()/2;E=v.left+E-106;if(E<0)E=0;a.TooltipWidget.show(o,q,E,v.top-160)}}(C)).mouseout(function(){IriSP.jQuery(this).animate({opacity:0.3},5);a.TooltipWidget.hide()});IriSP.jQuery("#"+x).click(function(o,v){return function(){o.clickHandler(v)}}(this,m))}};IriSP.SegmentsWidget.prototype.clear=function(){this.selector.children(".Ldt-iri-chapter").animate({opacity:0.3},100)};
+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=
+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)})};
+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.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 c in a){var d=0.5+a[c]*0.2;this.selector.find("#"+c).dequeue();this.selector.find("#"+c).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,c,d){IriSP.Widget.call(this,a,c,d)};IriSP.SliceWidget.prototype=new IriSP.Widget;
+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.trigger("IriSP.SliceWidget.position",[57,24])};
+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.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,c){var d=this.leftHandle.position().left,i=this.rightHandle.position().left;if(d>=i-7&&c.position.left>=this._leftHandleOldLeft)c.position.left=this._leftHandleOldLeft;this.zoneWidth+=this.zoneLeft-(d+7);this.zoneLeft=d+7;this.sliceZone.css("width",this.zoneWidth);this.sliceZone.css("left",this.zoneLeft+"px");this.broadcastChanges();this._leftHandleOldLeft=c.position.left};
-IriSP.SliceWidget.prototype.rightHandleDragged=function(a,c){var d=this.rightHandle.position().left,i=this.leftHandle.position().left;if(d<=i+7&&c.position.left<=this._rightHandleOldLeft)c.position.left=this._rightHandleOldLeft;this.zoneWidth+=d-(this.zoneLeft+this.zoneWidth);this.sliceZone.css("width",this.zoneWidth);this.broadcastChanges();this._rightHandleOldLeft=c.position.left};
-IriSP.SliceWidget.prototype.broadcastChanges=function(){var a=this.zoneLeft/this.selector.width()*100,c=this.zoneWidth/this.selector.width()*100;this._Popcorn.trigger("IriSP.SliceWidget.zoneChange",[a,c])};IriSP.SliderWidget=function(a,c,d){IriSP.Widget.call(this,a,c,d)};IriSP.SliderWidget.prototype=new IriSP.Widget;
+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.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(c){a.backgroundClickHandler.call(a,c)});this.sliderForeground.click(function(c){a.foregroundClickHandler.call(a,c)});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",
+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(),c=this._serializer.currentMedia().meta["dc:duration"]/1E3;a=(a/c*100).toFixed(2);c=100/this.selector.width();var d=this.positionMarker.width();c=a-c*d/2;if(c<=0)c=0;this.sliderForeground.css("width",a+"%");this.positionMarker.css("left",c+"%")}};
-IriSP.SliderWidget.prototype.backgroundClickHandler=function(a){var c=this.sliderBackground.parent().offset(),d=this.sliderBackground.width();a=a.pageX-c.left;c=this._serializer.currentMedia().meta["dc:duration"]/1E3;this._Popcorn.currentTime((a/d*c).toFixed(2))};
-IriSP.SliderWidget.prototype.foregroundClickHandler=function(a){var c=this.sliderForeground.parent().offset(),d=this.sliderBackground.width();a=a.pageX-c.left;c=this._serializer.currentMedia().meta["dc:duration"]/1E3;this._Popcorn.currentTime((a/d*c).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 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.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 c=this.sliderForeground.parent().offset(),d=this.sliderBackground.width();a=a.pageX-c.left;c=this._serializer.currentMedia().meta["dc:duration"]/1E3;this._Popcorn.currentTime((a/d*c).toFixed(2));this.draggingOngoing=false};IriSP.SparklineWidget=function(a,c,d){IriSP.Widget.call(this,a,c,d);this._oldAnnotation=null};
-IriSP.SparklineWidget.prototype=new IriSP.Widget;IriSP.SparklineWidget.prototype.clear=function(){};
-IriSP.SparklineWidget.prototype.draw=function(){for(var a=Mustache.to_html(IriSP.SparklineWidget_template,{width:this.width,height:this.height}),c=this.selector.width()/10,d=+this._serializer.currentMedia().meta["dc:duration"]/c,i=[],h=0,m=0;m<c&&h<this._serializer._data.annotations.length;m++){for(var n=0,C=+this._serializer._data.annotations[h].begin;C>=m*d&&C<=(m+1)*d;){n++;h++;if(h>=this._serializer._data.annotations.length)break;C=+this._serializer._data.annotations[h].begin}i.push(n)}this.selector.append(a);
-this.selector.find(".Ldt-sparkLine").css("background","#c7c8cc");this.selector.find(".Ldt-sparkLine").sparkline(i,{lineColor:"#7492b4",fillColor:"#aeaeb8",spotColor:"#b70056",width:this.width,height:this.height});this._Popcorn.listen("timeupdate",IriSP.wrap(this,this.timeUpdateHandler));IriSP.jQuery(".Ldt-sparkLineClickOverlay").click(IriSP.wrap(this,this.clickHandler))};
-IriSP.SparklineWidget.prototype.timeUpdateHandler=function(){var a=this._Popcorn.currentTime(),c=+this._serializer.currentMedia().meta["dc:duration"]/1E3;a=(a/c*100).toFixed(4);IriSP.jQuery(".Ldt-sparkLinePositionMarker").css("width",a+"%")};
-IriSP.SparklineWidget.prototype.clickHandler=function(a){var c=this.selector.offset(),d=this.selector.width();a=a.pageX-c.left;c=this._serializer.currentMedia().meta["dc:duration"]/1E3;d=(a/d*c).toFixed(2);this._Popcorn.trigger("IriSP.SparklineWidget.clicked",d);this._Popcorn.currentTime(d)};IriSP.TooltipWidget=function(a,c,d){IriSP.Widget.call(this,a,c,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").text("")};
-IriSP.TooltipWidget.prototype.show=function(a,c,d,i){if(!(this._displayedText==a&&this._shown)){this.selector.find(".tipcolor").css("background-color",c);this._displayedText=a;this.selector.find(".tiptext").text(a);this.selector.find(".tip").css("left",d).css("top",i);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,c,d){IriSP.Widget.call(this,a,c,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 c=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 i=IriSP.templToHTML("<img src='{{src}}' alt='user image'></img>",{src:d});if(typeof a.meta["dc:source"].content!=="undefined"){var h=JSON.parse(a.meta["dc:source"].content),m=h.user.screen_name,n=h.user.name;i=IriSP.templToHTML("<a href='http://twitter.com/{{creator}}'><img src='{{src}}' alt='user image'></img></a>",
-{src:d,creator:m});d=(new Date(h.created_at)).toLocaleDateString();c=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:m,real_name:n,contents:c,date:d});this.selector.find(".Ldt-TweetReply").attr("href","http://twitter.com/home?status=@"+m+":%20");a=Mustache.to_html("http://twitter.com/home?status=RT @{{creator}}: {{text}}",
-{creator:m,text:IriSP.encodeURI(a.content.title)});this.selector.find(".Ldt-Retweet").attr("href",a)}this.selector.find(".Ldt-tweetContents").html(c);this.selector.find(".Ldt-tweetAvatar").html(i);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.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,
+{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.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",
+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})};
+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,
+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.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 c,d;for(c in this._serializer._data.annotations){d=this._serializer._data.annotations[c];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.JSONSerializer=function(a,c){IriSP.Serializer.call(this,a,c)};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 c=this;this._DataLoader.get(this._url,function(d){c._data=d;c._data.annotations.sort(function(i,h){return+i.begin-+h.begin});a(d)})};
-IriSP.JSONSerializer.prototype.currentMedia=function(){return this._data.medias[0]};
-IriSP.JSONSerializer.prototype.searchAnnotations=function(a,c,d){var i;if(typeof this._data.views!=="undefined"&&this._data.views!==null)i=this._data.views[0];var h="";if(typeof i!=="undefined"&&typeof i.annotation_types!=="undefined"&&i.annotation_types.length>1)h=i.annotation_types[0];return this.searchAnnotationsFilter(a,c,d,function(m){return h!=""&&typeof m.meta!=="undefined"&&typeof m.meta["id-ref"]!=="undefined"&&m.meta["id-ref"]!==h?true:false})};
-IriSP.JSONSerializer.prototype.searchTweets=function(a,c,d){var i;if(typeof this._data.views!=="undefined"&&this._data.views!==null)i=this._data.views[0];var h="";if(typeof i!=="undefined"&&typeof i.annotation_types!=="undefined"&&i.annotation_types.length>1)h=i.annotation_types[0];return this.searchAnnotationsFilter(a,c,d,function(m){return h!=""&&typeof m.meta!=="undefined"&&typeof m.meta["id-ref"]!=="undefined"&&m.meta["id-ref"]!==h?false:true})};
-IriSP.JSONSerializer.prototype.searchAnnotationsFilter=function(a,c,d,i){if(a=="")a=".*";if(c=="")c=".*";if(d=="")d=".*";a=RegExp(a,"i");c=RegExp(c,"i");RegExp(d,"i");d=[];var h;for(h in this._data.annotations){var m=this._data.annotations[h];i(m)||a.test(m.content.title)&&c.test(m.content.description)&&d.push(m)}return d};
-IriSP.JSONSerializer.prototype.searchOccurences=function(a){var c={};a=a.split(/\s+/);for(var d in a){var i=a[d],h=[];h=h.concat(this.searchAnnotations(i,"",""));h=h.concat(this.searchAnnotations("",i,""));for(var m in h){i=h[m];if(c.hasOwnProperty(i.id))c[i.id]+=1;else c[i.id]=1}}return c};
-IriSP.JSONSerializer.prototype.searchTweetsOccurences=function(a){var c={};a=a.split(/\s+/);for(var d in a){var i=a[d],h=[];h=h.concat(this.searchTweets(i,"",""));h=h.concat(this.searchTweets("",i,""));for(var m in h){i=h[m];if(c.hasOwnProperty(i.id))c[i.id]+=1;else c[i.id]=1}}return c};
-IriSP.JSONSerializer.prototype.currentAnnotations=function(a,c){var d=1E3*a,i=typeof c==="undefined"?this.getNonTweetIds():[c],h=[],m;for(m in this._data.annotations){var n=this._data.annotations[m];IriSP.underscore.include(i,n.meta["id-ref"])&&n.begin<=d&&n.end>=d&&h.push(n)}h==[]&&console.log("ret_array empty, ",i);return h};
-IriSP.JSONSerializer.prototype.getTweetIds=function(){if(typeof this._data.lists==="undefined"||this._data.lists===null)return[];var a=[];a=IriSP.underscore.filter(this._data.lists,function(c){return c.id.indexOf("tweet")!==-1});if(a.length===0)return[];return a=IriSP.underscore.pluck(a[0].items,"id-ref")};
-IriSP.JSONSerializer.prototype.getNonTweetIds=function(){if(typeof this._data.lists==="undefined"||this._data.lists===null)return[];var a=IriSP.underscore.flatten(IriSP.underscore.map(this._data.lists,function(d){return IriSP.underscore.pluck(d.items,"id-ref")})),c=this.getTweetIds();return IriSP.underscore.difference(a,c)};
-IriSP.JSONSerializer.prototype.getId=function(a){if(!(typeof this._data.lists==="undefined"||this._data.lists===null)){var c;c=IriSP.underscore.find(this._data["annotation-types"],function(d){return d["dc:title"].indexOf(a)!==-1});if(typeof c!=="undefined")return c.id}};IriSP.JSONSerializer.prototype.getChapitrage=function(){return this.getId("Chapitrage")};IriSP.JSONSerializer.prototype.getTweets=function(){return this.getId("Tweets")};IriSP.JSONSerializer.prototype.getContributions=function(){return this.getId("Contributions")};
\ No newline at end of file
+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.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.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)};
+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")}};
+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