implement mdplayer changes from oaubert pull request + added a script to build mdplayer from mdplayer local repo
authordurandn
Fri, 02 Oct 2015 10:24:23 +0200
changeset 170 75e3a41722ad
parent 169 0e256f85464b
child 171 b4aece5775cd
implement mdplayer changes from oaubert pull request + added a script to build mdplayer from mdplayer local repo
server/sbin/build/compil-mdp-from-sources.sh
server/src/README
server/src/remie/static/remie/js/jquery.touchsplitter.js
server/src/remie/static/remie/js/popcorn-complete.min.js
server/src/remie/static/remie/js/tracemanager.js
server/src/remie/static/remie/metadataplayer/Annotation.js
server/src/remie/static/remie/metadataplayer/AnnotationsList.css
server/src/remie/static/remie/metadataplayer/AnnotationsList.js
server/src/remie/static/remie/metadataplayer/Controller.css
server/src/remie/static/remie/metadataplayer/Controller.js
server/src/remie/static/remie/metadataplayer/CreateAnnotation.css
server/src/remie/static/remie/metadataplayer/CreateAnnotation.js
server/src/remie/static/remie/metadataplayer/CurrentSegmentInfobox.js
server/src/remie/static/remie/metadataplayer/DailymotionPlayer.js
server/src/remie/static/remie/metadataplayer/EnrichedPlan.css
server/src/remie/static/remie/metadataplayer/EnrichedPlan.js
server/src/remie/static/remie/metadataplayer/ImageDisplay.css
server/src/remie/static/remie/metadataplayer/ImageDisplay.js
server/src/remie/static/remie/metadataplayer/LatestAnnotation.js
server/src/remie/static/remie/metadataplayer/LdtPlayer-core.js
server/src/remie/static/remie/metadataplayer/Markers.js
server/src/remie/static/remie/metadataplayer/Mediafragment.js
server/src/remie/static/remie/metadataplayer/MultiSegments.js
server/src/remie/static/remie/metadataplayer/NoteTaking.css
server/src/remie/static/remie/metadataplayer/NoteTaking.js
server/src/remie/static/remie/metadataplayer/Polemic.js
server/src/remie/static/remie/metadataplayer/PopcornPlayer.js
server/src/remie/static/remie/metadataplayer/Quiz.css
server/src/remie/static/remie/metadataplayer/Quiz.js
server/src/remie/static/remie/metadataplayer/QuizCreator.css
server/src/remie/static/remie/metadataplayer/QuizCreator.js
server/src/remie/static/remie/metadataplayer/Segments.js
server/src/remie/static/remie/metadataplayer/Shortcuts.js
server/src/remie/static/remie/metadataplayer/SlidePreview.css
server/src/remie/static/remie/metadataplayer/SlidePreview.js
server/src/remie/static/remie/metadataplayer/SlideVideoPlayer.css
server/src/remie/static/remie/metadataplayer/SlideVideoPlayer.js
server/src/remie/static/remie/metadataplayer/Slider.css
server/src/remie/static/remie/metadataplayer/Slider.js
server/src/remie/static/remie/metadataplayer/Trace.js
server/src/remie/static/remie/metadataplayer/Transcript.css
server/src/remie/static/remie/metadataplayer/Transcript.js
server/src/remie/static/remie/metadataplayer/img/cancel_annotation.png
server/src/remie/static/remie/metadataplayer/img/delete.png
server/src/remie/static/remie/metadataplayer/img/edit.png
server/src/remie/static/remie/metadataplayer/img/fullscreen.svg
server/src/remie/static/remie/metadataplayer/img/left_arrow.svg
server/src/remie/static/remie/metadataplayer/img/min_right_toggle.png
server/src/remie/static/remie/metadataplayer/img/min_valid_sprites.png
server/src/remie/static/remie/metadataplayer/img/min_wrong_toggle.png
server/src/remie/static/remie/metadataplayer/img/pip_toggle.svg
server/src/remie/static/remie/metadataplayer/img/publish_annotation.png
server/src/remie/static/remie/metadataplayer/img/published_annotation.png
server/src/remie/static/remie/metadataplayer/img/quiz_add_question.svg
server/src/remie/static/remie/metadataplayer/img/quiz_off.svg
server/src/remie/static/remie/metadataplayer/img/quiz_on.svg
server/src/remie/static/remie/metadataplayer/img/right_arrow.svg
server/src/remie/static/remie/metadataplayer/img/time_edit.png
server/src/remie/static/remie/metadataplayer/img/twitter.svg
server/src/remie/static/remie/metadataplayer/img/valid_sprites.png
server/src/remie/templates/remie/iframe_segments_group.html
server/src/remie/templates/remie/iframe_segments_preview.html
server/src/remie/templates/remie/iframe_segments_single.html
server/src/remie/templates/remie/iframe_teacher.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/sbin/build/compil-mdp-from-sources.sh	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,36 @@
+
+if [ $# -eq 0 ]
+  then
+    echo "No argument was provided, looking for mdplayer_path"
+    if [ ! -f "mdplayer_path" ]
+      then
+        echo "Error: mdplayer_path file does not exist and no argument was provided"
+        exit 1
+    fi
+    MDPLAYER_PATH=$(cat mdplayer_path)
+    if [ -z MDPLAYER_PATH ]
+      then
+        echo "File is empty"
+        exit 1
+    fi
+  else
+    MDPLAYER_PATH=$1
+fi
+
+echo "Compiling Metadataplayer"
+
+sh $MDPLAYER_PATH/sbin/res/ant/bin/ant -f $MDPLAYER_PATH/sbin/build/client.xml
+
+echo "Copying to Platform :"
+
+echo "  Copying core files and widgets"
+
+cp -R $MDPLAYER_PATH/test/metadataplayer/* ../../src/remie/static/remie/metadataplayer
+
+echo "  Copying JS libs"
+
+cp -R $MDPLAYER_PATH/src/js/libs/*.js ../../src/remie/static/remie/js
+
+echo "  Copying SWF libs"
+
+cp -R $MDPLAYER_PATH/src/js/libs/*.swf ../../src/remie/static/remie/swf
--- a/server/src/README	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/README	Fri Oct 02 10:24:23 2015 +0200
@@ -9,4 +9,16 @@
 Then go to /remie/iframetester, where you have a blank page with a few fields that condition the iframe player you'll generate. You can use the local ldt platform to get the id of your test project. 
 Use the generate button to create the iframe and insert it into the page. Currently there is only the segment scenario.
 
-Note: If you want to test multiple users annotations, we don't validate currently logged user so it is entirely possible to generate a remie player for another user than the one currently logged in, and have annotation creation work for that other user.
\ No newline at end of file
+Note: If you want to test multiple users annotations, we don't validate currently logged user so it is entirely possible to generate a remie player for another user than the one currently logged in, and have annotation creation work for that other user.
+
+==============
+Building Metadataplayer
+==============
+
+Run the script in sbin/build/ folder to build the metadataplayer from the sources.
+	cd sbin/build
+	bash compil-mdp-from-sources <mdplayer_repo_path>
+	
+Alternatively you can put a "mdplayer_path" file (containing the ABSOLUTE path to the metadataplayer repository) to the sbin/build repo then call the script without argument
+	cd sbin/build
+	bash compil-mdp-from-sources
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/js/jquery.touchsplitter.js	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,444 @@
+// Generated by CoffeeScript 1.9.3
+
+/*
+ * Touch Splitter JQuery was created by Cole Lawrence(github:ZombieHippie)
+ * This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
+ * Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/.
+ */
+
+(function() {
+  var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
+
+  (function(mod) {
+    if (typeof exports === "object" && typeof module === "object") {
+      return mod(require("jquery"));
+    } else if (typeof define === "function" && define.amd) {
+      return define(["jquery"], mod);
+    } else {
+      return mod(jQuery);
+    }
+  })(function(jQuery) {
+    var $, TouchSplitter;
+    $ = jQuery;
+    $.fn.touchSplit = function(options) {
+      if (options == null) {
+        options = {};
+      }
+      if (this[0].touchSplitter != null) {
+        throw "Cannot make a splitter here! '" + this.selector + "' already has a splitter! Use $('" + this.selector + "')[0].touchSplitter.destroy(<optional side to remove>) to remove it!";
+      }
+      if (this.children().length !== 2 && this.children().length !== 0) {
+        throw "Cannot make a splitter here! Incorrect number of div children in '" + this.selector + "'";
+      }
+      return this[0].touchSplitter = new TouchSplitter(this, options);
+    };
+    return TouchSplitter = (function() {
+      function TouchSplitter(element, options) {
+        var barThick, firstdiv, inners, match, splitterHTML, testCalc, testEm, thickness, units;
+        this.element = element;
+        this.resize = bind(this.resize, this);
+        this.onResize = bind(this.onResize, this);
+        this.onResizeWindow = bind(this.onResizeWindow, this);
+        this.getSecond = bind(this.getSecond, this);
+        this.getFirst = bind(this.getFirst, this);
+        this.stopDragging = bind(this.stopDragging, this);
+        this.drag = bind(this.drag, this);
+        this.startDragging = bind(this.startDragging, this);
+        this.onTouchEnd = bind(this.onTouchEnd, this);
+        this.onTouchMove = bind(this.onTouchMove, this);
+        this.onTouchStart = bind(this.onTouchStart, this);
+        this.onMouseDown = bind(this.onMouseDown, this);
+        this.setPercentages = bind(this.setPercentages, this);
+        this.setDock = bind(this.setDock, this);
+        this.moveBar = bind(this.moveBar, this);
+        this.on = bind(this.on, this);
+        this.toggleDock = bind(this.toggleDock, this);
+        this.setRatios = bind(this.setRatios, this);
+        this.destroy = bind(this.destroy, this);
+        this.element.addClass('TouchSplitter');
+        this.support = {};
+        testEm = $('<div class="test-em"></div>');
+        testEm.appendTo(this.element);
+        barThick = testEm.width();
+        testEm.remove();
+        testCalc = $('<div class="test-calc"></div>');
+        testCalc.appendTo(this.element);
+        this.support.calc = true;
+        testCalc.remove();
+        if (options.orientation != null) {
+          if (options.orientation === "vertical") {
+            this.horizontal = false;
+          } else if (options.orientation === "horizontal") {
+
+          } else {
+            console.log("Touch Splitter ERROR: orientation cannot be:'" + options.orientation + "' defaulted to 'horizontal'");
+          }
+        }
+        if (this.horizontal !== false) {
+          this.horizontal = true;
+        }
+        this.element.addClass(this.horizontal ? "h-ts" : "v-ts");
+        this.firstMin = options.leftMin || options.topMin || options.firstMin || 0;
+        this.firstMax = options.leftMax || options.topMax || options.firstMax || false;
+        this.secondMin = options.rightMin || options.bottomMin || options.secondMin || 0;
+        this.secondMax = options.rightMax || options.bottomMax || options.secondMax || false;
+        if (this.firstMax && this.secondMax) {
+          console.log("Touch Splitter ERROR: cannot set max bounds of both first and second sections!");
+          this.secondMax = false;
+        }
+        if (options.dock != null) {
+          if (/both|left|top|first|right|bottom|second/i.test(options.dock)) {
+            this.docks = (function() {
+              switch (false) {
+                case !/both/i.test(options.dock):
+                  return {
+                    first: true,
+                    second: true,
+                    name: "both"
+                  };
+                case !/left|top|first/i.test(options.dock):
+                  return {
+                    first: true,
+                    second: false,
+                    name: "first"
+                  };
+                case !/right|bottom|second/i.test(options.dock):
+                  return {
+                    first: false,
+                    second: true,
+                    name: "second"
+                  };
+              }
+            })();
+          }
+        }
+        if (this.docks) {
+          this.element.addClass('docks-' + this.docks.name);
+        } else {
+          this.docks = {
+            first: false,
+            second: false,
+            name: false
+          };
+        }
+        if (options.thickness != null) {
+          thickness = options.thickness;
+          units = "px";
+          if (typeof thickness === 'string') {
+            if (match = thickness.match(/^([\d\.]+)([a-zA-Z]+)$/)) {
+              thickness = match[1];
+              units = match[2];
+            }
+            thickness = parseFloat(thickness);
+          }
+          if (!thickness) {
+            throw "Unable to parse given thickness: " + options.thickness;
+          } else {
+            thickness = (function() {
+              switch (units) {
+                case "px":
+                  return barThick = thickness;
+                case "em":
+                  return barThick *= thickness;
+                default:
+                  throw "Invalid unit used in given thickness: " + units;
+              }
+            })();
+          }
+        }
+        firstdiv = this.element.find(">div:first");
+        splitterHTML = "<div class=\"splitter-bar\">" + (this.docks.name && this.docks.name.match(/first|second/) ? '<div></div>' : '') + "</div>";
+        if (firstdiv.length === 0) {
+          inners = this.element.html();
+          this.element.html("<div></div> " + splitterHTML + " <div></div>");
+          this.element.find(">div:first").html(inners);
+        } else {
+          firstdiv.after(splitterHTML);
+        }
+        this.barThicknessPx = barThick / 2;
+        this.barThickness = .04;
+        this.barPosition = options.barPosition || 0.5;
+        this.dragging = false;
+        this.initMouse = 0;
+        this.initBarPosition = 0;
+        this.resize();
+        this.element.on('resize', this.onResize);
+        $(window).on('resize', this.onResizeWindow);
+        $(window).on('mouseup', this.stopDragging);
+        $(window).on('mousemove', this.drag);
+        this.element.find('>.splitter-bar').on('mousedown', this.onMouseDown);
+        this.element.find('>.splitter-bar').bind('touchstart', this.onTouchStart);
+        this.element.on('touchmove', this.onTouchMove);
+        this.element.on('touchend', this.onTouchEnd);
+        this.element.on('touchleave', this.onTouchEnd);
+        this.element.on('touchcancel', this.onTouchEnd);
+      }
+
+      TouchSplitter.prototype.destroy = function(side) {
+        var toRemove;
+        this.element.off('resize');
+        $(window).off('resize');
+        $(window).off('mouseup');
+        $(window).off('mousemove');
+        this.element.find('>.splitter-bar').off('mousedown');
+        this.element.find('>.splitter-bar').off('touchstart');
+        this.element.off('touchmove');
+        this.element.off('touchend');
+        this.element.off('touchleave');
+        this.element.off('touchcancel');
+        this.element.find('>.splitter-bar').remove();
+        this.element.removeClass('TouchSplitter h-ts v-ts docks-first docks-second docks-both');
+        if (side != null) {
+          toRemove = (function() {
+            switch (side) {
+              case 'left':
+              case 'top':
+                return '>div:first';
+              case 'right':
+              case 'bottom':
+                return '>div:last';
+              case 'both':
+                return '>div';
+            }
+          })();
+          this.element.find(toRemove).remove();
+        }
+        this.element.children().css({
+          width: "",
+          height: ""
+        });
+        return delete this.element[0].touchSplitter;
+      };
+
+      TouchSplitter.prototype.setRatios = function() {
+        var conv, ref, val;
+        this.splitDistance = this.horizontal ? this.element.width() : this.element.height();
+        ref = {
+          firstMin: this.firstMin,
+          firstMax: this.firstMax,
+          secondMin: this.secondMin,
+          secondMax: this.secondMax
+        };
+        for (conv in ref) {
+          val = ref[conv];
+          if (val) {
+            this[conv + 'Ratio'] = val / this.splitDistance;
+          }
+        }
+        return this.moveBar();
+      };
+
+      TouchSplitter.prototype.toggleDock = function() {
+        this.element.toggleClass('docked');
+        if (this.docked) {
+          return this.setDock(false);
+        } else {
+          return this.setDock(this.docks.name);
+        }
+      };
+
+      TouchSplitter.prototype.on = function(eventName, fn) {
+        return this.element.on(eventName, fn);
+      };
+
+      TouchSplitter.prototype.moveBar = function(newX) {
+        var cursorPos, cursorPos2;
+        cursorPos = this.barPosition;
+        if (newX != null) {
+          cursorPos = this.initBarPosition + (newX - this.initMouse) / this.splitDistance;
+        }
+        cursorPos2 = 1 - cursorPos;
+        if (this.docks.name) {
+          switch (this.docked) {
+            case 'first':
+              if (cursorPos > this.firstMinRatio / 2) {
+                this.setDock(false);
+              }
+              break;
+            case 'second':
+              if (cursorPos2 > this.secondMinRatio / 2) {
+                this.setDock(false);
+              }
+              break;
+            default:
+              if (this.docks.first && cursorPos < this.firstMinRatio / 2) {
+                this.setDock('first');
+              }
+              if (this.docks.second && cursorPos2 < this.secondMinRatio / 2) {
+                this.setDock('second');
+              }
+          }
+        }
+        if (!this.docked) {
+          this.barPosition = (function() {
+            switch (false) {
+              case !(this.firstMaxRatio && cursorPos > this.firstMaxRatio):
+                return this.firstMaxRatio;
+              case !(cursorPos < this.firstMinRatio):
+                return this.firstMinRatio;
+              case !(this.secondMaxRatio && cursorPos2 > this.secondMaxRatio):
+                return 1 - this.secondMaxRatio;
+              case !(cursorPos2 < this.secondMinRatio):
+                return 1 - this.secondMinRatio;
+              default:
+                return cursorPos;
+            }
+          }).call(this);
+          return this.setPercentages();
+        }
+      };
+
+      TouchSplitter.prototype.setDock = function(val, lastpos) {
+        if (lastpos == null) {
+          lastpos = this.barPosition;
+        }
+        this.docked = val;
+        this.barPosition = this.lastPosition;
+        this.lastPosition = lastpos;
+        return this.setPercentages();
+      };
+
+      TouchSplitter.prototype.setPercentages = function() {
+        var attr, first, firstCss, pos, second, secondCss, shave;
+        switch (this.docked) {
+          case 'first':
+            this.barPosition = 0;
+            break;
+          case 'second':
+            this.barPosition = 1;
+        }
+        pos = this.barPosition;
+        firstCss = secondCss = "";
+        if (!this.support.calc) {
+          if (pos < this.barThickness) {
+            pos = this.barThickness;
+          }
+          if (pos > 1 - this.barThickness) {
+            pos = 1 - this.barThickness;
+          }
+          first = pos - this.barThickness;
+          second = 1 - pos - this.barThickness;
+          firstCss = (100 * first - this.barThickness) + "%";
+          secondCss = (100 * second - this.barThickness) + "%";
+        } else {
+          shave = this.barThicknessPx;
+          if (this.docked) {
+            shave *= 2;
+          }
+          pos *= 100;
+          firstCss = "calc(" + pos + "% - " + shave + "px)";
+          secondCss = "calc(" + (100 - pos) + "% - " + shave + "px)";
+        }
+        attr = this.horizontal ? "width" : "height";
+        this.getFirst().css(attr, firstCss);
+        return this.getSecond().css(attr, secondCss);
+      };
+
+      TouchSplitter.prototype.onMouseDown = function(event) {
+        event.preventDefault();
+        this.initMouse = this.horizontal ? event.clientX : event.clientY;
+        return this.startDragging(event);
+      };
+
+      TouchSplitter.prototype.onTouchStart = function(event) {
+        var orig;
+        orig = event.originalEvent;
+        this.initMouse = this.horizontal ? orig.changedTouches[0].pageX : orig.changedTouches[0].pageY;
+        return this.startDragging(event);
+      };
+
+      TouchSplitter.prototype.onTouchMove = function(event) {
+        var orig, page;
+        if (!this.dragging) {
+          return;
+        }
+        event.preventDefault();
+        orig = event.originalEvent;
+        page = this.horizontal ? orig.changedTouches[0].pageX : orig.changedTouches[0].pageY;
+        return this.moveBar(page);
+      };
+
+      TouchSplitter.prototype.onTouchEnd = function(event) {
+        return this.stopDragging(event);
+      };
+
+      TouchSplitter.prototype.startDragging = function(event) {
+        this.initBarPosition = this.barPosition;
+        this.isToggler = !!event.target.parentNode.className.match(/\bsplitter-bar\b/);
+        this.dragging = true;
+        return this.element.trigger("dragstart");
+      };
+
+      TouchSplitter.prototype.drag = function(event) {
+        var client, whichM;
+        if (!this.dragging) {
+          return;
+        }
+        whichM = typeof event.buttons !== 'undefined' ? event.buttons : event.which;
+        if (whichM === 0) {
+          this.stopDragging();
+        }
+        client = this.horizontal ? event.clientX : event.clientY;
+        return this.moveBar(client);
+      };
+
+      TouchSplitter.prototype.stopDragging = function(event) {
+        if (this.dragging) {
+          this.dragging = false;
+          this.element.trigger("dragstop");
+          if (this.isToggler) {
+            return setTimeout((function(_this) {
+              return function() {
+                if ((_this.barPosition - _this.initBarPosition) === 0) {
+                  return _this.toggleDock();
+                }
+              };
+            })(this), 0);
+          }
+        }
+      };
+
+      TouchSplitter.prototype.getFirst = function() {
+        return this.element.find('>div:first');
+      };
+
+      TouchSplitter.prototype.getSecond = function() {
+        return this.element.find('>div:last');
+      };
+
+      TouchSplitter.prototype.onResizeWindow = function(event) {
+        return this.resize();
+      };
+
+      TouchSplitter.prototype.onResize = function(event) {
+        if (event != null) {
+          event.stopPropagation();
+          if (!$(event.target).is(this.element)) {
+            return;
+          }
+        }
+        return this.resize();
+      };
+
+      TouchSplitter.prototype.resize = function() {
+        var attr;
+        this.setRatios();
+        attr = this.horizontal ? "width" : "height";
+        if (!this.support.calc) {
+          this.barThickness = this.barThicknessPx / this.splitDistance;
+          if (this.barThickness > 1) {
+            this.barThickness = 1;
+          }
+          this.element.find('>.splitter-bar').css(attr, this.barThickness * 200 + '%');
+        } else {
+          this.barThickness = 0;
+        }
+        return this.setPercentages();
+      };
+
+      return TouchSplitter;
+
+    })();
+  });
+
+}).call(this);
--- a/server/src/remie/static/remie/js/popcorn-complete.min.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/js/popcorn-complete.min.js	Fri Oct 02 10:24:23 2015 +0200
@@ -1,160 +1,209 @@
 /*
- * popcorn.js version 1.3
+ * popcorn.js version 1.5.6
  * http://popcornjs.org
  *
  * Copyright 2011, Mozilla Foundation
  * Licensed under the MIT license
  */
 
-(function(r,f){function n(a,g){return function(){if(d.plugin.debug)return a.apply(this,arguments);try{return a.apply(this,arguments)}catch(l){d.plugin.errors.push({plugin:g,thrown:l,source:a.toString()});this.emit("pluginerror",d.plugin.errors)}}}if(f.addEventListener){var c=Array.prototype,b=Object.prototype,e=c.forEach,h=c.slice,i=b.hasOwnProperty,j=b.toString,p=r.Popcorn,m=[],o=false,q={events:{hash:{},apis:{}}},s=function(){return r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||
-r.oRequestAnimationFrame||r.msRequestAnimationFrame||function(a){r.setTimeout(a,16)}}(),d=function(a,g){return new d.p.init(a,g||null)};d.version="1.3";d.isSupported=true;d.instances=[];d.p=d.prototype={init:function(a,g){var l,k=this;if(typeof a==="function")if(f.readyState==="complete")a(f,d);else{m.push(a);if(!o){o=true;var t=function(){f.removeEventListener("DOMContentLoaded",t,false);for(var z=0,C=m.length;z<C;z++)m[z].call(f,d);m=null};f.addEventListener("DOMContentLoaded",t,false)}}else{if(typeof a===
-"string")try{l=f.querySelector(a)}catch(u){throw Error("Popcorn.js Error: Invalid media element selector: "+a);}this.media=l||a;l=this.media.nodeName&&this.media.nodeName.toLowerCase()||"video";this[l]=this.media;this.options=g||{};this.id=this.options.id||d.guid(l);if(d.byId(this.id))throw Error("Popcorn.js Error: Cannot use duplicate ID ("+this.id+")");this.isDestroyed=false;this.data={running:{cue:[]},timeUpdate:d.nop,disabled:{},events:{},hooks:{},history:[],state:{volume:this.media.volume},trackRefs:{},
-trackEvents:{byStart:[{start:-1,end:-1}],byEnd:[{start:-1,end:-1}],animating:[],startIndex:0,endIndex:0,previousUpdateTime:-1}};d.instances.push(this);var v=function(){if(k.media.currentTime<0)k.media.currentTime=0;k.media.removeEventListener("loadeddata",v,false);var z,C,E,B,w;z=k.media.duration;z=z!=z?Number.MAX_VALUE:z+1;d.addTrackEvent(k,{start:z,end:z});if(k.options.frameAnimation){k.data.timeUpdate=function(){d.timeUpdate(k,{});d.forEach(d.manifest,function(D,F){if(C=k.data.running[F]){B=C.length;
-for(var I=0;I<B;I++){E=C[I];(w=E._natives)&&w.frame&&w.frame.call(k,{},E,k.currentTime())}}});k.emit("timeupdate");!k.isDestroyed&&s(k.data.timeUpdate)};!k.isDestroyed&&s(k.data.timeUpdate)}else{k.data.timeUpdate=function(D){d.timeUpdate(k,D)};k.isDestroyed||k.media.addEventListener("timeupdate",k.data.timeUpdate,false)}};Object.defineProperty(this,"error",{get:function(){return k.media.error}});k.media.readyState>=2?v():k.media.addEventListener("loadeddata",v,false);return this}}};d.p.init.prototype=
-d.p;d.byId=function(a){for(var g=d.instances,l=g.length,k=0;k<l;k++)if(g[k].id===a)return g[k];return null};d.forEach=function(a,g,l){if(!a||!g)return{};l=l||this;var k,t;if(e&&a.forEach===e)return a.forEach(g,l);if(j.call(a)==="[object NodeList]"){k=0;for(t=a.length;k<t;k++)g.call(l,a[k],k,a);return a}for(k in a)i.call(a,k)&&g.call(l,a[k],k,a);return a};d.extend=function(a){var g=h.call(arguments,1);d.forEach(g,function(l){for(var k in l)a[k]=l[k]});return a};d.extend(d,{noConflict:function(a){if(a)r.Popcorn=
-p;return d},error:function(a){throw Error(a);},guid:function(a){d.guid.counter++;return(a?a:"")+(+new Date+d.guid.counter)},sizeOf:function(a){var g=0,l;for(l in a)g++;return g},isArray:Array.isArray||function(a){return j.call(a)==="[object Array]"},nop:function(){},position:function(a){a=a.getBoundingClientRect();var g={},l=f.documentElement,k=f.body,t,u,v;t=l.clientTop||k.clientTop||0;u=l.clientLeft||k.clientLeft||0;v=r.pageYOffset&&l.scrollTop||k.scrollTop;l=r.pageXOffset&&l.scrollLeft||k.scrollLeft;
-t=Math.ceil(a.top+v-t);u=Math.ceil(a.left+l-u);for(var z in a)g[z]=Math.round(a[z]);return d.extend({},g,{top:t,left:u})},disable:function(a,g){if(!a.data.disabled[g]){a.data.disabled[g]=true;for(var l=a.data.running[g].length-1,k;l>=0;l--){k=a.data.running[g][l];k._natives.end.call(a,null,k)}}return a},enable:function(a,g){if(a.data.disabled[g]){a.data.disabled[g]=false;for(var l=a.data.running[g].length-1,k;l>=0;l--){k=a.data.running[g][l];k._natives.start.call(a,null,k)}}return a},destroy:function(a){var g=
-a.data.events,l=a.data.trackEvents,k,t,u,v;for(t in g){k=g[t];for(u in k)delete k[u];g[t]=null}for(v in d.registryByName)d.removePlugin(a,v);l.byStart.length=0;l.byEnd.length=0;if(!a.isDestroyed){a.data.timeUpdate&&a.media.removeEventListener("timeupdate",a.data.timeUpdate,false);a.isDestroyed=true}}});d.guid.counter=1;d.extend(d.p,function(){var a={};d.forEach("load play pause currentTime playbackRate volume duration preload playbackRate autoplay loop controls muted buffered readyState seeking paused played seekable ended".split(/\s+/g),
-function(g){a[g]=function(l){var k;if(typeof this.media[g]==="function"){if(l!=null&&/play|pause/.test(g))this.media.currentTime=d.util.toSeconds(l);this.media[g]();return this}if(l!=null){k=this.media[g];this.media[g]=l;k!==l&&this.emit("attrchange",{attribute:g,previousValue:k,currentValue:l});return this}return this.media[g]}});return a}());d.forEach("enable disable".split(" "),function(a){d.p[a]=function(g){return d[a](this,g)}});d.extend(d.p,{roundTime:function(){return Math.round(this.media.currentTime)},
-exec:function(a,g,l){var k=arguments.length,t,u;try{u=d.util.toSeconds(a)}catch(v){}if(typeof u==="number")a=u;if(typeof a==="number"&&k===2){l=g;g=a;a=d.guid("cue")}else if(k===1)g=-1;else if(t=this.getTrackEvent(a)){if(typeof a==="string"&&k===2){if(typeof g==="number")l=t._natives.start;if(typeof g==="function"){l=g;g=t.start}}}else if(k>=2){if(typeof g==="string"){try{u=d.util.toSeconds(g)}catch(z){}g=u}if(typeof g==="number")l=d.nop();if(typeof g==="function"){l=g;g=-1}}d.addTrackEvent(this,
-{id:a,start:g,end:g+1,_running:false,_natives:{start:l||d.nop,end:d.nop,type:"cue"}});return this},mute:function(a){a=a==null||a===true?"muted":"unmuted";if(a==="unmuted"){this.media.muted=false;this.media.volume=this.data.state.volume}if(a==="muted"){this.data.state.volume=this.media.volume;this.media.muted=true}this.emit(a);return this},unmute:function(a){return this.mute(a==null?false:!a)},position:function(){return d.position(this.media)},toggle:function(a){return d[this.data.disabled[a]?"enable":
-"disable"](this,a)},defaults:function(a,g){if(d.isArray(a)){d.forEach(a,function(l){for(var k in l)this.defaults(k,l[k])},this);return this}if(!this.options.defaults)this.options.defaults={};this.options.defaults[a]||(this.options.defaults[a]={});d.extend(this.options.defaults[a],g);return this}});d.Events={UIEvents:"blur focus focusin focusout load resize scroll unload",MouseEvents:"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave click dblclick",Events:"loadstart progress suspend emptied stalled play pause error loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange"};
-d.Events.Natives=d.Events.UIEvents+" "+d.Events.MouseEvents+" "+d.Events.Events;q.events.apiTypes=["UIEvents","MouseEvents","Events"];(function(a,g){for(var l=q.events.apiTypes,k=a.Natives.split(/\s+/g),t=0,u=k.length;t<u;t++)g.hash[k[t]]=true;l.forEach(function(v){g.apis[v]={};for(var z=a[v].split(/\s+/g),C=z.length,E=0;E<C;E++)g.apis[v][z[E]]=true})})(d.Events,q.events);d.events={isNative:function(a){return!!q.events.hash[a]},getInterface:function(a){if(!d.events.isNative(a))return false;var g=
-q.events,l=g.apiTypes;g=g.apis;for(var k=0,t=l.length,u,v;k<t;k++){v=l[k];if(g[v][a]){u=v;break}}return u},all:d.Events.Natives.split(/\s+/g),fn:{trigger:function(a,g){var l;if(this.data.events[a]&&d.sizeOf(this.data.events[a])){if(l=d.events.getInterface(a)){l=f.createEvent(l);l.initEvent(a,true,true,r,1);this.media.dispatchEvent(l);return this}d.forEach(this.data.events[a],function(k){k.call(this,g)},this)}return this},listen:function(a,g){var l=this,k=true,t=d.events.hooks[a],u;if(!this.data.events[a]){this.data.events[a]=
-{};k=false}if(t){t.add&&t.add.call(this,{},g);if(t.bind)a=t.bind;if(t.handler){u=g;g=function(v){t.handler.call(l,v,u)}}k=true;if(!this.data.events[a]){this.data.events[a]={};k=false}}this.data.events[a][g.name||g.toString()+d.guid()]=g;!k&&d.events.all.indexOf(a)>-1&&this.media.addEventListener(a,function(v){d.forEach(l.data.events[a],function(z){typeof z==="function"&&z.call(l,v)})},false);return this},unlisten:function(a,g){if(this.data.events[a]&&this.data.events[a][g]){delete this.data.events[a][g];
-return this}this.data.events[a]=null;return this}},hooks:{canplayall:{bind:"canplaythrough",add:function(a,g){var l=false;if(this.media.readyState){g.call(this,a);l=true}this.data.hooks.canplayall={fired:l}},handler:function(a,g){if(!this.data.hooks.canplayall.fired){g.call(this,a);this.data.hooks.canplayall.fired=true}}}}};d.forEach([["trigger","emit"],["listen","on"],["unlisten","off"]],function(a){d.p[a[0]]=d.p[a[1]]=d.events.fn[a[0]]});d.addTrackEvent=function(a,g){var l,k;if(g.id)l=a.getTrackEvent(g.id);
-if(l){k=true;g=d.extend({},l,g);a.removeTrackEvent(g.id)}if(g&&g._natives&&g._natives.type&&a.options.defaults&&a.options.defaults[g._natives.type])g=d.extend({},a.options.defaults[g._natives.type],g);if(g._natives){g._id=g.id||g._id||d.guid(g._natives.type);a.data.history.push(g._id)}g.start=d.util.toSeconds(g.start,a.options.framerate);g.end=d.util.toSeconds(g.end,a.options.framerate);var t=a.data.trackEvents.byStart,u=a.data.trackEvents.byEnd,v;for(v=t.length-1;v>=0;v--)if(g.start>=t[v].start){t.splice(v+
-1,0,g);break}for(t=u.length-1;t>=0;t--)if(g.end>u[t].end){u.splice(t+1,0,g);break}if(g.end>a.media.currentTime&&g.start<=a.media.currentTime){g._running=true;a.data.running[g._natives.type].push(g);a.data.disabled[g._natives.type]||g._natives.start.call(a,null,g)}v<=a.data.trackEvents.startIndex&&g.start<=a.data.trackEvents.previousUpdateTime&&a.data.trackEvents.startIndex++;t<=a.data.trackEvents.endIndex&&g.end<a.data.trackEvents.previousUpdateTime&&a.data.trackEvents.endIndex++;this.timeUpdate(a,
-null,true);g._id&&d.addTrackEvent.ref(a,g);if(k){k=g._natives.type==="cue"?"cuechange":"trackchange";a.emit(k,{id:g.id,previousValue:{time:l.start,fn:l._natives.start},currentValue:{time:g.start,fn:g._natives.start}})}};d.addTrackEvent.ref=function(a,g){a.data.trackRefs[g._id]=g;return a};d.removeTrackEvent=function(a,g){for(var l,k,t=a.data.history.length,u=a.data.trackEvents.byStart.length,v=0,z=0,C=[],E=[],B=[],w=[];--u>-1;){l=a.data.trackEvents.byStart[v];k=a.data.trackEvents.byEnd[v];if(!l._id){C.push(l);
-E.push(k)}if(l._id){l._id!==g&&C.push(l);k._id!==g&&E.push(k);if(l._id===g){z=v;l._natives._teardown&&l._natives._teardown.call(a,l)}}v++}u=a.data.trackEvents.animating.length;v=0;if(u)for(;--u>-1;){l=a.data.trackEvents.animating[v];l._id||B.push(l);l._id&&l._id!==g&&B.push(l);v++}z<=a.data.trackEvents.startIndex&&a.data.trackEvents.startIndex--;z<=a.data.trackEvents.endIndex&&a.data.trackEvents.endIndex--;a.data.trackEvents.byStart=C;a.data.trackEvents.byEnd=E;a.data.trackEvents.animating=B;for(u=
-0;u<t;u++)a.data.history[u]!==g&&w.push(a.data.history[u]);a.data.history=w;d.removeTrackEvent.ref(a,g)};d.removeTrackEvent.ref=function(a,g){delete a.data.trackRefs[g];return a};d.getTrackEvents=function(a){var g=[];a=a.data.trackEvents.byStart;for(var l=a.length,k=0,t;k<l;k++){t=a[k];t._id&&g.push(t)}return g};d.getTrackEvents.ref=function(a){return a.data.trackRefs};d.getTrackEvent=function(a,g){return a.data.trackRefs[g]};d.getTrackEvent.ref=function(a,g){return a.data.trackRefs[g]};d.getLastTrackEventId=
-function(a){return a.data.history[a.data.history.length-1]};d.timeUpdate=function(a,g){var l=a.media.currentTime,k=a.data.trackEvents.previousUpdateTime,t=a.data.trackEvents,u=t.endIndex,v=t.startIndex,z=t.byStart.length,C=t.byEnd.length,E=d.registryByName,B,w,D;if(k<=l){for(;t.byEnd[u]&&t.byEnd[u].end<=l;){B=t.byEnd[u];w=(k=B._natives)&&k.type;if(!k||E[w]||a[w]){if(B._running===true){B._running=false;D=a.data.running[w];D.splice(D.indexOf(B),1);if(!a.data.disabled[w]){k.end.call(a,g,B);a.emit("trackend",
-d.extend({},B,{plugin:w,type:"trackend"}))}}u++}else{d.removeTrackEvent(a,B._id);return}}for(;t.byStart[v]&&t.byStart[v].start<=l;){B=t.byStart[v];w=(k=B._natives)&&k.type;if(!k||E[w]||a[w]){if(B.end>l&&B._running===false){B._running=true;a.data.running[w].push(B);if(!a.data.disabled[w]){k.start.call(a,g,B);a.emit("trackstart",d.extend({},B,{plugin:w,type:"trackstart"}))}}v++}else{d.removeTrackEvent(a,B._id);return}}}else if(k>l){for(;t.byStart[v]&&t.byStart[v].start>l;){B=t.byStart[v];w=(k=B._natives)&&
-k.type;if(!k||E[w]||a[w]){if(B._running===true){B._running=false;D=a.data.running[w];D.splice(D.indexOf(B),1);if(!a.data.disabled[w]){k.end.call(a,g,B);a.emit("trackend",d.extend({},B,{plugin:w,type:"trackend"}))}}v--}else{d.removeTrackEvent(a,B._id);return}}for(;t.byEnd[u]&&t.byEnd[u].end>l;){B=t.byEnd[u];w=(k=B._natives)&&k.type;if(!k||E[w]||a[w]){if(B.start<=l&&B._running===false){B._running=true;a.data.running[w].push(B);if(!a.data.disabled[w]){k.start.call(a,g,B);a.emit("trackstart",d.extend({},
-B,{plugin:w,type:"trackstart"}))}}u--}else{d.removeTrackEvent(a,B._id);return}}}t.endIndex=u;t.startIndex=v;t.previousUpdateTime=l;t.byStart.length<z&&t.startIndex--;t.byEnd.length<C&&t.endIndex--};d.extend(d.p,{getTrackEvents:function(){return d.getTrackEvents.call(null,this)},getTrackEvent:function(a){return d.getTrackEvent.call(null,this,a)},getLastTrackEventId:function(){return d.getLastTrackEventId.call(null,this)},removeTrackEvent:function(a){d.removeTrackEvent.call(null,this,a);return this},
-removePlugin:function(a){d.removePlugin.call(null,this,a);return this},timeUpdate:function(a){d.timeUpdate.call(null,this,a);return this},destroy:function(){d.destroy.call(null,this);return this}});d.manifest={};d.registry=[];d.registryByName={};d.plugin=function(a,g,l){if(d.protect.natives.indexOf(a.toLowerCase())>=0)d.error("'"+a+"' is a protected function name");else{var k=["start","end"],t={},u=typeof g==="function",v=["_setup","_teardown","start","end","frame"],z=function(B,w){B=B||d.nop;w=w||
-d.nop;return function(){B.apply(this,arguments);w.apply(this,arguments)}};d.manifest[a]=l=l||g.manifest||{};v.forEach(function(B){g[B]=n(g[B]||d.nop,a)});var C=function(B,w){if(!w)return this;if(w.ranges&&d.isArray(w.ranges)){d.forEach(w.ranges,function(G){G=d.extend({},w,G);delete G.ranges;this[a](G)},this);return this}var D=w._natives={},F="",I;d.extend(D,B);w._natives.type=a;w._running=false;D.start=D.start||D["in"];D.end=D.end||D.out;if(w.once)D.end=z(D.end,function(){this.removeTrackEvent(w._id)});
-D._teardown=z(function(){var G=h.call(arguments),H=this.data.running[D.type];G.unshift(null);G[1]._running&&H.splice(H.indexOf(w),1)&&D.end.apply(this,G)},D._teardown);w.compose=w.compose&&w.compose.split(" ")||[];w.effect=w.effect&&w.effect.split(" ")||[];w.compose=w.compose.concat(w.effect);w.compose.forEach(function(G){F=d.compositions[G]||{};v.forEach(function(H){D[H]=z(D[H],F[H])})});w._natives.manifest=l;if(!("start"in w))w.start=w["in"]||0;if(!w.end&&w.end!==0)w.end=w.out||Number.MAX_VALUE;
-if(!i.call(w,"toString"))w.toString=function(){var G=["start: "+w.start,"end: "+w.end,"id: "+(w.id||w._id)];w.target!=null&&G.push("target: "+w.target);return a+" ( "+G.join(", ")+" )"};if(!w.target){I="options"in l&&l.options;w.target=I&&"target"in I&&I.target}if(w._natives)w._id=d.guid(w._natives.type);w._natives._setup&&w._natives._setup.call(this,w);d.addTrackEvent(this,w);d.forEach(B,function(G,H){H!=="type"&&k.indexOf(H)===-1&&this.on(H,G)},this);return this};d.p[a]=t[a]=function(B,w){var D;
-if(B&&!w)w=B;else if(D=this.getTrackEvent(B)){w=d.extend({},D,w);d.addTrackEvent(this,w);return this}else w.id=B;this.data.running[a]=this.data.running[a]||[];D=d.extend({},this.options.defaults&&this.options.defaults[a]||{},w);return C.call(this,u?g.call(this,D):g,D)};l&&d.extend(g,{manifest:l});var E={fn:t[a],definition:g,base:g,parents:[],name:a};d.registry.push(d.extend(t,E,{type:a}));d.registryByName[a]=E;return t}};d.plugin.errors=[];d.plugin.debug=d.version==="1.3";d.removePlugin=function(a,
-g){if(!g){g=a;a=d.p;if(d.protect.natives.indexOf(g.toLowerCase())>=0){d.error("'"+g+"' is a protected function name");return}var l=d.registry.length,k;for(k=0;k<l;k++)if(d.registry[k].name===g){d.registry.splice(k,1);delete d.registryByName[g];delete d.manifest[g];delete a[g];return}}l=a.data.trackEvents.byStart;k=a.data.trackEvents.byEnd;var t=a.data.trackEvents.animating,u,v;u=0;for(v=l.length;u<v;u++){if(l[u]&&l[u]._natives&&l[u]._natives.type===g){l[u]._natives._teardown&&l[u]._natives._teardown.call(a,
-l[u]);l.splice(u,1);u--;v--;if(a.data.trackEvents.startIndex<=u){a.data.trackEvents.startIndex--;a.data.trackEvents.endIndex--}}k[u]&&k[u]._natives&&k[u]._natives.type===g&&k.splice(u,1)}u=0;for(v=t.length;u<v;u++)if(t[u]&&t[u]._natives&&t[u]._natives.type===g){t.splice(u,1);u--;v--}};d.compositions={};d.compose=function(a,g,l){d.manifest[a]=l||g.manifest||{};d.compositions[a]=g};d.plugin.effect=d.effect=d.compose;var A=/^(?:\.|#|\[)/;d.dom={debug:false,find:function(a,g){var l=null;a=a.trim();g=
-g||f;if(a){if(!A.test(a)){l=f.getElementById(a);if(l!==null)return l}try{l=g.querySelector(a)}catch(k){if(d.dom.debug)throw Error(k);}}return l}};var y=/\?/,x={url:"",data:"",dataType:"",success:d.nop,type:"GET",async:true,xhr:function(){return new r.XMLHttpRequest}};d.xhr=function(a){a.dataType=a.dataType&&a.dataType.toLowerCase()||null;if(a.dataType&&(a.dataType==="jsonp"||a.dataType==="script"))d.xhr.getJSONP(a.url,a.success,a.dataType==="script");else{a=d.extend({},x,a);a.ajax=a.xhr();if(a.ajax){if(a.type===
-"GET"&&a.data){a.url+=(y.test(a.url)?"&":"?")+a.data;a.data=null}a.ajax.open(a.type,a.url,a.async);a.ajax.send(a.data||null);return d.xhr.httpData(a)}}};d.xhr.httpData=function(a){var g,l=null,k,t=null;a.ajax.onreadystatechange=function(){if(a.ajax.readyState===4){try{l=JSON.parse(a.ajax.responseText)}catch(u){}g={xml:a.ajax.responseXML,text:a.ajax.responseText,json:l};if(!g.xml||!g.xml.documentElement){g.xml=null;try{k=new DOMParser;t=k.parseFromString(a.ajax.responseText,"text/xml");if(!t.getElementsByTagName("parsererror").length)g.xml=
-t}catch(v){}}if(a.dataType)g=g[a.dataType];a.success.call(a.ajax,g)}};return g};d.xhr.getJSONP=function(a,g,l){var k=f.head||f.getElementsByTagName("head")[0]||f.documentElement,t=f.createElement("script"),u=false,v=[];v=/(=)\?(?=&|$)|\?\?/;var z,C;if(!l){C=a.match(/(callback=[^&]*)/);if(C!==null&&C.length){v=C[1].split("=")[1];if(v==="?")v="jsonp";z=d.guid(v);a=a.replace(/(callback=[^&]*)/,"callback="+z)}else{z=d.guid("jsonp");if(v.test(a))a=a.replace(v,"$1"+z);v=a.split(/\?(.+)?/);a=v[0]+"?";if(v[1])a+=
-v[1]+"&";a+="callback="+z}window[z]=function(E){g&&g(E);u=true}}t.addEventListener("load",function(){l&&g&&g();u&&delete window[z];k.removeChild(t)},false);t.src=a;k.insertBefore(t,k.firstChild)};d.getJSONP=d.xhr.getJSONP;d.getScript=d.xhr.getScript=function(a,g){return d.xhr.getJSONP(a,g,true)};d.util={toSeconds:function(a,g){var l=/^([0-9]+:){0,2}[0-9]+([.;][0-9]+)?$/,k,t,u;if(typeof a==="number")return a;typeof a==="string"&&!l.test(a)&&d.error("Invalid time format");l=a.split(":");k=l.length-
-1;t=l[k];if(t.indexOf(";")>-1){t=t.split(";");u=0;if(g&&typeof g==="number")u=parseFloat(t[1],10)/g;l[k]=parseInt(t[0],10)+u}k=l[0];return{1:parseFloat(k,10),2:parseInt(k,10)*60+parseFloat(l[1],10),3:parseInt(k,10)*3600+parseInt(l[1],10)*60+parseFloat(l[2],10)}[l.length||1]}};d.p.cue=d.p.exec;d.protect={natives:function(a){return Object.keys?Object.keys(a):function(g){var l,k=[];for(l in g)i.call(g,l)&&k.push(l);return k}(a)}(d.p).map(function(a){return a.toLowerCase()})};d.forEach({listen:"on",unlisten:"off",
-trigger:"emit",exec:"cue"},function(a,g){var l=d.p[g];d.p[g]=function(){if(typeof console!=="undefined"&&console.warn){console.warn("Deprecated method '"+g+"', "+(a==null?"do not use.":"use '"+a+"' instead."));d.p[g]=l}return d.p[a].apply(this,[].slice.call(arguments))}});r.Popcorn=d}else{r.Popcorn={isSupported:false};for(c="byId forEach extend effects error guid sizeOf isArray nop position disable enable destroyaddTrackEvent removeTrackEvent getTrackEvents getTrackEvent getLastTrackEventId timeUpdate plugin removePlugin compose effect xhr getJSONP getScript".split(/\s+/);c.length;)r.Popcorn[c.shift()]=
-function(){}}})(window,window.document);(function(r,f){var n=r.document,c=r.location,b=/:\/\//,e=c.href.replace(c.href.split("/").slice(-1)[0],""),h=function(j,p,m){j=j||0;p=(p||j||0)+1;m=m||1;p=Math.ceil((p-j)/m)||0;var o=0,q=[];for(q.length=p;o<p;){q[o++]=j;j+=m}return q};f.sequence=function(j,p){return new f.sequence.init(j,p)};f.sequence.init=function(j,p){this.parent=n.getElementById(j);this.seqId=f.guid("__sequenced");this.queue=[];this.playlist=[];this.inOuts={ofVideos:[],ofClips:[]};this.dims={width:0,height:0};this.active=0;this.playing=
-this.cycling=false;this.times={last:0};this.events={};var m=this,o=0;f.forEach(p,function(q,s){var d=n.createElement("video");d.preload="auto";d.controls=true;d.style.display=s&&"none"||"";d.id=m.seqId+"-"+s;m.queue.push(d);var A=q["in"],y=q.out;m.inOuts.ofVideos.push({"in":A!==undefined&&A||1,out:y!==undefined&&y||0});m.inOuts.ofVideos[s].out=m.inOuts.ofVideos[s].out||m.inOuts.ofVideos[s]["in"]+2;d.src=!b.test(q.src)?e+q.src:q.src;d.setAttribute("data-sequence-owner",j);d.setAttribute("data-sequence-guid",
-m.seqId);d.setAttribute("data-sequence-id",s);d.setAttribute("data-sequence-clip",[m.inOuts.ofVideos[s]["in"],m.inOuts.ofVideos[s].out].join(":"));m.parent.appendChild(d);m.playlist.push(f("#"+d.id))});m.inOuts.ofVideos.forEach(function(q){q={"in":o,out:o+(q.out-q["in"])};m.inOuts.ofClips.push(q);o=q.out+1});f.forEach(this.queue,function(q,s){function d(){if(!s){m.dims.width=q.videoWidth;m.dims.height=q.videoHeight}q.currentTime=m.inOuts.ofVideos[s]["in"]-0.5;q.removeEventListener("canplaythrough",
-d,false);return true}q.addEventListener("canplaythrough",d,false);q.addEventListener("play",function(){m.playing=true},false);q.addEventListener("pause",function(){m.playing=false},false);q.addEventListener("timeupdate",function(A){A=A.srcElement||A.target;A=+(A.dataset&&A.dataset.sequenceId||A.getAttribute("data-sequence-id"));var y=Math.floor(q.currentTime);if(m.times.last!==y&&A===m.active){m.times.last=y;y===m.inOuts.ofVideos[A].out&&f.sequence.cycle.call(m,A)}},false)});return this};f.sequence.init.prototype=
-f.sequence.prototype;f.sequence.cycle=function(j){this.queue||f.error("Popcorn.sequence.cycle is not a public method");var p=this.queue,m=this.inOuts.ofVideos,o=p[j],q=0,s;if(p[j+1])q=j+1;if(p[j+1]){p=p[q];m=m[q];f.extend(p,{width:this.dims.width,height:this.dims.height});s=this.playlist[q];o.pause();this.active=q;this.times.last=m["in"]-1;s.currentTime(m["in"]);s[q?"play":"pause"]();this.trigger("cycle",{position:{previous:j,current:q}});if(q){o.style.display="none";p.style.display=""}this.cycling=
-false}else this.playlist[j].pause();return this};var i=["timeupdate","play","pause"];f.extend(f.sequence.prototype,{eq:function(j){return this.playlist[j]},remove:function(){this.parent.innerHTML=null},clip:function(j){return this.inOuts.ofVideos[j]},duration:function(){for(var j=0,p=this.inOuts.ofClips,m=0;m<p.length;m++)j+=p[m].out-p[m]["in"]+1;return j-1},play:function(){this.playlist[this.active].play();return this},exec:function(j,p){var m=this.active;this.inOuts.ofClips.forEach(function(o,q){if(j>=
-o["in"]&&j<=o.out)m=q});j+=this.inOuts.ofVideos[m]["in"]-this.inOuts.ofClips[m]["in"];f.addTrackEvent(this.playlist[m],{start:j-1,end:j,_running:false,_natives:{start:p||f.nop,end:f.nop,type:"exec"}});return this},listen:function(j,p){var m=this,o=this.playlist,q=o.length,s=0;if(!p)p=f.nop;if(f.Events.Natives.indexOf(j)>-1)f.forEach(o,function(d){d.listen(j,function(A){A.active=m;if(i.indexOf(j)>-1)p.call(d,A);else++s===q&&p.call(d,A)})});else{this.events[j]||(this.events[j]={});o=p.name||f.guid("__"+
-j);this.events[j][o]=p}return this},unlisten:function(){},trigger:function(j,p){var m=this;if(!(f.Events.Natives.indexOf(j)>-1)){this.events[j]&&f.forEach(this.events[j],function(o){o.call(m,{type:j},p)});return this}}});f.forEach(f.manifest,function(j,p){f.sequence.prototype[p]=function(m){var o={},q=[],s,d,A,y,x;for(s=0;s<this.inOuts.ofClips.length;s++){q=this.inOuts.ofClips[s];d=h(q["in"],q.out);A=d.indexOf(m.start);y=d.indexOf(m.end);if(A>-1)o[s]=f.extend({},q,{start:d[A],clipIdx:A});if(y>-1)o[s]=
-f.extend({},q,{end:d[y],clipIdx:y})}s=Object.keys(o).map(function(g){return+g});q=h(s[0],s[1]);for(s=0;s<q.length;s++){A={};y=q[s];var a=o[y];if(a){x=this.inOuts.ofVideos[y];d=a.clipIdx;x=h(x["in"],x.out);if(a.start){A.start=x[d];A.end=x[x.length-1]}if(a.end){A.start=x[0];A.end=x[d]}}else{A.start=this.inOuts.ofVideos[y]["in"];A.end=this.inOuts.ofVideos[y].out}this.playlist[y][p](f.extend({},m,A))}return this}})})(this,Popcorn);(function(r){document.addEventListener("DOMContentLoaded",function(){var f=document.querySelectorAll("[data-timeline-sources]");r.forEach(f,function(n,c){var b=f[c],e,h,i;if(!b.id)b.id=r.guid("__popcorn");if(b.nodeType&&b.nodeType===1){i=r("#"+b.id);e=(b.getAttribute("data-timeline-sources")||"").split(",");e[0]&&r.forEach(e,function(j){h=j.split("!");if(h.length===1){h=j.match(/(.*)[\/\\]([^\/\\]+\.\w+)$/)[2].split(".");h[0]="parse"+h[1].toUpperCase();h[1]=j}e[0]&&i[h[0]]&&i[h[0]](h[1])});i.autoplay()&&
-i.play()}})},false)})(Popcorn);(function(r,f){function n(e){e=typeof e==="string"?e:[e.language,e.region].join("-");var h=e.split("-");return{iso6391:e,language:h[0]||"",region:h[1]||""}}var c=r.navigator,b=n(c.userLanguage||c.language);f.locale={get:function(){return b},set:function(e){b=n(e);f.locale.broadcast();return b},broadcast:function(e){var h=f.instances,i=h.length,j=0,p;for(e=e||"locale:changed";j<i;j++){p=h[j];e in p.data.events&&p.trigger(e)}}}})(this,this.Popcorn);(function(r){var f=Object.prototype.hasOwnProperty;r.parsers={};r.parser=function(n,c,b){if(r.protect.natives.indexOf(n.toLowerCase())>=0)r.error("'"+n+"' is a protected function name");else{if(typeof c==="function"&&!b){b=c;c=""}if(!(typeof b!=="function"||typeof c!=="string")){var e={};e[n]=function(h,i){if(!h)return this;var j=this;r.xhr({url:h,dataType:c,success:function(p){var m,o,q=0;p=b(p).data||[];if(m=p.length){for(;q<m;q++){o=p[q];for(var s in o)f.call(o,s)&&j[s]&&j[s](o[s])}i&&i()}}});
-return this};r.extend(r.p,e);return e}}}})(Popcorn);(function(r){var f=function(b,e){b=b||r.nop;e=e||r.nop;return function(){b.apply(this,arguments);e.apply(this,arguments)}},n=/^.*\.(ogg|oga|aac|mp3|wav)($|\?)/,c=/^.*\.(ogg|oga|aac|mp3|wav|ogg|ogv|mp4|webm)($|\?)/;r.player=function(b,e){if(!r[b]){e=e||{};var h=function(i,j,p){p=p||{};var m=new Date/1E3,o=m,q=0,s=0,d=1,A=false,y={},x=typeof i==="string"?r.dom.find(i):i,a={};Object.prototype.__defineGetter__||(a=x||document.createElement("div"));for(var g in x)if(!(g in a))if(typeof x[g]==="object")a[g]=
-x[g];else if(typeof x[g]==="function")a[g]=function(k){return"length"in x[k]&&!x[k].call?x[k]:function(){return x[k].apply(x,arguments)}}(g);else r.player.defineProperty(a,g,{get:function(k){return function(){return x[k]}}(g),set:r.nop,configurable:true});var l=function(){m=new Date/1E3;if(!a.paused){a.currentTime+=m-o;a.dispatchEvent("timeupdate");setTimeout(l,10)}o=m};a.play=function(){this.paused=false;if(a.readyState>=4){o=new Date/1E3;a.dispatchEvent("play");l()}};a.pause=function(){this.paused=
-true;a.dispatchEvent("pause")};r.player.defineProperty(a,"currentTime",{get:function(){return q},set:function(k){q=+k;a.dispatchEvent("timeupdate");return q},configurable:true});r.player.defineProperty(a,"volume",{get:function(){return d},set:function(k){d=+k;a.dispatchEvent("volumechange");return d},configurable:true});r.player.defineProperty(a,"muted",{get:function(){return A},set:function(k){A=+k;a.dispatchEvent("volumechange");return A},configurable:true});r.player.defineProperty(a,"readyState",
-{get:function(){return s},set:function(k){return s=k},configurable:true});a.addEventListener=function(k,t){y[k]||(y[k]=[]);y[k].push(t);return t};a.removeEventListener=function(k,t){var u,v=y[k];if(v){for(u=y[k].length-1;u>=0;u--)t===v[u]&&v.splice(u,1);return t}};a.dispatchEvent=function(k){var t,u=k.type;if(!u){u=k;if(k=r.events.getInterface(u)){t=document.createEvent(k);t.initEvent(u,true,true,window,1)}}if(y[u])for(k=y[u].length-1;k>=0;k--)y[u][k].call(this,t,this)};a.src=j||"";a.duration=0;a.paused=
-true;a.ended=0;p&&p.events&&r.forEach(p.events,function(k,t){a.addEventListener(t,k,false)});if(e._canPlayType(x.nodeName,j)!==false)if(e._setup)e._setup.call(a,p);else{a.readyState=4;a.dispatchEvent("loadedmetadata");a.dispatchEvent("loadeddata");a.dispatchEvent("canplaythrough")}else setTimeout(function(){a.dispatchEvent("error")},0);i=new r.p.init(a,p);if(e._teardown)i.destroy=f(i.destroy,function(){e._teardown.call(a,p)});return i};h.canPlayType=e._canPlayType=e._canPlayType||r.nop;r[b]=r.player.registry[b]=
-h}};r.player.registry={};r.player.defineProperty=Object.defineProperty||function(b,e,h){b.__defineGetter__(e,h.get||r.nop);b.__defineSetter__(e,h.set||r.nop)};r.player.playerQueue=function(){var b=[],e=false;return{next:function(){e=false;b.shift();b[0]&&b[0]()},add:function(h){b.push(function(){e=true;h&&h()});!e&&b[0]()}}};r.smart=function(b,e,h){var i=["AUDIO","VIDEO"],j,p=r.dom.find(b),m;j=document.createElement("video");var o={ogg:"video/ogg",ogv:"video/ogg",oga:"audio/ogg",webm:"video/webm",
-mp4:"video/mp4",mp3:"audio/mp3"};if(p){if(i.indexOf(p.nodeName)>-1&&!e){if(typeof e==="object")h=e;return r(p,h)}if(typeof e==="string")e=[e];b=0;for(srcLength=e.length;b<srcLength;b++){m=c.exec(e[b]);m=!m||!m[1]?false:j.canPlayType(o[m[1]]);if(m){e=e[b];break}for(var q in r.player.registry)if(r.player.registry.hasOwnProperty(q))if(r.player.registry[q].canPlayType(p.nodeName,e[b]))return r[q](p,e[b],h)}if(i.indexOf(p.nodeName)===-1){j=typeof e==="string"?e:e.length?e[0]:e;b=document.createElement(n.exec(j)?
-i[0]:i[1]);b.controls=true;p.appendChild(b);p=b}h&&h.events&&h.events.error&&p.addEventListener("error",h.events.error,false);p.src=e;return r(p,h)}else r.error("Specified target "+b+" was not found.")}})(Popcorn);(function(r){var f=function(n,c){var b=0,e=0,h;r.forEach(c.classes,function(i,j){h=[];if(i==="parent")h[0]=document.querySelectorAll("#"+c.target)[0].parentNode;else h=document.querySelectorAll("#"+c.target+" "+i);b=0;for(e=h.length;b<e;b++)h[b].classList.toggle(j)})};r.compose("applyclass",{manifest:{about:{name:"Popcorn applyclass Effect",version:"0.1",author:"@scottdowne",website:"scottdowne.wordpress.com"},options:{}},_setup:function(n){n.classes={};n.applyclass=n.applyclass||"";for(var c=n.applyclass.replace(/\s/g,
-"").split(","),b=[],e=0,h=c.length;e<h;e++){b=c[e].split(":");if(b[0])n.classes[b[0]]=b[1]||""}},start:f,end:f})})(Popcorn);(function(r){var f=/(?:http:\/\/www\.|http:\/\/|www\.|\.|^)(youtu|vimeo|soundcloud|baseplayer)/,n={},c={vimeo:false,youtube:false,soundcloud:false,module:false};Object.defineProperty(n,void 0,{get:function(){return c[void 0]},set:function(b){c[void 0]=b}});r.plugin("mediaspawner",{manifest:{about:{name:"Popcorn Media Spawner Plugin",version:"0.1",author:"Matthew Schranz, @mjschranz",website:"mschranz.wordpress.com"},options:{source:{elem:"input",type:"text",label:"Media Source","default":"http://www.youtube.com/watch?v=CXDstfD9eJ0"},
-caption:{elem:"input",type:"text",label:"Media Caption","default":"Popcorn Popping",optional:true},target:"mediaspawner-container",start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},autoplay:{elem:"input",type:"checkbox",label:"Autoplay Video",optional:true},width:{elem:"input",type:"number",label:"Media Width","default":400,units:"px",optional:true},height:{elem:"input",type:"number",label:"Media Height","default":200,units:"px",optional:true}}},_setup:function(b){function e(){function o(){if(j!==
-"HTML5"&&!window.Popcorn[j])setTimeout(function(){o()},300);else{b.id=b._container.id;b._container.style.width=b.width+"px";b._container.style.height=b.height+"px";b.popcorn=r.smart("#"+b.id,b.source);j==="HTML5"&&b.popcorn.controls(true);b._container.style.width="0px";b._container.style.height="0px";b._container.style.visibility="hidden";b._container.style.overflow="hidden"}}if(j!=="HTML5"&&!window.Popcorn[j]&&!n[j]){n[j]=true;r.getScript("http://popcornjs.org/code/players/"+j+"/popcorn."+j+".js",
-function(){o()})}else o()}function h(){window.Popcorn.player?e():setTimeout(function(){h()},300)}var i=document.getElementById(b.target)||{},j,p,m;if(p=f.exec(b.source)){j=p[1];if(j==="youtu")j="youtube"}else j="HTML5";b._type=j;b._container=document.createElement("div");p=b._container;p.id="mediaSpawnerdiv-"+r.guid();b.width=b.width||400;b.height=b.height||200;if(b.caption){m=document.createElement("div");m.innerHTML=b.caption;m.style.display="none";b._capCont=m;p.appendChild(m)}i&&i.appendChild(p);
-if(!window.Popcorn.player&&!n.module){n.module=true;r.getScript("http://popcornjs.org/code/modules/player/popcorn.player.js",h)}else h()},start:function(b,e){if(e._capCont)e._capCont.style.display="";e._container.style.width=e.width+"px";e._container.style.height=e.height+"px";e._container.style.visibility="visible";e._container.style.overflow="visible";e.autoplay&&e.popcorn.play()},end:function(b,e){if(e._capCont)e._capCont.style.display="none";e._container.style.width="0px";e._container.style.height=
-"0px";e._container.style.visibility="hidden";e._container.style.overflow="hidden";e.popcorn.pause()},_teardown:function(b){b.popcorn&&b.popcorn.destory&&b.popcorn.destroy();document.getElementById(b.target)&&document.getElementById(b.target).removeChild(b._container)}})})(Popcorn,this);(function(r){r.plugin("code",function(f){var n=false,c=this,b=function(){var e=function(h){return function(i,j){var p=function(){n&&i.call(c,j);n&&h(p)};p()}};return window.webkitRequestAnimationFrame?e(window.webkitRequestAnimationFrame):window.mozRequestAnimationFrame?e(window.mozRequestAnimationFrame):e(function(h){window.setTimeout(h,16)})}();if(!f.onStart||typeof f.onStart!=="function")f.onStart=r.nop;if(f.onEnd&&typeof f.onEnd!=="function")f.onEnd=undefined;if(f.onFrame&&typeof f.onFrame!==
-"function")f.onFrame=undefined;return{start:function(e,h){h.onStart.call(c,h);if(h.onFrame){n=true;b(h.onFrame,h)}},end:function(e,h){if(h.onFrame)n=false;h.onEnd&&h.onEnd.call(c,h)}}},{about:{name:"Popcorn Code Plugin",version:"0.1",author:"David Humphrey (@humphd)",website:"http://vocamus.net/dave"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},onStart:{elem:"input",type:"function",label:"onStart"},onFrame:{elem:"input",type:"function",label:"onFrame",
-optional:true},onEnd:{elem:"input",type:"function",label:"onEnd"}}})})(Popcorn);(function(r){var f=0;r.plugin("flickr",function(n){var c,b=document.getElementById(n.target),e,h,i,j,p=n.numberofimages||4,m=n.height||"50px",o=n.width||"50px",q=n.padding||"5px",s=n.border||"0px";c=document.createElement("div");c.id="flickr"+f;c.style.width="100%";c.style.height="100%";c.style.display="none";f++;b&&b.appendChild(c);var d=function(){if(e)setTimeout(function(){d()},5);else{h="http://api.flickr.com/services/rest/?method=flickr.people.findByUsername&";h+="username="+n.username+"&api_key="+
-n.apikey+"&format=json&jsoncallback=flickr";r.getJSONP(h,function(y){e=y.user.nsid;A()})}},A=function(){h="http://api.flickr.com/services/feeds/photos_public.gne?";if(e)h+="id="+e+"&";if(n.tags)h+="tags="+n.tags+"&";h+="lang=en-us&format=json&jsoncallback=flickr";r.xhr.getJSONP(h,function(y){var x=document.createElement("div");x.innerHTML="<p style='padding:"+q+";'>"+y.title+"<p/>";r.forEach(y.items,function(a,g){if(g<p){i=document.createElement("a");i.setAttribute("href",a.link);i.setAttribute("target",
-"_blank");j=document.createElement("img");j.setAttribute("src",a.media.m);j.setAttribute("height",m);j.setAttribute("width",o);j.setAttribute("style","border:"+s+";padding:"+q);i.appendChild(j);x.appendChild(i)}else return false});c.appendChild(x)})};if(n.username&&n.apikey)d();else{e=n.userid;A()}return{start:function(){c.style.display="inline"},end:function(){c.style.display="none"},_teardown:function(y){document.getElementById(y.target)&&document.getElementById(y.target).removeChild(c)}}},{about:{name:"Popcorn Flickr Plugin",
-version:"0.2",author:"Scott Downe, Steven Weerdenburg, Annasob",website:"http://scottdowne.wordpress.com/"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},userid:{elem:"input",type:"text",label:"User ID",optional:true},tags:{elem:"input",type:"text",label:"Tags"},username:{elem:"input",type:"text",label:"Username",optional:true},apikey:{elem:"input",type:"text",label:"API Key",optional:true},target:"flickr-container",height:{elem:"input",type:"text",
-label:"Height","default":"50px",optional:true},width:{elem:"input",type:"text",label:"Width","default":"50px",optional:true},padding:{elem:"input",type:"text",label:"Padding",optional:true},border:{elem:"input",type:"text",label:"Border","default":"5px",optional:true},numberofimages:{elem:"input",type:"number","default":4,label:"Number of Images"}}})})(Popcorn);(function(r){r.plugin("footnote",{manifest:{about:{name:"Popcorn Footnote Plugin",version:"0.2",author:"@annasob, @rwaldron",website:"annasob.wordpress.com"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},text:{elem:"input",type:"text",label:"Text"},target:"footnote-container"}},_setup:function(f){var n=r.dom.find(f.target);f._container=document.createElement("div");f._container.style.display="none";f._container.innerHTML=f.text;n.appendChild(f._container)},
-start:function(f,n){n._container.style.display="inline"},end:function(f,n){n._container.style.display="none"},_teardown:function(f){var n=r.dom.find(f.target);n&&n.removeChild(f._container)}})})(Popcorn);(function(r){function f(b){return String(b).replace(/&(?!\w+;)|[<>"']/g,function(e){return c[e]||e})}function n(b,e){var h=b.container=document.createElement("div"),i=h.style,j=b.media,p=function(){var m=b.position();i.fontSize="18px";i.width=j.offsetWidth+"px";i.top=m.top+j.offsetHeight-h.offsetHeight-40+"px";i.left=m.left+"px";setTimeout(p,10)};h.id=e||"";i.position="absolute";i.color="white";i.textShadow="black 2px 2px 6px";i.fontWeight="bold";i.textAlign="center";p();b.media.parentNode.appendChild(h);
-return h}var c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};r.plugin("text",{manifest:{about:{name:"Popcorn Text Plugin",version:"0.1",author:"@humphd"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},text:{elem:"input",type:"text",label:"Text","default":"Popcorn.js"},escape:{elem:"input",type:"checkbox",label:"Escape"},multiline:{elem:"input",type:"checkbox",label:"Multiline"}}},_setup:function(b){var e,h,i=b._container=document.createElement("div");
-i.style.display="none";if(b.target)if(e=r.dom.find(b.target)){if(["VIDEO","AUDIO"].indexOf(e.nodeName)>-1)e=n(this,b.target+"-overlay")}else e=n(this,b.target);else e=this.container?this.container:n(this);b._target=e;h=b.escape?f(b.text):b.text;h=b.multiline?h.replace(/\r?\n/gm,"<br>"):h;i.innerHTML=h||"";e.appendChild(i)},start:function(b,e){e._container.style.display="inline"},end:function(b,e){e._container.style.display="none"},_teardown:function(b){var e=b._target;e&&e.removeChild(b._container)}})})(Popcorn);var googleCallback;
-(function(r){function f(i,j,p){i=i.type?i.type.toUpperCase():"HYBRID";var m;if(i==="STAMEN-WATERCOLOR"||i==="STAMEN-TERRAIN"||i==="STAMEN-TONER")m=i.replace("STAMEN-","").toLowerCase();p=new google.maps.Map(p,{mapTypeId:m?m:google.maps.MapTypeId[i],mapTypeControlOptions:{mapTypeIds:[]}});m&&p.mapTypes.set(m,new google.maps.StamenMapType(m));p.getDiv().style.display="none";return p}var n=1,c=false,b=false,e,h;googleCallback=function(i){if(typeof google!=="undefined"&&google.maps&&google.maps.Geocoder&&
-google.maps.LatLng){e=new google.maps.Geocoder;r.getScript("//maps.stamen.com/js/tile.stamen.js",function(){b=true})}else setTimeout(function(){googleCallback(i)},1)};h=function(){if(document.body){c=true;r.getScript("//maps.google.com/maps/api/js?sensor=false&callback=googleCallback")}else setTimeout(function(){h()},1)};r.plugin("googlemap",function(i){var j,p,m,o=document.getElementById(i.target);i.type=i.type||"ROADMAP";i.zoom=i.zoom||1;i.lat=i.lat||0;i.lng=i.lng||0;c||h();j=document.createElement("div");
-j.id="actualmap"+n;j.style.width=i.width||"100%";j.style.height=i.height?i.height:o&&o.clientHeight?o.clientHeight+"px":"100%";n++;o&&o.appendChild(j);var q=function(){if(b){if(j)if(i.location)e.geocode({address:i.location},function(s,d){if(j&&d===google.maps.GeocoderStatus.OK){i.lat=s[0].geometry.location.lat();i.lng=s[0].geometry.location.lng();m=new google.maps.LatLng(i.lat,i.lng);p=f(i,m,j)}});else{m=new google.maps.LatLng(i.lat,i.lng);p=f(i,m,j)}}else setTimeout(function(){q()},5)};q();return{start:function(s,
-d){var A=this,y,x=function(){if(p){d._map=p;p.getDiv().style.display="block";google.maps.event.trigger(p,"resize");p.setCenter(m);if(d.zoom&&typeof d.zoom!=="number")d.zoom=+d.zoom;p.setZoom(d.zoom);if(d.heading&&typeof d.heading!=="number")d.heading=+d.heading;if(d.pitch&&typeof d.pitch!=="number")d.pitch=+d.pitch;if(d.type==="STREETVIEW"){p.setStreetView(y=new google.maps.StreetViewPanorama(j,{position:m,pov:{heading:d.heading=d.heading||0,pitch:d.pitch=d.pitch||0,zoom:d.zoom}}));var a=function(z,
-C){var E=google.maps.geometry.spherical.computeHeading;setTimeout(function(){var B=A.media.currentTime;if(typeof d.tween==="object"){for(var w=0,D=z.length;w<D;w++){var F=z[w];if(B>=F.interval*(w+1)/1E3&&(B<=F.interval*(w+2)/1E3||B>=F.interval*D/1E3)){u.setPosition(new google.maps.LatLng(F.position.lat,F.position.lng));u.setPov({heading:F.pov.heading||E(F,z[w+1])||0,zoom:F.pov.zoom||0,pitch:F.pov.pitch||0})}}a(z,z[0].interval)}else{w=0;for(D=z.length;w<D;w++){F=d.interval;if(B>=F*(w+1)/1E3&&(B<=F*
-(w+2)/1E3||B>=F*D/1E3)){g.setPov({heading:E(z[w],z[w+1])||0,zoom:d.zoom,pitch:d.pitch||0});g.setPosition(l[w])}}a(l,d.interval)}},C)};if(d.location&&typeof d.tween==="string"){var g=y,l=[],k=new google.maps.DirectionsService,t=new google.maps.DirectionsRenderer(g);k.route({origin:d.location,destination:d.tween,travelMode:google.maps.TravelMode.DRIVING},function(z,C){if(C==google.maps.DirectionsStatus.OK){t.setDirections(z);for(var E=z.routes[0].overview_path,B=0,w=E.length;B<w;B++)l.push(new google.maps.LatLng(E[B].lat(),
-E[B].lng()));d.interval=d.interval||1E3;a(l,10)}})}else if(typeof d.tween==="object"){var u=y;k=0;for(var v=d.tween.length;k<v;k++){d.tween[k].interval=d.tween[k].interval||1E3;a(d.tween,10)}}}d.onmaploaded&&d.onmaploaded(d,p)}else setTimeout(function(){x()},13)};x()},end:function(){if(p)p.getDiv().style.display="none"},_teardown:function(s){var d=document.getElementById(s.target);d&&d.removeChild(j);j=p=m=null;s._map=null}}},{about:{name:"Popcorn Google Map Plugin",version:"0.1",author:"@annasob",
-website:"annasob.wordpress.com"},options:{start:{elem:"input",type:"start",label:"Start"},end:{elem:"input",type:"start",label:"End"},target:"map-container",type:{elem:"select",options:["ROADMAP","SATELLITE","STREETVIEW","HYBRID","TERRAIN","STAMEN-WATERCOLOR","STAMEN-TERRAIN","STAMEN-TONER"],label:"Map Type",optional:true},zoom:{elem:"input",type:"text",label:"Zoom","default":0,optional:true},lat:{elem:"input",type:"text",label:"Lat",optional:true},lng:{elem:"input",type:"text",label:"Lng",optional:true},
-location:{elem:"input",type:"text",label:"Location","default":"Toronto, Ontario, Canada"},heading:{elem:"input",type:"text",label:"Heading","default":0,optional:true},pitch:{elem:"input",type:"text",label:"Pitch","default":1,optional:true}}})})(Popcorn);(function(r){function f(b){function e(){var p=b.getBoundingClientRect(),m=i.getBoundingClientRect();if(m.left!==p.left)i.style.left=p.left+"px";if(m.top!==p.top)i.style.top=p.top+"px"}var h=-1,i=document.createElement("div"),j=getComputedStyle(b).zIndex;i.setAttribute("data-popcorn-helper-container",true);i.style.position="absolute";i.style.zIndex=isNaN(j)?n:j+1;document.body.appendChild(i);return{element:i,start:function(){h=setInterval(e,c)},stop:function(){clearInterval(h);h=-1},destroy:function(){document.body.removeChild(i);
-h!==-1&&clearInterval(h)}}}var n=2E3,c=10;r.plugin("image",{manifest:{about:{name:"Popcorn image Plugin",version:"0.1",author:"Scott Downe",website:"http://scottdowne.wordpress.com/"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},src:{elem:"input",type:"url",label:"Image URL","default":"http://mozillapopcorn.org/wp-content/themes/popcorn/images/for_developers.png"},href:{elem:"input",type:"url",label:"Link","default":"http://mozillapopcorn.org/wp-content/themes/popcorn/images/for_developers.png",
-optional:true},target:"image-container",text:{elem:"input",type:"text",label:"Caption","default":"Popcorn.js",optional:true}}},_setup:function(b){var e=document.createElement("img"),h=document.getElementById(b.target);b.anchor=document.createElement("a");b.anchor.style.position="relative";b.anchor.style.textDecoration="none";b.anchor.style.display="none";if(h)if(["VIDEO","AUDIO"].indexOf(h.nodeName)>-1){b.trackedContainer=f(h);b.trackedContainer.element.appendChild(b.anchor)}else h&&h.appendChild(b.anchor);
-e.addEventListener("load",function(){e.style.borderStyle="none";b.anchor.href=b.href||b.src||"#";b.anchor.target="_blank";var i,j;e.style.height=h.style.height;e.style.width=h.style.width;b.anchor.appendChild(e);if(b.text){i=e.height/12+"px";j=document.createElement("div");r.extend(j.style,{color:"black",fontSize:i,fontWeight:"bold",position:"relative",textAlign:"center",width:e.style.width||e.width+"px",zIndex:"10"});j.innerHTML=b.text||"";j.style.top=(e.style.height.replace("px","")||e.height)/
-2-j.offsetHeight/2+"px";b.anchor.insertBefore(j,e)}},false);e.src=b.src},start:function(b,e){e.anchor.style.display="inline";e.trackedContainer&&e.trackedContainer.start()},end:function(b,e){e.anchor.style.display="none";e.trackedContainer&&e.trackedContainer.stop()},_teardown:function(b){if(b.trackedContainer)b.trackedContainer.destroy();else b.anchor.parentNode&&b.anchor.parentNode.removeChild(b.anchor)}})})(Popcorn);(function(r){var f=1,n=false;r.plugin("googlefeed",function(c){var b=function(){var j=false,p=0,m=document.getElementsByTagName("link"),o=m.length,q=document.head||document.getElementsByTagName("head")[0],s=document.createElement("link");if(window.GFdynamicFeedControl)n=true;else r.getScript("//www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js",function(){n=true});for(;p<o;p++)if(m[p].href==="//www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css")j=true;if(!j){s.type=
-"text/css";s.rel="stylesheet";s.href="//www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css";q.insertBefore(s,q.firstChild)}};window.google?b():r.getScript("//www.google.com/jsapi",function(){google.load("feeds","1",{callback:function(){b()}})});var e=document.createElement("div"),h=document.getElementById(c.target),i=function(){if(n)c.feed=new GFdynamicFeedControl(c.url,e,{vertical:c.orientation.toLowerCase()==="vertical"?true:false,horizontal:c.orientation.toLowerCase()==="horizontal"?
-true:false,title:c.title=c.title||"Blog"});else setTimeout(function(){i()},5)};if(!c.orientation||c.orientation.toLowerCase()!=="vertical"&&c.orientation.toLowerCase()!=="horizontal")c.orientation="vertical";e.style.display="none";e.id="_feed"+f;e.style.width="100%";e.style.height="100%";f++;h&&h.appendChild(e);i();return{start:function(){e.setAttribute("style","display:inline")},end:function(){e.setAttribute("style","display:none")},_teardown:function(j){document.getElementById(j.target)&&document.getElementById(j.target).removeChild(e);
-delete j.feed}}},{about:{name:"Popcorn Google Feed Plugin",version:"0.1",author:"David Seifried",website:"dseifried.wordpress.com"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},target:"feed-container",url:{elem:"input",type:"url",label:"Feed URL","default":"http://planet.mozilla.org/rss20.xml"},title:{elem:"input",type:"text",label:"Title","default":"Planet Mozilla",optional:true},orientation:{elem:"select",options:["Vertical","Horizontal"],
-label:"Orientation","default":"Vertical",optional:true}}})})(Popcorn);(function(r){var f=0,n=function(c,b){var e=c.container=document.createElement("div"),h=e.style,i=c.media,j=function(){var p=c.position();h.fontSize="18px";h.width=i.offsetWidth+"px";h.top=p.top+i.offsetHeight-e.offsetHeight-40+"px";h.left=p.left+"px";setTimeout(j,10)};e.id=b||r.guid();h.position="absolute";h.color="white";h.textShadow="black 2px 2px 6px";h.fontWeight="bold";h.textAlign="center";j();c.media.parentNode.appendChild(e);return e};r.plugin("subtitle",{manifest:{about:{name:"Popcorn Subtitle Plugin",
-version:"0.1",author:"Scott Downe",website:"http://scottdowne.wordpress.com/"},options:{start:{elem:"input",type:"text",label:"Start"},end:{elem:"input",type:"text",label:"End"},target:"subtitle-container",text:{elem:"input",type:"text",label:"Text"}}},_setup:function(c){var b=document.createElement("div");b.id="subtitle-"+f++;b.style.display="none";!this.container&&(!c.target||c.target==="subtitle-container")&&n(this);c.container=c.target&&c.target!=="subtitle-container"?document.getElementById(c.target)||
-n(this,c.target):this.container;document.getElementById(c.container.id)&&document.getElementById(c.container.id).appendChild(b);c.innerContainer=b;c.showSubtitle=function(){c.innerContainer.innerHTML=c.text||""}},start:function(c,b){b.innerContainer.style.display="inline";b.showSubtitle(b,b.text)},end:function(c,b){b.innerContainer.style.display="none";b.innerContainer.innerHTML=""},_teardown:function(c){c.container.removeChild(c.innerContainer)}})})(Popcorn);(function(r){var f=false;r.plugin("twitter",{manifest:{about:{name:"Popcorn Twitter Plugin",version:"0.1",author:"Scott Downe",website:"http://scottdowne.wordpress.com/"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},src:{elem:"input",type:"text",label:"Tweet Source (# or @)","default":"@popcornjs"},target:"twitter-container",height:{elem:"input",type:"number",label:"Height","default":"200",optional:true},width:{elem:"input",type:"number",label:"Width",
-"default":"250",optional:true}}},_setup:function(n){if(!window.TWTR&&!f){f=true;r.getScript("//widgets.twimg.com/j/2/widget.js")}var c=document.getElementById(n.target);n.container=document.createElement("div");n.container.setAttribute("id",r.guid());n.container.style.display="none";c&&c.appendChild(n.container);var b=n.src||"";c=n.width||250;var e=n.height||200,h=/^@/.test(b),i={version:2,id:n.container.getAttribute("id"),rpp:30,width:c,height:e,interval:6E3,theme:{shell:{background:"#ffffff",color:"#000000"},
-tweets:{background:"#ffffff",color:"#444444",links:"#1985b5"}},features:{loop:true,timestamp:true,avatars:true,hashtags:true,toptweets:true,live:true,scrollbar:false,behavior:"default"}},j=function(p){if(window.TWTR)if(h){i.type="profile";(new TWTR.Widget(i)).render().setUser(b).start()}else{i.type="search";i.search=b;i.subject=b;(new TWTR.Widget(i)).render().start()}else setTimeout(function(){j(p)},1)};j(this)},start:function(n,c){c.container.style.display="inline"},end:function(n,c){c.container.style.display=
-"none"},_teardown:function(n){document.getElementById(n.target)&&document.getElementById(n.target).removeChild(n.container)}})})(Popcorn);(function(r){r.plugin("webpage",{manifest:{about:{name:"Popcorn Webpage Plugin",version:"0.1",author:"@annasob",website:"annasob.wordpress.com"},options:{id:{elem:"input",type:"text",label:"Id",optional:true},start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},src:{elem:"input",type:"url",label:"Webpage URL","default":"http://mozillapopcorn.org"},target:"iframe-container"}},_setup:function(f){var n=document.getElementById(f.target);f.src=f.src.replace(/^(https?:)?(\/\/)?/,
-"//");f._iframe=document.createElement("iframe");f._iframe.setAttribute("width","100%");f._iframe.setAttribute("height","100%");f._iframe.id=f.id;f._iframe.src=f.src;f._iframe.style.display="none";n&&n.appendChild(f._iframe)},start:function(f,n){n._iframe.src=n.src;n._iframe.style.display="inline"},end:function(f,n){n._iframe.style.display="none"},_teardown:function(f){document.getElementById(f.target)&&document.getElementById(f.target).removeChild(f._iframe)}})})(Popcorn);var wikiCallback;
-(function(r){r.plugin("wikipedia",{manifest:{about:{name:"Popcorn Wikipedia Plugin",version:"0.1",author:"@annasob",website:"annasob.wordpress.com"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},lang:{elem:"input",type:"text",label:"Language","default":"english",optional:true},src:{elem:"input",type:"url",label:"Wikipedia URL","default":"http://en.wikipedia.org/wiki/Cat"},title:{elem:"input",type:"text",label:"Title","default":"Cats",optional:true},
-numberofwords:{elem:"input",type:"number",label:"Number of Words","default":"200",optional:true},target:"wikipedia-container"}},_setup:function(f){var n,c=r.guid();if(!f.lang)f.lang="en";f.numberofwords=f.numberofwords||200;window["wikiCallback"+c]=function(b){f._link=document.createElement("a");f._link.setAttribute("href",f.src);f._link.setAttribute("target","_blank");f._link.innerHTML=f.title||b.parse.displaytitle;f._desc=document.createElement("p");n=b.parse.text["*"].substr(b.parse.text["*"].indexOf("<p>"));
-n=n.replace(/((<(.|\n)+?>)|(\((.*?)\) )|(\[(.*?)\]))/g,"");n=n.split(" ");f._desc.innerHTML=n.slice(0,n.length>=f.numberofwords?f.numberofwords:n.length).join(" ")+" ...";f._fired=true};f.src&&r.getScript("//"+f.lang+".wikipedia.org/w/api.php?action=parse&props=text&redirects&page="+f.src.slice(f.src.lastIndexOf("/")+1)+"&format=json&callback=wikiCallback"+c)},start:function(f,n){var c=function(){if(n._fired){if(n._link&&n._desc)if(document.getElementById(n.target)){document.getElementById(n.target).appendChild(n._link);
-document.getElementById(n.target).appendChild(n._desc);n._added=true}}else setTimeout(function(){c()},13)};c()},end:function(f,n){if(n._added){document.getElementById(n.target).removeChild(n._link);document.getElementById(n.target).removeChild(n._desc)}},_teardown:function(f){if(f._added){f._link.parentNode&&document.getElementById(f.target).removeChild(f._link);f._desc.parentNode&&document.getElementById(f.target).removeChild(f._desc);delete f.target}}})})(Popcorn);(function(r){r.plugin("mustache",function(f){var n,c,b,e;r.getScript("http://mustache.github.com/extras/mustache.js");var h=!!f.dynamic,i=typeof f.template,j=typeof f.data,p=document.getElementById(f.target);f.container=p||document.createElement("div");if(i==="function")if(h)b=f.template;else e=f.template(f);else e=i==="string"?f.template:"";if(j==="function")if(h)n=f.data;else c=f.data(f);else c=j==="string"?JSON.parse(f.data):j==="object"?f.data:"";return{start:function(m,o){var q=function(){if(window.Mustache){if(n)c=
-n(o);if(b)e=b(o);var s=Mustache.to_html(e,c).replace(/^\s*/mg,"");o.container.innerHTML=s}else setTimeout(function(){q()},10)};q()},end:function(m,o){o.container.innerHTML=""},_teardown:function(){n=c=b=e=null}}},{about:{name:"Popcorn Mustache Plugin",version:"0.1",author:"David Humphrey (@humphd)",website:"http://vocamus.net/dave"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},target:"mustache-container",template:{elem:"input",type:"text",
-label:"Template"},data:{elem:"input",type:"text",label:"Data"},dynamic:{elem:"input",type:"checkbox",label:"Dynamic","default":true}}})})(Popcorn);(function(r){function f(c,b){if(c.map)c.map.div.style.display=b;else setTimeout(function(){f(c,b)},10)}var n=1;r.plugin("openmap",function(c){var b,e,h,i,j,p,m,o,q=document.getElementById(c.target);b=document.createElement("div");b.id="openmapdiv"+n;b.style.width="100%";b.style.height="100%";n++;q&&q.appendChild(b);o=function(){if(window.OpenLayers&&window.OpenLayers.Layer.Stamen){if(c.location){location=new OpenLayers.LonLat(0,0);r.getJSONP("//tinygeocoder.com/create-api.php?q="+c.location+"&callback=jsonp",
-function(d){e=new OpenLayers.LonLat(d[1],d[0])})}else e=new OpenLayers.LonLat(c.lng,c.lat);c.type=c.type||"ROADMAP";switch(c.type){case "SATELLITE":c.map=new OpenLayers.Map({div:b,maxResolution:0.28125,tileSize:new OpenLayers.Size(512,512)});var s=new OpenLayers.Layer.WorldWind("LANDSAT","//worldwind25.arc.nasa.gov/tile/tile.aspx",2.25,4,{T:"105"});c.map.addLayer(s);i=new OpenLayers.Projection("EPSG:4326");h=new OpenLayers.Projection("EPSG:4326");break;case "TERRAIN":i=new OpenLayers.Projection("EPSG:4326");
-h=new OpenLayers.Projection("EPSG:4326");c.map=new OpenLayers.Map({div:b,projection:h});s=new OpenLayers.Layer.WMS("USGS Terraserver","//terraserver-usa.org/ogcmap.ashx?",{layers:"DRG"});c.map.addLayer(s);break;case "STAMEN-TONER":case "STAMEN-WATERCOLOR":case "STAMEN-TERRAIN":s=c.type.replace("STAMEN-","").toLowerCase();s=new OpenLayers.Layer.Stamen(s);i=new OpenLayers.Projection("EPSG:4326");h=new OpenLayers.Projection("EPSG:900913");e=e.transform(i,h);c.map=new OpenLayers.Map({div:b,projection:h,
-displayProjection:i,controls:[new OpenLayers.Control.Navigation,new OpenLayers.Control.PanPanel,new OpenLayers.Control.ZoomPanel]});c.map.addLayer(s);break;default:h=new OpenLayers.Projection("EPSG:900913");i=new OpenLayers.Projection("EPSG:4326");e=e.transform(i,h);c.map=new OpenLayers.Map({div:b,projection:h,displayProjection:i});s=new OpenLayers.Layer.OSM;c.map.addLayer(s)}if(c.map){c.map.setCenter(e,c.zoom||10);c.map.div.style.display="none"}}else setTimeout(function(){o()},50)};o();return{_setup:function(s){window.OpenLayers||
-r.getScript("//openlayers.org/api/OpenLayers.js",function(){r.getScript("//maps.stamen.com/js/tile.stamen.js")});var d=function(){if(s.map){s.zoom=s.zoom||2;if(s.zoom&&typeof s.zoom!=="number")s.zoom=+s.zoom;s.map.setCenter(e,s.zoom);if(s.markers){var A=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style["default"]),y=function(v){clickedFeature=v.feature;if(clickedFeature.attributes.text){m=new OpenLayers.Popup.FramedCloud("featurePopup",clickedFeature.geometry.getBounds().getCenterLonLat(),
-new OpenLayers.Size(120,250),clickedFeature.attributes.text,null,true,function(){p.unselect(this.feature)});clickedFeature.popup=m;m.feature=clickedFeature;s.map.addPopup(m)}},x=function(v){feature=v.feature;if(feature.popup){m.feature=null;s.map.removePopup(feature.popup);feature.popup.destroy();feature.popup=null}},a=function(v){r.getJSONP("//tinygeocoder.com/create-api.php?q="+v.location+"&callback=jsonp",function(z){z=(new OpenLayers.Geometry.Point(z[1],z[0])).transform(i,h);var C=OpenLayers.Util.extend({},
-A);if(!v.size||isNaN(v.size))v.size=14;C.pointRadius=v.size;C.graphicOpacity=1;C.externalGraphic=v.icon;z=new OpenLayers.Feature.Vector(z,null,C);if(v.text)z.attributes={text:v.text};j.addFeatures([z])})};j=new OpenLayers.Layer.Vector("Point Layer",{style:A});s.map.addLayer(j);for(var g=0,l=s.markers.length;g<l;g++){var k=s.markers[g];if(k.text)if(!p){p=new OpenLayers.Control.SelectFeature(j);s.map.addControl(p);p.activate();j.events.on({featureselected:y,featureunselected:x})}if(k.location)a(k);
-else{var t=(new OpenLayers.Geometry.Point(k.lng,k.lat)).transform(i,h),u=OpenLayers.Util.extend({},A);if(!k.size||isNaN(k.size))k.size=14;u.pointRadius=k.size;u.graphicOpacity=1;u.externalGraphic=k.icon;t=new OpenLayers.Feature.Vector(t,null,u);if(k.text)t.attributes={text:k.text};j.addFeatures([t])}}}}else setTimeout(function(){d()},13)};d()},start:function(s,d){f(d,"block")},end:function(s,d){f(d,"none")},_teardown:function(){q&&q.removeChild(b);b=map=e=h=i=j=p=m=null}}},{about:{name:"Popcorn OpenMap Plugin",
+(function(p,e){function l(a){C.put.call(this,a)}function d(a){this.parent=a;this.byStart=[{start:-1,end:-1}];this.byEnd=[{start:-1,end:-1}];this.animating=[];this.endIndex=this.startIndex=0;this.previousUpdateTime=-1;this.count=1}function b(a,c){return function(){if(f.plugin.debug)return a.apply(this,arguments);try{return a.apply(this,arguments)}catch(n){f.plugin.errors.push({plugin:c,thrown:n,source:a.toString()});this.emit("pluginerror",f.plugin.errors)}}}if(e.addEventListener){var h=Array.prototype,
+i=Object.prototype,g=h.forEach,k=h.slice,r=i.hasOwnProperty,m=i.toString,t=p.Popcorn,q=[],o=false,u={events:{hash:{},apis:{}}},E=function(){return p.requestAnimationFrame||p.webkitRequestAnimationFrame||p.mozRequestAnimationFrame||p.oRequestAnimationFrame||p.msRequestAnimationFrame||function(a){p.setTimeout(a,16)}}(),C={put:function(a){for(var c in a)if(a.hasOwnProperty(c))this[c]=a[c]}},f=function(a,c){return new f.p.init(a,c||null)};f.version="1.5.6";f.isSupported=true;f.instances=[];f.p=f.prototype=
+{init:function(a,c){var n,j=this;if(typeof a==="function")if(e.readyState==="complete")a(e,f);else{q.push(a);if(!o){o=true;var w=function(){e.removeEventListener("DOMContentLoaded",w,false);for(var F=0,v=q.length;F<v;F++)q[F].call(e,f);q=null};e.addEventListener("DOMContentLoaded",w,false)}}else{if(typeof a==="string")try{n=e.querySelector(a)}catch(x){throw Error("Popcorn.js Error: Invalid media element selector: "+a);}this.media=n||a;n=this.media.nodeName&&this.media.nodeName.toLowerCase()||"video";
+this[n]=this.media;this.options=f.extend({},c)||{};this.id=this.options.id||f.guid(n);if(f.byId(this.id))throw Error("Popcorn.js Error: Cannot use duplicate ID ("+this.id+")");this.isDestroyed=false;this.data={running:{cue:[]},timeUpdate:f.nop,disabled:{},events:{},hooks:{},history:[],state:{volume:this.media.volume},trackRefs:{},trackEvents:new d(this)};f.instances.push(this);var z=function(){if(j.media.currentTime<0)j.media.currentTime=0;j.media.removeEventListener("loadedmetadata",z,false);var F,
+v,L,y,s;F=j.media.duration;F=F!=F?Number.MAX_VALUE:F+1;f.addTrackEvent(j,{start:F,end:F});if(!j.isDestroyed){j.data.durationChange=function(){var B=j.media.duration,Q=B+1,K=j.data.trackEvents.byStart,M=j.data.trackEvents.byEnd;K.pop();M.pop();for(var D=M.length-1;D>0;D--)M[D].end>B&&j.removeTrackEvent(M[D]._id);for(M=0;M<K.length;M++)K[M].end>B&&j.removeTrackEvent(K[M]._id);j.data.trackEvents.byEnd.push({start:Q,end:Q});j.data.trackEvents.byStart.push({start:Q,end:Q})};j.media.addEventListener("durationchange",
+j.data.durationChange,false)}if(j.options.frameAnimation){j.data.timeUpdate=function(){f.timeUpdate(j,{});f.forEach(f.manifest,function(B,Q){if(v=j.data.running[Q]){y=v.length;for(var K=0;K<y;K++){L=v[K];(s=L._natives)&&s.frame&&s.frame.call(j,{},L,j.currentTime())}}});j.emit("timeupdate");!j.isDestroyed&&E(j.data.timeUpdate)};!j.isDestroyed&&E(j.data.timeUpdate)}else{j.data.timeUpdate=function(B){f.timeUpdate(j,B)};j.isDestroyed||j.media.addEventListener("timeupdate",j.data.timeUpdate,false)}};j.media.addEventListener("error",
+function(){j.error=j.media.error},false);j.media.readyState>=1?z():j.media.addEventListener("loadedmetadata",z,false);return this}}};f.p.init.prototype=f.p;f.byId=function(a){for(var c=f.instances,n=c.length,j=0;j<n;j++)if(c[j].id===a)return c[j];return null};f.forEach=function(a,c,n){if(!a||!c)return{};n=n||this;var j,w;if(g&&a.forEach===g)return a.forEach(c,n);if(m.call(a)==="[object NodeList]"){j=0;for(w=a.length;j<w;j++)c.call(n,a[j],j,a);return a}for(j in a)r.call(a,j)&&c.call(n,a[j],j,a);return a};
+f.extend=function(a){var c=k.call(arguments,1);f.forEach(c,function(n){for(var j in n)a[j]=n[j]});return a};f.extend(f,{noConflict:function(a){if(a)p.Popcorn=t;return f},error:function(a){throw Error(a);},guid:function(a){f.guid.counter++;return(a?a:"")+(+new Date+f.guid.counter)},sizeOf:function(a){var c=0,n;for(n in a)c++;return c},isArray:Array.isArray||function(a){return m.call(a)==="[object Array]"},nop:function(){},position:function(a){if(!a.parentNode)return null;a=a.getBoundingClientRect();
+var c={},n=e.documentElement,j=e.body,w,x,z;w=n.clientTop||j.clientTop||0;x=n.clientLeft||j.clientLeft||0;z=p.pageYOffset&&n.scrollTop||j.scrollTop;n=p.pageXOffset&&n.scrollLeft||j.scrollLeft;w=Math.ceil(a.top+z-w);x=Math.ceil(a.left+n-x);for(var F in a)c[F]=Math.round(a[F]);return f.extend({},c,{top:w,left:x})},disable:function(a,c){if(!a.data.disabled[c]){a.data.disabled[c]=true;if(c in f.registryByName&&a.data.running[c])for(var n=a.data.running[c].length-1,j;n>=0;n--){j=a.data.running[c][n];j._natives.end.call(a,
+null,j);a.emit("trackend",f.extend({},j,{plugin:j.type,type:"trackend"}))}return a}},enable:function(a,c){if(a.data.disabled[c]){a.data.disabled[c]=false;if(c in f.registryByName&&a.data.running[c])for(var n=a.data.running[c].length-1,j;n>=0;n--){j=a.data.running[c][n];j._natives.start.call(a,null,j);a.emit("trackstart",f.extend({},j,{plugin:j.type,type:"trackstart",track:j}))}return a}},destroy:function(a){var c=a.data.events,n=a.data.trackEvents,j,w,x,z;for(w in c){j=c[w];for(x in j)delete j[x];
+c[w]=null}for(z in f.registryByName)f.removePlugin(a,z);n.byStart.length=0;n.byEnd.length=0;if(!a.isDestroyed){a.data.timeUpdate&&a.media.removeEventListener("timeupdate",a.data.timeUpdate,false);a.isDestroyed=true}f.instances.splice(f.instances.indexOf(a),1)}});f.guid.counter=1;f.extend(f.p,function(){var a={};f.forEach("load play pause currentTime playbackRate volume duration preload playbackRate autoplay loop controls muted buffered readyState seeking paused played seekable ended".split(/\s+/g),
+function(c){a[c]=function(n){var j;if(typeof this.media[c]==="function"){if(n!=null&&/play|pause/.test(c))this.media.currentTime=f.util.toSeconds(n);this.media[c]();return this}if(n!=null){j=this.media[c];this.media[c]=n;j!==n&&this.emit("attrchange",{attribute:c,previousValue:j,currentValue:n});return this}return this.media[c]}});return a}());f.forEach("enable disable".split(" "),function(a){f.p[a]=function(c){return f[a](this,c)}});f.extend(f.p,{roundTime:function(){return Math.round(this.media.currentTime)},
+exec:function(a,c,n){var j=arguments.length,w="trackadded",x,z;try{z=f.util.toSeconds(a)}catch(F){}if(typeof z==="number")a=z;if(typeof a==="number"&&j===2){n=c;c=a;a=f.guid("cue")}else if(j===1)c=-1;else if(x=this.getTrackEvent(a)){this.data.trackEvents.remove(a);l.end(this,x);f.removeTrackEvent.ref(this,a);w="cuechange";if(typeof a==="string"&&j===2){if(typeof c==="number")n=x._natives.start;if(typeof c==="function"){n=c;c=x.start}}}else if(j>=2){if(typeof c==="string"){try{z=f.util.toSeconds(c)}catch(v){}c=
+z}if(typeof c==="number")n=n||f.nop();if(typeof c==="function"){n=c;c=-1}}j={id:a,start:c,end:c+1,_running:false,_natives:{start:n||f.nop,end:f.nop,type:"cue"}};if(x)j=f.extend(x,j);if(w==="cuechange"){j._id=j.id||j._id||f.guid(j._natives.type);this.data.trackEvents.add(j);l.start(this,j);this.timeUpdate(this,null,true);f.addTrackEvent.ref(this,j);this.emit(w,f.extend({},j,{id:a,type:w,previousValue:{time:x.start,fn:x._natives.start},currentValue:{time:c,fn:n||f.nop},track:x}))}else f.addTrackEvent(this,
+j);return this},mute:function(a){a=a==null||a===true?"muted":"unmuted";if(a==="unmuted"){this.media.muted=false;this.media.volume=this.data.state.volume}if(a==="muted"){this.data.state.volume=this.media.volume;this.media.muted=true}this.emit(a);return this},unmute:function(a){return this.mute(a==null?false:!a)},position:function(){return f.position(this.media)},toggle:function(a){return f[this.data.disabled[a]?"enable":"disable"](this,a)},defaults:function(a,c){if(f.isArray(a)){f.forEach(a,function(n){for(var j in n)this.defaults(j,
+n[j])},this);return this}if(!this.options.defaults)this.options.defaults={};this.options.defaults[a]||(this.options.defaults[a]={});f.extend(this.options.defaults[a],c);return this}});f.Events={UIEvents:"blur focus focusin focusout load resize scroll unload",MouseEvents:"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave click dblclick",Events:"loadstart progress suspend emptied stalled play pause error loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange"};
+f.Events.Natives=f.Events.UIEvents+" "+f.Events.MouseEvents+" "+f.Events.Events;u.events.apiTypes=["UIEvents","MouseEvents","Events"];(function(a,c){for(var n=u.events.apiTypes,j=a.Natives.split(/\s+/g),w=0,x=j.length;w<x;w++)c.hash[j[w]]=true;n.forEach(function(z){c.apis[z]={};for(var F=a[z].split(/\s+/g),v=F.length,L=0;L<v;L++)c.apis[z][F[L]]=true})})(f.Events,u.events);f.events={isNative:function(a){return!!u.events.hash[a]},getInterface:function(a){if(!f.events.isNative(a))return false;var c=
+u.events,n=c.apiTypes;c=c.apis;for(var j=0,w=n.length,x,z;j<w;j++){z=n[j];if(c[z][a]){x=z;break}}return x},all:f.Events.Natives.split(/\s+/g),fn:{trigger:function(a,c){var n,j=this.data.events[a];if(j){if(n=f.events.getInterface(a)){n=e.createEvent(n);n.initEvent(a,true,true,p,1);this.media.dispatchEvent(n);return this}for(n=j.slice();n.length;)n.shift().call(this,c)}return this},listen:function(a,c){var n=this,j=true,w=f.events.hooks[a],x,z;if(typeof c!=="function")throw Error("Popcorn.js Error: Listener is not a function");
+if(!this.data.events[a]){this.data.events[a]=[];j=false}if(w){w.add&&w.add.call(this,{},c);if(w.bind)a=w.bind;if(w.handler){z=c;c=function(F){w.handler.call(n,F,z)}}j=true;if(!this.data.events[a]){this.data.events[a]=[];j=false}}this.data.events[a].push(c);!j&&f.events.all.indexOf(a)>-1&&this.media.addEventListener(a,function(F){if(n.data.events[a])for(x=n.data.events[a].slice();x.length;)x.shift().call(n,F)},false);return this},unlisten:function(a,c){var n,j=this.data.events[a];if(j){if(typeof c===
+"string"){for(n=0;n<j.length;n++)j[n].name===c&&j.splice(n--,1);return this}else if(typeof c==="function"){for(;n!==-1;){n=j.indexOf(c);n!==-1&&j.splice(n,1)}return this}this.data.events[a]=null;return this}}},hooks:{canplayall:{bind:"canplaythrough",add:function(a,c){var n=false;if(this.media.readyState){setTimeout(function(){c.call(this,a)}.bind(this),0);n=true}this.data.hooks.canplayall={fired:n}},handler:function(a,c){if(!this.data.hooks.canplayall.fired){c.call(this,a);this.data.hooks.canplayall.fired=
+true}}}}};f.forEach([["trigger","emit"],["listen","on"],["unlisten","off"]],function(a){f.p[a[0]]=f.p[a[1]]=f.events.fn[a[0]]});l.start=function(a,c){if(c.end>a.media.currentTime&&c.start<=a.media.currentTime&&!c._running){c._running=true;a.data.running[c._natives.type].push(c);if(!a.data.disabled[c._natives.type]){c._natives.start.call(a,null,c);a.emit("trackstart",f.extend({},c,{plugin:c._natives.type,type:"trackstart",track:c}))}}};l.end=function(a,c){var n;if((c.end<=a.media.currentTime||c.start>
+a.media.currentTime)&&c._running){n=a.data.running[c._natives.type];c._running=false;n.splice(n.indexOf(c),1);if(!a.data.disabled[c._natives.type]){c._natives.end.call(a,null,c);a.emit("trackend",f.extend({},c,{plugin:c._natives.type,type:"trackend",track:c}))}}};d.prototype.where=function(a){return(this.parent.getTrackEvents()||[]).filter(function(c){var n,j;if(!a)return true;for(n in a){j=a[n];if(c[n]&&c[n]===j||c._natives[n]&&c._natives[n]===j)return true}return false})};d.prototype.add=function(a){var c=
+this.byStart,n=this.byEnd,j;a&&a._id&&this.parent.data.history.push(a._id);a.start=f.util.toSeconds(a.start,this.parent.options.framerate);a.end=f.util.toSeconds(a.end,this.parent.options.framerate);for(j=c.length-1;j>=0;j--)if(a.start>=c[j].start){c.splice(j+1,0,a);break}for(c=n.length-1;c>=0;c--)if(a.end>n[c].end){n.splice(c+1,0,a);break}j<=this.parent.data.trackEvents.startIndex&&a.start<=this.parent.data.trackEvents.previousUpdateTime&&this.parent.data.trackEvents.startIndex++;c<=this.parent.data.trackEvents.endIndex&&
+a.end<this.parent.data.trackEvents.previousUpdateTime&&this.parent.data.trackEvents.endIndex++;this.count++};d.prototype.remove=function(a){if(a instanceof l)a=a.id;if(typeof a==="object"){this.where(a).forEach(function(y){this.removeTrackEvent(y._id)},this.parent);return this}var c,n,j;j=this.byStart.length;for(var w=0,x=0,z=[],F=[],v=[],L=[];--j>-1;){c=this.byStart[w];n=this.byEnd[w];if(!c._id){z.push(c);F.push(n)}if(c._id){c._id!==a&&z.push(c);n._id!==a&&F.push(n);if(c._id===a)x=w}w++}j=this.animating.length;
+w=0;if(j)for(;--j>-1;){c=this.animating[w];c._id||v.push(c);c._id&&c._id!==a&&v.push(c);w++}x<=this.startIndex&&this.startIndex--;x<=this.endIndex&&this.endIndex--;this.byStart=z;this.byEnd=F;this.animating=v;this.count--;j=this.parent.data.history.length;for(w=0;w<j;w++)this.parent.data.history[w]!==a&&L.push(this.parent.data.history[w]);this.parent.data.history=L};f.addTrackEvent=function(a,c){var n;if(!(c instanceof l)){if((c=new l(c))&&c._natives&&c._natives.type&&a.options.defaults&&a.options.defaults[c._natives.type]){n=
+f.extend({},c);f.extend(c,a.options.defaults[c._natives.type],n)}if(c._natives){c._id=c.id||c._id||f.guid(c._natives.type);if(c._natives._setup){c._natives._setup.call(a,c);a.emit("tracksetup",f.extend({},c,{plugin:c._natives.type,type:"tracksetup",track:c}))}}a.data.trackEvents.add(c);l.start(a,c);this.timeUpdate(a,null,true);c._id&&f.addTrackEvent.ref(a,c);a.emit("trackadded",f.extend({},c,c._natives?{plugin:c._natives.type}:{},{type:"trackadded",track:c}))}};f.addTrackEvent.ref=function(a,c){a.data.trackRefs[c._id]=
+c;return a};f.removeTrackEvent=function(a,c){var n=a.getTrackEvent(c);if(n){n._natives._teardown&&n._natives._teardown.call(a,n);a.data.trackEvents.remove(c);f.removeTrackEvent.ref(a,c);n._natives&&a.emit("trackremoved",f.extend({},n,{plugin:n._natives.type,type:"trackremoved",track:n}))}};f.removeTrackEvent.ref=function(a,c){delete a.data.trackRefs[c];return a};f.getTrackEvents=function(a){var c=[];a=a.data.trackEvents.byStart;for(var n=a.length,j=0,w;j<n;j++){w=a[j];w._id&&c.push(w)}return c};f.getTrackEvents.ref=
+function(a){return a.data.trackRefs};f.getTrackEvent=function(a,c){return a.data.trackRefs[c]};f.getTrackEvent.ref=function(a,c){return a.data.trackRefs[c]};f.getLastTrackEventId=function(a){return a.data.history[a.data.history.length-1]};f.timeUpdate=function(a,c){var n=a.media.currentTime,j=a.data.trackEvents.previousUpdateTime,w=a.data.trackEvents,x=w.endIndex,z=w.startIndex,F=w.byStart.length,v=w.byEnd.length,L=f.registryByName,y,s,B;if(j<=n){for(;w.byEnd[x]&&w.byEnd[x].end<=n;){y=w.byEnd[x];
+s=(j=y._natives)&&j.type;if(!j||L[s]||a[s]){if(y._running===true){y._running=false;B=a.data.running[s];B.splice(B.indexOf(y),1);if(!a.data.disabled[s]){j.end.call(a,c,y);a.emit("trackend",f.extend({},y,{plugin:s,type:"trackend",track:y}))}}x++}else{f.removeTrackEvent(a,y._id);return}}for(;w.byStart[z]&&w.byStart[z].start<=n;){y=w.byStart[z];s=(j=y._natives)&&j.type;if(!j||L[s]||a[s]){if(y.end>n&&y._running===false){y._running=true;a.data.running[s].push(y);if(!a.data.disabled[s]){j.start.call(a,c,
+y);a.emit("trackstart",f.extend({},y,{plugin:s,type:"trackstart",track:y}))}}z++}else{f.removeTrackEvent(a,y._id);return}}}else if(j>n){for(;w.byStart[z]&&w.byStart[z].start>n;){y=w.byStart[z];s=(j=y._natives)&&j.type;if(!j||L[s]||a[s]){if(y._running===true){y._running=false;B=a.data.running[s];B.splice(B.indexOf(y),1);if(!a.data.disabled[s]){j.end.call(a,c,y);a.emit("trackend",f.extend({},y,{plugin:s,type:"trackend",track:y}))}}z--}else{f.removeTrackEvent(a,y._id);return}}for(;w.byEnd[x]&&w.byEnd[x].end>
+n;){y=w.byEnd[x];s=(j=y._natives)&&j.type;if(!j||L[s]||a[s]){if(y.start<=n&&y._running===false){y._running=true;a.data.running[s].push(y);if(!a.data.disabled[s]){j.start.call(a,c,y);a.emit("trackstart",f.extend({},y,{plugin:s,type:"trackstart",track:y}))}}x--}else{f.removeTrackEvent(a,y._id);return}}}w.endIndex=x;w.startIndex=z;w.previousUpdateTime=n;w.byStart.length<F&&w.startIndex--;w.byEnd.length<v&&w.endIndex--};f.extend(f.p,{getTrackEvents:function(){return f.getTrackEvents.call(null,this)},
+getTrackEvent:function(a){return f.getTrackEvent.call(null,this,a)},getLastTrackEventId:function(){return f.getLastTrackEventId.call(null,this)},removeTrackEvent:function(a){f.removeTrackEvent.call(null,this,a);return this},removePlugin:function(a){f.removePlugin.call(null,this,a);return this},timeUpdate:function(a){f.timeUpdate.call(null,this,a);return this},destroy:function(){f.destroy.call(null,this);return this}});f.manifest={};f.registry=[];f.registryByName={};f.plugin=function(a,c,n){if(f.protect.natives.indexOf(a.toLowerCase())>=
+0)f.error("'"+a+"' is a protected function name");else{var j=typeof c==="function",w=["start","end","type","manifest"],x=["_setup","_teardown","start","end","frame"],z={},F=function(y,s){y=y||f.nop;s=s||f.nop;return function(){y.apply(this,arguments);s.apply(this,arguments)}};f.manifest[a]=n=n||c.manifest||{};x.forEach(function(y){c[y]=b(c[y]||f.nop,a)});var v=function(y,s){if(!s)return this;if(s.ranges&&f.isArray(s.ranges)){f.forEach(s.ranges,function(M){M=f.extend({},s,M);delete M.ranges;this[a](M)},
+this);return this}var B=s._natives={},Q="",K;f.extend(B,y);s._natives.type=s._natives.plugin=a;s._running=false;B.start=B.start||B["in"];B.end=B.end||B.out;if(s.once)B.end=F(B.end,function(){this.removeTrackEvent(s._id)});B._teardown=F(function(){var M=k.call(arguments),D=this.data.running[B.type];M.unshift(null);M[1]._running&&D.splice(D.indexOf(s),1)&&B.end.apply(this,M);M[1]._running=false;this.emit("trackend",f.extend({},s,{plugin:B.type,type:"trackend",track:f.getTrackEvent(this,s.id||s._id)}))},
+B._teardown);B._teardown=F(B._teardown,function(){this.emit("trackteardown",f.extend({},s,{plugin:a,type:"trackteardown",track:f.getTrackEvent(this,s.id||s._id)}))});s.compose=s.compose||[];if(typeof s.compose==="string")s.compose=s.compose.split(" ");s.effect=s.effect||[];if(typeof s.effect==="string")s.effect=s.effect.split(" ");s.compose=s.compose.concat(s.effect);s.compose.forEach(function(M){Q=f.compositions[M]||{};x.forEach(function(D){B[D]=F(B[D],Q[D])})});s._natives.manifest=n;if(!("start"in
+s))s.start=s["in"]||0;if(!s.end&&s.end!==0)s.end=s.out||Number.MAX_VALUE;if(!r.call(s,"toString"))s.toString=function(){var M=["start: "+s.start,"end: "+s.end,"id: "+(s.id||s._id)];s.target!=null&&M.push("target: "+s.target);return a+" ( "+M.join(", ")+" )"};if(!s.target){K="options"in n&&n.options;s.target=K&&"target"in K&&K.target}if(!s._id&&s._natives)s._id=f.guid(s._natives.type);if(s instanceof l){if(s._natives){s._id=s.id||s._id||f.guid(s._natives.type);if(s._natives._setup){s._natives._setup.call(this,
+s);this.emit("tracksetup",f.extend({},s,{plugin:s._natives.type,type:"tracksetup",track:s}))}}this.data.trackEvents.add(s);l.start(this,s);this.timeUpdate(this,null,true);s._id&&f.addTrackEvent.ref(this,s)}else f.addTrackEvent(this,s);f.forEach(y,function(M,D){w.indexOf(D)===-1&&this.on(D,M)},this);return this};f.p[a]=z[a]=function(y,s){var B,Q;if(y&&!s)s=y;else if(B=this.getTrackEvent(y)){Q=s;var K={},M;for(M in B)if(r.call(Q,M)&&r.call(B,M))K[M]=B[M];if(B._natives._update){this.data.trackEvents.remove(B);
+if(r.call(s,"start"))B.start=s.start;if(r.call(s,"end"))B.end=s.end;l.end(this,B);j&&c.call(this,B);B._natives._update.call(this,B,s);this.data.trackEvents.add(B);l.start(this,B)}else{f.extend(B,s);this.data.trackEvents.remove(y);B._natives._teardown&&B._natives._teardown.call(this,B);f.removeTrackEvent.ref(this,y);if(j)v.call(this,c.call(this,B),B);else{B._id=B.id||B._id||f.guid(B._natives.type);if(B._natives&&B._natives._setup){B._natives._setup.call(this,B);this.emit("tracksetup",f.extend({},B,
+{plugin:B._natives.type,type:"tracksetup",track:B}))}this.data.trackEvents.add(B);l.start(this,B);this.timeUpdate(this,null,true);f.addTrackEvent.ref(this,B)}this.emit("trackchange",{id:B.id,type:"trackchange",previousValue:K,currentValue:B,track:B});return this}B._natives.type!=="cue"&&this.emit("trackchange",{id:B.id,type:"trackchange",previousValue:K,currentValue:Q,track:B});return this}else s.id=y;this.data.running[a]=this.data.running[a]||[];B=f.extend({},this.options.defaults&&this.options.defaults[a]||
+{},s);v.call(this,j?c.call(this,B):c,B);return this};n&&f.extend(c,{manifest:n});var L={fn:z[a],definition:c,base:c,parents:[],name:a};f.registry.push(f.extend(z,L,{type:a}));f.registryByName[a]=L;return z}};f.plugin.errors=[];f.plugin.debug=f.version==="1.5.6";f.removePlugin=function(a,c){if(!c){c=a;a=f.p;if(f.protect.natives.indexOf(c.toLowerCase())>=0){f.error("'"+c+"' is a protected function name");return}var n=f.registry.length,j;for(j=0;j<n;j++)if(f.registry[j].name===c){f.registry.splice(j,
+1);delete f.registryByName[c];delete f.manifest[c];delete a[c];return}}n=a.data.trackEvents.byStart;j=a.data.trackEvents.byEnd;var w=a.data.trackEvents.animating,x,z;x=0;for(z=n.length;x<z;x++){if(n[x]&&n[x]._natives&&n[x]._natives.type===c){n[x]._natives._teardown&&n[x]._natives._teardown.call(a,n[x]);n.splice(x,1);x--;z--;if(a.data.trackEvents.startIndex<=x){a.data.trackEvents.startIndex--;a.data.trackEvents.endIndex--}}j[x]&&j[x]._natives&&j[x]._natives.type===c&&j.splice(x,1)}x=0;for(z=w.length;x<
+z;x++)if(w[x]&&w[x]._natives&&w[x]._natives.type===c){w.splice(x,1);x--;z--}};f.compositions={};f.compose=function(a,c,n){f.manifest[a]=n||c.manifest||{};f.compositions[a]=c};f.plugin.effect=f.effect=f.compose;var G=/^(?:\.|#|\[)/;f.dom={debug:false,find:function(a,c){var n=null;c=c||e;if(a){if(!G.test(a)){n=e.getElementById(a);if(n!==null)return n}try{n=c.querySelector(a)}catch(j){if(f.dom.debug)throw Error(j);}}return n}};var A=/\?/,O={ajax:null,url:"",data:"",dataType:"",success:f.nop,type:"GET",
+async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8"};f.xhr=function(a){a.dataType=a.dataType&&a.dataType.toLowerCase()||null;if(a.dataType&&(a.dataType==="jsonp"||a.dataType==="script"))f.xhr.getJSONP(a.url,a.success,a.dataType==="script");else{a=f.extend({},O,a);a.ajax=new XMLHttpRequest;if(a.ajax){if(a.type==="GET"&&a.data){a.url+=(A.test(a.url)?"&":"?")+a.data;a.data=null}a.ajax.open(a.type,a.url,a.async);a.type==="POST"&&a.ajax.setRequestHeader("Content-Type",a.contentType);
+a.ajax.send(a.data||null);return f.xhr.httpData(a)}}};f.xhr.httpData=function(a){var c,n=null,j,w=null;a.ajax.onreadystatechange=function(){if(a.ajax.readyState===4){try{n=JSON.parse(a.ajax.responseText)}catch(x){}c={xml:a.ajax.responseXML,text:a.ajax.responseText,json:n};if(!c.xml||!c.xml.documentElement){c.xml=null;try{j=new DOMParser;w=j.parseFromString(a.ajax.responseText,"text/xml");if(!w.getElementsByTagName("parsererror").length)c.xml=w}catch(z){}}if(a.dataType)c=c[a.dataType];a.success.call(a.ajax,
+c)}};return c};f.xhr.getJSONP=function(a,c,n){var j=e.head||e.getElementsByTagName("head")[0]||e.documentElement,w=e.createElement("script"),x=false,z=[];z=/(=)\?(?=&|$)|\?\?/;var F,v;if(!n){v=a.match(/(callback=[^&]*)/);if(v!==null&&v.length){z=v[1].split("=")[1];if(z==="?")z="jsonp";F=f.guid(z);a=a.replace(/(callback=[^&]*)/,"callback="+F)}else{F=f.guid("jsonp");if(z.test(a))a=a.replace(z,"$1"+F);z=a.split(/\?(.+)?/);a=z[0]+"?";if(z[1])a+=z[1]+"&";a+="callback="+F}window[F]=function(L){c&&c(L);
+x=true}}w.addEventListener("load",function(){n&&c&&c();x&&delete window[F];j.removeChild(w)},false);w.addEventListener("error",function(L){c&&c({error:L});n||delete window[F];j.removeChild(w)},false);w.src=a;j.insertBefore(w,j.firstChild)};f.getJSONP=f.xhr.getJSONP;f.getScript=f.xhr.getScript=function(a,c){return f.xhr.getJSONP(a,c,true)};f.util={toSeconds:function(a,c){var n=/^([0-9]+:){0,2}[0-9]+([.;][0-9]+)?$/,j,w,x;if(typeof a==="number")return a;typeof a==="string"&&!n.test(a)&&f.error("Invalid time format");
+n=a.split(":");j=n.length-1;w=n[j];if(w.indexOf(";")>-1){w=w.split(";");x=0;if(c&&typeof c==="number")x=parseFloat(w[1],10)/c;n[j]=parseInt(w[0],10)+x}j=n[0];return{1:parseFloat(j,10),2:parseInt(j,10)*60+parseFloat(n[1],10),3:parseInt(j,10)*3600+parseInt(n[1],10)*60+parseFloat(n[2],10)}[n.length||1]}};f.p.cue=f.p.exec;f.protect={natives:function(a){return Object.keys?Object.keys(a):function(c){var n,j=[];for(n in c)r.call(c,n)&&j.push(n);return j}(a)}(f.p).map(function(a){return a.toLowerCase()})};
+f.forEach({listen:"on",unlisten:"off",trigger:"emit",exec:"cue"},function(a,c){var n=f.p[c];f.p[c]=function(){if(typeof console!=="undefined"&&console.warn){console.warn("Deprecated method '"+c+"', "+(a==null?"do not use.":"use '"+a+"' instead."));f.p[c]=n}return f.p[a].apply(this,[].slice.call(arguments))}});p.Popcorn=f}else{p.Popcorn={isSupported:false};for(h="byId forEach extend effects error guid sizeOf isArray nop position disable enable destroyaddTrackEvent removeTrackEvent getTrackEvents getTrackEvent getLastTrackEventId timeUpdate plugin removePlugin compose effect xhr getJSONP getScript".split(/\s+/);h.length;)p.Popcorn[h.shift()]=
+function(){}}})(window,window.document);(function(p,e){var l=p.document,d=p.location,b=/:\/\//,h=d.href.replace(d.href.split("/").slice(-1)[0],""),i=function(k,r,m){k=k||0;r=(r||k||0)+1;m=m||1;r=Math.ceil((r-k)/m)||0;var t=0,q=[];for(q.length=r;t<r;){q[t++]=k;k+=m}return q};e.sequence=function(k,r){return new e.sequence.init(k,r)};e.sequence.init=function(k,r){this.parent=l.getElementById(k);this.seqId=e.guid("__sequenced");this.queue=[];this.playlist=[];this.inOuts={ofVideos:[],ofClips:[]};this.dims={width:0,height:0};this.active=0;this.playing=
+this.cycling=false;this.times={last:0};this.events={};var m=this,t=0;e.forEach(r,function(q,o){var u=l.createElement("video");u.preload="auto";u.controls=true;u.style.display=o&&"none"||"";u.id=m.seqId+"-"+o;m.queue.push(u);var E=q["in"],C=q.out;m.inOuts.ofVideos.push({"in":E!==undefined&&E||1,out:C!==undefined&&C||0});m.inOuts.ofVideos[o].out=m.inOuts.ofVideos[o].out||m.inOuts.ofVideos[o]["in"]+2;u.src=!b.test(q.src)?h+q.src:q.src;u.setAttribute("data-sequence-owner",k);u.setAttribute("data-sequence-guid",
+m.seqId);u.setAttribute("data-sequence-id",o);u.setAttribute("data-sequence-clip",[m.inOuts.ofVideos[o]["in"],m.inOuts.ofVideos[o].out].join(":"));m.parent.appendChild(u);m.playlist.push(e("#"+u.id))});m.inOuts.ofVideos.forEach(function(q){q={"in":t,out:t+(q.out-q["in"])};m.inOuts.ofClips.push(q);t=q.out+1});e.forEach(this.queue,function(q,o){function u(){if(!o){m.dims.width=q.videoWidth;m.dims.height=q.videoHeight}q.currentTime=m.inOuts.ofVideos[o]["in"]-0.5;q.removeEventListener("canplaythrough",
+u,false);return true}q.addEventListener("canplaythrough",u,false);q.addEventListener("play",function(){m.playing=true},false);q.addEventListener("pause",function(){m.playing=false},false);q.addEventListener("timeupdate",function(E){E=E.srcElement||E.target;E=+(E.dataset&&E.dataset.sequenceId||E.getAttribute("data-sequence-id"));var C=Math.floor(q.currentTime);if(m.times.last!==C&&E===m.active){m.times.last=C;C===m.inOuts.ofVideos[E].out&&e.sequence.cycle.call(m,E)}},false)});return this};e.sequence.init.prototype=
+e.sequence.prototype;e.sequence.cycle=function(k){this.queue||e.error("Popcorn.sequence.cycle is not a public method");var r=this.queue,m=this.inOuts.ofVideos,t=r[k],q=0,o;if(r[k+1])q=k+1;if(r[k+1]){r=r[q];m=m[q];e.extend(r,{width:this.dims.width,height:this.dims.height});o=this.playlist[q];t.pause();this.active=q;this.times.last=m["in"]-1;o.currentTime(m["in"]);o[q?"play":"pause"]();this.trigger("cycle",{position:{previous:k,current:q}});if(q){t.style.display="none";r.style.display=""}this.cycling=
+false}else this.playlist[k].pause();return this};var g=["timeupdate","play","pause"];e.extend(e.sequence.prototype,{eq:function(k){return this.playlist[k]},remove:function(){this.parent.innerHTML=null},clip:function(k){return this.inOuts.ofVideos[k]},duration:function(){for(var k=0,r=this.inOuts.ofClips,m=0;m<r.length;m++)k+=r[m].out-r[m]["in"]+1;return k-1},play:function(){this.playlist[this.active].play();return this},exec:function(k,r){var m=this.active;this.inOuts.ofClips.forEach(function(t,q){if(k>=
+t["in"]&&k<=t.out)m=q});k+=this.inOuts.ofVideos[m]["in"]-this.inOuts.ofClips[m]["in"];e.addTrackEvent(this.playlist[m],{start:k-1,end:k,_running:false,_natives:{start:r||e.nop,end:e.nop,type:"exec"}});return this},listen:function(k,r){var m=this,t=this.playlist,q=t.length,o=0;if(!r)r=e.nop;if(e.Events.Natives.indexOf(k)>-1)e.forEach(t,function(u){u.listen(k,function(E){E.active=m;if(g.indexOf(k)>-1)r.call(u,E);else++o===q&&r.call(u,E)})});else{this.events[k]||(this.events[k]={});t=r.name||e.guid("__"+
+k);this.events[k][t]=r}return this},unlisten:function(){},trigger:function(k,r){var m=this;if(!(e.Events.Natives.indexOf(k)>-1)){this.events[k]&&e.forEach(this.events[k],function(t){t.call(m,{type:k},r)});return this}}});e.forEach(e.manifest,function(k,r){e.sequence.prototype[r]=function(m){var t={},q=[],o,u,E,C,f;for(o=0;o<this.inOuts.ofClips.length;o++){q=this.inOuts.ofClips[o];u=i(q["in"],q.out);E=u.indexOf(m.start);C=u.indexOf(m.end);if(E>-1)t[o]=e.extend({},q,{start:u[E],clipIdx:E});if(C>-1)t[o]=
+e.extend({},q,{end:u[C],clipIdx:C})}o=Object.keys(t).map(function(A){return+A});q=i(o[0],o[1]);for(o=0;o<q.length;o++){E={};C=q[o];var G=t[C];if(G){f=this.inOuts.ofVideos[C];u=G.clipIdx;f=i(f["in"],f.out);if(G.start){E.start=f[u];E.end=f[f.length-1]}if(G.end){E.start=f[0];E.end=f[u]}}else{E.start=this.inOuts.ofVideos[C]["in"];E.end=this.inOuts.ofVideos[C].out}this.playlist[C][r](e.extend({},m,E))}return this}})})(this,Popcorn);(function(p,e){function l(h){h=typeof h==="string"?h:[h.language,h.region].join("-");var i=h.split("-");return{iso6391:h,language:i[0]||"",region:i[1]||""}}var d=p.navigator,b=l(d.userLanguage||d.language);e.locale={get:function(){return b},set:function(h){b=l(h);e.locale.broadcast();return b},broadcast:function(h){var i=e.instances,g=i.length,k=0,r;for(h=h||"locale:changed";k<g;k++){r=i[k];h in r.data.events&&r.trigger(h)}}}})(this,this.Popcorn);(function(p){document.addEventListener("DOMContentLoaded",function(){var e=document.querySelectorAll("[data-timeline-sources]");p.forEach(e,function(l,d){var b=e[d],h,i,g;if(!b.id)b.id=p.guid("__popcorn");if(b.nodeType&&b.nodeType===1){g=p("#"+b.id);h=(b.getAttribute("data-timeline-sources")||"").split(",");h[0]&&p.forEach(h,function(k){i=k.split("!");if(i.length===1){i=k.match(/(.*)[\/\\]([^\/\\]+\.\w+)$/)[2].split(".");i[0]="parse"+i[1].toUpperCase();i[1]=k}h[0]&&g[i[0]]&&g[i[0]](i[1])});g.autoplay()&&
+g.play()}})},false)})(Popcorn);(function(p){var e=function(l,d){l=l||p.nop;d=d||p.nop;return function(){l.apply(this,arguments);d.apply(this,arguments)}};p.player=function(l,d){if(!p[l]){d=d||{};var b=function(h,i,g){g=g||{};var k=new Date/1E3,r=k,m=0,t=0,q=1,o=false,u={},E=typeof h==="string"?p.dom.find(h):h,C={};Object.prototype.__defineGetter__||(C=E||document.createElement("div"));for(var f in E)if(!(f in C))if(typeof E[f]==="object")C[f]=E[f];else if(typeof E[f]==="function")C[f]=function(A){return"length"in E[A]&&!E[A].call?
+E[A]:function(){return E[A].apply(E,arguments)}}(f);else p.player.defineProperty(C,f,{get:function(A){return function(){return E[A]}}(f),set:p.nop,configurable:true});var G=function(){k=new Date/1E3;if(!C.paused){C.currentTime+=k-r;C.dispatchEvent("timeupdate");setTimeout(G,10)}r=k};C.play=function(){this.paused=false;if(C.readyState>=4){r=new Date/1E3;C.dispatchEvent("play");G()}};C.pause=function(){this.paused=true;C.dispatchEvent("pause")};p.player.defineProperty(C,"currentTime",{get:function(){return m},
+set:function(A){m=+A;C.dispatchEvent("timeupdate");return m},configurable:true});p.player.defineProperty(C,"volume",{get:function(){return q},set:function(A){q=+A;C.dispatchEvent("volumechange");return q},configurable:true});p.player.defineProperty(C,"muted",{get:function(){return o},set:function(A){o=+A;C.dispatchEvent("volumechange");return o},configurable:true});p.player.defineProperty(C,"readyState",{get:function(){return t},set:function(A){return t=A},configurable:true});C.addEventListener=function(A,
+O){u[A]||(u[A]=[]);u[A].push(O);return O};C.removeEventListener=function(A,O){var a,c=u[A];if(c){for(a=u[A].length-1;a>=0;a--)O===c[a]&&c.splice(a,1);return O}};C.dispatchEvent=function(A){var O,a=A.type;if(!a){a=A;if(A=p.events.getInterface(a)){O=document.createEvent(A);O.initEvent(a,true,true,window,1)}}if(u[a])for(A=u[a].length-1;A>=0;A--)u[a][A].call(this,O,this)};C.src=i||"";C.duration=0;C.paused=true;C.ended=0;g&&g.events&&p.forEach(g.events,function(A,O){C.addEventListener(O,A,false)});if(d._canPlayType(E.nodeName,
+i)!==false)if(d._setup)d._setup.call(C,g);else{C.readyState=4;C.dispatchEvent("loadedmetadata");C.dispatchEvent("loadeddata");C.dispatchEvent("canplaythrough")}else setTimeout(function(){C.dispatchEvent("error")},0);h=new p.p.init(C,g);if(d._teardown)h.destroy=e(h.destroy,function(){d._teardown.call(C,g)});return h};b.canPlayType=d._canPlayType=d._canPlayType||p.nop;p[l]=p.player.registry[l]=b}};p.player.registry={};p.player.defineProperty=Object.defineProperty||function(l,d,b){l.__defineGetter__(d,
+b.get||p.nop);l.__defineSetter__(d,b.set||p.nop)};p.player.playerQueue=function(){var l=[],d=false;return{next:function(){d=false;l.shift();l[0]&&l[0]()},add:function(b){l.push(function(){d=true;b&&b()});!d&&l[0]()}}};p.smart=function(l,d,b){var h=typeof l==="string"?p.dom.find(l):l,i,g,k,r,m,t="HTMLYouTubeVideoElement HTMLVimeoVideoElement HTMLSoundCloudAudioElement HTMLNullVideoElement".split(" ");if(h){d=typeof d==="string"?[d]:d;l=0;for(m=d.length;l<m;l++){i=d[l];for(g=0;g<t.length;g++)if((r=
+p[t[g]])&&r._canPlaySrc(i)==="probably"){k=r(h);b=p(k,b);setTimeout(function(){k.src=i},0);return b}for(var q in p.player.registry)if(p.player.registry.hasOwnProperty(q))if(p.player.registry[q].canPlayType(h.nodeName,i))return p[q](h,i,b)}var o;q=p.guid("popcorn-video-");g=document.createElement("div");g.style.width="100%";g.style.height="100%";if(d.length===1){o=document.createElement("video");o.id=q;h.appendChild(o);setTimeout(function(){var u=document.createElement("div");u.innerHTML=d[0];o.src=
+u.firstChild.nodeValue},0);return p("#"+q,b)}h.appendChild(g);t='<video id="'+q+'" preload=auto autobuffer>';l=0;for(m=d.length;l<m;l++)t+='<source src="'+d[l]+'">';t+="</video>";g.innerHTML=t;b&&b.events&&b.events.error&&h.addEventListener("error",b.events.error,false);return p("#"+q,b)}else p.error("Specified target `"+l+"` was not found.")}})(Popcorn);(function(p){var e=Object.prototype.hasOwnProperty;p.parsers={};p.parser=function(l,d,b){if(p.protect.natives.indexOf(l.toLowerCase())>=0)p.error("'"+l+"' is a protected function name");else{if(typeof d==="function"&&!b){b=d;d=""}if(!(typeof b!=="function"||typeof d!=="string")){var h={};h[l]=function(i,g,k){if(!i)return this;if(typeof g!=="function"&&!k){k=g;g=null}var r=this;p.xhr({url:i,dataType:d,success:function(m){var t,q,o=0;m=b(m,k).data||[];if(t=m.length){for(;o<t;o++){q=m[o];for(var u in q)e.call(q,
+u)&&r[u]&&r[u](q[u])}g&&g()}}});return this};p.extend(p.p,h);return h}}}})(Popcorn);(function(p,e){function l(b){var h=l.options;b=h.parser[h.strictMode?"strict":"loose"].exec(b);for(var i={},g=14;g--;)i[h.key[g]]=b[g]||"";i[h.q.name]={};i[h.key[12]].replace(h.q.parser,function(k,r,m){if(r)i[h.q.name][r]=m});return i}l.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
+loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};var d={length:0,start:p.nop,end:p.nop};window.MediaError=window.MediaError||function(){function b(h,i){this.code=h||null;this.message=i||""}b.MEDIA_ERR_NONE_ACTIVE=0;b.MEDIA_ERR_ABORTED=1;b.MEDIA_ERR_NETWORK=2;b.MEDIA_ERR_DECODE=3;b.MEDIA_ERR_NONE_SUPPORTED=4;return b}();p._MediaElementProto=function(){var b=
+{},h;Object.prototype.__defineGetter__||(b=e.createElement("div"));b._util={type:"HTML5",TIMEUPDATE_MS:250,MIN_WIDTH:300,MIN_HEIGHT:150,isAttributeSet:function(i){return typeof i==="string"||i===true},parseUri:l};b.addEventListener=function(i,g,k){e.addEventListener(this._eventNamespace+i,g,k)};b.removeEventListener=function(i,g,k){e.removeEventListener(this._eventNamespace+i,g,k)};b.dispatchEvent=function(i){var g=e.createEvent("CustomEvent");g.initCustomEvent(this._eventNamespace+i,false,false,
+{type:i,target:this.parentNode,data:null});e.dispatchEvent(g)};b.load=p.nop;b.canPlayType=function(){return""};b.getBoundingClientRect=function(){return h.getBoundingClientRect()};b.NETWORK_EMPTY=0;b.NETWORK_IDLE=1;b.NETWORK_LOADING=2;b.NETWORK_NO_SOURCE=3;b.HAVE_NOTHING=0;b.HAVE_METADATA=1;b.HAVE_CURRENT_DATA=2;b.HAVE_FUTURE_DATA=3;b.HAVE_ENOUGH_DATA=4;Object.defineProperties(b,{currentSrc:{get:function(){return this.src!==undefined?this.src:""},configurable:true},parentNode:{get:function(){return h},
+set:function(i){h=i},configurable:true},preload:{get:function(){return"auto"},set:p.nop,configurable:true},controls:{get:function(){return true},set:p.nop,configurable:true},poster:{get:function(){return""},set:p.nop,configurable:true},crossorigin:{get:function(){return""},configurable:true},played:{get:function(){return d},configurable:true},seekable:{get:function(){return d},configurable:true},buffered:{get:function(){return d},configurable:true},defaultMuted:{get:function(){return false},configurable:true},
+defaultPlaybackRate:{get:function(){return 1},configurable:true},style:{get:function(){return this.parentNode.style},configurable:true},id:{get:function(){return this.parentNode.id},configurable:true}});return b}})(Popcorn,window.document);(function(p,e,l){function d(){if(e.jwplayer){k=true;for(var t=m.length;t--;){m[t]();delete m[t]}}else setTimeout(d,100)}function b(){if(!r){if(!e.jwplayer){var t=l.createElement("script");t.src="https://jwpsrv.com/library/zaIF4JI9EeK2FSIACpYGxA.js";var q=l.getElementsByTagName("script")[0];q.parentNode.insertBefore(t,q)}r=true;d()}return k}function h(t){m.unshift(t)}function i(t){function q(P){D.unshift(P)}function o(){setTimeout(function(){v.duration=K.getDuration();z.dispatchEvent("durationchange");
+v.readyState=z.HAVE_METADATA;z.dispatchEvent("loadedmetadata");z.dispatchEvent("loadeddata");v.readyState=z.HAVE_FUTURE_DATA;z.dispatchEvent("canplay");for(B=true;D.length;){D[0]();D.shift()}v.readyState=z.HAVE_ENOUGH_DATA;z.dispatchEvent("canplaythrough")},0)}function u(){if(y)y=false;else if(I){I=false;o()}else n()}function E(){if(v.seeking){v.ended=false;v.seeking=false;z.dispatchEvent("timeupdate");z.dispatchEvent("seeked");z.dispatchEvent("canplay");z.dispatchEvent("canplaythrough")}}function C(){K.onPause(u);
+K.onTime(function(){if(!v.ended&&!v.seeking){v.currentTime=K.getPosition();z.dispatchEvent("timeupdate")}});K.onSeek(E);K.onPlay(function(){if(!v.ended)if(T){T=false;if(v.autoplay||!v.paused){v.paused=false;q(a);o()}else{s=I=true;K.pause(true)}}else if(s){s=false;y=true;K.pause(true)}else a()});K.onBufferChange(c);K.onComplete(j);K.play(true)}function f(P){var S={name:"MediaError"};S.message=P.message;S.code=P.code||5;v.error=S;z.dispatchEvent("error")}function G(P){if(z._canPlaySrc(P)){var S=z._util.parseUri(P).queryKey;
+v.controls=S.controls=S.controls||v.controls;v.src=P;if(b()){if(L)L&&K&&K.destroy();jwplayer(F.id).setup({file:P,width:"100%",height:"100%",controls:v.controls});K=jwplayer(F.id);K.onReady(C);K.onError(f);jwplayer.utils.log=function(H,V){if(typeof console!=="undefined"&&typeof console.log!=="undefined")V?console.log(H,V):console.log(H);H==="No suitable players found and fallback enabled"&&f({message:H,code:4})};v.networkState=z.NETWORK_LOADING;z.dispatchEvent("loadstart");z.dispatchEvent("progress")}else h(function(){G(P)})}else{v.error=
+{name:"MediaError",message:"Media Source Not Supported",code:MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED};z.dispatchEvent("error")}}function A(P){v.currentTime=P;if(B){O();K.seek(P)}else q(function(){O();K.seek(P)})}function O(){v.seeking=true;if(v.paused)s=true;z.dispatchEvent("seeking")}function a(){v.paused=false;if(M){M=false;if(v.loop&&!Q||!v.loop){Q=true;z.dispatchEvent("play")}z.dispatchEvent("playing")}}function c(){z.dispatchEvent("progress")}function n(){v.paused=true;if(!M){M=true;z.dispatchEvent("pause")}}
+function j(){if(v.loop)A(0);else{v.ended=true;n();z.dispatchEvent("timeupdate");z.dispatchEvent("ended")}}function w(P){v.volume=P;if(B){K.setVolume(v.volume*100);z.dispatchEvent("volumechange")}else q(function(){w(v.volume)})}function x(P){v.muted=P;if(B){K.setMute(P);z.dispatchEvent("volumechange")}else q(function(){x(v.muted)})}if(!e.postMessage)throw"ERROR: HTMLJWPlayerVideoElement requires window.postMessage";var z=new p._MediaElementProto,F=typeof t==="string"?l.querySelector(t):t,v={src:g,
+networkState:z.NETWORK_EMPTY,readyState:z.HAVE_NOTHING,seeking:false,autoplay:g,preload:g,controls:false,loop:false,poster:g,volume:1,muted:false,currentTime:0,duration:NaN,ended:false,paused:true,error:null},L=false,y=false,s=false,B=false,Q=false,K,M=true,D=[],T=true,I=false;z._eventNamespace=p.guid("HTMLJWPlayerVideoElement::");z.parentNode=F;z._util.type="JWPlayer";z.play=function(){z.dispatchEvent("play");v.paused=false;if(B){if(v.ended){A(0);v.ended=false}K.play(true)}else q(function(){z.play()})};
+z.pause=function(){v.paused=true;B?K.pause(true):q(function(){z.pause()})};Object.defineProperties(z,{src:{get:function(){return v.src},set:function(P){P&&P!==v.src&&G(P)}},autoplay:{get:function(){return v.autoplay},set:function(P){v.autoplay=z._util.isAttributeSet(P)}},loop:{get:function(){return v.loop},set:function(P){v.loop=z._util.isAttributeSet(P)}},width:{get:function(){return z.parentNode.offsetWidth}},height:{get:function(){return z.parentNode.offsetHeight}},currentTime:{get:function(){return v.currentTime},
+set:function(P){A(P)}},duration:{get:function(){return K.getDuration()}},ended:{get:function(){return v.ended}},paused:{get:function(){return v.paused}},seeking:{get:function(){return v.seeking}},readyState:{get:function(){return v.readyState}},networkState:{get:function(){return v.networkState}},volume:{get:function(){return v.volume},set:function(P){if(P<0||P>1)throw"Volume value must be between 0.0 and 1.0";w(P)}},muted:{get:function(){return v.muted},set:function(P){x(z._util.isAttributeSet(P))}},
+error:{get:function(){return v.error}},buffered:{get:function(){var P={start:function(S){if(S===0)return 0;throw"INDEX_SIZE_ERR: DOM Exception 1";},end:function(S){if(S===0){S=K.getDuration();if(!S)return 0;return S*(K.getBuffer()/100)}throw"INDEX_SIZE_ERR: DOM Exception 1";}};Object.defineProperties(P,{length:{get:function(){return 1}}});return P}}});z._canPlaySrc=p.HTMLJWPlayerVideoElement._canPlaySrc;z.canPlayType=p.HTMLJWPlayerVideoElement.canPlayType;return z}var g="",k=false,r=false,m=[];p.HTMLJWPlayerVideoElement=
+function(t){return new i(t)};p.HTMLJWPlayerVideoElement._canPlaySrc=function(){return"probably"};p.HTMLJWPlayerVideoElement.canPlayType=function(){return"probably"}})(Popcorn,window,document);(function(p,e){function l(i){this.startTime=0;this.currentTime=i.currentTime||0;this.duration=i.duration||NaN;this.playInterval=null;this.paused=true;this.playbackRate=this.defaultPlaybackRate=1;this.ended=i.endedCallback||p.nop}function d(i){function g(a){A.push(a)}function k(){if(!C)return 0;return f.currentTime}function r(a){if(a!==k())if(C){G.seeking=true;o.dispatchEvent("seeking");f.seekTo(a);G.ended=false;G.seeking=false;o.dispatchEvent("timeupdate");o.dispatchEvent("seeked");o.dispatchEvent("canplay");
+o.dispatchEvent("canplaythrough")}else g(function(){r(a)})}function m(){o.dispatchEvent("timeupdate")}function t(){G.paused=true;clearInterval(O);o.dispatchEvent("pause")}function q(){if(G.loop){r(0);o.play()}else{G.ended=true;t();o.dispatchEvent("timeupdate");o.dispatchEvent("ended")}}var o=new p._MediaElementProto,u=typeof i==="string"?e.querySelector(i):i,E=e.createElement("div"),C=false,f,G={src:b,networkState:o.NETWORK_EMPTY,readyState:o.HAVE_NOTHING,autoplay:b,preload:b,controls:b,loop:false,
+poster:b,volume:1,muted:false,width:u.width|0?u.width:o._util.MIN_WIDTH,height:u.height|0?u.height:o._util.MIN_HEIGHT,seeking:false,ended:false,paused:1,error:null},A=[],O;o._eventNamespace=p.guid("HTMLNullVideoElement::");o.parentNode=u;o._util.type="NullVideo";o.play=function(){if(C){f.play();if(G.paused){if(G.paused===1){G.paused=false;o.dispatchEvent("play");o.dispatchEvent("playing")}else{if(G.ended){r(0);G.ended=false}if(G.paused){G.paused=false;G.loop||o.dispatchEvent("play");o.dispatchEvent("playing")}}O=
+setInterval(m,o._util.TIMEUPDATE_MS)}}else g(function(){o.play()})};o.pause=function(){if(C){f.pause();G.paused||t()}else g(function(){o.pause()})};Object.defineProperties(o,{src:{get:function(){return G.src},set:function(a){if(a&&a!==G.src)if(o._canPlaySrc(a)){G.src=a;if(C)if(C&&f){f.pause();f=null;u.removeChild(E);E=e.createElement("div")}E.width=G.width;E.height=G.height;u.appendChild(E);a=h.exec(a);f=new l({currentTime:+a[1],duration:+a[2],endedCallback:q});o.dispatchEvent("loadstart");o.dispatchEvent("progress");
+o.dispatchEvent("durationchange");C=true;G.networkState=o.NETWORK_IDLE;G.readyState=o.HAVE_METADATA;o.dispatchEvent("loadedmetadata");o.dispatchEvent("loadeddata");G.readyState=o.HAVE_FUTURE_DATA;o.dispatchEvent("canplay");G.readyState=o.HAVE_ENOUGH_DATA;for(o.dispatchEvent("canplaythrough");A.length;){a=A.shift();a()}G.autoplay&&o.play()}else{G.error={name:"MediaError",message:"Media Source Not Supported",code:MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED};o.dispatchEvent("error")}}},autoplay:{get:function(){return G.autoplay},
+set:function(a){G.autoplay=o._util.isAttributeSet(a)}},loop:{get:function(){return G.loop},set:function(a){G.loop=o._util.isAttributeSet(a)}},width:{get:function(){return E.width},set:function(a){E.width=a;G.width=E.width}},height:{get:function(){return E.height},set:function(a){E.height=a;G.height=E.height}},currentTime:{get:function(){return k()},set:function(a){r(a)}},duration:{get:function(){return f?f.duration:NaN}},ended:{get:function(){return G.ended}},paused:{get:function(){return G.paused}},
+seeking:{get:function(){return G.seeking}},readyState:{get:function(){return G.readyState}},networkState:{get:function(){return G.networkState}},volume:{get:function(){return G.volume},set:function(a){if(a<0||a>1)throw"Volume value must be between 0.0 and 1.0";G.volume=a;o.dispatchEvent("volumechange")}},muted:{get:function(){return G.muted},set:function(a){a=o._util.isAttributeSet(a);G.muted=a;o.dispatchEvent("volumechange")}},playbackRate:{get:function(){return f.playbackRate},set:function(a){f.playbackRate=
+a;o.dispatchEvent("ratechange")}},error:{get:function(){return G.error}}});o._canPlaySrc=p.HTMLNullVideoElement._canPlaySrc;o.canPlayType=p.HTMLNullVideoElement.canPlayType;return o}var b="",h=/#t=(\d+\.?\d*)?,?(\d+\.?\d*)/;l.prototype={play:function(){var i=this;if(this.paused){this.paused=false;this.startTime=Date.now();this.playInterval=setInterval(function(){i.currentTime+=(Date.now()-i.startTime)/(1E3/i.playbackRate);i.startTime=Date.now();if(i.currentTime>=i.duration){i.pause(i.duration);i.ended()}i.currentTime<
+0&&i.pause(0)},16)}},pause:function(){if(!this.paused){this.paused=true;clearInterval(this.playInterval)}},seekTo:function(i){i=i<0?0:i;this.currentTime=i=i>this.duration?this.duration:i}};p.HTMLNullVideoElement=function(i){return new d(i)};p.HTMLNullVideoElement._canPlaySrc=function(i){return h.test(i)?"probably":b};p.HTMLNullVideoElement.canPlayType=function(i){return i==="video/x-nullvideo"?"probably":b}})(Popcorn,document);(function(p,e,l){function d(k){var r=this,m=k.src.split("?")[0];if(m.substr(0,2)==="//")m=e.location.protocol+m;"play pause paused seekTo unload getCurrentTime getDuration getVideoEmbedCode getVideoHeight getVideoWidth getVideoUrl getColor setColor setLoop getVolume setVolume addEventListener".split(" ").forEach(function(t){r[t]=function(q){q=JSON.stringify({method:t,value:q});k.contentWindow&&k.contentWindow.postMessage(q,m)}})}function b(k){function r(y){z.unshift(y)}function m(y){var s=c.duration;
+if(s!==y){c.duration=y;A.dispatchEvent("durationchange");if(isNaN(s)){c.networkState=A.NETWORK_IDLE;c.readyState=A.HAVE_METADATA;A.dispatchEvent("loadedmetadata");A.dispatchEvent("loadeddata");c.readyState=A.HAVE_FUTURE_DATA;A.dispatchEvent("canplay");c.readyState=A.HAVE_ENOUGH_DATA;A.dispatchEvent("canplaythrough");c.autoplay&&A.play();for(y=z.length;y--;){z[y]();delete z[y]}}}}function t(y){if(n){c.seeking=true;A.dispatchEvent("seeking");w.seekTo(y)}else r(function(){t(y)})}function q(){A.dispatchEvent("timeupdate")}
+function o(y){(c.currentTime=y)!==L&&A.dispatchEvent("timeupdate");L=c.currentTime}function u(y){if(y.origin===g){var s;try{s=JSON.parse(y.data)}catch(B){console.warn(B)}if(s.player_id==j)switch(s.event){case "ready":w=new d(a);w.addEventListener("loadProgress");w.addEventListener("pause");w.setVolume(0);w.play();break;case "loadProgress":if(parseFloat(s.data.duration)>0&&!n){n=true;w.pause()}break;case "pause":w.setVolume(1);e.removeEventListener("message",u,false);e.addEventListener("message",E,
+false);w.addEventListener("loadProgress");w.addEventListener("playProgress");w.addEventListener("play");w.addEventListener("pause");w.addEventListener("finish");w.addEventListener("seek");w.getDuration();c.networkState=A.NETWORK_LOADING;A.dispatchEvent("loadstart");A.dispatchEvent("progress")}}}function E(y){if(y.origin===g){var s;try{s=JSON.parse(y.data)}catch(B){console.warn(B)}if(s.player_id==j){switch(s.method){case "getCurrentTime":o(parseFloat(s.value));break;case "getDuration":m(parseFloat(s.value));
+break;case "getVolume":y=parseFloat(s.value);if(c.volume!==y){c.volume=y;A.dispatchEvent("volumechange")}}switch(s.event){case "loadProgress":A.dispatchEvent("progress");m(parseFloat(s.data.duration));break;case "playProgress":o(parseFloat(s.data.seconds));break;case "play":c.ended&&t(0);if(!v){v=setInterval(C,h);c.loop&&A.dispatchEvent("play")}F=setInterval(q,A._util.TIMEUPDATE_MS);c.paused=false;if(x){x=false;c.loop||A.dispatchEvent("play");A.dispatchEvent("playing")}break;case "pause":c.paused=
+true;if(!x){x=true;clearInterval(F);A.dispatchEvent("pause")}break;case "finish":if(c.loop){t(0);A.play()}else{c.ended=true;A.dispatchEvent("ended")}break;case "seek":o(parseFloat(s.data.seconds));c.seeking=false;A.dispatchEvent("timeupdate");A.dispatchEvent("seeked");A.dispatchEvent("canplay");A.dispatchEvent("canplaythrough")}}}}function C(){w.getCurrentTime()}function f(y){c.volume=y;if(n){w.setVolume(y);A.dispatchEvent("volumechange")}else r(function(){f(y)})}function G(y){if(n)if(y){c.muted=
+c.volume;f(0)}else{c.muted=0;f(c.muted)}else{c.muted=y?1:0;r(function(){G(y)})}}if(!e.postMessage)throw"ERROR: HTMLVimeoVideoElement requires window.postMessage";var A=new p._MediaElementProto,O=typeof k==="string"?p.dom.find(k):k,a=l.createElement("iframe"),c={src:i,networkState:A.NETWORK_EMPTY,readyState:A.HAVE_NOTHING,seeking:false,autoplay:i,preload:i,controls:false,loop:false,poster:i,volume:1,muted:0,currentTime:0,duration:NaN,ended:false,paused:true,error:null},n=false,j=p.guid(),w,x=true,
+z=[],F,v,L=0;A._eventNamespace=p.guid("HTMLVimeoVideoElement::");A.parentNode=O;A._util.type="Vimeo";A.play=function(){c.paused=false;n?w.play():r(function(){A.play()})};A.pause=function(){c.paused=true;n?w.pause():r(function(){A.pause()})};Object.defineProperties(A,{src:{get:function(){return c.src},set:function(y){if(y&&y!==c.src)if(A._canPlaySrc(y)){c.src=y;if(n)if(n&&w){clearInterval(v);w.pause();e.removeEventListener("message",E,false);O.removeChild(a);a=l.createElement("iframe")}n=false;y=A._util.parseUri(y);
+var s=y.queryKey,B,Q=["api=1","player_id="+j,"title=0","byline=0","portrait=0"];c.loop=s.loop==="1"||c.loop;delete s.loop;c.autoplay=s.autoplay==="1"||c.autoplay;delete s.autoplay;y=g+"/video/"+/\d+$/.exec(y.path)+"?";for(B in s)s.hasOwnProperty(B)&&Q.push(encodeURIComponent(B)+"="+encodeURIComponent(s[B]));y+=Q.join("&");a.id=j;a.style.width="100%";a.style.height="100%";a.frameBorder=0;a.webkitAllowFullScreen=true;a.mozAllowFullScreen=true;a.allowFullScreen=true;O.appendChild(a);a.src=y;e.addEventListener("message",
+u,false)}else{c.error={name:"MediaError",message:"Media Source Not Supported",code:MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED};A.dispatchEvent("error")}}},autoplay:{get:function(){return c.autoplay},set:function(y){c.autoplay=A._util.isAttributeSet(y)}},loop:{get:function(){return c.loop},set:function(y){c.loop=A._util.isAttributeSet(y)}},width:{get:function(){return A.parentNode.offsetWidth}},height:{get:function(){return A.parentNode.offsetHeight}},currentTime:{get:function(){return c.currentTime},
+set:function(y){t(y)}},duration:{get:function(){return c.duration}},ended:{get:function(){return c.ended}},paused:{get:function(){return c.paused}},seeking:{get:function(){return c.seeking}},readyState:{get:function(){return c.readyState}},networkState:{get:function(){return c.networkState}},volume:{get:function(){return c.muted>0?c.muted:c.volume},set:function(y){if(y<0||y>1)throw"Volume value must be between 0.0 and 1.0";f(y)}},muted:{get:function(){return c.muted>0},set:function(y){G(A._util.isAttributeSet(y))}},
+error:{get:function(){return c.error}}});A._canPlaySrc=p.HTMLVimeoVideoElement._canPlaySrc;A.canPlayType=p.HTMLVimeoVideoElement.canPlayType;return A}var h=16,i="",g="https://player.vimeo.com";p.HTMLVimeoVideoElement=function(k){return new b(k)};p.HTMLVimeoVideoElement._canPlaySrc=function(k){return/player.vimeo.com\/video\/\d+/.test(k)||/vimeo.com\/\d+/.test(k)?"probably":i};p.HTMLVimeoVideoElement.canPlayType=function(k){return k==="video/x-vimeo"?"probably":i}})(Popcorn,window,document);(function(p,e){function l(){return"maybe"}function d(b,h){var i=typeof b==="string"?e.querySelector(b):b,g=e.createElement(h);i.appendChild(g);g._canPlaySrc=l;return g}p.HTMLVideoElement=function(b){return d(b,"video")};p.HTMLVideoElement._canPlaySrc=l;p.HTMLAudioElement=function(b){return d(b,"audio")};p.HTMLAudioElement._canPlaySrc=l})(Popcorn,window.document);(function(p,e,l){function d(){var u;if(YT.loaded)for(t=true;o.length;){u=o.shift();u()}else setTimeout(d,250)}function b(){var u;if(!q){if(e.YT)d();else{u=l.createElement("script");u.addEventListener("load",d,false);u.src="https://www.youtube.com/iframe_api";l.head.appendChild(u)}q=true}return t}function h(u){o.push(u)}function i(u){function E(J){W.push(J)}function C(){R.pauseVideo();j("play",C);n("play",K)}function f(){n("pause",M);j("pause",f)}function G(){var J=function(){if(R.isMuted()){n("play",
+c);R.playVideo()}else setTimeout(J,0)};V=true;R.mute();J()}function A(J){var N={name:"MediaError"};switch(J.data){case 2:N.message="Invalid video parameter.";N.code=MediaError.MEDIA_ERR_ABORTED;break;case 5:N.message="The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.";N.code=MediaError.MEDIA_ERR_DECODE;case 100:N.message="Video not found.";N.code=MediaError.MEDIA_ERR_NETWORK;break;case 101:case 150:N.message="Video not usable.";N.code=
+MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED;break;default:N.message="Unknown error.";N.code=5}H.error=N;I.dispatchEvent("error")}function O(){n("play",K);n("pause",M);if(H.autoplay||!H.paused){j("play",O);H.paused=false;E(function(){H.paused||K()})}H.muted||R.unMute();H.readyState=I.HAVE_METADATA;I.dispatchEvent("loadedmetadata");aa=setInterval(v,g);I.dispatchEvent("loadeddata");H.readyState=I.HAVE_FUTURE_DATA;I.dispatchEvent("canplay");U=true;for(ba=setInterval(L,50);W.length;){W[0]();W.shift()}H.readyState=
+I.HAVE_ENOUGH_DATA;I.dispatchEvent("canplaythrough")}function a(){j("pause",a);if(R.getCurrentTime()>0)setTimeout(a,0);else if(H.autoplay||!H.paused){n("play",O);R.playVideo()}else O()}function c(){j("play",c);if(R.getCurrentTime()===0)setTimeout(c,0);else{n("pause",a);R.seekTo(0);R.pauseVideo()}}function n(J,N){I.addEventListener("youtube-"+J,N,false)}function j(J,N){I.removeEventListener("youtube-"+J,N,false)}function w(J){I.dispatchEvent("youtube-"+J)}function x(){H.networkState=I.NETWORK_LOADING;
+I.dispatchEvent("waiting")}function z(J){switch(J.data){case YT.PlayerState.ENDED:w("ended");break;case YT.PlayerState.PLAYING:w("play");break;case YT.PlayerState.PAUSED:R.getDuration()!==R.getCurrentTime()&&w("pause");break;case YT.PlayerState.BUFFERING:w("buffering")}J.data!==YT.PlayerState.BUFFERING&&ca===YT.PlayerState.BUFFERING&&I.dispatchEvent("progress");ca=J.data}function F(J){if(I._canPlaySrc(J)){H.src=J;if(b()){if(V)if(U){if(V&&R){j("buffering",x);j("ended",D);j("play",K);j("pause",M);M();
+Z=U=false;H.currentTime=0;W=[];clearInterval(aa);clearInterval(ba);R.stopVideo();R.clearVideo();R.destroy();S=l.createElement("div")}}else{E(function(){F(J)});return}P.appendChild(S);var N=I._util.parseUri(J).queryKey;delete N.v;H.autoplay=N.autoplay==="1"||H.autoplay;delete N.autoplay;H.loop=N.loop==="1"||H.loop;delete N.loop;N.rel=N.rel||0;N.modestbranding=N.modestbranding||1;N.iv_load_policy=N.iv_load_policy||3;N.disablekb=N.disablekb||1;N.showinfo=N.showinfo||0;var ea=e.location.protocol==="file:"?
+"*":e.location.protocol+"//"+e.location.host;N.origin=N.origin||ea;N.controls=N.controls||H.controls?2:0;H.controls=N.controls;N.wmode=N.wmode||"opaque";J=r.exec(J)[1];p.getJSONP("https://gdata.youtube.com/feeds/api/videos/"+J+"?v=2&alt=jsonc&callback=?",function(X){if(X.error)console.warn("failed to retreive duration data, reason: "+X.error.message);else if(X.data){H.duration=X.data.duration;I.dispatchEvent("durationchange");R=new YT.Player(S,{width:"100%",height:"100%",wmode:N.wmode,videoId:J,playerVars:N,
+events:{onReady:G,onError:A,onStateChange:z}});H.networkState=I.NETWORK_LOADING;I.dispatchEvent("loadstart");I.dispatchEvent("progress")}else console.warn("failed to retreive duration data, reason: no response data")})}else h(function(){F(J)})}else{H.error={name:"MediaError",message:"Media Source Not Supported",code:MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED};I.dispatchEvent("error")}}function v(){var J=R.getCurrentTime();if(H.seeking)m(J-H.currentTime)<1&&Q();else{if(m(H.currentTime-J)>g){B();Q()}H.currentTime=
+J}}function L(){var J=R.getVideoLoadedFraction();if(J&&$!==J){$=J;I.dispatchEvent("progress")}}function y(J){if(J!==H.currentTime){H.currentTime=J;if(U){B();R.seekTo(J)}else E(function(){B();R.seekTo(J)})}}function s(){I.dispatchEvent("timeupdate")}function B(){n("pause",f);j("pause",M);H.seeking=true;I.dispatchEvent("seeking")}function Q(){H.ended=false;H.seeking=false;I.dispatchEvent("timeupdate");I.dispatchEvent("seeked");I.dispatchEvent("canplay");I.dispatchEvent("canplaythrough")}function K(){if(H.ended){y(0);
+H.ended=false}da=setInterval(s,I._util.TIMEUPDATE_MS);H.paused=false;if(Y){Y=false;if(H.loop&&!Z||!H.loop){Z=true;I.dispatchEvent("play")}I.dispatchEvent("playing")}}function M(){H.paused=true;if(!Y){Y=true;clearInterval(da);I.dispatchEvent("pause")}}function D(){if(H.loop){y(0);I.play()}else{H.ended=true;M();n("play",C);j("play",K);I.dispatchEvent("timeupdate");I.dispatchEvent("ended")}}function T(J){H.muted=J;if(U){R[J?"mute":"unMute"]();I.dispatchEvent("volumechange")}else E(function(){T(H.muted)})}
+if(!e.postMessage)throw"ERROR: HTMLYouTubeVideoElement requires window.postMessage";var I=new p._MediaElementProto,P=typeof u==="string"?l.querySelector(u):u,S=l.createElement("div"),H={src:k,networkState:I.NETWORK_EMPTY,readyState:I.HAVE_NOTHING,seeking:false,autoplay:k,preload:k,controls:false,loop:false,poster:k,volume:1,muted:false,currentTime:0,duration:NaN,ended:false,paused:true,error:null},V=false,U=false,Z=false,R,Y=true,W=[],ca=-1,ba,$=0,aa,da;I._eventNamespace=p.guid("HTMLYouTubeVideoElement::");
+I.parentNode=P;I._util.type="YouTube";n("buffering",x);n("ended",D);I.play=function(){H.paused=false;U?R.playVideo():E(function(){I.play()})};I.pause=function(){H.paused=true;if(U){f();R.pauseVideo()}else E(function(){I.pause()})};Object.defineProperties(I,{src:{get:function(){return H.src},set:function(J){J&&J!==H.src&&F(J)}},autoplay:{get:function(){return H.autoplay},set:function(J){H.autoplay=I._util.isAttributeSet(J)}},loop:{get:function(){return H.loop},set:function(J){H.loop=I._util.isAttributeSet(J)}},
+width:{get:function(){return I.parentNode.offsetWidth}},height:{get:function(){return I.parentNode.offsetHeight}},currentTime:{get:function(){return H.currentTime},set:function(J){y(J)}},duration:{get:function(){return H.duration}},ended:{get:function(){return H.ended}},paused:{get:function(){return H.paused}},seeking:{get:function(){return H.seeking}},readyState:{get:function(){return H.readyState}},networkState:{get:function(){return H.networkState}},volume:{get:function(){return H.volume},set:function(J){if(J<
+0||J>1)throw"Volume value must be between 0.0 and 1.0";H.volume=J;if(U){R.setVolume(H.volume*100);I.dispatchEvent("volumechange")}else E(function(){I.volume=J})}},muted:{get:function(){return H.muted},set:function(J){T(I._util.isAttributeSet(J))}},error:{get:function(){return H.error}},buffered:{get:function(){var J={start:function(N){if(N===0)return 0;throw"INDEX_SIZE_ERR: DOM Exception 1";},end:function(N){if(N===0){if(!H.duration)return 0;return H.duration*$}throw"INDEX_SIZE_ERR: DOM Exception 1";
+}};Object.defineProperties(J,{length:{get:function(){return 1}}});return J},configurable:true}});I._canPlaySrc=p.HTMLYouTubeVideoElement._canPlaySrc;I.canPlayType=p.HTMLYouTubeVideoElement.canPlayType;return I}var g=10,k="",r=/^.*(?:\/|v=)(.{11})/,m=Math.abs,t=false,q=false,o=[];p.HTMLYouTubeVideoElement=function(u){return new i(u)};p.HTMLYouTubeVideoElement._canPlaySrc=function(u){return/(?:http:\/\/www\.|http:\/\/|www\.|\.|^)(youtu).*(?:\/|v=)(.{11})/.test(u)?"probably":k};p.HTMLYouTubeVideoElement.canPlayType=
+function(u){return u==="video/x-youtube"?"probably":k}})(Popcorn,window,document);(function(p,e,l){function d(){if(!r){p.getScript("https://w.soundcloud.com/player/api.js",function(){p.getScript("https://connect.soundcloud.com/sdk.js",function(){k=true;SC.initialize({client_id:"PRaNFlda6Bhf5utPjUsptg"});for(var t=m.length;t--;){m[t]();delete m[t]}})});r=true}return k}function b(t){m.unshift(t)}function h(t){function q(D){B.unshift(D)}function o(){s.bind(SC.Widget.Events.LOAD_PROGRESS,function(D){O({type:"loadProgress",data:D.currentPosition/1E3})});s.bind(SC.Widget.Events.PLAY_PROGRESS,
+function(D){O({type:"playProgress",data:D.currentPosition/1E3})});s.bind(SC.Widget.Events.PLAY,function(){O({type:"play"})});s.bind(SC.Widget.Events.PAUSE,function(){O({type:"pause"})});s.bind(SC.Widget.Events.SEEK,function(){s.getPosition(function(D){D=D/1E3;if(v.seeking)if(Math.floor(D)!==Math.floor(v.currentTime))s.seekTo(v.currentTime*1E3);else{v.ended=false;v.seeking=false;x.dispatchEvent("timeupdate");x.dispatchEvent("seeked");x.dispatchEvent("canplay");x.dispatchEvent("canplaythrough")}else O({type:"seek",
+data:D})})});s.bind(SC.Widget.Events.FINISH,function(){O({type:"finish"})});L=true;s.getDuration(E)}function u(){s.bind(SC.Widget.Events.PLAY_PROGRESS,function(D){s.setVolume(0);if(D.currentPosition>0){s.unbind(SC.Widget.Events.PLAY_PROGRESS);s.bind(SC.Widget.Events.PAUSE,function(){s.unbind(SC.Widget.Events.PAUSE);s.setVolume(100);s.bind(SC.Widget.Events.SEEK,function(){s.unbind(SC.Widget.Events.SEEK);o()});s.seekTo(0)});s.pause()}});s.play()}function E(D){D/=1E3;var T=v.duration;if(T!==D){v.duration=
+D;x.dispatchEvent("durationchange");if(isNaN(T)){v.networkState=x.NETWORK_IDLE;v.readyState=x.HAVE_METADATA;x.dispatchEvent("loadedmetadata");x.dispatchEvent("loadeddata");v.readyState=x.HAVE_FUTURE_DATA;x.dispatchEvent("canplay");v.readyState=x.HAVE_ENOUGH_DATA;x.dispatchEvent("canplaythrough");for(D=B.length;D--;){B[D]();delete B[D]}v.paused&&v.autoplay&&x.play()}}}function C(D){function T(){v.seeking=true;x.dispatchEvent("seeking");s.seekTo(D)}v.currentTime=D;D*=1E3;L?T():addMediaReadyCallback(T)}
+function f(){v.paused=true;if(!y){y=true;clearInterval(Q);x.dispatchEvent("pause")}}function G(){x.dispatchEvent("timeupdate")}function A(D){v.currentTime=D;D!==M&&x.dispatchEvent("timeupdate");M=D}function O(D){switch(D.type){case "loadProgress":x.dispatchEvent("progress");break;case "playProgress":A(D.data);break;case "play":if(!K){K=setInterval(a,i);v.loop&&x.dispatchEvent("play")}Q=setInterval(G,x._util.TIMEUPDATE_MS);v.paused=false;if(y){y=false;v.loop||x.dispatchEvent("play");x.dispatchEvent("playing")}break;
+case "pause":f();break;case "finish":if(v.loop){C(0);x.play()}else{v.ended=true;x.pause();f();x.dispatchEvent("timeupdate");x.dispatchEvent("ended")}break;case "seek":A(D.data)}}function a(){v.ended||s.getPosition(function(D){A(D/1E3)})}function c(D){if(x._canPlaySrc(D)){v.src=D;if(L)if(L&&s){clearInterval(K);s.pause();s.unbind(SC.Widget.Events.READY);s.unbind(SC.Widget.Events.LOAD_PROGRESS);s.unbind(SC.Widget.Events.PLAY_PROGRESS);s.unbind(SC.Widget.Events.PLAY);s.unbind(SC.Widget.Events.PAUSE);
+s.unbind(SC.Widget.Events.SEEK);s.unbind(SC.Widget.Events.FINISH);z.removeChild(F);F=l.createElement("iframe")}if(d()){L=false;SC.get("/resolve",{url:D},function(T){var I;if(T.errors){I={name:"MediaError"};if(T.errors[0])if(T.errors[0].error_message==="404 - Not Found"){I.message="Video not found.";I.code=MediaError.MEDIA_ERR_NETWORK}v.error=I;x.dispatchEvent("error")}F.id=p.guid("soundcloud-");F.width=v.width;F.height=v.height;F.frameBorder=0;F.webkitAllowFullScreen=true;F.mozAllowFullScreen=true;
+F.allowFullScreen=true;w(v.controls);z.appendChild(F);F.onload=function(){F.onload=null;s=SC.Widget(F);s.bind(SC.Widget.Events.READY,u);v.networkState=x.NETWORK_LOADING;x.dispatchEvent("loadstart");x.dispatchEvent("progress")};F.src="https://w.soundcloud.com/player/?url="+T.uri+"&show_artwork=false&buying=false&liking=false&sharing=false&download=false&show_comments=false&show_user=false&single_active=false"})}else b(function(){c(D)})}else{v.error={name:"MediaError",message:"Media Source Not Supported",
+code:MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED};x.dispatchEvent("error")}}function n(D){v.volume=D;if(L){s.setVolume(D);x.dispatchEvent("volumechange")}else q(function(){n(D)})}function j(D){if(L)if(D){v.muted=v.volume;n(0)}else{v.muted=0;n(v.muted)}else{v.muted=D?1:0;q(function(){j(D)})}}function w(D){if(L){F.style.position="absolute";F.style.visibility=D?"visible":"hidden"}else{F.style.opacity=D?"1":"0";F.style.pointerEvents=D?"auto":"none"}v.controls=D}if(!e.postMessage)throw"ERROR: HTMLSoundCloudAudioElement requires window.postMessage";
+var x=new p._MediaElementProto,z=typeof t==="string"?p.dom.find(t):t,F=l.createElement("iframe"),v={src:g,networkState:x.NETWORK_EMPTY,readyState:x.HAVE_NOTHING,seeking:false,autoplay:g,preload:g,controls:false,loop:false,poster:g,volume:100,muted:0,currentTime:0,duration:NaN,ended:false,paused:true,width:z.width|0?z.width:x._util.MIN_WIDTH,height:z.height|0?z.height:x._util.MIN_HEIGHT,error:null},L=false,y=true,s,B=[],Q,K,M=0;x._eventNamespace=p.guid("HTMLSoundCloudAudioElement::");x.parentNode=
+z;x._util.type="SoundCloud";x.play=function(){v.paused=false;if(L){v.ended&&C(0);s.play()}else q(function(){x.play()})};x.pause=function(){v.paused=true;L?s.pause():q(function(){x.pause()})};Object.defineProperties(x,{src:{get:function(){return v.src},set:function(D){D&&D!==v.src&&c(D)}},autoplay:{get:function(){return v.autoplay},set:function(D){v.autoplay=x._util.isAttributeSet(D)}},loop:{get:function(){return v.loop},set:function(D){v.loop=x._util.isAttributeSet(D)}},width:{get:function(){return F.width},
+set:function(D){F.width=D;v.width=F.width}},height:{get:function(){return F.height},set:function(D){F.height=D;v.height=F.height}},currentTime:{get:function(){return v.currentTime},set:function(D){C(D)}},duration:{get:function(){return v.duration}},ended:{get:function(){return v.ended}},paused:{get:function(){return v.paused}},seeking:{get:function(){return v.seeking}},readyState:{get:function(){return v.readyState}},networkState:{get:function(){return v.networkState}},volume:{get:function(){return(v.muted>
+0?v.muted:v.volume)/100},set:function(D){if(D<0||D>1)throw"Volume value must be between 0.0 and 1.0";D*=100;n(D)}},muted:{get:function(){return v.muted>0},set:function(D){j(x._util.isAttributeSet(D))}},error:{get:function(){return v.error}},controls:{get:function(){return v.controls},set:function(D){w(!!D)}}});x._canPlaySrc=p.HTMLSoundCloudAudioElement._canPlaySrc;x.canPlayType=p.HTMLSoundCloudAudioElement.canPlayType;return x}var i=16,g="",k=false,r=false,m=[];p.HTMLSoundCloudAudioElement=function(t){return new h(t)};
+p.HTMLSoundCloudAudioElement._canPlaySrc=function(t){return/(?:https?:\/\/www\.|https?:\/\/|www\.|\.|^)(soundcloud)/.test(t)?"probably":g};p.HTMLSoundCloudAudioElement.canPlayType=function(t){return t==="audio/x-soundcloud"?"probably":g}})(Popcorn,window,document);(function(p){var e=function(l,d){var b=0,h=0,i;p.forEach(d.classes,function(g,k){i=[];if(g==="parent")i[0]=document.querySelectorAll("#"+d.target)[0].parentNode;else i=document.querySelectorAll("#"+d.target+" "+g);b=0;for(h=i.length;b<h;b++)i[b].classList.toggle(k)})};p.compose("applyclass",{manifest:{about:{name:"Popcorn applyclass Effect",version:"0.1",author:"@scottdowne",website:"scottdowne.wordpress.com"},options:{}},_setup:function(l){l.classes={};l.applyclass=l.applyclass||"";for(var d=l.applyclass.replace(/\s/g,
+"").split(","),b=[],h=0,i=d.length;h<i;h++){b=d[h].split(":");if(b[0])l.classes[b[0]]=b[1]||""}},start:e,end:e})})(Popcorn);(function(p){function e(d,b){if(d.map)d.map.div.style.display=b;else setTimeout(function(){e(d,b)},10)}var l=1;p.plugin("openmap",function(d){var b,h,i,g,k,r,m,t,q=document.getElementById(d.target);b=document.createElement("div");b.id="openmapdiv"+l;b.style.width="100%";b.style.height="100%";l++;q&&q.appendChild(b);t=function(){if(window.OpenLayers&&window.OpenLayers.Layer.Stamen){if(d.location){location=new OpenLayers.LonLat(0,0);p.getJSONP("//tinygeocoder.com/create-api.php?q="+d.location+"&callback=jsonp",
+function(u){h=new OpenLayers.LonLat(u[1],u[0])})}else h=new OpenLayers.LonLat(d.lng,d.lat);d.type=d.type||"ROADMAP";switch(d.type){case "SATELLITE":d.map=new OpenLayers.Map({div:b,maxResolution:0.28125,tileSize:new OpenLayers.Size(512,512)});var o=new OpenLayers.Layer.WorldWind("LANDSAT","//worldwind25.arc.nasa.gov/tile/tile.aspx",2.25,4,{T:"105"});d.map.addLayer(o);g=new OpenLayers.Projection("EPSG:4326");i=new OpenLayers.Projection("EPSG:4326");break;case "TERRAIN":g=new OpenLayers.Projection("EPSG:4326");
+i=new OpenLayers.Projection("EPSG:4326");d.map=new OpenLayers.Map({div:b,projection:i});o=new OpenLayers.Layer.WMS("USGS Terraserver","//terraserver-usa.org/ogcmap.ashx?",{layers:"DRG"});d.map.addLayer(o);break;case "STAMEN-TONER":case "STAMEN-WATERCOLOR":case "STAMEN-TERRAIN":o=d.type.replace("STAMEN-","").toLowerCase();o=new OpenLayers.Layer.Stamen(o);g=new OpenLayers.Projection("EPSG:4326");i=new OpenLayers.Projection("EPSG:900913");h=h.transform(g,i);d.map=new OpenLayers.Map({div:b,projection:i,
+displayProjection:g,controls:[new OpenLayers.Control.Navigation,new OpenLayers.Control.PanPanel,new OpenLayers.Control.ZoomPanel]});d.map.addLayer(o);break;default:i=new OpenLayers.Projection("EPSG:900913");g=new OpenLayers.Projection("EPSG:4326");h=h.transform(g,i);d.map=new OpenLayers.Map({div:b,projection:i,displayProjection:g});o=new OpenLayers.Layer.OSM;d.map.addLayer(o)}if(d.map){d.map.setCenter(h,d.zoom||10);d.map.div.style.display="none"}}else setTimeout(function(){t()},50)};t();return{_setup:function(o){window.OpenLayers||
+p.getScript("//openlayers.org/api/OpenLayers.js",function(){p.getScript("//maps.stamen.com/js/tile.stamen.js")});var u=function(){if(o.map){o.zoom=o.zoom||2;if(o.zoom&&typeof o.zoom!=="number")o.zoom=+o.zoom;o.map.setCenter(h,o.zoom);if(o.markers){var E=OpenLayers.Util.extend({},OpenLayers.Feature.Vector.style["default"]),C=function(j){clickedFeature=j.feature;if(clickedFeature.attributes.text){m=new OpenLayers.Popup.FramedCloud("featurePopup",clickedFeature.geometry.getBounds().getCenterLonLat(),
+new OpenLayers.Size(120,250),clickedFeature.attributes.text,null,true,function(){r.unselect(this.feature)});clickedFeature.popup=m;m.feature=clickedFeature;o.map.addPopup(m)}},f=function(j){feature=j.feature;if(feature.popup){m.feature=null;o.map.removePopup(feature.popup);feature.popup.destroy();feature.popup=null}},G=function(j){p.getJSONP("//tinygeocoder.com/create-api.php?q="+j.location+"&callback=jsonp",function(w){w=(new OpenLayers.Geometry.Point(w[1],w[0])).transform(g,i);var x=OpenLayers.Util.extend({},
+E);if(!j.size||isNaN(j.size))j.size=14;x.pointRadius=j.size;x.graphicOpacity=1;x.externalGraphic=j.icon;w=new OpenLayers.Feature.Vector(w,null,x);if(j.text)w.attributes={text:j.text};k.addFeatures([w])})};k=new OpenLayers.Layer.Vector("Point Layer",{style:E});o.map.addLayer(k);for(var A=0,O=o.markers.length;A<O;A++){var a=o.markers[A];if(a.text)if(!r){r=new OpenLayers.Control.SelectFeature(k);o.map.addControl(r);r.activate();k.events.on({featureselected:C,featureunselected:f})}if(a.location)G(a);
+else{var c=(new OpenLayers.Geometry.Point(a.lng,a.lat)).transform(g,i),n=OpenLayers.Util.extend({},E);if(!a.size||isNaN(a.size))a.size=14;n.pointRadius=a.size;n.graphicOpacity=1;n.externalGraphic=a.icon;c=new OpenLayers.Feature.Vector(c,null,n);if(a.text)c.attributes={text:a.text};k.addFeatures([c])}}}}else setTimeout(function(){u()},13)};u()},start:function(o,u){e(u,"block")},end:function(o,u){e(u,"none")},_teardown:function(){q&&q.removeChild(b);b=map=h=i=g=k=r=m=null}}},{about:{name:"Popcorn OpenMap Plugin",
 version:"0.3",author:"@mapmeld",website:"mapadelsur.blogspot.com"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},target:"map-container",type:{elem:"select",options:["ROADMAP","SATELLITE","TERRAIN"],label:"Map Type",optional:true},zoom:{elem:"input",type:"number",label:"Zoom","default":2},lat:{elem:"input",type:"text",label:"Lat",optional:true},lng:{elem:"input",type:"text",label:"Lng",optional:true},location:{elem:"input",type:"text",label:"Location",
-"default":"Toronto, Ontario, Canada"},markers:{elem:"input",type:"text",label:"List Markers",optional:true}}})})(Popcorn);document.addEventListener("click",function(r){r=r.target;if(r.nodeName==="A"||r.parentNode&&r.parentNode.nodeName==="A")Popcorn.instances.forEach(function(f){f.options.pauseOnLinkClicked&&f.pause()})},false);(function(r){var f={},n=0,c=document.createElement("span"),b=["webkit","Moz","ms","O",""],e=["Transform","TransitionDuration","TransitionTimingFunction"],h={},i;document.getElementsByTagName("head")[0].appendChild(c);for(var j=0,p=e.length;j<p;j++)for(var m=0,o=b.length;m<o;m++){i=b[m]+e[j];if(i in c.style){h[e[j].toLowerCase()]=i;break}}document.getElementsByTagName("head")[0].appendChild(c);r.plugin("wordriver",{manifest:{about:{name:"Popcorn WordRiver Plugin"},options:{start:{elem:"input",type:"number",
-label:"Start"},end:{elem:"input",type:"number",label:"End"},target:"wordriver-container",text:{elem:"input",type:"text",label:"Text","default":"Popcorn.js"},color:{elem:"input",type:"text",label:"Color","default":"Green",optional:true}}},_setup:function(q){q._duration=q.end-q.start;var s;if(!(s=f[q.target])){s=q.target;f[s]=document.createElement("div");var d=document.getElementById(s);d&&d.appendChild(f[s]);f[s].style.height="100%";f[s].style.position="relative";s=f[s]}q._container=s;q.word=document.createElement("span");
-q.word.style.position="absolute";q.word.style.whiteSpace="nowrap";q.word.style.opacity=0;q.word.style.MozTransitionProperty="opacity, -moz-transform";q.word.style.webkitTransitionProperty="opacity, -webkit-transform";q.word.style.OTransitionProperty="opacity, -o-transform";q.word.style.transitionProperty="opacity, transform";q.word.style[h.transitionduration]="1s, "+q._duration+"s";q.word.style[h.transitiontimingfunction]="linear";q.word.innerHTML=q.text;q.word.style.color=q.color||"black"},start:function(q,
-s){s._container.appendChild(s.word);s.word.style[h.transform]="";s.word.style.fontSize=~~(30+20*Math.random())+"px";n%=s._container.offsetWidth-s.word.offsetWidth;s.word.style.left=n+"px";n+=s.word.offsetWidth+10;s.word.style[h.transform]="translateY("+(s._container.offsetHeight-s.word.offsetHeight)+"px)";s.word.style.opacity=1;setTimeout(function(){s.word.style.opacity=0},(s.end-s.start-1||1)*1E3)},end:function(q,s){s.word.style.opacity=0},_teardown:function(q){var s=document.getElementById(q.target);
-q.word.parentNode&&q._container.removeChild(q.word);f[q.target]&&!f[q.target].childElementCount&&s&&s.removeChild(f[q.target])&&delete f[q.target]}})})(Popcorn);(function(r){var f=1;r.plugin("timeline",function(n){var c=document.getElementById(n.target),b=document.createElement("div"),e,h=true;if(c&&!c.firstChild){c.appendChild(e=document.createElement("div"));e.style.width="inherit";e.style.height="inherit";e.style.overflow="auto"}else e=c.firstChild;b.style.display="none";b.id="timelineDiv"+f;n.direction=n.direction||"up";if(n.direction.toLowerCase()==="down")h=false;if(c&&e)h?e.insertBefore(b,e.firstChild):e.appendChild(b);f++;b.innerHTML="<p><span id='big' style='font-size:24px; line-height: 130%;' >"+
-n.title+"</span><br /><span id='mid' style='font-size: 16px;'>"+n.text+"</span><br />"+n.innerHTML;return{start:function(i,j){b.style.display="block";if(j.direction==="down")e.scrollTop=e.scrollHeight},end:function(){b.style.display="none"},_teardown:function(){e&&b&&e.removeChild(b)&&!e.firstChild&&c.removeChild(e)}}},{about:{name:"Popcorn Timeline Plugin",version:"0.1",author:"David Seifried @dcseifried",website:"dseifried.wordpress.com"},options:{start:{elem:"input",type:"number",label:"Start"},
-end:{elem:"input",type:"number",label:"End"},target:"feed-container",title:{elem:"input",type:"text",label:"Title"},text:{elem:"input",type:"text",label:"Text"},innerHTML:{elem:"input",type:"text",label:"HTML Code",optional:true},direction:{elem:"select",options:["DOWN","UP"],label:"Direction",optional:true}}})})(Popcorn);(function(r,f){var n={};r.plugin("documentcloud",{manifest:{about:{name:"Popcorn Document Cloud Plugin",version:"0.1",author:"@humphd, @ChrisDeCairos",website:"http://vocamus.net/dave"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},target:"documentcloud-container",width:{elem:"input",type:"text",label:"Width",optional:true},height:{elem:"input",type:"text",label:"Height",optional:true},src:{elem:"input",type:"url",label:"PDF URL","default":"http://www.documentcloud.org/documents/70050-urbina-day-1-in-progress.html"},
-preload:{elem:"input",type:"checkbox",label:"Preload","default":true},page:{elem:"input",type:"number",label:"Page Number",optional:true},aid:{elem:"input",type:"number",label:"Annotation Id",optional:true}}},_setup:function(c){function b(){function m(v){c._key=v.api.getId();c._changeView=function(z){c.aid?z.pageSet.showAnnotation(z.api.getAnnotation(c.aid)):z.api.setCurrentPage(c.page)}}function o(){n[c._key]={num:1,id:c._containerId};h.loaded=true}h.loaded=false;var q=c.url.replace(/\.html$/,".js"),
-s=c.target,d=f.getElementById(s),A=f.createElement("div"),y=r.position(d),x=c.width||y.width;y=c.height||y.height;var a=c.sidebar||true,g=c.text||true,l=c.pdf||true,k=c.showAnnotations||true,t=c.zoom||700,u=c.search||true;if(!function(v){var z=false;r.forEach(h.viewers,function(C){if(C.api.getSchema().canonicalURL===v){m(C);C=n[c._key];c._containerId=C.id;C.num+=1;z=true;h.loaded=true}});return z}(c.url)){A.id=c._containerId=r.guid(s);s="#"+A.id;d.appendChild(A);i.trigger("documentready");h.load(q,
-{width:x,height:y,sidebar:a,text:g,pdf:l,showAnnotations:k,zoom:t,search:u,container:s,afterLoad:c.page||c.aid?function(v){m(v);c._changeView(v);A.style.visibility="hidden";v.elements.pages.hide();o()}:function(v){m(v);o();A.style.visibility="hidden";v.elements.pages.hide()}})}}function e(){window.DV.loaded?b():setTimeout(e,25)}var h=window.DV=window.DV||{},i=this;if(h.loading)e();else{h.loading=true;h.recordHit="//www.documentcloud.org/pixel.gif";var j=f.createElement("link"),p=f.getElementsByTagName("head")[0];
-j.rel="stylesheet";j.type="text/css";j.media="screen";j.href="//s3.documentcloud.org/viewer/viewer-datauri.css";p.appendChild(j);h.loaded=false;r.getScript("http://s3.documentcloud.org/viewer/viewer.js",function(){h.loading=false;b()})}},start:function(c,b){var e=f.getElementById(b._containerId),h=DV.viewers[b._key];(b.page||b.aid)&&h&&b._changeView(h);if(e&&h){e.style.visibility="visible";h.elements.pages.show()}},end:function(c,b){var e=f.getElementById(b._containerId);if(e&&DV.viewers[b._key]){e.style.visibility=
-"hidden";DV.viewers[b._key].elements.pages.hide()}},_teardown:function(c){var b=f.getElementById(c._containerId);if((c=c._key)&&DV.viewers[c]&&--n[c].num===0){for(DV.viewers[c].api.unload();b.hasChildNodes();)b.removeChild(b.lastChild);b.parentNode.removeChild(b)}}})})(Popcorn,window.document);(function(r){r.parser("parseJSON","JSON",function(f){var n={title:"",remote:"",data:[]};r.forEach(f.data,function(c){n.data.push(c)});return n})})(Popcorn);(function(r){r.parser("parseSBV",function(f){var n={title:"",remote:"",data:[]},c=[],b=0,e=0,h=function(q){q=q.split(":");var s=q.length-1,d;try{d=parseInt(q[s-1],10)*60+parseFloat(q[s],10);if(s===2)d+=parseInt(q[0],10)*3600}catch(A){throw"Bad cue";}return d},i=function(q,s){var d={};d[q]=s;return d};f=f.text.split(/(?:\r\n|\r|\n)/gm);for(e=f.length;b<e;){var j={},p=[],m=f[b++].split(",");try{j.start=h(m[0]);for(j.end=h(m[1]);b<e&&f[b];)p.push(f[b++]);j.text=p.join("<br />");c.push(i("subtitle",j))}catch(o){for(;b<
-e&&f[b];)b++}for(;b<e&&!f[b];)b++}n.data=c;return n})})(Popcorn);(function(r){function f(c,b){var e={};e[c]=b;return e}function n(c){c=c.split(":");try{var b=c[2].split(",");if(b.length===1)b=c[2].split(".");return parseFloat(c[0],10)*3600+parseFloat(c[1],10)*60+parseFloat(b[0],10)+parseFloat(b[1],10)/1E3}catch(e){return 0}}r.parser("parseSRT",function(c){var b={title:"",remote:"",data:[]},e=[],h=0,i=0,j,p,m,o;c=c.text.split(/(?:\r\n|\r|\n)/gm);for(h=c.length-1;h>=0&&!c[h];)h--;m=h+1;for(h=0;h<m;h++){o={};p=[];o.id=parseInt(c[h++],10);j=c[h++].split(/[\t ]*--\>[\t ]*/);
-o.start=n(j[0]);i=j[1].indexOf(" ");if(i!==-1)j[1]=j[1].substr(0,i);for(o.end=n(j[1]);h<m&&c[h];)p.push(c[h++]);o.text=p.join("\\N").replace(/\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}/gi,"");o.text=o.text.replace(/</g,"&lt;").replace(/>/g,"&gt;");o.text=o.text.replace(/&lt;(\/?(font|b|u|i|s))((\s+(\w|\w[\w\-]*\w)(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)(\/?)&gt;/gi,"<$1$3$7>");o.text=o.text.replace(/\\N/gi,"<br />");e.push(f("subtitle",o))}b.data=e;return b})})(Popcorn);(function(r){function f(b,e){var h=b.substr(10).split(","),i;i={start:n(h[e.start]),end:n(h[e.end])};if(i.start===-1||i.end===-1)throw"Invalid time";var j=q.call(m,/\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}/gi,""),p=j.replace,m;m=h.length;q=[];for(var o=e.text;o<m;o++)q.push(h[o]);m=q.join(",");var q=m.replace;i.text=p.call(j,/\\N/gi,"<br />");return i}function n(b){var e=b.split(":");if(b.length!==10||e.length<3)return-1;return parseInt(e[0],10)*3600+parseInt(e[1],10)*60+parseFloat(e[2],10)}function c(b,
-e){var h={};h[b]=e;return h}r.parser("parseSSA",function(b){var e={title:"",remote:"",data:[]},h=[],i=0,j;b=b.text.split(/(?:\r\n|\r|\n)/gm);for(j=b.length;i<j&&b[i]!=="[Events]";)i++;var p=b[++i].substr(8).split(", "),m={},o,q;q=0;for(o=p.length;q<o;q++)if(p[q]==="Start")m.start=q;else if(p[q]==="End")m.end=q;else if(p[q]==="Text")m.text=q;for(;++i<j&&b[i]&&b[i][0]!=="[";)try{h.push(c("subtitle",f(b[i],m)))}catch(s){}e.data=h;return e})})(Popcorn);(function(r){function f(i,j,p){var m=i.firstChild;i=n(i,p);p=[];for(var o;m;){if(m.nodeType===1)if(m.nodeName==="p")p.push(c(m,j,i));else if(m.nodeName==="div"){o=b(m.getAttribute("begin"));if(o<0)o=j;p.push.apply(p,f(m,o,i))}m=m.nextSibling}return p}function n(i,j){var p=i.getAttribute("region");return p!==null?p:j||""}function c(i,j,p){var m={};m.text=(i.textContent||i.text).replace(e,"").replace(h,"<br />");m.id=i.getAttribute("xml:id")||i.getAttribute("id");m.start=b(i.getAttribute("begin"),j);
-m.end=b(i.getAttribute("end"),j);m.target=n(i,p);if(m.end<0){m.end=b(i.getAttribute("duration"),0);if(m.end>=0)m.end+=m.start;else m.end=Number.MAX_VALUE}return{subtitle:m}}function b(i,j){var p;if(!i)return-1;try{return r.util.toSeconds(i)}catch(m){for(var o=i.length-1;o>=0&&i[o]<="9"&&i[o]>="0";)o--;p=o;o=parseFloat(i.substring(0,p));p=i.substring(p);return o*({h:3600,m:60,s:1,ms:0.0010}[p]||-1)+(j||0)}}var e=/^[\s]+|[\s]+$/gm,h=/(?:\r\n|\r|\n)/gm;r.parser("parseTTML",function(i){var j={title:"",
-remote:"",data:[]};if(!i.xml||!i.xml.documentElement)return j;i=i.xml.documentElement.firstChild;if(!i)return j;for(;i.nodeName!=="body";)i=i.nextSibling;if(i)j.data=f(i,0);return j})})(Popcorn);(function(r){r.parser("parseTTXT",function(f){var n={title:"",remote:"",data:[]},c=function(j){j=j.split(":");var p=0;try{return parseFloat(j[0],10)*60*60+parseFloat(j[1],10)*60+parseFloat(j[2],10)}catch(m){p=0}return p},b=function(j,p){var m={};m[j]=p;return m};f=f.xml.lastChild.lastChild;for(var e=Number.MAX_VALUE,h=[];f;){if(f.nodeType===1&&f.nodeName==="TextSample"){var i={};i.start=c(f.getAttribute("sampleTime"));i.text=f.getAttribute("text");if(i.text){i.end=e-0.0010;h.push(b("subtitle",i))}e=
-i.start}f=f.previousSibling}n.data=h.reverse();return n})})(Popcorn);(function(r){function f(c){var b=c.split(":");c=c.length;var e;if(c!==12&&c!==9)throw"Bad cue";c=b.length-1;try{e=parseInt(b[c-1],10)*60+parseFloat(b[c],10);if(c===2)e+=parseInt(b[0],10)*3600}catch(h){throw"Bad cue";}return e}function n(c,b){var e={};e[c]=b;return e}r.parser("parseVTT",function(c){var b={title:"",remote:"",data:[]},e=[],h=0,i=0,j,p;c=c.text.split(/(?:\r\n|\r|\n)/gm);i=c.length;if(i===0||c[0]!=="WEBVTT")return b;for(h++;h<i;){j=[];try{for(var m=h;m<i&&!c[m];)m++;h=m;var o=c[h++];m=
-void 0;var q={};if(!o||o.indexOf("--\>")===-1)throw"Bad cue";m=o.replace(/--\>/," --\> ").split(/[\t ]+/);if(m.length<2)throw"Bad cue";q.id=o;q.start=f(m[0]);q.end=f(m[2]);for(p=q;h<i&&c[h];)j.push(c[h++]);p.text=j.join("<br />");e.push(n("subtitle",p))}catch(s){for(h=h;h<i&&c[h];)h++;h=h}}b.data=e;return b})})(Popcorn);(function(r){r.parser("parseXML","XML",function(f){var n={title:"",remote:"",data:[]},c={},b=function(m){m=m.split(":");if(m.length===1)return parseFloat(m[0],10);else if(m.length===2)return parseFloat(m[0],10)+parseFloat(m[1]/12,10);else if(m.length===3)return parseInt(m[0]*60,10)+parseFloat(m[1],10)+parseFloat(m[2]/12,10);else if(m.length===4)return parseInt(m[0]*3600,10)+parseInt(m[1]*60,10)+parseFloat(m[2],10)+parseFloat(m[3]/12,10)},e=function(m){for(var o={},q=0,s=m.length;q<s;q++){var d=m.item(q).nodeName,
-A=m.item(q).nodeValue,y=c[A];if(d==="in")o.start=b(A);else if(d==="out")o.end=b(A);else if(d==="resourceid")for(var x in y){if(y.hasOwnProperty(x))if(!o[x]&&x!=="id")o[x]=y[x]}else o[d]=A}return o},h=function(m,o){var q={};q[m]=o;return q},i=function(m,o,q){var s={};r.extend(s,o,e(m.attributes),{text:m.textContent||m.text});o=m.childNodes;if(o.length<1||o.length===1&&o[0].nodeType===3)if(q)c[s.id]=s;else n.data.push(h(m.nodeName,s));else for(m=0;m<o.length;m++)o[m].nodeType===1&&i(o[m],s,q)};f=f.documentElement.childNodes;
-for(var j=0,p=f.length;j<p;j++)if(f[j].nodeType===1)f[j].nodeName==="manifest"?i(f[j],{},true):i(f[j],{},false);return n})})(Popcorn);(function(){var r=false,f=false;Popcorn.player("soundcloud",{_canPlayType:function(n,c){return/(?:http:\/\/www\.|http:\/\/|www\.|\.|^)(soundcloud)/.test(c)&&n.toLowerCase()!=="video"},_setup:function(n){function c(){r=true;SC.initialize({client_id:"PRaNFlda6Bhf5utPjUsptg"});SC.get("/resolve",{url:e.src},function(A){e.width=e.style.width?""+e.offsetWidth:"560";e.height=e.style.height?""+e.offsetHeight:"315";h.scrolling="no";h.frameborder="no";h.id="soundcloud-"+Popcorn.guid();h.src="http://w.soundcloud.com/player/?url="+
-A.uri+"&show_artwork=false&buying=false&liking=false&sharing=false";h.width="100%";h.height="100%";n.loadListener=function(){n.widget=o=SC.Widget(h.id);o.bind(SC.Widget.Events.FINISH,function(){e.pause();e.dispatchEvent("ended")});o.bind(SC.Widget.Events.PLAY_PROGRESS,function(y){j=y.currentPosition/1E3;e.dispatchEvent("timeupdate")});o.bind(SC.Widget.Events.PLAY,function(){p=m=false;e.dispatchEvent("play");e.dispatchEvent("playing");e.currentTime=j;d.next()});o.bind(SC.Widget.Events.PAUSE,function(){p=
-m=true;e.dispatchEvent("pause");d.next()});o.bind(SC.Widget.Events.READY,function(){o.getDuration(function(y){q=y/1E3;e.style.visibility="visible";e.dispatchEvent("durationchange");e.readyState=4;e.dispatchEvent("readystatechange");e.dispatchEvent("loadedmetadata");e.dispatchEvent("loadeddata");e.dispatchEvent("canplaythrough");e.dispatchEvent("load");!e.paused&&e.play()});o.getVolume(function(y){i=y/100})})};h.addEventListener("load",n.loadListener,false);e.appendChild(h)})}function b(){if(f)(function A(){setTimeout(function(){r?
-c():A()},100)})();else{f=true;Popcorn.getScript("http://w.soundcloud.com/player/api.js",function(){Popcorn.getScript("http://connect.soundcloud.com/sdk.js",function(){c()})})}}var e=this,h=document.createElement("iframe"),i=1,j=0,p=true,m=true,o,q=0,s=false,d=Popcorn.player.playerQueue();n._container=h;e.style.visibility="hidden";e.play=function(){p=false;d.add(function(){if(m)o&&o.play();else d.next()})};e.pause=function(){p=true;d.add(function(){if(m)d.next();else o&&o.pause()})};Object.defineProperties(e,
-{muted:{set:function(A){if(A){o&&o.getVolume(function(y){i=y/100});o&&o.setVolume(0);s=true}else{o&&o.setVolume(i*100);s=false}e.dispatchEvent("volumechange")},get:function(){return s}},volume:{set:function(A){o&&o.setVolume(A*100);i=A;e.dispatchEvent("volumechange")},get:function(){return s?0:i}},currentTime:{set:function(A){j=A;o&&o.seekTo(A*1E3);e.dispatchEvent("seeked");e.dispatchEvent("timeupdate")},get:function(){return j}},duration:{get:function(){return q}},paused:{get:function(){return p}}});
-r?c():b()},_teardown:function(n){var c=n.widget,b=SC.Widget.Events,e=n._container;n.destroyed=true;if(c)for(var h in b)c&&c.unbind(b[h]);else e.removeEventListener("load",n.loadEventListener,false)}})})();(function(){function r(n){var c=r.options;n=c.parser[c.strictMode?"strict":"loose"].exec(n);for(var b={},e=14;e--;)b[c.key[e]]=n[e]||"";b[c.q.name]={};b[c.key[12]].replace(c.q.parser,function(h,i,j){if(i)b[c.q.name][i]=j});return b}function f(n,c){return/player.vimeo.com\/video\/\d+/.test(c)||/vimeo.com\/\d+/.test(c)}r.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",
-parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};Popcorn.player("vimeo",{_canPlayType:f,_setup:function(n){function c(l,k){var t=y.src.split("?")[0],u=JSON.stringify({method:l,
-value:k});if(t.substr(0,2)==="//")t=window.location.protocol+t;y.contentWindow?y.contentWindow.postMessage(u,t):o.unload()}function b(l){if(l.origin==="http://player.vimeo.com"){var k;try{k=JSON.parse(l.data)}catch(t){console.warn(t)}if(k.player_id==m){k.method&&a[k.method]&&a[k.method](k);k.event&&g[k.event]&&g[k.event](k)}}}function e(){d||(d=setInterval(function(){o.dispatchEvent("timeupdate")},i));s||(s=setInterval(function(){c("getCurrentTime")},j))}function h(){if(d){clearInterval(d);d=0}if(s){clearInterval(s);
-s=0}}var i=250,j=16,p={MEDIA_ERR_ABORTED:1,MEDIA_ERR_NETWORK:2,MEDIA_ERR_DECODE:3,MEDIA_ERR_SRC_NOT_SUPPORTED:4},m,o=this,q={q:[],queue:function(l){this.q.push(l);this.process()},process:function(){if(A)for(;this.q.length;)this.q.shift()()}},s,d,A,y=document.createElement("iframe"),x={error:null,src:o.src,NETWORK_EMPTY:0,NETWORK_IDLE:1,NETWORK_LOADING:2,NETWORK_NO_SOURCE:3,networkState:0,HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4,readyState:0,seeking:false,
-currentTime:0,duration:NaN,paused:true,ended:false,autoplay:false,loop:false,volume:1,muted:false,width:0,height:0};Popcorn.forEach("error networkState readyState seeking duration paused ended".split(" "),function(l){Object.defineProperty(o,l,{get:function(){return x[l]}})});Object.defineProperties(o,{src:{get:function(){return x.src},set:function(l){x.src=l;o.load()}},currentTime:{get:function(){return x.currentTime},set:function(l){q.queue(function(){c("seekTo",l)});x.seeking=true;o.dispatchEvent("seeking")}},
-autoplay:{get:function(){return x.autoplay},set:function(l){x.autoplay=!!l}},loop:{get:function(){return x.loop},set:function(l){x.loop=!!l;q.queue(function(){c("setLoop",loop)})}},volume:{get:function(){return x.volume},set:function(l){x.volume=l;q.queue(function(){c("setVolume",x.muted?0:x.volume)});o.dispatchEvent("volumechange")}},muted:{get:function(){return x.muted},set:function(l){x.muted=!!l;q.queue(function(){c("setVolume",x.muted?0:x.volume)});o.dispatchEvent("volumechange")}},width:{get:function(){return y.width},
-set:function(l){y.width=l}},height:{get:function(){return y.height},set:function(l){y.height=l}}});var a={getCurrentTime:function(l){x.currentTime=parseFloat(l.value)},getDuration:function(l){x.duration=parseFloat(l.value);if(!isNaN(x.duration)){x.readyState=4;o.dispatchEvent("durationchange");o.dispatchEvent("loadedmetadata");o.dispatchEvent("loadeddata");o.dispatchEvent("canplay");o.dispatchEvent("canplaythrough")}},getVolume:function(l){x.volume=parseFloat(l.value)}},g={ready:function(){c("addEventListener",
-"loadProgress");c("addEventListener","playProgress");c("addEventListener","play");c("addEventListener","pause");c("addEventListener","finish");c("addEventListener","seek");c("getDuration");A=true;q.process();o.dispatchEvent("loadstart")},loadProgress:function(l){o.dispatchEvent("progress");x.duration=parseFloat(l.data.duration)},playProgress:function(l){x.currentTime=parseFloat(l.data.seconds)},play:function(){if(x.seeking){x.seeking=false;o.dispatchEvent("seeked")}x.paused=false;x.ended=false;e();
-o.dispatchEvent("play")},pause:function(){x.paused=true;h();o.dispatchEvent("pause")},finish:function(){x.ended=true;h();o.dispatchEvent("ended")},seek:function(l){x.currentTime=parseFloat(l.data.seconds);x.seeking=false;x.ended=false;o.dispatchEvent("timeupdate");o.dispatchEvent("seeked")}};o.load=function(){A=false;m=Popcorn.guid();var l=r(x.src),k={},t=[],u={api:1,player_id:m};if(f(o.nodeName,l.source)){Popcorn.extend(k,n);Popcorn.extend(k,l.queryKey);Popcorn.extend(k,u);l="http://player.vimeo.com/video/"+
-/\d+$/.exec(l.path)+"?";for(var v in k)k.hasOwnProperty(v)&&t.push(encodeURIComponent(v)+"="+encodeURIComponent(k[v]));l+=t.join("&");x.loop=!!l.match(/loop=1/);x.autoplay=!!l.match(/autoplay=1/);y.width=o.style.width?o.style.width:500;y.height=o.style.height?o.style.height:281;y.frameBorder=0;y.webkitAllowFullScreen=true;y.mozAllowFullScreen=true;y.allowFullScreen=true;y.src=l;o.appendChild(y)}else{l=x.MEDIA_ERR_SRC_NOT_SUPPORTED;x.error={};Popcorn.extend(x.error,p);x.error.code=l;o.dispatchEvent("error")}};
-o.unload=function(){h();window.removeEventListener("message",b,false)};o.play=function(){q.queue(function(){c("play")})};o.pause=function(){q.queue(function(){c("pause")})};setTimeout(function(){window.addEventListener("message",b,false);o.load()},0)},_teardown:function(){this.unload&&this.unload()}})})();(function(r,f){r.onYouTubePlayerAPIReady=function(){onYouTubePlayerAPIReady.ready=true;for(var c=0;c<onYouTubePlayerAPIReady.waiting.length;c++)onYouTubePlayerAPIReady.waiting[c]()};if(r.YT){r.quarantineYT=r.YT;r.YT=null}onYouTubePlayerAPIReady.waiting=[];var n=false;f.player("youtube",{_canPlayType:function(c,b){return typeof b==="string"&&/(?:http:\/\/www\.|http:\/\/|www\.|\.|^)(youtu)/.test(b)&&c.toLowerCase()!=="video"},_setup:function(c){if(!r.YT&&!n){n=true;f.getScript("//youtube.com/player_api")}var b=
-this,e=false,h=document.createElement("div"),i=0,j=true,p=false,m=0,o=false,q=100,s=f.player.playerQueue(),d=function(){f.player.defineProperty(b,"currentTime",{set:function(y){if(!c.destroyed){p=true;i=Math.round(+y*100)/100}},get:function(){return i}});f.player.defineProperty(b,"paused",{get:function(){return j}});f.player.defineProperty(b,"muted",{set:function(y){if(c.destroyed)return y;if(c.youtubeObject.isMuted()!==y){y?c.youtubeObject.mute():c.youtubeObject.unMute();o=c.youtubeObject.isMuted();
-b.dispatchEvent("volumechange")}return c.youtubeObject.isMuted()},get:function(){if(c.destroyed)return 0;return c.youtubeObject.isMuted()}});f.player.defineProperty(b,"volume",{set:function(y){if(c.destroyed)return y;if(c.youtubeObject.getVolume()/100!==y){c.youtubeObject.setVolume(y*100);q=c.youtubeObject.getVolume();b.dispatchEvent("volumechange")}return c.youtubeObject.getVolume()/100},get:function(){if(c.destroyed)return 0;return c.youtubeObject.getVolume()/100}});b.play=function(){if(!c.destroyed){j=
-false;s.add(function(){if(c.youtubeObject.getPlayerState()!==1){p=false;c.youtubeObject.playVideo()}else s.next()})}};b.pause=function(){if(!c.destroyed){j=true;s.add(function(){c.youtubeObject.getPlayerState()!==2?c.youtubeObject.pauseVideo():s.next()})}}};h.id=b.id+f.guid();c._container=h;b.appendChild(h);var A=function(){var y,x,a,g,l=true,k=function(){if(!c.destroyed){if(p)if(i===c.youtubeObject.getCurrentTime()){p=false;b.dispatchEvent("seeked");b.dispatchEvent("timeupdate")}else c.youtubeObject.seekTo(i);
-else{i=c.youtubeObject.getCurrentTime();b.dispatchEvent("timeupdate")}setTimeout(k,250)}},t=function(z){var C=c.youtubeObject.getDuration();if(isNaN(C)||C===0)setTimeout(function(){t(z*2)},z*1E3);else{b.duration=C;b.dispatchEvent("durationchange");b.dispatchEvent("loadedmetadata");b.dispatchEvent("loadeddata");b.readyState=4;k();b.dispatchEvent("canplaythrough")}};c.controls=+c.controls===0||+c.controls===1?c.controls:1;c.annotations=+c.annotations===1||+c.annotations===3?c.annotations:1;y=/^.*(?:\/|v=)(.{11})/.exec(b.src)[1];
-x=(b.src.split("?")[1]||"").replace(/v=.{11}/,"");x=x.replace(/&t=(?:(\d+)m)?(?:(\d+)s)?/,function(z,C,E){C|=0;E|=0;m=+E+C*60;return""});x=x.replace(/&start=(\d+)?/,function(z,C){C|=0;m=C;return""});e=/autoplay=1/.test(x);x=x.split(/[\&\?]/g);a={wmode:"transparent"};for(var u=0;u<x.length;u++){g=x[u].split("=");a[g[0]]=g[1]}c.youtubeObject=new YT.Player(h.id,{height:"100%",width:"100%",wmode:"transparent",playerVars:a,videoId:y,events:{onReady:function(){q=b.volume;o=b.muted;v();j=b.paused;d();c.youtubeObject.playVideo();
-b.currentTime=m},onStateChange:function(z){if(!(c.destroyed||z.data===-1))if(z.data===2){j=true;b.dispatchEvent("pause");s.next()}else if(z.data===1&&!l){j=false;b.dispatchEvent("play");b.dispatchEvent("playing");s.next()}else if(z.data===0)b.dispatchEvent("ended");else if(z.data===1&&l){l=false;if(e||!b.paused)j=false;j&&c.youtubeObject.pauseVideo();t(0.025)}},onError:function(z){if([2,100,101,150].indexOf(z.data)!==-1){b.error={customCode:z.data};b.dispatchEvent("error")}}}});var v=function(){if(!c.destroyed){if(o!==
-c.youtubeObject.isMuted()){o=c.youtubeObject.isMuted();b.dispatchEvent("volumechange")}if(q!==c.youtubeObject.getVolume()){q=c.youtubeObject.getVolume();b.dispatchEvent("volumechange")}setTimeout(v,250)}}};onYouTubePlayerAPIReady.ready?A():onYouTubePlayerAPIReady.waiting.push(A)},_teardown:function(c){c.destroyed=true;var b=c.youtubeObject;if(b){b.stopVideo();b.clearVideo&&b.clearVideo()}this.removeChild(document.getElementById(c._container.id))}})})(window,Popcorn);
+"default":"Toronto, Ontario, Canada"},markers:{elem:"input",type:"text",label:"List Markers",optional:true}}})})(Popcorn);var wikiCallback;
+(function(p){p.plugin("wikipedia",{manifest:{about:{name:"Popcorn Wikipedia Plugin",version:"0.1",author:"@annasob",website:"annasob.wordpress.com"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},lang:{elem:"input",type:"text",label:"Language","default":"english",optional:true},src:{elem:"input",type:"url",label:"Wikipedia URL","default":"http://en.wikipedia.org/wiki/Cat"},title:{elem:"input",type:"text",label:"Title","default":"Cats",optional:true},
+numberofwords:{elem:"input",type:"number",label:"Number of Words","default":"200",optional:true},target:"wikipedia-container"}},_setup:function(e){var l,d=p.guid();if(!e.lang)e.lang="en";e.numberofwords=e.numberofwords||200;window["wikiCallback"+d]=function(b){e._link=document.createElement("a");e._link.setAttribute("href",e.src);e._link.setAttribute("target","_blank");e._link.innerHTML=e.title||b.parse.displaytitle;e._desc=document.createElement("p");l=b.parse.text["*"].substr(b.parse.text["*"].indexOf("<p>"));
+l=l.replace(/((<(.|\n)+?>)|(\((.*?)\) )|(\[(.*?)\]))/g,"");l=l.split(" ");e._desc.innerHTML=l.slice(0,l.length>=e.numberofwords?e.numberofwords:l.length).join(" ")+" ...";e._fired=true};e.src&&p.getScript("//"+e.lang+".wikipedia.org/w/api.php?action=parse&props=text&redirects&page="+e.src.slice(e.src.lastIndexOf("/")+1)+"&format=json&callback=wikiCallback"+d);e.toString=function(){return e.src||e._natives.manifest.options.src["default"]}},start:function(e,l){var d=function(){if(l._fired){if(l._link&&
+l._desc)if(document.getElementById(l.target)){document.getElementById(l.target).appendChild(l._link);document.getElementById(l.target).appendChild(l._desc);l._added=true}}else setTimeout(function(){d()},13)};d()},end:function(e,l){if(l._added){document.getElementById(l.target).removeChild(l._link);document.getElementById(l.target).removeChild(l._desc)}},_teardown:function(e){if(e._added){e._link.parentNode&&document.getElementById(e.target).removeChild(e._link);e._desc.parentNode&&document.getElementById(e.target).removeChild(e._desc);
+delete e.target}}})})(Popcorn);(function(p){var e=0,l=function(d,b){var h=d.container=document.createElement("div"),i=h.style,g=d.media,k=function(){var r=d.position();i.fontSize="18px";i.width=g.offsetWidth+"px";i.top=r.top+g.offsetHeight-h.offsetHeight-40+"px";i.left=r.left+"px";setTimeout(k,10)};h.id=b||p.guid();i.position="absolute";i.color="white";i.textShadow="black 2px 2px 6px";i.fontWeight="bold";i.textAlign="center";k();d.media.parentNode.appendChild(h);return h};p.plugin("subtitle",{manifest:{about:{name:"Popcorn Subtitle Plugin",
+version:"0.1",author:"Scott Downe",website:"http://scottdowne.wordpress.com/"},options:{start:{elem:"input",type:"text",label:"Start"},end:{elem:"input",type:"text",label:"End"},target:"subtitle-container",text:{elem:"input",type:"text",label:"Text"}}},_setup:function(d){var b=document.createElement("div");b.id="subtitle-"+e++;b.style.display="none";!this.container&&(!d.target||d.target==="subtitle-container")&&l(this);d.container=d.target&&d.target!=="subtitle-container"?document.getElementById(d.target)||
+l(this,d.target):this.container;document.getElementById(d.container.id)&&document.getElementById(d.container.id).appendChild(b);d.innerContainer=b;d.showSubtitle=function(){d.innerContainer.innerHTML=d.text||""}},start:function(d,b){b.innerContainer.style.display="inline";b.showSubtitle(b,b.text)},end:function(d,b){b.innerContainer.style.display="none";b.innerContainer.innerHTML=""},_teardown:function(d){d.container.removeChild(d.innerContainer)}})})(Popcorn);(function(p,e){var l={};p.plugin("documentcloud",{manifest:{about:{name:"Popcorn Document Cloud Plugin",version:"0.1",author:"@humphd, @ChrisDeCairos",website:"http://vocamus.net/dave"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},target:"documentcloud-container",width:{elem:"input",type:"text",label:"Width",optional:true},height:{elem:"input",type:"text",label:"Height",optional:true},src:{elem:"input",type:"url",label:"PDF URL","default":"http://www.documentcloud.org/documents/70050-urbina-day-1-in-progress.html"},
+preload:{elem:"input",type:"checkbox",label:"Preload","default":true},page:{elem:"input",type:"number",label:"Page Number",optional:true},aid:{elem:"input",type:"number",label:"Annotation Id",optional:true}}},_setup:function(d){function b(){function m(j){d._key=j.api.getId();d._changeView=function(w){d.aid?w.pageSet.showAnnotation(w.api.getAnnotation(d.aid)):w.api.setCurrentPage(d.page)}}function t(){l[d._key]={num:1,id:d._containerId};i.loaded=true}i.loaded=false;var q=d.url.replace(/\.html$/,".js"),
+o=d.target,u=e.getElementById(o),E=e.createElement("div"),C=p.position(u),f=d.width||C.width;C=d.height||C.height;var G=d.sidebar||true,A=d.text||true,O=d.pdf||true,a=d.showAnnotations||true,c=d.zoom||700,n=d.search||true;if(!function(j){var w=false;p.forEach(i.viewers,function(x){if(x.api.getSchema().canonicalURL===j){m(x);x=l[d._key];d._containerId=x.id;x.num+=1;w=true;i.loaded=true}});return w}(d.url)){E.id=d._containerId=p.guid(o);o="#"+E.id;u.appendChild(E);g.trigger("documentready");i.load(q,
+{width:f,height:C,sidebar:G,text:A,pdf:O,showAnnotations:a,zoom:c,search:n,container:o,afterLoad:d.page||d.aid?function(j){m(j);d._changeView(j);E.style.visibility="hidden";j.elements.pages.hide();t()}:function(j){m(j);t();E.style.visibility="hidden";j.elements.pages.hide()}})}}function h(){window.DV.loaded?b():setTimeout(h,25)}var i=window.DV=window.DV||{},g=this;if(i.loading)h();else{i.loading=true;i.recordHit="//www.documentcloud.org/pixel.gif";var k=e.createElement("link"),r=e.getElementsByTagName("head")[0];
+k.rel="stylesheet";k.type="text/css";k.media="screen";k.href="//s3.documentcloud.org/viewer/viewer-datauri.css";r.appendChild(k);i.loaded=false;p.getScript("http://s3.documentcloud.org/viewer/viewer.js",function(){i.loading=false;b()})}d.toString=function(){return d.src||d._natives.manifest.options.src["default"]}},start:function(d,b){var h=e.getElementById(b._containerId),i=DV.viewers[b._key];(b.page||b.aid)&&i&&b._changeView(i);if(h&&i){h.style.visibility="visible";i.elements.pages.show()}},end:function(d,
+b){var h=e.getElementById(b._containerId);if(h&&DV.viewers[b._key]){h.style.visibility="hidden";DV.viewers[b._key].elements.pages.hide()}},_teardown:function(d){var b=e.getElementById(d._containerId);if((d=d._key)&&DV.viewers[d]&&--l[d].num===0){for(DV.viewers[d].api.unload();b.hasChildNodes();)b.removeChild(b.lastChild);b.parentNode.removeChild(b)}}})})(Popcorn,window.document);(function(p){var e=/(?:http:\/\/www\.|http:\/\/|www\.|\.|^)(youtu|vimeo|soundcloud|baseplayer)/,l={},d={vimeo:false,youtube:false,soundcloud:false,module:false};Object.defineProperty(l,void 0,{get:function(){return d[void 0]},set:function(b){d[void 0]=b}});p.plugin("mediaspawner",{manifest:{about:{name:"Popcorn Media Spawner Plugin",version:"0.1",author:"Matthew Schranz, @mjschranz",website:"mschranz.wordpress.com"},options:{source:{elem:"input",type:"text",label:"Media Source","default":"http://www.youtube.com/watch?v=CXDstfD9eJ0"},
+caption:{elem:"input",type:"text",label:"Media Caption","default":"Popcorn Popping",optional:true},target:"mediaspawner-container",start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},autoplay:{elem:"input",type:"checkbox",label:"Autoplay Video",optional:true},width:{elem:"input",type:"number",label:"Media Width","default":400,units:"px",optional:true},height:{elem:"input",type:"number",label:"Media Height","default":200,units:"px",optional:true}}},_setup:function(b){function h(){function t(){if(k!==
+"HTML5"&&!window.Popcorn[k])setTimeout(function(){t()},300);else{b.id=b._container.id;b._container.style.width=b.width+"px";b._container.style.height=b.height+"px";b.popcorn=p.smart("#"+b.id,b.source);k==="HTML5"&&b.popcorn.controls(true);b._container.style.width="0px";b._container.style.height="0px";b._container.style.visibility="hidden";b._container.style.overflow="hidden"}}if(k!=="HTML5"&&!window.Popcorn[k]&&!l[k]){l[k]=true;p.getScript("http://popcornjs.org/code/players/"+k+"/popcorn."+k+".js",
+function(){t()})}else t()}function i(){window.Popcorn.player?h():setTimeout(function(){i()},300)}var g=document.getElementById(b.target)||{},k,r,m;if(r=e.exec(b.source)){k=r[1];if(k==="youtu")k="youtube"}else k="HTML5";b._type=k;b._container=document.createElement("div");r=b._container;r.id="mediaSpawnerdiv-"+p.guid();b.width=b.width||400;b.height=b.height||200;if(b.caption){m=document.createElement("div");m.innerHTML=b.caption;m.style.display="none";b._capCont=m;r.appendChild(m)}g&&g.appendChild(r);
+if(!window.Popcorn.player&&!l.module){l.module=true;p.getScript("http://popcornjs.org/code/modules/player/popcorn.player.js",i)}else i();b.toString=function(){return b.source||b._natives.manifest.options.source["default"]}},start:function(b,h){if(h._capCont)h._capCont.style.display="";h._container.style.width=h.width+"px";h._container.style.height=h.height+"px";h._container.style.visibility="visible";h._container.style.overflow="visible";h.autoplay&&h.popcorn.play()},end:function(b,h){if(h._capCont)h._capCont.style.display=
+"none";h._container.style.width="0px";h._container.style.height="0px";h._container.style.visibility="hidden";h._container.style.overflow="hidden";h.popcorn.pause()},_teardown:function(b){b.popcorn&&b.popcorn.destory&&b.popcorn.destroy();document.getElementById(b.target)&&document.getElementById(b.target).removeChild(b._container)}})})(Popcorn,this);(function(p){var e=1;p.plugin("timeline",function(l){var d=document.getElementById(l.target),b=document.createElement("div"),h,i=true;if(d&&!d.firstChild){d.appendChild(h=document.createElement("div"));h.style.width="inherit";h.style.height="inherit";h.style.overflow="auto"}else h=d.firstChild;b.style.display="none";b.id="timelineDiv"+e;l.direction=l.direction||"up";if(l.direction.toLowerCase()==="down")i=false;if(d&&h)i?h.insertBefore(b,h.firstChild):h.appendChild(b);e++;b.innerHTML="<p><span id='big' style='font-size:24px; line-height: 130%;' >"+
+l.title+"</span><br /><span id='mid' style='font-size: 16px;'>"+l.text+"</span><br />"+l.innerHTML;return{start:function(g,k){b.style.display="block";if(k.direction==="down")h.scrollTop=h.scrollHeight},end:function(){b.style.display="none"},_teardown:function(){h&&b&&h.removeChild(b)&&!h.firstChild&&d.removeChild(h)}}},{about:{name:"Popcorn Timeline Plugin",version:"0.1",author:"David Seifried @dcseifried",website:"dseifried.wordpress.com"},options:{start:{elem:"input",type:"number",label:"Start"},
+end:{elem:"input",type:"number",label:"End"},target:"feed-container",title:{elem:"input",type:"text",label:"Title"},text:{elem:"input",type:"text",label:"Text"},innerHTML:{elem:"input",type:"text",label:"HTML Code",optional:true},direction:{elem:"select",options:["DOWN","UP"],label:"Direction",optional:true}}})})(Popcorn);(function(p){var e=0;p.plugin("flickr",function(l){var d,b=document.getElementById(l.target),h,i,g,k,r=l.numberofimages||4,m=l.height||"50px",t=l.width||"50px",q=l.padding||"5px",o=l.border||"0px";d=document.createElement("div");d.id="flickr"+e;d.style.width="100%";d.style.height="100%";d.style.display="none";e++;b&&b.appendChild(d);var u=function(){if(h)setTimeout(function(){u()},5);else{i="http://api.flickr.com/services/rest/?method=flickr.people.findByUsername&";i+="username="+l.username+"&api_key="+
+l.apikey+"&format=json&jsoncallback=flickr";p.getJSONP(i,function(C){h=C.user.nsid;E()})}},E=function(){i="http://api.flickr.com/services/feeds/photos_public.gne?";if(h)i+="id="+h+"&";if(l.tags)i+="tags="+l.tags+"&";i+="lang=en-us&format=json&jsoncallback=flickr";p.xhr.getJSONP(i,function(C){var f=document.createElement("div");f.innerHTML="<p style='padding:"+q+";'>"+C.title+"<p/>";p.forEach(C.items,function(G,A){if(A<r){g=document.createElement("a");g.setAttribute("href",G.link);g.setAttribute("target",
+"_blank");k=document.createElement("img");k.setAttribute("src",G.media.m);k.setAttribute("height",m);k.setAttribute("width",t);k.setAttribute("style","border:"+o+";padding:"+q);g.appendChild(k);f.appendChild(g)}else return false});d.appendChild(f)})};if(l.username&&l.apikey)u();else{h=l.userid;E()}l.toString=function(){return l.tags||l.username||"Flickr"};return{start:function(){d.style.display="inline"},end:function(){d.style.display="none"},_teardown:function(C){document.getElementById(C.target)&&
+document.getElementById(C.target).removeChild(d)}}},{about:{name:"Popcorn Flickr Plugin",version:"0.2",author:"Scott Downe, Steven Weerdenburg, Annasob",website:"http://scottdowne.wordpress.com/"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},userid:{elem:"input",type:"text",label:"User ID",optional:true},tags:{elem:"input",type:"text",label:"Tags"},username:{elem:"input",type:"text",label:"Username",optional:true},apikey:{elem:"input",type:"text",
+label:"API Key",optional:true},target:"flickr-container",height:{elem:"input",type:"text",label:"Height","default":"50px",optional:true},width:{elem:"input",type:"text",label:"Width","default":"50px",optional:true},padding:{elem:"input",type:"text",label:"Padding",optional:true},border:{elem:"input",type:"text",label:"Border","default":"5px",optional:true},numberofimages:{elem:"input",type:"number","default":4,label:"Number of Images"}}})})(Popcorn);(function(p){p.plugin("webpage",{manifest:{about:{name:"Popcorn Webpage Plugin",version:"0.1",author:"@annasob",website:"annasob.wordpress.com"},options:{id:{elem:"input",type:"text",label:"Id",optional:true},start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},src:{elem:"input",type:"url",label:"Webpage URL","default":"http://mozillapopcorn.org"},target:"iframe-container"}},_setup:function(e){var l=document.getElementById(e.target);e.src=e.src.replace(/^(https?:)?(\/\/)?/,
+"//");e._iframe=document.createElement("iframe");e._iframe.setAttribute("width","100%");e._iframe.setAttribute("height","100%");e._iframe.id=e.id;e._iframe.src=e.src;e._iframe.style.display="none";l&&l.appendChild(e._iframe)},start:function(e,l){l._iframe.src=l.src;l._iframe.style.display="inline"},end:function(e,l){l._iframe.style.display="none"},_teardown:function(e){document.getElementById(e.target)&&document.getElementById(e.target).removeChild(e._iframe)}})})(Popcorn);(function(p){var e={},l=0,d=document.createElement("span"),b=["webkit","Moz","ms","O",""],h=["Transform","TransitionDuration","TransitionTimingFunction"],i={},g;document.getElementsByTagName("head")[0].appendChild(d);for(var k=0,r=h.length;k<r;k++)for(var m=0,t=b.length;m<t;m++){g=b[m]+h[k];if(g in d.style){i[h[k].toLowerCase()]=g;break}}document.getElementsByTagName("head")[0].appendChild(d);p.plugin("wordriver",{manifest:{about:{name:"Popcorn WordRiver Plugin"},options:{start:{elem:"input",type:"number",
+label:"Start"},end:{elem:"input",type:"number",label:"End"},target:"wordriver-container",text:{elem:"input",type:"text",label:"Text","default":"Popcorn.js"},color:{elem:"input",type:"text",label:"Color","default":"Green",optional:true}}},_setup:function(q){q._duration=q.end-q.start;var o;if(!(o=e[q.target])){o=q.target;e[o]=document.createElement("div");var u=document.getElementById(o);u&&u.appendChild(e[o]);e[o].style.height="100%";e[o].style.position="relative";o=e[o]}q._container=o;q.word=document.createElement("span");
+q.word.style.position="absolute";q.word.style.whiteSpace="nowrap";q.word.style.opacity=0;q.word.style.MozTransitionProperty="opacity, -moz-transform";q.word.style.webkitTransitionProperty="opacity, -webkit-transform";q.word.style.OTransitionProperty="opacity, -o-transform";q.word.style.transitionProperty="opacity, transform";q.word.style[i.transitionduration]="1s, "+q._duration+"s";q.word.style[i.transitiontimingfunction]="linear";q.word.innerHTML=q.text;q.word.style.color=q.color||"black"},start:function(q,
+o){o._container.appendChild(o.word);o.word.style[i.transform]="";o.word.style.fontSize=~~(30+20*Math.random())+"px";l%=o._container.offsetWidth-o.word.offsetWidth;o.word.style.left=l+"px";l+=o.word.offsetWidth+10;o.word.style[i.transform]="translateY("+(o._container.offsetHeight-o.word.offsetHeight)+"px)";o.word.style.opacity=1;setTimeout(function(){o.word.style.opacity=0},(o.end-o.start-1||1)*1E3)},end:function(q,o){o.word.style.opacity=0},_teardown:function(q){var o=document.getElementById(q.target);
+q.word.parentNode&&q._container.removeChild(q.word);e[q.target]&&!e[q.target].childElementCount&&o&&o.removeChild(e[q.target])&&delete e[q.target]}})})(Popcorn);var googleCallback;
+(function(p){function e(g,k,r){g=g.type?g.type.toUpperCase():"HYBRID";var m;if(g==="STAMEN-WATERCOLOR"||g==="STAMEN-TERRAIN"||g==="STAMEN-TONER")m=g.replace("STAMEN-","").toLowerCase();r=new google.maps.Map(r,{mapTypeId:m?m:google.maps.MapTypeId[g],mapTypeControlOptions:{mapTypeIds:[]}});m&&r.mapTypes.set(m,new google.maps.StamenMapType(m));r.getDiv().style.display="none";return r}var l=1,d=false,b=false,h,i;googleCallback=function(g){if(typeof google!=="undefined"&&google.maps&&google.maps.Geocoder&&
+google.maps.LatLng){h=new google.maps.Geocoder;p.getScript("//maps.stamen.com/js/tile.stamen.js",function(){b=true})}else setTimeout(function(){googleCallback(g)},1)};i=function(){if(document.body){d=true;p.getScript("//maps.google.com/maps/api/js?sensor=false&callback=googleCallback")}else setTimeout(function(){i()},1)};p.plugin("googlemap",function(g){var k,r,m,t=document.getElementById(g.target);g.type=g.type||"ROADMAP";g.zoom=g.zoom||1;g.lat=g.lat||0;g.lng=g.lng||0;d||i();k=document.createElement("div");
+k.id="actualmap"+l;k.style.width=g.width||"100%";k.style.height=g.height?g.height:t&&t.clientHeight?t.clientHeight+"px":"100%";l++;t&&t.appendChild(k);var q=function(){if(b){if(k)if(g.location)h.geocode({address:g.location},function(o,u){if(k&&u===google.maps.GeocoderStatus.OK){g.lat=o[0].geometry.location.lat();g.lng=o[0].geometry.location.lng();m=new google.maps.LatLng(g.lat,g.lng);r=e(g,m,k)}});else{m=new google.maps.LatLng(g.lat,g.lng);r=e(g,m,k)}}else setTimeout(function(){q()},5)};q();g.toString=
+function(){return g.location||(g.lat&&g.lng?g.lat+", "+g.lng:g._natives.manifest.options.location["default"])};return{start:function(o,u){var E=this,C,f=function(){if(r){u._map=r;r.getDiv().style.display="block";google.maps.event.trigger(r,"resize");r.setCenter(m);if(u.zoom&&typeof u.zoom!=="number")u.zoom=+u.zoom;r.setZoom(u.zoom);if(u.heading&&typeof u.heading!=="number")u.heading=+u.heading;if(u.pitch&&typeof u.pitch!=="number")u.pitch=+u.pitch;if(u.type==="STREETVIEW"){r.setStreetView(C=new google.maps.StreetViewPanorama(k,
+{position:m,pov:{heading:u.heading=u.heading||0,pitch:u.pitch=u.pitch||0,zoom:u.zoom}}));var G=function(w,x){var z=google.maps.geometry.spherical.computeHeading;setTimeout(function(){var F=E.media.currentTime;if(typeof u.tween==="object"){for(var v=0,L=w.length;v<L;v++){var y=w[v];if(F>=y.interval*(v+1)/1E3&&(F<=y.interval*(v+2)/1E3||F>=y.interval*L/1E3)){n.setPosition(new google.maps.LatLng(y.position.lat,y.position.lng));n.setPov({heading:y.pov.heading||z(y,w[v+1])||0,zoom:y.pov.zoom||0,pitch:y.pov.pitch||
+0})}}G(w,w[0].interval)}else{v=0;for(L=w.length;v<L;v++){y=u.interval;if(F>=y*(v+1)/1E3&&(F<=y*(v+2)/1E3||F>=y*L/1E3)){A.setPov({heading:z(w[v],w[v+1])||0,zoom:u.zoom,pitch:u.pitch||0});A.setPosition(O[v])}}G(O,u.interval)}},x)};if(u.location&&typeof u.tween==="string"){var A=C,O=[],a=new google.maps.DirectionsService,c=new google.maps.DirectionsRenderer(A);a.route({origin:u.location,destination:u.tween,travelMode:google.maps.TravelMode.DRIVING},function(w,x){if(x==google.maps.DirectionsStatus.OK){c.setDirections(w);
+for(var z=w.routes[0].overview_path,F=0,v=z.length;F<v;F++)O.push(new google.maps.LatLng(z[F].lat(),z[F].lng()));u.interval=u.interval||1E3;G(O,10)}})}else if(typeof u.tween==="object"){var n=C;a=0;for(var j=u.tween.length;a<j;a++){u.tween[a].interval=u.tween[a].interval||1E3;G(u.tween,10)}}}u.onmaploaded&&u.onmaploaded(u,r)}else setTimeout(function(){f()},13)};f()},end:function(){if(r)r.getDiv().style.display="none"},_teardown:function(o){var u=document.getElementById(o.target);u&&u.removeChild(k);
+k=r=m=null;o._map=null}}},{about:{name:"Popcorn Google Map Plugin",version:"0.1",author:"@annasob",website:"annasob.wordpress.com"},options:{start:{elem:"input",type:"start",label:"Start"},end:{elem:"input",type:"start",label:"End"},target:"map-container",type:{elem:"select",options:["ROADMAP","SATELLITE","STREETVIEW","HYBRID","TERRAIN","STAMEN-WATERCOLOR","STAMEN-TERRAIN","STAMEN-TONER"],label:"Map Type",optional:true},zoom:{elem:"input",type:"text",label:"Zoom","default":0,optional:true},lat:{elem:"input",
+type:"text",label:"Lat",optional:true},lng:{elem:"input",type:"text",label:"Lng",optional:true},location:{elem:"input",type:"text",label:"Location","default":"Toronto, Ontario, Canada"},heading:{elem:"input",type:"text",label:"Heading","default":0,optional:true},pitch:{elem:"input",type:"text",label:"Pitch","default":1,optional:true}}})})(Popcorn);(function(p){p.plugin("mustache",function(e){var l,d,b,h;p.getScript("http://mustache.github.com/extras/mustache.js");var i=!!e.dynamic,g=typeof e.template,k=typeof e.data,r=document.getElementById(e.target);e.container=r||document.createElement("div");if(g==="function")if(i)b=e.template;else h=e.template(e);else h=g==="string"?e.template:"";if(k==="function")if(i)l=e.data;else d=e.data(e);else d=k==="string"?JSON.parse(e.data):k==="object"?e.data:"";return{start:function(m,t){var q=function(){if(window.Mustache){if(l)d=
+l(t);if(b)h=b(t);var o=Mustache.to_html(h,d).replace(/^\s*/mg,"");t.container.innerHTML=o}else setTimeout(function(){q()},10)};q()},end:function(m,t){t.container.innerHTML=""},_teardown:function(){l=d=b=h=null}}},{about:{name:"Popcorn Mustache Plugin",version:"0.1",author:"David Humphrey (@humphd)",website:"http://vocamus.net/dave"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},target:"mustache-container",template:{elem:"input",type:"text",
+label:"Template"},data:{elem:"input",type:"text",label:"Data"},dynamic:{elem:"input",type:"checkbox",label:"Dynamic","default":true}}})})(Popcorn);document.addEventListener("click",function(p){p=p.target;if(p.nodeName==="A"||p.parentNode&&p.parentNode.nodeName==="A")Popcorn.instances.forEach(function(e){e.options.pauseOnLinkClicked&&e.pause()})},false);(function(p){p.plugin("footnote",{manifest:{about:{name:"Popcorn Footnote Plugin",version:"0.2",author:"@annasob, @rwaldron",website:"annasob.wordpress.com"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},text:{elem:"input",type:"text",label:"Text"},target:"footnote-container"}},_setup:function(e){var l=p.dom.find(e.target);e._container=document.createElement("div");e._container.style.display="none";e._container.innerHTML=e.text;l.appendChild(e._container)},
+start:function(e,l){l._container.style.display="inline"},end:function(e,l){l._container.style.display="none"},_teardown:function(e){var l=p.dom.find(e.target);l&&l.removeChild(e._container)}})})(Popcorn);(function(p){var e=1,l=false;p.plugin("googlefeed",function(d){var b=function(){var k=false,r=0,m=document.getElementsByTagName("link"),t=m.length,q=document.head||document.getElementsByTagName("head")[0],o=document.createElement("link");if(window.GFdynamicFeedControl)l=true;else p.getScript("//www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js",function(){l=true});for(;r<t;r++)if(m[r].href==="//www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css")k=true;if(!k){o.type=
+"text/css";o.rel="stylesheet";o.href="//www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css";q.insertBefore(o,q.firstChild)}};window.google?b():p.getScript("//www.google.com/jsapi",function(){google.load("feeds","1",{callback:function(){b()}})});var h=document.createElement("div"),i=document.getElementById(d.target),g=function(){if(l)d.feed=new GFdynamicFeedControl(d.url,h,{vertical:d.orientation.toLowerCase()==="vertical"?true:false,horizontal:d.orientation.toLowerCase()==="horizontal"?
+true:false,title:d.title=d.title||"Blog"});else setTimeout(function(){g()},5)};if(!d.orientation||d.orientation.toLowerCase()!=="vertical"&&d.orientation.toLowerCase()!=="horizontal")d.orientation="vertical";h.style.display="none";h.id="_feed"+e;h.style.width="100%";h.style.height="100%";e++;i&&i.appendChild(h);g();d.toString=function(){return d.url||d._natives.manifest.options.url["default"]};return{start:function(){h.setAttribute("style","display:inline")},end:function(){h.setAttribute("style",
+"display:none")},_teardown:function(k){document.getElementById(k.target)&&document.getElementById(k.target).removeChild(h);delete k.feed}}},{about:{name:"Popcorn Google Feed Plugin",version:"0.1",author:"David Seifried",website:"dseifried.wordpress.com"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},target:"feed-container",url:{elem:"input",type:"url",label:"Feed URL","default":"http://planet.mozilla.org/rss20.xml"},title:{elem:"input",type:"text",
+label:"Title","default":"Planet Mozilla",optional:true},orientation:{elem:"select",options:["Vertical","Horizontal"],label:"Orientation","default":"Vertical",optional:true}}})})(Popcorn);(function(p){function e(b){return String(b).replace(/&(?!\w+;)|[<>"']/g,function(h){return d[h]||h})}function l(b,h){var i=b.container=document.createElement("div"),g=i.style,k=b.media,r=function(){var m=b.position();g.fontSize="18px";g.width=k.offsetWidth+"px";g.top=m.top+k.offsetHeight-i.offsetHeight-40+"px";g.left=m.left+"px";setTimeout(r,10)};i.id=h||"";g.position="absolute";g.color="white";g.textShadow="black 2px 2px 6px";g.fontWeight="bold";g.textAlign="center";r();b.media.parentNode.appendChild(i);
+return i}var d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};p.plugin("text",{manifest:{about:{name:"Popcorn Text Plugin",version:"0.1",author:"@humphd"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},text:{elem:"input",type:"text",label:"Text","default":"Popcorn.js"},escape:{elem:"input",type:"checkbox",label:"Escape"},multiline:{elem:"input",type:"checkbox",label:"Multiline"}}},_setup:function(b){var h,i,g=b._container=document.createElement("div");
+g.style.display="none";if(b.target)if(h=p.dom.find(b.target)){if(["VIDEO","AUDIO"].indexOf(h.nodeName)>-1)h=l(this,b.target+"-overlay")}else h=l(this,b.target);else h=this.container?this.container:l(this);b._target=h;i=b.escape?e(b.text):b.text;i=b.multiline?i.replace(/\r?\n/gm,"<br>"):i;g.innerHTML=i||"";h.appendChild(g);b.toString=function(){return b.text||b._natives.manifest.options.text["default"]}},start:function(b,h){h._container.style.display="inline"},end:function(b,h){h._container.style.display=
+"none"},_teardown:function(b){var h=b._target;h&&h.removeChild(b._container)}})})(Popcorn);(function(p){p.plugin("code",function(e){var l=false,d=this,b=function(){var h=function(i){return function(g,k){var r=function(){l&&g.call(d,k);l&&i(r)};r()}};return window.webkitRequestAnimationFrame?h(window.webkitRequestAnimationFrame):window.mozRequestAnimationFrame?h(window.mozRequestAnimationFrame):h(function(i){window.setTimeout(i,16)})}();if(!e.onStart||typeof e.onStart!=="function")e.onStart=p.nop;if(e.onEnd&&typeof e.onEnd!=="function")e.onEnd=undefined;if(e.onFrame&&typeof e.onFrame!==
+"function")e.onFrame=undefined;return{start:function(h,i){i.onStart.call(d,i);if(i.onFrame){l=true;b(i.onFrame,i)}},end:function(h,i){if(i.onFrame)l=false;i.onEnd&&i.onEnd.call(d,i)}}},{about:{name:"Popcorn Code Plugin",version:"0.1",author:"David Humphrey (@humphd)",website:"http://vocamus.net/dave"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},onStart:{elem:"input",type:"function",label:"onStart"},onFrame:{elem:"input",type:"function",label:"onFrame",
+optional:true},onEnd:{elem:"input",type:"function",label:"onEnd"}}})})(Popcorn);(function(p){function e(b){function h(){var r=b.getBoundingClientRect(),m=g.getBoundingClientRect();if(m.left!==r.left)g.style.left=r.left+"px";if(m.top!==r.top)g.style.top=r.top+"px"}var i=-1,g=document.createElement("div"),k=getComputedStyle(b).zIndex;g.setAttribute("data-popcorn-helper-container",true);g.style.position="absolute";g.style.zIndex=isNaN(k)?l:k+1;document.body.appendChild(g);return{element:g,start:function(){i=setInterval(h,d)},stop:function(){clearInterval(i);i=-1},destroy:function(){document.body.removeChild(g);
+i!==-1&&clearInterval(i)}}}var l=2E3,d=10;p.plugin("image",{manifest:{about:{name:"Popcorn image Plugin",version:"0.1",author:"Scott Downe",website:"http://scottdowne.wordpress.com/"},options:{start:{elem:"input",type:"number",label:"Start"},end:{elem:"input",type:"number",label:"End"},src:{elem:"input",type:"url",label:"Image URL","default":"http://mozillapopcorn.org/wp-content/themes/popcorn/images/for_developers.png"},href:{elem:"input",type:"url",label:"Link","default":"http://mozillapopcorn.org/wp-content/themes/popcorn/images/for_developers.png",
+optional:true},target:"image-container",text:{elem:"input",type:"text",label:"Caption","default":"Popcorn.js",optional:true}}},_setup:function(b){var h=document.createElement("img"),i=document.getElementById(b.target);b.anchor=document.createElement("a");b.anchor.style.position="relative";b.anchor.style.textDecoration="none";b.anchor.style.display="none";if(i)if(["VIDEO","AUDIO"].indexOf(i.nodeName)>-1){b.trackedContainer=e(i);b.trackedContainer.element.appendChild(b.anchor)}else i&&i.appendChild(b.anchor);
+h.addEventListener("load",function(){h.style.borderStyle="none";b.anchor.href=b.href||b.src||"#";b.anchor.target="_blank";var g,k;h.style.height=i.style.height;h.style.width=i.style.width;b.anchor.appendChild(h);if(b.text){g=h.height/12+"px";k=document.createElement("div");p.extend(k.style,{color:"black",fontSize:g,fontWeight:"bold",position:"relative",textAlign:"center",width:h.style.width||h.width+"px",zIndex:"10"});k.innerHTML=b.text||"";k.style.top=(h.style.height.replace("px","")||h.height)/
+2-k.offsetHeight/2+"px";b.anchor.insertBefore(k,h)}},false);h.src=b.src;b.toString=function(){var g=b.src||b._natives.manifest.options.src["default"],k=g.replace(/.*\//g,"");return k.length?k:g}},start:function(b,h){h.anchor.style.display="inline";h.trackedContainer&&h.trackedContainer.start()},end:function(b,h){h.anchor.style.display="none";h.trackedContainer&&h.trackedContainer.stop()},_teardown:function(b){if(b.trackedContainer)b.trackedContainer.destroy();else b.anchor.parentNode&&b.anchor.parentNode.removeChild(b.anchor)}})})(Popcorn);(function(p){p.parser("parseXML","XML",function(e){var l={title:"",remote:"",data:[]},d={},b=function(m){m=m.split(":");if(m.length===1)return parseFloat(m[0],10);else if(m.length===2)return parseFloat(m[0],10)+parseFloat(m[1]/12,10);else if(m.length===3)return parseInt(m[0]*60,10)+parseFloat(m[1],10)+parseFloat(m[2]/12,10);else if(m.length===4)return parseInt(m[0]*3600,10)+parseInt(m[1]*60,10)+parseFloat(m[2],10)+parseFloat(m[3]/12,10)},h=function(m){for(var t={},q=0,o=m.length;q<o;q++){var u=m.item(q).nodeName,
+E=m.item(q).nodeValue,C=d[E];if(u==="in")t.start=b(E);else if(u==="out")t.end=b(E);else if(u==="resourceid")for(var f in C){if(C.hasOwnProperty(f))if(!t[f]&&f!=="id")t[f]=C[f]}else t[u]=E}return t},i=function(m,t){var q={};q[m]=t;return q},g=function(m,t,q){var o={};p.extend(o,t,h(m.attributes),{text:m.textContent||m.text});t=m.childNodes;if(t.length<1||t.length===1&&t[0].nodeType===3)if(q)d[o.id]=o;else l.data.push(i(m.nodeName,o));else for(m=0;m<t.length;m++)t[m].nodeType===1&&g(t[m],o,q)};e=e.documentElement.childNodes;
+for(var k=0,r=e.length;k<r;k++)if(e[k].nodeType===1)e[k].nodeName==="manifest"?g(e[k],{},true):g(e[k],{},false);return l})})(Popcorn);(function(p){p.parser("parseSBV",function(e){var l={title:"",remote:"",data:[]},d=[],b=0,h=0,i=function(q){q=q.split(":");var o=q.length-1,u;try{u=parseInt(q[o-1],10)*60+parseFloat(q[o],10);if(o===2)u+=parseInt(q[0],10)*3600}catch(E){throw"Bad cue";}return u},g=function(q,o){var u={};u[q]=o;return u};e=e.text.split(/(?:\r\n|\r|\n)/gm);for(h=e.length;b<h;){var k={},r=[],m=e[b++].split(",");try{k.start=i(m[0]);for(k.end=i(m[1]);b<h&&e[b];)r.push(e[b++]);k.text=r.join("<br />");d.push(g("subtitle",k))}catch(t){for(;b<
+h&&e[b];)b++}for(;b<h&&!e[b];)b++}l.data=d;return l})})(Popcorn);(function(p){p.parser("parseJSON","JSON",function(e){var l={title:"",remote:"",data:[]};p.forEach(e.data,function(d){l.data.push(d)});return l})})(Popcorn);(function(p){p.parser("parseTTXT",function(e){var l={title:"",remote:"",data:[]},d=function(k){k=k.split(":");var r=0;try{return parseFloat(k[0],10)*60*60+parseFloat(k[1],10)*60+parseFloat(k[2],10)}catch(m){r=0}return r},b=function(k,r){var m={};m[k]=r;return m};e=e.xml.lastChild.lastChild;for(var h=Number.MAX_VALUE,i=[];e;){if(e.nodeType===1&&e.nodeName==="TextSample"){var g={};g.start=d(e.getAttribute("sampleTime"));g.text=e.getAttribute("text");if(g.text){g.end=h-0.0010;i.push(b("subtitle",g))}h=
+g.start}e=e.previousSibling}l.data=i.reverse();return l})})(Popcorn);(function(p){function e(g,k,r){var m=g.firstChild;g=l(g,r);r=[];for(var t;m;){if(m.nodeType===1)if(m.nodeName==="p")r.push(d(m,k,g));else if(m.nodeName==="div"){t=b(m.getAttribute("begin"));if(t<0)t=k;r.push.apply(r,e(m,t,g))}m=m.nextSibling}return r}function l(g,k){var r=g.getAttribute("region");return r!==null?r:k||""}function d(g,k,r){var m={};m.text=(g.textContent||g.text).replace(h,"").replace(i,"<br />");m.id=g.getAttribute("xml:id")||g.getAttribute("id");m.start=b(g.getAttribute("begin"),k);
+m.end=b(g.getAttribute("end"),k);m.target=l(g,r);if(m.end<0){m.end=b(g.getAttribute("duration"),0);if(m.end>=0)m.end+=m.start;else m.end=Number.MAX_VALUE}return{subtitle:m}}function b(g,k){var r;if(!g)return-1;try{return p.util.toSeconds(g)}catch(m){for(var t=g.length-1;t>=0&&g[t]<="9"&&g[t]>="0";)t--;r=t;t=parseFloat(g.substring(0,r));r=g.substring(r);return t*({h:3600,m:60,s:1,ms:0.0010}[r]||-1)+(k||0)}}var h=/^[\s]+|[\s]+$/gm,i=/(?:\r\n|\r|\n)/gm;p.parser("parseTTML",function(g){var k={title:"",
+remote:"",data:[]};if(!g.xml||!g.xml.documentElement)return k;g=g.xml.documentElement.firstChild;if(!g)return k;for(;g.nodeName!=="body";)g=g.nextSibling;if(g)k.data=e(g,0);return k})})(Popcorn);(function(p){function e(d){var b=d.split(":");d=d.length;var h;if(d!==12&&d!==9)throw"Bad cue";d=b.length-1;try{h=parseInt(b[d-1],10)*60+parseFloat(b[d],10);if(d===2)h+=parseInt(b[0],10)*3600}catch(i){throw"Bad cue";}return h}function l(d,b){var h={};h[d]=b;return h}p.parser("parseVTT",function(d){var b={title:"",remote:"",data:[]},h=[],i=0,g=0,k,r;d=d.text.split(/(?:\r\n|\r|\n)/gm);g=d.length;if(g===0||d[0]!=="WEBVTT")return b;for(i++;i<g;){k=[];try{for(var m=i;m<g&&!d[m];)m++;i=m;var t=d[i++];m=
+void 0;var q={};if(!t||t.indexOf("--\>")===-1)throw"Bad cue";m=t.replace(/--\>/," --\> ").split(/[\t ]+/);if(m.length<2)throw"Bad cue";q.id=t;q.start=e(m[0]);q.end=e(m[2]);for(r=q;i<g&&d[i];)k.push(d[i++]);r.text=k.join("<br />");h.push(l("subtitle",r))}catch(o){for(i=i;i<g&&d[i];)i++;i=i}}b.data=h;return b})})(Popcorn);(function(p){function e(b,h){var i=b.substr(10).split(","),g;g={start:l(i[h.start]),end:l(i[h.end])};if(g.start===-1||g.end===-1)throw"Invalid time";var k=q.call(m,/\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}/gi,""),r=k.replace,m;m=i.length;q=[];for(var t=h.text;t<m;t++)q.push(i[t]);m=q.join(",");var q=m.replace;g.text=r.call(k,/\\N/gi,"<br />");return g}function l(b){var h=b.split(":");if(b.length!==10||h.length<3)return-1;return parseInt(h[0],10)*3600+parseInt(h[1],10)*60+parseFloat(h[2],10)}function d(b,
+h){var i={};i[b]=h;return i}p.parser("parseSSA",function(b){var h={title:"",remote:"",data:[]},i=[],g=0,k;b=b.text.split(/(?:\r\n|\r|\n)/gm);for(k=b.length;g<k&&b[g]!=="[Events]";)g++;var r=b[++g].substr(8).split(", "),m={},t,q;q=0;for(t=r.length;q<t;q++)if(r[q]==="Start")m.start=q;else if(r[q]==="End")m.end=q;else if(r[q]==="Text")m.text=q;for(;++g<k&&b[g]&&b[g][0]!=="[";)try{i.push(d("subtitle",e(b[g],m)))}catch(o){}h.data=i;return h})})(Popcorn);(function(p){function e(d,b){var h={};h[d]=b;return h}function l(d){d=d.split(":");try{var b=d[2].split(",");if(b.length===1)b=d[2].split(".");return parseFloat(d[0],10)*3600+parseFloat(d[1],10)*60+parseFloat(b[0],10)+parseFloat(b[1],10)/1E3}catch(h){return 0}}p.parser("parseSRT",function(d,b){var h={title:"",remote:"",data:[]},i=[],g=0,k=0,r,m,t,q,o;r=d.text.split(/(?:\r\n|\r|\n)/gm);for(t=r.length-1;t>=0&&!r[t];)t--;q=t+1;for(g=0;g<q;g++){o={};t=[];for(g=g;!r[g];)g++;g=g;o.id=parseInt(r[g++],10);
+m=r[g++].split(/[\t ]*--\>[\t ]*/);o.start=l(m[0]);k=m[1].indexOf(" ");if(k!==-1)m[1]=m[1].substr(0,k);for(o.end=l(m[1]);g<q&&r[g];)t.push(r[g++]);o.text=t.join("\\N").replace(/\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}/gi,"");o.text=o.text.replace(/</g,"&lt;").replace(/>/g,"&gt;");o.text=o.text.replace(/&lt;(\/?(font|b|u|i|s))((\s+(\w|\w[\w\-]*\w)(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)(\/?)&gt;/gi,"<$1$3$7>");o.text=o.text.replace(/\\N/gi,"<br />");if(b&&b.target)o.target=b.target;i.push(e("subtitle",
+o))}h.data=i;return h})})(Popcorn);(function(p,e){e.player("vimeo",{_canPlayType:function(l,d){return typeof d==="string"&&e.HTMLVimeoVideoElement._canPlaySrc(d)}});e.vimeo=function(l,d,b){typeof console!=="undefined"&&console.warn&&console.warn("Deprecated player 'vimeo'. Please use Popcorn.HTMLVimeoVideoElement directly.");var h=e.HTMLVimeoVideoElement(l);l=e(h,b);setTimeout(function(){h.src=d},0);return l}})(window,Popcorn);(function(p,e){var l=function(d,b){return typeof b==="string"&&e.HTMLYouTubeVideoElement._canPlaySrc(b)};e.player("youtube",{_canPlayType:l});e.youtube=function(d,b,h){typeof console!=="undefined"&&console.warn&&console.warn("Deprecated player 'youtube'. Please use Popcorn.HTMLYouTubeVideoElement directly.");var i=e.HTMLYouTubeVideoElement(d);d=e(i,h);setTimeout(function(){i.src=b},0);return d};e.youtube.canPlayType=l})(window,Popcorn);(function(p,e){e.player("soundcloud",{_canPlayType:function(l,d){return typeof d==="string"&&e.HTMLSoundCloudAudioElement._canPlaySrc(d)&&l.toLowerCase()!=="audio"}});e.soundcloud=function(l,d,b){typeof console!=="undefined"&&console.warn&&console.warn("Deprecated player 'soundcloud'. Please use Popcorn.HTMLSoundCloudAudioElement directly.");var h=e.HTMLSoundCloudAudioElement(l);l=e(h,b);setTimeout(function(){h.src=d},0);return l}})(window,Popcorn);
--- a/server/src/remie/static/remie/js/tracemanager.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/js/tracemanager.js	Fri Oct 02 10:24:23 2015 +0200
@@ -21,12 +21,19 @@
 window.tracemanager = (function($) {
      // If there are more than MAX_FAILURE_COUNT synchronisation
      // failures, then disable synchronisation
-     MAX_FAILURE_COUNT = 20;
+    var MAX_FAILURE_COUNT = 20;
 
      // If there are more than MAX_BUFFER_SIZE obsels in the buffer,
      // then "compress" them as a single "ktbsFullBuffer"
-     MAX_BUFFER_SIZE = 500;
+    var  MAX_BUFFER_SIZE = 500;
 
+    var _replacement = {
+         ';': '"',
+         '"': ';',
+         '#': '%23',
+         '&': '%26',
+         '?': '%3F'
+     };
      var BufferedService_prototype = {
          /*
           *  Buffered service for traces
@@ -60,7 +67,7 @@
                      // Swap " (very frequent, which will be
                      // serialized into %22) and ; (rather rare), this
                      // saves some bytes
-                     data = data.replace(/[;"#]/g, function(s){ return s == ';' ? '"' : ( s == '"' ? ';' : '%23'); });
+                     data = data.replace(/[;"#?&]/g, function(s){ return _replacement[s]; });
                      // FIXME: check data length (< 2K is safe)
                      var request=$('<img />').error( function() { this.failureCount += 1; })
                          .load( function() { this.failureCount = 0; })
--- a/server/src/remie/static/remie/metadataplayer/Annotation.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Annotation.js	Fri Oct 02 10:24:23 2015 +0200
@@ -179,6 +179,9 @@
     this.onMdpEvent("Annotation.maximize","maximize");
     this.onMdpEvent("Annotation.getBounds","sendBounds");
     this.$.find(".Ldt-Annotation-MaxMinButton").click(this.functionWrapper("toggleSize"));
+    this.$.on("resize", function () { _this.width = _this.$.parent().width();
+                                      _this.$.css({ width: _this.width });
+                                    });
     this.getWidgetAnnotations().forEach(function(_a) {
         _a.on("enter", function() {
             drawAnnotation(_a);
@@ -194,7 +197,8 @@
 	    	image: currentAnnotation.thumbnail,
 	    	uri: (typeof currentAnnotation.url !== "undefined" 
 	            ? currentAnnotation.url
-	            : (document.location.href.replace(/#.*$/,'') + '#id='  + currentAnnotation.id))
+	            : (document.location.href.replace(/#.*$/,'') + '#id='  + currentAnnotation.id)),
+            text: '[' + currentAnnotation.begin.toString() + '] ' + currentAnnotation.title
 	    };
     });
 };
--- a/server/src/remie/static/remie/metadataplayer/AnnotationsList.css	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/AnnotationsList.css	Fri Oct 02 10:24:23 2015 +0200
@@ -8,7 +8,6 @@
 .Ldt-AnnotationsListWidget {
     border: none; margin: 0; padding: 0;
     overflow: auto;
-    max-height: 380px;
 }
 .Ldt-AnnotationsListWidget a {
     text-decoration: none;
@@ -56,7 +55,8 @@
     clear: both;
     margin: 2px 0;
     padding: 2px 0;
-    min-height: 60px;
+    min-height: 3em;
+    position: relative;
 }
 .Ldt-AnnotationsList-li.selected {
     background-image: url(img/pinstripe-grey.png);
@@ -66,7 +66,8 @@
     width: 80px;
     height: 50px;
     text-align: center;
-    margin: 2px 0;
+    margin: 10px 2px;
+    box-shadow: #808080 0px 0px 2px;
 }
 .Ldt-AnnotationsList-Thumbnail {
     border: none;
@@ -113,6 +114,10 @@
     color: #0068c4;
 }
 
+.Ldt-AnnotationsList-Creator {
+    color: #aaa;
+}
+
 p.Ldt-AnnotationsList-Description {
     margin: 2px 0 2px 82px;
     font-size: 12px;
@@ -162,6 +167,50 @@
     background-position: 0 bottom;
 }
 
+.Ldt-AnnotationsList-EditControls {
+    opacity: 0;
+    position: absolute;
+    bottom: 2px;
+    right: 8px;
+}
+
+.Ldt-AnnotationsList-li:hover .Ldt-AnnotationsList-EditControls {
+    display: inline-block;
+    opacity: .8;
+    transition: opacity 1000ms ease-in-out;
+}
+
+.Ldt-AnnotationsList-EditControls > div {
+    display: inline-block;
+    width: 16px;
+    height: 16px;
+    cursor: pointer;
+    margin-left: 8px;
+}
+
+.Ldt-AnnotationsList-Delete {
+    background: url(img/delete.png);
+}
+
+.Ldt-AnnotationsList-Edit {
+    background: url(img/edit.png);
+}
+
+.Ldt-AnnotationsList-PublishAnnotation {
+    background: url(img/publish_annotation.png);
+}
+
+.published .Ldt-AnnotationsList-PublishAnnotation {
+    background: url(img/published_annotation.png);
+}
+
+.editing {
+    display: none;
+}
+
+.editableInput {
+    width: 80%;
+
 .Ldt-AnnotationsList-ScreenMain{
 	margin: 0px;
 	padding: 0px;
--- a/server/src/remie/static/remie/metadataplayer/AnnotationsList.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/AnnotationsList.js	Fri Oct 02 10:24:23 2015 +0200
@@ -2,11 +2,12 @@
     IriSP.Widgets.Widget.call(this, player, config);
     this.lastIds = [];
     var _this = this;
-    this.throttledRefresh = IriSP._.throttle(function() {
-        _this.refresh(false);
+    this.throttledRefresh = IriSP._.throttle(function(full) {
+        _this.refresh(full);
     }, 800);
     this.searchString = false;
     this.lastSearch = false;
+    this.localSource = undefined;
 };
 
 IriSP.Widgets.AnnotationsList.prototype = new IriSP.Widgets.Widget();
@@ -25,7 +26,7 @@
      * number of milliseconds before/after the current timecode when calling the
      * segment API
      */
-    ajax_granularity : 600000, 
+    ajax_granularity : 600000,
     default_thumbnail : "",
     /*
      * URL when the annotation is not in the current project, e.g.
@@ -36,6 +37,25 @@
     refresh_interval : 0,
     limit_count : 20,
     newest_first : false,
+    show_title: true,
+    show_audio: true,
+    show_creator: true,
+    show_controls: false,
+    show_end_time: true,
+    show_publish: false,
+    show_twitter: false,
+    twitter_hashtag: '',
+    // Callback for Edit action. Leave undefined for default action.
+    on_edit: undefined,
+    publish_type: "PublicContribution",
+    // Used to publish annotations
+    api_endpoint_template: "",
+    api_serializer: "ldt_annotate",
+    api_method: "POST",
+    editable: false,
+    // Id that will be used as localStorage key
+    editable_storage: "",
+
     always_visible : false,
     start_visible: true,
     show_audio : true,
@@ -77,6 +97,7 @@
      * Show a text field that filter annotations by username
      */
     tags : true,
+
     polemics : [{
         keyword: "++",
         background_color: "#c9ecc6"
@@ -93,12 +114,12 @@
 };
 
 IriSP.Widgets.AnnotationsList.prototype.importUsers = function(){
-    if (!this.source.users_data){
+    if (!this.source.users_data && this.api_users_endpoint){
         this.usernames = Array();
         var _this = this,
             _list = this.getWidgetAnnotations(),
             usernames_list_string = "";
-        
+
         _list.forEach(function(_annotation){
             if(_this.usernames.indexOf(_annotation.creator) == -1){
                 _this.usernames.push(_annotation.creator);
@@ -129,6 +150,16 @@
     en: {
         voice_annotation: "Voice Annotation",
         now_playing: "Now playing...",
+        previous: "Previous",
+        next: "Next",
+        set_time: "Double-click to update to current player time",
+        edit_annotation: "Edit note",
+        delete_annotation: "Delete note",
+        publish_annotation: "Make note public",
+        import_annotations: "Paste or load notes in this field and press Import.",
+        confirm_delete_message: "You are about to delete {{ annotation.title }}. Are you sure you want to delete it?",
+        confirm_publish_message: "You are about to publish {{ annotation.title }}. Are you sure you want to make it public?",
+        tweet_annotation: "Tweet annotation",
         everyone: "Everyone",
         header: "Annotations for this content",
         segment_filter: "All cuttings",
@@ -144,6 +175,16 @@
     fr: {
         voice_annotation: "Annotation Vocale",
         now_playing: "Lecture en cours...",
+        previous: "Précédent",
+        next: "Suivant",
+        set_time: "Double-cliquer pour fixer au temps du lecteur",
+        edit_annotation: "Éditer la note",
+        delete_annotation: "Supprimer la note",
+        publish_annotation: "Rendre la note publique",
+        import_annotations: "Copiez ou chargez des notes dans ce champ et appuyez sur Import",
+        confirm_delete_message: "Vous allez supprimer {{ annotation.title }}. Êtes-vous certain(e) ?",
+        confirm_publish_message: "Vous allez publier {{ annotation.title }}. Êtes-vous certain(e) ?",
+        tweet_annotation: "Tweeter l'annotation",
         everyone: "Tous",
         header: "Annotations sur ce contenu",
         segment_filter: "Tous les segments",
@@ -174,61 +215,69 @@
     +             '{{#latest_contributions_filter}}<label class="Ldt-AnnotationsList-filter-checkbox"><input type="checkbox" id="Ldt-AnnotationsList-latestContributionsFilter">{{l10n.latest_contributions}}</label>{{/latest_contributions_filter}}'
     +         '</div>'
     +         '{{/show_filters}}'
+    +         '{{#show_controls}}<div class="Ldt-AnnotationsList-Controls"><span class="Ldt-AnnotationsList-Control-Prev">{{ l10n.previous }}</span> | <span class="Ldt-AnnotationsList-Control-Next">{{ l10n.next }}</span></div>{{/show_controls}}'
     +         '{{#show_audio}}<div class="Ldt-AnnotationsList-Audio"></div>{{/show_audio}}'
     +         '<ul class="Ldt-AnnotationsList-ul">'
     +         '</ul>'
     +     '</div>'    
     +     '{{#allow_annotations_deletion}}'
-    +     '<div id="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenDelete">'
+    +     '<div data-annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenDelete">'
     +         '<a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>' 
     +         '<ul class="Ldt-AnnotationsList-ul-ToDelete"></ul>'
     +         '{{l10n.annotation_deletion_delete}} <a class="Ldt-AnnotationsList-ConfirmDelete">{{l10n.confirm}}</a> <a class="Ldt-AnnotationsList-CancelDelete">{{l10n.cancel}}</a>'
     +     '</div>'
-    +     '<div id="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenSending">'
+    +     '<div data-annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenSending">'
     +         '<a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>'  
     +         '{{l10n.annotation_deletion_sending}}'
     +     '</div>'
-    +     '<div id="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenSuccess">'
+    +     '<div data-annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenSuccess">'
     +         '<a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>'  
     +         '{{l10n.annotation_deletion_success}}'
     +     '</div>'
-    +     '<div id="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenError">'
+    +     '<div data.annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenError">'
     +         '<a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>'  
     +         '{{l10n.annotation_deletion_error}}'
     +     '</div>'
     +     '{{/allow_annotations_deletion}}'
     + '</div>';
 
-IriSP.Widgets.AnnotationsList.prototype.annotationTemplate = 
-    '<li class="Ldt-AnnotationsList-li Ldt-TraceMe" trace-info="annotation-id:{{id}}, media-id:{{media_id}}" style="{{specific_style}}">'
-    + '<div id="{{id}}" class="Ldt-AnnotationsList-ThumbContainer Ldt-AnnotationsList-Annotation-Screen Ldt-AnnotationsList-Annotation-ScreenMain">'
-    + '<a href="{{url}}" draggable="true">'
-    + '<img class="Ldt-AnnotationsList-Thumbnail" src="{{thumbnail}}" />'
-    + '</a>'
+IriSP.Widgets.AnnotationsList.prototype.annotationTemplate =
+    '<li class="Ldt-AnnotationsList-li Ldt-Highlighter-Annotation Ldt-TraceMe" data-annotation="{{ id }}" data-begin="{{ begin_ms }}" data-end="{{ end_ms }}" trace-info="annotation-id:{{id}}, media-id:{{media_id}}" style="{{specific_style}}">'
+    + '<div data-annotation="{{ id }}" class="Ldt-AnnotationsList-ThumbContainer Ldt-AnnotationsList-Annotation-Screen Ldt-AnnotationsList-Annotation-ScreenMain">'
+    +   '<a href="{{url}}" draggable="true">'
+    +     '<img title="{{ begin }} - {{ title }}" class="Ldt-AnnotationsList-Thumbnail" src="{{thumbnail}}" />'
+    +   '</a>'
     + '</div>'
     + '{{#allow_annotations_deletion}}'
-    + '<div id={{id}} class="Ldt-AnnotationsList-DeleteButton">&#10006;</div>'
+    + '<div data-annotation="{{ id }}" class="Ldt-AnnotationsList-DeleteButton">&#10006;</div>'
     + '{{/allow_annotations_deletion}}'
-    + '{{#show_timecode}}<div class="Ldt-AnnotationsList-Duration">{{begin}} - {{end}}</div>{{/show_timecode}}'
-    + '<h3 class="Ldt-AnnotationsList-Title" draggable="true">'
-    + '<a {{#url}} href="{{url}}" {{/url}}>{{{htitle}}}</a>'
+    + '{{#show_timecode}}<div title="{{l10n.set_time}}" class="Ldt-AnnotationsList-Duration"><span class="Ldt-AnnotationsList-Begin Ldt-live-editable Ldt-AnnotationsList-TimeEdit" data-editable_value="{{begin}}" data-editable_id="{{id}}" data-editable_field="begin" data-editable_type="timestamp">{{begin}}</span>{{#show_end_time}} - <span class="Ldt-AnnotationsList-End Ldt-live-editable" data-editable_value="{{end}}" data-editable_id="{{id}}" data-editable_field="end" data-editable_type="timestamp">{{end}}</span>{{/show_end_time}}</div>{{/show_timecode}}'
+    + '<h3 class="Ldt-AnnotationsList-Title Ldt-Annotation-Timecode" data-timecode="{{ begin_ms }}" draggable="true">'
+    + '{{#show_title}}<span class="Ldt-AnnotationsList-TitleContent Ldt-live-editable" data-editable_value="{{title}}" data-editable_type="multiline" data-editable_id="{{id}}" data-editable_field="title">{{{htitle}}}</span>{{/show_title}}'
+    + '{{#show_creator}}<span class="Ldt-AnnotationsList-Creator">{{ creator }}</span>{{/show_creator}}'
     + '</h3>'
-    + '<p class="Ldt-AnnotationsList-Description">{{{hdescription}}}</p>'
+    + '<p class="Ldt-AnnotationsList-Description Ldt-live-editable" data-editable_type="multiline" data-editable_value="{{description}}" data-editable_id="{{id}}" data-editable_field="description">{{{hdescription}}}</p>'
     + '{{#created}}'
     + '<div class="Ldt-AnnotationsList-CreationDate">{{{created}}}</div>'
     + '{{/created}}'
     + '{{#tags.length}}'
     + '<ul class="Ldt-AnnotationsList-Tags">'
-    + '{{#tags}}'
-    + '{{#.}}'
-    + '<li class="Ldt-AnnotationsList-Tag-Li">'
-    + '<span>{{.}}</span>'
-    + '</li>'
-    + '{{/.}}'
-    + '{{/tags}}'
+    +   '{{#tags}}'
+    +   '{{#.}}'
+    +   '<li class="Ldt-AnnotationsList-Tag-Li">'
+    +     '<span>{{.}}</span>'
+    +   '</li>'
+    +   '{{/.}}'
+    +   '{{/tags}}'
     + '</ul>'
     + '{{/tags.length}}'
-    + '{{#audio}}<div class="Ldt-AnnotationsList-Play" data-annotation-id="{{id}}">{{l10n.voice_annotation}}</div>{{/audio}}'    
+    + '{{#audio}}<div class="Ldt-AnnotationsList-Play" data-annotation-id="{{id}}">{{l10n.voice_annotation}}</div>{{/audio}}'
+    + '<div class="Ldt-AnnotationsList-EditControls">'
+    +    '{{#show_twitter}}<a title="{{l10n.tweet_annotation}}" target="_blank" href="https://twitter.com/intent/tweet?{{twitter_param}}"><img width="16" height="16" src="metadataplayer/img/twitter.svg"></a>{{/show_twitter}}'
+    +    '{{#show_publish}}<div title="{{l10n.publish_annotation}}" class="Ldt-AnnotationsList-PublishAnnotation" data-editable_id="{{id}}"></div>{{/show_publish}}'
+    +    '{{#editable}}<div title="{{l10n.edit_annotation}}" class="Ldt-AnnotationsList-Edit" data-editable_id="{{id}}"></div>'
+    +    '<div title="{{l10n.delete_annotation}}" class="Ldt-AnnotationsList-Delete" data-editable_id="{{id}}"></div>{{/editable}}'
+    + '</div>'
     + '</li>';
 
 // obj.url = this.project_url + "/" + media + "/" + annotations[i].meta.project
@@ -270,6 +319,78 @@
     }
 };
 
+/*
+ * Import annotations
+ */
+IriSP.Widgets.AnnotationsList.prototype.importAnnotations = function () {
+    var widget = this;
+    var $ = IriSP.jQuery;
+    var textarea = $("<textarea>");
+    var el = $("<div>")
+            .append($("<span>")
+                    .addClass("importAnnotationsLabel")
+                    .text(widget.messages.import_annotations))
+            .addClass("importContainer")
+            .dialog({
+                title: "Annotation import",
+                autoOpen: true,
+                width: '80%',
+                minHeight: '400',
+                height: 400,
+                buttons: [ { text: "Close", click: function() { $( this ).dialog( "close" ); } },
+                           // { text: "Load", click: function () {
+                           //     // TODO
+                           //     // http://www.html5rocks.com/en/tutorials/file/dndfiles/?redirect_from_locale=fr
+                           //     console.log("Load from a file");
+                           // } },
+                           { text: "Import", click: function () {
+                               // FIXME: this should be a model.Source method
+                               var time_regexp = /(\[[\d:]+\])/;
+                               console.log("Import data");
+                               // widget.localSource
+                               // Dummy parsing for the moment
+                               var data = textarea[0].value
+                                       .split(time_regexp)
+                                       .filter( function (s) { return ! s.match(/^\s*$/)});
+                               var begin = null,
+                                   end = null,
+                                   content = null,
+                                   // Previous is either null, timestamp or text
+                                   previous = null;
+                               for (var i = 0; i < data.length; i++) {
+                                   var el = data[i];
+                                   if (el.match(time_regexp)) {
+                                       if (previous == 'text') {
+                                           // Timestamp following text. Let's make it an annotation
+                                           end = IriSP.timestamp2ms(el.slice(1, -1));
+                                           TODO.createAnnotation(begin, end, content);
+                                           // Preserve the end value, which may be the begin value of the next annotation.
+                                           begin = end;
+                                           end = null;
+                                           content = null;
+                                       } else {
+                                           //  (previous == 'timestamp' || previous == null)
+                                           // 2 consecutive timestamps. Let's start a new annotation
+                                           content = null;
+                                           begin = IriSP.timestamp2ms(el.slice(1, -1));
+                                           end = null;
+                                       };
+                                       previous = 'timestamp';
+                                   } else {
+                                       // Text content
+                                       content = el;
+                                       previous = 'text';
+                                   }
+                                   // Last textual value
+                                   if (previous == 'text' && begin !== null) {
+                                       TODO.createAnnotation(begin, begin, content);
+                                   }
+                               }
+                           } } ]
+            });
+
+}
+
 IriSP.Widgets.AnnotationsList.prototype.refresh = function(_forceRedraw) {
     _forceRedraw = (typeof _forceRedraw !== "undefined" && _forceRedraw);
     if (this.currentSource.status !== IriSP.Model._SOURCE_STATUS_READY) {
@@ -390,7 +511,7 @@
     }
     
     var _ids = _list.idIndex;
-    
+
     if (_forceRedraw || !IriSP._.isEqual(_ids, this.lastIds) || this.searchString !== this.lastSearch) {
         /* This part only gets executed if the list needs updating */
         this.lastSearch = this.searchString;
@@ -411,33 +532,33 @@
                             annotationType : _annotation.annotationType.id
                         }
                     )
-                    : document.location.href.replace(/#.*$/,'') + '#id=' + _annotation.id
+                    : document.location.href.replace(/#.*$/,'') + '#id=' + _annotation.id + '&t=' + (_annotation.begin / 1000.0)
                     )
             );
             var _title = "",
                 _description = _annotation.description,
-                _thumbnail = (typeof _annotation.thumbnail !== "undefined" && _annotation.thumbnail ? _annotation.thumbnail : _this.default_thumbnail)
-            
-            // Update : display creator
-            if (_annotation.creator) {
-                var _users = _this.source.users_data.filter(function(_user_data){
-                    return _user_data.username == _annotation.creator
-                }),
-                    _user = {};
-                if (_users.length == 0){
-                    _user.username = _annotation.creator
+                _thumbnail = (typeof _annotation.thumbnail !== "undefined" && _annotation.thumbnail ? _annotation.thumbnail : _this.default_thumbnail);
+            if (_this.show_creator){
+                if (_annotation.creator) {
+                    var _users = [],
+                        _user = {},
+                        _creator = "";
+                    if (_this.source.users_data) {
+                        _users = _this.source.users_data.filter(function(_user_data){
+                            return _user_data.username == _annotation.creator;
+                        });
+                    }
+                    if (_users.length == 0){
+                        _user.username = _annotation.creator
+                    }
+                    else{
+                        _user = _users[0]
+                    }
+                    _creator = _this.make_name_string_function(_user);
                 }
-                else{
-                    _user = _users[0]
-                }
-                _title = _this.make_name_string_function(_user);
             }
-            if (_annotation.title) {
-                var tempTitle = _annotation.title;
-                if( tempTitle.substr(0, _title.length + 1) == (_title + ":") ){
-                    _title = "";
-                }
-                _title = _title + ( (_title=="") ? "" : ": ") + _annotation.title;
+            if (_this.show_title && _annotation.title){
+                    var _title = _annotation.title;
             }
             var _bgcolor;
             IriSP._(_this.polemics).each(function(_polemic) {
@@ -460,7 +581,10 @@
                 id : _annotation.id,
                 media_id : _annotation.getMedia().id,
                 htitle : IriSP.textFieldHtml(_title),
+                title: _title,
+                creator: _creator,
                 hdescription : IriSP.textFieldHtml(_description),
+                description: _description,
                 begin : _annotation.begin.toString(),
                 end : _annotation.end.toString(),
                 created : _created,
@@ -470,6 +594,11 @@
                 tags : _tags,
                 specific_style : (typeof _bgcolor !== "undefined" ? "background-color: " + _bgcolor : ""),
                 l10n: _this.l10n,
+                editable: _this.editable,
+                show_publish: _this.show_publish,
+                show_creator: _this.show_creator,
+                show_twitter: _this.show_twitter,
+                twitter_param: IriSP.jQuery.param({ url: _url, text: IriSP.textFieldHtml(_title) + (_this.twitter_hashtag ? ' #' + _this.twitter_hashtag : "") }),
                 allow_annotations_deletion: _this.allow_annotations_deletion
             };
             if (_this.show_audio && _annotation.audio && _annotation.audio.href && _annotation.audio.href != "null") {
@@ -521,10 +650,11 @@
                 })
                 .appendTo(_this.list_$);
             IriSP.attachDndData(_el.find("[draggable]"), {
-                title: _title,
-                description: _description,
-                uri: _url,
-                image: _annotation.thumbnail
+            	title: _title,
+            	description: _description,
+            	uri: _url,
+                image: _annotation.thumbnail,
+                text: '[' + _annotation.begin.toString() + '] ' + _title
             });
             _el.on("remove", function() {
                 _annotation.off("select", _onselect);
@@ -533,7 +663,7 @@
             _annotation.on("select", _onselect);
             _annotation.on("unselect", _onunselect);
         });
-        
+
         /* Correct the empty tag bug */
         this.$.find('.Ldt-AnnotationsList-Tag-Li').each(function() {
             var _el = IriSP.jQuery(this);
@@ -541,11 +671,201 @@
                 _el.remove();
             }
         });
-    
+
+        if (this.editable) {
+            var widget = _this;
+            var $ = IriSP.jQuery;
+
+            var edit_element = function (_this, insertion_point) {
+                var feedback_wrong = "#FF9999";
+                var feedback_ok = "#99FF99";
+
+                // insertion_point can be used to specify where to
+                // insert the input field.  Firefox is buggy wrt input
+                // fields inside <a> or <h?> tags, it does not
+                // propagate mouse clicks. If _this is a <a> then we
+                // have to specify the ancestor before which we can
+                // insert the input widget.
+                if (insertion_point === undefined)
+                    insertion_point = _this;
+
+                // Insert input element
+                var input_element = $(_this.dataset.editable_type === 'multiline' ? "<textarea>" : "<input>")
+                        .addClass("editableInput")
+                        .insertBefore($(insertion_point));
+                input_element[0].value = _this.dataset.editable_value;
+                $(input_element).show().focus();
+                $(_this).addClass("editing");
+
+                function feedback(color) {
+                    // Give some feedback
+                    $(_this).removeClass("editing");
+                    input_element.remove();
+                    var previous_color = $(_this).css("background-color");
+                    $(_this).stop().css("background-color", color)
+                        .animate({ backgroundColor: previous_color}, 1000);
+                }
+
+                function cancelChanges(s) {
+                    feedback(feedback_wrong);
+                }
+                function validateChanges() {
+                    var n = input_element[0].value;
+                    if (n == _this.dataset.editable_value) {
+                        // No change
+                        feedback(feedback_ok);
+                        return;
+                    }
+                    if (n == '') {
+                        // Delete annotation
+                        delete_local_annotation(_this.dataset.editable_id);
+                        widget.player.trigger("Annotation.delete", _this.dataset.editable_id);
+                        return;
+                    } else {
+                        // Convert value if necessary.
+                        var val = n;
+                        if (_this.dataset.editable_type == 'timestamp') {
+                            val = IriSP.timestamp2ms(n);
+                            if (Number.isNaN(val)) {
+                                // Invalid value. Cancel changes
+                                cancelChanges();
+                                return;
+                            }
+                        }
+                        _this.dataset.editable_value = n;
+                        n = val;
+                        $(_this).text(val);
+                    }
+
+                    // We cannot use .getElement since it fetches
+                    // elements from the global Directory
+                    var an = get_local_annotation(_this.dataset.editable_id);
+                    if (an === undefined) {
+                        console.log("Strange error: cannot find edited annotation");
+                        feedback(feedback_wrong);
+                    } else {
+                        _this.dataset.editable_value = n;
+                        // Update annotation for storage
+                        if (_this.dataset.editable_field == 'begin')
+                            an.setBegin(n);
+                        else if (_this.dataset.editable_field == 'end')
+                            an.setEnd(n);
+                        else
+                            an[_this.dataset.editable_field] = n;
+                        an.modified = new Date();
+                        // FIXME: use user name, when available
+                        an.contributor = widget.player.config.username || "COCo User";
+                        widget.player.addLocalAnnotation(an);
+                        widget.player.trigger("Annotation.update", an);
+                        feedback(feedback_ok);
+                    }
+                }
+                $(input_element).bind('keydown', function(e) {
+                    if (e.which == 13) {
+                        e.preventDefault();
+                        validateChanges();
+                    } else if (e.which == 27) {
+                        e.preventDefault();
+                        cancelChanges();
+                    }
+                }).bind("blur", function (e) {
+                    validateChanges();
+                });
+            };
+
+            var get_local_annotation = function (ident) {
+                return widget.player.getLocalAnnotation(ident);
+            };
+
+            var save_local_annotations = function() {
+                widget.player.saveLocalAnnotations();
+                // Merge modifications into widget source
+                widget.source.merge(widget.player.localSource);
+            };
+
+            var delete_local_annotation = function(ident) {
+                widget.source.getAnnotations().removeId(ident, true);
+                widget.player.deleteLocalAnnotation(ident);
+                widget.refresh(true);
+            };
+
+            this.$.find('.Ldt-AnnotationsList-Delete').click(function(e) {
+                // Delete annotation
+                var _annotation = get_local_annotation(this.dataset.editable_id);
+                if (confirm(Mustache.to_html(widget.l10n.confirm_delete_message, { annotation: _annotation })))
+                    delete_local_annotation(this.dataset.editable_id);
+                widget.refresh(true);
+            });
+            this.$.find('.Ldt-AnnotationsList-Edit').click(function(e) {
+                if (widget.on_edit) {
+                    var _annotation = get_local_annotation(this.dataset.editable_id);
+                    widget.on_edit(_annotation);
+                } else {
+                    // Edit annotation title. We have to specify the insertion point.
+                    var element = $(this).parents(".Ldt-AnnotationsList-li").find(".Ldt-AnnotationsList-TitleContent.Ldt-live-editable");
+                    edit_element(element[0]);
+                }
+            });
+            this.$.find('.Ldt-AnnotationsList-PublishAnnotation').click(function(e) {
+                var _annotation = get_local_annotation(this.dataset.editable_id);
+                // Publish annotation to the server
+                if (!confirm(Mustache.to_html(widget.l10n.confirm_publish_message, { annotation: _annotation })))
+                    return;
+                var _url = Mustache.to_html(widget.api_endpoint_template, {id: widget.source.projectId});
+                if (_url !== "") {
+                    var _export = widget.player.sourceManager.newLocalSource({serializer: IriSP.serializers[widget.api_serializer]});
+
+                    if (widget.publish_type) {
+                        // If publish_type is specified, try to set the annotation type of the exported annotation
+                        var at = widget.source.getAnnotationTypes().filter(function(at) { return at.title == widget.publish_type; });
+                        if (at.length == 1) {
+                            _annotation.setAnnotationType(at[0].id);
+                        }
+                    }
+                    var _exportedAnnotations = new IriSP.Model.List(widget.player.sourceManager);
+                    _exportedAnnotations.push(_annotation);
+                    _export.addList("annotation", _exportedAnnotations);
+                    IriSP.jQuery.ajax({
+                        url: _url,
+                        type: widget.api_method,
+                        contentType: 'application/json',
+                        data: _export.serialize(),
+                        success: function(_data) {
+                            $(this).addClass("published");
+                            // Save the published information
+                            var an = get_local_annotation(_annotation.id);
+                            // FIXME: handle "published" tag
+                            an.setTags( [ "published" ]);
+                            save_local_annotations();
+                            widget.player.trigger("Annotation.publish", _annotation);
+                        },
+                        error: function(_xhr, _error, _thrown) {
+                            IriSP.log("Error when sending annotation", _thrown);
+                        }
+                    });
+                }
+            });
+            this.$.find('.Ldt-AnnotationsList-TimeEdit').dblclick(function(e) {
+                var _this = this;
+                // Use current player time
+                var an = get_local_annotation(_this.dataset.editable_id);
+                if (an !== undefined) {
+                    // FIXME: implement Undo feature
+                    an.setBegin(widget.media.getCurrentTime().milliseconds);
+                    save_local_annotations();
+                    widget.player.trigger("Annotation.update", an);
+                    widget.refresh(true);
+                }
+            });
+        };
+
         this.$.find('.Ldt-AnnotationsList-Tag-Li').click(function() {
             _this.source.getAnnotations().search(IriSP.jQuery(this).text().replace(/(^\s+|\s+$)/g,''));
         });
-        
+        this.$.find('.Ldt-Annotation-Timecode').click(function () {
+            _this.media.setCurrentTime(Number(this.dataset.timecode));
+        });
+
         this.$.find(".Ldt-AnnotationsList-Play").click(function() {
             var _el = IriSP.jQuery(this),
                 _annid = _el.attr("data-annotation-id");
@@ -554,7 +874,7 @@
             }
             _this.media.pause();
         });
-        
+
         if (this.source.getAnnotations().searching) {
             var rx = _this.source.getAnnotations().regexp || false;
             this.$.find(".Ldt-AnnotationsList-Title a, .Ldt-AnnotationsList-Description").each(function() {
@@ -565,7 +885,7 @@
 
         this.$.find(".Ldt-AnnotationsList-DeleteButton").click(_this.functionWrapper("onDeleteClick"))
     }
-    
+
     if (this.ajax_url) {
         if (this.mashupMode) {
             this.ajaxMashup();
@@ -581,7 +901,7 @@
 
 IriSP.Widgets.AnnotationsList.prototype.onDeleteClick = function(event){
     
-    ann_id = event.target.id;
+    ann_id = event.target.dataset.annotation;
     delete_preview_$ = this.$.find(".Ldt-AnnotationsList-ul-ToDelete");
     delete_preview_$.html("");
     _list = this.getWidgetAnnotations()
@@ -592,10 +912,13 @@
         _title = "",
         _this = this;
     if (_annotation.creator) {
-        var _users = _this.source.users_data.filter(function(_user_data){
-            return _user_data.username == _annotation.creator
-        }),
+        var _users = [],
             _user = {};
+        if (_this.source.users_data) {
+            _users = _this.source.users_data.filter(function(_user_data){
+                return _user_data.username == _annotation.creator;
+            });
+        }
         if (_users.length == 0){
             _user.username = _annotation.creator
         }
@@ -709,11 +1032,10 @@
 IriSP.Widgets.AnnotationsList.prototype.draw = function() {
     this.jwplayers = {};
     this.mashupMode = (this.media.elementType === "mashup");
-    
+
     this.renderTemplate();
-    
+
     var _this = this;
-    
     this.list_$ = this.$.find(".Ldt-AnnotationsList-ul");
     this.widget_$ = this.$.find(".Ldt-AnnotationsListWidget");
     
@@ -797,7 +1119,7 @@
     this.source.getAnnotations().on("search-cleared", function() {
         _this.throttledRefresh();
     });
-    
+
     this.onMdpEvent("AnnotationsList.refresh", function() {
         if (_this.ajax_url) {
             if (_this.mashupMode) {
@@ -806,9 +1128,20 @@
                 _this.ajaxSource();
             }
         }
-        _this.throttledRefresh();
+        _this.throttledRefresh(false);
     });
-    
+
+    this.onMdpEvent("AnnotationsList.update", function() {
+        if (_this.ajax_url) {
+            if (_this.mashupMode) {
+                _this.ajaxMashup();
+            } else {
+                _this.ajaxSource();
+            }
+        }
+        _this.throttledRefresh(true);
+    });
+
     if (this.ajax_url) {
         if (this.mashupMode) {
             this.ajaxMashup();
@@ -818,7 +1151,7 @@
     } else {
         this.currentSource = this.source;
     }
-    
+
     if (this.refresh_interval) {
         window.setInterval(function() {
             _this.currentSource.get();
@@ -843,7 +1176,7 @@
     for (var _i = 0; _i < _events.length; _i++) {
         this.onMediaEvent(_events[_i], this.throttledRefresh);
     }
-    
+
     this.throttledRefresh();
     
     this.showScreen("Main");
--- a/server/src/remie/static/remie/metadataplayer/Controller.css	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Controller.css	Fri Oct 02 10:24:23 2015 +0200
@@ -1,176 +1,248 @@
 /* Player Widget */
 
 .Ldt-Ctrl {
-  font-size: 10px;
-  background:url('img/player_gradient.png') repeat-x transparent ;
-  height: 25px;
-  border: 1px solid #b6b8b8;
-  position: relative;
+    font-size: 10px;
+    background: url('img/player_gradient.png') repeat-x transparent ;
+    height: 25px;
+    border: 1px solid #b6b8b8;
+    position: relative;
+    overflow: hidden;
 }
 
 .Ldt-Ctrl-Left {
-  float:left; width: 300px;
+    float: left;
 }
 
 .Ldt-Ctrl-Right {
-  float: right;
+    float: right;
 }
 
 .Ldt-Ctrl-button {
-  float: left;
-  width: 30px; height: 25px;
-  background: url('img/player-sprites.png');
-  cursor: pointer;
+    float: left;
+    width: 30px;
+    height: 25px;
+    background: url('img/player-sprites.png');
+    cursor: pointer;
 }
 
 .Ldt-Ctrl-spacer {
-    float: left; width: 1px; height: 25px; background: #b6b8b8;
+    float: left;
+    width: 1px;
+    height: 25px;
+    background: #b6b8b8;
 }
 
 .Ldt-Ctrl-Play {
-  margin: 0 15px;
+    margin: 100px 0;
+    margin: 0 15px;
 }
 
 .Ldt-Ctrl-Play-PlayState {
-  background-position: 0 0;
+    background-position: 0 0;
 }
 
 .Ldt-Ctrl-Play-PlayState:hover {
-  background-position: 0 -25px;
+    background-position: 0 -25px;
 }
 
 .Ldt-Ctrl-Play-PlayState:active {
-  background-position: 0 -50px;
+    background-position: 0 -50px;
 }
 
 .Ldt-Ctrl-Play-PauseState {
-  background-position: -30px 0;
+    background-position: -30px 0;
 }
 
 .Ldt-Ctrl-Play-PauseState:hover {
-  background-position: -30px -25px;
+    background-position: -30px -25px;
 }
 
 .Ldt-Ctrl-Play-PauseState:active {
-  background-position: -30px -50px;
+    background-position: -30px -50px;
 }
 
 .Ldt-Ctrl-Annotate {
-  margin: 0 2px;
-  background-position: -60px 0;
+    margin: 0 2px;
+    background-position: -60px 0;
 }
 
 .Ldt-Ctrl-Annotate:hover {
-  background-position: -60px -25px;
+    background-position: -60px -25px;
 }
 
 .Ldt-Ctrl-Annotate:active {
-  background-position: -60px -50px;
+    background-position: -60px -50px;
 }
 
 .Ldt-Ctrl-SearchBtn {
-  margin: 0 2px;
-  background-position: -90px 0;
+    margin: 0 2px;
+    background-position: -90px 0;
 }
 
 .Ldt-Ctrl-SearchBtn:hover {
-  background-position: -90px -25px;
+    background-position: -90px -25px;
 }
 
 .Ldt-Ctrl-SearchBtn:active {
-  background-position: -90px -50px;
+    background-position: -90px -50px;
 }
 
 .Ldt-Ctrl-Search {
-  width: 0; float: left; overflow: hidden;
+    width: 0; float: left; overflow: hidden;
 }
 
 input.Ldt-Ctrl-SearchInput {
-    width: 145px; height: 20px; margin: 2px; padding: 3px;
-    border: 1px solid #8080a0; border-radius: 3px; font-size: 13px;
+    -moz-box-sizing: border-box;
+    width: 145px;
+    height: 20px;
+    margin: 2px;
+    padding: 3px;
+    border: 1px solid #8080a0;
+    border-radius: 3px;
+    font-size: 13px;
 }
 
 .Ldt-Ctrl-Time {
-  float: left;
-  margin: 5px;
-  font-size: 12px;
-  font-family: Arial, Verdana, sans-serif;
+    float: left;
+    margin: 5px;
+    font-size: 12px;
+    font-family: Arial, Verdana, sans-serif;
 }
 
 .Ldt-Ctrl-Time-Elapsed {
-  float: left;
-  color: #4a4a4a;
+    float: left;
+    color: #4a4a4a;
 }
 
 .Ldt-Ctrl-Time-Separator {
-  margin: 0 4px;      
-  float: left;
+    margin: 0 4px;
+    float: left;
 }
 
 .Ldt-Ctrl-Time-Total {
-  float: left;
-  color: #b2b2b2; 
+    float: left;
+    color: #b2b2b2;
 }
 
 .Ldt-Ctrl-Sound {
-  margin: 0 2px;
+    margin: 0 2px;
 }
 
 .Ldt-Ctrl-Sound-Full {
-  background-position: -120px 0;
+    background-position: -120px 0;
 }
 
 .Ldt-Ctrl-Sound-Full:hover {
-  background-position: -120px -25px;
+    background-position: -120px -25px;
 }
 
 .Ldt-Ctrl-Sound-Full:active {
-  background-position: -120px -50px;
+    background-position: -120px -50px;
 }
 
 .Ldt-Ctrl-Sound-Mute {
-  background-position: -150px 0;
+    background-position: -150px 0;
 }
 
 .Ldt-Ctrl-Sound-Mute:hover {
-  background-position: -150px -25px;
+    background-position: -150px -25px;
 }
 
 .Ldt-Ctrl-Sound-Mute:active {
-  background-position: -150px -50px;
+    background-position: -150px -50px;
 }
 
 .Ldt-Ctrl-Sound-Half {
-  background-position: -180px 0;
+    background-position: -180px 0;
 }
 
 .Ldt-Ctrl-Sound-Half:hover {
-  background-position: -180px -25px;
+    background-position: -180px -25px;
 }
 
 .Ldt-Ctrl-Sound-Half:active {
-  background-position: -180px -50px;
+    background-position: -180px -50px;
 }
 
 .Ldt-Ctrl-Volume-Control {
     display: none;
-  position: absolute;
-  background:url('img/player_gradient.png') repeat-x transparent ;
-  height: 25px;
-  width: 100px; top: 25px; right: -1px; z-index: 100;
-  padding: 0 2px;
-  border: 1px solid #b6b8b8;
+    position: absolute;
+    background: url('img/player_gradient.png') repeat-x transparent ;
+    height: 25px;
+    width: 100px;
+    top: 25px;
+    right: -1px;
+    z-index: 100;
+    padding: 0 2px;
+    border: 1px solid #b6b8b8;
 }
 
-.Ldt-Ctrl-Volume-Bar { 
-    height: 5px; margin: 9px 3px 0; background: #cccccc; border: 1px solid #999999; border-radius: 2px;
+.Ldt-Ctrl-Volume-Bar {
+    height: 5px;
+    margin: 9px 3px 0;
+    background: #cccccc;
+    border: 1px solid #999999;
+    border-radius: 2px;
 }
 
 .Ldt-Ctrl-Volume-Control .ui-slider-handle {
-    width: 6px; height: 19px; background: #a8a8a8; border: 1px solid #999999; border-radius: 2px; top: -8px; margin-left: -4px;
+    width: 6px;
+    height: 19px;
+    background: #a8a8a8;
+    border: 1px solid #999999;
+    border-radius: 2px;
+    top: -8px;
+    margin-left: -4px;
     cursor: pointer;
 }
 
 .Ldt-Ctrl-Volume-Control:hover .ui-slider-handle {
-     background: #F7268E;
-}
\ No newline at end of file
+    background: #F7268E;
+}
+
+/* quiz */
+
+.Ldt-Ctrl-Quiz-Enable button, .Ldt-Ctrl-Quiz-Create button, .Ldt-Ctrl-Quiz-Disactivated button, .Ldt-Ctrl-Fullscreen-Button{
+	border: none;
+	background: transparent;
+}
+
+.Ldt-Ctrl-Quiz-Enable {
+    background-image: url("img/quiz_off.svg");
+    float: left;
+    height: 22px;
+    width: 22px;
+    background-repeat: no-repeat;
+}
+.Ldt-Ctrl-Quiz-Enable.Ldt-Ctrl-Quiz-Toggle-Active {
+    background-image: url("img/quiz_on.svg");
+}
+
+.Ldt-Ctrl-Quiz-Create {
+    background-image: url("img/quiz_add_question.svg");
+    float: left;
+    height: 23px;
+    width: 26px;
+    background-repeat: no-repeat;
+    margin-left: 4px;
+    margin-top: 0px;
+    display: none;
+}
+.Ldt-Ctrl-Quiz-Create.Ldt-Ctrl-Quiz-Toggle-Active {
+    display: inline-block;
+}
+
+.Ldt-Ctrl-Fullscreen-Button {
+    margin-top: 3px;
+}
+
+.Ldt-Ctrl-Fullscreen-Button {
+    float: left;
+    background-image: url("img/fullscreen.svg");
+    background-position: right;
+    margin-right: 6px;
+    margin-top: 1px;
+    height: 22px;
+    width: 22px;
+    border: none;
+}
--- a/server/src/remie/static/remie/metadataplayer/Controller.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Controller.js	Fri Oct 02 10:24:23 2015 +0200
@@ -11,7 +11,8 @@
     disable_annotate_btn: false,
     disable_search_btn: false,
     disable_ctrl_f: false,
-    always_show_search: false
+    always_show_search: false,
+    enable_quiz_toggle: undefined
 };
 
 IriSP.Widgets.Controller.prototype.template =
@@ -25,13 +26,15 @@
     + '{{/disable_annotate_btn}}'
     + '{{^disable_search_btn}}'
     + '<div class="Ldt-Ctrl-button Ldt-Ctrl-SearchBtn Ldt-TraceMe" title="{{l10n.search}}"></div>'
-    + '<div class="Ldt-Ctrl-spacer"></div>'
     + '{{/disable_search_btn}}'
     + '<div class="Ldt-Ctrl-Search">'
     + '<input placeholder="{{ l10n.search }}" type="search" class="Ldt-Ctrl-SearchInput Ldt-TraceMe"></input>'
     + '</div>'
+    + '<div class="Ldt-Ctrl-Quiz-Enable Ldt-TraceMe" title="Activer/Désactiver le quiz"></div>'
+    + '<div class="Ldt-Ctrl-Quiz-Create Ldt-TraceMe" ></div>'
     + '</div>'
     + '<div class="Ldt-Ctrl-Right">'
+    + '<div class="Ldt-Ctrl-Fullscreen-Button Ldt-TraceMe" title="Passer le lecteur en plein-écran"></div>'
     + '<div class="Ldt-Ctrl-spacer"></div>'
     + '<div class="Ldt-Ctrl-Time">'
     + '<div class="Ldt-Ctrl-Time-Elapsed" title="{{l10n.elapsed_time}}">00:00</div>'
@@ -59,7 +62,8 @@
         elapsed_time: "Elapsed time",
         total_time: "Total duration",
         volume: "Volume",
-        volume_control: "Volume control"
+        volume_control: "Volume control",
+        enable_quiz: "Enable quiz"
     },
     fr: {
         play_pause: "Lecture/Pause",
@@ -73,39 +77,75 @@
         elapsed_time: "Temps écoulé",
         total_time: "Durée totale",
         volume: "Niveau sonore",
-        volume_control: "Réglage du niveau sonore"
+        volume_control: "Réglage du niveau sonore",
+        enable_quiz: "Activer le quiz"
     }
 };
 
 IriSP.Widgets.Controller.prototype.draw = function() {
     var _this = this;
     this.renderTemplate();
-    
+
     // Define blocks
     this.$playButton = this.$.find(".Ldt-Ctrl-Play");
     this.$searchBlock = this.$.find(".Ldt-Ctrl-Search");
     this.$searchInput = this.$.find(".Ldt-Ctrl-SearchInput");
     this.$volumeBar = this.$.find(".Ldt-Ctrl-Volume-Bar");
-    
+
     // handle events
     this.onMediaEvent("play","playButtonUpdater");
     this.onMediaEvent("pause","playButtonUpdater");
     this.onMediaEvent("volumechange","volumeUpdater");
     this.onMediaEvent("timeupdate","timeDisplayUpdater");
     this.onMediaEvent("loadedmetadata","volumeUpdater");
-    
+
     // handle clicks
     this.$playButton.click(this.functionWrapper("playHandler"));
-    
+
+    if (this.enable_quiz_toggle !== undefined) {
+        if (this.enable_quiz_toggle) {
+            $(".Ldt-Ctrl-Quiz-Enable").addClass("Ldt-Ctrl-Quiz-Toggle-Active");
+            $(".Ldt-Ctrl-Quiz-Create").addClass("Ldt-Ctrl-Quiz-Toggle-Active");
+            // this.player.trigger("QuizCreator.show");
+            $("#QuizEditContainer").show();
+        }
+        else
+        {
+            $(".Ldt-Ctrl-Quiz-Enable").removeClass("Ldt-Ctrl-Quiz-Toggle-Active");
+            $(".Ldt-Ctrl-Quiz-Create").removeClass("Ldt-Ctrl-Quiz-Toggle-Active");
+            this.player.trigger("QuizCreator.hide");
+            $("#QuizEditContainer").hide();
+        }
+    } else {
+            $(".Ldt-Ctrl-Quiz-Enable").hide();
+    }
+
     this.$.find(".Ldt-Ctrl-Annotate").click(function() {
         _this.player.trigger("CreateAnnotation.toggle");
     });
     this.$.find(".Ldt-Ctrl-SearchBtn").click(this.functionWrapper("searchButtonHandler"));
-    
+
     this.$searchInput.keyup(this.functionWrapper("searchHandler"));
     this.$searchInput.on("search", this.functionWrapper("searchHandler"));
-  
-	var _volctrl = this.$.find(".Ldt-Ctrl-Volume-Control");
+
+    // Fullscreen handling
+    this.$.find(".Ldt-Ctrl-Fullscreen-Button").click(this.functionWrapper("toggleFullscreen"));
+    var fullscreen_event_name = IriSP.getFullscreenEventname();
+    if (fullscreen_event_name) {
+        document.addEventListener(fullscreen_event_name, function() {
+            if (IriSP.isFullscreen() && IriSP.getFullscreenElement() == _this.$[0]) {
+                _this.$.addClass("Ldt-Fullscreen-Element");
+            } else {
+                _this.$.removeClass("Ldt-Fullscreen-Element");
+            }
+        });
+    };
+
+    // Quiz activation
+    this.$.find(".Ldt-Ctrl-Quiz-Enable").click(this.functionWrapper("toggleQuiz"));
+    this.$.find(".Ldt-Ctrl-Quiz-Create").click(this.functionWrapper("createQuiz"));
+
+    var _volctrl = this.$.find(".Ldt-Ctrl-Volume-Control");
     this.$.find('.Ldt-Ctrl-Sound')
         .click(this.functionWrapper("muteHandler"))
         .mouseover(function() {
@@ -119,7 +159,7 @@
     }).mouseout(function() {
         _volctrl.hide();
     });
-    
+
     // Handle CTRL-F
     if (!this.disable_ctrl_f) {
         var _fKey = "F".charCodeAt(0),
@@ -135,7 +175,7 @@
             }
         });
     }
-    
+
     // Allow Volume Cursor Dragging
     this.$volumeBar.slider({
         slide: function(event, ui) {
@@ -149,13 +189,13 @@
     this.$.hover(
         function() {
             _this.player.trigger("Player.MouseOver");
-        }, 
+        },
         function() {
             _this.player.trigger("Player.MouseOut");
         });
-    
+
     this.timeDisplayUpdater(new IriSP.Model.Time(0));
-    
+
     var annotations = this.source.getAnnotations();
     annotations.on("search", function(_text) {
         _this.$searchInput.val(_text);
@@ -177,7 +217,7 @@
 
 /* Update the elasped time div */
 IriSP.Widgets.Controller.prototype.timeDisplayUpdater = function(_time) {
-  
+
     // we get it at each call because it may change.
     var _totalTime = this.media.duration;
     this.$.find(".Ldt-Ctrl-Time-Elapsed").html(_time.toString());
@@ -203,13 +243,44 @@
     }
 };
 
+//FullScreen
+IriSP.Widgets.Controller.prototype.toggleFullscreen = function() {
+    if (IriSP.isFullscreen()) {
+        IriSP.setFullScreen(this.$[0], false);
+    } else {
+        IriSP.setFullScreen(this.$[0], true);
+    }
+};
+
+//Quiz
+IriSP.Widgets.Controller.prototype.createQuiz = function() {
+    this.player.trigger("Quiz.hide");
+    this.media.pause();
+    this.player.trigger("QuizCreator.create");
+};
+
+IriSP.Widgets.Controller.prototype.toggleQuiz = function() {
+    this.enable_quiz_toggle = !this.enable_quiz_toggle;
+    if (this.enable_quiz_toggle) {
+        $(".Ldt-Ctrl-Quiz-Enable").addClass("Ldt-Ctrl-Quiz-Toggle-Active");
+        $(".Ldt-Ctrl-Quiz-Create").addClass("Ldt-Ctrl-Quiz-Toggle-Active");
+        this.player.trigger("Quiz.activate");
+    }
+    else
+    {
+        $(".Ldt-Ctrl-Quiz-Enable").removeClass("Ldt-Ctrl-Quiz-Toggle-Active");
+        $(".Ldt-Ctrl-Quiz-Create").removeClass("Ldt-Ctrl-Quiz-Toggle-Active");
+        this.player.trigger("Quiz.deactivate");
+        this.player.trigger("QuizCreator.hide");
+    }
+};
 
 IriSP.Widgets.Controller.prototype.playHandler = function() {
-    if (this.media.getPaused()) {        
+    if (this.media.getPaused()) {
         this.media.play();
     } else {
         this.media.pause();
-    }  
+    }
 };
 
 IriSP.Widgets.Controller.prototype.muteHandler = function() {
@@ -224,9 +295,9 @@
     }
     var _soundCtl = this.$.find(".Ldt-Ctrl-Sound");
     _soundCtl.removeClass("Ldt-Ctrl-Sound-Mute Ldt-Ctrl-Sound-Half Ldt-Ctrl-Sound-Full");
-    if (_muted) {        
+    if (_muted) {
         _soundCtl.attr("title", this.l10n.unmute)
-            .addClass("Ldt-Ctrl-Sound-Mute");    
+            .addClass("Ldt-Ctrl-Sound-Mute");
     } else {
         _soundCtl.attr("title", this.l10n.mute)
             .addClass(_vol < .5 ? "Ldt-Ctrl-Sound-Half" : "Ldt-Ctrl-Sound-Full" );
@@ -268,7 +339,7 @@
     }
     var _val = this.$searchInput.val();
     this._positiveMatch = false;
-    
+
     // do nothing if the search field is empty, instead of highlighting everything.
     if (_val !== this.lastSearchValue) {
         if (_val) {
@@ -280,4 +351,3 @@
     }
     this.lastSearchValue = _val;
 };
-
--- a/server/src/remie/static/remie/metadataplayer/CreateAnnotation.css	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/CreateAnnotation.css	Fri Oct 02 10:24:23 2015 +0200
@@ -23,7 +23,7 @@
 }
 
 .Ldt-CreateAnnotation-Main {
-    min-height: 150px;
+    min-height: 50px;
 }
 
 .Ldt-CreateAnnotation-Title, .Ldt-CreateAnnotation-Creator {
@@ -48,10 +48,8 @@
 .Ldt-CreateAnnotation-PreviewSubmit{
     position: absolute;
     bottom: 7px;
-    right: 7px;
     color: #ffffff;
     cursor: pointer;
-    background: url('img/submit_annotation.png');
     height: 50px;
     width: 50px;
     padding: 28px 0 0;
@@ -61,15 +59,27 @@
     cursor: pointer;
 }
 
-.Ldt-CreateAnnotation-Submit:hover {
+
+.Ldt-CreateAnnotation-Cancel{
+    right: 7px;
+    background: url('img/cancel_annotation.png');
+}
+
+.Ldt-CreateAnnotation-Submit{
+	right: 67px; 
+	background: url('img/submit_annotation.png');
+}
+
+.Ldt-CreateAnnotation-Submit:hover,
+.Ldt-CreateAnnotation-Cancel:hover{
     background-position: -50px 0;
 }
 
 .Ldt-CreateAnnotation-Description {
-    height: 56px;
+    height: 3em;
     padding: 2px;
     resize: none;
-    width: 460px;
+    width: calc(100% - 122px);
     border: 1px solid #666666;
     border-radius: 2px;
 }
@@ -105,6 +115,8 @@
 
 .Ldt-CreateAnnotation-TagList, .Ldt-CreateAnnotation-PolemicList {
     list-style: none;
+    width: calc(100% - 122px);
+    padding-left: 0px;
 }
 
 li.Ldt-CreateAnnotation-TagLi {
--- a/server/src/remie/static/remie/metadataplayer/CreateAnnotation.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/CreateAnnotation.js	Fri Oct 02 10:24:23 2015 +0200
@@ -2,6 +2,13 @@
 
 IriSP.Widgets.CreateAnnotation = function(player, config) {
     IriSP.Widgets.Widget.call(this, player, config);
+    if (_this.editable_storage != '' && window.localStorage[_this.editable_storage]) {
+        this.source.onLoad(function () {
+            var _export = _this.player.sourceManager.newLocalSource({serializer: IriSP.serializers['ldt_localstorage']});
+            _export.deSerialize(window.localStorage[_this.editable_storage]);
+            _this.source.merge(_export);
+        });
+    };
 };
 
 IriSP.Widgets.CreateAnnotation.prototype = new IriSP.Widgets.Widget();
@@ -48,6 +55,8 @@
     api_serializer: "ldt_annotate",
     api_endpoint_template: "",
     api_method: "POST",
+    // Id that will be used as localStorage key
+    editable_storage: "",
     project_id: "",
     after_send_timeout: 0,
     close_after_send: false,
@@ -69,9 +78,9 @@
         add_keywords_: "Add keywords:",
         add_polemic_keywords_: "Add polemic attributes :",
         your_name_: "Your name:",
-        annotate_video: "Annotate this video",
+        annotate_video: "New note",
         type_title: "Annotation title",
-        type_description: "Type the full contents of your annotation here.",
+        type_description: "Enter a new note...",
         wait_while_processing: "Please wait while your annotation is being processed...",
         error_while_contacting: "An error happened while contacting the server. Your annotation has not been saved.",
         annotation_saved: "Thank you, your annotation has been saved.",
@@ -80,7 +89,10 @@
         "polemic++": "Agree",
         "polemic--": "Disagree",
         "polemic??": "Question",
-        "polemic==": "Reference"
+        "polemic==": "Reference",
+        "in_tooltip": "Set begin time to current player time",
+        "out_tooltip": "Set begin time to current player time",
+        "play_tooltip": "Play the fragment"
     },
     fr: {
         from_time: "de",
@@ -92,9 +104,9 @@
         add_keywords_: "Ajouter des mots-clés\u00a0:",
         add_polemic_keywords_: "Ajouter des attributs polémiques\u00a0:",
         your_name_: "Votre nom\u00a0:",
-        annotate_video: "Annoter cette vidéo",
+        annotate_video: "Entrez une nouvelle note...",
         type_title: "Titre de l'annotation",
-        type_description: "Rédigez ici le contenu de votre annotation.",
+        type_description: "Prenez vos notes...",
         wait_while_processing: "Veuillez patienter pendant le traitement de votre annotation...",
         error_while_contacting: "Une erreur s'est produite en contactant le serveur. Votre annotation n'a pas été enregistrée.",
         annotation_saved: "Merci, votre annotation a été enregistrée.",
@@ -103,12 +115,15 @@
         "polemic++": "Accord",
         "polemic--": "Désaccord",
         "polemic??": "Question",
-        "polemic==": "Référence"
+        "polemic==": "Référence",
+        "in_tooltip": "Utiliser le temps courant comme début",
+        "out_tooltip": "Utiliser le temps courant comme fin",
+        "play_tooltip": "Jouer le fragment"
     }
 };
 
 IriSP.Widgets.CreateAnnotation.prototype.template =
-    '{{#show_slice}}<div class="Ldt-CreateAnnotation-Slice"></div>{{/show_slice}}'
+    '{{#show_slice}}<div class="Ldt-CreateAnnotation-Slice Ldt-TraceMe"></div>{{/show_slice}}'
     + '{{^show_slice}}{{#show_arrow}}<div class="Ldt-CreateAnnotation-Arrow"></div>{{/show_arrow}}{{/show_slice}}'
     + '<div class="Ldt-CreateAnnotation"><div class="Ldt-CreateAnnotation-Inner">'
     + '<form class="Ldt-CreateAnnotation-Screen Ldt-CreateAnnotation-Main">'
@@ -117,11 +132,19 @@
     + '{{#show_time}}<span class="Ldt-CreateAnnotation-Times"> {{#show_slice}}{{l10n.from_time}} {{/show_slice}}{{^show_slice}}{{l10n.at_time}} {{/show_slice}} <span class="Ldt-CreateAnnotation-Begin">00:00</span>{{/show_time}}'
     + '{{#show_slice}} {{l10n.to_time}} <span class="Ldt-CreateAnnotation-End">{{end}}</span>{{/show_slice}}</span></span>'
     + '{{#show_creator_field}}{{l10n.your_name_}} <input class="Ldt-CreateAnnotation-Creator empty" value="{{creator_name}}" {{#creator_field_readonly}}readonly{{/creator_field_readonly}}/>{{/show_creator_field}}</h3>'
-    + '<textarea class="Ldt-CreateAnnotation-Description empty" placeholder="{{l10n.type_description}}"></textarea>'
-    + '<div class="Ldt-CreateAnnotation-Avatar"><img src="{{creator_avatar}}" title="{{creator_name}}"></img></div>'
-    + '{{#preview_mode}}<input type="button" class="Ldt-CreateAnnotation-PreviewSubmit" title="{{l10n.preview_submit}}" value="{{#custom_send_button}}{{custom_send_button}}{{/custom_send_button}}{{^custom_send_button}}{{l10n.submit}}{{/custom_send_button}}" />{{/preview_mode}}'
-    + '{{^preview_mode}}<input type="submit" class="Ldt-CreateAnnotation-Submit" value="{{#custom_send_button}}{{custom_send_button}}{{/custom_send_button}}{{^custom_send_button}}{{l10n.submit}}{{/custom_send_button}}" />{{/preview_mode}}'
-    + '<input type="button" class="Ldt-CreateAnnotation-Cancel" value="{{#custom_cancel_button}}{{custom_cancel_button}}{{/custom_cancel_button}}{{^custom_cancel_button}}{{l10n.cancel}}{{/custom_cancel_button}}" />'
+    + '{{#show_controls}}<div class="Ldt-CreateAnnotation-Controls">'
+    +   '<span title="{{l10n.in_tooltip}}" class="Ldt-CreateAnnotation-Control-In">In</span>'
+    +   '<span title="{{l10n.out_tooltip}}" class="Ldt-CreateAnnotation-Control-Out">Out</span>'
+    +   '<span title="{{l10n.play_tooltip}}" class="Ldt-CreateAnnotation-Control-Play">Play</span>'
+    + '</div>{{/show_controls}}'
+    + '<textarea class="Ldt-CreateAnnotation-Description Ldt-TraceMe empty" placeholder="{{l10n.type_description}}"></textarea>'
+    + '{{#show_creator_field}}<div class="Ldt-CreateAnnotation-Avatar"><img src="{{creator_avatar}}" title="{{creator_name}}"></img></div>{{/show_creator_field}}'
+    + '<div class="Ldt-CreateAnnotation-SubmitArea Ldt-TraceMe">'
+    +  '{{#preview_mode}}<input type="button" class="Ldt-CreateAnnotation-PreviewSubmit" title="{{l10n.preview_submit}}" value="{{#custom_send_button}}{{custom_send_button}}{{/custom_send_button}}{{^custom_send_button}}{{l10n.submit}}{{/custom_send_button}}" />{{/preview_mode}}'
+    +  '{{^preview_mode}}<input type="submit" class="Ldt-CreateAnnotation-Submit" value="{{#custom_send_button}}{{custom_send_button}}{{/custom_send_button}}{{^custom_send_button}}{{l10n.submit}}{{/custom_send_button}}" />{{/preview_mode}}'
+    +   '<input type="button" class="Ldt-CreateAnnotation-Cancel" value="{{#custom_cancel_button}}{{custom_cancel_button}}{{/custom_cancel_button}}{{^custom_cancel_button}}{{l10n.cancel}}{{/custom_cancel_button}}" />'
+    +   '<div class="Ldt-CreateAnnotation-Begin Ldt-CreateAnnotation-Times">00:00</div>'
+    + '</div>'
     + '{{#show_mic_record}}<div class="Ldt-CreateAnnotation-RecBlock"><div class="Ldt-CreateAnnotation-RecLabel">Add voice annotation</div>'
     + '    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="220" height="160">'
     + '        <param name="movie" value="{{record_swf}}" />'
@@ -212,10 +235,7 @@
                 show_arrow: this.show_arrow,
                 annotation_type: this.slice_annotation_type,
                 onBoundsChanged: function(_from, _to) {
-                    _this.begin = new IriSP.Model.Time(_from || 0);
-                    _this.end = new IriSP.Model.Time(_to || 0);
-                    _this.$.find(".Ldt-CreateAnnotation-Begin").html(_this.begin.toString());
-                    _this.$.find(".Ldt-CreateAnnotation-End").html(_this.end.toString());
+                    _this.setBeginEnd(_from, _to);
                 }
             },
             "slice"
@@ -225,12 +245,13 @@
             this.insertSubwidget(this.$.find(".Ldt-CreateAnnotation-Arrow"), {type: "Arrow"},"arrow");
         }
         this.onMediaEvent("timeupdate", function(_time) {
-            _this.begin = new IriSP.Model.Time(_time || 0);
-            _this.end = new IriSP.Model.Time(_time || 0);
-            _this.$.find(".Ldt-CreateAnnotation-Begin").html(_this.begin.toString());
-            if (_this.arrow) {
-                _this.arrow.moveToTime(_time);
-            }
+            // Do not update timecode if description is not empty
+            if (_this.$.find(".Ldt-CreateAnnotation-Description").val().trim() == "") {
+                _this.setBeginEnd(_time, _time);
+                if (_this.arrow) {
+                    _this.arrow.moveToTime(_time);
+                }
+            };
         });
     }
     this.$.find(".Ldt-CreateAnnotation-Cancel").click(function() {
@@ -261,7 +282,25 @@
     if (this.show_creator_field) {
         this.$.find(".Ldt-CreateAnnotation-Creator").bind("change keyup input paste", this.functionWrapper("onCreatorChange"));
     }
-    
+    this.$.find("[class^='Ldt-CreateAnnotation-Control-']").click(function() {
+        var action = this.className.replace('Ldt-CreateAnnotation-Control-', '');
+        switch (action) {
+            case "In":
+               // Set In bound to current player time
+               this.setBegin(_this.media.getCurrentTime());
+               break;
+            case "Out":
+               // Set In bound to current player time
+               this.setEnd(_this.media.getCurrentTime() || _this.media.duration);
+               break;
+            case "Play":
+               this.media.setCurrentTime(_this.begin);
+               this.media.play();
+               break;
+        }
+        return false;
+    });
+
     if (this.start_visible) {
         this.show();
     } else {
@@ -275,10 +314,25 @@
     this.$.find("form").submit(this.functionWrapper("onSubmit"));
 };
 
+IriSP.Widgets.CreateAnnotation.prototype.setBegin = function (t) {
+    this.begin = new IriSP.Model.Time(t || 0);
+    this.$.find(".Ldt-CreateAnnotation-Begin").html(this.begin.toString());
+};
+
+IriSP.Widgets.CreateAnnotation.prototype.setEnd = function (t) {
+    this.end = new IriSP.Model.Time(t || 0);
+    this.$.find(".Ldt-CreateAnnotation-End").html(this.end.toString());
+};
+
+IriSP.Widgets.CreateAnnotation.prototype.setBeginEnd = function (begin, end) {
+    this.setBegin(begin);
+    this.setEnd(end);
+};
+
 IriSP.Widgets.CreateAnnotation.prototype.showScreen = function(_screenName) {
     this.$.find('.Ldt-CreateAnnotation-' + _screenName).show()
         .siblings().hide();
-}
+};
 
 IriSP.Widgets.CreateAnnotation.prototype.show = function() {
     if (!this.visible){
@@ -325,7 +379,14 @@
         if (this.visible) {
             this.hide();
         } else {
+            var t = _this.media.getCurrentTime() || 0;
+            this.setBeginEnd(t, t);
+            if (this.slice_widget) {
+                this.slice_widget.setBounds(this.begin, this.end);
+            }
             this.show();
+            // Set focus on textarea
+            this.$.find(".Ldt-CreateAnnotation-Description").focus();
         }
     }
 };
@@ -348,7 +409,12 @@
     }
 };
 
-IriSP.Widgets.CreateAnnotation.prototype.onDescriptionChange = function() {
+IriSP.Widgets.CreateAnnotation.prototype.onDescriptionChange = function(e) {
+    if (e !== undefined && e.keyCode == 13 && !e.shiftKey) {
+        // Return: submit. Use shift-Return to insert a LF
+        this.onSubmit();
+        return true;
+    }
     var _field = this.$.find(".Ldt-CreateAnnotation-Description"),
         _contents = _field.val();
     _field.css("border-color", !!_contents ? "#666666" : "#ff0000");
@@ -396,9 +462,8 @@
     return !!_contents;
 };
 
-/* Fonction effectuant l'envoi des annotations */
 IriSP.Widgets.CreateAnnotation.prototype.onSubmit = function() {
-    /* Si les champs obligatoires sont vides, on annule l'envoi */
+    /* If mandatory fields are empty, we cancel the sending */
     if (!this.onDescriptionChange() || (this.show_title_field && !this.onTitleChange()) || (this.show_creator_field && !this.onCreatorChange())) {
         return false;
     }
@@ -408,26 +473,27 @@
     }
     
     var _this = this,
-        _exportedAnnotations = new IriSP.Model.List(this.player.sourceManager), /* Création d'une liste d'annotations contenant une annotation afin de l'envoyer au serveur */
-        _export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[this.api_serializer]}), /* Création d'un objet source utilisant un sérialiseur spécifique pour l'export */
-        _annotation = new IriSP.Model.Annotation(false, _export), /* Création d'une annotation dans cette source avec un ID généré à la volée (param. false) */
-        _annotationTypes = this.source.getAnnotationTypes().searchByTitle(this.annotation_type, true), /* Récupération du type d'annotation dans lequel l'annotation doit être ajoutée */
-        _annotationType = (_annotationTypes.length ? _annotationTypes[0] : new IriSP.Model.AnnotationType(false, _export)), /* Si le Type d'Annotation n'existe pas, il est créé à la volée */
-        _url = Mustache.to_html(this.api_endpoint_template, {id: this.source.projectId}); /* Génération de l'URL à laquelle l'annotation doit être envoyée, qui doit inclure l'ID du projet */
+        _exportedAnnotations = new IriSP.Model.List(this.player.sourceManager), /* We create a List to send to the server that will contains the annotation */
+        _export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[this.api_serializer]}), /* We create a source object using a specific serializer for export */
+        _local_export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers['ldt_localstorage']}), /* Source object using a specific serializer for local export */
+        _annotation = new IriSP.Model.Annotation(false, _export), /* We create an annotation in the source with a generated ID (param. false) */
+        _annotationTypes = this.source.getAnnotationTypes().searchByTitle(this.annotation_type, true), /* We get the AnnotationType in which the annotation will be added */
+        _annotationType = (_annotationTypes.length ? _annotationTypes[0] : new IriSP.Model.AnnotationType(false, _export)), /* If it doesn't already exists, we create it */
+        _url = Mustache.to_html(this.api_endpoint_template, {id: this.source.projectId}); /* We make the url to send the request to, must include project id */
     
-    /* Si nous avons dû générer un ID d'annotationType à la volée... */
+    /* If we created an AnnotationType on the spot ... */
     if (!_annotationTypes.length) {
-        /* Il ne faudra pas envoyer l'ID généré au serveur */
+        /* ... We must not send its id to the server ... */
         _annotationType.dont_send_id = true;
-        /* Il faut inclure le titre dans le type d'annotation */
+        /* ... And we must include its title. */
         _annotationType.title = this.annotation_type;
     }
     
     /*
-     * Nous remplissons les données de l'annotation générée à la volée
-     * ATTENTION: Si nous sommes sur un MASHUP, ces éléments doivent se référer AU MEDIA D'ORIGINE
+     * Will fill the generated annotation object's data
+     * WARNING: If we're on a MASHUP, these datas must refer the ORIGINAL MEDIA
      * */
-    _annotation.setMedia(this.source.currentMedia.id); /* Id du média annoté */
+    _annotation.setMedia(this.source.currentMedia.id); /* Annotated media ID */
     
     if (this.post_at_segment_time){
         var _currentTime = this.media.getCurrentTime() 
@@ -436,32 +502,31 @@
             return (_currentTime >= _segment.begin && _currentTime <= _segment.end)
         });
         if (_currentSegments.length == 0){
-            _annotation.setBegin(this.begin); /* Timecode de début du widget */
-            _annotation.setEnd(this.end); /* Timecode de fin du widget */
+            _annotation.setBegin(this.begin); /* Widget starting timecode */
+            _annotation.setEnd(this.end); /* Widget end timecode */
         }
         else {
-            _annotation.setBegin(_currentSegments[0].begin); /* Timecode de début du segment */
-            _annotation.setEnd(_currentSegments[0].end); /* Timecode de fin du segment */
+            _annotation.setBegin(_currentSegments[0].begin); /* Segment starting timecode */
+            _annotation.setEnd(_currentSegments[0].end); /* Segment end timecode */
         }
     }
     else {
-        _annotation.setBegin(this.begin); /*Timecode de début du widget */
-        _annotation.setEnd(this.end); /* Timecode de fin du widget */
+        _annotation.setBeginEnd(this.begin, this.end); /* Widget end/start timecodes */
     }
-    _annotation.setAnnotationType(_annotationType.id); /* Id du type d'annotation */
+    _annotation.setAnnotationType(_annotationType.id); /* Annotation type ID */
     if (this.show_title_field) {
-        /* Champ titre, seulement s'il est visible */
+        /* Title field, only if it's visible */
         _annotation.title = this.$.find(".Ldt-CreateAnnotation-Title").val();
     }if (this.project_id != ""){
-    	/* Champ id projet, seulement si on l'a renseigné dans la config */
+    	/* Project id, only if it's been specifiec in the config */
     	_annotation.project_id = this.project_id;
     }
-    _annotation.created = new Date(); /* Date de création de l'annotation */
-    _annotation.description = this.$.find(".Ldt-CreateAnnotation-Description").val(); /* Champ description */
+    _annotation.created = new Date(); /* Annotation creation date */
+    _annotation.description = this.$.find(".Ldt-CreateAnnotation-Description").val(); /* Description field */
    
     var tagIds = Array.prototype.map.call(
         this.$.find(".Ldt-CreateAnnotation-TagLi.selected"),
-        function(el) { return IriSP.jQuery(el).attr("tag-id")}
+        function(el) { return IriSP.jQuery(el).attr("tag-id"); }
     );
         
     IriSP._(_annotation.description.match(/#[^\s#.,;]+/g)).each(function(_tt) {
@@ -478,10 +543,8 @@
         if (tagIds.indexOf(_tag.id) === -1) {
             tagIds.push(_tag.id);
         }
-        
-    })
-   
-    _annotation.setTags(IriSP._(tagIds).uniq()); /*Liste des ids de tags */
+    });
+    _annotation.setTags(IriSP._(tagIds).uniq()); /* Tag ids list */
     if (this.audio_url) {
         _annotation.audio = {
             src: "mic",
@@ -495,46 +558,66 @@
         _annotation.creator = this.creator_name;
     }
     _exportedAnnotations.push(_annotation); /* Ajout de l'annotation à la liste à exporter */
-    _export.addList("annotation",_exportedAnnotations); /* Ajout de la liste à exporter à l'objet Source */
-    var _this = this;
-    /* Envoi de l'annotation via AJAX au serveur ! */
-    IriSP.jQuery.ajax({
-        url: _url,
-        type: this.api_method,
-        contentType: 'application/json',
-        data: _export.serialize(), /* L'objet Source est sérialisé */
-        success: function(_data) {
-            _this.showScreen('Saved'); /* Si l'appel a fonctionné, on affiche l'écran "Annotation enregistrée" */
-            if (_this.after_send_timeout) { /* Selon les options de configuration, on revient à l'écran principal ou on ferme le widget, ou rien */
-                window.setTimeout(
-                    function() {
-                        _this.close_after_send
-                        ? _this.player.trigger("CreateAnnotation.hide")
-                        : _this.player.trigger("CreateAnnotation.show");
-                    },
-                    _this.after_send_timeout
-                );
+    
+    if (this.editable_storage != '') {
+        // Append to localStorage annotations
+
+        // FIXME: handle movie ids
+        _local_export.addList("annotation", _exportedAnnotations); /* Ajout de la liste à exporter à l'objet Source */
+        _this.source.merge(_local_export); /* On ajoute la nouvelle annotation au recueil original */
+        // Import previously saved local annotations
+        if (window.localStorage[this.editable_storage]) {
+            _local_export.deSerialize(window.localStorage[this.editable_storage]);
+        }
+        // Save everything back
+        window.localStorage[_this.editable_storage] = _local_export.serialize();
+        _this.player.trigger("AnnotationsList.refresh"); /* On force le rafraîchissement du widget AnnotationsList */
+        _this.player.trigger("Annotation.create", _annotation);
+        _this.$.find(".Ldt-CreateAnnotation-Description").val("");
+    }
+    
+    if (_url !== "") {
+        _exportedAnnotations.push(_annotation); /* We add the annotation in the list to export */
+        _export.addList("annotation",_exportedAnnotations); /* We add the list to the source object */ 
+        var _this = this;
+        /* We send the AJAX request to the server ! */
+        IriSP.jQuery.ajax({
+            url: _url,
+            type: this.api_method,
+            contentType: 'application/json',
+            data: _export.serialize(), /* Source is serialized */
+            success: function(_data) {
+                _this.showScreen('Saved'); 
+                if (_this.after_send_timeout) { 
+                    window.setTimeout(
+                        function() {
+                            _this.close_after_send
+                                ? _this.player.trigger("CreateAnnotation.hide")
+                                : _this.player.trigger("CreateAnnotation.show");
+                        },
+                        _this.after_send_timeout
+                    );
+                }
+                _export.getAnnotations().removeElement(_annotation, true); /* We delete the sent annotation to avoid redundancy */
+                _export.deSerialize(_data); /* Data deserialization */
+                _this.source.merge(_export); /* We merge the deserialized data with the current source data */
+                if (_this.pause_on_write && _this.media.getPaused()) {
+                    _this.media.play();
+                }
+                _this.player.trigger("AnnotationsList.refresh"); 
+            },
+            error: function(_xhr, _error, _thrown) {
+                IriSP.log("Error when sending annotation", _thrown);
+                _export.getAnnotations().removeElement(_annotation, true);
+                _this.showScreen('Error');
+                window.setTimeout(function(){
+                    _this.showScreen("Main")
+                },
+                                  (_this.after_send_timeout || 5000));
             }
-            _export.getAnnotations().removeElement(_annotation, true); /* Pour éviter les doublons, on supprime l'annotation qui a été envoyée */
-            _export.deSerialize(_data); /* On désérialise les données reçues pour les réinjecter */
-            _this.source.merge(_export); /* On récupère les données réimportées dans l'espace global des données */
-            if (_this.pause_on_write && _this.media.getPaused()) {
-                _this.media.play();
-            }
-            _this.player.trigger("AnnotationsList.refresh"); /* On force le rafraîchissement du widget AnnotationsList */
-        },
-        error: function(_xhr, _error, _thrown) {
-            IriSP.log("Error when sending annotation", _thrown);
-            _export.getAnnotations().removeElement(_annotation, true);
-            _this.showScreen('Error');
-            window.setTimeout(function(){
-                _this.showScreen("Main")
-            },
-            (_this.after_send_timeout || 5000));
-        }
-    });
-    this.showScreen('Wait');
-    
+        });
+        this.showScreen('Wait');
+    };
     return false;
 };
 
--- a/server/src/remie/static/remie/metadataplayer/CurrentSegmentInfobox.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/CurrentSegmentInfobox.js	Fri Oct 02 10:24:23 2015 +0200
@@ -218,9 +218,9 @@
     new_description = this.$.find(".Ldt-CurrentSegmentInfobox-DescriptionInput").val()
     
     var _this = this,
-        _exportedAnnotations = new IriSP.Model.List(this.player.sourceManager), /* Création d'une liste d'annotations contenant une annotation afin de l'envoyer au serveur */
-        _export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[this.api_serializer]}),
-        _annotation = new IriSP.Model.Annotation(this.currentSegment.id, _export); /* Création d'une annotation dans cette source avec un ID généré à la volée (param. false) */
+        _exportedAnnotations = new IriSP.Model.List(this.player.sourceManager), /* We create an Annotations List to send to the server */
+        _export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[this.api_serializer]}), /* We create a source object using a specific serializer for export */
+        _annotation = new IriSP.Model.Annotation(this.currentSegment.id, _export); /* We create an annotation in the source with a generated ID (param. false) */
     
     _annotation.setAnnotationType(this.currentSegment.getAnnotationType().id);
     _annotation.setMedia(this.currentSegment.getMedia().id);
@@ -228,8 +228,8 @@
     _annotation.setEnd(this.currentSegment.end);
     _annotation.created = this.currentSegment.created;
     _annotation.creator = this.currentSegment.creator;
-    _annotation.title = new_title /* Champ titre */
-    _annotation.description = new_description /* Champ description */
+    _annotation.title = new_title /* Title field */
+    _annotation.description = new_description /* Description field */
     var _tagIds = IriSP._(new_tags_titles).map(function(_title) {
         var _tags = _this.source.getTags(true).searchByTitle(_title, true);
         if (_tags.length) {
@@ -245,8 +245,8 @@
     _annotation.setTags(_tagIds);
     _annotation.project_id = this.project_id;
     
-    _exportedAnnotations.push(_annotation); /* Ajout de l'annotation à la liste à exporter */
-    _export.addList("annotation",_exportedAnnotations); /* Ajout de la liste à exporter à l'objet Source */    
+    _exportedAnnotations.push(_annotation); /* We add the annotation in the list to export */
+    _export.addList("annotation",_exportedAnnotations); /* We add the list to the source object */    
     
     _url = Mustache.to_html(this.api_endpoint_template, {annotation_id: this.currentSegment.id});
     
@@ -254,11 +254,11 @@
         url: _url,
         type: this.api_method,
         contentType: 'application/json',
-        data: _export.serialize(), /* L'objet Source est sérialisé */
+        data: _export.serialize(), /* Source is serialized */
         success: function(_data) {
-            _export.getAnnotations().removeElement(_annotation, true); /* Pour éviter les doublons, on supprime l'annotation qui a été envoyée */
-            _export.deSerialize(_data); /* On désérialise les données reçues pour les réinjecter */
-            _this.source.merge(_export); /* On récupère les données réimportées dans l'espace global des données */
+            _export.getAnnotations().removeElement(_annotation, true); /* We delete the sent annotation to avoid redundancy */
+            _export.deSerialize(_data); /* Data deserialization */
+            _this.source.merge(_export); /* We merge the deserialized data with the current source data */
             _this.segments.forEach(function(_segment){
                 if (_segment.id == _annotation.id){
                     _this.segments.removeElement(_segment)
--- a/server/src/remie/static/remie/metadataplayer/DailymotionPlayer.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/DailymotionPlayer.js	Fri Oct 02 10:24:23 2015 +0200
@@ -9,96 +9,142 @@
 };
 
 IriSP.Widgets.DailymotionPlayer.prototype.draw = function() {
-    
+
     if (typeof this.video === "undefined") {
         this.video = this.media.video;
     }
 
     this.height = this.height || Math.floor(this.width / this.aspect_ratio);
-    
+
     var _media = this.media,
+        videoid = null,
         _this = this,
-        _pauseState = true;
-    
-    /* Dailymotion utilise un système de fonctions référencées dans
-     * des variables globales pour la gestion des événements.
-     */
-    
-    window.onDailymotionPlayerReady = function() {
+        state = {
+            pause: true,
+            apiready: false,
+            volume: 0,
+            time: 0,
+            duration: 0
+        };
+
+    var m = this.video.match(/www.dailymotion.com\/video\/(.+)/);
+    if (m) {
+        videoid = m[1];
+    }
 
-        var _player = document.getElementById(_this.container);
-        
+    var player_url = Mustache.to_html('{{ protocol }}//www.dailymotion.com/embed/video/{{ videoid }}', {
+        protocol: document.location.protocol.search('http') == 0 ? document.location.protocol : 'http:',
+        videoid: videoid
+    });
+    var params = {
+        'api': 'postMessage',
+        'chromeless': 1,
+        'id': 'dm_player',
+        'related': 0,
+        'autoplay': 1
+    };
+
+    _this.$.html(Mustache.to_html('<iframe id="{{ id }}" src="{{ player_url }}?{{ params }}" width="{{ width }}" height="{{ height }}" frameborder="0"></iframe>', {
+        player_url: player_url,
+        params: Object.keys(params).reduce(function(a,k){a.push(k+'='+encodeURIComponent(params[k]));return a;},[]).join('&'),
+        width: this.width,
+        height: this.height,
+        id: params.id
+    }));
+
+    function setup_media_methods () {
+        var dest = _this.$.find("#" + params.id)[0].contentWindow;
+        var execute = function(c, v) {
+            if (v !== undefined)
+                c = c + "=" + v;
+            dest.postMessage(c, "*");
+        };
+
         _media.getCurrentTime = function() {
-            return new IriSP.Model.Time(1000*_player.getCurrentTime());
+            return state.time;
         };
         _media.getVolume = function() {
-            return _player.getVolume() / 100;
+            return state.volume;
         };
         _media.getPaused = function() {
-            return _pauseState;
+            return state.pause;
         };
         _media.getMuted = function() {
-            return _player.isMuted();
+            return state.muted;
         };
         _media.setCurrentTime = function(_milliseconds) {
-            _seekPause = _pauseState;
-            return _player.seekTo(_milliseconds / 1000);
+            execute("seek", _milliseconds / 1000);
         };
         _media.setVolume = function(_vol) {
-            return _player.setVolume(Math.floor(_vol*100));
+            execute("volume", _vol * 100);
         };
         _media.mute = function() {
-            return _player.mute();
+            execute("muted", 1);
         };
         _media.unmute = function() {
-            return _player.unMute();
+            execute("muted", 0);
         };
         _media.play = function() {
-            return _player.playVideo();
+            execute("play");
         };
         _media.pause = function() {
-            return _player.pauseVideo();
+            execute("pause");
         };
-        
-        _player.addEventListener("onStateChange", "onDailymotionStateChange");
-        _player.addEventListener("onVideoProgress", "onDailymotionVideoProgress");
-        
-        _player.cueVideoByUrl(_this.video);
-        
-        _media.trigger("loadedmetadata");
-    };
-    
-    window.onDailymotionStateChange = function(_state) {
-        switch(_state) {
-            case 1:
-                _media.trigger("play");
-                _pauseState = false;
-                break;
-    
-            case 2:
-                _media.trigger("pause");
-                _pauseState = true;
-                break;
-    
-            case 3:
-                _media.trigger("seeked");
-                break;
-        }
-    };
-    
-    window.onDailymotionVideoProgress = function(_progress) {
-        _media.trigger("timeupdate", new IriSP.Model.Time(_progress.mediaTime * 1000));
-    };
-    
-    var params = {
-        "allowScriptAccess" : "always",
-        "wmode": "opaque"
-    };
-    
-    var atts = {
-        id : this.container
     };
 
-    swfobject.embedSWF("http://www.dailymotion.com/swf?chromeless=1&enableApi=1", this.container, this.width, this.height, "8", null, null, params, atts);
-    
-};
\ No newline at end of file
+    window.addEventListener("message", function (event) {
+        // Parse event.data (query-string for to object)
+
+        // Duck-checking if event.data is a string
+        if (event.data.split === undefined)
+            return;
+
+        var info = event.data.split("&").map( function(s) { return s.split("="); }).reduce( function(o, v) { o[v[0]] = decodeURIComponent(v[1]); return o; }, {});
+
+        switch (info.event) {
+        case "apiready":
+            state.apiready = true;
+            setup_media_methods();
+            break;
+        //case "canplay":
+        //    break;
+        case "durationchange":
+            if (info.duration.slice(-2) == "sc") {
+                state.duration = 1000 * Number(info.duration.slice(0, -2));
+                _media.setDuration(state.duration);
+            }
+            break;
+        case "ended":
+            state.pause = true;
+            break;
+        case "loadedmetadata":
+            _media.trigger("loadedmetadata");
+            break;
+        case "pause":
+            state.pause = true;
+            _media.trigger("pause");
+            break;
+        case "play":
+            state.pause = false;
+            _media.trigger("play");
+            break;
+            //case "playing":
+            //    break;
+            //case "progress":
+            //  Loading progress
+            //    break;
+        case "seeked":
+            state.time = new IriSP.Model.Time(1000 * Number(info.time));
+            _media.trigger("seeked");            
+            break;
+        case "timeupdate":
+            state.time = new IriSP.Model.Time(1000 * Number(info.time));
+            _media.trigger("timeupdate", state.time);
+            break;
+        case "volumechange":
+            state.muted = (info.muted == "true");
+            state.volume = Number(info.volume) / 100;
+            break;
+        }
+    }, false);
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/EnrichedPlan.css	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,207 @@
+.Ldt-EnrichedPlan-Slide {
+    border-bottom: 2px dotted #ccc;
+    padding-top: 4px;
+    cursor: pointer;
+}
+
+.Ldt-EnrichedPlan-SlideItem {
+    max-height: 3000px;
+    transition: max-height .6s;
+}
+
+.Ldt-EnrichedPlan-SlideItem.filtered_out {
+    max-height: 0px;
+    overflow: hidden;
+}
+
+.Ldt-EnrichedPlan-SlideTimecode {
+    display: inline-block;
+    width: 24px;
+    color: #999 !important;
+    font-size: 9px !important;
+    width: 24px;
+    vertical-align: top;
+}
+
+.Ldt-EnrichedPlan-SlideThumbnail {
+    display: inline-block;
+    width: 180px;
+    height: 100px;
+    padding-left: 10px;
+    margin: 0;
+    vertical-align: top;
+}
+
+.Ldt-EnrichedPlan-SlideThumbnail img {
+    max-width: 180px;
+    max-height: 100px;
+    margin: auto;
+    border: 1px solid #ccc;
+}
+
+.Ldt-EnrichedPlan-SlideContent {
+    display: inline-block;
+    width: calc(100% - 220px);
+    transition: width .4s;
+}
+
+.Ldt-EnrichedPlan-SlideThumbnail.filtered_out + .Ldt-EnrichedPlan-SlideContent {
+    width: calc(100% - 40px);
+}
+
+.Ldt-EnrichedPlan-SlideTitle {
+    display: inline-block;
+    font-size: 14px;
+    width: 100%;
+    height: 1em;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+}
+
+.Ldt-EnrichedPlan-SlideTitle1 {
+    text-transform: uppercase;
+    font-size: 13px;
+    font-weight: 600;
+}
+
+.Ldt-EnrichedPlan-Note {
+    font-weight: normal;
+    font-size: 14px;
+    font-family: Roboto-italic;
+}
+.Ldt-EnrichedPlan-Note:hover {
+    background-color: #eee;
+}
+
+.Ldt-EnrichedPlan-Note-Teacher {
+    color: #e5007e;
+    font-style: italic;
+}
+.Ldt-EnrichedPlan-Note-Own {
+    color: #66ccff;
+}
+.Ldt-EnrichedPlan-Note-Other {
+    color: #996633;
+}
+
+.Ldt-EnrichedPlan-Note-Text {
+    line-height: 22px;
+    word-wrap: break-word;
+}
+
+.Ldt-EnrichedPlan-Note-Author {
+    text-transform: uppercase;
+    font-size: 10px;
+}
+
+.Ldt-EnrichedPlan-Content {
+    margin-top: 37px;
+}
+
+.Ldt-EnrichedPlan-Controls {
+    height: 36px;
+    padding: 9px 0px 6px 0px;
+    border-bottom: 1px solid #000;
+    overflow-y: hidden;
+    overflow-x: hidden;
+    position: absolute;
+    top: 0px;
+    left: 0px;
+    right: 0px;
+    z-index: 1;
+    background-color: #fff;
+}
+
+.Ldt-EnrichedPlan-Control-Label {
+    display: inline-block;
+    text-transform: uppercase;
+    line-height: 10px;
+    font-family: Roboto;
+    font-size: 10px;
+    font-weight: 100;
+    width: 80px;
+    position: relative;
+}
+.Ldt-EnrichedPlan-Controls .Ldt-EnrichedPlan-Search-Input {
+    float: right;
+    font-family: Roboto;
+    font-size: 16px;
+    width: calc(100% - 340px);
+}
+
+.Ldt-EnrichedPlan-Note.non_matching {
+    display: none;
+}
+
+.Ldt-EnrichedPlan-Control- {
+    font-style: normal;
+}
+    /**********************************************************/
+/* Base for label styling */
+.Ldt-EnrichedPlan-Control-Checkbox:not(:checked),
+.Ldt-EnrichedPlan-Control-Checkbox:checked {
+  position: absolute;
+  left: -9999px;
+}
+.Ldt-EnrichedPlan-Control-Checkbox:not(:checked) + label,
+.Ldt-EnrichedPlan-Control-Checkbox:checked + label {
+  position: relative;
+  padding-left: 20px;
+  cursor: pointer;
+}
+
+/* checkbox aspect */
+.Ldt-EnrichedPlan-Control-Checkbox:not(:checked) + label:before,
+.Ldt-EnrichedPlan-Control-Checkbox:checked + label:before {
+  content: '';
+  position: absolute;
+  left:0; top: 2px;
+  width: 13px; height: 13px;
+  border: 1px solid #aaa;
+}
+/* checked mark aspect */
+.Ldt-EnrichedPlan-Control-Checkbox:not(:checked) + label:after,
+.Ldt-EnrichedPlan-Control-Checkbox:checked + label:after {
+    content: '\2a2f';
+    font-style: normal;
+    position: absolute;
+    top: 3px; left: -1px;
+    font-size: 20px;
+    transition: all .2s;
+}
+/* checked mark aspect changes */
+.Ldt-EnrichedPlan-Control-Checkbox:not(:checked) + label:after {
+  opacity: 0;
+}
+.Ldt-EnrichedPlan-Control-Checkbox:checked + label:after {
+  opacity: 1;
+}
+/* disabled checkbox */
+.Ldt-EnrichedPlan-Control-Checkbox:disabled:not(:checked) + label:before,
+.Ldt-EnrichedPlan-Control-Checkbox:disabled:checked + label:before {
+  box-shadow: none;
+  border-color: #bbb;
+  background-color: #ddd;
+}
+.Ldt-EnrichedPlan-Control-Checkbox:disabled:checked + label:after {
+  color: #999;
+}
+.Ldt-EnrichedPlan-Control-Checkbox:disabled + label {
+  color: #aaa;
+}
+/* accessibility */
+.Ldt-EnrichedPlan-Control-Checkbox:checked:focus + label:before,
+.Ldt-EnrichedPlan-Control-Checkbox:not(:checked):focus + label:before {
+  border: 1px dotted blue;
+}
+
+/* hover style just for information */
+label:hover:before {
+  border: 1px solid #4778d9!important;
+}
+
+/* hover style just for information */
+label:hover:before {
+    background-color: #ededed;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/EnrichedPlan.js	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,145 @@
+/* TODO
+- add callbacks
+ */
+
+IriSP.Widgets.EnrichedPlan = function(player, config) {
+    IriSP.Widgets.Widget.call(this, player, config);
+}
+
+IriSP.Widgets.EnrichedPlan.prototype = new IriSP.Widgets.Widget();
+
+IriSP.Widgets.EnrichedPlan.prototype.defaults = {
+    // Main type for slide segmentation
+    annotation_type: "Slides",
+    // If no annotation type list is specified, use all other types
+    annotation_types: [],
+    show_controls: true,
+    show_slides: true,
+    show_teacher_notes: true,
+    show_other_notes: true,
+    show_own_notes: true
+}
+
+IriSP.Widgets.EnrichedPlan.prototype.template =
+      '<div class="Ldt-EnrichedPlan-Container">'
+    + '{{#show_controls}}<form class="Ldt-EnrichedPlan-Controls">'
+    + ' <input id="{{prefix}}teacher_note_checkbox" class="Ldt-EnrichedPlan-Control-Checkbox Ldt-EnrichedPlan-Note-Teacher" {{#show_teacher_notes}}checked{{/show_teacher_notes}} type="checkbox">'
+    + ' <label for="{{prefix}}teacher_note_checkbox" class="Ldt-EnrichedPlan-Control-Label Ldt-EnrichedPlan-Note-Teacher">Notes Enseignant</label>'
+    + ' <input id="{{prefix}}other_note_checkbox" class="Ldt-EnrichedPlan-Control-Checkbox Ldt-EnrichedPlan-Note-Other" {{#show_other_notes}}checked{{/show_other_notes}} type="checkbox">'
+    + ' <label for="{{prefix}}other_note_checkbox" class="Ldt-EnrichedPlan-Control-Label Ldt-EnrichedPlan-Note-Other">Notes Autres</label>'
+    + ' <input id="{{prefix}}simplified_plan_checkbox" class="Ldt-EnrichedPlan-Control-Checkbox Ldt-EnrichedPlan-Note-Own" {{#show_own_notes}}checked{{/show_own_notes}} type="checkbox">'
+    + ' <label for="{{prefix}}simplified_plan_checkbox" class="Ldt-EnrichedPlan-Control-Label Ldt-EnrichedPlan-Note-Own">Notes perso.</label>'
+    + ' <input id="{{prefix}}slide_display_checkbox" class="Ldt-EnrichedPlan-Control-Checkbox Ldt-EnrichedPlan-Slide-Display" {{#show_slides}}checked{{/show_slides}} type="checkbox">'
+    + ' <label for="{{prefix}}slide_display_checkbox" class="Ldt-EnrichedPlan-Control-Label Ldt-EnrichedPlan-Slide-Display">Diapo<br/>&nbsp;</label>'
+    + ' <input class="Ldt-EnrichedPlan-Search-Input" type="search" incremental placeholder="Recherchez"/>'
+    + '</form>{{/show_controls}}'
+    + '<div class="Ldt-EnrichedPlan-Content"></div>'
+    + '</div>';
+
+IriSP.Widgets.EnrichedPlan.prototype.slideTemplate =
+      '<div data-id="{{ id }}" class="Ldt-EnrichedPlan-Slide">'
+    + '  <div class="Ldt-EnrichedPlan-SlideItem Ldt-EnrichedPlan-SlideTimecode">{{ begin }}</div>'
+    + '  <div data-timecode="{{begintc}}" class="Ldt-EnrichedPlan-SlideItem {{^show_slides}}filtered_out{{/show_slides}} Ldt-EnrichedPlan-SlideThumbnail Ldt-EnrichedPlan-Slide-Display"><img title="{{ begin }} - {{ atitle }}" src="{{ thumbnail }}"></div>'
+    + '  <div class="Ldt-EnrichedPlan-SlideContent">'
+    + '     <div data-timecode="{{begintc}}" class="Ldt-EnrichedPlan-SlideTitle Ldt-EnrichedPlan-SlideTitle{{ level }}">{{ atitle }}</div>'
+    + '     <div class="Ldt-EnrichedPlan-SlideNotes">{{{ notes }}}</div>'
+    + '  </div>'
+    + '</div>';
+
+IriSP.Widgets.EnrichedPlan.prototype.annotationTemplate = '<div title="{{ begin }} - {{ atitle }}" data-id="{{ id }}" data-timecode="{{begintc}}" class="Ldt-EnrichedPlan-SlideItem Ldt-EnrichedPlan-Note {{category}} {{filtered}}"><span class="Ldt-EnrichedPlan-Note-Text">{{{ text }}}</span> <span class="Ldt-EnrichedPlan-Note-Author">{{ author }}</span></div>';
+
+IriSP.Widgets.EnrichedPlan.prototype.draw = function() {
+    var _this = this;
+    // Generate a unique prefix, so that ids of input fields
+    // (necessary for label association) are unique too.
+    _this.prefix = "TODO";
+    // slides content: title, level (for toc)
+    var _slides = this.getWidgetAnnotations().sortBy(function(_annotation) {
+        return _annotation.begin;
+    });
+    // All other annotations
+    var _annotations = this.media.getAnnotations().filter( function (a) {
+        return a.getAnnotationType().title != _this.annotation_type;
+    }).sortBy(function(_annotation) {
+        return _annotation.begin;
+    });
+
+    // Reference annotations in each slide: assume that end time is
+    // correctly set.
+    _slides.forEach( function (slide) {
+        slide.annotations = _annotations.filter( function (a) {
+            return a.begin >= slide.begin && a.begin <= slide.end;
+        });
+    });
+
+    _this.renderTemplate();
+    var container = _this.$.find('.Ldt-EnrichedPlan-Container');
+    var content = _this.$.find('.Ldt-EnrichedPlan-Content');
+
+    // Returns the note category: Own, Other, Teacher
+    function note_category(a) {
+        return a.title.indexOf('Anonyme') < 0 ? "Own" : "Other";
+    };
+
+    _slides.forEach(function(slide) {
+        var _html = Mustache.to_html(_this.slideTemplate, {
+            id : slide.id,
+            atitle : IriSP.textFieldHtml(slide.title),
+            level: slide.content.level || 1,
+            begin : slide.begin.toString(),
+            begintc: slide.begin.milliseconds,
+            thumbnail: slide.thumbnail,
+            show_slides: _this.show_slides,
+            notes: slide.annotations.map( function (a) {
+                return Mustache.to_html(_this.annotationTemplate, {
+                    id: a.id,
+                    text: IriSP.textFieldHtml(a.description || a.title),
+                    author: a.creator,
+                    begin: a.begin.toString(),
+                    begintc: a.begin.milliseconds,
+                    atitle: a.title.slice(0, 20),
+                    // FIXME: Temporary hack waiting for a proper metadata definition
+                    category: "Ldt-EnrichedPlan-Note-" + note_category(a),
+                    filtered: ( (note_category(a) == 'Own' && ! _this.show_own_notes)
+                                || (note_category(a) == 'Other' && ! _this.show_other_notes)
+                                || (note_category(a) == 'Teacher' && ! _this.show_teacher_notes) ) ? 'filtered_out' : ''
+                });
+            }).join("\n")
+        });
+        var _el = IriSP.jQuery(_html);
+        content.append(_el);
+    });
+
+    container.on("click", "[data-timecode]", function () {
+        _this.media.setCurrentTime(Number(this.dataset.timecode));
+    });
+
+    container.on("click", ".Ldt-EnrichedPlan-Control-Checkbox", function () {
+        var classname = _.first(_.filter(this.classList, function (s) { return s != "Ldt-EnrichedPlan-Control-Checkbox"; }));
+        if (classname !== undefined) {
+            if ($(this).is(':checked')) {
+                content.find(".Ldt-EnrichedPlan-Slide ." + classname).removeClass("filtered_out");
+            } else {
+                content.find(".Ldt-EnrichedPlan-Slide ." + classname).addClass("filtered_out");
+             }
+        }
+
+    });
+
+    container.find(".Ldt-EnrichedPlan-Search-Input").on("search", function () {
+        var q = $(this).val().toLocaleLowerCase();
+        if (q === "") {
+            // Show all
+            content.find(".Ldt-EnrichedPlan-Note").removeClass("non_matching");
+        } else {
+            $(".Ldt-EnrichedPlan-Note").each( function () {
+                var node = $(this);
+                if (node.text().toLocaleLowerCase().indexOf(q) > -1) {
+                    node.removeClass("non_matching");
+                } else {
+                    node.addClass("non_matching");
+                }
+            });
+        }
+    });
+};
--- a/server/src/remie/static/remie/metadataplayer/ImageDisplay.css	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/ImageDisplay.css	Fri Oct 02 10:24:23 2015 +0200
@@ -1,6 +1,10 @@
-/* Nothing */
 .Ldt-ImageDisplay-Container {
-    margin: auto;
+    width: 100%;
+    height: 100%;
+    background-color: white;
+    background-repeat: no-repeat;
+    background-position: center;
+    background-size: contain;
 }
 
 .Ldt-ImageDisplay-Image {
@@ -9,7 +13,7 @@
 }
 
 .Ldt-ImageDisplay-Overlay {
-    width: 20%;
+    width: 30%;
     min-width: 20px;
     height: 100%;
     opacity: 0.1;
@@ -23,10 +27,10 @@
 
 .Ldt-ImageDisplay-Overlay-Left {
     left: 0px;
-    cursor: url(img/hand_left.png), pointer;
+    cursor: url(img/left_arrow.svg) 20 20, pointer;
 }
 
 .Ldt-ImageDisplay-Overlay-Right {
     right: 0px;
-    cursor: url(img/hand_right.png), pointer;
+    cursor: url(img/right_arrow.svg) 20 20, pointer;
 }
--- a/server/src/remie/static/remie/metadataplayer/ImageDisplay.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/ImageDisplay.js	Fri Oct 02 10:24:23 2015 +0200
@@ -7,27 +7,27 @@
 IriSP.Widgets.ImageDisplay.prototype = new IriSP.Widgets.Widget();
 
 IriSP.Widgets.ImageDisplay.prototype.defaults = {
-    annotation_type: "Slides",
+    annotation_type: "Slides"
     // container: "imageContainer"
 }
 
-IriSP.Widgets.ImageDisplay.prototype.template = '<div class="Ldt-ImageDisplay-Container"><img class="Ldt-ImageDisplay-Image" title="" alt="Slide Image" src=""/><div class="Ldt-ImageDisplay-Overlay Ldt-ImageDisplay-Overlay-Left"></div><div class="Ldt-ImageDisplay-Overlay Ldt-ImageDisplay-Overlay-Right"></div></div>';
+IriSP.Widgets.ImageDisplay.prototype.template = '<div class="Ldt-ImageDisplay-Container"><div class="Ldt-ImageDisplay-Overlay Ldt-ImageDisplay-Overlay-Left"></div><div class="Ldt-ImageDisplay-Overlay Ldt-ImageDisplay-Overlay-Right"></div></div>';
 
 IriSP.Widgets.ImageDisplay.prototype.annotationTemplate = '';
 
 IriSP.Widgets.ImageDisplay.prototype.update = function(annotation) {
     // Update the widget with data corresponding to the annotation
-    this.image.setAttribute("title", IriSP.textFieldHtml(annotation.title) + " - " + annotation.begin.toString());
-    this.image.setAttribute("src", annotation.thumbnail);
+    this.image.css("background-image", "url(" + annotation.thumbnail + ")");
+    this.image.attr("title", IriSP.textFieldHtml(annotation.title) + " - " + annotation.begin.toString());
 };
 
-IriSP.Widgets.ImageDisplay.prototype.draw = function() {    
+IriSP.Widgets.ImageDisplay.prototype.draw = function() {
     var _annotations = this.getWidgetAnnotations().sortBy(function(_annotation) {
         return _annotation.begin;
     });
     var _this = this;
     _this.renderTemplate();
-    _this.image = _this.$.find("img")[0];
+    _this.image = _this.$.find(".Ldt-ImageDisplay-Container");
 
     _this.$.find(".Ldt-ImageDisplay-Overlay-Left").on("click", function () { _this.navigate(-1); });
     _this.$.find(".Ldt-ImageDisplay-Overlay-Right").on("click", function () { _this.navigate(+1); });
--- a/server/src/remie/static/remie/metadataplayer/LatestAnnotation.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/LatestAnnotation.js	Fri Oct 02 10:24:23 2015 +0200
@@ -116,7 +116,7 @@
                 _annotation.on("click", function(){
                     var _user = {},
                         _user_display_string = "",
-                        _users = _this.source.users_data.filter(function(_user_data){
+                        _users = this.source.users_data.filter(function(_user_data){
                             return _user_data.username == _annotation.creator
                         });
                     if (_users.length == 0){
--- a/server/src/remie/static/remie/metadataplayer/LdtPlayer-core.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/LdtPlayer-core.js	Fri Oct 02 10:24:23 2015 +0200
@@ -82,7 +82,7 @@
     var list = [],
         positions = [],
         text = _text.replace(/(^\s+|\s+$)/g,'');
-    
+
     function addToList(_rx, _startHtml, _endHtml) {
         while(true) {
             var result = _rx.exec(text);
@@ -101,11 +101,11 @@
             positions.push(end);
         }
     }
-    
+
     if (_regexp) {
         addToList(_regexp, '<span class="Ldt-Highlight">', '</span>');
     }
-    
+
     addToList(/(https?:\/\/)?[\w\d\-]+\.[\w\d\-]+\S+/gm, function(matches) {
         return '<a href="' + (matches[1] ? '' : 'http://') + matches[0] + '" target="_blank">';
     }, '</a>');
@@ -114,19 +114,19 @@
     }, '</a>');
     addToList(/\*[^*]+\*/gm, '<b>', '</b>');
     addToList(/[\n\r]+/gm, '', '<br />');
-    
+
     IriSP._(_extend).each(function(x) {
         addToList.apply(null, x);
     });
-    
+
     positions = IriSP._(positions)
         .chain()
         .uniq()
         .sortBy(function(p) { return parseInt(p); })
         .value();
-    
+
     var res = "", lastIndex = 0;
-    
+
     for (var i = 0; i < positions.length; i++) {
         var pos = positions[i];
         res += text.substring(lastIndex, pos);
@@ -144,11 +144,11 @@
         }
         lastIndex = pos;
     }
-    
+
     res += text.substring(lastIndex);
-    
+
     return res;
-    
+
 };
 
 IriSP.log = function() {
@@ -161,11 +161,27 @@
 	jqSel.attr("draggable", "true").on("dragstart", function(_event) {
 		var d = (typeof data === "function" ? data.call(this) : data);
 		try {
+            if (d.html === undefined && d.uri && d.text) {
+                d.html = '<a href="' + d.uri + '">' + d.text + '</a>';
+            }
 			IriSP._(d).each(function(v, k) {
-				if (v) {
+                if (v && k != 'text' && k != 'html') {
 					_event.originalEvent.dataTransfer.setData("text/x-iri-" + k, v);
 				}
 			});
+            if (d.uri && d.text) {
+                _event.originalEvent.dataTransfer.setData("text/x-moz-url", d.uri + "\n" + d.text.replace("\n", " "));
+                _event.originalEvent.dataTransfer.setData("text/plain", d.text + " " + d.uri);
+            }
+            // Define generic text/html and text/plain last (least
+            // specific types, see
+            // https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Drag_operations#Drag_Data)
+            if (d.html !== undefined) {
+                _event.originalEvent.dataTransfer.setData("text/html", d.html);
+            }
+            if (d.text !== undefined && ! d.uri) {
+                _event.originalEvent.dataTransfer.setData("text/plain", d.text);
+            }
 		} catch(err) {
 			_event.originalEvent.dataTransfer.setData("Text", JSON.stringify(d));
 		}
@@ -180,6 +196,62 @@
     });
 };
 
+IriSP.timestamp2ms = function(t) {
+    // Convert timestamp to numeric value
+    // It accepts the following forms:
+    // [h:mm:ss] [mm:ss] [ss]
+    var s = t.split(":").reverse();
+    while (s.length < 3) {
+        s.push("0");
+    }
+    return 1000 * (3600 * parseInt(s[2], 10) + 60 * parseInt(s[1], 10) + parseInt(s[0], 10));
+};
+
+IriSP.setFullScreen= function(elem, value) {
+    // Set fullscreen on or off
+    if (value) {
+		if (elem.requestFullscreen) {
+			elem.requestFullscreen();
+		} else if (elem.mozRequestFullScreen) {
+			elem.mozRequestFullScreen();
+		} else if (elem.webkitRequestFullscreen) {
+			elem.webkitRequestFullscreen();
+		} else if (elem.msRequestFullscreen) {
+			elem.msRequestFullscreen();
+		}
+	} else {
+        if (document.exitFullscreen) {
+            document.exitFullscreen();
+        } else if (document.msExitFullscreen) {
+            document.msExitFullscreen();
+        } else if (document.mozCancelFullScreen) {
+            document.mozCancelFullScreen();
+        } else if (document.webkitExitFullscreen) {
+            document.webkitExitFullscreen();
+        }
+    }
+};
+
+IriSP.isFullscreen = function() {
+	return (document.fullscreenElement ||  document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement);
+};
+
+IriSP.getFullscreenElement = function () {
+    return (document.fullscreenElement
+            || document.webkitFullscreenElement
+            || document.mozFullScreenElement
+            || document.msFullscreenElement
+            || undefined);
+};
+
+IriSP.getFullscreenEventname = function () {
+    return ((document.exitFullscreen && "fullscreenchange")
+            || (document.webkitExitFullscreen && "webkitfullscreenchange")
+            || (document.mozExitFullScreen && "mozfullscreenchange")
+            || (document.msExitFullscreen && "msfullscreenchange")
+            || "");
+};
+
 /* js is where data is stored in a standard form, whatever the serializer */
 
 //TODO: Separate Project-specific data from Source
@@ -943,6 +1015,19 @@
 
 extendPrototype(Annotation, BaseElement);
 
+/* Set begin and end in one go, to avoid undesired side-effects in
+ * setBegin/setEnd interaction */
+Annotation.prototype.setBeginEnd = function(_beginMs, _endMs) {
+    _beginMs = Math.max(0,_beginMs);
+    _endMs = Math.max(0,_endMs);
+    if (_endMs < _beginMs)
+        _endMs = _beginMs;
+    this.begin.setMilliseconds(_beginMs);
+    this.end.setMilliseconds(_endMs);
+    this.trigger("change-begin");
+    this.trigger("change-end");
+};
+
 Annotation.prototype.setBegin = function(_beginMs) {
     this.begin.setMilliseconds(Math.max(0,_beginMs));
     this.trigger("change-begin");
@@ -1470,7 +1555,17 @@
             videoEl.append(_srcNode);
         }
     }
-    
+    if (opts.subtitle) {
+        var _trackNode = IriSP.jQuery('<track>');
+        _trackNode.attr({
+            label: "Subtitles",
+            kind: "subtitles",
+            srclang: "fr",
+            src: opts.subtitle,
+            default: ""
+        });
+        videoEl.append(_trackNode);
+    }
     jqselector.html(videoEl);
     
     var mediaEl = videoEl[0];
@@ -1569,6 +1664,13 @@
         media.trigger("seeked");
     });
     
+    videoEl.on("click", function() {
+        if (mediaEl.paused) {
+            media.play();
+        } else {
+            media.pause();
+        };
+    });
 };
 /* START contentapi-serializer.js */
 
@@ -1745,7 +1847,7 @@
                 if (typeof _data.content.img !== "undefined" && _data.content.img.src !== "undefined") {
                     _res.thumbnail = _data.content.img.src;
                 }
-                _res.created = IriSP.Model.isoToDate(_data.created);
+                _res.created = IriSP.Model.isoToDate((_data.meta ? _data.meta['dc:created'] : "") ||_data.created);
                 if (typeof _data.color !== "undefined") {
                     var _c = parseInt(_data.color).toString(16);
                     while (_c.length < 6) {
@@ -1758,8 +1860,7 @@
                 _res.setAnnotationType(_data.meta["id-ref"]);
                 _res.setTags(IriSP._(_data.tags).pluck("id-ref"));
                 _res.keywords = _res.getTagTexts();
-                _res.setBegin(_data.begin);
-                _res.setEnd(_data.end);
+                _res.setBeginEnd(_data.begin, _data.end);
                 _res.creator = _data.meta["dc:creator"] || "";
                 _res.project = _data.meta.project || "";
                 if (typeof _data.meta["dc:source"] !== "undefined" && typeof _data.meta["dc:source"].content !== "undefined") {
@@ -1957,9 +2058,11 @@
     serializeAnnotation : function(_data, _source) {
         var _annType = _data.getAnnotationType();
         return {
+            id: _data.id,
             begin: _data.begin.milliseconds,
             end: _data.end.milliseconds,
             content: {
+                data: (_data.content ? _data.content.data || {} : {}),
                 description: _data.description,
                 title: _data.title,
                 audio: _data.audio
@@ -1972,7 +2075,9 @@
             type: ( typeof _annType.dont_send_id !== "undefined" && _annType.dont_send_id ? "" : _annType.id ),
             meta: {
                 created: _data.created,
-                creator: _data.creator
+                creator: _data.creator,
+                modified: _data.modified,
+                contributor: _data.contributor
             }
         };
     },
@@ -2003,11 +2108,13 @@
             return _tag.id;
         });
         _ann.setTags(_tagIds);
-        _ann.setBegin(_anndata.begin);
-        _ann.setEnd(_anndata.end);
+        _ann.setBeginEnd(_anndata.begin, _anndata.end);
         if (typeof _anndata.content.audio !== "undefined" && _anndata.content.audio.href) {
             _ann.audio = _anndata.content.audio;
-        }
+        };
+        if (_anndata.content.data) {
+            _ann.content = { data: _anndata.content.data };
+        };
         _source.getAnnotations().push(_ann);
     },
     serialize : function(_source) {
@@ -2017,7 +2124,7 @@
         if (typeof _data == "string") {
             _data = JSON.parse(_data);
         }
-        
+
         _source.addList('tag', new IriSP.Model.List(_source.directory));
         _source.addList('annotationType', new IriSP.Model.List(_source.directory));
         _source.addList('annotation', new IriSP.Model.List(_source.directory));
@@ -2025,7 +2132,8 @@
     }
 };
 
-/* End ldt_annotate serializer *//* ldt_localstorage serializer: Used to store personal annotations in local storage */
+/* End ldt_annotate serializer */
+/* ldt_localstorage serializer: Used to store personal annotations in local storage */
 
 if (typeof IriSP.serializers === "undefined") {
     IriSP.serializers = {};
@@ -2035,9 +2143,11 @@
     serializeAnnotation : function(_data, _source) {
         var _annType = _data.getAnnotationType();
         return {
+            id: _data.id,
             begin: _data.begin.milliseconds,
             end: _data.end.milliseconds,
             content: {
+                data: (_data.content ? _data.content.data || {} : {}),
                 description: _data.description,
                 title: _data.title,
                 audio: _data.audio
@@ -2048,7 +2158,9 @@
             type: ( typeof _annType.dont_send_id !== "undefined" && _annType.dont_send_id ? "" : _annType.id ),
             meta: {
                 created: _data.created,
-                creator: _data.creator
+                creator: _data.creator,
+                modified: _data.modified,
+                contributor: _data.contributor
             }
         };
     },
@@ -2058,6 +2170,8 @@
         _ann.title = _anndata.content.title || "";
         _ann.creator = _anndata.meta.creator || "";
         _ann.created = new Date(_anndata.meta.created);
+        _ann.contributor = _anndata.meta.contributor || "";
+        _ann.modified = new Date(_anndata.meta.modified);
         _ann.setMedia(_anndata.media, _source);
         var _anntype = _source.getElement(_anndata.type);
         if (!_anntype) {
@@ -2079,11 +2193,13 @@
             return _tag.id;
         });
         _ann.setTags(_tagIds);
-        _ann.setBegin(_anndata.begin);
-        _ann.setEnd(_anndata.end);
+        _ann.setBeginEnd(_anndata.begin, _anndata.end);
         if (typeof _anndata.content.audio !== "undefined" && _anndata.content.audio.href) {
             _ann.audio = _anndata.content.audio;
-        }
+        };
+        if (_anndata.content.data) {
+            _ann.content = { data: _anndata.content.data };
+        };
         _source.getAnnotations().push(_ann);
     },
     serialize : function(_source) {
@@ -2168,8 +2284,8 @@
         backboneRelational: "backbone-relational.js",
         paper: "paper.js",
         jqueryMousewheel: "jquery.mousewheel.min.js",
-        splitter: "jquery.splitter.js",
-        cssSplitter: "jquery.splitter.css",
+        splitter: "jquery.touchsplitter.js",
+        cssSplitter: "jquery.touchsplitter.css",
         renkanPublish: "renkan.js",
         processing: "processing-1.3.6.min.js",
         recordMicSwf: "record_mic.swf",
@@ -2259,7 +2375,7 @@
 };
 
 IriSP.guiDefaults = {
-    width : 640,            
+    width : 640,
     container : 'LdtPlayer',
     spacer_div_height : 0,
     widgets: []
@@ -2312,23 +2428,21 @@
     ns.log("IriSP.Metadataplayer.prototype.loadLibs");
     var $L = $LAB
         .queueScript(ns.getLib("Mustache"));
-    
     formerJQuery = !!window.jQuery;
     former$ = !!window.$;
     formerUnderscore = !!window._;
-    
+
     if (typeof ns.jQuery === "undefined") {
         $L.queueScript(ns.getLib("jQuery"));
     }
-    
+
     if (typeof ns._ === "undefined") {
         $L.queueScript(ns.getLib("underscore"));
     }
-    
+
     if (typeof window.JSON == "undefined") {
         $L.queueScript(ns.getLib("json"));
     }
-    
     $L.queueWait().queueScript(ns.getLib("jQueryUI")).queueWait();
 
     /* widget specific requirements */
@@ -2340,9 +2454,8 @@
             }
         }
     }
-    
+
     var _this = this;
-    
     $L.queueWait(function() {
         _this.onLibsLoaded();
     });
@@ -2352,7 +2465,7 @@
 
 Metadataplayer.prototype.onLibsLoaded = function() {
     ns.log("IriSP.Metadataplayer.prototype.onLibsLoaded");
-    
+
     if (typeof ns.jQuery === "undefined" && typeof window.jQuery !== "undefined") {
         ns.jQuery = window.jQuery;
         if (former$ || formerJQuery) {
@@ -2368,7 +2481,7 @@
     
     ns.loadCss(ns.getLib("cssjQueryUI"));
     ns.loadCss(this.config.css);
-    
+
     this.$ = ns.jQuery('#' + this.config.container);
     this.$.css({
         "width": this.config.width,
@@ -2377,7 +2490,7 @@
     if (typeof this.config.height !== "undefined") {
         this.$.css("height", this.config.height);
     }
-      
+
     this.widgets = [];
     var _this = this;
     ns._(this.config.widgets).each(function(widgetconf, key) {
@@ -2390,9 +2503,9 @@
         });
     });
     this.$.find('.Ldt-Loader').detach();
-    
+
     this.widgetsLoaded = false;
-    
+
     this.on("widget-loaded", function() {
         if (_this.widgetsLoaded) {
             return;
@@ -2404,7 +2517,44 @@
             _this.widgetsLoaded = true;
             _this.trigger("widgets-loaded");
         }
-    });   
+    });
+};
+
+Metadataplayer.prototype.loadLocalAnnotations = function(localsourceidentifier) {
+    if (this.localSource === undefined)
+        this.localSource = this.sourceManager.newLocalSource({serializer: IriSP.serializers['ldt_localstorage']});
+    // Load current local annotations
+    if (localsourceidentifier) {
+        // Allow to override localsourceidentifier when necessary (usually at init time)
+        this.localSource.identifier = localsourceidentifier;
+    }
+    this.localSource.deSerialize(window.localStorage[this.localSource.identifier] || "[]");
+    return this.localSource;
+};
+
+Metadataplayer.prototype.saveLocalAnnotations = function() {
+    // Save annotations back to localstorage
+    window.localStorage[this.localSource.identifier] = this.localSource.serialize();
+    // Merge modifications into widget source
+    // this.source.merge(this.localSource);
+};
+
+Metadataplayer.prototype.addLocalAnnotation = function(a) {
+    this.loadLocalAnnotations();
+    this.localSource.getAnnotations().push(a);
+    this.saveLocalAnnotations();
+};
+
+Metadataplayer.prototype.deleteLocalAnnotation = function(ident) {
+    this.localSource.getAnnotations().removeId(ident, true);
+    this.saveLocalAnnotations();
+};
+
+Metadataplayer.prototype.getLocalAnnotation = function (ident) {
+    this.loadLocalAnnotations();
+    // We cannot use .getElement since it fetches
+    // elements from the global Directory
+    return IriSP._.first(IriSP._.filter(this.localSource.getAnnotations(), function (a) { return a.id == ident; }));
 };
 
 Metadataplayer.prototype.loadMetadata = function(_metadataInfo) {
@@ -2427,9 +2577,9 @@
         var _divs = this.layoutDivs(_widgetConfig.type);
         _widgetConfig.container = _divs[0];
     }
-    
+
     var _this = this;
-    
+
     if (typeof ns.Widgets[_widgetConfig.type] !== "undefined") {
         ns._.defer(function() {
             _callback(new ns.Widgets[_widgetConfig.type](_this, _widgetConfig));
@@ -2474,7 +2624,7 @@
     if (typeof _height !== "undefined") {
         divHtml.css("height", _height);
     }
-            
+
     this.$.append(divHtml);
     this.$.append(spacerHtml);
 
@@ -2483,7 +2633,8 @@
 
 })(IriSP);
 
-/* End of widgets-container/metadataplayer.js *//* widgetsDefinition of an ancestor for the Widget classes */
+/* End of widgets-container/metadataplayer.js */
+/* widgetsDefinition of an ancestor for the Widget classes */
 
 if (typeof IriSP.Widgets === "undefined") {
     IriSP.Widgets = {};
@@ -2502,44 +2653,44 @@
 
 
 IriSP.Widgets.Widget = function(player, config) {
-    
+
     if( typeof player === "undefined") {
         /* Probably an abstract call of the class when
          * individual widgets set their prototype */
         return;
     }
-    
+
     this.__subwidgets = [];
-    
+
     /* Setting all the configuration options */
     var _type = config.type || "(unknown)",
         _config = IriSP._.defaults({}, config, (player && player.config ? player.config.default_options : {}), this.defaults),
         _this = this;
-    
+
     IriSP._(_config).forEach(function(_value, _key) {
        _this[_key] = _value;
     });
-    
+
     this.$ = IriSP.jQuery('#' + this.container);
-    
+
     if (typeof this.width === "undefined") {
         this.width = this.$.width();
     } else {
         this.$.css("width", this.width);
     }
-    
+
     if (typeof this.height !== "undefined") {
         this.$.css("height", this.height);
     }
-    
+
     /* Setting this.player at the end in case it's been overriden
      * by a configuration option of the same name :-(
      */
     this.player = player || new IriSP.FakeClass(["on","trigger","off","loadWidget","loadMetadata"]);
-    
+
     /* Adding classes and html attributes */
     this.$.addClass("Ldt-TraceMe Ldt-Widget").attr("widget-type", _type);
-    
+
     this.l10n = (
         typeof this.messages[IriSP.language] !== "undefined"
         ? this.messages[IriSP.language]
@@ -2549,10 +2700,14 @@
             : this.messages["en"]
         )
     );
-    
+
     /* Loading Metadata if required */
-   
+
     function onsourceloaded() {
+        if (_this.localannotations) {
+            _this.localsource = player.loadLocalAnnotations(_this.localannotations);
+            _this.source.merge(_this.localsource);
+        }
         if (_this.media_id) {
                 _this.media = this.getElement(_this.media_id);
             } else {
@@ -2561,8 +2716,6 @@
                 };
                 _this.media = _this.source.getCurrentMedia(_mediaopts);
             }
-            
-
         if (_this.pre_draw_callback){
             IriSP.jQuery.when(_this.pre_draw_callback()).done(_this.draw());
         }
@@ -2571,11 +2724,10 @@
         }
         _this.player.trigger("widget-loaded");
     }
-    
+
     if (this.metadata) {
         /* Getting metadata */
         this.source = player.loadMetadata(this.metadata);
-        
         /* Call draw when loaded */
         this.source.onLoad(onsourceloaded);
     } else {
@@ -2583,8 +2735,8 @@
             onsourceloaded();
         }
     }
-    
-    
+
+
 };
 
 IriSP.Widgets.Widget.prototype.defaults = {};
@@ -2702,7 +2854,7 @@
     // offset is normally either -1 (previous slide) or +1 (next slide)
     var _this = this;
     var currentTime = _this.media.getCurrentTime();
-    var annotations = _this.source.getAnnotations().sortBy(function(_annotation) {
+    var annotations = _this.getWidgetAnnotations().sortBy(function(_annotation) {
         return _annotation.begin;
     });
     for (var i = 0; i < annotations.length; i++) {
@@ -2715,6 +2867,51 @@
     };
 };
 
+/*
+ * Propose an export of the widget's annotations
+ *
+ * Parameter: a list of annotations. If not specified, the widget's annotations will be exported.
+ */
+IriSP.Widgets.Widget.prototype.exportAnnotations = function(annotations) {
+    var widget = this;
+    if (annotations === undefined)
+        annotations = this.getWidgetAnnotations();
+    var $ = IriSP.jQuery;
+
+    // FIXME: this should belong to a proper serialize/deserialize component?
+    var content = Mustache.to_html("[video:{{url}}]\n", {url: widget.media.url}) + annotations.map( function(a) { return Mustache.to_html("[{{ a.begin }}]{{ a.title }} {{ a.description }}[{{ a.end }}]", { a: a }); }).join("\n");
+
+    var el = $("<pre>")
+            .addClass("exportContainer")
+            .text(content)
+            .dialog({
+                title: "Annotation export",
+                open: function( event, ui ) {
+                    // Select text
+                    var range;
+                    if (document.selection) {
+		                range = document.body.createTextRange();
+                        range.moveToElementText(this[0]);
+		                range.select();
+		            } else if (window.getSelection) {
+		                range = document.createRange();
+		                range.selectNode(this[0]);
+		                window.getSelection().addRange(range);
+		            }
+                },
+                autoOpen: true,
+                width: '80%',
+                minHeight: '400',
+                height: 400,
+                buttons: [ { text: "Close", click: function() { $( this ).dialog( "close" ); } },
+                           { text: "Download", click: function () {
+                               a = document.createElement('a');
+                               a.setAttribute('href', 'data:text/plain;base64,' + btoa(content));
+                               a.setAttribute('download', 'Annotations - ' + widget.media.title.replace(/[^ \w]/g, '') + '.txt');
+                               a.click();
+                           } } ]
+            });
+};
 
 /**
  * This method responsible of drawing a widget on screen.
--- a/server/src/remie/static/remie/metadataplayer/Markers.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Markers.js	Fri Oct 02 10:24:23 2015 +0200
@@ -205,7 +205,7 @@
         this.showScreen("ConfirmDelete");
     }
     else {
-        // Clic sur - sans marqueur sélectionné = retour à l'état initial
+        // Click on "x" without a selected marker: back to initial state
         this.cancelEdit();
     }
 }
@@ -247,7 +247,7 @@
 
 IriSP.Widgets.Markers.prototype.cancelEdit = function(){
     if (this.selectedMarker){
-        // Clic sur "cancel" pendant édition d'un marqueur = retour à l'état visualisation
+        // Click on "cancel" while editing a marker: back to visualization state
         _divHtml = Mustache.to_html(this.infoTemplate, {
             edit: false,
             marker_info: this.selectedMarker.description,
@@ -258,7 +258,7 @@
         }
     }
     else {
-        // Clic sur "cancel" pendant la création d'un marqueur = retour à l'état initial
+        // Click on "cancel" while editing a marker: back to initial state
         this.hidePlaceholder();
         this.$.find(".Ldt-Markers-Info").html("");
         this.$.find(".Ldt-Markers-RoundButton").hide()
@@ -440,85 +440,78 @@
 
 IriSP.Widgets.Markers.prototype.onSubmit = function(){
     
-    /* Si les champs obligatoires sont vides, on annule l'envoi */
+    /* If mandatory fields are empty, we cancel the sending */
     if (!this.allow_empty_markers && !this.onDescriptionChange()){
         return false;
     }
     
-    /* On pause la vidéo si elle est encore en train de tourner */
+    /* We pause the video if it's still playing */
     if (!this.media.getPaused()){
         this.media.pause();
     }
     
     var _this = this,
-        _exportedAnnotations = new IriSP.Model.List(this.player.sourceManager); /* Création d'une liste d'annotations contenant une annotation afin de l'envoyer au serveur */        
+        _exportedAnnotations = new IriSP.Model.List(this.player.sourceManager), /* We create a List to send to the server that will contains the annotation */
+        _export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[this.api_serializer]}), /* We create a source object using a specific serializer for export */
+        _annotationTypes = this.source.getAnnotationTypes().searchByTitle(this.annotation_type, true), /* We get the AnnotationType in which the annotation will be added */
+        _annotationType = (_annotationTypes.length ? _annotationTypes[0] : new IriSP.Model.AnnotationType(false, _export)); /* If it doesn't already exists, we create it */
     if (this.selectedMarker){
-        var _export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[this.api_serializer]})
-            _annotation = this.selectedMarker,
+        var _annotation = this.selectedMarker,
             _url = Mustache.to_html(this.api_endpoint_template_edit, {annotation_id: this.selectedMarker ? this.selectedMarker.id : ""});
         _annotation.source = _export
-        _annotation.description = this.$.find(".Ldt-Markers-MarkerTextArea").val(), /* Champ description */
-        _annotationTypes = this.source.getAnnotationTypes().searchByTitle(this.annotation_type, true), /* Récupération du type d'annotation dans lequel l'annotation doit être ajoutée */
-        _annotationType = (_annotationTypes.length ? _annotationTypes[0] : new IriSP.Model.AnnotationType(false, _export)); /* Si le Type d'Annotation n'existe pas, il est créé à la volée */
+        _annotation.description = this.$.find(".Ldt-Markers-MarkerTextArea").val(), /* Description field */
     }
     else {
-        var _export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[this.api_serializer]}), /* Création d'un objet source utilisant un sérialiseur spécifique pour l'export */
-            _annotation = new IriSP.Model.Annotation(false, _export); /* Création d'une annotation dans cette source avec un ID généré à la volée (param. false) */
-            _annotationTypes = this.source.getAnnotationTypes().searchByTitle(this.annotation_type, true), /* Récupération du type d'annotation dans lequel l'annotation doit être ajoutée */
-            _annotationType = (_annotationTypes.length ? _annotationTypes[0] : new IriSP.Model.AnnotationType(false, _export)), /* Si le Type d'Annotation n'existe pas, il est créé à la volée */
+        var _annotation = new IriSP.Model.Annotation(false, _export),
             _url = Mustache.to_html(this.api_endpoint_template_create);
-        /* Si nous avons dû générer un ID d'annotationType à la volée... */
+        
+        /* If we created an AnnotationType on the spot ... */
         if (!_annotationTypes.length) {
-            /* Il ne faudra pas envoyer l'ID généré au serveur */
+            /* ... We must not send its id to the server ... */
             _annotationType.dont_send_id = true;
-            /* Il faut inclure le titre dans le type d'annotation */
+            /* ... And we must include its title. */
             _annotationType.title = this.annotation_type;
         }
         
-        _annotation.setMedia(this.source.currentMedia.id); /* Id du média annoté */
+        _annotation.setMedia(this.source.currentMedia.id); /* Annotated media ID */
         if (!this.selectedMarker){
             _annotation.setBegin(this.newMarkerCurrentTime);
             _annotation.setEnd(this.newMarkerCurrentTime);
         }
-        _annotation.setAnnotationType(_annotationType.id); /* Id du type d'annotation */
+        _annotation.setAnnotationType(_annotationType.id); /* AnnotationType ID */
         if (this.project_id != ""){
-            /* Champ id projet, seulement si on l'a renseigné dans la config */
+            /* Project id, only if it's been specifiec in the config */
             _annotation.project_id = this.project_id;
         }
-        _annotation.created = new Date(); /* Date de création de l'annotation */
-        _annotation.description = this.$.find(".Ldt-Markers-MarkerTextArea").val(); /* Champ description */
+        _annotation.created = new Date(); /* Creation date */
+        _annotation.description = this.$.find(".Ldt-Markers-MarkerTextArea").val(); /* Description field */
         _annotation.creator = this.creator_name;
     }
     _annotation.project_id = this.project_id;
     
-    /*
-     * Nous remplissons les données de l'annotation générée à la volée
-     * ATTENTION: Si nous sommes sur un MASHUP, ces éléments doivent se référer AU MEDIA D'ORIGINE
-     * */
+    _exportedAnnotations.push(_annotation); /* We add the annotation in the list to export */
+    _export.addList("annotation",_exportedAnnotations); /* We add the list to the source object */ 
     
-    _exportedAnnotations.push(_annotation); /* Ajout de l'annotation à la liste à exporter */
-    _export.addList("annotation",_exportedAnnotations); /* Ajout de la liste à exporter à l'objet Source */
-    
-    /* Envoi de l'annotation via AJAX au serveur ! */
+    /* We send the AJAX request to the server ! */
     IriSP.jQuery.ajax({
         url: _url,
         type: this.selectedMarker ? this.api_method_edit : this.api_method_create,
         contentType: 'application/json',
-        data: _export.serialize(), /* L'objet Source est sérialisé */
+        data: _export.serialize(),
         success: function(_data) {
-            _this.showScreen('Success'); /* Si l'appel a fonctionné, on affiche l'écran "Annotation enregistrée" */
+            _this.showScreen('Success');
             window.setTimeout(_this.functionWrapper("revertToMainScreen"),(_this.after_send_timeout || 5000));
-            _export.getAnnotations().removeElement(_annotation, true); /* Pour éviter les doublons, on supprime l'annotation qui a été envoyée */
-            _export.deSerialize(_data); /* On désérialise les données reçues pour les réinjecter */
+            _export.getAnnotations().removeElement(_annotation, true); /* We delete the sent annotation to avoid redundancy */
+            _export.deSerialize(_data); /* Data deserialization */
             _annotation.id = _data.id;
-            _this.source.merge(_export); /* On récupère les données réimportées dans l'espace global des données */
+            _this.source.merge(_export); /* We merge the deserialized data with the current source data */
             if (_this.pause_on_write && _this.media.getPaused() && _this.play_on_submit) {
                 _this.media.play();
             }
             _this.markers.push(_annotation);
             _this.selectedMarker = _annotation;
             _this.drawMarkers();
-            _this.player.trigger("AnnotationsList.refresh"); /* On force le rafraîchissement du widget AnnotationsList */
+            _this.player.trigger("AnnotationsList.refresh");
             _this.player.trigger("Markers.refresh");
         },
         error: function(_xhr, _error, _thrown) {
@@ -541,14 +534,14 @@
         type: this.api_method_delete,
         contentType: 'application/json',
         success: function(_data) {
-            _this.showScreen('DeleteSuccess'); /* Si l'appel a fonctionné, on affiche l'écran "Annotation enregistrée" */
+            _this.showScreen('DeleteSuccess');
             window.setTimeout(_this.functionWrapper("revertToMainScreen"),(_this.after_send_timeout || 5000));
             if (_this.pause_on_write && _this.media.getPaused() && _this.play_on_submit) {
                 _this.media.play();
             }
             _this.markers.removeElement(_this.selectedMarker);
             _this.selectedMarker = false
-            _this.player.trigger("AnnotationsList.refresh"); /* On force le rafraîchissement du widget AnnotationsList */
+            _this.player.trigger("AnnotationsList.refresh");
             _this.player.trigger("Markers.refresh");
         },
         error: function(_xhr, _error, _thrown) {
--- a/server/src/remie/static/remie/metadataplayer/Mediafragment.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Mediafragment.js	Fri Oct 02 10:24:23 2015 +0200
@@ -2,6 +2,9 @@
     IriSP.Widgets.Widget.call(this, player, config);
     this.last_hash_key = "";
     this.last_hash_value = "";
+    this.last_extra_key = "";
+    this.last_extra_value = "";
+
     window.onhashchange = this.functionWrapper("goToHash");
     if (typeof window.addEventListener !== "undefined") {
         var _this = this;
@@ -22,7 +25,7 @@
     var _this = this;
     this.getWidgetAnnotations().forEach(function(_annotation) {
         _annotation.on("click", function() {
-            _this.setHashToAnnotation(_annotation.id);
+            _this.setHashToAnnotation(_annotation);
         });
     });
     if (this.media.loadedMetadata) {
@@ -48,6 +51,9 @@
     if (this.last_hash_key) {
         _tab.push(this.last_hash_key + '=' + this.last_hash_value);
     }
+    if (this.last_extra_key) {
+        _tab.push(this.last_extra_key + '=' + this.last_extra_value);
+    }
     return '#' + _tab.join('&');
 };
 
@@ -63,10 +69,13 @@
                     var _annotation = this.source.getElement(this.last_hash_value);
                     if (typeof _annotation !== "undefined") {
                         this.media.setCurrentTime(_annotation.begin);
+                    } else {
+                        /* Proceed parsing elements, maybe a t was specified */
+                        continue;
                     }
                 }
                 if (this.last_hash_key == "t") {
-                    this.media.setCurrentTime(1000*this.last_hash_value);
+                    this.media.setCurrentTime(1000 * this.last_hash_value);
                 }
                 break;
             }
@@ -74,18 +83,21 @@
     }
 };
 
-IriSP.Widgets.Mediafragment.prototype.setHashToAnnotation = function(_annotationId) {
-    this.setHash( 'id', _annotationId );
+IriSP.Widgets.Mediafragment.prototype.setHashToAnnotation = function(_annotation) {
+    this.setHash( 'id', _annotation.id, 't', _annotation.begin / 1000.0 );
 };
 
 IriSP.Widgets.Mediafragment.prototype.setHashToTime = function() {
     this.setHash( 't', this.media.getCurrentTime().getSeconds() );
 };
 
-IriSP.Widgets.Mediafragment.prototype.setHash = function(_key, _value) {
+IriSP.Widgets.Mediafragment.prototype.setHash = function(_key, _value, _key2, _value2) {
     if (!this.blocked && (this.last_hash_key !== _key || this.last_hash_value !== _value)) {
         this.last_hash_key = _key;
         this.last_hash_value = _value;
+        this.last_extra_key = _key2;
+        this.last_extra_value = _value2;
+
         var _hash = this.getLastHash();
         this.setWindowHash(_hash);
         if (window.parent !== window) {
--- a/server/src/remie/static/remie/metadataplayer/MultiSegments.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/MultiSegments.js	Fri Oct 02 10:24:23 2015 +0200
@@ -80,7 +80,7 @@
                 IriSP._({
                     type: "Segments",
                     annotation_type: _anntype,
-                    width: _this.width
+                    width: '100%'
                 }).extend(segmentsopts)
             );
             
@@ -89,7 +89,7 @@
                 IriSP._({
                     type: "Annotation",
                     annotation_type: _anntype,
-                    width: _this.width
+                    width: '100%'
                 }).extend(annotationopts)
             );
             
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/NoteTaking.css	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,5 @@
+/* NoteTaking widget */
+.Ldt-NoteTaking-Text {
+    width: 100%;
+    min-height: 360px;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/NoteTaking.js	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,91 @@
+/* This widget displays a note-taking view, that can be saved to localStorage */
+
+IriSP.Widgets.NoteTaking = function(player, config) {
+    IriSP.Widgets.Widget.call(this, player, config);
+}
+
+IriSP.Widgets.NoteTaking.prototype = new IriSP.Widgets.Widget();
+
+IriSP.Widgets.NoteTaking.prototype.defaults = {
+    // Id that will be used as localStorage key
+    editable_storage: ""
+}
+
+IriSP.Widgets.NoteTaking.prototype.template = '<textarea class="Ldt-NoteTaking-Text"></textarea>';
+
+IriSP.Widgets.NoteTaking.prototype.draw = function() {
+    var widget = this;
+    var content;
+    var $ = IriSP.jQuery;
+
+    widget.renderTemplate();
+    content = widget.$.find('.Ldt-NoteTaking-Text');
+
+    function load_content() {
+        $(content).val(window.localStorage[widget.editable_storage]);
+    }
+    function save_content() {
+        window.localStorage[widget.editable_storage] = $(content).val();
+    }
+
+    // Load current transcript
+    if (window.localStorage[widget.editable_storage]) {
+        load_content();
+    }
+
+    // Thanks to http://stackoverflow.com/questions/4456545/how-to-insert-text-at-the-current-caret-position-in-a-textarea
+    $.fn.insertAtCaret = function(text) {
+        return this.each(function() {
+            if (this.selectionStart !== undefined) {
+                // mozilla/netscape support
+                var startPos = this.selectionStart,
+                    endPos = this.selectionEnd,
+                    scrollTop = this.scrollTop;
+                this.value = this.value.substring(0, startPos) + text + this.value.substring(endPos, this.value.length);
+                this.focus();
+                this.selectionStart = startPos + text.length;
+                this.selectionEnd = startPos + text.length;
+                this.scrollTop = scrollTop;
+            } else {
+                // IE input[type=text] and other browsers
+                this.value += text;
+                this.focus();
+                this.value = this.value;    // forces cursor to end
+            }
+        });
+    };
+
+    function getAroundCaret(el, length) {
+        // Return a selection of 2 * length characters around the caret
+        var startPos = el.selectionStart;
+        return el.value.substring(startPos - length, startPos + length);
+    };
+
+
+    $(content).keydown(function (_event) {
+        if (_event.keyCode == 13 && (_event.ctrlKey || _event.metaKey)) {
+            // Insert current timestamp
+            _event.preventDefault();
+            // Get current value
+            var match = /\[([\d:]+)\]/.exec(getAroundCaret(content[0], 8));
+            if (match) {
+                // Found a timecode. Go to position.
+                widget.media.setCurrentTime(IriSP.timestamp2ms(match[1]));
+            } else {
+                $(content).insertAtCaret("[" + (new IriSP.Model.Time(widget.media.getCurrentTime())).toString() + "]");
+                save_content();
+            }
+        }
+    }).on("input", function (_event) {
+        console.log("Change");
+        // Store updated value
+        save_content();
+    }).on("dblclick", function (_event) {
+            var match = /\[([\d:]+)\]/.exec(getAroundCaret(content[0], 8));
+            if (match) {
+                // Found a timecode. Go to position.
+                _event.preventDefault();
+                widget.media.setCurrentTime(IriSP.timestamp2ms(match[1]));
+            };
+    });
+};
--- a/server/src/remie/static/remie/metadataplayer/Polemic.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Polemic.js	Fri Oct 02 10:24:23 2015 +0200
@@ -144,7 +144,8 @@
                 	image: _annotation.thumbnail,
                 	uri: (typeof _annotation.url !== "undefined" 
 		                ? _annotation.url
-		                : (document.location.href.replace(/#.*$/,'') + '#id='  + _annotation.id))
+		                : (document.location.href.replace(/#.*$/,'') + '#id='  + _annotation.id)),
+                text: '[' + _annotation.begin.toString() + '] ' + _annotation.title
                 });
             	// test if annotation has several colors.
             	var colAr = [];
--- a/server/src/remie/static/remie/metadataplayer/PopcornPlayer.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/PopcornPlayer.js	Fri Oct 02 10:24:23 2015 +0200
@@ -10,26 +10,19 @@
 };
 
 IriSP.Widgets.PopcornPlayer.prototype.draw = function() {
-
-    
     if (typeof this.video === "undefined") {
         this.video = this.media.video;
     }
-    
+
     if (this.url_transform) {
         this.video = this.url_transform(this.video);
     }
-    
+
     if (/^(https?:\/\/)?(www\.)?vimeo\.com/.test(this.video)) {
-        
         /* VIMEO */
-        
         var _popcorn = Popcorn.vimeo(this.container, this.video);
-        
     } else if (/^(https?:\/\/)?(www\.)?youtube\.com/.test(this.video)) {
-        
         /* YOUTUBE */
-       
         var _urlparts = this.video.split(/[?&]/),
             _params = {};
         for (var i = 1; i < _urlparts.length; i++) {
@@ -42,13 +35,11 @@
             _params.autoplay = 1;
         }
         _url = _urlparts[0] + '?' + IriSP.jQuery.param(_params);
-        
+
         var _popcorn = Popcorn.youtube(this.container, _url);
-        
+
     } else {
-        
         /* DEFAULT HTML5 */
-        
         var _tmpId = IriSP._.uniqueId("popcorn"),
             _videoEl = IriSP.jQuery('<video>');
         _videoEl.attr({
@@ -74,33 +65,32 @@
             _popcorn.autoplay(true);
         }
     }
-    
+
     var _media = this.media;
-    
+
     // Binding functions to Popcorn
-    
+
     _media.on("setcurrenttime", function(_milliseconds) {
         _popcorn.currentTime(_milliseconds / 1000);
     });
-    
+
     _media.on("setvolume", function(_vol) {
         _popcorn.volume(_vol);
         _media.volume = _vol;
     });
-    
+
     _media.on("setmuted", function(_muted) {
         _popcorn.muted(_muted);
         _media.muted = _muted;
     });
-    
+
     _media.on("setplay", function() {
         _popcorn.play();
     });
-    
+
     _media.on("setpause", function() {
         _popcorn.pause();
     });
-    
     _media.on("settimerange", function(_timeRange){
         _media.timeRange = _timeRange;
         try {
@@ -110,43 +100,41 @@
         } catch (err) {
         }
     })
-    
     _media.on("resettimerange", function(){
         _media.timeRange = false;
     })
-    
     // Binding Popcorn events to media
-    
+
     function getVolume() {
         _media.muted = _popcorn.muted();
         _media.volume = _popcorn.volume();
     }
-    
+
     _popcorn.on("loadedmetadata", function() {
         getVolume();
         _media.trigger("loadedmetadata");
         _media.trigger("volumechange");
     });
-    
+
     _popcorn.on("timeupdate", function() {
         _media.trigger("timeupdate", new IriSP.Model.Time(1000*_popcorn.currentTime()));
     });
-    
+
     _popcorn.on("volumechange", function() {
         getVolume();
         _media.trigger("volumechange");
     });
-    
+
     _popcorn.on("play", function() {
         _media.trigger("play");
     });
-    
+
     _popcorn.on("pause", function() {
         _media.trigger("pause");
     });
-    
+
     _popcorn.on("seeked", function() {
         _media.trigger("seeked");
     });
-    
-};
\ No newline at end of file
+
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/Quiz.css	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,224 @@
+/* Nothing */
+
+.Ldt-Quiz-Container {
+  	position: absolute;
+  	height: calc(100% - 4px);
+  	top: 0px;
+  	width: calc(100% - 20px);
+	margin: auto;
+	border: 1px solid black;
+	font-size: 18pt;
+}
+
+.Ldt-Quiz-Title {
+    line-height: 1;
+    padding-top: 10px;
+    text-align: center;
+}
+
+.Ldt-Quiz-Header {
+	font-size: 12px;
+	color: black;
+	border-bottom: 1px solid green;
+	padding: 2px;
+    height: 22px;
+}
+
+.Ldt-Quiz-Content {
+    height: calc(100% - 82px);
+    overflow-y: auto;
+}
+
+.Ldt-Quiz-Footer {
+    height: 60px;
+	width: 100%;
+	position: absolute;
+	bottom: 0px;
+	border-top: 2px solid black;
+	background-color: white;
+}
+
+
+.Ldt-Quiz-Score {
+	display: inline-block;
+	position: absolute;
+	right: 20px;
+}
+
+.Ldt-Quiz-Index {
+	display: inline-block;
+}
+
+.Ldt-Quiz-Image {
+    max-width: 100%;
+    max-height: 100%;
+}
+
+.Ldt-Quiz-Questions {
+    height: calc(100% - 2.5em);
+    margin: 10px;
+    padding: 10px;
+    border-left: 5px solid gray;
+}
+
+.quiz-question-block {
+    padding-top: 10px;
+}
+.quiz-resource-block {
+    padding-top: 10px;
+    float: right;
+    max-height: 100%;
+    height: 100%;
+}
+.quiz-resource-block img {
+    max-height: 100%;
+    max-width: 100%;
+}
+
+.quiz-question-feedback {
+	font-size: 15px;
+}
+
+.quiz-question-feedback div {
+    display: inline-block;
+	height: 100%;
+}
+
+.quiz-question-correct-feedback:before, .quiz-question-incorrect-feedback:before {
+		                                    content: '';
+		                                    vertical-align: middle;
+		                                    display: inline-block;
+		                                    width: 48px;
+		                                    height: 48px;
+                                        }
+
+.quiz-question-correct-feedback:before {
+	background: url(img/valid_sprites.png) left top no-repeat;
+}
+
+.quiz-question-incorrect-feedback:before {
+	background: url(img/valid_sprites.png) -49px top no-repeat;
+}
+
+.Ldt-Quiz-Correct-Answer:before {
+	background: url(img/min_valid_sprites.png) left top no-repeat;
+}
+
+.Ldt-Quiz-Incorrect-Answer:before {
+	background: url(img/min_valid_sprites.png) -13px top no-repeat;
+}
+
+.Ldt-Quiz-Correct-Answer:before, .Ldt-Quiz-Incorrect-Answer:before {
+		                              content: '';
+		                              vertical-align: middle;
+		                              display: inline-block;
+		                              width: 12px;
+		                              height: 12px;
+                                  }
+
+.Ldt-Quiz-Submit {
+    margin: 10px;
+}
+
+.Ldt-Quiz-Submit .Ldt-Quiz-Submit-Skip-Link {
+    float: left;
+}
+
+.Ldt-Quiz-Submit-Skip-Link a {
+    text-decoration: none;
+    font-size: 16pt;
+}
+
+.Ldt-Quiz-Submit .Ldt-Quiz-Submit-Button {
+    float: right;
+}
+
+.Ldt-Quiz-Votes {
+    display: none;
+    height: 53px;
+    position: relative;
+}
+
+.Ldt-Quiz-Votes-Question {
+    font-size: 16px;
+    position: absolute;
+    top: 2px;
+    left: 0px;
+}
+
+.Ldt-Quiz-Votes-Buttons {
+    position: absolute;
+    bottom: 2px;
+    left: 0px;
+    right: 0px;
+}
+
+.Ldt-Quiz-Votes-Buttons div {
+    display: inline-block;
+    width: 33%;
+    text-align: center;
+}
+
+.Ldt-Quiz-Vote-Skip-Block {
+    width: 30% !important;
+    text-align: right;
+}
+
+.Ldt-Quiz-Vote-Skip-Block a {
+    text-decoration: none;
+}
+
+.Ldt-Quiz-Overlay {
+    position: absolute;
+    top: 0px;
+    background-color: white;
+    z-index: 5;
+    width: 100%;
+    height: 100%;
+}
+
+.Ldt-Pause-Add-Question {
+    background: url(img/quiz_add_question.svg) no-repeat;
+    background-position: center;
+    background-size: contain;
+  	position: absolute;
+    bottom: 40px;
+    right: 0px;
+    height: 15%;
+    width: 15%;
+    max-width: 64px;
+    max-height: 64px;
+    z-index: 10;
+}
+
+.Ldt-Quiz-Result {
+    position: absolute;
+	height: 0px;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    background: #fde073;
+    text-align: center;
+    line-height: 2.5;
+    overflow: hidden;
+    -webkit-box-shadow: 0 0 5px black;
+    -moz-box-shadow:    0 0 5px black;
+    box-shadow:         0 0 5px black;
+}
+
+input[type="button"] {
+    border: none;
+    font-size: 18pt;
+    text-align: center;
+    background-color: #5BCE5B;
+    color: #fff;
+    cursor: pointer;
+}
+
+input[value="Non"] {
+    background-color: #F86060;
+}
+
+input.quiz-question:checked + .quiz-question-label {
+    text-decoration: underline;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/Quiz.js	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,388 @@
+IriSP.Widgets.Quiz = function(player, config) {
+    IriSP.Widgets.Widget.call(this, player, config);
+}
+
+IriSP.Widgets.Quiz.prototype = new IriSP.Widgets.Widget();
+
+IriSP.Widgets.Quiz.prototype.defaults = {
+    // annotation_type: "at_quiz",
+	quiz_activated: true,
+	api_serializer: "ldt_annotate",
+    analytics_api: "",
+    api_method: "POST",
+    user: "",
+    userid:""
+}
+
+IriSP.Widgets.Quiz.prototype.template = '<div class="Ldt-Quiz-Container">'
+	                                    + '<div class="Ldt-Quiz-Header">'
+                                        + '  <div class="Ldt-Quiz-Index"></div><div class="Ldt-Quiz-Score"></div>'
+                                        + '</div>'
+                                        + '<div class="Ldt-Quiz-Content">'
+                                        + '  <h1 class="Ldt-Quiz-Title">{{question}}</h1>'
+                                        + '  <div class="Ldt-Quiz-Questions">'
+                                        + '  </div>'
+                                        + '</div>'
+                                        + '<div class="Ldt-Quiz-Footer">'
+                                        + '  <div class="Ldt-Quiz-Votes">'
+                                        + '      <span class="Ldt-Quiz-Votes-Question">Avez-vous trouvé cette question utile ?</span>'
+                                        + '      <div class="Ldt-Quiz-Votes-Buttons">'
+                                        + '          <div class="Ldt-Quiz-Vote-Skip-Block"><a href="#" class="Ldt-Quiz-Vote-Skip">Passer</a></div>'
+                                        + '          <div><input type="button" value="Non" class="Ldt-Quiz-Vote-Useless" /></div>'
+                                        + '          <div><input type="button" value="Oui" class="Ldt-Quiz-Vote-Useful" /></div>'
+                                        + '      </div>'
+                                        + '  </div>'
+                                        + '  <div class="Ldt-Quiz-Submit">'
+                                        + '      <div class="Ldt-Quiz-Submit-Button"><input type="button" value="Valider" /></div>'
+                                        + '      <div class="Ldt-Quiz-Submit-Skip-Link"><a href="#">Passer</a></div><div style="clear:both;"></div>'
+                                        + '  </div>'
+                                        + '  <div class="Ldt-Quiz-Result">Bonne réponse</div>'
+                                        + '</div>'
+										+ '</div>';
+
+IriSP.Widgets.Quiz.prototype.annotationTemplate = '';
+
+IriSP.Widgets.Quiz.prototype.update = function(annotation) {
+	var _this = this;
+
+	if (this.quiz_activated &&
+		this.correct[annotation.id] != 1 &&
+		this.correct[annotation.id] != 0) {
+
+		_this.quiz_displayed = true;
+
+		//Pause the current video
+		this.media.pause();
+
+		this.annotation = annotation;
+
+		var question = annotation.content.data.question;
+		var answers = annotation.content.data.answers;
+		var resource = annotation.content.data.resource;
+
+		$(".Ldt-Quiz-Votes").hide();
+        $(".Ldt-Pause-Add-Question").hide();
+		$(".Ldt-Quiz-Container .Ldt-Quiz-Title").html(question);
+
+		var i = 0;
+
+		var score = Mustache.to_html('<span class="Ldt-Quiz-Correct-Answer">{{ correctness.0 }}</span> / <span class="Ldt-Quiz-Incorrect-Answer">{{ correctness.1 }}</span>', { correctness: this.globalScore() });
+		$(".Ldt-Quiz-Index").html(Mustache.to_html("Q{{index}}/{{total}}", { index: annotation.number + 1,
+                                                                              total: this.totalAmount }));
+		$(".Ldt-Quiz-Score").html(score);
+		this.question = new IriSP.Widgets.UniqueChoiceQuestion(annotation);
+		this.resource = new IriSP.Widgets.UniqueChoiceQuestion(resource);
+
+		if (annotation.content.data.type == "multiple_choice") {
+			this.question = new IriSP.Widgets.MultipleChoiceQuestion(annotation);
+		this.resource = new IriSP.Widgets.MultipleChoiceQuestion(resource);
+		}
+		else if (annotation.content.data.type == "unique_choice") {
+			this.question = new IriSP.Widgets.UniqueChoiceQuestion(annotation);
+		this.resource = new IriSP.Widgets.UniqueChoiceQuestion(resource);
+		}
+
+		var output = "";
+		for (i = 0; i < answers.length; i++) {
+			output += '<div class="quiz-question-block"><p>' + this.question.renderQuizTemplate(answers[i], i) + '<span class="quiz-question-label">'+ answers[i].content + '</span></p></div>';
+		}
+
+
+		var QR = '';
+		//If there is an attached resource, display it on the resources overlay
+		if (resource != null) {
+            QR = '<div class="quiz-resource-block" id="resource" >' + resource + '</div>';
+        };
+		$(".Ldt-Quiz-Questions").html(QR + output);
+		$(".Ldt-Quiz-Overlay").fadeIn();
+
+		$(".Ldt-Quiz-Submit").fadeIn();
+
+		//Let's automatically check the checkbox/radio if we click on the label
+		$(".quiz-question-label").click(function() {
+            var input = $(this).siblings("input");
+            if (input.prop('checked') && input.prop('type') == 'radio') {
+                // Already checked. Consider a double click on unique question as a validation.
+		        _this.answer();
+            } else {
+                input.prop('checked', !input.prop('checked'));
+            }
+		});
+
+		//In case we click on the first "Skip" link
+		$(".Ldt-Quiz-Submit-Skip-Link").click({media: this.media}, function(event) {
+			_this.hide();
+			_this.player.trigger("QuizCreator.skip");
+			event.data.media.play();
+		});
+	}
+};
+
+IriSP.Widgets.Quiz.prototype.hide = function() {
+	var _this = this;
+
+	$(".Ldt-Quiz-Votes").hide();
+	$(".Ldt-Quiz-Overlay").hide();
+	$(".Ldt-Pause-Add-Question").hide();
+	_this.quiz_displayed = false;
+}
+
+IriSP.Widgets.Quiz.prototype.answer = function() {
+	var _this = this;
+
+    function insert_timecode_links (s) {
+        return (s || "").replace(/\s(\d+:\d+)/, function (match, timecode) {
+            return ' <a href="#t=' + (IriSP.timestamp2ms(timecode) / 1000) + '">' + timecode + '</a>';
+        });
+    };
+
+	var answers = _this.annotation.content.data.answers;
+
+    // Augment answers with the correct feedback
+    var i = 0;
+    var wrong = 0;
+    // Signature is an array giving the answers signature: 1 for checked, 0 for unchecked
+    // We cannot simply store the right answer index, since there may be multiple-choice questions
+    var signature = [];
+    _this.$.find(".Ldt-Quiz-Question-Check").each( function (code) {
+        var checked = $(this).is(":checked");
+        signature.push(checked ? 1 : 0);
+        var ans = answers[i];
+        if ((ans.correct && !checked)
+            || (!ans.correct && checked)) {
+            wrong += 1;
+            IriSP.jQuery(this).parents(".quiz-question-block").append('<div class="quiz-question-feedback quiz-question-incorrect-feedback">'+ insert_timecode_links(ans.feedback) +'</div>');
+        } else {
+            IriSP.jQuery(this).parents(".quiz-question-block").append('<div class="quiz-question-feedback quiz-question-correct-feedback">'+ insert_timecode_links(ans.feedback) +'</div>');
+        }
+        i++;
+    });
+
+	if (wrong) {
+		$(".Ldt-Quiz-Result").html("Mauvaise réponse");
+		$(".Ldt-Quiz-Result").css({"background-color" : "red"});
+		this.correct[this.annotation.id] = 0;
+	} else {
+		$(".Ldt-Quiz-Result").html("Bonne réponse !");
+		$(".Ldt-Quiz-Result").css({"background-color" : "green"});
+		this.correct[this.annotation.id] = 1;
+	}
+
+	$(".Ldt-Quiz-Result").animate({height:"100%"},500, "linear", function() {
+		$(".Ldt-Quiz-Result").delay(2000).animate({ height:"0%" }, 500);
+	});
+
+	var question_number = this.annotation.number + 1;
+	var correctness = this.globalScore();
+	var score = "";
+	score += '<span class="Ldt-Quiz-Correct-Answer">' + correctness[0] +'</span> / <span class="Ldt-Quiz-Incorrect-Answer">' + correctness[1] + '</span>';
+	$(".Ldt-Quiz-Index").html("Q"+ question_number + "/" + this.totalAmount);
+	$(".Ldt-Quiz-Score").html(score);
+
+	this.submit(this.user, this.userid, this.annotation.id, wrong ? 'wrong_answer' : 'right_answer', signature.join(""));
+
+	//Hide the "Validate" button and display the UI dedicated to votes
+	$(".Ldt-Quiz-Submit").fadeOut(400, function () {
+	    $(".Ldt-Quiz-Votes").show();
+    });
+};
+
+IriSP.Widgets.Quiz.prototype.globalScore = function() {
+    // Return 2 variables to know how many right and wrong answers there are
+    var values = _.values(this.correct);
+    var ok = values.filter( function (s) { return s == 1; }).length;
+    var not_ok = values.filter( function (s) { return s == 0; }).length;
+	return [ok, not_ok];
+};
+
+IriSP.Widgets.Quiz.prototype.refresh = function() {
+    var _annotations = this.getWidgetAnnotations().sortBy(function(_annotation) {
+        return _annotation.begin;
+    });
+
+    var _this = this;
+
+	_this.totalAmount = _annotations.length;
+	_this.number = 0;
+	_this.correct = {};
+	_this.keys = {};
+
+    _annotations.forEach(function(_a) {
+		//Fix each annotation as "non-answered yet"
+		_this.correct[_a.id] = -1;
+		_this.keys[_this.number] = _a.id;
+		_a.number = _this.number++;
+    });
+
+}
+
+IriSP.Widgets.Quiz.prototype.draw = function() {
+	var _this = this;
+	_this.quiz_displayed = false;
+    this.onMediaEvent("enter-annotation", function (annotation) {
+        var an = _this.getWidgetAnnotations().filter( function (a) { return a === annotation; });
+        if (an.number === undefined) {
+            _this.refresh();
+        }
+        if (an.length) {
+            _this.update(an[0]);
+        };
+    });
+    this.onMdpEvent("Quiz.activate", function() {
+		_this.quiz_activated = true;
+    });
+
+    this.onMdpEvent("Quiz.deactivate", function() {
+		_this.quiz_activated = false;
+		_this.hide();
+    });
+
+    this.onMdpEvent("Quiz.hide", function() {
+		_this.hide();
+    });
+
+    this.onMdpEvent("Quiz.refresh", function() {
+		_this.refresh();
+    });
+
+    this.onMediaEvent("pause", function() {
+		if (! _this.quiz_displayed) {
+		    $(".Ldt-Pause-Add-Question").show();
+        }
+    });
+
+    this.onMediaEvent("play", function() {
+	   $(".Ldt-Pause-Add-Question").hide();
+    });
+
+    // Add Ldt-Quiz-Overlay widget on top of video player
+	_this.overlay = $("<div class='Ldt-Quiz-Overlay'></div>").appendTo($('#' + _this.container));
+	_this.PauseAddQuestion = $("<div class='Ldt-Pause-Add-Question' title='Ajoutez une question !'>")
+        .on("click", function() { _this.player.trigger("QuizCreator.create"); })
+        .appendTo($('#' + _this.container));
+	_this.overlay.html(this.template);
+
+	$(".Ldt-Quiz-Overlay").hide();
+
+    $(".Ldt-Quiz-Submit input").click(function() {
+		_this.answer();
+    });
+
+	//In case we click on the first "Skip" link
+	$(".Ldt-Quiz-Submit-Skip-Link").click({ media: this.media }, function(event) {
+		_this.submit(_this.user, _this.userid, _this.annotation.id, "skipped_answer", 0);
+		_this.hide();
+		_this.player.trigger("QuizCreator.skip");
+		event.data.media.play();
+	});
+
+    $(".Ldt-Quiz-Votes-Buttons input[type=\"button\"], .Ldt-Quiz-Votes-Buttons a").click({media: this.media}, function(event) {
+		var vote_prop, vote_val;
+
+		if ($(this).hasClass("Ldt-Quiz-Vote-Useful")) {
+			vote_prop = "useful";
+			vote_val = 1;
+		} else if ($(this).hasClass("Ldt-Quiz-Vote-Useless")) {
+			vote_prop = "useless";
+			vote_val = -1;
+
+			$(".Ldt-Ctrl-Quiz-Create").addClass("button_highlight").delay(5000).queue(function() {
+                $(this).removeClass("button_highlight").dequeue();
+            });
+		}else{
+			vote_prop = "skipped_vote";
+			vote_val = 0;
+		}
+
+		_this.submit(_this.user, _this.userid, _this.annotation.id, vote_prop, vote_val);
+
+		//Resume the current video
+		event.data.media.play();
+
+		_this.hide();
+		$(".Ldt-Pause-Add-Question").hide();
+
+		_this.player.trigger("QuizCreator.skip");
+	});
+
+    _this.refresh();
+};
+
+//Generates uid
+//source : http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
+IriSP.Widgets.Widget.prototype.generateUid = function () {
+    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
+        var r = Math.random()*16|0, v = c === 'x' ? r : (r&0x3|0x8);
+        return v.toString(16);
+    });
+}
+
+//UniqueChoice Question
+IriSP.Widgets.UniqueChoiceQuestion = function(annotation) {
+    this.annotation = annotation;
+}
+
+IriSP.Widgets.UniqueChoiceQuestion.prototype = new IriSP.Widgets.Widget();
+
+IriSP.Widgets.UniqueChoiceQuestion.prototype.renderQuizTemplate = function(answer, identifier) {
+	return '<input type="radio" class="quiz-question Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-' + identifier + '" name="question" data-question="' + identifier + '" value="' + identifier + '" />';
+}
+
+IriSP.Widgets.UniqueChoiceQuestion.prototype.renderTemplate = function(answer, identifier) {
+	var id = this.generateUid();
+	return '<input type="radio" id="' + id + '" class="quiz-question-edition Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+ identifier +'" name="question" data-question="'+ identifier +'" value="' + identifier + '" /><label for="'+ id +'" title="Veuillez sélectionner la réponse correcte"></label>';
+}
+
+IriSP.Widgets.UniqueChoiceQuestion.prototype.renderFullTemplate = function(answer, identifier) {
+	var correct = (answer && answer.correct) ? "checked" : "";
+	var id = this.generateUid();
+	return '<input type="radio" id="'+ id +'" '+ correct +' class="quiz-question-edition Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+ identifier +'" name="question" data-question="'+ identifier +'" value="' + identifier + '" /><label for="'+ id +'"></label>';
+}
+
+
+//MultipleChoice Question
+IriSP.Widgets.MultipleChoiceQuestion = function(annotation) {
+    this.annotation = annotation;
+}
+
+IriSP.Widgets.MultipleChoiceQuestion.prototype = new IriSP.Widgets.Widget();
+
+IriSP.Widgets.MultipleChoiceQuestion.prototype.renderQuizTemplate = function(answer, identifier) {
+	return '<input type="checkbox" class="quiz-question Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+ identifier + '" name="question['+ identifier +']" data-question="'+ identifier +'" value="' + identifier + '" /> ';
+}
+
+IriSP.Widgets.MultipleChoiceQuestion.prototype.renderTemplate = function(answer, identifier) {
+	var id = this.generateUid();
+	return '<input type="checkbox" id="'+ id +'" class="quiz-question-edition Ldt-Quiz-Question-Check" name="question['+ identifier +']" data-question="'+ identifier +'" value="' + identifier + '" /><label for="'+ id +'" title="Veuillez sélectionner la ou les réponses correctes"></label>';
+}
+
+IriSP.Widgets.MultipleChoiceQuestion.prototype.renderFullTemplate = function(answer, identifier) {
+	var correct = (answer && answer.correct) ? "checked" : "";
+	var id = this.generateUid();
+	return '<input type="checkbox" id="'+ id +'" '+ correct +' class="quiz-question-edition Ldt-Quiz-Question-Check" name="question['+ identifier +']" data-question="'+ identifier +'" value="' + identifier + '" /><label for="'+ id +'"></label> ';
+}
+
+IriSP.Widgets.Quiz.prototype.submit = function(user,user_id,question,prop,val) {
+    var _this = this;
+	var _url = Mustache.to_html(this.analytics_api, {id: this.source.projectId}),
+	donnees = {
+			"username": user,
+			"useruuid": user_id,
+			"subject": question,
+			"property": prop,
+		    "value": val,
+            "session": _this.session_id
+		};
+
+	IriSP.jQuery.ajax({
+        url: _url,
+        type: this.api_method,
+        contentType: 'application/json',
+        data: JSON.stringify(donnees),
+        success: function(_data) {
+        },
+        error: function(_xhr, _error, _thrown) {
+            IriSP.log("Error when sending annotation", _thrown);
+        }
+    });
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/QuizCreator.css	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,75 @@
+.Ldt-QuizCreator-Ui {
+	width: 100%;
+	padding: 10px;
+}
+
+.Ldt-QuizCreator-Form {
+	width: 100%;
+}
+
+.Ldt-QuizCreator-Question-Type {
+}
+
+.Ldt-QuizCreator-Question-Area,
+.Ldt-QuizCreator-Resource-Area {
+    width: calc(100% - 20px);
+}
+
+.Ldt-QuizCreator-Questions-Block {
+	width: 100%;
+}
+
+.Ldt-QuizCreator-Questions-Answer {
+	margin-top: 5px;
+	border-top: 1px solid black;
+}
+
+.Ldt-QuizCreator-Questions-Answer div {
+	display: inline-block;
+	vertical-align: middle;
+}
+
+.Ldt-QuizCreator-Questions-Answer-Content {
+	width: calc(100% - 80px);
+}
+
+.Ldt-QuizCreator-Questions-Answer-Content input, .Ldt-QuizCreator-Questions-Answer-Content textarea {
+	width: calc(100% - 20px);
+}
+
+.Ldt-QuizCreator-Questions-Answer-Time input {
+	width: 60px;
+}
+
+.Ldt-QuizCreator-Questions-Answer-Delete {
+	width: 15px;
+	height: 15px;
+}
+
+.Ldt-QuizCreator-Remove {
+	width: 15px;
+	height: 15px;
+    margin-left: 8px;
+	cursor: pointer;
+    background: url(img/delete.png);
+}
+
+input.quiz-question-edition {
+    display: none;
+}
+
+input.quiz-question-edition[type='radio'] + label,
+input.quiz-question-edition[type='checkbox'] + label {
+	height: 12px;
+	width: 24px;
+	display: inline-block;
+	background: url(img/min_wrong_toggle.png);
+	cursor: pointer;
+    content: "Mauvaise";
+}
+
+input.quiz-question-edition[type='radio']:checked + label,
+input.quiz-question-edition[type='checkbox']:checked + label {
+	background: url(img/min_right_toggle.png);
+    content: "Bonne";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/QuizCreator.js	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,306 @@
+/* TODO: Add Social Network Sharing */
+
+IriSP.Widgets.QuizCreator = function(player, config) {
+    var _this = this;
+    IriSP.Widgets.Widget.call(this, player, config);
+};
+
+IriSP.Widgets.QuizCreator.prototype = new IriSP.Widgets.Widget();
+
+IriSP.Widgets.QuizCreator.prototype.defaults = {
+    creator_name : "",
+    tags : false,
+    tag_titles : false,
+    pause_on_write : true,
+    annotation_type: "Quiz",
+    api_serializer: "ldt_annotate",
+    api_endpoint_template: "",
+    api_method: "POST"
+};
+
+IriSP.Widgets.QuizCreator.prototype.messages = {
+    en: {
+    },
+    fr: {
+    }
+};
+
+IriSP.Widgets.QuizCreator.prototype.template =
+	  '<div class="Ldt-QuizCreator-Ui Ldt-TraceMe">'
+	+	'<div class="Ldt-QuizCreator-Question-Form">'
+	+		'<textarea class="Ldt-QuizCreator-Question-Area" placeholder="Votre question"></textarea><br />'
+	+		'<textarea class="Ldt-QuizCreator-Resource-Area" placeholder="Ressources (lien vers une image, etc.)"></textarea><br />'
+	+	'</div>'
+	+		'<p>Type de question  '
+	+ 		'<select name="type" class="Ldt-QuizCreator-Question-Type">'
+	+			'<option value="unique_choice">Choix unique</option>'
+	+			'<option value="multiple_choice">Choix multiple</option>'
+	+		'</select>'
+	+		' à <input type="text" placeholder="hh:mm:ss" size="6" class="Ldt-QuizCreator-Time" />'
+	+ 	'<div class="Ldt-QuizCreator-Questions-Block">'
+	+ 	'</div>'
+	+	'<div>'
+    +   '  <button class="Ldt-QuizCreator-Question-Add">Ajouter une réponse</button><hr>'
+    +   '  <button class="Ldt-QuizCreator-Question-Save">Sauvegarder</button>'
+    +   '</div>'
+	+ '</div>';
+
+/* Hide and clear the interface is case of someone skipped or answer the current question in the Quiz panel*/
+IriSP.Widgets.QuizCreator.prototype.skip = function() {
+	this.$.find(".Ldt-QuizCreator-Time").val("");
+	this.$.find(".Ldt-QuizCreator-Question-Area").val("");
+	this.$.find(".Ldt-QuizCreator-Resource-Area").val("");
+	this.$.find(".Ldt-QuizCreator-Questions-Block").html("");
+    this.current_annotation = undefined;
+};
+
+IriSP.Widgets.QuizCreator.prototype.nbAnswers = function(){
+	var numItems = this.$.find('.Ldt-QuizCreator-Questions-Answer').length;
+	return numItems;
+};
+
+IriSP.Widgets.QuizCreator.prototype.draw = function() {
+	var _this = this;
+
+    this.onMediaEvent("timeupdate", function(_time) {
+    	_this.setBegin(_time);
+    });
+
+	this.onMdpEvent("QuizCreator.show", function() {
+		_this.setBegin(_this.media.currentTime);
+    });
+
+	this.onMdpEvent("QuizCreator.create", function() {
+		_this.skip();
+		_this.setBegin(_this.media.currentTime);
+    });
+
+    this.onMdpEvent("QuizCreator.skip", function() {
+		_this.skip();
+    });
+
+    this.onMdpEvent("QuizCreator.edit", function (_annotation) {
+		_this.skip();
+        _this.addQuestion(_annotation);
+    });
+
+	this.$.on("click", ".Ldt-QuizCreator-Remove", function() {
+        $(this).parents(".Ldt-QuizCreator-Questions-Answer").remove();
+	});
+
+    this.begin = new IriSP.Model.Time();
+    this.end = this.source.getDuration();
+	this.answers = [];
+
+    this.renderTemplate();
+
+	/* Quiz creator */
+
+	this.question = new IriSP.Widgets.UniqueChoiceQuestion();
+
+	this.$.find(".Ldt-QuizCreator-Question-Type").bind("change", this.functionWrapper("onQuestionTypeChange"));
+	this.$.find(".Ldt-QuizCreator-Question-Add").bind("click", this.functionWrapper("onQuestionAdd"));
+	this.$.find(".Ldt-QuizCreator-Question-Save").bind("click", this.functionWrapper("onSave"));
+
+	this.$.find(".Ldt-QuizCreator-Time").keyup(function() {
+		var str = _this.$.find(".Ldt-QuizCreator-Time").val();
+		_this.begin = IriSP.timestamp2ms(str);
+		_this.end = _this.begin + 1000;
+	});
+
+    this.onMediaEvent("timeupdate", function(_time) {
+        // Do not update timecode if description is not empty
+        if (_this.getDescription()) {
+            _this.setBegin(_time);
+        };
+    });
+};
+
+IriSP.Widgets.QuizCreator.prototype.getDescription = function() {
+    return this.$.find(".Ldt-QuizCreator-Question-Area").val().trim();
+};
+
+IriSP.Widgets.QuizCreator.prototype.addQuestion = function(annotation, number) {
+    var _this = this;
+
+	if (annotation.content.data.type == "multiple_choice") {
+		this.question = new IriSP.Widgets.MultipleChoiceQuestion(annotation);
+	}
+	else if (annotation.content.data.type == "unique_choice") {
+		this.question = new IriSP.Widgets.UniqueChoiceQuestion(annotation);
+	}
+
+	var answers = annotation.content.data.answers;
+
+	this.answers = [];
+
+
+	this.$.find(".Ldt-QuizCreator-Time").val(annotation.begin);
+	this.$.find(".Ldt-QuizCreator-Question-Area").val(annotation.content.data.question);
+	this.$.find(".Ldt-QuizCreator-Resource-Area").val(annotation.content.data.resource);
+	this.$.find(".Ldt-QuizCreator-Questions-Block").html('');
+    answers.forEach( function (ans) {
+        _this.onQuestionAdd(null, ans);
+    });
+    _this.current_annotation = annotation;
+};
+
+IriSP.Widgets.QuizCreator.prototype.onQuestionTypeChange = function(e) {
+
+    var _field = this.$.find(".Ldt-QuizCreator-Question-Type");
+    var _contents = _field.val();
+
+	var _this = this;
+	switch(_contents) {
+		case "unique_choice":
+			this.question = new IriSP.Widgets.UniqueChoiceQuestion();
+		break;
+
+		case "multiple_choice":
+			this.question = new IriSP.Widgets.MultipleChoiceQuestion();
+		break;
+	}
+
+	var output = "";
+
+	_this.$.find(".Ldt-QuizCreator-Questions-Block").html(output);
+
+    this.pauseOnWrite();
+};
+
+// Either e !== undefined, then it has been called by the interface and answer === undefined, generate an empty form.
+// Or e === null && answer !== undefined, an existing answer is provided.
+IriSP.Widgets.QuizCreator.prototype.onQuestionAdd = function(e, answer) {
+	var output = '<div class="Ldt-QuizCreator-Questions-Answer">'
+		+	'Réponse <div class="Ldt-QuizCreator-Questions-Answer-Correct">'+ this.question.renderFullTemplate(answer, this.nbAnswers()) +'</div><br />'
+		+ 	'<div class="Ldt-QuizCreator-Questions-Answer-Content">'
+		+		'<input type="text" class="Ldt-QuizCreator-Answer-Content" data-question="'+ this.nbAnswers() +'" id="question'+ this.nbAnswers() + '"' +  (answer ? ' value="'+ answer.content + '"' : "") + '/><br />'
+		+		'Commentaire <br/><textarea class="Ldt-QuizCreator-Answer-Feedback" data-question="'+ this.nbAnswers() +'" id="feedback'+ this.nbAnswers() +'">' + (answer ? answer.feedback : "") + '</textarea>'
+		+	'</div>'
+		+ 	'<div class="Ldt-QuizCreator-Questions-Answer-Delete"><div class="Ldt-QuizCreator-Remove">&nbsp;</div></div>'
+		+	'</div>';
+	this.$.find(".Ldt-QuizCreator-Questions-Block").append(output);
+	this.$.find(".Ldt-QuizCreator-Answer-Content").last().focus();
+
+    this.pauseOnWrite();
+};
+
+IriSP.Widgets.QuizCreator.prototype.pauseOnWrite = function() {
+    if (this.pause_on_write && !this.media.getPaused()) {
+        this.media.pause();
+    }
+};
+
+IriSP.Widgets.QuizCreator.prototype.setBegin = function (t) {
+    this.begin = new IriSP.Model.Time(t || 0);
+	this.end = this.begin + 500;
+    this.$.find(".Ldt-QuizCreator-Time").val(this.begin.toString());
+};
+
+IriSP.Widgets.QuizCreator.prototype.get_local_annotation = function (ident) {
+    return this.player.getLocalAnnotation(ident);
+};
+
+IriSP.Widgets.QuizCreator.prototype.save_local_annotations = function() {
+    this.player.saveLocalAnnotations();
+    // Merge modifications into widget source
+    this.source.merge(this.player.localSource);
+};
+
+IriSP.Widgets.QuizCreator.prototype.delete_local_annotation = function(ident) {
+    this.source.getAnnotations().removeId(ident);
+    this.player.deleteLocalAnnotation(ident);
+    this.current_annotation = undefined;
+    this.refresh(true);
+};
+
+IriSP.Widgets.QuizCreator.prototype.show = function() {
+	this.$.find(".Ldt-QuizCreator-Question-Area").focus();
+};
+
+IriSP.Widgets.QuizCreator.prototype.hide = function() {
+	this.$.find(".Ldt-QuizCreator-Questions-Block").html("");
+	this.$.find(".Ldt-QuizCreator-Question-Area").val("");
+	this.$.find(".Ldt-QuizCreator-Resource-Area").val("");
+	this.$.find(".Ldt-QuizCreator-Time").val("");
+};
+
+/* Save a local annotation */
+IriSP.Widgets.QuizCreator.prototype.onSave = function(event, should_publish) {
+    // Either the annotation already exists (then we overwrite its
+    // content) or it must be created.
+    var is_created = false;
+
+	if (this.nbAnswers() <= 0) {
+		alert("Vous devez spécifier au moins une réponse à votre question !");
+		return false;
+	};
+    // Check that there is at least 1 valid answer
+    if (! this.$.find(".quiz-question-edition:checked").length) {
+        alert("Vous n'avez pas indiqué de bonne réponse.");
+        return false;
+    };
+    var _annotation;
+    if (this.current_annotation) {
+        is_created = false;
+        _annotation = this.current_annotation;
+    } else {
+        is_created = true;
+        var _annotationTypes = this.source.getAnnotationTypes().searchByTitle(this.annotation_type, true), /* Récupération du type d'annotation dans lequel l'annotation doit être ajoutée */
+        _annotationType = (_annotationTypes.length ? _annotationTypes[0] : new IriSP.Model.AnnotationType(false, this.player.localSource)); /* Si le Type d'Annotation n'existe pas, il est créé à la volée */
+
+        /* Si nous avons dû générer un ID d'annotationType à la volée... */
+        if (!_annotationTypes.length) {
+            /* Il ne faudra pas envoyer l'ID généré au serveur */
+            _annotationType.dont_send_id = true;
+            /* Il faut inclure le titre dans le type d'annotation */
+            _annotationType.title = this.annotation_type;
+        }
+
+        _annotation = new IriSP.Model.Annotation(false, this.player.localSource); /* Création d'une annotation dans cette source avec un ID généré à la volée (param. false) */
+
+        // Initialize some fields in case of creation
+        _annotation.created = new Date(); /* Date de création de l'annotation */
+        _annotation.creator = this.creator_name;
+        _annotation.setAnnotationType(_annotationType.id); /* Id du type d'annotation */
+        this.player.localSource.getMedias().push(this.source.currentMedia);
+        _annotation.setMedia(this.source.currentMedia.id); /* Id du média annoté */
+    }
+
+    /*
+     * Nous remplissons les données de l'annotation
+     * */
+    _annotation.setBeginEnd(this.begin, this.end);
+    _annotation.modified = new Date(); /* Date de modification de l'annotation */
+    _annotation.contributor = this.creator_name;
+    _annotation.description = this.getDescription();
+    _annotation.title = _annotation.description;
+	_annotation.content = {};
+	_annotation.content.data = {};
+	_annotation.content.data.type = this.$.find(".Ldt-QuizCreator-Question-Type").val();
+	_annotation.content.data.question = _annotation.description;
+	_annotation.content.data.resource = this.$.find(".Ldt-QuizCreator-Resource-Area").val();
+    _annotation.content.data.answers = $.makeArray($(".Ldt-QuizCreator-Questions-Answer")
+                                                   .map(function (ans)
+                                                        {
+                                                            return {
+                                                                content: $(this).find(".Ldt-QuizCreator-Answer-Content").val(),
+                                                                feedback: $(this).find(".Ldt-QuizCreator-Answer-Feedback").val(),
+                                                                correct: $(this).find(".Ldt-Quiz-Question-Check").is(':checked')
+                                                            };
+                                                        }));
+    this.current_annotation = _annotation;
+    if (is_created) {
+        // Add the annotation to the localSource
+        this.player.addLocalAnnotation(_annotation);
+        // Update also the remote source
+        this.source.merge([ _annotation ]);
+        this.player.trigger("Annotation.create", _annotation);
+    } else {
+        // Update the annotation
+        this.player.saveLocalAnnotations();
+        this.player.trigger("Annotation.update", _annotation);
+    };
+    this.player.trigger("AnnotationsList.update"); /* On force le rafraîchissement des widgets AnnotationsList */
+    this.player.trigger("Quiz.refresh"); /* On force le rafraîchissement des widgets Quiz */
+};
--- a/server/src/remie/static/remie/metadataplayer/Segments.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Segments.js	Fri Oct 02 10:24:23 2015 +0200
@@ -30,13 +30,15 @@
     + 'style="top:{{top}}px; height:{{height}}px; left:{{left}}px; width:{{width}}px; background:{{medcolor}}" data-base-color="{{color}}" data-low-color="{{lowcolor}}" data-medium-color="{{medcolor}}"></div>';
 
 
-IriSP.Widgets.Segments.prototype.draw = function() {
-    this.onMediaEvent("timeupdate", "onTimeupdate");
-    this.renderTemplate();
-    
+IriSP.Widgets.Segments.prototype.do_draw = function (isRedraw) {
+    if (this.width != this.$.parent().width()) {
+        // Reset width
+        this.width = this.$.parent().width();
+        this.$.css({ width : this.width + "px" });
+    }
     var _list = this.getWidgetAnnotations().filter(function(_ann) {
-            return _ann.getDuration() > 0;
-        }),
+        return _ann.getDuration() > 0;
+    }),
         _this = this,
         _scale = this.width / this.source.getDuration(),
         list_$ = this.$.find('.Ldt-Segments-List'),
@@ -54,7 +56,11 @@
         }
         return "#" + res;
     }
-    
+
+    if (isRedraw) {
+        // Remove all previous elements before recreating them. Not very efficient.
+        this.$.find('.Ldt-Segments-Segment').remove();
+    }
     _list.forEach(function(_annotation, _k) {
         var _left = _annotation.begin * _scale,
             _width = ( _annotation.getDuration() ) * _scale,
@@ -139,7 +145,8 @@
         	uri: (typeof _annotation.url !== "undefined" 
                 ? _annotation.url
                 : (document.location.href.replace(/#.*$/,'') + '#id='  + _annotation.id)),
-            image: _annotation.thumbnail
+            image: _annotation.thumbnail,
+            text: '[' + _annotation.begin.toString() + '] ' + _annotation.title
         });
         _annotation.on("select", function() {
             _this.$segments.each(function() {
@@ -184,9 +191,17 @@
         background : this.background,
         margin: "1px 0"
     });
-    if (!this.no_tooltip){
-        this.insertSubwidget(
-            this.$.find(".Ldt-Segments-Tooltip"),
+    this.$segments = this.$.find('.Ldt-Segments-Segment');
+};
+
+IriSP.Widgets.Segments.prototype.draw = function() {
+    var widget = this;
+    widget.onMediaEvent("timeupdate", "onTimeupdate");
+    widget.renderTemplate();
+    widget.do_draw();
+    if (!this.no_tooltip) {
+        widget.insertSubwidget(
+            widget.$.find(".Ldt-Segments-Tooltip"),
             {
                 type: "Tooltip",
                 min_x: 0,
@@ -194,18 +209,18 @@
             },
             "tooltip"
         );
-    }
-    this.$segments = this.$.find('.Ldt-Segments-Segment');
-    this.source.getAnnotations().on("search", function() {
+    };
+    widget.source.getAnnotations().on("search", function() {
         searching = true;
     });
-    this.source.getAnnotations().on("search-cleared", function() {
+    widget.source.getAnnotations().on("search-cleared", function() {
         searching = false;
         _this.$segments.each(function() {
             var _segment = IriSP.jQuery(this);
             _segment.css("background", _segment.attr("data-medium-color")).removeClass("found");
         });
     });
+    this.$.on("resize", function () { widget.do_draw(true); });
 };
 
 IriSP.Widgets.Segments.prototype.onTimeupdate = function(_time) {    
--- a/server/src/remie/static/remie/metadataplayer/Shortcuts.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Shortcuts.js	Fri Oct 02 10:24:23 2015 +0200
@@ -6,7 +6,7 @@
  * Keyboard shortcuts widget
  * This widgets add global shortcuts for common actions.
  * The default shortcuts are: 
- * - Escape or Control-space for play/pause
+ * - Control-space for play/pause
  * - Control-left for rewind (+shift to go faster)
  * - Control-right for forward (+shift to go faster)
  */
@@ -21,7 +21,7 @@
     var  _this = this;
     
     /* Standard shortcuts */
-    Mousetrap.bindGlobal(["esc", "ctrl+space"], function (e) {
+    Mousetrap.bindGlobal("ctrl+space", function (e) {
         e.preventDefault();
         if (! _this.media.getPaused()) {
             _this.media.pause();
@@ -54,5 +54,11 @@
         _this.media.setCurrentTime(Math.min(_this.media.duration, _this.media.getCurrentTime() + 5 * _this.time_increment));
         return false;
     });
+    Mousetrap.bindGlobal("ctrl+a", function (e) {
+        // Annotate
+        e.preventDefault();
+        _this.player.trigger("CreateAnnotation.toggle");
+        return false;
+    });
 
 };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/SlidePreview.css	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,43 @@
+.Ldt-SlidePreview-Container {
+    background-color: #999;
+    left: 0px;
+    right: 0px;
+    height: 36px;
+    padding-left: 4px;
+    overflow: hidden;
+}
+.Ldt-SlidePreview-Slides {
+    display: -webkit-inline-flex;
+    display: inline-flex;
+    -webkit-flex-direction: row;
+    flex-direction:         row;
+    -webkit-flex-wrap: nowrap;
+    flex-wrap:         nowrap;
+    overflow-x: hidden;
+    left: 0px;
+    right: 0px;
+    height: 36px;
+    padding: 0;
+    padding-top: 12px;
+    margin: 0;
+    overflow-y: hidden;
+}
+.Ldt-SlidePreview-Item {
+    display: inline-block;
+    width: 20px;
+    height: 12px;
+    background-color: #fff;
+    transition: transform .2s ease-in-out;
+}
+.Ldt-SlidePreview-Item img {
+    max-width: 100%;
+    max-height: 100%;
+}
+.Ldt-SlidePreview-Item:hover {
+    -webkit-transform: scale(2.8);
+    z-index: 4;
+}
+.Ldt-SlidePreview-Item:hover + .slidepreviewitem {
+    -webkit-transform: scale(1.8);
+    z-index: 1;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/SlidePreview.js	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,38 @@
+IriSP.Widgets.SlidePreview = function(player, config) {
+    IriSP.Widgets.Widget.call(this, player, config);
+}
+
+IriSP.Widgets.SlidePreview.prototype = new IriSP.Widgets.Widget();
+
+IriSP.Widgets.SlidePreview.prototype.defaults = {
+    annotation_type: "Slides"
+}
+
+IriSP.Widgets.SlidePreview.prototype.template = '<div class="Ldt-SlidePreview-Container"><div class="Ldt-SlidePreview-Slides"></div></div>';
+
+IriSP.Widgets.SlidePreview.prototype.annotationTemplate = '<div data-id="{{ id }}" data-timecode="{{ ms }}" class="Ldt-SlidePreview-Item"><img title="{{ begin }} - {{ atitle }}" class="Ldt-AnnotationsList-Thumbnail" src="{{ thumbnail }}"></div>';
+
+IriSP.Widgets.SlidePreview.prototype.draw = function() {
+    var _annotations = this.getWidgetAnnotations().sortBy(function(_annotation) {
+        return _annotation.begin;
+    });
+    var _this = this;
+    _this.renderTemplate();
+    var content = _this.$.find('.Ldt-SlidePreview-Slides');
+
+    this.getWidgetAnnotations().forEach(function(_a) {
+        var _data = {
+            id : _a.id,
+            content : IriSP.textFieldHtml(_a.title),
+            begin : _a.begin.toString(),
+            ms: _a.begin.milliseconds,
+            thumbnail: _a.thumbnail
+            };
+        var _html = Mustache.to_html(_this.annotationTemplate, _data);
+        var _el = IriSP.jQuery(_html);
+        content.append(_el);
+    });
+    _this.$.on("click", ".Ldt-SlidePreview-Item", function () {
+        _this.media.setCurrentTime(Number(this.dataset.timecode));
+    });
+};
--- a/server/src/remie/static/remie/metadataplayer/SlideVideoPlayer.css	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/SlideVideoPlayer.css	Fri Oct 02 10:24:23 2015 +0200
@@ -1,23 +1,56 @@
-/* Empty for now */
-
 .Ldt-SlideVideoPlayer-panel {
+    display: -webkit-flex;
     display: flex;
     width: 50%;
     float: left;
 }
 
 .Ldt-SlideVideoPlayer {
-    min-height: 400px;
-    max-height: 100%;
-}
-
-.Ldt-SlideVideoPlayer {
     width: 100%;
     max-width: 100%;
     height: 100%;
     max-height: 100%;
 }
 
+.Ldt-SlideVideoPlayer-pip-main {
+    position: relative;
+    width: 100%;
+    height: 100%;
+    top: 0px;
+    left: 0px;
+    right: 0px;
+    bottom: 0px;
+    z-index: 1;
+}
+
+.Ldt-SlideVideoPlayer-pip-pip {
+    position: absolute;
+    width: 30%;
+    height: 30%;
+    right: 2px;
+    bottom: 2px;
+    z-index: 3;
+}
+
 .Ldt-SlideVideoPlayer h2 {
     display: none;
 }
+.Ldt-SlideVideoPlayer-pip-menu {
+    position: absolute;
+    top: 0px;
+    right: 0px;
+    z-index: 10;
+    display: none;
+}
+.Ldt-SlideVideoPlayer-pip-pip:hover .Ldt-SlideVideoPlayer-pip-menu {
+    background-color: #000;
+    opacity: .5;
+    display: inline-block;
+}
+
+.Ldt-SlideVideoPlayer-pip-menu-toggle {
+    width: 18px;
+    height: 18px;
+    cursor: pointer;
+    background-image: url(img/pip_toggle.svg);
+}
--- a/server/src/remie/static/remie/metadataplayer/SlideVideoPlayer.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/SlideVideoPlayer.js	Fri Oct 02 10:24:23 2015 +0200
@@ -7,12 +7,16 @@
 
 
 IriSP.Widgets.SlideVideoPlayer.prototype.defaults = {
+    playerModule: "HtmlPlayer",
+    // mode is either "sidebyside" or "pip"
+    mode: "sidebyside"
 };
 
 IriSP.Widgets.SlideVideoPlayer.prototype.template = '<div class="Ldt-SlideVideoPlayer">\
-<div class="Ldt-SlideVideoPlayer-slide Ldt-SlideVideoPlayer-panel">\
-</div>\
-<div class="Ldt-SlideVideoPlayer-video Ldt-SlideVideoPlayer-panel"></div>\
+  <div class="Ldt-SlideVideoPlayer-slide Ldt-SlideVideoPlayer-panel">\
+  </div>\
+  <div class="Ldt-SlideVideoPlayer-video Ldt-SlideVideoPlayer-panel">\
+  </div>\
 </div>';
 
 IriSP.Widgets.SlideVideoPlayer.prototype.draw = function() {
@@ -23,24 +27,60 @@
         _this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-slide"),
             {
                 type: "ImageDisplay",
-                annotation_type: _this.annotation_type,
-                width: '100%'
+                annotation_type: _this.annotation_type
             },
             "slide"
         );
     this.insertSubwidget(
         _this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video"),
             {
-                type: "HtmlPlayer",
+                type: _this.playerModule,
                 video: _this.video,
                 width: '100%',
                 url_transform: _this.url_transform
             },
             "player"
-        );
-    // FIXME: this should be better implemented through a signal sent
-    // when widgets are ready (and not just loaded)
-    window.setTimeout(function () {
-        _this.$.find(".Ldt-SlideVideoPlayer").split({ orientation: 'vertical' });
-    }, 1000);
+    );
+
+    if (_this.mode == 'pip') {
+        _this.$.find(".Ldt-SlideVideoPlayer-panel").append('<div class="Ldt-SlideVideoPlayer-pip-menu"><div class="Ldt-SlideVideoPlayer-pip-menu-toggle"></div></div>');
+        _this.$.on("click", ".Ldt-SlideVideoPlayer-pip-menu-toggle", function () {
+            _this.toggleMainDisplay();
+        });
+        window.setTimeout(function () {
+            _this.setMainDisplay('video');
+        }, 1500);
+    } else {
+        // Default : side by side
+        // FIXME: this should be better implemented through a signal sent
+        // when widgets are ready (and not just loaded)
+        window.setTimeout(function () {
+            _this.$.find(".Ldt-SlideVideoPlayer").touchSplit({ orientation: (screen.height > screen.width) ? 'vertical' : 'horizontal',
+                                                               leftMin: 20,
+                                                               topMin: 20
+                                                             });
+        }, 1500);
+    }
+};
+
+IriSP.Widgets.SlideVideoPlayer.prototype.toggleMainDisplay = function() {
+    if (this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video").hasClass("Ldt-SlideVideoPlayer-pip-main")) {
+        this.setMainDisplay('slides');
+    } else {
+        this.setMainDisplay('video');
+    }
+};
+
+// Set main display (in case of a "switch" display mode)
+// main is either 'video' or 'slides'
+IriSP.Widgets.SlideVideoPlayer.prototype.setMainDisplay = function(video_or_slides) {
+    var main = this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video");
+    var pip = this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-slide");
+    if (video_or_slides == 'slides') {
+        var temp = main;
+        main = pip;
+        pip = temp;
+    };
+    main.removeClass('Ldt-SlideVideoPlayer-pip-pip').addClass('Ldt-SlideVideoPlayer-pip-main');
+    pip.removeClass('Ldt-SlideVideoPlayer-pip-main').addClass('Ldt-SlideVideoPlayer-pip-pip');
 }
--- a/server/src/remie/static/remie/metadataplayer/Slider.css	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Slider.css	Fri Oct 02 10:24:23 2015 +0200
@@ -1,11 +1,18 @@
 /* Slider Widget */
 
 .Ldt-Slider {
-    border: none; border-radius: 0; padding: 0; margin: 0; background: #B6B8B8;
+    border: none;
+    border-radius: 0;
+    padding: 0;
+    margin: 0;
+    background: #B6B8B8;
 }
 
 .Ldt-Slider .ui-slider-handle {
-    border-radius: 8px; top: -2px; background: #fc00ff; border: 1px solid #ffffff;
+    border-radius: 8px;
+    top: -2px;
+    background: #fc00ff;
+    border: 1px solid #ffffff;
 }
 
 .Ldt-Slider .ui-slider-range {
@@ -13,7 +20,19 @@
 }
 
 .Ldt-Slider-Time {
-    position: absolute; top: -16px; background: #ffffc0; color: #000000; border-radius: 3px; z-index: 8;
-    font-size: 10px; width: 34px; border: 1px solid #999999; padding: 1px; margin-left: -20px;
-    display: none; text-align: center; font-weight: bold; pointer-events: none;
+    position: absolute;
+    bottom: 32px;
+    background: #ffffc0;
+    color: #000000;
+    border-radius: 3px;
+    z-index: 8;
+    font-size: 10px;
+    width: 34px;
+    border: 1px solid #999999;
+    padding: 1px;
+    margin-left: -20px;
+    display: none;
+    text-align: center;
+    font-weight: bold;
+    pointer-events: none;
 }
--- a/server/src/remie/static/remie/metadataplayer/Slider.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Slider.js	Fri Oct 02 10:24:23 2015 +0200
@@ -19,15 +19,15 @@
     '<div class="Ldt-Slider"></div><div class="Ldt-Slider-Time">00:00</div>';
 
 IriSP.Widgets.Slider.prototype.draw = function() {
-    
+
     this.renderTemplate();
-    
+
     this.$time = this.$.find(".Ldt-Slider-Time");
-    
+
     this.$slider = this.$.find(".Ldt-Slider");
-    
+
     var _this = this;
-    
+
     this.$slider.slider({
         range: "min",
         value: 0,
@@ -38,22 +38,22 @@
             _this.player.trigger("Mediafragment.setHashToTime");
         }
     });
-    
+
     this.$handle = this.$slider.find('.ui-slider-handle');
-    
+
     this.onMediaEvent("timeupdate","onTimeupdate");
     this.onMdpEvent("Player.MouseOver","onMouseover");
     this.onMdpEvent("Player.MouseOut","onMouseout");
-    
+
     if (this.minimize_timeout) {
         this.$slider.css(this.calculateSliderCss(this.minimized_height));
         this.$handle.css(this.calculateHandleCss(this.minimized_height));
-        
+
         this.maximized = false;
         this.timeoutId = false;
     }
-    
-    this.$
+
+    this.$slider
         .mouseover(function() {
             _this.$time.show();
             _this.onMouseover();
@@ -128,6 +128,6 @@
     return {
         height: (2 + _size) + "px",
         width: (2 + _size) + "px",
-        "margin-left": -Math.ceil(2 + _size / 2) + "px" 
+        "margin-left": -Math.ceil(2 + _size / 2) + "px"
     };
-};
\ No newline at end of file
+};
--- a/server/src/remie/static/remie/metadataplayer/Trace.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Trace.js	Fri Oct 02 10:24:23 2015 +0200
@@ -68,6 +68,21 @@
     
     
     this.tracer.trace("TraceWidgetInit", {});
+
+    // Configure annotation creation/update/delete/publish tracing
+    _this.player.on("Annotation.create", function (a) {
+        _this.tracer.trace("AnnotationCreated", { id: a.id, annotation_begin: a.begin.milliseconds, annotation_end: a.end.milliseconds, annotation_media: a.media.id, content_length: a.title.length, content_words: a.title.split(/\s+/).length });
+    });
+    _this.player.on("Annotation.delete", function (aid) {
+        _this.tracer.trace("AnnotationDeleted", { id: aid });
+    });
+    _this.player.on("Annotation.update", function (a) {
+        _this.tracer.trace("AnnotationUpdated", { id: a.id, annotation_begin: a.begin.milliseconds, annotation_end: a.end.milliseconds, annotation_media: a.media.id, content_length: a.title.length, content_words: a.title.split(/\s+/).length });
+    });
+    _this.player.on("Annotation.publish", function (a) {
+        _this.tracer.trace("AnnotationPublished", { id: a.id, annotation_begin: a.begin.milliseconds, annotation_end: a.end.milliseconds, annotation_media: a.media.id, content_length: a.title.length, content_words: a.title.split(/\s+/).length });
+    });
+
     _this.player.trigger("trace-ready");
     this.mouseLocation = '';
     IriSP.jQuery(".Ldt-Widget").on("mousedown mouseenter mouseleave", ".Ldt-TraceMe", function(_e) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/Transcript.css	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,9 @@
+.Ldt-Transcript-Annotation {
+    margin-right: .5em;
+}
+.Ldt-Transcript-Annotation:hover {
+    background-color: #bbb;
+}
+.Ldt-Transcript-Annotation.active {
+    background-color: #ddd;
+}
--- a/server/src/remie/static/remie/metadataplayer/Transcript.js	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Transcript.js	Fri Oct 02 10:24:23 2015 +0200
@@ -7,13 +7,13 @@
 IriSP.Widgets.Transcript.prototype = new IriSP.Widgets.Widget();
 
 IriSP.Widgets.Transcript.prototype.defaults = {
-    annotation_type: "Caption"
-    // container: "transcriptContainer"
+    annotation_type: "Caption",
+    use_vtt_track: false
 }
 
 IriSP.Widgets.Transcript.prototype.template = '<div class="Ldt-TranscriptWidget"></div>';
 
-IriSP.Widgets.Transcript.prototype.annotationTemplate = '<a data-begin="{{ begin }}" data-end="{{ end }}" data-id="{{ id }}" class="Ldt-Transcript-Annotation" href="#{{id}}">{{ content }}</a> ';
+IriSP.Widgets.Transcript.prototype.annotationTemplate = '<span data-begin="{{ begin }}" data-end="{{ end }}" data-id="{{ id }}" class="Ldt-Transcript-Annotation">{{ content }}</span>  ';
 
 IriSP.Widgets.Transcript.prototype.draw = function() {
     var _annotations = this.getWidgetAnnotations();
@@ -23,15 +23,57 @@
     _this.renderTemplate();
     content = _this.$.find('.Ldt-TranscriptWidget');
 
-    _annotations.forEach(function(_a) {
-        var _data = {
-            id : _a.id,
-            content : IriSP.textFieldHtml(_a.title),
-            begin : _a.begin.toString(),
-            end : _a.end.toString()
-        };
-        var _html = Mustache.to_html(_this.annotationTemplate, _data);
-        var _el = IriSP.jQuery(_html);
-        content.append(_el);
-    });
+    if (_this.use_vtt_track) {
+        // Use webvtt track. It will only work with native video player.
+        var widgets =  _this.player.widgets.filter(function (w) { return w.type == "HtmlPlayer"; });
+        if (widgets) {
+            var v = widgets[0].$.find("video")[0];
+            // FIXME: allow to specify the used track
+            v.addEventListener("loadedmetadata", function () {
+                var track = v.textTracks[0];
+                var cues = track.cues;
+                var i = 1;
+                Array.prototype.forEach.apply(cues, [ function(_c) {
+                    _c.id = "cue" + i;
+                    var _html = Mustache.to_html(_this.annotationTemplate, {
+                        id : _c.id,
+                        content : _c.text,
+                        begin : 1000 * _c.startTime,
+                        end : 1000 * _c.endTime
+                    });
+                    i += 1;
+                    var _el = IriSP.jQuery(_html);
+                    content.append(_el);
+                } ]);
+                track.addEventListener("cuechange", function () {
+                    var acues = track.activeCues;
+                    if (acues.length > 0) {
+                        // Update attributes for active cues
+                        _this.$.find(".Ldt-Transcript-Annotation.active").removeClass("active");
+                        Array.prototype.forEach.apply(acues, [ function(_c) {
+                            _this.$.find("#" + _c.id).addClass("active");
+                        } ]);
+                    }
+                }, false);
+                content.on("click", ".Ldt-Transcript-Annotation", function () {
+                    _this.media.setCurrentTime(this.dataset.begin);
+                });
+            });
+        } else {
+            console.log("cannot find a video object");
+        }
+    } else {
+        // Populate with annotation data
+        _annotations.forEach(function(_a) {
+            var _data = {
+                id : _a.id,
+                content : IriSP.textFieldHtml(_a.title),
+                begin : _a.begin.toString(),
+                end : _a.end.toString()
+            };
+            var _html = Mustache.to_html(_this.annotationTemplate, _data);
+            var _el = IriSP.jQuery(_html);
+            content.append(_el);
+        });
+    };
 };
Binary file server/src/remie/static/remie/metadataplayer/img/cancel_annotation.png has changed
Binary file server/src/remie/static/remie/metadataplayer/img/delete.png has changed
Binary file server/src/remie/static/remie/metadataplayer/img/edit.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/img/fullscreen.svg	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="22"
+   height="22"
+   viewBox="0 0 22.000001 22.000001"
+   id="svg4208"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="FS.svg">
+  <defs
+     id="defs4210" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="20.48"
+     inkscape:cx="10.91933"
+     inkscape:cy="15.686744"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1680"
+     inkscape:window-height="1028"
+     inkscape:window-x="75"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata4213">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Calque 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1030.3622)">
+    <path
+       style="fill:#000000"
+       d="m 0.5522696,1051.6037 c -0.41889785,-0.4329 -0.41461065,-8.2715 0.00441,-8.2715 0.16357544,0 0.8770369,0.5915 1.5854719,1.3145 l 1.2880668,1.3142 1.0474543,-1.062 c 1.2537252,-1.2715 2.0021739,-1.362 2.9358328,-0.3551 0.9287537,1.0018 0.8386288,1.7291 -0.3721746,3.0037 l -1.0280047,1.0824 1.2720657,1.3309 c 0.6996343,0.732 1.2720656,1.4692 1.2720656,1.6382 0,0.433 -7.58640438,0.4375 -8.00530223,0.01 z m 12.8865874,-0.01 c 0,-0.169 0.572426,-0.9062 1.272067,-1.6382 l 1.27206,-1.3308 -1.027999,-1.0823 c -1.210804,-1.2748 -1.300935,-2.0022 -0.372175,-3.0039 0.933653,-1.0069 1.682103,-0.9164 2.935828,0.3551 l 1.047458,1.062 1.288068,-1.3143 c 0.708435,-0.7229 1.421896,-1.3144 1.585473,-1.3144 0.419128,0 0.423427,7.8386 0.0044,8.2715 -0.418887,0.4328 -8.005291,0.4283 -8.005291,-0.01 z M 0.25939424,1035.3076 c 0,-2.7627 0.0897934,-4.0772 0.29287536,-4.287 0.41889785,-0.4328 8.0053023,-0.4284 8.0053023,0.01 0,0.1691 -0.5724257,0.9063 -1.2720657,1.6383 l -1.2720656,1.3309 1.0280047,1.0823 c 1.2304351,1.2954 1.3179943,2.0686 0.3434664,3.0334 -0.9694075,0.9597 -1.6734008,0.8665 -2.907119,-0.3846 l -1.0474598,-1.0621 -1.2880668,1.3143 c -0.708435,0.723 -1.42189663,1.3143 -1.5854665,1.3143 -0.2212842,0 -0.29740536,-1.0197 -0.29740536,-3.9844 z m 19.58692376,2.6673 -1.274753,-1.3171 -1.050191,1.0649 c -1.236549,1.254 -1.939853,1.3476 -2.909856,0.3874 -0.974534,-0.9647 -0.886969,-1.738 0.343467,-3.0335 l 1.027999,-1.0821 -1.27206,-1.3311 c -0.699641,-0.732 -1.272067,-1.4691 -1.272067,-1.6382 0,-0.433 7.586405,-0.4374 8.005303,-0.01 0.427969,0.4422 0.413673,8.2714 -0.01511,8.2714 -0.169391,0 -0.881623,-0.5926 -1.582735,-1.3171 z"
+       id="path3020"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/img/left_arrow.svg	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" id="arrow">
+  <path style="fill:none;stroke:#fff;stroke-width:6;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;"
+      d="M31,1 l-30,15 l30,15">
+  </path>
+  <path style="fill:none;stroke:#000;stroke-width:4;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;"
+      d="M31,1 l-30,15 l30,15">
+  </path>
+</svg>
Binary file server/src/remie/static/remie/metadataplayer/img/min_right_toggle.png has changed
Binary file server/src/remie/static/remie/metadataplayer/img/min_valid_sprites.png has changed
Binary file server/src/remie/static/remie/metadataplayer/img/min_wrong_toggle.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/img/pip_toggle.svg	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="5.0797176mm"
+   height="5.0799999mm"
+   viewBox="0 0 17.998999 18"
+   id="svg19931"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="pip_toggle.svg">
+  <defs
+     id="defs19933" />
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-245.28621,-280.50506)">
+    <polygon
+       transform="translate(232.09221,226.21106)"
+       style="fill:#ffffff"
+       points="23.586,59.714 22.193,57.364 20.805,59.714 "
+       id="polygon13969" />
+    <polygon
+       transform="translate(232.09221,226.21106)"
+       style="fill:#ffffff"
+       points="22.971,59.364 21.417,59.364 22.496,57.544 22.193,57.364 21.894,57.544 22.193,57.364 21.894,57.187 20.19,60.063 24.199,60.063 22.193,56.679 21.894,57.187 22.193,57.364 21.894,57.544 "
+       id="polygon13971" />
+    <polygon
+       transform="translate(232.09221,226.21106)"
+       style="fill:#ffffff"
+       points="20.805,66.874 22.193,69.224 23.586,66.874 "
+       id="polygon13973" />
+    <polygon
+       transform="translate(232.09221,226.21106)"
+       style="fill:#ffffff"
+       points="21.417,67.224 22.971,67.224 21.894,69.044 22.193,69.224 22.496,69.044 22.193,69.224 22.496,69.399 24.199,66.522 20.19,66.522 22.193,69.909 22.496,69.399 22.193,69.224 22.496,69.044 "
+       id="polygon13975" />
+    <polygon
+       transform="translate(232.09221,226.21106)"
+       style="fill:#ffffff"
+       points="25.818,64.685 28.168,63.294 25.818,61.903 "
+       id="polygon13977" />
+    <polygon
+       transform="translate(232.09221,226.21106)"
+       style="fill:#ffffff"
+       points="26.168,64.071 26.168,62.517 27.988,63.595 28.168,63.294 27.988,62.993 28.168,63.294 28.347,62.993 25.468,61.29 25.468,65.298 28.855,63.294 28.347,62.993 28.168,63.294 27.988,62.993 "
+       id="polygon13979" />
+    <polygon
+       transform="translate(232.09221,226.21106)"
+       style="fill:#ffffff"
+       points="18.659,61.903 16.31,63.294 18.659,64.685 "
+       id="polygon13981" />
+    <polygon
+       transform="translate(232.09221,226.21106)"
+       style="fill:#ffffff"
+       points="18.309,62.517 18.309,64.071 16.488,62.993 16.31,63.294 16.488,63.595 16.31,63.294 16.132,63.595 19.009,65.298 19.009,61.29 15.624,63.294 16.132,63.595 16.31,63.294 16.488,63.595 "
+       id="polygon13983" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#ffffff"
+       d="m 254.28521,298.00506 0,0.5 c 4.965,-0.002 9,-4.035 9,-9 0,-4.965 -4.035,-9 -9,-9 -4.963,0 -8.998,4.035 -8.999,9 10e-4,4.965 4.036,8.998 8.999,9 l 0,-0.5 0,-0.5 c -2.206,0 -4.202,-0.896 -5.653,-2.346 -1.45,-1.451 -2.346,-3.447 -2.346,-5.654 0,-2.207 0.896,-4.203 2.346,-5.654 1.451,-1.449 3.448,-2.346 5.653,-2.346 2.207,0 4.205,0.896 5.654,2.346 1.45,1.451 2.347,3.447 2.347,5.654 0,2.207 -0.896,4.203 -2.347,5.654 -1.449,1.449 -3.447,2.346 -5.654,2.346 l 0,0.5 0,0 z"
+       id="path13985" />
+  </g>
+</svg>
Binary file server/src/remie/static/remie/metadataplayer/img/publish_annotation.png has changed
Binary file server/src/remie/static/remie/metadataplayer/img/published_annotation.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/img/quiz_add_question.svg	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="26"
+   height="25"
+   viewBox="0 0 26.000001 25.000001"
+   id="svg4208"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="buzz.svg">
+  <defs
+     id="defs4210" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="10.24"
+     inkscape:cx="28.406106"
+     inkscape:cy="5.347153"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1680"
+     inkscape:window-height="1028"
+     inkscape:window-x="75"
+     inkscape:window-y="24"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata4213">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Calque 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1027.3622)">
+    <g
+       id="g3115"
+       transform="matrix(0.13764231,0,0,0.14585411,-0.10960999,900.2163)">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4152"
+         d="m 88.762577,966.09408 a 64.442296,17.911566 52.208592 0 0 -53.76267,-40.24111 64.442296,17.911566 52.208592 0 0 25.08146,61.71245 64.442296,17.911566 52.208592 0 0 53.763283,40.24068 64.442296,17.911566 52.208592 0 0 -25.082073,-61.71202 z"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:#000000;stroke-width:2.23528218;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <rect
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         y="517.45343"
+         x="875.27667"
+         height="20.941669"
+         width="15.681897"
+         id="rect4311"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         y="519.57574"
+         x="762.16467"
+         height="19.048025"
+         width="13.667582"
+         id="rect4309"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         y="518.66687"
+         x="889.6543"
+         height="0.94452941"
+         width="1.1967648"
+         id="rect4313"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccc"
+         inkscape:connector-curvature="0"
+         id="path4156-3"
+         d="m 113.50338,1028.0563 9.89486,-7.4107 8.37707,-6.2729"
+         style="fill:none;stroke:#000000;stroke-width:2.23528218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <ellipse
+         sodipodi:ry="18.476786"
+         sodipodi:rx="64.438011"
+         sodipodi:cy="516.2522"
+         sodipodi:cx="826.67413"
+         d="m 891.11214,516.2522 c 0,10.20444 -28.84988,18.47678 -64.43801,18.47678 -35.58813,0 -64.43801,-8.27234 -64.43801,-18.47678 0,-10.20445 28.84988,-18.47679 64.43801,-18.47679 35.58813,0 64.43801,8.27234 64.43801,18.47679 z"
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         ry="18.476786"
+         rx="64.438011"
+         cy="516.2522"
+         cx="826.67413"
+         id="path4150"
+         style="fill:#666666;stroke:#000000;stroke-width:2.23541927;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccc"
+         inkscape:connector-curvature="0"
+         id="path4156"
+         d="m 35.104607,925.77201 9.7327,-7.28939 8.23979,-6.17012"
+         style="fill:none;stroke:#000000;stroke-width:2.23528218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <ellipse
+         sodipodi:ry="8.1607332"
+         sodipodi:rx="36.851326"
+         sodipodi:cy="517.20477"
+         sodipodi:cx="827.2381"
+         d="m 864.08942,517.20477 c 0,4.50705 -16.4989,8.16074 -36.85132,8.16074 -20.35243,0 -36.85133,-3.65369 -36.85133,-8.16074 0,-4.50705 16.4989,-8.16073 36.85133,-8.16073 20.35242,0 36.85132,3.65368 36.85132,8.16073 z"
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         ry="8.1607332"
+         rx="36.851326"
+         cy="517.20477"
+         cx="827.2381"
+         id="path4317"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:1.30889452;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="907.08124"
+         x="233.80257"
+         height="3.9420969"
+         width="24.027122"
+         id="rect5190"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="906.15369"
+         x="235.03923"
+         height="4.2899289"
+         width="24.027122"
+         id="rect5190-9"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="905.3421"
+         x="236.39369"
+         height="4.2899289"
+         width="24.027122"
+         id="rect5190-9-1"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="904.47247"
+         x="237.51262"
+         height="4.0000691"
+         width="2.1789296"
+         id="rect5190-9-4"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="903.92175"
+         x="237.95427"
+         height="4.0000691"
+         width="2.1789296"
+         id="rect5190-9-4-4"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="908.00873"
+         x="233.77309"
+         height="2.5362754"
+         width="18.712299"
+         id="rect5190-9-0"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccc"
+         inkscape:connector-curvature="0"
+         id="path4156-4"
+         d="m 69.344687,935.29586 10.13887,-6.16215 8.58357,-5.21581"
+         style="fill:none;stroke:#000000;stroke-width:1.30881441;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="954.03864"
+         x="285.80243"
+         height="3.3044052"
+         width="2.9445002"
+         id="rect5279"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="948.15442"
+         x="283.03458"
+         height="7.8841949"
+         width="6.0067806"
+         id="rect5279-2"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="951.83563"
+         x="286.62689"
+         height="2.3188813"
+         width="4.7700906"
+         id="rect5279-2-3"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="953.51678"
+         x="285.83188"
+         height="1.971049"
+         width="4.4167504"
+         id="rect5279-2-3-3"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccc"
+         inkscape:connector-curvature="0"
+         id="path4156-4-5"
+         d="m 114.62982,993.43082 9.47784,-7.0986 8.02405,-6.00861"
+         style="fill:none;stroke:#000000;stroke-width:1.30881441;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="909.45807"
+         x="241.51714"
+         height="4.2899289"
+         width="24.027122"
+         id="rect5190-9-3"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <ellipse
+         sodipodi:ry="11.1082"
+         sodipodi:rx="36.846481"
+         sodipodi:cy="495.24258"
+         sodipodi:cx="824.92773"
+         d="m 861.77422,495.24258 c 0,6.13489 -16.49674,11.1082 -36.84649,11.1082 -20.34975,0 -36.84648,-4.97331 -36.84648,-11.1082 0,-6.13489 16.49673,-11.1082 36.84648,-11.1082 20.34975,0 36.84649,4.97331 36.84649,11.1082 z"
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         ry="11.1082"
+         rx="36.846481"
+         cy="495.24258"
+         cx="824.92773"
+         id="path4351"
+         style="fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.924097;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <path
+         id="path4564"
+         d="m 76.182057,895.08255 c 28.049053,-21.23075 69.407013,-14.64926 92.435693,14.54291 23.02867,29.19218 19.04627,70.22994 -9.00275,91.46064 -27.96073,21.2524 -111.393663,-84.75115 -83.432943,-106.00355 z"
+         stroke-miterlimit="10"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:#000000;stroke-width:4.48099518;stroke-miterlimit:10;stroke-dasharray:none;display:inline"
+         inkscape:connector-curvature="0" />
+      <g
+         id="flowRoot4822"
+         style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:sans-serif"
+         transform="translate(2.4859224,821.53368)">
+        <path
+           inkscape:connector-curvature="0"
+           id="path6077"
+           style="font-size:90.00000763px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Franklin Gothic;-inkscape-font-specification:Franklin Gothic"
+           d="m 123.24902,138.67423 8.9209,0 0,11.16211 -8.9209,0 0,-11.16211 z m 8.65723,-6.45996 -8.39355,0 0,-6.76758 q 0,-4.43848 1.23047,-7.29492 1.23046,-2.85645 5.18554,-6.63575 l 3.95508,-3.91113 q 2.50488,-2.3291 3.60352,-4.39453 1.14258,-2.06543 1.14258,-4.218753 0,-3.911133 -2.9004,-6.328125 -2.85644,-2.416992 -7.60254,-2.416992 -3.47167,0 -7.42675,1.538086 -3.91114,1.538086 -8.17383,4.482422 l 0,-8.26172 q 4.13086,-2.504883 8.34961,-3.735351 4.26269,-1.230469 8.78906,-1.230469 8.08594,0 12.96387,4.262695 4.92187,4.262696 4.92187,11.250001 0,3.339846 -1.58203,6.372076 -1.58203,2.98828 -5.53711,6.76757 l -3.86718,3.7793 q -2.06543,2.06543 -2.94434,3.25195 -0.83496,1.14258 -1.18652,2.24122 -0.26368,0.92285 -0.39551,2.24121 -0.13184,1.31836 -0.13184,3.60351 l 0,5.40528 z" />
+      </g>
+      <rect
+         y="923.16681"
+         x="45.770191"
+         height="100.00001"
+         width="15.000001"
+         id="rect4834"
+         style="fill:#ff0000;fill-opacity:1;stroke:none" />
+      <rect
+         transform="matrix(-0.00595846,-0.99998225,0.99997419,-0.00718432,0,0)"
+         y="-2.488034"
+         x="-980.66632"
+         height="99.91748"
+         width="14.282415"
+         id="rect4834-6"
+         style="fill:#ff0000;fill-opacity:1;stroke:none" />
+    </g>
+  </g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/img/quiz_off.svg	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="22"
+   height="22"
+   viewBox="0 0 22.000001 22.000001"
+   id="svg4208"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="quizzOff.svg">
+  <defs
+     id="defs4210" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="20.48"
+     inkscape:cx="26.114676"
+     inkscape:cy="19.183621"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1855"
+     inkscape:window-height="1056"
+     inkscape:window-x="65"
+     inkscape:window-y="24"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata4213">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Calque 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1030.3622)">
+    <g
+       id="g3090"
+       transform="matrix(0.13943692,0,0,0.1456598,-4.0481427,902.11583)">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4152"
+         d="m 88.762577,966.09408 a 64.442296,17.911566 52.208592 0 0 -53.76267,-40.24111 64.442296,17.911566 52.208592 0 0 25.08146,61.71245 64.442296,17.911566 52.208592 0 0 53.763283,40.24068 64.442296,17.911566 52.208592 0 0 -25.082073,-61.71202 z"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:#000000;stroke-width:2.23528218;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <rect
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         y="517.45343"
+         x="875.27667"
+         height="20.941669"
+         width="15.681897"
+         id="rect4311"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         y="519.57574"
+         x="762.16467"
+         height="19.048025"
+         width="13.667582"
+         id="rect4309"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         y="518.66687"
+         x="889.6543"
+         height="0.94452941"
+         width="1.1967648"
+         id="rect4313"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccc"
+         inkscape:connector-curvature="0"
+         id="path4156-3"
+         d="m 113.50338,1028.0563 9.89486,-7.4107 8.37707,-6.2729"
+         style="fill:none;stroke:#000000;stroke-width:2.23528218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <ellipse
+         sodipodi:ry="18.476786"
+         sodipodi:rx="64.438011"
+         sodipodi:cy="516.2522"
+         sodipodi:cx="826.67413"
+         d="m 891.11214,516.2522 c 0,10.20444 -28.84988,18.47678 -64.43801,18.47678 -35.58813,0 -64.43801,-8.27234 -64.43801,-18.47678 0,-10.20445 28.84988,-18.47679 64.43801,-18.47679 35.58813,0 64.43801,8.27234 64.43801,18.47679 z"
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         ry="18.476786"
+         rx="64.438011"
+         cy="516.2522"
+         cx="826.67413"
+         id="path4150"
+         style="fill:#666666;stroke:#000000;stroke-width:2.23541927;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccc"
+         inkscape:connector-curvature="0"
+         id="path4156"
+         d="m 35.104607,925.77201 9.7327,-7.28939 8.23979,-6.17012"
+         style="fill:none;stroke:#000000;stroke-width:2.23528218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <ellipse
+         sodipodi:ry="8.1607332"
+         sodipodi:rx="36.851326"
+         sodipodi:cy="517.20477"
+         sodipodi:cx="827.2381"
+         d="m 864.08942,517.20477 c 0,4.50705 -16.4989,8.16074 -36.85132,8.16074 -20.35243,0 -36.85133,-3.65369 -36.85133,-8.16074 0,-4.50705 16.4989,-8.16073 36.85133,-8.16073 20.35242,0 36.85132,3.65368 36.85132,8.16073 z"
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         ry="8.1607332"
+         rx="36.851326"
+         cy="517.20477"
+         cx="827.2381"
+         id="path4317"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:1.30889452;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="907.08124"
+         x="233.80257"
+         height="3.9420969"
+         width="24.027122"
+         id="rect5190"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="906.15369"
+         x="235.03923"
+         height="4.2899289"
+         width="24.027122"
+         id="rect5190-9"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="905.3421"
+         x="236.39369"
+         height="4.2899289"
+         width="24.027122"
+         id="rect5190-9-1"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="904.47247"
+         x="237.51262"
+         height="4.0000691"
+         width="2.1789296"
+         id="rect5190-9-4"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="903.92175"
+         x="237.95427"
+         height="4.0000691"
+         width="2.1789296"
+         id="rect5190-9-4-4"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="908.00873"
+         x="233.77309"
+         height="2.5362754"
+         width="18.712299"
+         id="rect5190-9-0"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccc"
+         inkscape:connector-curvature="0"
+         id="path4156-4"
+         d="m 69.344687,935.29586 10.13887,-6.16215 8.58357,-5.21581"
+         style="fill:none;stroke:#000000;stroke-width:1.30881441;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="954.03864"
+         x="285.80243"
+         height="3.3044052"
+         width="2.9445002"
+         id="rect5279"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="948.15442"
+         x="283.03458"
+         height="7.8841949"
+         width="6.0067806"
+         id="rect5279-2"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="951.83563"
+         x="286.62689"
+         height="2.3188813"
+         width="4.7700906"
+         id="rect5279-2-3"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="953.51678"
+         x="285.83188"
+         height="1.971049"
+         width="4.4167504"
+         id="rect5279-2-3-3"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccc"
+         inkscape:connector-curvature="0"
+         id="path4156-4-5"
+         d="m 114.62982,993.43082 9.47784,-7.0986 8.02405,-6.00861"
+         style="fill:none;stroke:#000000;stroke-width:1.30881441;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="909.45807"
+         x="241.51714"
+         height="4.2899289"
+         width="24.027122"
+         id="rect5190-9-3"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <ellipse
+         sodipodi:ry="11.1082"
+         sodipodi:rx="36.846481"
+         sodipodi:cy="495.24258"
+         sodipodi:cx="824.92773"
+         d="m 861.77422,495.24258 c 0,6.13489 -16.49674,11.1082 -36.84649,11.1082 -20.34975,0 -36.84648,-4.97331 -36.84648,-11.1082 0,-6.13489 16.49673,-11.1082 36.84648,-11.1082 20.34975,0 36.84649,4.97331 36.84649,11.1082 z"
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         ry="11.1082"
+         rx="36.846481"
+         cy="495.24258"
+         cx="824.92773"
+         id="path4351"
+         style="fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.924097;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <path
+         id="path4564"
+         d="m 76.182057,895.08255 c 28.049053,-21.23075 69.407013,-14.64926 92.435693,14.54291 23.02867,29.19218 19.04627,70.22994 -9.00275,91.46064 -27.96073,21.2524 -111.393663,-84.75115 -83.432943,-106.00355 z"
+         stroke-miterlimit="10"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:#000000;stroke-width:4.48099518;stroke-miterlimit:10;stroke-dasharray:none;display:inline"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/img/quiz_on.svg	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="22"
+   height="22"
+   viewBox="0 0 22.000001 22.000002"
+   id="svg4208"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="quizzOn.svg">
+  <defs
+     id="defs4210" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="14.481547"
+     inkscape:cx="20.213132"
+     inkscape:cy="13.840792"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1855"
+     inkscape:window-height="1056"
+     inkscape:window-x="65"
+     inkscape:window-y="24"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata4213">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Calque 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1030.3622)">
+    <g
+       id="g3065"
+       transform="matrix(0.13987874,0,0,0.14224716,-4.400635,906.61726)">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4152"
+         d="m 91.229014,959.93306 a 64.4423,17.911567 52.208592 0 0 -53.76267,-40.2411 64.4423,17.911567 52.208592 0 0 25.08146,61.7124 64.4423,17.911567 52.208592 0 0 53.763276,40.24074 64.4423,17.911567 52.208592 0 0 -25.082066,-61.71204 z"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:#000000;stroke-width:2.23528218;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <rect
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         y="511.73264"
+         x="871.82239"
+         height="20.941671"
+         width="15.681898"
+         id="rect4311"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         y="513.85492"
+         x="758.71033"
+         height="19.048027"
+         width="13.667583"
+         id="rect4309"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         y="512.94604"
+         x="886.19995"
+         height="0.94452947"
+         width="1.1967649"
+         id="rect4313"
+         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccc"
+         inkscape:connector-curvature="0"
+         id="path4156-3"
+         d="m 115.96981,1021.8953 9.89486,-7.4107 8.37708,-6.2729"
+         style="fill:none;stroke:#000000;stroke-width:2.23528218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <ellipse
+         sodipodi:ry="18.476788"
+         sodipodi:rx="64.438011"
+         sodipodi:cy="510.5314"
+         sodipodi:cx="823.21979"
+         d="m 887.6578,510.5314 c 0,10.20445 -28.84988,18.47679 -64.43801,18.47679 -35.58813,0 -64.43801,-8.27234 -64.43801,-18.47679 0,-10.20445 28.84988,-18.47678 64.43801,-18.47678 35.58813,0 64.43801,8.27233 64.43801,18.47678 z"
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         ry="18.476788"
+         rx="64.438011"
+         cy="510.5314"
+         cx="823.21979"
+         id="path4150"
+         style="fill:#666666;stroke:#000000;stroke-width:2.23541927;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccc"
+         inkscape:connector-curvature="0"
+         id="path4156"
+         d="m 37.571044,919.61096 9.7327,-7.2894 8.23979,-6.1701"
+         style="fill:none;stroke:#000000;stroke-width:2.23528218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <ellipse
+         sodipodi:ry="8.1607332"
+         sodipodi:rx="36.85133"
+         sodipodi:cy="511.48398"
+         sodipodi:cx="823.78375"
+         d="m 860.63508,511.48398 c 0,4.50705 -16.4989,8.16073 -36.85133,8.16073 -20.35243,0 -36.85133,-3.65368 -36.85133,-8.16073 0,-4.50705 16.4989,-8.16073 36.85133,-8.16073 20.35243,0 36.85133,3.65368 36.85133,8.16073 z"
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         ry="8.1607332"
+         rx="36.85133"
+         cy="511.48398"
+         cx="823.78375"
+         id="path4317"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:1.30889452;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="900.58234"
+         x="235.14644"
+         height="3.9420972"
+         width="24.027124"
+         id="rect5190"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="899.65472"
+         x="236.3831"
+         height="4.2899294"
+         width="24.027124"
+         id="rect5190-9"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="898.8432"
+         x="237.73756"
+         height="4.2899294"
+         width="24.027124"
+         id="rect5190-9-1"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="897.97357"
+         x="238.85649"
+         height="4.0000696"
+         width="2.1789298"
+         id="rect5190-9-4"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="897.42279"
+         x="239.29814"
+         height="4.0000696"
+         width="2.1789298"
+         id="rect5190-9-4-4"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="901.50983"
+         x="235.11696"
+         height="2.5362756"
+         width="18.712301"
+         id="rect5190-9-0"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccc"
+         inkscape:connector-curvature="0"
+         id="path4156-4"
+         d="m 71.811124,929.13486 10.13887,-6.1622 8.58357,-5.2158"
+         style="fill:none;stroke:#000000;stroke-width:1.30881441;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="947.53973"
+         x="287.14633"
+         height="3.3044055"
+         width="2.9445004"
+         id="rect5279"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="941.65546"
+         x="284.37848"
+         height="7.8841953"
+         width="6.0067811"
+         id="rect5279-2"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="945.33673"
+         x="287.97079"
+         height="2.3188815"
+         width="4.7700911"
+         id="rect5279-2-3"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="947.01788"
+         x="287.17575"
+         height="1.9710491"
+         width="4.4167509"
+         id="rect5279-2-3-3"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <path
+         sodipodi:nodetypes="ccc"
+         inkscape:connector-curvature="0"
+         id="path4156-4-5"
+         d="m 117.09625,987.26976 9.47784,-7.0986 8.02406,-6.0086"
+         style="fill:none;stroke:#000000;stroke-width:1.30881441;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <rect
+         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
+         y="902.95917"
+         x="242.86101"
+         height="4.2899294"
+         width="24.027124"
+         id="rect5190-9-3"
+         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
+      <ellipse
+         sodipodi:ry="11.108201"
+         sodipodi:rx="36.846485"
+         sodipodi:cy="489.52179"
+         sodipodi:cx="821.47339"
+         d="m 858.31987,489.52179 c 0,6.13489 -16.49673,11.1082 -36.84648,11.1082 -20.34975,0 -36.84649,-4.97331 -36.84649,-11.1082 0,-6.13489 16.49674,-11.1082 36.84649,-11.1082 20.34975,0 36.84648,4.97331 36.84648,11.1082 z"
+         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
+         ry="11.108201"
+         rx="36.846485"
+         cy="489.52179"
+         cx="821.47339"
+         id="path4351"
+         style="fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.924097;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+      <path
+         id="path4564"
+         d="m 78.648494,888.92156 c 28.049046,-21.2308 69.407016,-14.6493 92.435696,14.5429 23.02867,29.1922 19.04627,70.2299 -9.00275,91.4606 -27.96073,21.25254 -111.393666,-84.7511 -83.432946,-106.0035 z"
+         stroke-miterlimit="10"
+         style="fill:#aa0000;fill-opacity:1;stroke:#000000;stroke-width:4.48099518;stroke-miterlimit:10;stroke-dasharray:none;display:inline"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/img/right_arrow.svg	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" id="arrow">
+  <path style="fill:none;stroke:#fff;stroke-width:6;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;"
+      d="M1,1 l30,15 l-30,15">
+  </path>
+  <path style="fill:none;stroke:#000;stroke-width:4;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;"
+      d="M1,1 l30,15 l-30,15">
+  </path>
+</svg>
Binary file server/src/remie/static/remie/metadataplayer/img/time_edit.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/src/remie/static/remie/metadataplayer/img/twitter.svg	Fri Oct 02 10:24:23 2015 +0200
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   id="twitter_logo"
+   x="0px"
+   y="0px"
+   width="42px"
+   height="42px"
+   viewBox="0 0 42 42"
+   xml:space="preserve"
+   inkscape:version="0.48.5 r10040"
+   sodipodi:docname="twitter.svg"><metadata
+     id="metadata11"><rdf:RDF><cc:Work
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+     id="defs9" /><sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1680"
+     inkscape:window-height="1015"
+     id="namedview7"
+     showgrid="false"
+     inkscape:zoom="5.6190476"
+     inkscape:cx="-11.478814"
+     inkscape:cy="21"
+     inkscape:window-x="0"
+     inkscape:window-y="26"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="g3" /><g
+     fill="#ddd"
+     stroke="black"
+     transform="matrix(.57079,0,0,-.57079,-42.80937,432.2052)"
+     id="g3"><path
+       d="M146.83,743.433c-0.469-0.979-1.341-2.217-2.618-3.711c-1.276-1.497-2.85-2.811-4.725-3.947   c0.051-0.411,0.091-0.799,0.116-1.158c0.202-5.559-1.143-11.324-3.008-16.127c-3.617-8.931-9.157-16.12-17.071-21   c-8.252-4.688-17.862-5.684-26.717-4.833c-5.879,0.667-11.673,2.568-16.055,6.149c8.014-0.948,15.494,1.75,21.407,6.11   c-6.57-0.164-11.34,4.541-13.595,9.98c1.016-0.265,2.079-0.234,3.047-0.157c1.193,0.113,2.325,0.222,3.437,0.465   c-4.188,1.338-7.853,3.797-9.766,7.502c-1.122,2.349-1.629,4.583-1.639,7.116c1.961-1.023,4.322-2.021,6.484-1.933   c-3.264,2.737-5.882,6.235-6.368,10.248c-0.308,3.345,0.539,6.4,1.759,9.242c4.881-5.311,10.359-9.685,16.678-12.375   c4.322-1.752,8.631-2.691,13.087-2.707c-0.515,3.94-0.115,7.749,1.757,10.982c2.204,3.477,5.42,5.492,9.023,6.498   c5.16,1.311,10.192-0.542,13.36-4.099c3.417,0.364,6.691,1.867,9.297,3.401c-1.107-3.319-3.263-6.619-6.407-8.199   C141.308,741.429,144.163,742.307,146.83,743.433z"
+       id="path5"
+       style="fill:#55acee;fill-opacity:1" /></g></svg>
\ No newline at end of file
Binary file server/src/remie/static/remie/metadataplayer/img/valid_sprites.png has changed
--- a/server/src/remie/templates/remie/iframe_segments_group.html	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/templates/remie/iframe_segments_group.html	Fri Oct 02 10:24:23 2015 +0200
@@ -132,6 +132,8 @@
             show_creation_date: true,
             show_only_annotation_from_user: false,
             show_timecode: false,
+            show_title: false,
+            show_creator: true,
             show_filters: true,
             keyword_filter: false,
             date_filter: false,
--- a/server/src/remie/templates/remie/iframe_segments_preview.html	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/templates/remie/iframe_segments_preview.html	Fri Oct 02 10:24:23 2015 +0200
@@ -131,6 +131,8 @@
             show_only_annotation_from_user: false,
             show_timecode: false,
             show_filters: true,
+            show_title: false,
+            show_creator: true,
             keyword_filter: false,
             date_filter: false,
             segment_filter: false,
--- a/server/src/remie/templates/remie/iframe_segments_single.html	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/templates/remie/iframe_segments_single.html	Fri Oct 02 10:24:23 2015 +0200
@@ -2,7 +2,7 @@
 <html>
 <head>
 <title>Test</title>
-<link rel="stylesheet" type="text/css" href="{% static 'remie/css/style.css' %}" />
+<!-- <link rel="stylesheet" type="text/css" href="{% static 'remie/css/style.css' %}" /> -->
 </head>
 <body>
 <div id="remie_player_container">
@@ -132,6 +132,8 @@
             show_timecode: false,
             show_filters: false,
             show_header: true,
+            show_title: false,
+            show_creator: true,
             custom_header: "Ce que j'ai écrit",
             limit_count: false,
             start_visible: false,
--- a/server/src/remie/templates/remie/iframe_teacher.html	Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/templates/remie/iframe_teacher.html	Fri Oct 02 10:24:23 2015 +0200
@@ -131,6 +131,8 @@
             show_timecode: false,
             show_filters: true,
             show_header: true,
+            show_title: false,
+            show_creator: true,
             custom_header: "Travail du groupe",
             limit_count: false,
             start_visible: false,