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.
 
 
 
 

32 lines
135 KiB

/*!
TimelineJS
Designed and built by Zach Wise at VéritéCo
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
http://www.gnu.org/licenses/
*//***********************************************
Begin VMM.js
***********************************************//* VéritéCo JS Master
Version: 0.6
Date: June 19, 2012
Copyright 2012 VéritéCo unless part of TimelineJS,
if part of TimelineJS then it inherits TimelineJS's license.
Designed and built by Zach Wise digitalartwork.net
================================================== *//* 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:"jwNGnYw4hE9lmAez4ll0QD+jo6SKBJFknkopLS4FrSAuGfIwyj57AusuR0s8dAo=",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:[]},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(/object/i)!==null:!1},RegExp:function(e){return typeof e=="function"?e.constructor.toString().match(/regexp/i)!==null:!1}},type={of:function(e){for(var t in is)if(is[t](e))return t.toLowerCase()}};if(typeof VMM!="undefined"){VMM.attachElement=function(e,t){typeof jQuery!="undefined"&&jQuery(e).html(t)};VMM.appendElement=function(e,t){typeof jQuery!="undefined"&&jQuery(e).append(t)};VMM.getHTML=function(e){var t;if(typeof jQuery!="undefined"){t=jQuery(e).html();return t}};VMM.getElement=function(e,t){var n;if(typeof jQuery!="undefined"){t?n=jQuery(e).parent().get(0):n=jQuery(e).get(0);return n}};VMM.bindEvent=function(e,t,n,r){var i,s="click",o={};n!=null&&n!=""&&(s=n);o!=null&&o!=""&&(o=r);typeof jQuery!="undefined"&&jQuery(e).bind(s,o,t)};VMM.unbindEvent=function(e,t,n){var r,i="click",s={};n!=null&&n!=""&&(i=n);typeof jQuery!="undefined"&&jQuery(e).unbind(i,t)};VMM.fireEvent=function(e,t,n){var r,i="click",s=[];t!=null&&t!=""&&(i=t);n!=null&&n!=""&&(s=n);typeof jQuery!="undefined"&&jQuery(e).trigger(i,s)};VMM.getJSON=function(e,t,n){if(typeof jQuery!="undefined"){jQuery.ajaxSetup({timeout:3e3});if(VMM.Browser.browser=="Explorer"&&parseInt(VMM.Browser.version,10)>=7&&window.XDomainRequest){trace("IE JSON");var r=e;if(r.match("^http://"))return jQuery.getJSON(r,t,n);if(r.match("^https://")){r=r.replace("https://","http://");return jQuery.getJSON(r,t,n)}return jQuery.getJSON(e,t,n)}return jQuery.getJSON(e,t,n)}};VMM.parseJSON=function(e){if(typeof jQuery!="undefined")return jQuery.parseJSON(e)};VMM.appendAndGetElement=function(e,t,n,r){var i,s="<div>",o="",u="",a="";t!=null&&t!=""&&(s=t);n!=null&&n!=""&&(o=n);r!=null&&r!=""&&(u=r);if(typeof jQuery!="undefined"){i=jQuery(t);i.addClass(o);i.html(u);jQuery(e).append(i)}return i};VMM.Lib={init:function(){return this},hide:function(e,t){t!=null&&t!=""?typeof jQuery!="undefined"&&jQuery(e).hide(t):typeof jQuery!="undefined"&&jQuery(e).hide()},remove:function(e){typeof jQuery!="undefined"&&jQuery(e).remove()},detach:function(e){typeof jQuery!="undefined"&&jQuery(e).detach()},append:function(e,t){typeof jQuery!="undefined"&&jQuery(e).append(t)},prepend:function(e,t){typeof jQuery!="undefined"&&jQuery(e).prepend(t)},show:function(e,t){t!=null&&t!=""?typeof jQuery!="undefined"&&jQuery(e).show(t):typeof jQuery!="undefined"&&jQuery(e).show()},load:function(e,t,n){var r={elem:e};r!=null&&r!=""&&(r=n);typeof jQuery!="undefined"&&jQuery(e).load(r,t)},addClass:function(e,t){typeof jQuery!="undefined"&&jQuery(e).addClass(t)},removeClass:function(e,t){typeof jQuery!="undefined"&&jQuery(e).removeClass(t)},attr:function(e,t,n){if(n!=null&&n!="")typeof jQuery!="undefined"&&jQuery(e).attr(t,n);else if(typeof jQuery!="undefined")return jQuery(e).attr(t)},prop:function(e,t,n){typeof jQuery=="undefined"||!/[1-9]\.[3-9].[1-9]/.test(jQuery.fn.jquery)?VMM.Lib.attribute(e,t,n):jQuery(e).prop(t,n)},attribute:function(e,t,n){if(n!=null&&n!="")typeof jQuery!="undefined"&&jQuery(e).attr(t,n);else if(typeof jQuery!="undefined")return jQuery(e).attr(t)},visible:function(e,t){if(t!=null)typeof jQuery!="undefined"&&(t?jQuery(e).show(0):jQuery(e).hide(0));else if(typeof jQuery!="undefined")return jQuery(e).is(":visible")?!0:!1},css:function(e,t,n){if(n!=null&&n!="")typeof jQuery!="undefined"&&jQuery(e).css(t,n);else if(typeof jQuery!="undefined")return jQuery(e).css(t)},cssmultiple:function(e,t){if(typeof jQuery!="undefined")return jQuery(e).css(t)},offset:function(e){var t;typeof jQuery!="undefined"&&(t=jQuery(e).offset());return t},position:function(e){var t;typeof jQuery!="undefined"&&(t=jQuery(e).position());return t},width:function(e,t){if(t!=null&&t!="")typeof jQuery!="undefined"&&jQuery(e).width(t);else if(typeof jQuery!="undefined")return jQuery(e).width()},height:function(e,t){if(t!=null&&t!="")typeof jQuery!="undefined"&&jQuery(e).height(t);else if(typeof jQuery!="undefined")return jQuery(e).height()},toggleClass:function(e,t){typeof jQuery!="undefined"&&jQuery(e).toggleClass(t)},each:function(e,t){typeof jQuery!="undefined"&&jQuery(e).each(t)},html:function(e,t){var n;if(typeof jQuery!="undefined"){n=jQuery(e).html();return n}if(t!=null&&t!="")typeof jQuery!="undefined"&&jQuery(e).html(t);else{var n;if(typeof jQuery!="undefined"){n=jQuery(e).html();return n}}},find:function(e,t){if(typeof jQuery!="undefined")return jQuery(e).find(t)},stop:function(e){typeof jQuery!="undefined"&&jQuery(e).stop()},delay_animate:function(e,t,n,r,i,s){if(VMM.Browser.device=="mobile"||VMM.Browser.device=="tablet"){var o=Math.round(n/1500*10)/10,u=o+"s";VMM.Lib.css(t,"-webkit-transition","all "+u+" ease");VMM.Lib.css(t,"-moz-transition","all "+u+" ease");VMM.Lib.css(t,"-o-transition","all "+u+" ease");VMM.Lib.css(t,"-ms-transition","all "+u+" ease");VMM.Lib.css(t,"transition","all "+u+" ease");VMM.Lib.cssmultiple(t,_att)}else typeof jQuery!="undefined"&&jQuery(t).delay(e).animate(i,{duration:n,easing:r})},animate:function(e,t,n,r,i,s){var o="easein",u=!1,a=1e3,f={};t!=null&&(t<1?a=1:a=Math.round(t));n!=null&&n!=""&&(o=n);i!=null&&i!=""&&(u=i);r!=null?f=r:f={opacity:0};if(VMM.Browser.device=="mobile"||VMM.Browser.device=="tablet"){var l=Math.round(a/1500*10)/10,c=l+"s";o=" cubic-bezier(0.33, 0.66, 0.66, 1)";for(x in f)if(Object.prototype.hasOwnProperty.call(f,x)){trace(x+" to "+f[x]);VMM.Lib.css(e,"-webkit-transition",x+" "+c+o);VMM.Lib.css(e,"-moz-transition",x+" "+c+o);VMM.Lib.css(e,"-o-transition",x+" "+c+o);VMM.Lib.css(e,"-ms-transition",x+" "+c+o);VMM.Lib.css(e,"transition",x+" "+c+o)}VMM.Lib.cssmultiple(e,f)}else typeof jQuery!="undefined"&&(s!=null&&s!=""?jQuery(e).animate(f,{queue:u,duration:a,easing:o,complete:s}):jQuery(e).animate(f,{queue:u,duration:a,easing:o}))}}}if(typeof jQuery!="undefined"){(function(e){window.XDomainRequest&&e.ajaxTransport(function(t){if(t.crossDomain&&t.async){if(t.timeout){t.xdrTimeout=t.timeout;delete t.timeout}var n;return{send:function(r,i){function o(t,r,s,o){n.onload=n.onerror=n.ontimeout=e.noop;n=undefined;i(t,r,s,o)}n=new XDomainRequest;n.open(t.type,t.url);n.onload=function(){o(200,"OK",{text:n.responseText},"Content-Type: "+n.contentType)};n.onerror=function(){o(404,"Not Found")};if(t.xdrTimeout){n.ontimeout=function(){o(0,"timeout")};n.timeout=t.xdrTimeout}n.send(t.hasContent&&t.data||null)},abort:function(){if(n){n.onerror=e.noop();n.abort()}}}}})})(jQuery);jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,t,n,r,i){return jQuery.easing[jQuery.easing.def](e,t,n,r,i)},easeInExpo:function(e,t,n,r,i){return t==0?n:r*Math.pow(2,10*(t/i-1))+n},easeOutExpo:function(e,t,n,r,i){return t==i?n+r:r*(-Math.pow(2,-10*t/i)+1)+n},easeInOutExpo:function(e,t,n,r,i){return t==0?n:t==i?n+r:(t/=i/2)<1?r/2*Math.pow(2,10*(t-1))+n:r/2*(-Math.pow(2,-10*--t)+2)+n},easeInQuad:function(e,t,n,r,i){return r*(t/=i)*t+n},easeOutQuad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n},easeInOutQuad:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t+n:-r/2*(--t*(t-2)-1)+n}})}if(typeof VMM!="undefined"&&typeof VMM.Browser=="undefined"){VMM.Browser={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";this.device=this.searchDevice(navigator.userAgent);this.orientation=this.searchOrientation(window.orientation)},searchOrientation:function(e){var t="";e==0||e==180?t="portrait":e==90||e==-90?t="landscape":t="normal";return t},searchDevice:function(e){var t="";e.match(/Android/i)||e.match(/iPhone|iPod/i)?t="mobile":e.match(/iPad/i)?t="tablet":e.match(/BlackBerry/i)||e.match(/IEMobile/i)?t="other mobile":t="desktop";return t},searchString:function(e){for(var t=0;t<e.length;t++){var n=e[t].string,r=e[t].prop;this.versionSearchString=e[t].versionSearch||e[t].identity;if(n){if(n.indexOf(e[t].subString)!=-1)return e[t].identity}else if(r)return e[t].identity}},searchVersion:function(e){var t=e.indexOf(this.versionSearchString);if(t==-1)return;return parseFloat(e.substring(t+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera",versionSearch:"Version"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.userAgent,subString:"iPad",identity:"iPad"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};VMM.Browser.init()}typeof VMM!="undefined"&&typeof VMM.FileExtention=="undefined"&&(VMM.FileExtention={googleDocType:function(e){var t=e,n="",r=["DOC","DOCX","XLS","XLSX","PPT","PPTX","PDF","PAGES","AI","PSD","TIFF","DXF","SVG","EPS","PS","TTF","XPS","ZIP","RAR"],i=!1;n=t.substr(t.length-5,5);for(var s=0;s<r.length;s++)if(n.toLowerCase().match(r[s].toString().toLowerCase())||t.match("docs.google.com"))i=!0;return i}});if(typeof VMM!="undefined"&&typeof VMM.Date=="undefined"){VMM.Date={init:function(){return this},dateformats:{year:"yyyy",month_short:"mmm",month:"mmmm yyyy",full_short:"mmm d",full:"mmmm d',' yyyy",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' hh:MM TT",full_long_small_date:"hh:MM TT'<br/><small>mmm d',' yyyy'</small>'"},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."],hour:[1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12],hour_suffix:["am"],bc_format:{year:"yyyy",month_short:"mmm",month:"mmmm yyyy",full_short:"mmm d",full:"mmmm d',' yyyy",time_no_seconds_short:"h:MM TT",time_no_seconds_small_date:"dddd', 'h:MM TT'<br/><small>'mmmm d',' yyyy'</small>'",full_long:"dddd',' mmm d',' yyyy 'at' hh:MM TT",full_long_small_date:"hh:MM TT'<br/><small>'dddd',' mmm d',' yyyy'</small>'"},setLanguage:function(e){trace("SET DATE LANGUAGE");VMM.Date.dateformats=e.dateformats;VMM.Date.month=e.date.month;VMM.Date.month_abbr=e.date.month_abbr;VMM.Date.day=e.date.day;VMM.Date.day_abbr=e.date.day_abbr;dateFormat.i18n.dayNames=e.date.day_abbr.concat(e.date.day);dateFormat.i18n.monthNames=e.date.month_abbr.concat(e.date.month)},parse:function(e){"use strict";var t,n,r,i;if(type.of(e)=="date")t=e;else{t=new Date(0,0,1,0,0,0,0);if(e.match(/,/gi)){n=e.split(",");for(var s=0;s<n.length;s++)n[s]=parseInt(n[s],10);n[0]&&t.setFullYear(n[0]);n[1]>1&&t.setMonth(n[1]-1);n[2]>1&&t.setDate(n[2]);n[3]>1&&t.setHours(n[3]);n[4]>1&&t.setMinutes(n[4]);n[5]>1&&t.setSeconds(n[5]);n[6]>1&&t.setMilliseconds(n[6])}else if(e.match("/")){if(e.match(" ")){i=e.split(" ");if(e.match(":")){r=i[1].split(":");r[0]>=1&&t.setHours(r[0]);r[1]>=1&&t.setMinutes(r[1]);r[2]>=1&&t.setSeconds(r[2]);r[3]>=1&&t.setMilliseconds(r[3])}n=i[0].split("/")}else n=e.split("/");n[2]&&t.setFullYear(n[2]);n[0]>1&&t.setMonth(n[0]-1);n[1]>1&&t.setDate(n[1])}else if(e.length<=5){t.setFullYear(parseInt(e,10));t.setMonth(0);t.setDate(1);t.setHours(0);t.setMinutes(0);t.setSeconds(0);t.setMilliseconds(0)}else if(e.match("T"))if(navigator.userAgent.match(/MSIE\s(?!9.0)/)){i=e.split("T");if(e.match(":")){r=_time_parse[1].split(":");r[0]>=1&&t.setHours(r[0]);r[1]>=1&&t.setMinutes(r[1]);r[2]>=1&&t.setSeconds(r[2]);r[3]>=1&&t.setMilliseconds(r[3])}_d_array=i[0].split("-");n[0]&&t.setFullYear(n[0]);n[1]>1&&t.setMonth(n[1]-1);n[2]>1&&t.setDate(n[2])}else t=new Date(Date.parse(e));else t=new Date(parseInt(e.slice(0,4),10),parseInt(e.slice(4,6),10)-1,parseInt(e.slice(6,8),10),parseInt(e.slice(8,10),10),parseInt(e.slice(10,12),10))}return t},prettyDate:function(e,t,n){var r,i,s,o,u=!1,a,f,l;n!=null&&(u=!0);if(type.of(e)=="date"){e.getMonth()===0&&e.getDate()==1&&e.getHours()===0&&e.getMinutes()===0?s=VMM.Date.dateformats.year:e.getDate()<=1&&e.getHours()===0&&e.getMinutes()===0?t?s=VMM.Date.dateformats.month_short:s=VMM.Date.dateformats.month:e.getHours()===0&&e.getMinutes()===0?t?s=VMM.Date.dateformats.full_short:s=VMM.Date.dateformats.full:e.getMinutes()===0?t?s=VMM.Date.dateformats.time_no_seconds_short:s=VMM.Date.dateformats.time_no_seconds_small_date:t?s=VMM.Date.dateformats.time_no_seconds_short:s=VMM.Date.dateformats.full_long;r=dateFormat(e,s,!1);o=r.split(" ");for(var c=0;c<o.length;c++)if(parseInt(o[c],10)<0){trace("YEAR IS BC");a=o[c];f=Math.abs(parseInt(o[c],10));l=f.toString()+" B.C.";r=r.replace(a,l)}if(u){i=dateFormat(n,s);o=i.split(" ");for(var h=0;h<o.length;h++)if(parseInt(o[h],10)<0){trace("YEAR IS BC");a=o[h];f=Math.abs(parseInt(o[h],10));l=f.toString()+" B.C.";i=i.replace(a,l)}}}else{trace("NOT A VALID DATE?");trace(e)}return u?r+" &mdash; "+i:r}}.init();var dateFormat=function(){var e=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,t=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,r=function(e,t){e=String(e);t=t||2;while(e.length<t)e="0"+e;return e};return function(i,s,o){var u=dateFormat;if(arguments.length==1&&Object.prototype.toString.call(i)=="[object String]"&&!/\d/.test(i)){s=i;i=undefined}isNaN(i)&&trace("invalid date "+i);s=String(u.masks[s]||s||u.masks["default"]);if(s.slice(0,4)=="UTC:"){s=s.slice(4);o=!0}var a=o?"getUTC":"get",f=i[a+"Date"](),l=i[a+"Day"](),c=i[a+"Month"](),h=i[a+"FullYear"](),p=i[a+"Hours"](),d=i[a+"Minutes"](),v=i[a+"Seconds"](),m=i[a+"Milliseconds"](),g=o?0:i.getTimezoneOffset(),y={d:f,dd:r(f),ddd:u.i18n.dayNames[l],dddd:u.i18n.dayNames[l+7],m:c+1,mm:r(c+1),mmm:u.i18n.monthNames[c],mmmm:u.i18n.monthNames[c+12],yy:String(h).slice(2),yyyy:h,h:p%12||12,hh:r(p%12||12),H:p,HH:r(p),M:d,MM:r(d),s:v,ss:r(v),l:r(m,3),L:r(m>99?Math.round(m/10):m),t:p<12?"a":"p",tt:p<12?"am":"pm",T:p<12?"A":"P",TT:p<12?"AM":"PM",Z:o?"UTC":(String(i).match(t)||[""]).pop().replace(n,""),o:(g>0?"-":"+")+r(Math.floor(Math.abs(g)/60)*100+Math.abs(g)%60,4),S:["th","st","nd","rd"][f%10>3?0:(f%100-f%10!=10)*f%10]};return s.replace(e,function(e){return e in y?y[e]:e.slice(1,e.length-1)})}}();dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};Date.prototype.format=function(e,t){return dateFormat(this,e,t)}}typeof VMM!="undefined"&&typeof VMM.Util=="undefined"&&(VMM.Util={init:function(){return this},correctProtocol:function(e){var t=window.parent.location.protocol.toString(),n="",r=e.split("://",2);t.match("http")?n=t:n="https";return n+"://"+r[1]},getObjectAttributeByIndex:function(e,t){if(typeof e!="undefined"){var n=0;for(var r in e){if(t===n)return e[r];n++}return""}return""},randomBetween:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},average:function(e){var t={mean:0,variance:0,deviation:0},n=e.length;for(var r,i=0,s=n;s--;i+=e[s]);for(r=t.mean=i/n,s=n,i=0;s--;i+=Math.pow(e[s]-r,2));return t.deviation=Math.sqrt(t.variance=i/n),t},customSort:function(e,t){var n=e,r=t;return n==r?0:n>r?1:-1},deDupeArray:function(e){var t,n=e.length,r=[],i={};for(t=0;t<n;t++)i[e[t]]=0;for(t in i)r.push(t);return r},number2money:function(e,t,n){var t=t!==null?t:!0,n=n!==null?n:!1,r=VMM.Math2.floatPrecision(e,2),i=this.niceNumber(r);!i.split(/\./g)[1]&&n&&(i+=".00");t&&(i="$"+i);return i},wordCount:function(e){var t=e+" ",n=/^[^A-Za-z0-9\'\-]+/gi,r=t.replace(n,""),i=/[^A-Za-z0-9\'\-]+/gi,s=r.replace(i," "),o=s.split(" "),u=o.length-1;t.length<2&&(u=0);return u},ratio:{fit:function(e,t,n,r){var i={width:0,height:0};i.width=e;i.height=Math.round(e/n*r);if(i.height>t){i.height=t;i.width=Math.round(t/r*n);i.width>e&&trace("FIT: DIDN'T FIT!!! ")}return i},r16_9:function(e,t){if(e!==null&&e!=="")return Math.round(t/16*9);if(t!==null&&t!=="")return Math.round(e/9*16)},r4_3:function(e,t){if(e!==null&&e!=="")return Math.round(t/4*3);if(t!==null&&t!=="")return Math.round(e/3*4)}},doubledigit:function(e){return(e<10?"0":"")+e},truncateWords:function(e,t,n){t||(t=30);n||(n=t);var r=/^[^A-Za-z0-9\'\-]+/gi,i=e.replace(r,""),s=i.split(" "),o=[];t=Math.min(s.length,t);n=Math.min(s.length,n);for(var u=0;u<t;u++)o.push(s[u]);for(var a=t;u<n;u++){var f=s[u];o.push(f);if(f.charAt(f.length-1)==".")break}return o.join(" ")},linkify:function(e,t,n){var r=/\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim,i=/(^|[^\/])(www\.[\S]+(\b|$))/gim,s=/(([a-zA-Z0-9_\-\.]+)@[a-zA-Z_]+?(?:\.[a-zA-Z]{2,6}))+/gim;return e.replace(r,"<a target='_blank' href='$&' onclick='void(0)'>$&</a>").replace(i,"$1<a target='_blank' onclick='void(0)' href='http://$2'>$2</a>").replace(s,"<a target='_blank' onclick='void(0)' href='mailto:$1'>$1</a>")},linkify_with_twitter:function(e,t,n){function u(e){var t=/(\b(https?|ftp|file):\/\/([-A-Z0-9+&@#%?=~_|!:,.;]*)([-A-Z0-9+&@#%?\/=~_|!:,.;]*)[-A-Z0-9+&@#\/%=~_|])/ig;return e.replace(t,"<a href='$1' target='_blank'>$3</a>")}var r=/\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim,i=/(\()((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\))|(\[)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\])|(\{)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\})|(<|&(?:lt|#60|#x3c);)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(>|&(?:gt|#62|#x3e);)|((?:^|[^=\s'"\]])\s*['"]?|[^=\s]\s+)(\b(?:ht|f)tps?:\/\/[a-z0-9\-._~!$'()*+,;=:\/?#[\]@%]+(?:(?!&(?:gt|#0*62|#x0*3e);|&(?:amp|apos|quot|#0*3[49]|#x0*2[27]);[.!&',:?;]?(?:[^a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]|$))&[a-z0-9\-._~!$'()*+,;=:\/?#[\]@%]*)*[a-z0-9\-_~$()*+=\/#[\]@%])/img,s='$1$4$7$10$13<a href="$2$5$8$11$14" class="hyphenate">$2$5$8$11$14</a>$3$6$9$12',o=/(^|[^\/])(www\.[\S]+(\b|$))/gim,a=/(([a-zA-Z0-9_\-\.]+)@[a-zA-Z_]+?(?:\.[a-zA-Z]{2,6}))+/gim,f=/\B@([\w-]+)/gm,l=/(#([\w]+))/g;return e.replace(i,s).replace(o,"$1<a target='_blank' class='hyphenate' onclick='void(0)' href='http://$2'>$2</a>").replace(a,"<a target='_blank' onclick='void(0)' href='mailto:$1'>$1</a>").replace(f,"<a href='http://twitter.com/$1' target='_blank' onclick='void(0)'>@$1</a>").replace(l,"<a href='http://twitter.com/#search?q=%23$2' target='_blank' 'void(0)'>$1</a>")},linkify_wikipedia:function(e){var t=/<i[^>]*>(.*?)<\/i>/gim;return e.replace(t,"<a target='_blank' href='http://en.wikipedia.org/wiki/$&' onclick='void(0)'>$&</a>").replace(/<i\b[^>]*>/gim,"").replace(/<\/i>/gim,"").replace(/<b\b[^>]*>/gim,"").replace(/<\/b>/gim,"")},unlinkify:function(e){if(!e)return e;e=e.replace(/<a\b[^>]*>/i,"");e=e.replace(/<\/a>/i,"");return e},untagify:function(e){if(!e)return e;e=e.replace(/<\s*\w.*?>/g,"");return e},nl2br:function(e){return e.replace(/(\r\n|[\r\n]|\\n|\\r)/g,"<br/>")},unique_ID:function(e){var t=function(e){return Math.floor(Math.random()*e)},n=function(){var e="abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ";return e.substr(t(62),1)},r=function(e){var t="";for(var r=0;r<e;r++)t+=n();return t};return r(e)},isEven:function(e){return e%2===0?!0:!1},getUrlVars:function(e){var t=e.toString();t.match("&#038;")?t=t.replace("&#038;","&"):t.match("&#38;")?t=t.replace("&#38;","&"):t.match("&amp;")&&(t=t.replace("&amp;","&"));var n=[],r,i=t.slice(t.indexOf("?")+1).split("&");for(var s=0;s<i.length;s++){r=i[s].split("=");n.push(r[0]);n[r[0]]=r[1]}return n},toHTML:function(e){e=this.nl2br(e);e=this.linkify(e);return e.replace(/\s\s/g,"&nbsp;&nbsp;")},toCamelCase:function(e,t){t!==!1&&(t=!0);var n=(t?e.toLowerCase():e).split(" ");for(var r=0;r<n.length;r++)n[r]=n[r].substr(0,1).toUpperCase()+n[r].substr(1);return n.join(" ")},properQuotes:function(e){return e.replace(/\"([^\"]*)\"/gi,"&#8220;$1&#8221;")},niceNumber:function(e){var t=String(Math.abs(Number(e))),n=t.split(/\./g)[0],r=t.split(/\./g)[1],i="",s=n.toArray();s.reverse();for(var o=1;o<=s.length;o++)o%3==0&&o<s.length?i=","+s[o-1]+i:i=s[o-1]+i;return r!=null&&r!=""&&r!=undefined?i+"."+r:i},toTitleCase:function(e){if(VMM.Browser.browser=="Explorer"&&parseInt(VMM.Browser.version,10)>=7)return e.replace("_","%20");var t={__smallWords:["a","an","and","as","at","but","by","en","for","if","in","of","on","or","the","to","v[.]?","via","vs[.]?"],init:function(){this.__smallRE=this.__smallWords.join("|");this.__lowerCaseWordsRE=new RegExp("\\b("+this.__smallRE+")\\b","gi");this.__firstWordRE=new RegExp("^([^a-zA-Z0-9 \\r\\n\\t]*)("+this.__smallRE+")\\b","gi");this.__lastWordRE=new RegExp("\\b("+this.__smallRE+")([^a-zA-Z0-9 \\r\\n\\t]*)$","gi")},toTitleCase:function(e){var t="",n=e.split(/([:.;?!][ ]|(?:[ ]|^)["“])/);for(var r=0;r<n.length;++r){var i=n[r];i=i.replace(/\b([a-zA-Z][a-z.'’]*)\b/g,this.__titleCaseDottedWordReplacer);i=i.replace(this.__lowerCaseWordsRE,this.__lowerReplacer);i=i.replace(this.__firstWordRE,this.__firstToUpperCase);i=i.replace(this.__lastWordRE,this.__firstToUpperCase);t+=i}t=t.replace(/ V(s?)\. /g," v$1. ");t=t.replace(/(['’])S\b/g,"$1s");t=t.replace(/\b(AT&T|Q&A)\b/ig,this.__upperReplacer);return t},__titleCaseDottedWordReplacer:function(e){return e.match(/[a-zA-Z][.][a-zA-Z]/)?e:t.__firstToUpperCase(e)},__lowerReplacer:function(e){return e.toLowerCase()},__upperReplacer:function(e){return e.toUpperCase()},__firstToUpperCase:function(e){var t=e.split(/(^[^a-zA-Z0-9]*[a-zA-Z0-9])(.*)$/);t[1]&&(t[1]=t[1].toUpperCase());return t.join("")}};t.init();e=e.replace(/_/g," ");e=t.toTitleCase(e);return e}}.init());window.loadedJS=[];typeof VMM!="undefined"&&typeof VMM.LoadLib=="undefined"&&(VMM.LoadLib=function(e){function a(e){var t=!1;for(var n=0;n<u.length;n++)u[n]==e&&(t=!0);t||u.push(e);return t}function f(t,n){var r=e.createElement(t),i;for(i in n)n.hasOwnProperty(i)&&r.setAttribute(i,n[i]);return r}function l(e){var t=r[e],n,o;if(t){n=t.callback;o=t.urls;o.shift();i=0;if(!o.length){n&&n.call(t.context,t.obj);r[e]=null;s[e].length&&h(e)}}}function c(){var n=navigator.userAgent;t={async:e.createElement("script").async===!0};(t.webkit=/AppleWebKit\//.test(n))||(t.ie=/MSIE/.test(n))||(t.opera=/Opera/.test(n))||(t.gecko=/Gecko\//.test(n))||(t.unknown=!0)}function h(i,o,u,a,h){var v=function(){l(i)},m=i==="css",g=[],y,b,w,E,S,x;t||c();if(o){o=typeof o=="string"?[o]:o.concat();if(m||t.async||t.gecko||t.opera)s[i].push({urls:o,callback:u,obj:a,context:h});else for(y=0,b=o.length;y<b;++y)s[i].push({urls:[o[y]],callback:y===b-1?u:null,obj:a,context:h})}if(r[i]||!(E=r[i]=s[i].shift()))return;n||(n=e.head||e.getElementsByTagName("head")[0]);S=E.urls;for(y=0,b=S.length;y<b;++y){x=S[y];if(m)w=t.gecko?f("style"):f("link",{href:x,rel:"stylesheet"});else{w=f("script",{src:x});w.async=!1}w.className="lazyload";w.setAttribute("charset","utf-8");if(t.ie&&!m)w.onreadystatechange=function(){if(/loaded|complete/.test(w.readyState)){w.onreadystatechange=null;v()}};else if(m&&(t.gecko||t.webkit))if(t.webkit){E.urls[y]=w.href;d()}else{w.innerHTML='@import "'+x+'";';p(w)}else w.onload=w.onerror=v;g.push(w)}for(y=0,b=g.length;y<b;++y)n.appendChild(g[y])}function p(e){var t;try{t=!!e.sheet.cssRules}catch(n){i+=1;i<200?setTimeout(function(){p(e)},50):t&&l("css");return}l("css")}function d(){var e=r.css,t;if(e){t=o.length;while(--t>=0)if(o[t].href===e.urls[0]){l("css");break}i+=1;e&&(i<200?setTimeout(d,50):l("css"))}}var t,n,r={},i=0,s={css:[],js:[]},o=e.styleSheets,u=[];return{css:function(e,t,n,r){if(a(e))return t;h("css",e,t,n,r)},js:function(e,t,n,r){if(a(e))return t;h("js",e,t,n,r)}}}(this.document));typeof VMM!="undefined"&&typeof VMM.ExternalAPI=="undefined"&&(VMM.ExternalAPI={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.twitter.active&&VMM.ExternalAPI.twitter.pushQue();VMM.master_config.flickr.active&&VMM.ExternalAPI.flickr.pushQue()},twitter:{tweetArray:[],get:function(e,t){var n={mid:e,id:t};VMM.master_config.twitter.que.push(n);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=?",s=setTimeout(VMM.ExternalAPI.twitter.errorTimeOut,VMM.master_config.timers.api,e),o=setTimeout(t,VMM.master_config.timers.api,e);VMM.getJSON(i,function(t){var n=t.id_str,r="<blockquote><p>",i=VMM.Util.linkify_with_twitter(t.text,"_blank");r+=i;r+="</p></blockquote>";typeof t.entities.media!="undefined"&&t.entities.media[0].type=="photo";r+="<div class='vcard author'>";r+="<a class='screen-name url' href='https://twitter.com/"+t.user.screen_name+"' data-screen-name='"+t.user.screen_name+"' target='_blank'>";r+="<span class='avatar'><img src=' "+t.user.profile_image_url+"' alt=''></span>";r+="<span class='fn'>"+t.user.name+"</span>";r+="<span class='nickname'>@"+t.user.screen_name+"<span class='thumbnail-inline'></span></span>";r+="</a>";r+="</div>";VMM.attachElement("#"+e.id.toString(),r);VMM.attachElement("#text_thumb_"+e.id.toString(),t.text)}).error(function(t,n,r){trace("TWITTER error");trace("TWITTER ERROR: "+n+" "+t.responseText);VMM.attachElement("#"+e.id,VMM.MediaElement.loadingmessage("ERROR LOADING TWEET "+e.mid))}).success(function(e){clearTimeout(s);clearTimeout(o);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))})},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)}},getHTML:function(e){var t="http://api.twitter.com/1/statuses/oembed.json?id="+e+"&callback=?";VMM.getJSON(t,VMM.ExternalAPI.twitter.onJSONLoaded)},onJSONLoaded:function(e){trace("TWITTER JSON LOADED");var t=e.id;VMM.attachElement("#"+t,VMM.Util.linkify_with_twitter(e.html))},parseTwitterDate:function(e){var t=new Date(Date.parse(e));return t},prettyParseTwitterDate:function(e){var t=new Date(Date.parse(e));return VMM.Date.prettyDate(t,!0)},getTweets:function(e){var t=[],n=e.length;for(var r=0;r<e.length;r++){var i="";e[r].tweet.match("status/")?i=e[r].tweet.split("status/")[1]:e[r].tweet.match("statuses/")?i=e[r].tweet.split("statuses/")[1]:i="";var s="http://api.twitter.com/1/statuses/show.json?id="+i+"&include_entities=true&callback=?";VMM.getJSON(s,function(e){var r={},i="<div class='twitter'><blockquote><p>",s=VMM.Util.linkify_with_twitter(e.text,"_blank");i+=s;i+="</p>";i+="— "+e.user.name+" (<a href='https://twitter.com/"+e.user.screen_name+"'>@"+e.user.screen_name+"</a>) <a href='https://twitter.com/"+e.user.screen_name+"/status/"+e.id+"'>"+VMM.ExternalAPI.twitter.prettyParseTwitterDate(e.created_at)+" </a></blockquote></div>";r.content=i;r.raw=e;t.push(r);if(t.length==n){var o={tweetdata:t};VMM.fireEvent(global,"TWEETSLOADED",o)}}).success(function(){trace("second success")}).error(function(){trace("error")}).complete(function(){trace("complete")})}},getTweetSearch:function(e,t){var n=40;t!=null&&t!=""&&(n=t);var r="http://search.twitter.com/search.json?q="+e+"&rpp="+n+"&include_entities=true&result_type=mixed",i=[];VMM.getJSON(r,function(e){for(var t=0;t<e.results.length;t++){var n={},r="<div class='twitter'><blockquote><p>",s=VMM.Util.linkify_with_twitter(e.results[t].text,"_blank");r+=s;r+="</p>";r+="— "+e.results[t].from_user_name+" (<a href='https://twitter.com/"+e.results[t].from_user+"'>@"+e.results[t].from_user+"</a>) <a href='https://twitter.com/"+e.results[t].from_user+"/status/"+e.id+"'>"+VMM.ExternalAPI.twitter.prettyParseTwitterDate(e.results[t].created_at)+" </a></blockquote></div>";n.content=r;n.raw=e.results[t];i.push(n)}var o={tweetdata:i};VMM.fireEvent(global,"TWEETSLOADED",o)})},prettyHTML:function(e,t){var e=e.toString(),n={twitterid:e},r="http://api.twitter.com/1/statuses/show.json?id="+e+"&include_entities=true&callback=?",i=setTimeout(VMM.ExternalAPI.twitter.errorTimeOut,VMM.master_config.timers.api,e);VMM.getJSON(r,VMM.ExternalAPI.twitter.formatJSON).error(function(t,n,r){trace("TWITTER error");trace("TWITTER ERROR: "+n+" "+t.responseText);VMM.attachElement("#twitter_"+e,"<p>ERROR LOADING TWEET "+e+"</p>")}).success(function(e){clearTimeout(i);t&&VMM.ExternalAPI.twitter.secondaryMedia(e)})},formatJSON:function(e){var t=e.id_str,n="<blockquote><p>",r=VMM.Util.linkify_with_twitter(e.text,"_blank");n+=r;n+="</p></blockquote>";n+="<div class='vcard author'>";n+="<a class='screen-name url' href='https://twitter.com/"+e.user.screen_name+"' data-screen-name='"+e.user.screen_name+"' target='_blank'>";n+="<span class='avatar'><img src=' "+e.user.profile_image_url+"' alt=''></span>";n+="<span class='fn'>"+e.user.name+"</span>";n+="<span class='nickname'>@"+e.user.screen_name+"<span class='thumbnail-inline'></span></span>";n+="</a>";n+="</div>";typeof e.entities.media!="undefined"&&e.entities.media[0].type=="photo"&&(n+="<img src=' "+e.entities.media[0].media_url+"' alt=''>");VMM.attachElement("#twitter_"+t.toString(),n);VMM.attachElement("#text_thumb_"+t.toString(),e.text)}},googlemaps:{get:function(e,t){var n,r,i;i=VMM.Util.getUrlVars(e);VMM.master_config.Timeline.api_keys.google!=""?r=VMM.master_config.Timeline.api_keys.google:r=Aes.Ctr.decrypt(VMM.master_config.api_keys_master.google,VMM.master_config.vp,256);var s="http://maps.googleapis.com/maps/api/js?key="+r+"&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady",o={url:e,vars:i,id:t};if(VMM.master_config.googlemaps.active)VMM.master_config.googlemaps.que.push(o);else{VMM.master_config.googlemaps.que.push(o);VMM.master_config.googlemaps.api_loaded||VMM.LoadLib.js(s,function(){trace("Google Maps API Library Loaded")})}},create:function(e){function i(e){if(e in VMM.ExternalAPI.googlemaps.map_providers){t=VMM.ExternalAPI.googlemaps.map_attribution[VMM.ExternalAPI.googlemaps.map_providers[e].attribution];return VMM.ExternalAPI.googlemaps.map_providers[e]}if(VMM.ExternalAPI.googlemaps.defaultType(e)){trace("GOOGLE MAP DEFAULT TYPE");return google.maps.MapTypeId[e.toUpperCase()]}trace("Not a maptype: "+e)}function d(){var t=e.url+"&output=kml";t=t.replace("&output=embed","");var n=new google.maps.KmlLayer(t,{preserveViewport:!0}),i=new google.maps.InfoWindow;n.setMap(r);google.maps.event.addListenerOnce(n,"defaultviewport_changed",function(){r.fitBounds(n.getDefaultViewport());a&&r.panTo(s);f&&r.setZoom(u)});google.maps.event.addListener(n,"click",function(e){function n(e){i.setContent(e);i.open(r)}var t=e.featureData.description;n(t)})}var t="",n,r;google.maps.VeriteMapType=function(e){if(VMM.ExternalAPI.googlemaps.defaultType(e))return google.maps.MapTypeId[e.toUpperCase()];var t=i(e);return google.maps.ImageMapType.call(this,{getTileUrl:function(e,n){var r=(n+e.x+e.y)%VMM.ExternalAPI.googlemaps.map_subdomains.length;return[t.url.replace("{S}",VMM.ExternalAPI.googlemaps.map_subdomains[r]).replace("{Z}",n).replace("{X}",e.x).replace("{Y}",e.y).replace("{z}",n).replace("{x}",e.x).replace("{y}",e.y)]},tileSize:new google.maps.Size(256,256),name:e,minZoom:t.minZoom,maxZoom:t.maxZoom})};google.maps.VeriteMapType.prototype=new google.maps.ImageMapType("_");type.of(VMM.master_config.Timeline.maptype)=="string"?VMM.ExternalAPI.googlemaps.defaultType(VMM.master_config.Timeline.maptype)?n=google.maps.MapTypeId[VMM.master_config.Timeline.maptype.toUpperCase()]:n=VMM.master_config.Timeline.maptype:n="toner";var s=new google.maps.LatLng(41.875696,-87.624207),o,u=11,a=!1,f=!1,l;if(type.of(VMM.Util.getUrlVars(e.url)["ll"])=="string"){a=!0;o=VMM.Util.getUrlVars(e.url).ll.split(",");s=new google.maps.LatLng(parseFloat(o[0]),parseFloat(o[1]))}else if(type.of(VMM.Util.getUrlVars(e.url)["sll"])=="string"){o=VMM.Util.getUrlVars(e.url).sll.split(",");s=new google.maps.LatLng(parseFloat(o[0]),parseFloat(o[1]))}if(type.of(VMM.Util.getUrlVars(e.url)["z"])=="string"){f=!0;u=parseFloat(VMM.Util.getUrlVars(e.url).z)}var c={zoom:u,disableDefaultUI:!0,mapTypeControl:!1,zoomControl:!0,zoomControlOptions:{style:google.maps.ZoomControlStyle.SMALL,position:google.maps.ControlPosition.TOP_RIGHT},center:s,mapTypeId:n,mapTypeControlOptions:{mapTypeIds:[n]}},h=e.id.toString()+"_gmap";VMM.attachElement("#"+e.id,"<div class='google-map' id='"+h+"' style='width=100%;height=100%;'></div>");var r=new google.maps.Map(document.getElementById(h),c);if(!VMM.ExternalAPI.googlemaps.defaultType(VMM.master_config.Timeline.maptype)){r.mapTypes.set(n,new google.maps.VeriteMapType(n));var p="<div class='map-attribution'><div class='attribution-text'>"+t+"</div></div>";VMM.appendElement("#"+h,p)}d()},pushQue:function(){for(var e=0;e<VMM.master_config.googlemaps.que.length;e++)VMM.ExternalAPI.googlemaps.create(VMM.master_config.googlemaps.que[e]);VMM.master_config.googlemaps.que=[]},onMapAPIReady:function(){VMM.master_config.googlemaps.map_active=!0;VMM.master_config.googlemaps.places_active=!0;VMM.ExternalAPI.googlemaps.onAPIReady()},onPlacesAPIReady:function(){VMM.master_config.googlemaps.places_active=!0;VMM.ExternalAPI.googlemaps.onAPIReady()},onAPIReady:function(){if(!VMM.master_config.googlemaps.active&&VMM.master_config.googlemaps.map_active&&VMM.master_config.googlemaps.places_active){VMM.master_config.googlemaps.active=!0;VMM.ExternalAPI.googlemaps.pushQue()}},defaultType:function(e){return e.toLowerCase()=="satellite"||e.toLowerCase()=="hybrid"||e.toLowerCase()=="terrain"||e.toLowerCase()=="roadmap"?!0:!1},map_subdomains:["","a.","b.","c.","d."],map_attribution:{stamen:"Map tiles by <a href='http://stamen.com'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://creativecommons.org/licenses/by-sa/3.0'>CC BY SA</a>.",apple:"Map data &copy; 2012 Apple, Imagery &copy; 2012 Apple"},map_providers:{toner:{url:"http://{S}tile.stamen.com/toner/{Z}/{X}/{Y}.png",minZoom:0,maxZoom:20,attribution:"stamen"},"toner-lines":{url:"http://{S}tile.stamen.com/toner-lines/{Z}/{X}/{Y}.png",minZoom:0,maxZoom:20,attribution:"stamen"},"toner-labels":{url:"http://{S}tile.stamen.com/toner-labels/{Z}/{X}/{Y}.png",minZoom:0,maxZoom:20,attribution:"stamen"},sterrain:{url:"http://{S}tile.stamen.com/terrain/{Z}/{X}/{Y}.jpg",minZoom:4,maxZoom:20,attribution:"stamen"},apple:{url:"http://gsp2.apple.com/tile?api=1&style=slideshow&layers=default&lang=en_US&z={z}&x={x}&y={y}&v=9",minZoom:4,maxZoom:14,attribution:"apple"},watercolor:{url:"http://{S}tile.stamen.com/watercolor/{Z}/{X}/{Y}.jpg",minZoom:3,maxZoom:16,attribution:"stamen"}}},googleplus:{get:function(e,t){var n,r={user:e,activity:t};VMM.master_config.googleplus.que.push(r);VMM.master_config.googleplus.active=!0},create:function(e,t){var n="",r="",i="",s="",o="",u,a;googleplus_timeout=setTimeout(VMM.ExternalAPI.googleplus.errorTimeOut,VMM.master_config.timers.api,e),callback_timeout=setTimeout(t,VMM.master_config.timers.api,e);VMM.master_config.Timeline.api_keys.google!=""?r=VMM.master_config.Timeline.api_keys.google:r=Aes.Ctr.decrypt(VMM.master_config.api_keys_master.google,VMM.master_config.vp,256);u="https://www.googleapis.com/plus/v1/people/"+e.user+"/activities/public?alt=json&maxResults=100&fields=items(id,url)&key="+r;n="GOOGLE PLUS API CALL";VMM.getJSON(u,function(t){for(var u=0;u<t.items.length;u++){trace("loop");if(t.items[u].url.split("posts/")[1]==e.activity){trace("FOUND IT!!");i=t.items[u].id;a="https://www.googleapis.com/plus/v1/activities/"+i+"?alt=json&key="+r;VMM.getJSON(a,function(t){trace(t);if(typeof t.annotation!="undefined"){s+="<div class='googleplus-annotation'>'"+t.annotation+"</div>";s+=t.object.content}else s+=t.object.content;if(typeof t.object.attachments!="undefined"){for(var r=0;r<t.object.attachments.length;r++){if(t.object.attachments[r].objectType=="photo")o="<a href='"+t.object.url+"' target='_blank'>"+"<img src='"+t.object.attachments[r].image.url+"' class='article-thumb'></a>"+o;else if(t.object.attachments[r].objectType=="video"){o="<img src='"+t.object.attachments[r].image.url+"' class='article-thumb'>"+o;o+="<div>";o+="<a href='"+t.object.attachments[r].url+"' target='_blank'>";o+="<h5>"+t.object.attachments[r].displayName+"</h5>";o+="</a>";o+="</div>"}else if(t.object.attachments[r].objectType=="article"){o+="<div>";o+="<a href='"+t.object.attachments[r].url+"' target='_blank'>";o+="<h5>"+t.object.attachments[r].displayName+"</h5>";o+="<p>"+t.object.attachments[r].content+"</p>";o+="</a>";o+="</div>"}trace(t.object.attachments[r])}o="<div class='googleplus-attachments'>"+o+"</div>"}n="<div class='googleplus-content'>"+s+o+"</div>";n+="<div class='vcard author'><a class='screen-name url' href='"+t.url+"' target='_blank'>";n+="<span class='avatar'><img src='"+t.actor.image.url+"' style='max-width: 32px; max-height: 32px;'></span>";n+="<span class='fn'>"+t.actor.displayName+"</span>";n+="<span class='nickname'><span class='thumbnail-inline'></span></span>";n+="</a></div>";VMM.attachElement("#googleplus_"+e.activity,n)});break}}}).error(function(t,n,r){var i=VMM.parseJSON(t.responseText);trace(i.error.message);VMM.attachElement("#googleplus_"+e.activity,VMM.MediaElement.loadingmessage("<p>ERROR LOADING GOOGLE+ </p><p>"+i.error.message+"</p>"))}).success(function(e){clearTimeout(googleplus_timeout);clearTimeout(callback_timeout);t()})},pushQue:function(){if(VMM.master_config.googleplus.que.length>0){VMM.ExternalAPI.googleplus.create(VMM.master_config.googleplus.que[0],VMM.ExternalAPI.googleplus.pushQue);VMM.master_config.googleplus.que.remove(0)}},errorTimeOut:function(e){trace("GOOGLE+ JSON ERROR TIMEOUT "+e.activity);VMM.attachElement("#googleplus_"+e.activity,VMM.MediaElement.loadingmessage("<p>Still waiting on GOOGLE+ </p><p>"+e.activity+"</p>"))}},googledocs:{get:function(e,t){var n={url:e,id:t};VMM.master_config.googledocs.que.push(n);VMM.master_config.googledocs.active=!0},create:function(e){var t="";e.url.match(/docs.google.com/i)?t="<iframe class='doc' frameborder='0' width='100%' height='100%' src='"+e.url+"&amp;embedded=true'></iframe>":t="<iframe class='doc' frameborder='0' width='100%' height='100%' src='http://docs.google.com/viewer?url="+e.url+"&amp;embedded=true'></iframe>";VMM.attachElement("#"+e.id,t)},pushQue:function(){for(var e=0;e<VMM.master_config.googledocs.que.length;e++)VMM.ExternalAPI.googledocs.create(VMM.master_config.googledocs.que[e]);VMM.master_config.googledocs.que=[]}},flickr:{get:function(e,t,n){var r={mid:e,id:t,link:n};VMM.master_config.flickr.que.push(r);VMM.master_config.flickr.active=!0},create:function(e,t){var n,r=setTimeout(t,VMM.master_config.timers.api,e);VMM.master_config.Timeline.api_keys.flickr!=""?n=VMM.master_config.Timeline.api_keys.flickr:n=Aes.Ctr.decrypt(VMM.master_config.api_keys_master.flickr,VMM.master_config.vp,256);var i="http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key="+n+"&photo_id="+e.mid+"&format=json&jsoncallback=?";VMM.getJSON(i,function(t){var n=t.sizes.size[0].url.split("photos/")[1].split("/")[1],r="#"+e.id,i="#"+e.id+"_thumb",s,o,u=!1,a="Large";a=VMM.ExternalAPI.flickr.sizes(VMM.master_config.sizes.api.height);for(var f=0;f<t.sizes.size.length;f++)if(t.sizes.size[f].label==a){u=!0;s=t.sizes.size[f].source}u||(s=t.sizes.size[t.sizes.size.length-1].source);o=t.sizes.size[0].source;VMM.Lib.attr(r,"src",s);VMM.attachElement(i,"<img src='"+o+"'>")}).error(function(e,t,n){trace("FLICKR error");trace("FLICKR ERROR: "+t+" "+e.responseText)}).success(function(e){clearTimeout(r);t()})},pushQue:function(){if(VMM.master_config.flickr.que.length>0){VMM.ExternalAPI.flickr.create(VMM.master_config.flickr.que[0],VMM.ExternalAPI.flickr.pushQue);VMM.master_config.flickr.que.remove(0)}},sizes:function(e){var t="";e<=75?t="Thumbnail":e<=180?t="Small":e<=240?t="Small 320":e<=375?t="Medium":e<=480?t="Medium 640":e<=600?t="Medium 800":t="Large";return t}},instagram:{get:function(e,t){return t?"http://instagr.am/p/"+e+"/media/?size=t":"http://instagr.am/p/"+e+"/media/?size="+VMM.ExternalAPI.instagram.sizes(VMM.master_config.sizes.api.height)},sizes:function(e){var t="";e<=150?t="t":e<=306?t="m":t="l";return t}},soundcloud:{get:function(e,t){var n={mid:e,id:t};VMM.master_config.soundcloud.que.push(n);VMM.master_config.soundcloud.active=!0},create:function(e,t){var n="http://soundcloud.com/oembed?url="+e.mid+"&format=js&callback=?";VMM.getJSON(n,function(n){VMM.attachElement("#"+e.id,n.html);t()})},pushQue:function(){if(VMM.master_config.soundcloud.que.length>0){VMM.ExternalAPI.soundcloud.create(VMM.master_config.soundcloud.que[0],VMM.ExternalAPI.soundcloud.pushQue);VMM.master_config.soundcloud.que.remove(0)}}},wikipedia:{get:function(e,t,n){var r={url:e,id:t,lang:n};VMM.master_config.wikipedia.que.push(r);VMM.master_config.wikipedia.active=!0},create:function(e,t){var n="http://"+e.lang+".wikipedia.org/w/api.php?action=query&prop=extracts&redirects=&titles="+e.url+"&exintro=1&format=json&callback=?";callback_timeout=setTimeout(t,VMM.master_config.timers.api,e);if(VMM.Browser.browser=="Explorer"&&parseInt(VMM.Browser.version,10)>=7&&window.XDomainRequest){var r="<h4><a href='http://"+VMM.master_config.language.api.wikipedia+".wikipedia.org/wiki/"+e.url+"' target='_blank'>"+e.url+"</a></h4>";r+="<span class='wiki-source'>"+VMM.master_config.language.messages.wikipedia+"</span>";r+="<p>Wikipedia entry unable to load using Internet Explorer 8 or below.</p>";VMM.attachElement("#"+e.id,r)}VMM.getJSON(n,function(t){if(t.query){var n,r,i="",s="",o=1,u=[];n=VMM.Util.getObjectAttributeByIndex(t.query.pages,0).extract;r=VMM.Util.getObjectAttributeByIndex(t.query.pages,0).title;n.match("<p>")?u=n.split("<p>"):u.push(n);for(var a=0;a<u.length;a++)a+1<=o&&a+1<u.length&&(s+="<p>"+u[a+1]);i="<h4><a href='http://"+VMM.master_config.language.api.wikipedia+".wikipedia.org/wiki/"+r+"' target='_blank'>"+r+"</a></h4>";i+="<span class='wiki-source'>"+VMM.master_config.language.messages.wikipedia+"</span>";i+=VMM.Util.linkify_wikipedia(s);n.match("REDIRECT")||VMM.attachElement("#"+e.id,i)}}).error(function(n,r,i){trace("WIKIPEDIA error");trace("WIKIPEDIA ERROR: "+r+" "+n.responseText);trace(i);VMM.attachElement("#"+e.id,VMM.MediaElement.loadingmessage("<p>Wikipedia is not responding</p>"));clearTimeout(callback_timeout);if(VMM.master_config.wikipedia.tries<4){trace("WIKIPEDIA ATTEMPT "+VMM.master_config.wikipedia.tries);trace(e);VMM.master_config.wikipedia.tries++;VMM.ExternalAPI.wikipedia.create(e,t)}else t()}).success(function(e){VMM.master_config.wikipedia.tries=0;clearTimeout(callback_timeout);t()})},pushQue:function(){if(VMM.master_config.wikipedia.que.length>0){trace("WIKIPEDIA PUSH QUE "+VMM.master_config.wikipedia.que.length);VMM.ExternalAPI.wikipedia.create(VMM.master_config.wikipedia.que[0],VMM.ExternalAPI.wikipedia.pushQue);VMM.master_config.wikipedia.que.remove(0)}}},youtube:{get:function(e,t){var n="http://gdata.youtube.com/feeds/api/videos/"+e+"?v=2&alt=jsonc&callback=?",r={mid:e,id:t};VMM.master_config.youtube.que.push(r);VMM.master_config.youtube.active||VMM.master_config.youtube.api_loaded||VMM.LoadLib.js("http://www.youtube.com/player_api",function(){trace("YouTube API Library Loaded")});VMM.getJSON(n,function(e){VMM.ExternalAPI.youtube.createThumb(e,r)})},create:function(e){var t={active:!1,player:{},name:e.id,playing:!1};t.player[e.id]=new YT.Player(e.id,{height:"390",width:"640",playerVars:{enablejsapi:1,color:"white",showinfo:0,theme:"light",rel:0},videoId:e.mid,events:{onReady:VMM.ExternalAPI.youtube.onPlayerReady,onStateChange:VMM.ExternalAPI.youtube.onStateChange}});VMM.master_config.youtube.array.push(t)},createThumb:function(e,t){trace("CREATE THUMB");trace(e);trace(t);if(typeof e.data!="undefined"){var n="#"+t.id+"_thumb";VMM.attachElement(n,"<img src='"+e.data.thumbnail.sqDefault+"'>")}},pushQue:function(){for(var e=0;e<VMM.master_config.youtube.que.length;e++)VMM.ExternalAPI.youtube.create(VMM.master_config.youtube.que[e]);VMM.master_config.youtube.que=[]},onAPIReady:function(){VMM.master_config.youtube.active=!0;VMM.ExternalAPI.youtube.pushQue()},stopPlayers:function(){for(var e=0;e<VMM.master_config.youtube.array.length;e++)if(VMM.master_config.youtube.array[e].playing){var t=VMM.master_config.youtube.array[e].name;VMM.master_config.youtube.array[e].player[t].stopVideo()}},onStateChange:function(e){for(var t=0;t<VMM.master_config.youtube.array.length;t++){var n=VMM.master_config.youtube.array[t].name;VMM.master_config.youtube.array[t].player[n]==e.target&&e.data==YT.PlayerState.PLAYING&&(VMM.master_config.youtube.array[t].playing=!0)}},onPlayerReady:function(e){}},vimeo:{get:function(e,t){var n={mid:e,id:t};VMM.master_config.vimeo.que.push(n);VMM.master_config.vimeo.active=!0},create:function(e,t){trace("VIMEO CREATE");var n="http://vimeo.com/api/v2/video/"+e.mid+".json";VMM.getJSON(n,function(n){VMM.ExternalAPI.vimeo.createThumb(n,e);t()})},createThumb:function(e,t){trace("VIMEO CREATE THUMB");var n="#"+t.id+"_thumb";VMM.attachElement(n,"<img src='"+e[0].thumbnail_small+"'>")},pushQue:function(){if(VMM.master_config.vimeo.que.length>0){VMM.ExternalAPI.vimeo.create(VMM.master_config.vimeo.que[0],VMM.ExternalAPI.vimeo.pushQue);VMM.master_config.vimeo.que.remove(0)}}}});typeof VMM!="undefined"&&typeof VMM.MediaElement=="undefined"&&(VMM.MediaElement={init:function(){return this},loadingmessage:function(e){return"<div class='loading'><div class='loading-container'><div class='loading-icon'></div><div class='message'><p>"+e+"</p></div></div></div>"},thumbnail:function(e,t,n,r){var i=16,s=24,o="";t!=null&&t!=""&&(i=t);n!=null&&n!=""&&(s=n);r!=null&&r!=""&&(o=r);if(e.media!=null&&e.media!=""){var u=!0,a="",f=VMM.MediaType(e.media);if(f.type=="image"){a="<div class='thumbnail thumb-photo'></div>";return a}if(f.type=="flickr"){a="<div class='thumbnail thumb-photo' id='"+r+"_thumb'></div>";return a}if(f.type=="instagram"){a="<div class='thumbnail thumb-instagram' id='"+r+"_thumb'><img src='"+VMM.ExternalAPI.instagram.get(f.id,!0)+"'></div>";return a}if(f.type=="youtube"){a="<div class='thumbnail thumb-youtube' id='"+r+"_thumb'></div>";return a}if(f.type=="googledoc"){a="<div class='thumbnail thumb-document'></div>";return a}if(f.type=="vimeo"){a="<div class='thumbnail thumb-vimeo' id='"+r+"_thumb'></div>";return a}if(f.type=="dailymotion"){a="<div class='thumbnail thumb-video'></div>";return a}if(f.type=="twitter"){a="<div class='thumbnail thumb-twitter'></div>";return a}if(f.type=="twitter-ready"){a="<div class='thumbnail thumb-twitter'></div>";return a}if(f.type=="soundcloud"){a="<div class='thumbnail thumb-audio'></div>";return a}if(f.type=="google-map"){a="<div class='thumbnail thumb-map'></div>";return a}if(f.type=="googleplus"){a="<div class='thumbnail thumb-googleplus'></div>";return a}if(f.type=="wikipedia"){a="<div class='thumbnail thumb-wikipedia'></div>";return a}if(f.type=="storify"){a="<div class='thumbnail thumb-storify'></div>";return a}if(f.type=="quote"){a="<div class='thumbnail thumb-quote'></div>";return a}if(f.type=="unknown"){f.id.match("blockquote")?a="<div class='thumbnail thumb-quote'></div>":a="<div class='thumbnail thumb-plaintext'></div>";return a}if(f.type=="website"){a="<div class='thumbnail thumb-website'></div>";return a}a="<div class='thumbnail thumb-plaintext'></div>";return a}},create:function(e,t){var n=!1,r=VMM.MediaElement.loadingmessage(VMM.master_config.language.messages.loading+"...");if(e.media!=null&&e.media!=""){var i="",s="",o="",u="",a=!1,f;f=VMM.MediaType(e.media);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")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.id,t,f.link)}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.id)+"'></a></div>";else if(f.type=="googledoc"){i="<div class='media-frame media-shadow doc' id='"+t+"'>"+r+"</div>";VMM.ExternalAPI.googledocs.get(f.id,t)}else if(f.type=="youtube"){i="<div class='media-shadow'><div class='media-frame video youtube' id='"+t+"'>"+r+"</div></div>";VMM.ExternalAPI.youtube.get(f.id,t)}else if(f.type=="vimeo"){i="<div class='media-shadow'><iframe class='media-frame video vimeo' autostart='false' frameborder='0' width='100%' height='100%' src='http://player.vimeo.com/video/"+f.id+"?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff'></iframe></div>";VMM.ExternalAPI.vimeo.get(f.id,t)}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=="twitter"){i="<div class='twitter' id='"+t+"'>"+r+"</div>";a=!0;VMM.ExternalAPI.twitter.get(f.id,t)}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='"+t+"'>"+r+"</div>";VMM.ExternalAPI.soundcloud.get(f.id,t)}else if(f.type=="google-map"){i="<div class='media-frame media-shadow map' id='"+t+"'>"+r+"</div>";VMM.ExternalAPI.googlemaps.get(f.id,t)}else if(f.type=="googleplus"){u="googleplus_"+f.id;i="<div class='googleplus' id='"+u+"'>"+r+"</div>";a=!0;VMM.ExternalAPI.googleplus.get(f.user,f.id,t)}else if(f.type=="wikipedia"){i="<div class='wikipedia' id='"+t+"'>"+r+"</div>";a=!0;VMM.ExternalAPI.wikipedia.get(f.id,t,f.lang)}else if(f.type=="storify"){a=!0;i="<div class='plain-text-quote'>"+f.id+"</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'><a href='"+f.id+"' target='_blank'>"+"<img src='http://api1.thumbalizr.com/?url="+f.id.replace(/[\./]$/g,"")+"&width=300' class='media-image'></a></div>";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=!1,n={type:"unknown",id:"",link:"",lang:"",uniqueid:VMM.Util.unique_ID(6)};if(e.match("div class='twitter'")){n.type="twitter-ready";n.id=e;t=!0}else if(e.match("(www.)?youtube|youtu.be")){e.match("v=")?n.id=VMM.Util.getUrlVars(e).v:e.match("/embed/")?n.id=e.split("embed/")[1].split(/[?&]/)[0]:n.id=e.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];n.type="youtube";t=!0}else if(e.match("(player.)?vimeo.com")){n.type="vimeo";n.id=e.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];t=!0}else if(e.match("(www.)?dailymotion.com")){n.id=e.split(/video\/|\/\/dailymotion\.com\//)[1];n.type="dailymotion";t=!0}else if(e.match("(player.)?soundcloud.com")){n.type="soundcloud";n.id=e;t=!0}else if(e.match("(www.)?twitter.com")&&e.match("status")){e.match("status/")?n.id=e.split("status/")[1]:e.match("statuses/")?n.id=e.split("statuses/")[1]:n.id="";n.type="twitter";t=!0}else if(e.match("maps.google")&&!e.match("staticmap")){n.type="google-map";n.id=e.split(/src=['|"][^'|"]*?['|"]/gi);t=!0}else if(e.match("plus.google")){n.type="googleplus";n.id=e.split("/posts/")[1];e.split("/posts/")[0].match("u/0/")?n.user=e.split("u/0/")[1].split("/posts")[0]:n.user=e.split("google.com/")[1].split("/posts/")[0];t=!0}else if(e.match("flickr.com/photos")){n.type="flickr";n.id=e.split("photos/")[1].split("/")[1];n.link=e;t=!0}else if(e.match("instagr.am/p/")){n.type="instagram";n.link=e;n.id=e.split("/p/")[1].split("/")[0];t=!0}else if(e.match(/jpg|jpeg|png|gif/i)||e.match("staticmap")||e.match("yfrog.com")||e.match("twitpic.com")){n.type="image";n.id=e;t=!0}else if(VMM.FileExtention.googleDocType(e)){n.type="googledoc";n.id=e;t=!0}else if(e.match("(www.)?wikipedia.org")){n.type="wikipedia";var r=e.split("wiki/")[1].split("#")[0].replace("_"," ");n.id=r.replace(" ","%20");n.lang=e.split("//")[1].split(".wikipedia")[0];t=!0}else if(e.indexOf("http://")==0){n.type="website";n.id=e;t=!0}else if(e.match("storify")){n.type="storify";n.id=e;t=!0}else if(e.match("blockquote")){n.type="quote";n.id=e;t=!0}else{trace("unknown media");n.type="unknown";n.id=e;t=!0}if(t)return n;trace("No valid media id detected");trace(e);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(e,t,n,r){function p(){}var i={},s=!1,o={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},u="",a="",f="",l="",c=e;t!=null&&t!=""&&(o.width=t);n!=null&&n!=""&&(o.height=n);this.init=function(e){typeof e!="undefined"?this.setData(e):trace("WAITING ON DATA")};var h=function(e,t,n){u=VMM.appendAndGetElement(c,"<div>","media");a=VMM.appendAndGetElement(u,"<div>","container");f=VMM.appendAndGetElement(a,"<div>","media-container");if(i.media!=null&&i.media!=""){s=!0;var r={};r=VMM.MediaType(i.media);r.type=="image"?VMM.appendElement(f,"<img src='"+r.id+"'>"):r.type=="youtube"?VMM.appendElement(f,"<iframe frameborder='0' src='http://www.youtube.com/embed/"+r.id+"?&rel=0&theme=light&showinfo=0&hd=1&autohide=0&color=white' allowfullscreen>"):r.type=="vimeo"&&VMM.appendElement(f,"<iframe frameborder='0' src='http://player.vimeo.com/video/"+r.id+"?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff'>");i.credit!=null&&i.credit!=""&&VMM.appendElement(a,VMM.createElement("div",i.credit,"credit"));i.caption!=null&&i.caption!=""&&VMM.appendElement(a,VMM.createElement("div",i.caption,"caption"))}};this.setData=function(e){if(typeof e!="undefined"){i=e;h()}else trace("NO DATA")}};VMM.Media.prototype.height=function(e){if(e==null||e=="")return config.height;config.height=e;reSize()};VMM.Media.prototype.width=function(e){if(e==null||e=="")return config.width;config.width=e;reSize()};VMM.Media.prototype.getData=function(){return data};VMM.Media.prototype.setConfig=function(e){typeof e!="undefined"?config=e:trace("NO CONFIG DATA")};VMM.Media.prototype.getConfig=function(){return config};VMM.Media.prototype.setSize=function(e,t){e!=null&&(config.width=e);t!=null&&(config.height=t);_active&&reSize()};VMM.Media.prototype.active=function(){return _active}}typeof VMM!="undefined"&&typeof VMM.TextElement=="undefined"&&(VMM.TextElement={init:function(){return this},create:function(e){return e}}.init());typeof VMM!="undefined"&&typeof VMM.TouchSlider=="undefined"&&(VMM.TouchSlider={createPanel:function(e,t,n,r,i,s){VMM.TouchSlider.vertical=!1;VMM.TouchSlider.vertical=i;var o=r;VMM.TouchSlider.width=n;VMM.TouchSlider.height=s;VMM.TouchSlider.makeTouchable(e,t)},removePanel:function(e){VMM.unbindEvent(e,VMM.TouchSlider.onTouchStart,"touchstart");VMM.unbindEvent(e,VMM.TouchSlider.onTouchMove,"touchmove");VMM.unbindEvent(e,VMM.TouchSlider.onTouchEnd,"touchend")},makeTouchable:function(e,t){VMM.bindEvent(e,VMM.TouchSlider.onTouchStart,"touchstart",{element:t});VMM.bindEvent(e,VMM.TouchSlider.onTouchMove,"touchmove",{element:t});VMM.bindEvent(e,VMM.TouchSlider.onTouchEnd,"touchend",{element:t})},onTouchStart:function(e){VMM.TouchSlider.touchStart(e.data.element,e);e.stopPropagation();return!0},onTouchEnd:function(e){e.stopPropagation();if(VMM.TouchSlider.sliding){VMM.TouchSlider.sliding=!1;VMM.TouchSlider.touchEnd(e.data.element,e);return!1}return!0},onTouchMove:function(e){VMM.TouchSlider.touchMove(e.data.element,e);e.preventDefault();e.stopPropagation();return!1},getLeft:function(e){return parseInt(VMM.Lib.css(e,"left").substring(0,VMM.Lib.css(e,"left").length-2),10)},getTop:function(e){return parseInt(VMM.Lib.css(e,"top").substring(0,VMM.Lib.css(e,"top").length-2),10)},touchStart:function(e,t){VMM.Lib.css(e,"-webkit-transition-duration","0");VMM.TouchSlider.startX=t.originalEvent.touches[0].screenX;VMM.TouchSlider.startY=t.originalEvent.touches[0].screenY;VMM.TouchSlider.startLeft=VMM.TouchSlider.getLeft(e);VMM.TouchSlider.startTop=VMM.TouchSlider.getTop(e);VMM.TouchSlider.touchStartTime=(new Date).getTime()},touchEnd:function(e,t){if(VMM.TouchSlider.getLeft(e)>0){VMM.TouchSlider.vertical?VMM.Lib.animate(e,1e3,"",{top:0}):VMM.Lib.animate(e,1e3,"",{left:0});VMM.TouchSlider.startX=null;VMM.TouchSlider.startY=null;VMM.fireEvent(e,"TOUCHUPDATE",[0])}else VMM.TouchSlider.slideMomentum(e,t)},slideMomentum:function(e,t){var n=((new Date).getTime()-VMM.TouchSlider.touchStartTime)*10,r=n,i=VMM.TouchSlider.getLeft(e),s=VMM.TouchSlider.getTop(e),o=6e3*(Math.abs(VMM.TouchSlider.startLeft)-Math.abs(i)),u=6e3*(Math.abs(VMM.TouchSlider.startTop)-Math.abs(s));n=Math.round(o/n);slideAdjustY=Math.round(u/n);var a=n+i,f=slideAdjustY+s,l=f%VMM.TouchSlider.height,c=a%VMM.TouchSlider.width,h={top:Math.min(0,f),left:Math.min(0,a),time:r};VMM.fireEvent(e,"TOUCHUPDATE",[h]);VMM.TouchSlider.startX=null;VMM.TouchSlider.startY=null},doSlide:function(e,t,n){VMM.Lib.css(e,"-webkit-transition-property","left");VMM.Lib.css(e,"-webkit-transition-duration",n);VMM.Lib.css(e,"left",t)},touchMove:function(e,t){!VMM.TouchSlider.sliding;VMM.TouchSlider.sliding=!0;if(VMM.TouchSlider.vertical)if(VMM.TouchSlider.startY>t.originalEvent.touches[0].screenY){VMM.Lib.css(e,"top",-(VMM.TouchSlider.startY-t.originalEvent.touches[0].screenY-VMM.TouchSlider.startTop));VMM.TouchSlider.slidingTop=!0}else{var n=t.originalEvent.touches[0].screenY-VMM.TouchSlider.startY+VMM.TouchSlider.startTop;VMM.Lib.css(e,"top",-(VMM.TouchSlider.startY-t.originalEvent.touches[0].screenY-VMM.TouchSlider.startTop));VMM.TouchSlider.slidingTop=!1}else if(VMM.TouchSlider.startX>t.originalEvent.touches[0].screenX){VMM.Lib.css(e,"left",-(VMM.TouchSlider.startX-t.originalEvent.touches[0].screenX-VMM.TouchSlider.startLeft));VMM.TouchSlider.slidingLeft=!0}else{var r=t.originalEvent.touches[0].screenX-VMM.TouchSlider.startX+VMM.TouchSlider.startLeft;VMM.Lib.css(e,"left",-(VMM.TouchSlider.startX-t.originalEvent
.touches[0].screenX-VMM.TouchSlider.startLeft));VMM.TouchSlider.slidingLeft=!1}}});typeof VMM!="undefined"&&typeof VMM.DragSlider=="undefined"&&(VMM.DragSlider=function(){var e={element:"",element_move:"",constraint:"",sliding:!1,pagex:{start:0,end:0},left:{start:0,end:0},time:{start:0,end:0},touch:!1,ease:"easeOutExpo"},t={down:"mousedown",up:"mouseup",leave:"mouseleave",move:"mousemove"},n={down:"mousedown",up:"mouseup",leave:"mouseleave",move:"mousemove"},r={down:"touchstart",up:"touchend",leave:"mouseleave",move:"touchmove"};this.createPanel=function(s,o,u,a){e.element=s;e.element_move=o;u!=null&&u!=""?e.constraint=u:e.constraint=!1;a?e.touch=a:e.touch=!1;trace("TOUCH"+e.touch);e.touch?t=r:t=n;i(e.element,e.element_move)};this.updateConstraint=function(t){trace("updateConstraint");e.constraint=t};var i=function(e,n){VMM.bindEvent(e,o,t.down,{element:n,delement:e});VMM.bindEvent(e,u,t.up,{element:n,delement:e});VMM.bindEvent(e,s,t.leave,{element:n,delement:e})};this.cancelSlide=function(n){VMM.unbindEvent(e.element,a,t.move);return!0};var s=function(n){VMM.unbindEvent(n.data.delement,a,t.move);e.touch||n.preventDefault();n.stopPropagation();if(e.sliding){e.sliding=!1;l(n.data.element,n.data.delement,n);return!1}return!0},o=function(t){f(t.data.element,t.data.delement,t);e.touch||t.preventDefault();t.stopPropagation();return!0},u=function(t){e.touch||t.preventDefault();t.stopPropagation();if(e.sliding){e.sliding=!1;l(t.data.element,t.data.delement,t);return!1}return!0},a=function(e){c(e.data.element,e);e.preventDefault();e.stopPropagation();return!1},f=function(n,r,i){if(e.touch){trace("IS TOUCH");VMM.Lib.css(n,"-webkit-transition-duration","0");e.pagex.start=i.originalEvent.touches[0].screenX}else e.pagex.start=i.pageX;e.left.start=p(n);e.time.start=(new Date).getTime();VMM.Lib.stop(n);VMM.bindEvent(r,a,t.move,{element:n})},l=function(e,n,r){VMM.unbindEvent(n,a,t.move);h(e,r)},c=function(t,n){e.sliding=!0;e.touch?e.pagex.end=n.originalEvent.touches[0].screenX:e.pagex.end=n.pageX;e.left.end=p(t);VMM.Lib.css(t,"left",-(e.pagex.start-e.pagex.end-e.left.start))},h=function(t,n){var r={left:e.left.end,left_adjust:0,change:{x:0},time:((new Date).getTime()-e.time.start)*10,time_adjust:((new Date).getTime()-e.time.start)*10};r.change.x=3e3*(Math.abs(e.pagex.end)-Math.abs(e.pagex.start));r.left_adjust=Math.round(r.change.x/r.time);r.left=Math.min(r.left+r.left_adjust);if(e.constraint)if(r.left>e.constraint.left){r.left=e.constraint.left;r.time>5e3&&(r.time=5e3)}else if(r.left<e.constraint.right){r.left=e.constraint.right;r.time>5e3&&(r.time=5e3)}VMM.fireEvent(t,"DRAGUPDATE",[r]);r.time>0&&(e.touch?VMM.Lib.animate(t,r.time,"easeOutCirc",{left:r.left}):VMM.Lib.animate(t,r.time,e.ease,{left:r.left}))},p=function(e){return parseInt(VMM.Lib.css(e,"left").substring(0,VMM.Lib.css(e,"left").length-2),10)}});typeof VMM!="undefined"&&typeof VMM.Slider=="undefined"&&(VMM.Slider=function(e,t){function w(){trace("onConfigSet")}function E(e,t){var n=!0,i=!1;e!=null&&(n=e);t!=null&&(i=t);p=r.slider.width;r.slider.nav.height=VMM.Lib.height(y.prevBtnContainer);r.slider.content.width=p-r.slider.content.padding*2;VMM.Lib.width(u,f.length*r.slider.content.width);if(i){var a=f[h].leftpos();VMM.Lib.css(o,"left",a)}_();D();VMM.Lib.css(y.nextBtn,"left",p-r.slider.nav.width);VMM.Lib.height(y.prevBtn,r.slider.height);VMM.Lib.height(y.nextBtn,r.slider.height);VMM.Lib.css(y.nextBtnContainer,"top",r.slider.height/2-r.slider.nav.height/2+10);VMM.Lib.css(y.prevBtnContainer,"top",r.slider.height/2-r.slider.nav.height/2+10);VMM.Lib.height(s,r.slider.height);VMM.Lib.width(s,p);n&&H(h,"linear",1);h==0&&VMM.Lib.visible(y.prevBtn,!1)}function S(e){if(h==f.length-1)VMM.Lib.animate(o,r.duration,r.ease,{left:-f[h].leftpos()});else{H(h+1);C()}}function x(e){if(h==0)H(h);else{H(h-1);C()}}function T(e){switch(e.keyCode){case 39:S(e);break;case 37:x(e)}}function N(e,t){if(l.length==0)for(var n=0;n<f.length;n++)l.push(f[n].leftpos());if(typeof t.left=="number"){var i=t.left,s=-f[h].leftpos();i<s-r.slider_width/3?S():i>s+r.slider_width/3?x():VMM.Lib.animate(o,r.duration,r.ease,{left:s})}else VMM.Lib.animate(o,r.duration,r.ease,{left:s});typeof t.top=="number"&&VMM.Lib.animate(o,r.duration,r.ease,{top:-t.top})}function C(){r.current_slide=h;VMM.fireEvent(g,"UPDATE")}var n={},r,i,s,o,u,a=[],f=[],l=[],c="",h=0,p=960,d={move:!1,x:10,y:0,off:0,dampen:48},v="",m=!1,g=e,y={nextBtn:"",prevBtn:"",nextDate:"",prevDate:"",nextTitle:"",prevTitle:""},b;typeof VMM.Timeline!="undefined"?r=VMM.Timeline.Config:r={preload:4,current_slide:0,interval:10,something:0,width:720,height:400,ease:"easeInOutExpo",duration:1e3,timeline:!1,spacing:15,slider:{width:720,height:400,content:{width:720,height:400,padding:130},nav:{width:100,height:200}}};this.ver="0.6";r.slider.width=r.width;r.slider.height=r.height;this.init=function(e){f=[];l=[];typeof e!="undefined"?this.setData(e):trace("WAITING ON DATA")};this.width=function(e){if(e==null||e=="")return r.slider.width;r.slider.width=e;E()};this.height=function(e){if(e==null||e=="")return r.slider.height;r.slider.height=e;E()};this.setData=function(e){if(typeof e!="undefined"){a=e;j()}else trace("NO DATA")};this.getData=function(){return a};this.setConfig=function(e){typeof e!="undefined"?r=e:trace("NO CONFIG DATA")};this.getConfig=function(){return r};this.setSize=function(e,t){e!=null&&(r.slider.width=e);t!=null&&(r.slider.height=t);m&&E()};this.active=function(){return m};this.getCurrentNumber=function(){return h};this.setSlide=function(e){H(e)};var k=function(e){a=e},L=function(e){VMM.attachElement(u,"");f=[];for(var t=0;t<e.length;t++){var n=new VMM.Slider.Slide(e[t],u);f.push(n)}},A=function(e){if(e)O();else{for(var t=0;t<f.length;t++)f[t].clearTimers();b=setTimeout(O,r.duration)}},O=function(){for(var e=0;e<f.length;e++)f[e].enqueue=!0;for(var t=0;t<r.preload;t++){if(!(h+t>f.length-1)){f[h+t].show();f[h+t].enqueue=!1}if(!(h-t<0)){f[h-t].show();f[h-t].enqueue=!1}}if(f.length>50)for(var n=0;n<f.length;n++)f[n].enqueue&&f[n].hide();_()},M=function(e){},_=function(){var e=".slider-item .layout-text-media .media .media-container ",t=".slider-item .layout-media .media .media-container ",n=".slider-item .media .media-container",i=".slider-item .media .media-container .media-shadow .caption",s={text_media:{width:r.slider.content.width/100*60,height:r.slider.height-60,video:{width:0,height:0},text:{width:r.slider.content.width/100*40-30,height:r.slider.height}},media:{width:r.slider.content.width,height:r.slider.height-110,video:{width:0,height:0}}};VMM.master_config.sizes.api.width=s.media.width;VMM.master_config.sizes.api.height=s.media.height;s.text_media.video=VMM.Util.ratio.fit(s.text_media.width,s.text_media.height,16,9);s.media.video=VMM.Util.ratio.fit(s.media.width,s.media.height,16,9);VMM.Lib.css(".slider-item","width",r.slider.content.width);VMM.Lib.height(".slider-item",r.slider.height);var o=!1;p<=640?o=!0:VMM.Browser.device=="mobile"&&VMM.Browser.orientation=="portrait"?o=!0:VMM.Browser.device=="tablet"&&VMM.Browser.orientation=="portrait";if(o){s.text_media.width=r.slider.content.width;s.text_media.height=r.slider.height/100*50-50;s.media.height=r.slider.height/100*70-40;s.text_media.video=VMM.Util.ratio.fit(s.text_media.width,s.text_media.height,16,9);s.media.video=VMM.Util.ratio.fit(s.media.width,s.media.height,16,9);VMM.Lib.css(".slider-item .layout-text-media .text","width","100%");VMM.Lib.css(".slider-item .layout-text-media .text","display","block");VMM.Lib.css(".slider-item .layout-text-media .text .container","display","block");VMM.Lib.css(".slider-item .layout-text-media .text .container","width",r.slider.content.width);VMM.Lib.css(".slider-item .layout-text-media .media","float","none");VMM.Lib.addClass(".slider-item .content-container","pad-top");VMM.Lib.css(".slider-item .media blockquote p","line-height","18px");VMM.Lib.css(".slider-item .media blockquote p","font-size","16px");VMM.Lib.css(".slider-item","overflow-y","auto")}else{VMM.Lib.css(".slider-item .layout-text-media .text","width","40%");VMM.Lib.css(".slider-item .layout-text-media .text","display","table-cell");VMM.Lib.css(".slider-item .layout-text-media .text .container","display","table-cell");VMM.Lib.css(".slider-item .layout-text-media .text .container","width","auto");VMM.Lib.css(".slider-item .layout-text-media .text .container .start","width",s.text_media.text.width);VMM.Lib.removeClass(".slider-item .content-container","pad-top");VMM.Lib.css(".slider-item .layout-text-media .media","float","left");VMM.Lib.css(".slider-item .layout-text-media","display","table");VMM.Lib.css(".slider-item .media blockquote p","line-height","36px");VMM.Lib.css(".slider-item .media blockquote p","font-size","28px");VMM.Lib.css(".slider-item","display","table");VMM.Lib.css(".slider-item","overflow-y","auto")}VMM.Lib.css(e+".media-frame","max-width",s.text_media.width);VMM.Lib.height(e+".media-frame",s.text_media.height);VMM.Lib.width(e+".media-frame",s.text_media.width);VMM.Lib.css(e+"img","max-height",s.text_media.height);VMM.Lib.css(t+"img","max-height",s.media.height);VMM.Lib.css(e+"img","max-width",s.text_media.width);VMM.Lib.css(e+".avatar img","max-width",32);VMM.Lib.css(e+".avatar img","max-height",32);VMM.Lib.css(t+".avatar img","max-width",32);VMM.Lib.css(t+".avatar img","max-height",32);VMM.Lib.css(e+".article-thumb","max-width","50%");VMM.Lib.css(t+".article-thumb","max-width",200);VMM.Lib.width(e+".media-frame",s.text_media.video.width);VMM.Lib.height(e+".media-frame",s.text_media.video.height);VMM.Lib.width(t+".media-frame",s.media.video.width);VMM.Lib.height(t+".media-frame",s.media.video.height);VMM.Lib.css(t+".media-frame","max-height",s.media.video.height);VMM.Lib.css(t+".media-frame","max-width",s.media.video.width);VMM.Lib.height(t+".soundcloud",168);VMM.Lib.height(e+".soundcloud",168);VMM.Lib.width(t+".soundcloud",s.media.width);VMM.Lib.width(e+".soundcloud",s.text_media.width);VMM.Lib.css(n+".soundcloud","max-height",168);VMM.Lib.height(e+".map",s.text_media.height);VMM.Lib.css(t+".map","max-height",s.media.height);VMM.Lib.width(t+".map",s.media.width);VMM.Lib.height(e+".doc",s.text_media.height);VMM.Lib.height(t+".doc",s.media.height);VMM.Lib.width(t+".wikipedia",s.media.width);VMM.Lib.width(t+".twitter",s.media.width);VMM.Lib.width(t+".plain-text-quote",s.media.width);VMM.Lib.width(t+".plain-text",s.media.width);VMM.Lib.css(e+".caption","max-width",s.text_media.video.width);VMM.Lib.css(t+".caption","max-width",s.media.video.width);for(var u=0;u<f.length;u++){f[u].layout(o);f[u].content_height()>r.slider.height+20?f[u].css("display","block"):f[u].css("display","table")}},D=function(){var e=0;for(var t=0;t<f.length;t++){e=t*(r.slider.width+r.spacing);f[t].leftpos(e)}},P=function(e){var t="linear";for(var n=0;n<f.length;n++)n==h?f[n].animate(r.duration,t,{opacity:1}):n==h-1||n==h+1?f[n].animate(r.duration,t,{opacity:.1}):f[n].opacity(e)},H=function(e,t,n,i,s){VMM.ExternalAPI.youtube.stopPlayers();h=e;var u=r.ease,l=r.duration,c=!1,p=!1,d=f[h].leftpos(),v="";h==0&&(p=!0);h+1>=f.length&&(c=!0);t!=null&&t!=""&&(u=t);n!=null&&n!=""&&(l=n);if(p)VMM.Lib.visible(y.prevBtn,!1);else{VMM.Lib.visible(y.prevBtn,!0);v=VMM.Util.unlinkify(a[h-1].title);if(r.type=="timeline")if(typeof a[h-1].date=="undefined"){VMM.attachElement(y.prevDate,v);VMM.attachElement(y.prevTitle,"")}else{VMM.attachElement(y.prevDate,VMM.Date.prettyDate(a[h-1].startdate));VMM.attachElement(y.prevTitle,v)}else VMM.attachElement(y.prevTitle,v)}if(c)VMM.Lib.visible(y.nextBtn,!1);else{VMM.Lib.visible(y.nextBtn,!0);v=VMM.Util.unlinkify(a[h+1].title);if(r.type=="timeline")if(typeof a[h+1].date=="undefined"){VMM.attachElement(y.nextDate,v);VMM.attachElement(y.nextTitle,"")}else{VMM.attachElement(y.nextDate,VMM.Date.prettyDate(a[h+1].startdate));VMM.attachElement(y.nextTitle,v)}else VMM.attachElement(y.nextTitle,v)}if(i)VMM.Lib.css(o,"left",-(d-r.slider.content.padding));else{VMM.Lib.stop(o);VMM.Lib.animate(o,l,u,{left:-(d-r.slider.content.padding)})}s&&VMM.fireEvent(g,"LOADED");if(f[h].height()>r.slider_height)VMM.Lib.css(".slider","overflow-y","scroll");else{VMM.Lib.css(g,"overflow-y","hidden");var m=0;try{m=VMM.Lib.prop(g,"scrollHeight");VMM.Lib.animate(g,l,u,{scrollTop:m-VMM.Lib.height(g)})}catch(b){m=VMM.Lib.height(g)}}A()},B=function(){var e="<div class='icon'>&nbsp;</div>";y.nextBtn=VMM.appendAndGetElement(i,"<div>","nav-next");y.prevBtn=VMM.appendAndGetElement(i,"<div>","nav-previous");y.nextBtnContainer=VMM.appendAndGetElement(y.nextBtn,"<div>","nav-container",e);y.prevBtnContainer=VMM.appendAndGetElement(y.prevBtn,"<div>","nav-container",e);if(r.type=="timeline"){y.nextDate=VMM.appendAndGetElement(y.nextBtnContainer,"<div>","date","");y.prevDate=VMM.appendAndGetElement(y.prevBtnContainer,"<div>","date","")}y.nextTitle=VMM.appendAndGetElement(y.nextBtnContainer,"<div>","title","Title Goes Here");y.prevTitle=VMM.appendAndGetElement(y.prevBtnContainer,"<div>","title","Title Goes Here");VMM.bindEvent(".nav-next",S);VMM.bindEvent(".nav-previous",x);VMM.bindEvent(window,T,"keydown")},j=function(){VMM.attachElement(g,"");i=VMM.getElement("div.slider");s=VMM.appendAndGetElement(i,"<div>","slider-container-mask");o=VMM.appendAndGetElement(s,"<div>","slider-container");u=VMM.appendAndGetElement(o,"<div>","slider-item-container");B();L(a);var e=3e3;if(VMM.Browser.device=="tablet"||VMM.Browser.device=="mobile"){r.duration=500;e=1e3}else VMM.Browser.device=="mobile";E(!1,!0);VMM.Lib.visible(y.prevBtn,!1);H(r.current_slide,"easeOutExpo",e,!0,!0);m=!0}});typeof VMM.Slider!="undefined"&&(VMM.Slider.Slide=function(e,t){var n,r,i,s,o,u,a=e,f={},o="",l="",c=!1,h=!1,p=!1,d=!0,v=!1,m="slide_",g={pushque:"",render:"",relayout:"",remove:"",skinny:!1},y={pushque:500,render:100,relayout:100,remove:3e4};m+=a.uniqueid;this.enqueue=d;this.id=m;o=VMM.appendAndGetElement(t,"<div>","slider-item");u={slide:"",text:"",media:"",media_element:"",layout:"content-container layout",has:{headline:!1,text:!1,media:!1}};this.show=function(e){d=!1;g.skinny=e;v=!1;clearTimeout(g.remove);if(!c)if(h){clearTimeout(g.relayout);g.relayout=setTimeout(E,y.relayout)}else b(e)};this.hide=function(){if(c&&!v){v=!0;clearTimeout(g.remove);g.remove=setTimeout(w,y.remove)}};this.clearTimers=function(){clearTimeout(g.relayout);clearTimeout(g.pushque);clearTimeout(g.render)};this.layout=function(e){c&&h&&S(e)};this.elem=function(){return o};this.position=function(){return VMM.Lib.position(o)};this.leftpos=function(e){if(typeof e=="undefined")return VMM.Lib.position(o).left;VMM.Lib.css(o,"left",e)};this.animate=function(e,t,n){VMM.Lib.animate(o,e,t,n)};this.css=function(e,t){VMM.Lib.css(o,e,t)};this.opacity=function(e){VMM.Lib.css(o,"opacity",e)};this.width=function(){return VMM.Lib.width(o)};this.height=function(){return VMM.Lib.height(o)};this.content_height=function(){var e=VMM.Lib.find(o,".content")[0];return e!="undefined"&&e!=null?VMM.Lib.height(e):0};var b=function(e){trace("RENDER "+m);c=!0;h=!0;g.skinny=e;x();clearTimeout(g.pushque);clearTimeout(g.render);g.pushque=setTimeout(VMM.ExternalAPI.pushQues,y.pushque)},w=function(){trace("REMOVE SLIDE TIMER FINISHED");c=!1;VMM.Lib.detach(r);VMM.Lib.detach(n)},E=function(){c=!0;S(g.skinny,!0)},S=function(e,t){if(u.has.text){if(e){if(!p||t){VMM.Lib.removeClass(i,"pad-left");VMM.Lib.detach(r);VMM.Lib.detach(n);VMM.Lib.append(i,r);VMM.Lib.append(i,n);p=!0}}else if(p||t){VMM.Lib.addClass(i,"pad-left");VMM.Lib.detach(r);VMM.Lib.detach(n);VMM.Lib.append(i,n);VMM.Lib.append(i,r);p=!1}}else if(t){if(u.has.headline){VMM.Lib.detach(r);VMM.Lib.append(i,r)}VMM.Lib.detach(n);VMM.Lib.append(i,n)}},x=function(){trace("BUILDSLIDE");s=VMM.appendAndGetElement(o,"<div>","content");i=VMM.appendAndGetElement(s,"<div>");if(a.startdate!=null&&a.startdate!=""&&type.of(a.startdate)=="date"&&a.type!="start"){var e=VMM.Date.prettyDate(a.startdate),t=VMM.Date.prettyDate(a.enddate),f="";a.tag!=null&&a.tag!=""&&(f=VMM.createElement("span",a.tag,"slide-tag"));e!=t?u.text+=VMM.createElement("h2",e+" &mdash; "+t+f,"date"):u.text+=VMM.createElement("h2",e+f,"date")}if(a.headline!=null&&a.headline!=""){u.has.headline=!0;a.type=="start"?u.text+=VMM.createElement("h2",VMM.Util.linkify_with_twitter(a.headline,"_blank"),"start"):u.text+=VMM.createElement("h3",VMM.Util.linkify_with_twitter(a.headline,"_blank"))}if(a.text!=null&&a.text!=""){u.has.text=!0;u.text+=VMM.createElement("p",VMM.Util.linkify_with_twitter(a.text,"_blank"))}if(u.has.text||u.has.headline){u.text=VMM.createElement("div",u.text,"container");r=VMM.appendAndGetElement(i,"<div>","text",VMM.TextElement.create(u.text))}a.needs_slug;if(a.asset!=null&&a.asset!=""&&a.asset.media!=null&&a.asset.media!=""){u.has.media=!0;n=VMM.appendAndGetElement(i,"<div>","media",VMM.MediaElement.create(a.asset,a.uniqueid))}u.has.text&&(u.layout+="-text");u.has.media&&(u.layout+="-media");if(u.has.text)if(g.skinny){VMM.Lib.addClass(i,u.layout);p=!0}else{VMM.Lib.addClass(i,u.layout);VMM.Lib.addClass(i,"pad-left");VMM.Lib.detach(r);VMM.Lib.append(i,r)}else VMM.Lib.addClass(i,u.layout)}});typeof VMM!="undefined"&&typeof VMM.Language=="undefined"&&(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_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' hh:MM TT",full_long_small_date:"hh: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"}});var Aes={};Aes.cipher=function(e,t){var n=4,r=t.length/n-1,i=[[],[],[],[]];for(var s=0;s<4*n;s++)i[s%4][Math.floor(s/4)]=e[s];i=Aes.addRoundKey(i,t,0,n);for(var o=1;o<r;o++){i=Aes.subBytes(i,n);i=Aes.shiftRows(i,n);i=Aes.mixColumns(i,n);i=Aes.addRoundKey(i,t,o,n)}i=Aes.subBytes(i,n);i=Aes.shiftRows(i,n);i=Aes.addRoundKey(i,t,r,n);var u=new Array(4*n);for(var s=0;s<4*n;s++)u[s]=i[s%4][Math.floor(s/4)];return u};Aes.keyExpansion=function(e){var t=4,n=e.length/4,r=n+6,i=new Array(t*(r+1)),s=new Array(4);for(var o=0;o<n;o++){var u=[e[4*o],e[4*o+1],e[4*o+2],e[4*o+3]];i[o]=u}for(var o=n;o<t*(r+1);o++){i[o]=new Array(4);for(var a=0;a<4;a++)s[a]=i[o-1][a];if(o%n==0){s=Aes.subWord(Aes.rotWord(s));for(var a=0;a<4;a++)s[a]^=Aes.rCon[o/n][a]}else n>6&&o%n==4&&(s=Aes.subWord(s));for(var a=0;a<4;a++)i[o][a]=i[o-n][a]^s[a]}return i};Aes.subBytes=function(e,t){for(var n=0;n<4;n++)for(var r=0;r<t;r++)e[n][r]=Aes.sBox[e[n][r]];return e};Aes.shiftRows=function(e,t){var n=new Array(4);for(var r=1;r<4;r++){for(var i=0;i<4;i++)n[i]=e[r][(i+r)%t];for(var i=0;i<4;i++)e[r][i]=n[i]}return e};Aes.mixColumns=function(e,t){for(var n=0;n<4;n++){var r=new Array(4),i=new Array(4);for(var s=0;s<4;s++){r[s]=e[s][n];i[s]=e[s][n]&128?e[s][n]<<1^283:e[s][n]<<1}e[0][n]=i[0]^r[1]^i[1]^r[2]^r[3];e[1][n]=r[0]^i[1]^r[2]^i[2]^r[3];e[2][n]=r[0]^r[1]^i[2]^r[3]^i[3];e[3][n]=r[0]^i[0]^r[1]^r[2]^i[3]}return e};Aes.addRoundKey=function(e,t,n,r){for(var i=0;i<4;i++)for(var s=0;s<r;s++)e[i][s]^=t[n*4+s][i];return e};Aes.subWord=function(e){for(var t=0;t<4;t++)e[t]=Aes.sBox[e[t]];return e};Aes.rotWord=function(e){var t=e[0];for(var n=0;n<3;n++)e[n]=e[n+1];e[3]=t;return e};Aes.sBox=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22];Aes.rCon=[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]];Aes.Ctr={};Aes.Ctr.encrypt=function(e,t,n){var r=16;if(n!=128&&n!=192&&n!=256)return"";e=Utf8.encode(e);t=Utf8.encode(t);var i=n/8,s=new Array(i);for(var o=0;o<i;o++)s[o]=isNaN(t.charCodeAt(o))?0:t.charCodeAt(o);var u=Aes.cipher(s,Aes.keyExpansion(s));u=u.concat(u.slice(0,i-16));var a=new Array(r),f=(new Date).getTime(),l=f%1e3,c=Math.floor(f/1e3),h=Math.floor(Math.random()*65535);for(var o=0;o<2;o++)a[o]=l>>>o*8&255;for(var o=0;o<2;o++)a[o+2]=h>>>o*8&255;for(var o=0;o<4;o++)a[o+4]=c>>>o*8&255;var p="";for(var o=0;o<8;o++)p+=String.fromCharCode(a[o]);var d=Aes.keyExpansion(u),v=Math.ceil(e.length/r),m=new Array(v);for(var g=0;g<v;g++){for(var y=0;y<4;y++)a[15-y]=g>>>y*8&255;for(var y=0;y<4;y++)a[15-y-4]=g/4294967296>>>y*8;var b=Aes.cipher(a,d),w=g<v-1?r:(e.length-1)%r+1,E=new Array(w);for(var o=0;o<w;o++){E[o]=b[o]^e.charCodeAt(g*r+o);E[o]=String.fromCharCode(E[o])}m[g]=E.join("")}var S=p+m.join("");S=Base64.encode(S);return S};Aes.Ctr.decrypt=function(e,t,n){var r=16;if(n!=128&&n!=192&&n!=256)return"";e=Base64.decode(e);t=Utf8.encode(t);var i=n/8,s=new Array(i);for(var o=0;o<i;o++)s[o]=isNaN(t.charCodeAt(o))?0:t.charCodeAt(o);var u=Aes.cipher(s,Aes.keyExpansion(s));u=u.concat(u.slice(0,i-16));var a=new Array(8);ctrTxt=e.slice(0,8);for(var o=0;o<8;o++)a[o]=ctrTxt.charCodeAt(o);var f=Aes.keyExpansion(u),l=Math.ceil((e.length-8)/r),c=new Array(l);for(var h=0;h<l;h++)c[h]=e.slice(8+h*r,8+h*r+r);e=c;var p=new Array(e.length);for(var h=0;h<l;h++){for(var d=0;d<4;d++)a[15-d]=h>>>d*8&255;for(var d=0;d<4;d++)a[15-d-4]=(h+1)/4294967296-1>>>d*8&255;var v=Aes.cipher(a,f),m=new Array(e[h].length);for(var o=0;o<e[h].length;o++){m[o]=v[o]^e[h].charCodeAt(o);m[o]=String.fromCharCode(m[o])}p[h]=m.join("")}var g=p.join("");g=Utf8.decode(g);return g};var Base64={};Base64.code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Base64.encode=function(e,t){t=typeof t=="undefined"?!1:t;var n,r,i,s,o,u,a,f,l=[],c="",h,p,d,v=Base64.code;p=t?e.encodeUTF8():e;h=p.length%3;if(h>0)while(h++<3){c+="=";p+="\0"}for(h=0;h<p.length;h+=3){n=p.charCodeAt(h);r=p.charCodeAt(h+1);i=p.charCodeAt(h+2);s=n<<16|r<<8|i;o=s>>18&63;u=s>>12&63;a=s>>6&63;f=s&63;l[h/3]=v.charAt(o)+v.charAt(u)+v.charAt(a)+v.charAt(f)}d=l.join("");d=d.slice(0,d.length-c.length)+c;return d};Base64.decode=function(e,t){t=typeof t=="undefined"?!1:t;var n,r,i,s,o,u,a,f,l=[],c,h,p=Base64.code;h=t?e.decodeUTF8():e;for(var d=0;d<h.length;d+=4){s=p.indexOf(h.charAt(d));o=p.indexOf(h.charAt(d+1));u=p.indexOf(h.charAt(d+2));a=p.indexOf(h.charAt(d+3));f=s<<18|o<<12|u<<6|a;n=f>>>16&255;r=f>>>8&255;i=f&255;l[d/4]=String.fromCharCode(n,r,i);a==64&&(l[d/4]=String.fromCharCode(n,r));u==64&&(l[d/4]=String.fromCharCode(n))}c=l.join("");return t?c.decodeUTF8():c};var Utf8={};Utf8.encode=function(e){var t=e.replace(/[\u0080-\u07ff]/g,function(e){var t=e.charCodeAt(0);return String.fromCharCode(192|t>>6,128|t&63)});t=t.replace(/[\u0800-\uffff]/g,function(e){var t=e.charCodeAt(0);return String.fromCharCode(224|t>>12,128|t>>6&63,128|t&63)});return t};Utf8.decode=function(e){var t=e.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(e){var t=(e.charCodeAt(0)&15)<<12|(e.charCodeAt(1)&63)<<6|e.charCodeAt(2)&63;return String.fromCharCode(t)});t=t.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(e){var t=(e.charCodeAt(0)&31)<<6|e.charCodeAt(1)&63;return String.fromCharCode(t)});return t};!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t;this.$element=e(n);this.options=this.getOptions(r);this.enabled=!0;if(this.options.trigger!="manual"){i=this.options.trigger=="hover"?"mouseenter":"focus";s=this.options.trigger=="hover"?"mouseleave":"blur";this.$element.on(i,this.options.selector,e.proxy(this.enter,this));this.$element.on(s,this.options.selector,e.proxy(this.leave,this))}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){t=e.extend({},e.fn[this.type].defaults,t,this.$element.data());t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay});return t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)n.show();else{n.hoverState="in";setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)}},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.hide)n.hide();else{n.hoverState="out";setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)}},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip();this.setContent();this.options.animation&&e.addClass("fade");s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement;t=/in/.test(s);e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body);n=this.getPosition(t);r=e[0].offsetWidth;i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip();e.find(".tooltip-inner").html(this.getTitle());e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t);n.remove()})}var t=this,n=this.tip();n.removeClass("in");e.support.transition&&this.$tip.hasClass("fade")?r():n.remove()},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title);e=e.toString().replace(/(^\s*|\s*$)/,"");return e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}};e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s));typeof n=="string"&&i[n]()})};e.fn.tooltip.Constructor=t;e.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery);!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t;this.$element=e(n);this.options=this.getOptions(r);this.enabled=!0;if(this.options.trigger!="manual"){i=this.options.trigger=="hover"?"mouseenter":"focus";s=this.options.trigger=="hover"?"mouseleave":"blur";this.$element.on(i,this.options.selector,e.proxy(this.enter,this));this.$element.on(s,this.options.selector,e.proxy(this.leave,this))}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){t=e.extend({},e.fn[this.type].defaults,t,this.$element.data());t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay});return t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)n.show();else{n.hoverState="in";setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)}},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.hide)n.hide();else{n.hoverState="out";setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)}},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip();this.setContent();this.options.animation&&e.addClass("fade");s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement;t=/in/.test(s);e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body);n=this.getPosition(t);r=e[0].offsetWidth;i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip();e.find(".tooltip-inner").html(this.getTitle());e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t);n.remove()})}var t=this,n=this.tip();n.removeClass("in");e.support.transition&&this.$tip.hasClass("fade")?r():n.remove()},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title);e=e.toString().replace(/(^\s*|\s*$)/,"");return e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}};e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s));typeof n=="string"&&i[n]()})};e.fn.tooltip.Constructor=t;e.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery);if(typeof VMM!="undefined"&&typeof VMM.Timeline=="undefined"){VMM.Timeline=function(e,t,n,r){function E(e,t){trace("onDataReady");trace(t);c=t.timeline;type.of(c.era)!="array"&&(c.era=[]);F()}function S(){H()}function x(){j();o.setSize(p.feature.width,p.feature.height);u.setSize(p.width,p.height)}function T(e){p.loaded.slider=!0;N()}function N(e){p.loaded.percentloaded=p.loaded.percentloaded+25;p.loaded.slider&&p.loaded.timenav&&D()}function C(e){p.loaded.timenav=!0;N()}function k(e){g=!0;p.current_slide=o.getCurrentNumber();O(p.current_slide);u.setMarker(p.current_slide,p.ease,p.duration)}function L(e){g=!0;p.current_slide=u.getCurrentNumber();O(p.current_slide);o.setSlide(p.current_slide)}function O(e){p.hash_bookmark&&(window.location.hash="#"+e.toString())}var i,s,o,u,a,f,l={},c={},h=[],p={},d=!1,v=!1,m=!1,g=!1;type.of(r)=="string"?f=r:f="#timeline";a="1.62";trace("TIMELINE VERSION "+a);p={embed:!1,events:{data_ready:"DATAREADY",messege:"MESSEGE",headline:"TIMELINE_HEADLINE",slide_change:"SLIDE_CHANGE",resize:"resize"},id:f,type:"timeline",touch:!1,
maptype:"toner",preload:4,current_slide:0,hash_bookmark:!1,start_at_end:!1,start_at_slide:0,start_zoom_adjust:0,start_page:!1,api_keys:{google:"",flickr:"",twitter:""},interval:10,something:0,width:960,height:540,spacing:15,loaded:{slider:!1,timenav:!1,percentloaded:0},nav:{start_page:!1,interval_width:200,density:4,minor_width:0,minor_left:0,constraint:{left:0,right:0,right_min:0,right_max:0},zoom:{adjust:0},multiplier:{current:6,min:.1,max:50},rows:[1,1,1],width:960,height:200,marker:{width:150,height:50}},feature:{width:960,height:540},slider:{width:720,height:400,content:{width:720,height:400,padding:130},nav:{width:100,height:200}},ease:"easeInOutExpo",duration:1e3,language:VMM.Language};if(e!=null&&e!=""){p.width=e;d=!0}if(t!=null&&t!=""){p.height=t;v=!0}if(window.location.hash){var y=window.location.hash.substring(1);isNaN(y)||(p.current_slide=parseInt(y))}window.onhashchange=function(){var e=window.location.hash.substring(1);p.hash_bookmark?g?A(parseInt(e)):g=!1:A(parseInt(e))};var b=function(e){if(typeof timeline_config=="object"){trace("HAS TIMELINE CONFIG");var t;for(t in timeline_config)Object.prototype.hasOwnProperty.call(timeline_config,t)&&(p[t]=timeline_config[t])}else if(typeof e=="object"){var t;for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(p[t]=e[t])}if(VMM.Browser.device=="mobile"||VMM.Browser.device=="tablet")p.touch=!0;p.nav.width=p.width;p.nav.height=200;p.feature.width=p.width;p.feature.height=p.height-p.nav.height;p.nav.zoom.adjust=parseInt(p.start_zoom_adjust,10);VMM.Timeline.Config=p;VMM.master_config.Timeline=VMM.Timeline.Config;this.events=p.events},w=function(e,t){i=VMM.getElement(f);VMM.Lib.addClass(f,"vmm-timeline");s=VMM.appendAndGetElement(i,"<div>","feedback","");o=new VMM.Slider(f+" div.slider",p);u=new VMM.Timeline.TimeNav(f+" div.navigation");d?VMM.Lib.width(i,p.width):p.width=VMM.Lib.width(i);v?VMM.Lib.height(i,p.height):p.height=VMM.Lib.height(i)},A=function(e){if(e<=h.length-1&&e>=0){p.current_slide=e;o.setSlide(p.current_slide);u.setMarker(p.current_slide,p.ease,p.duration)}};this.init=function(n,r,o){type.of(r)=="string"&&(r.match("#")?f=r:f="#"+r);b(o);w(e,t);trace("TIMELINE INIT");VMM.Date.setLanguage(VMM.Timeline.Config.language);VMM.master_config.language=VMM.Timeline.Config.language;s=VMM.appendAndGetElement(i,"<div>","feedback","");VMM.bindEvent(global,E,p.events.data_ready);VMM.bindEvent(global,_,p.events.messege);VMM.fireEvent(global,p.events.messege,VMM.master_config.language.messages.loading_timeline);(VMM.Browser.browser=="Explorer"||VMM.Browser.browser=="MSIE")&&parseInt(VMM.Browser.version,10)<=7&&(m=!0);type.of(n)=="string"||type.of(n)=="object"?VMM.Timeline.DataObj.getData(n):VMM.Timeline.DataObj.getData(VMM.getElement(f))};this.iframeLoaded=function(){trace("iframeLoaded")};this.reload=function(e){trace("loadNewDates"+e);VMM.fireEvent(global,p.events.messege,VMM.master_config.language.messages.loading_timeline);c={};VMM.Timeline.DataObj.getData(e)};var M=function(e){VMM.getJSON(e,function(e){c=VMM.Timeline.DataObj.getData(e);VMM.fireEvent(global,p.events.data_ready)})},_=function(e,t){trace("showMessege "+t);VMM.attachElement(s,VMM.MediaElement.loadingmessage(t))},D=function(){VMM.Lib.animate(s,p.duration,p.ease*4,{opacity:0},P)},P=function(){VMM.Lib.detach(s)},H=function(){parseInt(p.start_at_slide)>0&&p.current_slide==0&&(p.current_slide=parseInt(p.start_at_slide));p.start_at_end&&p.current_slide==0&&(p.current_slide=h.length-1);if(m){m=!0;VMM.fireEvent(global,p.events.messege,"Internet Explorer "+VMM.Browser.version+" is not supported by TimelineJS. Please update your browser to version 8 or higher.")}else{VMM.attachElement(i,"");VMM.appendElement(i,"<div class='container main'><div class='feature'><div class='slider'></div></div><div class='navigation'></div></div>");x();VMM.bindEvent("div.slider",T,"LOADED");VMM.bindEvent("div.navigation",C,"LOADED");VMM.bindEvent("div.slider",k,"UPDATE");VMM.bindEvent("div.navigation",L,"UPDATE");o.init(h);u.init(h,c.era);VMM.bindEvent(global,x,p.events.resize)}},B=function(){trace("IE7 or lower");for(var e=0;e<h.length;e++)trace(h[e])},j=function(){trace("UPDATE SIZE");p.width=VMM.Lib.width(i);p.height=VMM.Lib.height(i);p.nav.width=p.width;p.feature.width=p.width;VMM.Browser.device=="mobile";p.feature.height=p.height-p.nav.height-3},F=function(){h=[];VMM.fireEvent(global,p.events.messege,"Building Dates");j();for(var e=0;e<c.date.length;e++)if(c.date[e].startDate!=null&&c.date[e].startDate!=""){var t={};c.date[e].type=="tweets"?t.startdate=VMM.ExternalAPI.twitter.parseTwitterDate(c.date[e].startDate):t.startdate=VMM.Date.parse(c.date[e].startDate);if(!isNaN(t.startdate)){c.date[e].endDate!=null&&c.date[e].endDate!=""?c.date[e].type=="tweets"?t.enddate=VMM.ExternalAPI.twitter.parseTwitterDate(c.date[e].endDate):t.enddate=VMM.Date.parse(c.date[e].endDate):t.enddate=t.startdate;t.needs_slug=!1;c.date[e].headline==""&&c.date[e].slug!=null&&c.date[e].slug!=""&&(t.needs_slug=!0);t.title=c.date[e].headline;t.headline=c.date[e].headline;t.type=c.date[e].type;t.date=VMM.Date.prettyDate(t.startdate);t.asset=c.date[e].asset;t.fulldate=t.startdate.getTime();t.text=c.date[e].text;t.content="";t.tag=c.date[e].tag;t.slug=c.date[e].slug;t.uniqueid=VMM.Util.unique_ID(7);h.push(t)}}c.type!="storify"&&h.sort(function(e,t){return e.fulldate-t.fulldate});if(c.headline!=null&&c.headline!=""&&c.text!=null&&c.text!=""){trace("HAS STARTPAGE");var t={},n=0,r;r=h[0].startdate;t.startdate=new Date(h[0].startdate);r.getMonth()===0&&r.getDate()==1&&r.getHours()===0&&r.getMinutes()===0?t.startdate.setFullYear(r.getFullYear()-1):r.getDate()<=1&&r.getHours()===0&&r.getMinutes()===0?t.startdate.setMonth(r.getMonth()-1):r.getHours()===0&&r.getMinutes()===0?t.startdate.setDate(r.getDate()-1):r.getMinutes()===0?t.startdate.setHours(r.getHours()-1):t.startdate.setMinutes(r.getMinutes()-1);t.uniqueid=VMM.Util.unique_ID(7);t.enddate=t.startdate;t.title=c.headline;t.headline=c.headline;t.text=c.text;t.type="start";t.date=VMM.Date.prettyDate(c.startDate);t.asset=c.asset;t.slug=!1;t.needs_slug=!1;t.fulldate=t.startdate.getTime();p.embed&&VMM.fireEvent(global,p.events.headline,t.headline);h.unshift(t)}c.type!="storify"&&h.sort(function(e,t){return e.fulldate-t.fulldate});S()}};VMM.Timeline.Config={}}typeof VMM.Timeline!="undefined"&&typeof VMM.Timeline.TimeNav=="undefined"&&(VMM.Timeline.TimeNav=function(e,t,n){function R(){trace("onConfigSet")}function U(e){I.nav.constraint.left=I.width/2;I.nav.constraint.right=I.nav.constraint.right_min-I.width/2;_.updateConstraint(I.nav.constraint);VMM.Lib.css(C,"left",Math.round(I.width/2)+2);VMM.Lib.css(k,"left",Math.round(I.width/2)-8);G(I.current_slide,I.ease,I.duration,!0,e)}function z(){VMM.fireEvent(s,"UPDATE")}function W(){_.cancelSlide();if(I.nav.multiplier.current>I.nav.multiplier.min){I.nav.multiplier.current<=1?I.nav.multiplier.current=I.nav.multiplier.current-.25:I.nav.multiplier.current>5?I.nav.multiplier.current>16?I.nav.multiplier.current=Math.round(I.nav.multiplier.current-10):I.nav.multiplier.current=Math.round(I.nav.multiplier.current-4):I.nav.multiplier.current=Math.round(I.nav.multiplier.current-1);I.nav.multiplier.current<=0&&(I.nav.multiplier.current=I.nav.multiplier.min);J()}}function X(){_.cancelSlide();if(I.nav.multiplier.current<I.nav.multiplier.max){I.nav.multiplier.current>4?I.nav.multiplier.current>16?I.nav.multiplier.current=Math.round(I.nav.multiplier.current+10):I.nav.multiplier.current=Math.round(I.nav.multiplier.current+4):I.nav.multiplier.current=Math.round(I.nav.multiplier.current+1);I.nav.multiplier.current>=I.nav.multiplier.max&&(I.nav.multiplier.current=I.nav.multiplier.max);J()}}function V(e){_.cancelSlide();G(0);z()}function $(e){var t=0,n=0;e||(e=window.event);e.originalEvent&&(e=e.originalEvent);e.wheelDelta?t=e.wheelDelta/6:e.detail&&(t=-e.detail*12);if(t){e.preventDefault&&e.preventDefault();e.returnValue=!1}if(typeof e.wheelDeltaX!="undefined"){t=e.wheelDeltaY/6;Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY)?t=e.wheelDeltaX/6:t=e.wheelDeltaY/6}n=VMM.Lib.position(y).left+t;n>I.nav.constraint.left?n=I.width/2:n<I.nav.constraint.right&&(n=I.nav.constraint.right);VMM.Lib.stop(y);VMM.Lib.css(y,"left",n)}function K(e){_.cancelSlide();G(e.data.number);z()}function Q(e){VMM.Lib.toggleClass(e.data.elem,"zFront")}function Y(e,t){VMM.Lib.animate(y,t.time/2,I.ease,{left:t.left})}trace("VMM.Timeline.TimeNav");var r={},i={},s=e,o=[],u=[],a=[],f=[],l=[],c=[],h=0,p=!1,d,v,m={interval_position:""},g={left:"",visible:{left:"",right:""}},y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D={day:24,month:12,year:10,hour:60,minute:60,second:1e3,decade:10,century:100,millenium:1e3,age:1e6,epoch:1e7,era:1e8,eon:5e8,week:4.34812141,days_in_month:30.4368499,days_in_week:7,weeks_in_month:4.34812141,weeks_in_year:52.177457,days_in_year:365.242199,hours_in_day:24},P={day:864e5,week:7,month:30.4166666667,year:12,hour:24,minute:1440,second:86400,decade:10,century:100,millenium:1e3,age:1e6,epoch:1e7,era:1e8,eon:5e8},H={type:"year",number:10,first:1970,last:2011,multiplier:100,classname:"_idd",interval_type:"interval"},B={type:"year",number:10,first:1970,last:2011,multiplier:100,classname:"major",interval_type:"interval major"},j={type:"year",number:10,first:1970,last:2011,multiplier:100,classname:"_dd_minor",interval_type:"interval minor"},F={day:{},month:{},year:{},hour:{},minute:{},second:{},decade:{},century:{},millenium:{},week:{},age:{},epoch:{},era:{},eon:{}},I=VMM.Timeline.Config,q=I.nav.marker.height/2;I.nav.rows={full:[1,q*2,q*4],half:[1,q,q*2,q*3,q*4,q*5],current:[]};t!=null&&t!=""&&(I.nav.width=t);n!=null&&n!=""&&(I.nav.height=n);this.init=function(e,t){trace("VMM.Timeline.TimeNav init");typeof e!="undefined"?this.setData(e,t):trace("WAITING ON DATA")};this.setData=function(e,t){if(typeof e!="undefined"){o={};o=e;d=t;lt()}else trace("NO DATA")};this.setSize=function(e,t){e!=null&&(I.width=e);t!=null&&(I.height=t);p&&U()};this.setMarker=function(e,t,n,r){G(e,t,n)};this.getCurrentNumber=function(){return h};var J=function(){trace("config.nav.multiplier "+I.nav.multiplier.current);ot(!0);ut(!0);at(S,f,!0,!0);at(x,l,!0);I.nav.constraint.left=I.width/2;I.nav.constraint.right=I.nav.constraint.right_min-I.width/2;_.updateConstraint(I.nav.constraint)},G=function(e,t,n,r,i){var s=I.ease,o=I.duration,u=!1,f=!1;h=e;g.left=I.width/2-VMM.Lib.position(a[h].marker).left;g.visible.left=Math.abs(g.left)-100;g.visible.right=Math.abs(g.left)+I.width+100;h==0&&(f=!0);h+1==a.length&&(u=!0);t!=null&&t!=""&&(s=t);n!=null&&n!=""&&(o=n);for(var l=0;l<a.length;l++)VMM.Lib.removeClass(a[l].marker,"active");if(I.start_page&&a[0].type=="start"){VMM.Lib.visible(a[0].marker,!1);VMM.Lib.addClass(a[0].marker,"start")}VMM.Lib.addClass(a[h].marker,"active");VMM.Lib.stop(y);VMM.Lib.animate(y,o,s,{left:g.left})},Z=function(){var e=0,t=0,n=0,r=[];for(var i=0;i<a.length;i++)if(o[i].type!="start"){var s=st(H,a[i].relative_pos),e=t;t=s.begin;n=t-e;r.push(n)}return VMM.Util.average(r).mean},et=function(){var e=0,t=0,n=0,r=[],i=!0;for(var s=0;s<o.length;s++)if(o[s].type=="start")trace("DATA DATE IS START");else{var u=o[s].startdate;e=t;t=u;n=t-e;r.push(n)}return VMM.Util.average(r)},tt=function(){var e=I.nav.multiplier.current;for(var t=0;t<e;t++)Z()<75&&I.nav.multiplier.current>1&&(I.nav.multiplier.current=I.nav.multiplier.current-1)},nt=function(){var e=rt(o[0].startdate),t=rt(o[o.length-1].enddate);F.eon.type="eon";F.eon.first=e.eons;F.eon.base=Math.floor(e.eons);F.eon.last=t.eons;F.eon.number=i.eons;F.eon.multiplier=D.eons;F.eon.minor=D.eons;F.era.type="era";F.era.first=e.eras;F.era.base=Math.floor(e.eras);F.era.last=t.eras;F.era.number=i.eras;F.era.multiplier=D.eras;F.era.minor=D.eras;F.epoch.type="epoch";F.epoch.first=e.epochs;F.epoch.base=Math.floor(e.epochs);F.epoch.last=t.epochs;F.epoch.number=i.epochs;F.epoch.multiplier=D.epochs;F.epoch.minor=D.epochs;F.age.type="age";F.age.first=e.ages;F.age.base=Math.floor(e.ages);F.age.last=t.ages;F.age.number=i.ages;F.age.multiplier=D.ages;F.age.minor=D.ages;F.millenium.type="millenium";F.millenium.first=e.milleniums;F.millenium.base=Math.floor(e.milleniums);F.millenium.last=t.milleniums;F.millenium.number=i.milleniums;F.millenium.multiplier=D.millenium;F.millenium.minor=D.millenium;F.century.type="century";F.century.first=e.centuries;F.century.base=Math.floor(e.centuries);F.century.last=t.centuries;F.century.number=i.centuries;F.century.multiplier=D.century;F.century.minor=D.century;F.decade.type="decade";F.decade.first=e.decades;F.decade.base=Math.floor(e.decades);F.decade.last=t.decades;F.decade.number=i.decades;F.decade.multiplier=D.decade;F.decade.minor=D.decade;F.year.type="year";F.year.first=e.years;F.year.base=Math.floor(e.years);F.year.last=t.years;F.year.number=i.years;F.year.multiplier=1;F.year.minor=D.month;F.month.type="month";F.month.first=e.months;F.month.base=Math.floor(e.months);F.month.last=t.months;F.month.number=i.months;F.month.multiplier=1;F.month.minor=Math.round(D.week);F.week.type="week";F.week.first=e.weeks;F.week.base=Math.floor(e.weeks);F.week.last=t.weeks;F.week.number=i.weeks;F.week.multiplier=1;F.week.minor=7;F.day.type="day";F.day.first=e.days;F.day.base=Math.floor(e.days);F.day.last=t.days;F.day.number=i.days;F.day.multiplier=1;F.day.minor=24;F.hour.type="hour";F.hour.first=e.hours;F.hour.base=Math.floor(e.hours);F.hour.last=t.hours;F.hour.number=i.hours;F.hour.multiplier=1;F.hour.minor=60;F.minute.type="minute";F.minute.first=e.minutes;F.minute.base=Math.floor(e.minutes);F.minute.last=t.minutes;F.minute.number=i.minutes;F.minute.multiplier=1;F.minute.minor=60;F.second.type="decade";F.second.first=e.seconds;F.second.base=Math.floor(e.seconds);F.second.last=t.seconds;F.second.number=i.seconds;F.second.multiplier=1;F.second.minor=10},rt=function(e,t){var n={};n.days=e/P.day;n.weeks=n.days/P.week;n.months=n.days/P.month;n.years=n.months/P.year;n.hours=n.days*P.hour;n.minutes=n.days*P.minute;n.seconds=n.days*P.second;n.decades=n.years/P.decade;n.centuries=n.years/P.century;n.milleniums=n.years/P.millenium;n.ages=n.years/P.age;n.epochs=n.years/P.epoch;n.eras=n.years/P.era;n.eons=n.years/P.eon;return n},it=function(e,t,n){var r,i,s=e.type,o={start:"",end:"",type:s};r=rt(t);o.start=t.months;s=="eon"?o.start=r.eons:s=="era"?o.start=r.eras:s=="epoch"?o.start=r.epochs:s=="age"?o.start=r.ages:s=="millenium"?o.start=t.milleniums:s=="century"?o.start=r.centuries:s=="decade"?o.start=r.decades:s=="year"?o.start=r.years:s=="month"?o.start=r.months:s=="week"?o.start=r.weeks:s=="day"?o.start=r.days:s=="hour"?o.start=r.hours:s=="minute"&&(o.start=r.minutes);if(type.of(n)=="date"){i=rt(n);o.end=n.months;s=="eon"?o.end=i.eons:s=="era"?o.end=i.eras:s=="epoch"?o.end=i.epochs:s=="age"?o.end=i.ages:s=="millenium"?o.end=n.milleniums:s=="century"?o.end=i.centuries:s=="decade"?o.end=i.decades:s=="year"?o.end=i.years:s=="month"?o.end=i.months:s=="week"?o.end=i.weeks:s=="day"?o.end=i.days:s=="hour"?o.end=i.hours:s=="minute"&&(o.end=i.minutes)}else o.end=o.start;return o},st=function(e,t){return{begin:(t.start-H.base)*(I.nav.interval_width/I.nav.multiplier.current),end:(t.end-H.base)*(I.nav.interval_width/I.nav.multiplier.current)}},ot=function(e){var t=2,n=0,r=-2,i=0,s=0,o=150,u=6,f=0,l=I.width,p=[],d=6,v={left:g.visible.left-l,right:g.visible.right+l};I.nav.minor_width=I.width;VMM.Lib.removeClass(".flag","row1");VMM.Lib.removeClass(".flag","row2");VMM.Lib.removeClass(".flag","row3");for(var m=0;m<a.length;m++){var b,w=a[m],E=st(H,a[m].relative_pos),S=0,x=!1,T={id:m,pos:0,row:0},N=0;E.begin=Math.round(E.begin+r);E.end=Math.round(E.end+r);b=Math.round(E.end-E.begin);if(h==m){g.left=I.width/2-E;g.visible.left=Math.abs(g.left);g.visible.right=Math.abs(g.left)+I.width;v.left=g.visible.left-l;v.right=g.visible.right+l}Math.abs(E.begin)>=v.left&&Math.abs(E.begin)<=v.right&&(x=!0);if(e){VMM.Lib.stop(w.marker);VMM.Lib.animate(w.marker,I.duration/2,I.ease,{left:E.begin})}else{VMM.Lib.stop(w.marker);VMM.Lib.css(w.marker,"left",E.begin)}m==h&&(f=E.begin);if(b>5){VMM.Lib.css(w.lineevent,"height",u);VMM.Lib.css(w.lineevent,"top",o);e?VMM.Lib.animate(w.lineevent,I.duration/2,I.ease,{width:b}):VMM.Lib.css(w.lineevent,"width",b)}if(c.length>0){for(var C=0;C<c.length;C++)if(C<I.nav.rows.current.length&&w.tag==c[C]){t=C;if(C==I.nav.rows.current.length-1){trace("ON LAST ROW");VMM.Lib.addClass(w.flag,"flag-small-last")}}S=I.nav.rows.current[t]}else{if(E.begin-n.begin<I.nav.marker.width+I.spacing)if(t<I.nav.rows.current.length-1)t++;else{t=0;i++}else{i=1;t=1}S=I.nav.rows.current[t]}n=E;T.pos=E;T.row=t;p.push(T);p.length>d&&p.remove(0);if(e){VMM.Lib.stop(w.flag);VMM.Lib.animate(w.flag,I.duration,I.ease,{top:S})}else{VMM.Lib.stop(w.flag);VMM.Lib.css(w.flag,"top",S)}I.start_page&&a[m].type=="start"&&VMM.Lib.visible(w.marker,!1);E>I.nav.minor_width&&(I.nav.minor_width=E);E<I.nav.minor_left&&(I.nav.minor_left=E)}VMM.Lib.stop(y);VMM.Lib.animate(y,I.duration/2,I.ease,{left:I.width/2-f})},ut=function(e){for(var t=0;t<u.length;t++){var n=u[t],r=st(H,n.relative_pos),i=0,s=I.nav.marker.height*I.nav.rows.full.length,o=r.end-r.begin;if(n.tag!=""){s=I.nav.marker.height*I.nav.rows.full.length/I.nav.rows.current.length;for(var a=0;a<c.length;a++)a<I.nav.rows.current.length&&n.tag==c[a]&&(row=a);i=I.nav.rows.current[row]}else i=-1;if(e){VMM.Lib.stop(n.content);VMM.Lib.stop(n.text_content);VMM.Lib.animate(n.content,I.duration/2,I.ease,{top:i,left:r.begin,width:o,height:s});VMM.Lib.animate(n.text_content,I.duration/2,I.ease,{left:r.begin})}else{VMM.Lib.stop(n.content);VMM.Lib.stop(n.text_content);VMM.Lib.css(n.content,"left",r.begin);VMM.Lib.css(n.content,"width",o);VMM.Lib.css(n.content,"height",s);VMM.Lib.css(n.content,"top",i);VMM.Lib.css(n.text_content,"left",r.begin)}}},at=function(e,t,n,r){var i=0,s=0,o=I.width,u={left:g.visible.left-o,right:g.visible.right+o};not_too_many=!0;I.nav.minor_left=0;if(t.length>100){not_too_many=!1;trace("TOO MANY "+t.length)}for(var a=0;a<t.length;a++){var f=t[a].element,l=t[a].date,c=t[a].visible,h=st(H,t[a].relative_pos),p=h.begin,d=t[a].animation,v=!0,m=!1,y=50;d.pos=p;d.animate=!1;Math.abs(p)>=u.left&&Math.abs(p)<=u.right&&(m=!0);I.nav.multiplier.current>16&&r?v=!1:p-i<65&&(p-i<35?a%4==0?p==0&&(v=!1):v=!1:VMM.Util.isEven(a)||(v=!1));if(v){if(t[a].is_detached){VMM.Lib.append(e,f);t[a].is_detached=!1}}else{t[a].is_detached=!0;VMM.Lib.detach(f)}if(c)if(!v){d.opacity="0";n&&not_too_many&&(d.animate=!0);t[a].interval_visible=!1}else{d.opacity="100";n&&m&&(d.animate=!0)}else{d.opacity="100";if(v){n&&not_too_many?d.animate=!0:n&&m&&(d.animate=!0);t[a].interval_visible=!0}else n&&not_too_many&&(d.animate=!0)}i=p;p>I.nav.minor_width&&(I.nav.minor_width=p);p<I.nav.minor_left&&(I.nav.minor_left=p);if(d.animate)VMM.Lib.animate(f,I.duration/2,I.ease,{opacity:d.opacity,left:d.pos});else{VMM.Lib.css(f,"opacity",d.opacity);VMM.Lib.css(f,"left",p)}}I.nav.constraint.right_min=-I.nav.minor_width+I.width;I.nav.constraint.right=I.nav.constraint.right_min+I.width/2;VMM.Lib.css(L,"left",I.nav.minor_left-I.width/2);VMM.Lib.width(L,I.nav.minor_width+I.width+Math.abs(I.nav.minor_left))},ft=function(e,t,n){var r=0,i=!0,s=0,u=0,a,f,l,c=Math.ceil(e.number)+2,h={flag:!1,offset:0};VMM.attachElement(n,"");e.date=new Date(o[0].startdate.getFullYear(),0,1,0,0,0);a=e.date.getTimezoneOffset();for(var p=0;p<c;p++){trace(e.type);var d=!1,v={element:VMM.appendAndGetElement(n,"<div>",e.classname),date:new Date(o[0].startdate.getFullYear(),0,1,0,0,0),visible:!1,date_string:"",type:e.interval_type,relative_pos:0,is_detached:!1,animation:{animate:!1,pos:"",opacity:"100"}};if(e.type=="eon"){i&&(f=Math.floor(o[0].startdate.getFullYear()/5e8)*5e8);v.date.setFullYear(f+r*5e8);d=!0}else if(e.type=="era"){i&&(f=Math.floor(o[0].startdate.getFullYear()/1e8)*1e8);v.date.setFullYear(f+r*1e8);d=!0}else if(e.type=="epoch"){i&&(f=Math.floor(o[0].startdate.getFullYear()/1e7)*1e7);v.date.setFullYear(f+r*1e7);d=!0}else if(e.type=="age"){i&&(f=Math.floor(o[0].startdate.getFullYear()/1e6)*1e6);v.date.setFullYear(f+r*1e6);d=!0}else if(e.type=="millenium"){i&&(f=Math.floor(o[0].startdate.getFullYear()/1e3)*1e3);v.date.setFullYear(f+r*1e3);d=!0}else if(e.type=="century"){i&&(f=Math.floor(o[0].startdate.getFullYear()/100)*100);v.date.setFullYear(f+r*100);d=!0}else if(e.type=="decade"){i&&(f=Math.floor(o[0].startdate.getFullYear()/10)*10);v.date.setFullYear(f+r*10);d=!0}else if(e.type=="year"){i&&(f=o[0].startdate.getFullYear());v.date.setFullYear(f+r);d=!0}else if(e.type=="month"){i&&(f=o[0].startdate.getMonth());v.date.setMonth(f+r)}else if(e.type=="week"){i&&(f=o[0].startdate.getMonth());v.date.setMonth(o[0].startdate.getMonth());v.date.setDate(f+r*7)}else if(e.type=="day"){i&&(f=o[0].startdate.getDate());v.date.setMonth(o[0].startdate.getMonth());v.date.setDate(f+r)}else if(e.type=="hour"){i&&(f=o[0].startdate.getHours());v.date.setMonth(o[0].startdate.getMonth());v.date.setDate(o[0].startdate.getDate());v.date.setHours(f+r)}else if(e.type=="minute"){i&&(f=o[0].startdate.getMinutes());v.date.setMonth(o[0].startdate.getMonth());v.date.setDate(o[0].startdate.getDate());v.date.setHours(o[0].startdate.getHours());v.date.setMinutes(f+r)}else if(e.type=="second"){i&&(f=o[0].startdate.getSeconds());v.date.setMonth(o[0].startdate.getMonth());v.date.setDate(o[0].startdate.getDate());v.date.setHours(o[0].startdate.getHours());v.date.setMinutes(o[0].startdate.getMinutes());v.date.setSeconds(f+r)}else if(e.type=="millisecond"){i&&(f=o[0].startdate.getMilliseconds());v.date.setMonth(o[0].startdate.getMonth());v.date.setDate(o[0].startdate.getDate());v.date.setHours(o[0].startdate.getHours());v.date.setMinutes(o[0].startdate.getMinutes());v.date.setSeconds(o[0].startdate.getSeconds());v.date.setMilliseconds(f+r)}if(VMM.Browser.browser=="Firefox")if(v.date.getFullYear()=="1970"&&v.date.getTimezoneOffset()!=a){trace("FIREFOX 1970 TIMEZONE OFFSET "+v.date.getTimezoneOffset()+" SHOULD BE "+a);trace(e.type+" "+e.date);h.offset=v.date.getTimezoneOffset()/60;h.flag=!0;v.date.setHours(v.date.getHours()+h.offset)}else if(h.flag){h.flag=!1;v.date.setHours(v.date.getHours()+h.offset);d&&(h.flag=!0)}d?v.date.getFullYear()<0?v.date_string=Math.abs(v.date.getFullYear()).toString()+" B.C.":v.date_string=v.date.getFullYear():v.date_string=VMM.Date.prettyDate(v.date,!0);r+=1;i=!1;v.relative_pos=it(H,v.date);s=v.relative_pos.begin;v.relative_pos.begin>u&&(u=v.relative_pos.begin);VMM.appendElement(v.element,v.date_string);VMM.Lib.css(v.element,"text-indent",-(VMM.Lib.width(v.element)/2));VMM.Lib.css(v.element,"opacity","0");t.push(v)}VMM.Lib.width(L,u);at(n,t)},lt=function(){VMM.attachElement(s,"");y=VMM.appendAndGetElement(s,"<div>","timenav");b=VMM.appendAndGetElement(y,"<div>","content");w=VMM.appendAndGetElement(y,"<div>","time");E=VMM.appendAndGetElement(w,"<div>","time-interval-minor");L=VMM.appendAndGetElement(E,"<div>","minor");x=VMM.appendAndGetElement(w,"<div>","time-interval-major");S=VMM.appendAndGetElement(w,"<div>","time-interval");T=VMM.appendAndGetElement(s,"<div>","timenav-background");C=VMM.appendAndGetElement(T,"<div>","timenav-line");k=VMM.appendAndGetElement(T,"<div>","timenav-indicator");N=VMM.appendAndGetElement(T,"<div>","timenav-interval-background","<div class='top-highlight'></div>");A=VMM.appendAndGetElement(s,"<div>","toolbar");ct();ht();pt();tt();ot();ut();at(S,f,!1,!0);at(x,l);if(I.start_page){$backhome=VMM.appendAndGetElement(A,"<div>","back-home","<div class='icon'></div>");VMM.bindEvent(".back-home",V,"click");VMM.Lib.css(A,"top",27);VMM.Lib.attribute($backhome,"title",VMM.master_config.language.messages.return_to_title);VMM.Lib.attribute($backhome,"rel","tooltip")}O=VMM.appendAndGetElement(A,"<div>","zoom-in","<div class='icon'></div>");M=VMM.appendAndGetElement(A,"<div>","zoom-out","<div class='icon'></div>");_=new VMM.DragSlider;_.createPanel(s,y,I.nav.constraint,I.touch);VMM.bindEvent(".zoom-in",W,"click");VMM.bindEvent(".zoom-out",X,"click");if(!I.touch){VMM.Lib.attribute(O,"title",VMM.master_config.language.messages.expand_timeline);VMM.Lib.attribute(O,"rel","tooltip");VMM.Lib.attribute(M,"title",VMM.master_config.language.messages.contract_timeline);VMM.Lib.attribute(M,"rel","tooltip");A.tooltip({selector:"div[rel=tooltip]",placement:"right"});VMM.bindEvent(s,$,"DOMMouseScroll");VMM.bindEvent(s,$,"mousewheel")}VMM.fireEvent(s,"LOADED");p=!0;U(!0);if(I.nav.zoom.adjust!=0)if(I.nav.zoom.adjust<0)for(var e=0;e<Math.abs(I.nav.zoom.adjust);e++)X();else for(var t=0;t<I.nav.zoom.adjust;t++)W()},ct=function(){i=rt(o[o.length-1].enddate-o[0].startdate,!0);trace(i);nt();if(i.centuries>o.length/I.nav.density){H=F.century;B=F.millenium;j=F.decade}else if(i.decades>o.length/I.nav.density){H=F.decade;B=F.century;j=F.year}else if(i.years>o.length/I.nav.density){H=F.year;B=F.decade;j=F.month}else if(i.months>o.length/I.nav.density){H=F.month;B=F.year;j=F.day}else if(i.days>o.length/I.nav.density){H=F.day;B=F.month;j=F.hour}else if(i.hours>o.length/I.nav.density){H=F.hour;B=F.day;j=F.minute}else if(i.minutes>o.length/I.nav.density){H=F.minute;B=F.hour;j=F.second}else if(i.seconds>o.length/I.nav.density){H=F.second;B=F.minute;j=F.second}else{trace("NO IDEA WHAT THE TYPE SHOULD BE");H=F.day;B=F.month;j=F.hour}trace("INTERVAL TYPE: "+H.type);trace("INTERVAL MAJOR TYPE: "+B.type);ft(H,f,S);ft(B,l,x);for(var e=0;e<f.length;e++)for(var t=0;t<l.length;t++)f[e].date_string==l[t].date_string&&VMM.attachElement(f[e].element,"")},ht=function(){var e=2,t=0,n=0;a=[];u=[];for(var r=0;r<o.length;r++){var i,s,f,l,h,p,d="",v=!1;i=VMM.appendAndGetElement(b,"<div>","marker");s=VMM.appendAndGetElement(i,"<div>","flag");f=VMM.appendAndGetElement(s,"<div>","flag-content");l=VMM.appendAndGetElement(i,"<div>","dot");h=VMM.appendAndGetElement(i,"<div>","line");p=VMM.appendAndGetElement(h,"<div>","event-line");_marker_relative_pos=it(H,o[r].startdate,o[r].enddate);_marker_thumb="";o[r].asset!=null&&o[r].asset!=""?VMM.appendElement(f,VMM.MediaElement.thumbnail(o[r].asset,24,24,o[r].uniqueid)):VMM.appendElement(f,"<div style='margin-right:7px;height:50px;width:2px;float:left;'></div>");if(o[r].title==""||o[r].title==" "){trace("TITLE NOTHING");if(typeof o[r].slug!="undefined"&&o[r].slug!=""){trace("SLUG");d=VMM.Util.untagify(o[r].slug);v=!0}else{var m=VMM.MediaType(o[r].asset.media);if(m.type=="quote"||m.type=="unknown"){d=VMM.Util.untagify(m.id);v=!0}else if(m.type=="twitter"){v=!1;VMM.appendElement(f,"<h3 id='text_thumb_"+m.id+"'>"+d+"</h3>")}else v=!1}}else if(o[r].title!=""||o[r].title!=" "){trace(o[r].title);d=VMM.Util.untagify(o[r].title);v=!0}else trace("TITLE SLUG NOT FOUND "+o[r].slug);v&&VMM.appendElement(f,"<h3>"+d+"</h3>");VMM.Lib.attr(i,"id",("marker_"+o[r].uniqueid).toString());VMM.bindEvent(s,K,"",{number:r});VMM.bindEvent(s,Q,"mouseenter mouseleave",{number:r,elem:s});var g={marker:i,flag:s,lineevent:p,type:"marker",full:!0,relative_pos:_marker_relative_pos,tag:o[r].tag};if(o[r].type=="start"){trace("BUILD MARKER HAS START PAGE");I.start_page=!0;g.type="start"}o[r].type=="storify"&&(g.type="storify");o[r].tag&&c.push(o[r].tag);a.push(g)}c=VMM.Util.deDupeArray(c);c.length>2?I.nav.rows.current=I.nav.rows.half:I.nav.rows.current=I.nav.rows.full;for(var y=0;y<c.length;y++)if(y<I.nav.rows.current.length){var w=VMM.appendAndGetElement(T,"<div>","timenav-tag");VMM.Lib.addClass(w,"timenav-tag-row-"+(y+1));c.length>2?VMM.Lib.addClass(w,"timenav-tag-size-half"):VMM.Lib.addClass(w,"timenav-tag-size-full");VMM.appendElement(w,"<div><h3>"+c[y]+"</h3></div>")}if(c.length>2)for(var E=0;E<a.length;E++){VMM.Lib.addClass(a[E].flag,"flag-small");a[E].full=!1}},pt=function(){var e=6,t=0;for(var n=0;n<d.length;n++){var r={content:VMM.appendAndGetElement(b,"<div>","era"),text_content:VMM.appendAndGetElement(S,"<div>","era"),startdate:VMM.Date.parse(d[n].startDate),enddate:VMM.Date.parse(d[n].endDate),title:d[n].headline,uniqueid:VMM.Util.unique_ID(6),tag:"",relative_pos:""},i=VMM.Date.prettyDate(r.startdate),s=VMM.Date.prettyDate(r.enddate),o="";typeof d[n].tag!="undefined"&&(r.tag=d[n].tag);r.relative_pos=it(H,r.startdate,r.enddate);VMM.Lib.attr(r.content,"id",r.uniqueid);VMM.Lib.attr(r.text_content,"id",r.uniqueid+"_text");o+="<div>&nbsp;";i!=s;o+="</div>";VMM.Lib.addClass(r.content,"era"+(t+1));VMM.Lib.addClass(r.text_content,"era"+(t+1));t<e?t++:t=0;VMM.appendElement(r.content,o);VMM.appendElement(r.text_content,VMM.Util.unlinkify(r.title));u.push(r)}}});typeof VMM.Timeline!="undefined"&&typeof VMM.Timeline.DataObj=="undefined"&&(VMM.Timeline.DataObj={data_obj:{},model_array:[],getData:function(e){VMM.Timeline.DataObj.data_obj={};VMM.fireEvent(global,VMM.Timeline.Config.events.messege,VMM.Timeline.Config.language.messages.loading_timeline);if(type.of(e)=="object"){trace("DATA SOURCE: JSON OBJECT");VMM.Timeline.DataObj.parseJSON(e)}else if(type.of(e)=="string")if(e.match("%23")){trace("DATA SOURCE: TWITTER SEARCH");VMM.Timeline.DataObj.model.tweets.getData("%23medill")}else if(e.match("spreadsheet")){trace("DATA SOURCE: GOOGLE SPREADSHEET");VMM.Timeline.DataObj.model.googlespreadsheet.getData(e)}else if(e.match("storify.com")){trace("DATA SOURCE: STORIFY");VMM.Timeline.DataObj.model.storify.getData(e)}else{trace("DATA SOURCE: JSON");VMM.getJSON(e,VMM.Timeline.DataObj.parseJSON)}else if(type.of(e)=="html"){trace("DATA SOURCE: HTML");VMM.Timeline.DataObj.parseHTML(e)}else trace("DATA SOURCE: UNKNOWN")},parseHTML:function(e){trace("parseHTML");trace("WARNING: THIS IS STILL ALPHA AND WILL NOT WORK WITH ID's other than #timeline");var t=VMM.Timeline.DataObj.data_template_obj;if(VMM.Lib.find("#timeline section","time")[0]){t.timeline.startDate=VMM.Lib.html(VMM.Lib.find("#timeline section","time")[0]);t.timeline.headline=VMM.Lib.html(VMM.Lib.find("#timeline section","h2"));t.timeline.text=VMM.Lib.html(VMM.Lib.find("#timeline section","article"));var n=!1;if(VMM.Lib.find("#timeline section","figure img").length!=0){n=!0;t.timeline.asset.media=VMM.Lib.attr(VMM.Lib.find("#timeline section","figure img"),"src")}else if(VMM.Lib.find("#timeline section","figure a").length!=0){n=!0;t.timeline.asset.media=VMM.Lib.attr(VMM.Lib.find("#timeline section","figure a"),"href")}if(n){VMM.Lib.find("#timeline section","cite").length!=0&&(t.timeline.asset.credit=VMM.Lib.html(VMM.Lib.find("#timeline section","cite")));VMM.Lib.find(this,"figcaption").length!=0&&(t.timeline.asset.caption=VMM.Lib.html(VMM.Lib.find("#timeline section","figcaption")))}}VMM.Lib.each("#timeline li",function(e,n){var r=!1,i={type:"default",startDate:"",headline:"",text:"",asset:{media:"",credit:"",caption:""},tags:"Optional"};if(VMM.Lib.find(this,"time")!=0){r=!0;i.startDate=VMM.Lib.html(VMM.Lib.find(this,"time")[0]);VMM.Lib.find(this,"time")[1]&&(i.endDate=VMM.Lib.html(VMM.Lib.find(this,"time")[1]));i.headline=VMM.Lib.html(VMM.Lib.find(this,"h3"));i.text=VMM.Lib.html(VMM.Lib.find(this,"article"));var s=!1;if(VMM.Lib.find(this,"figure img").length!=0){s=!0;i.asset.media=VMM.Lib.attr(VMM.Lib.find(this,"figure img"),"src")}else if(VMM.Lib.find(this,"figure a").length!=0){s=!0;i.asset.media=VMM.Lib.attr(VMM.Lib.find(this,"figure a"),"href")}if(s){VMM.Lib.find(this,"cite").length!=0&&(i.asset.credit=VMM.Lib.html(VMM.Lib.find(this,"cite")));VMM.Lib.find(this,"figcaption").length!=0&&(i.asset.caption=VMM.Lib.html(VMM.Lib.find(this,"figcaption")))}trace(i);t.timeline.date.push(i)}});VMM.fireEvent(global,VMM.Timeline.Config.events.data_ready,t)},parseJSON:function(e){trace("parseJSON");if(e.timeline.type=="default"){trace("DATA SOURCE: JSON STANDARD TIMELINE");VMM.fireEvent(global,VMM.Timeline.Config.events.data_ready,e)}else if(e.timeline.type=="twitter"){trace("DATA SOURCE: JSON TWEETS");VMM.Timeline.DataObj.model_Tweets.buildData(e)}else{trace("DATA SOURCE: UNKNOWN JSON");trace(type.of(e.timeline))}},model:{googlespreadsheet:{getData:function(e){var t=VMM.Util.getUrlVars(e).key,n="https://spreadsheets.google.com/feeds/list/"+t+"/od6/public/values?alt=json";VMM.getJSON(n,VMM.Timeline.DataObj.model.googlespreadsheet.buildData)},buildData:function(e){VMM.fireEvent(global,VMM.Timeline.Config.events.messege,"Parsing Data");var t=VMM.Timeline.DataObj.data_template_obj;for(var n=0;n<e.feed.entry.length;n++){var r=e.feed.entry[n],i="";typeof r.gsx$type!="undefined"?i=r.gsx$type.$t:typeof r.gsx$titleslide!="undefined"&&(i=r.gsx$titleslide.$t);if(i.match("start")||i.match("title")){t.timeline.startDate=r.gsx$startdate.$t;t.timeline.headline=r.gsx$headline.$t;t.timeline.asset.media=r.gsx$media.$t;t.timeline.asset.caption=r.gsx$mediacaption.$t;t.timeline.asset.credit=r.gsx$mediacredit.$t;t.timeline.text=r.gsx$text.$t;t.timeline.type="google spreadsheet"}else if(i.match("era")){var s={startDate:r.gsx$startdate.$t,endDate:r.gsx$enddate.$t,headline:r.gsx$headline.$t,text:r.gsx$text.$t,tag:""};typeof r.gsx$tag!="undefined"&&(s.tag=r.gsx$tag.$t);t.timeline.era.push(s)}else{var o={type:"google spreadsheet"
,startDate:r.gsx$startdate.$t,endDate:r.gsx$enddate.$t,headline:r.gsx$headline.$t,text:r.gsx$text.$t,asset:{media:r.gsx$media.$t,credit:r.gsx$mediacredit.$t,caption:r.gsx$mediacaption.$t},tag:""};typeof r.gsx$tag!="undefined"&&(o.tag=r.gsx$tag.$t);t.timeline.date.push(o)}}VMM.fireEvent(global,VMM.Timeline.Config.events.data_ready,t)}},storify:{getData:function(e){VMM.fireEvent(global,VMM.Timeline.Config.events.messege,"Loading Storify...");var 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"){if(o.permalink.match("storify")){u=!0;var l=e.content.author.username,c="";if(typeof o.attribution.name!="undefined"){r=o.attribution.name;i=o.attribution.username+"&nbsp;"}var h="<div class='storify'>";h+="<blockquote><p>"+o.data.text.replace(/<\s*\/?\s*b\s*.*?>/g,"")+"</p></blockquote>";h+="<div class='vcard author'><a class='screen-name url' href='"+o.attribution.href+"' target='_blank'>";h+="<span class='avatar'><img src='"+o.attribution.thumbnail+"' style='max-width: 32px; max-height: 32px;'></span>";h+="<span class='fn'>"+r+"</span>";h+="<span class='nickname'>"+i+"<span class='thumbnail-inline'></span></span>";h+="</a></div></div>";f.text=h;if(s+1>=e.content.elements.length)f.startDate=e.content.elements[s-1].posted_at;else if(e.content.elements[s+1].type=="text"&&e.content.elements[s+1].permalink.match("storify"))if(s+2>=e.content.elements.length)f.startDate=e.content.elements[s-1].posted_at;else if(e.content.elements[s+2].type=="text"&&e.content.elements[s+2].permalink.match("storify"))if(s+3>=e.content.elements.length)f.startDate=e.content.elements[s-1].posted_at;else if(e.content.elements[s+3].type=="text"&&e.content.elements[s+3].permalink.match("storify"))f.startDate=e.content.elements[s-1].posted_at;else{trace("LEVEL 3");f.startDate=e.content.elements[s+3].posted_at}else{trace("LEVEL 2");f.startDate=e.content.elements[s+2].posted_at}else{trace("LEVEL 1");f.startDate=e.content.elements[s+1].posted_at}f.endDate=f.startDate}}else if(o.type=="video"){f.headline=o.data.video.title;f.asset.caption=o.data.video.description;f.asset.caption=o.source.username;f.asset.media=o.data.video.src}else{trace("NO MATCH ");trace(o)}u&&(f.slug=VMM.Util.untagify(o.data.text));t.timeline.date.push(f)}VMM.fireEvent(global,VMM.Timeline.Config.events.data_ready,t)}},tweets:{type:"twitter",buildData:function(e){VMM.bindEvent(global,VMM.Timeline.DataObj.model.tweets.onTwitterDataReady,"TWEETSLOADED");VMM.ExternalAPI.twitter.getTweets(e.timeline.tweets)},getData:function(e){VMM.bindEvent(global,VMM.Timeline.DataObj.model.tweets.onTwitterDataReady,"TWEETSLOADED");VMM.ExternalAPI.twitter.getTweetSearch(e)},onTwitterDataReady:function(e,t){var n=VMM.Timeline.DataObj.data_template_obj;for(var r=0;r<t.tweetdata.length;r++){var i={type:"tweets",startDate:"",headline:"",text:"",asset:{media:"",credit:"",caption:""},tags:"Optional"};i.startDate=t.tweetdata[r].raw.created_at;type.of(t.tweetdata[r].raw.from_user_name)?i.headline=t.tweetdata[r].raw.from_user_name+" (<a href='https://twitter.com/"+t.tweetdata[r].raw.from_user+"'>"+"@"+t.tweetdata[r].raw.from_user+"</a>)":i.headline=t.tweetdata[r].raw.user.name+" (<a href='https://twitter.com/"+t.tweetdata[r].raw.user.screen_name+"'>"+"@"+t.tweetdata[r].raw.user.screen_name+"</a>)";i.asset.media=t.tweetdata[r].content;n.timeline.date.push(i)}VMM.fireEvent(global,VMM.Timeline.Config.events.data_ready,n)}}},data_template_obj:{timeline:{headline:"",description:"",asset:{media:"",credit:"",caption:""},date:[],era:[]}},date_obj:{startDate:"2012,2,2,11,30",headline:"",text:"",asset:{media:"http://youtu.be/vjVfu8-Wp6s",credit:"",caption:""},tags:"Optional"}});VMM.debug=!1;