Beautifully crafted timelines that are easy and intuitive to use. http://timeline.knightlab.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
167 KiB

/* **********************************************
Begin VMM.Timeline.License.js
********************************************** *//*!
TimelineJS
Version 2.17
Designed and built by Zach Wise at VéritéCo
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*//* **********************************************
Begin VMM.StoryJS.License.js
********************************************** *//*!
StoryJS
Designed and built by Zach Wise at VéritéCo
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*//* **********************************************
Begin VMM.js
********************************************** *//**
* VéritéCo JS Core
* Designed and built by Zach Wise at VéritéCo zach@verite.co
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*//* Simple JavaScript Inheritance
By John Resig http://ejohn.org/
MIT Licensed.
================================================== */function trace(e){VMM.debug&&(window.console?console.log(e):typeof jsTrace!="undefined"&&jsTrace.send(e))}function onYouTubePlayerAPIReady(){trace("GLOBAL YOUTUBE API CALLED");VMM.ExternalAPI.youtube.onAPIReady()}(function(){var e=!1,t=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(n){function o(){!e&&this.init&&this.init.apply(this,arguments)}var r=this.prototype;e=!0;var i=new this;e=!1;for(var s in n)i[s]=typeof n[s]=="function"&&typeof r[s]=="function"&&t.test(n[s])?function(e,t){return function(){var n=this._super;this._super=r[e];var i=t.apply(this,arguments);this._super=n;return i}}(s,n[s]):n[s];o.prototype=i;o.prototype.constructor=o;o.extend=arguments.callee;return o}})();var global=function(){return this||(1,eval)("this")}();if(typeof VMM=="undefined"){var VMM=Class.extend({});VMM.debug=!0;VMM.master_config={init:function(){return this},sizes:{api:{width:0,height:0}},vp:"Pellentesque nibh felis, eleifend id, commodo in, interdum vitae, leo",api_keys_master:{flickr:"RAIvxHY4hE/Elm5cieh4X5ptMyDpj7MYIxziGxi0WGCcy1s+yr7rKQ==",google:"uQKadH1VMlCsp560gN2aOiMz4evWkl1s34yryl3F/9FJOsn+/948CbBUvKLN46U=",twitter:""},timers:{api:7e3},api:{pushques:[]},twitter:{active:!1,array:[],api_loaded:!1,que:[]},flickr:{active:!1,array:[],api_loaded:!1,que:[]},youtube:{active:!1,array:[],api_loaded:!1,que:[]},vimeo:{active:!1,array:[],api_loaded:!1,que:[]},vine:{active:!1,array:[],api_loaded:!1,que:[]},webthumb:{active:!1,array:[],api_loaded:!1,que:[]},googlemaps:{active:!1,map_active:!1,places_active:!1,array:[],api_loaded:!1,que:[]},googledocs:{active:!1,array:[],api_loaded:!1,que:[]},googleplus:{active:!1,array:[],api_loaded:!1,que:[]},wikipedia:{active:!1,array:[],api_loaded:!1,que:[],tries:0},soundcloud:{active:!1,array:[],api_loaded:!1,que:[]}}.init();VMM.createElement=function(e,t,n,r,i){var s="";if(e!=null&&e!=""){s+="<"+e;n!=null&&n!=""&&(s+=" class='"+n+"'");r!=null&&r!=""&&(s+=" "+r);i!=null&&i!=""&&(s+=" style='"+i+"'");s+=">";t!=null&&t!=""&&(s+=t);s=s+"</"+e+">"}return s};VMM.createMediaElement=function(e,t,n){var r="",i=!1;r+="<div class='media'>";if(e!=null&&e!=""){valid=!0;r+="<img src='"+e+"'>";n!=null&&n!=""&&(r+=VMM.createElement("div",n,"credit"));t!=null&&t!=""&&(r+=VMM.createElement("div",t,"caption"))}r+="</div>";return r};VMM.hideUrlBar=function(){var e=window,t=e.document;if(!location.hash||!e.addEventListener){window.scrollTo(0,1);var n=1,r=setInterval(function(){if(t.body){clearInterval(r);n="scrollTop"in t.body?t.body.scrollTop:1;e.scrollTo(0,n===1?0:1)}},15);e.addEventListener("load",function(){setTimeout(function(){e.scrollTo(0,n===1?0:1)},0)},!1)}}}Array.prototype.remove=function(e,t){var n=this.slice((t||e)+1||this.length);this.length=e<0?this.length+e:e;return this.push.apply(this,n)};Date.prototype.getWeek=function(){var e=new Date(this.getFullYear(),0,1);return Math.ceil(((this-e)/864e5+e.getDay()+1)/7)};Date.prototype.getDayOfYear=function(){var e=new Date(this.getFullYear(),0,1);return Math.ceil((this-e)/864e5)};var is={Null:function(e){return e===null},Undefined:function(e){return e===undefined},nt:function(e){return e===null||e===undefined},Function:function(e){return typeof e=="function"?e.constructor.toString().match(/Function/)!==null:!1},String:function(e){return typeof e=="string"?!0:typeof e=="object"?e.constructor.toString().match(/string/i)!==null:!1},Array:function(e){return typeof e=="object"?e.constructor.toString().match(/array/i)!==null||e.length!==undefined:!1},Boolean:function(e){return typeof e=="boolean"?!0:typeof e=="object"?e.constructor.toString().match(/boolean/i)!==null:!1},Date:function(e){return typeof e=="date"?!0:typeof e=="object"?e.constructor.toString().match(/date/i)!==null:!1},HTML:function(e){return typeof e=="object"?e.constructor.toString().match(/html/i)!==null:!1},Number:function(e){return typeof e=="number"?!0:typeof e=="object"?e.constructor.toString().match(/Number/)!==null:!1},Object:function(e){return typeof e=="object"?e.constructor.toString().match(/objec
(VMM.Language={lang:"en",api:{wikipedia:"en"},date:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],month_abbr:["Jan.","Feb.","March","April","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."],day:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],day_abbr:["Sun.","Mon.","Tues.","Wed.","Thurs.","Fri.","Sat."]},dateformats:{year:"yyyy",month_short:"mmm",month:"mmmm yyyy",full_short:"mmm d",full:"mmmm d',' yyyy",time_short:"h:MM:ss TT",time_no_seconds_short:"h:MM TT",time_no_seconds_small_date:"h:MM TT'<br/><small>'mmmm d',' yyyy'</small>'",full_long:"mmm d',' yyyy 'at' h:MM TT",full_long_small_date:"h:MM TT'<br/><small>mmm d',' yyyy'</small>'"},messages:{loading_timeline:"Loading Timeline... ",return_to_title:"Return to Title",expand_timeline:"Expand Timeline",contract_timeline:"Contract Timeline",wikipedia:"From Wikipedia, the free encyclopedia",loading_content:"Loading Content",loading:"Loading"}});typeof VMM!="undefined"&&typeof VMM.ExternalAPI=="undefined"&&(VMM.ExternalAPI={keys:{google:"",flickr:"",twitter:""},keys_master:{vp:"Pellentesque nibh felis, eleifend id, commodo in, interdum vitae, leo",flickr:"RAIvxHY4hE/Elm5cieh4X5ptMyDpj7MYIxziGxi0WGCcy1s+yr7rKQ==",google:"jwNGnYw4hE9lmAez4ll0QD+jo6SKBJFknkopLS4FrSAuGfIwyj57AusuR0s8dAo=",twitter:""},init:function(){return this},setKeys:function(e){VMM.ExternalAPI.keys=e},pushQues:function(){VMM.master_config.googlemaps.active&&VMM.ExternalAPI.googlemaps.pushQue();VMM.master_config.youtube.active&&VMM.ExternalAPI.youtube.pushQue();VMM.master_config.soundcloud.active&&VMM.ExternalAPI.soundcloud.pushQue();VMM.master_config.googledocs.active&&VMM.ExternalAPI.googledocs.pushQue();VMM.master_config.googleplus.active&&VMM.ExternalAPI.googleplus.pushQue();VMM.master_config.wikipedia.active&&VMM.ExternalAPI.wikipedia.pushQue();VMM.master_config.vimeo.active&&VMM.ExternalAPI.vimeo.pushQue();VMM.master_config.vine.active&&VMM.ExternalAPI.vine.pushQue();VMM.master_config.twitter.active&&VMM.ExternalAPI.twitter.pushQue();VMM.master_config.flickr.active&&VMM.ExternalAPI.flickr.pushQue();VMM.master_config.webthumb.active&&VMM.ExternalAPI.webthumb.pushQue()},twitter:{tweetArray:[],get:function(e){var t={mid:e.id,id:e.uid};VMM.master_config.twitter.que.push(t);VMM.master_config.twitter.active=!0},create:function(e,t){var n=e.mid.toString(),r={twitterid:e.mid},i="http://api.twitter.com/1/statuses/show.json?id="+e.mid+"&include_entities=true&callback=?";VMM.ExternalAPI.twitter.getOEmbed(e,t)},errorTimeOut:function(e){trace("TWITTER JSON ERROR TIMEOUT "+e.mid);VMM.attachElement("#"+e.id.toString(),VMM.MediaElement.loadingmessage("Still waiting on Twitter: "+e.mid));VMM.getJSON("http://api.twitter.com/1/account/rate_limit_status.json",function(t){trace("REMAINING TWITTER API CALLS "+t.remaining_hits);trace("TWITTER RATE LIMIT WILL RESET AT "+t.reset_time);var n="";if(t.remaining_hits==0){n="<p>You've reached the maximum number of tweets you can load in an hour.</p>";n+="<p>You can view tweets again starting at: <br/>"+t.reset_time+"</p>"}else n="<p>Still waiting on Twitter. "+e.mid+"</p>";VMM.attachElement("#"+e.id.toString(),VMM.MediaElement.loadingmessage(n))})},errorTimeOutOembed:function(e){trace("TWITTER JSON ERROR TIMEOUT "+e.mid);VMM.attachElement("#"+e.id.toString(),VMM.MediaElement.loadingmessage("Still waiting on Twitter: "+e.mid))},pushQue:function(){if(VMM.master_config.twitter.que.length>0){VMM.ExternalAPI.twitter.create(VMM.master_config.twitter.que[0],VMM.ExternalAPI.twitter.pushQue);VMM.master_config.twitter.que.remove(0)}},getOEmbed:function(e,t){var n="http://api.twitter.com/1/statuses/oembed.json?id="+e.mid+"&omit_script=true&include_entities=true&callback=?",r=setTimeout(VMM.ExternalAPI.twitter.errorTimeOutOembed,VMM.master_config.timers.api,e);VMM.getJSON(n,function(t){var n="",r="";n+=t.html.split("</p>&mdash;")[0]+"</p></blockquote>";r=t.author_url.split("twitter.com/")[1];n+="<div class='vcard author'>";n+="<a class='screen-name url' href='"+t.author_url+"' target='_bla
e.media!=null&&e.media!=""){var i="",s="",o="",u="",a=!1,f;f=VMM.MediaType(e.media);f.uid=t;n=!0;e.credit!=null&&e.credit!=""&&(o="<div class='credit'>"+VMM.Util.linkify_with_twitter(e.credit,"_blank")+"</div>");e.caption!=null&&e.caption!=""&&(s="<div class='caption'>"+VMM.Util.linkify_with_twitter(e.caption,"_blank")+"</div>");if(f.type=="image"){f.id.match("https://")&&(f.id=f.id.replace("https://","http://"));i="<div class='media-image media-shadow'><img src='"+f.id+"' class='media-image'></div>"}else if(f.type=="flickr"){i="<div class='media-image media-shadow'><a href='"+f.link+"' target='_blank'><img id='"+t+"'></a></div>";VMM.ExternalAPI.flickr.get(f)}else if(f.type=="instagram")i="<div class='media-image media-shadow'><a href='"+f.link+"' target='_blank'><img src='"+VMM.ExternalAPI.instagram.get(f)+"'></a></div>";else if(f.type=="googledoc"){i="<div class='media-frame media-shadow doc' id='"+f.uid+"'>"+r+"</div>";VMM.ExternalAPI.googledocs.get(f)}else if(f.type=="youtube"){i="<div class='media-shadow'><div class='media-frame video youtube' id='"+f.uid+"'>"+r+"</div></div>";VMM.ExternalAPI.youtube.get(f)}else if(f.type=="vimeo"){i="<div class='media-shadow media-frame video vimeo' id='"+f.uid+"'>"+r+"</div>";VMM.ExternalAPI.vimeo.get(f)}else if(f.type=="dailymotion")i="<div class='media-shadow'><iframe class='media-frame video dailymotion' autostart='false' frameborder='0' width='100%' height='100%' src='http://www.dailymotion.com/embed/video/"+f.id+"'></iframe></div>";else if(f.type=="vine"){i="<div class='media-shadow media-frame video vine' id='"+f.uid+"'>"+r+"</div>";VMM.ExternalAPI.vine.get(f)}else if(f.type=="twitter"){i="<div class='twitter' id='"+f.uid+"'>"+r+"</div>";a=!0;VMM.ExternalAPI.twitter.get(f)}else if(f.type=="twitter-ready"){a=!0;i=f.id}else if(f.type=="soundcloud"){i="<div class='media-frame media-shadow soundcloud' id='"+f.uid+"'>"+r+"</div>";VMM.ExternalAPI.soundcloud.get(f)}else if(f.type=="google-map"){i="<div class='media-frame media-shadow map' id='"+f.uid+"'>"+r+"</div>";VMM.ExternalAPI.googlemaps.get(f)}else if(f.type=="googleplus"){u="googleplus_"+f.id;i="<div class='googleplus' id='"+u+"'>"+r+"</div>";a=!0;VMM.ExternalAPI.googleplus.get(f)}else if(f.type=="wikipedia"){i="<div class='wikipedia' id='"+f.uid+"'>"+r+"</div>";a=!0;VMM.ExternalAPI.wikipedia.get(f)}else if(f.type=="storify"){a=!0;i="<div class='plain-text-quote'>"+f.id+"</div>"}else if(f.type=="iframe"){a=!0;i="<div class='media-shadow'><iframe class='media-frame video' autostart='false' frameborder='0' width='100%' height='100%' src='"+f.id+"'></iframe></div>"}else if(f.type=="quote"){a=!0;i="<div class='plain-text-quote'>"+f.id+"</div>"}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");a=!0;i="<div class='plain-text'><div class='container'>"+VMM.Util.properQuotes(f.id)+"</div></div>"}else if(f.type=="website"){i="<div class='media-shadow website' id='"+f.uid+"'>"+r+"</div>";VMM.ExternalAPI.webthumb.get(f)}else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}i="<div class='media-container' >"+i+o+s+"</div>";return a?"<div class='text-media'><div class='media-wrapper'>"+i+"</div></div>":"<div class='media-wrapper'>"+i+"</div>"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(e){var t=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),n=!1,r={type:"unknown",id:"",start:0,hd:!1,link:"",lang:VMM.Language.lang,uniqueid:VMM.Util.unique_ID(6)};if(t.match("div class='twitter'")){r.type="twitter-ready";r.id=t;n=!0}else if(t.match("(www.)?youtube|youtu.be")){t.match("v=")?r.id=VMM.Util.getUrlVars(t).v:t.match("/embed/")?r.id=t.split("embed/")[1].split(/[?&]/)[0]:t.match(/v\/|v=|youtu\.be\//)?r.id=t.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0]:trace("YOUTUBE IN URL BUT NOT A VALID VIDEO");r.start=VMM.Util.getUrlVars(t).t;r.hd=VMM.Util.getUrlVars(t).hd;r.type="youtube";n=!0}else if(t.match("(player.)?vimeo.com")){r.type="vimeo";r.id=t.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];n=!0}else if(t.match("(www.)?dailymotion.com")){r.id=t.split(/v
s]);i.preventDefault();return!1}if(n.inArray(s,o)>-1){u[t]();i.preventDefault();return!1}})});n.fn.mousewheel&&e.mouseWheel&&u.wrap.bind("mousewheel.fb",function(t,r,i,s){var o=t.target||null,a=n(o),f=!1;while(a.length){if(f||a.is(".fancybox-skin")||a.is(".fancybox-wrap"))break;f=d(a[0]);a=n(a).parent()}if(r!==0&&!f&&u.group.length>1&&!e.canShrink){s>0||i>0?u.prev(s>0?"down":"left"):(s<0||i<0)&&u.next(s<0?"up":"right");t.preventDefault()}})},trigger:function(e,t){var r,i=t||u.coming||u.current;if(!i)return;n.isFunction(i[e])&&(r=i[e].apply(i,Array.prototype.slice.call(arguments,1)));if(r===!1)return!1;i.helpers&&n.each(i.helpers,function(t,r){r&&u.helpers[t]&&n.isFunction(u.helpers[t][e])&&u.helpers[t][e](n.extend(!0,{},u.helpers[t].defaults,r),i)});o.trigger(e)},isImage:function(e){return h(e)&&e.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(e){return h(e)&&e.match(/\.(swf)((\?|#).*)?$/i)},_start:function(e){var t={},r,i,s,o,a;e=v(e);r=u.group[e]||null;if(!r)return!1;t=n.extend(!0,{},u.opts,r);o=t.margin;a=t.padding;n.type(o)==="number"&&(t.margin=[o,o,o,o]);n.type(a)==="number"&&(t.padding=[a,a,a,a]);t.modal&&n.extend(!0,t,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});t.autoSize&&(t.autoWidth=t.autoHeight=!0);t.width==="auto"&&(t.autoWidth=!0);t.height==="auto"&&(t.autoHeight=!0);t.group=u.group;t.index=e;u.coming=t;if(!1===u.trigger("beforeLoad")){u.coming=null;return}s=t.type;i=t.href;if(!s){u.coming=null;if(u.current&&u.router&&u.router!=="jumpto"){u.current.index=e;return u[u.router](u.direction)}return!1}u.isActive=!0;if(s==="image"||s==="swf"){t.autoHeight=t.autoWidth=!1;t.scrolling="visible"}s==="image"&&(t.aspectRatio=!0);s==="iframe"&&l&&(t.scrolling="scroll");t.wrap=n(t.tpl.wrap).addClass("fancybox-"+(l?"mobile":"desktop")+" fancybox-type-"+s+" fancybox-tmp "+t.wrapCSS).appendTo(t.parent||"body");n.extend(t,{skin:n(".fancybox-skin",t.wrap),outer:n(".fancybox-outer",t.wrap),inner:n(".fancybox-inner",t.wrap)});n.each(["Top","Right","Bottom","Left"],function(e,n){t.skin.css("padding"+n,m(t.padding[e]))});u.trigger("onReady");if(s==="inline"||s==="html"){if(!t.content||!t.content.length)return u._error("content")}else if(!i)return u._error("href");s==="image"?u._loadImage():s==="ajax"?u._loadAjax():s==="iframe"?u._loadIframe():u._afterLoad()},_error:function(e){n.extend(u.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:e,content:u.coming.tpl.error});u._afterLoad()},_loadImage:function(){var e=u.imgPreload=new Image;e.onload=function(){this.onload=this.onerror=null;u.coming.width=this.width/u.opts.pixelRatio;u.coming.height=this.height/u.opts.pixelRatio;u._afterLoad()};e.onerror=function(){this.onload=this.onerror=null;u._error("image")};e.src=u.coming.href;e.complete!==!0&&u.showLoading()},_loadAjax:function(){var e=u.coming;u.showLoading();u.ajaxLoad=n.ajax(n.extend({},e.ajax,{url:e.href,error:function(e,t){u.coming&&t!=="abort"?u._error("ajax",e):u.hideLoading()},success:function(t,n){if(n==="success"){e.content=t;u._afterLoad()}}}))},_loadIframe:function(){var e=u.coming,t=n(e.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",l?"auto":e.iframe.scrolling).attr("src",e.href);n(e.wrap).bind("onReset",function(){try{n(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(e){}});if(e.iframe.preload){u.showLoading();t.one("load",function(){n(this).data("ready",1);l||n(this).bind("load.fb",u.update);n(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();u._afterLoad()})}e.content=t.appendTo(e.inner);e.iframe.preload||u._afterLoad()},_preloadImages:function(){var e=u.group,t=u.current,n=e.length,r=t.preload?Math.min(t.preload,n-1):0,i,s;for(s=1;s<=r;s+=1){i=e[(t.index+s)%n];i.type==="image"&&i.href&&((new Image).src=i.href)}},_afterLoad:function(){var e=u.coming,t=u.current,r="fancybox-placeholder",i,s,o,a,f,l;u.hideLoading();if(!e||u.isActive===!1)return;if(!1===u.trigger("afterLoad",e,t)){e
(E)||(m.current_slide=parseInt(E))}window.onhashchange=function(){var e=window.location.hash.substring(1);m.hash_bookmark?w?_(parseInt(e)):w=!1:_(parseInt(e))};this.init=function(e,t){trace("INIT");H();S(e);x();type.of(t)=="string"&&(m.source=t);VMM.Date.setLanguage(m.language);VMM.master_config.language=m.language;VMM.ExternalAPI.setKeys(m.api_keys);VMM.ExternalAPI.googlemaps.setMapType(m.maptype);VMM.bindEvent(global,T,m.events.data_ready);VMM.bindEvent(global,I,m.events.messege);VMM.fireEvent(global,m.events.messege,m.language.messages.loading_timeline);(VMM.Browser.browser=="Explorer"||VMM.Browser.browser=="MSIE")&&parseInt(VMM.Browser.version,10)<=7&&(b=!0);type.of(m.source)=="string"||type.of(m.source)=="object"?VMM.Timeline.DataObj.getData(m.source):VMM.fireEvent(global,m.events.messege,"No data source provided")};this.iframeLoaded=function(){trace("iframeLoaded")};this.reload=function(e){trace("Load new timeline data"+e);VMM.fireEvent(global,m.events.messege,m.language.messages.loading_timeline);d={};VMM.Timeline.DataObj.getData(e);m.current_slide=0;f.setSlide(0);l.setMarker(0,m.ease,m.duration)}};VMM.Timeline.Config={}}typeof VMM.Timeline!="undefined"&&typeof VMM.Timeline.TimeNav=="undefined"&&(VMM.Timeline.TimeNav=function(e,t,n){function U(){trace("onConfigSet")}function z(e){b.nav.constraint.left=b.width/2;b.nav.constraint.right=b.nav.constraint.right_min-b.width/2;y.updateConstraint(b.nav.constraint);VMM.Lib.css(h,"left",Math.round(b.width/2)+2);VMM.Lib.css(p,"left",Math.round(b.width/2)-8);Y(b.current_slide,b.ease,b.duration,!0,e)}function W(){VMM.fireEvent(x,"UPDATE")}function X(){y.cancelSlide();if(b.nav.multiplier.current>b.nav.multiplier.min){b.nav.multiplier.current<=1?b.nav.multiplier.current=b.nav.multiplier.current-.25:b.nav.multiplier.current>5?b.nav.multiplier.current>16?b.nav.multiplier.current=Math.round(b.nav.multiplier.current-10):b.nav.multiplier.current=Math.round(b.nav.multiplier.current-4):b.nav.multiplier.current=Math.round(b.nav.multiplier.current-1);b.nav.multiplier.current<=0&&(b.nav.multiplier.current=b.nav.multiplier.min);K()}}function V(){y.cancelSlide();if(b.nav.multiplier.current<b.nav.multiplier.max){b.nav.multiplier.current>4?b.nav.multiplier.current>16?b.nav.multiplier.current=Math.round(b.nav.multiplier.current+10):b.nav.multiplier.current=Math.round(b.nav.multiplier.current+4):b.nav.multiplier.current=Math.round(b.nav.multiplier.current+1);b.nav.multiplier.current>=b.nav.multiplier.max&&(b.nav.multiplier.current=b.nav.multiplier.max);K()}}function $(e){y.cancelSlide();Y(0);W()}function J(e){var t=0,n=0;e||(e=window.event);e.originalEvent&&(e=e.originalEvent);if(typeof e.wheelDeltaX!="undefined"){t=e.wheelDeltaY/6;Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY)?t=e.wheelDeltaX/6:t=0}if(t){e.preventDefault&&e.preventDefault();e.returnValue=!1}n=VMM.Lib.position(r).left+t;n>b.nav.constraint.left?n=b.width/2:n<b.nav.constraint.right&&(n=b.nav.constraint.right);VMM.Lib.css(r,"left",n)}function K(){trace("config.nav.multiplier "+b.nav.multiplier.current);ut(!0);at(!0);ft(a,k,!0,!0);ft(f,L,!0);b.nav.constraint.left=b.width/2;b.nav.constraint.right=b.nav.constraint.right_min-b.width/2;y.updateConstraint(b.nav.constraint)}function Q(e){y.cancelSlide();Y(e.data.number);W()}function G(e){VMM.Lib.toggleClass(e.data.elem,"zFront")}function Y(e,t,n,i,s){trace("GO TO MARKER");var o=b.ease,u=b.duration,a=!1,f=!1;O=e;H.left=b.width/2-C[O].pos_left;H.visible.left=Math.abs(H.left)-100;H.visible.right=Math.abs(H.left)+b.width+100;O==0&&(f=!0);O+1==C.length&&(a=!0);t!=null&&t!=""&&(o=t);n!=null&&n!=""&&(u=n);for(var l=0;l<C.length;l++)VMM.Lib.removeClass(C[l].marker,"active");if(b.start_page&&C[0].type=="start"){VMM.Lib.visible(C[0].marker,!1);VMM.Lib.addClass(C[0].marker,"start")}VMM.Lib.addClass(C[O].marker,"active");VMM.Lib.stop(r);VMM.Lib.animate(r,u,o,{left:H.left})}function Z(e,t){VMM.Lib.animate(r,t.time/2,b.ease,{left:t.left})}function et(){var e=0,t=0,n=0,r=[],i=0;for(i=0;i<C.length;i++)if(T[i].type!="start"){var s=ot(F,C[i].relative_pos),e=t;t=s.begin;n=t-e;r.push(n)}return VMM.Util.av
.timeline.asset.credit=l.credit;t.timeline.text=l.text;t.timeline.type="google spreadsheet"}else if(l.type.match("era")){var d={startDate:l.startDate,endDate:l.endDate,headline:l.headline,text:l.text,tag:l.tag};t.timeline.era.push(d)}else{var l={type:"google spreadsheet",startDate:l.startDate,endDate:l.endDate,headline:l.headline,text:l.text,tag:l.tag,asset:{media:l.media,credit:l.credit,caption:l.caption,thumbnail:l.thumbnail}};t.timeline.date.push(l)}}}if(n){VMM.fireEvent(global,VMM.Timeline.Config.events.messege,"Finished Parsing Data");VMM.fireEvent(global,VMM.Timeline.Config.events.data_ready,t)}else VMM.fireEvent(global,VMM.Timeline.Config.events.messege,"Unable to load Google Doc data source")}},storify:{getData:function(e){var t,n,r;VMM.fireEvent(global,VMM.Timeline.Config.events.messege,"Loading Storify...");t=e.split("storify.com/")[1];n="http://api.storify.com/v1/stories/"+t+"?per_page=300&callback=?";r=setTimeout(function(){trace("STORIFY timeout");VMM.fireEvent(global,VMM.Timeline.Config.events.messege,"Storify is not responding")},6e3);VMM.getJSON(n,VMM.Timeline.DataObj.model.storify.buildData).error(function(e,t,n){trace("STORIFY error");trace("STORIFY ERROR: "+t+" "+e.responseText)}).success(function(e){clearTimeout(r)})},buildData:function(e){VMM.fireEvent(global,VMM.Timeline.Config.events.messege,"Parsing Data");var t=VMM.Timeline.DataObj.data_template_obj;t.timeline.startDate=new Date(e.content.date.created);t.timeline.headline=e.content.title;trace(e);var n="",r=e.content.author.username,i="";if(typeof e.content.author.name!="undefined"){r=e.content.author.name;i=e.content.author.username+"&nbsp;"}typeof e.content.description!="undefined"&&e.content.description!=null&&(n+=e.content.description);n+="<div class='storify'>";n+="<div class='vcard author'><a class='screen-name url' href='"+e.content.author.permalink+"' target='_blank'>";n+="<span class='avatar'><img src='"+e.content.author.avatar+"' style='max-width: 32px; max-height: 32px;'></span>";n+="<span class='fn'>"+r+"</span>";n+="<span class='nickname'>"+i+"<span class='thumbnail-inline'></span></span>";n+="</a>";n+="</div>";n+="</div>";t.timeline.text=n;t.timeline.asset.media=e.content.thumbnail;t.timeline.type="storify";for(var s=0;s<e.content.elements.length;s++){var o=e.content.elements[s],u=!1,a=new Date(o.posted_at);trace(o.type);var f={type:"storify",startDate:o.posted_at,endDate:o.posted_at,headline:" ",slug:"",text:"",asset:{media:"",credit:"",caption:""}};if(o.type=="image"){if(typeof o.source.name!="undefined")if(o.source.name=="flickr"){f.asset.media="http://flickr.com/photos/"+o.meta.pathalias+"/"+o.meta.id+"/";f.asset.credit="<a href='"+f.asset.media+"'>"+o.attribution.name+"</a>";f.asset.credit+=" on <a href='"+o.source.href+"'>"+o.source.name+"</a>"}else if(o.source.name=="instagram"){f.asset.media=o.permalink;f.asset.credit="<a href='"+o.permalink+"'>"+o.attribution.name+"</a>";f.asset.credit+=" on <a href='"+o.source.href+"'>"+o.source.name+"</a>"}else{f.asset.credit="<a href='"+o.permalink+"'>"+o.attribution.name+"</a>";typeof o.source.href!="undefined"&&(f.asset.credit+=" on <a href='"+o.source.href+"'>"+o.source.name+"</a>");f.asset.media=o.data.image.src}else{f.asset.credit="<a href='"+o.permalink+"'>"+o.attribution.name+"</a>";f.asset.media=o.data.image.src}f.slug=o.attribution.name;if(typeof o.data.image.caption!="undefined"&&o.data.image.caption!="undefined"){f.asset.caption=o.data.image.caption;f.slug=o.data.image.caption}}else if(o.type=="quote"){if(o.permalink.match("twitter")){f.asset.media=o.permalink;f.slug=VMM.Util.untagify(o.data.quote.text)}else if(o.permalink.match("storify")){u=!0;f.asset.media="<blockquote>"+o.data.quote.text.replace(/<\s*\/?\s*b\s*.*?>/g,"")+"</blockquote>"}}else if(o.type=="link"){f.headline=o.data.link.title;f.text=o.data.link.description;o.data.link.thumbnail!="undefined"&&o.data.link.thumbnail!=""?f.asset.media=o.data.link.thumbnail:f.asset.media=o.permalink;f.asset.caption="<a href='"+o.permalink+"' target='_blank'>"+o.data.link.title+"</a>";f.slug=o.data.link.title}else if(o.type=="text