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.
 
 
 
 

14 lines
98 KiB

/* Verite
* Verite JS Master
* Version: 0.6
* Date: April 26, 2012
* Copyright 2012 Verite unless part of Verite Timeline,
* if part of Timeline then it inherits Timeline's license.
* Designed and built by Zach Wise digitalartwork.net
* ----------------------------------------------------- *//* Simple JavaScript Inheritance
* By John Resig http://ejohn.org/
* MIT Licensed.
================================================== */function trace(a){window.console?console.log(a):typeof jsTrace!="undefined"&&jsTrace.send(a)}function onYouTubePlayerAPIReady(){trace("GLOBAL YOUTUBE API CALLED");VMM.ExternalAPI.youtube.onAPIReady()}(function(){var a=!1,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(c){function g(){!a&&this.init&&this.init.apply(this,arguments)}var d=this.prototype;a=!0;var e=new this;a=!1;for(var f in c)e[f]=typeof c[f]=="function"&&typeof d[f]=="function"&&b.test(c[f])?function(a,b){return function(){var c=this._super;this._super=d[a];var e=b.apply(this,arguments);this._super=c;return e}}(f,c[f]):c[f];g.prototype=e;g.prototype.constructor=g;g.extend=arguments.callee;return g}})();var global=function(){return this||(1,eval)("this")}();if(typeof VMM=="undefined"){var VMM=Class.extend({});VMM.master_config={init:function(){return this},vp:"Pellentesque nibh felis, eleifend id, commodo in, interdum vitae, leo",keys:{flickr:"RAIvxHY4hE/Elm5cieh4X5ptMyDpj7MYIxziGxi0WGCcy1s+yr7rKQ==",google:"jwNGnYw4hE9lmAez4ll0QD+jo6SKBJFknkopLS4FrSAuGfIwyj57AusuR0s8dAo="},youtube:{active:!1,array:[],api_loaded:!1,que:[]},googlemaps:{active:!1,map_active:!1,places_active:!1,array:[],api_loaded:!1,que:[]}}.init();VMM.createElement=function(a,b,c,d,e){var f="";if(a!=null&&a!=""){f+="<"+a;c!=null&&c!=""&&(f+=" class='"+c+"'");d!=null&&d!=""&&(f+=" "+d);e!=null&&e!=""&&(f+=" "+e);f+=">";b!=null&&b!=""&&(f+=b);f=f+"</"+a+">"}return f};VMM.createMediaElement=function(a,b,c){var d="",e=!1;d+="<div class='media'>";if(a!=null&&a!=""){valid=!0;d+="<img src='"+a+"'>";c!=null&&c!=""&&(d+=VMM.createElement("div",c,"credit"));b!=null&&b!=""&&(d+=VMM.createElement("div",b,"caption"))}d+="</div>";return d};VMM.hideUrlBar=function(){var a=window,b=a.document;if(!location.hash||!a.addEventListener){window.scrollTo(0,1);var c=1,d=setInterval(function(){if(b.body){clearInterval(d);c="scrollTop"in b.body?b.body.scrollTop:1;a.scrollTo(0,c===1?0:1)}},15);a.addEventListener("load",function(){setTimeout(function(){a.scrollTo(0,c===1?0:1)},0)},!1)}}}Date.prototype.getWeek=function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil(((this-a)/864e5+a.getDay()+1)/7)};Date.prototype.getDayOfYear=function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil((this-a)/864e5)};var is={Null:function(a){return a===null},Undefined:function(a){return a===undefined},nt:function(a){return a===null||a===undefined},Function:function(a){return typeof a=="function"?a.constructor.toString().match(/Function/)!==null:!1},String:function(a){return typeof a=="string"?!0:typeof a=="object"?a.constructor.toString().match(/string/i)!==null:!1},Array:function(a){return typeof a=="object"?a.constructor.toString().match(/array/i)!==null||a.length!==undefined:!1},Boolean:function(a){return typeof a=="boolean"?!0:typeof a=="object"?a.constructor.toString().match(/boolean/i)!==null:!1},Date:function(a){return typeof a=="date"?!0:typeof a=="object"?a.constructor.toString().match(/date/i)!==null:!1},HTML:function(a){return typeof a=="object"?a.constructor.toString().match(/html/i)!==null:!1},Number:function(a){return typeof a=="number"?!0:typeof a=="object"?a.constructor.toString().match(/Number/)!==null:!1},Object:function(a){return typeof a=="object"?a.constructor.toString().match(/object/i)!==null:!1},RegExp:function(a){return typeof a=="function"?a.constructor.toString().match(/regexp/i)!==null:!1}},type={of:function(a){for(var b in is)if(is[b](a))return b.toLowerCase()}};!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b;this.$element=a(c);this.options=this.getOptions(d);this.enabled=!0;if(this.options.trigger!="manual"){e=this.options.trigger=="hover"?"mouseenter":"focus";f=this.options.trigger=="hover"?"mouseleave":"blur";this.$element.on(e,this.options.selector,a.proxy(this.enter,this));this.$element.on(f,this.options.selector,a.proxy(this.leave,this))}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){b=a.extend({},a.fn[this.type].defaults,b,this.$element.data());b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay});return b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);if(!c.options.delay||!c.options.delay.show)c.show();else{c.hoverState="in";setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show)}},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);if(!c.options.delay||!c.options.delay.hide)c.hide();else{c.hoverState="out";setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)}},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip();this.setContent();this.options.animation&&a.addClass("fade");f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement;b=/in/.test(f);a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body);c=this.getPosition(b);d=a[0].offsetWidth;e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle());a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b);c.remove()})}var b=this,c=this.tip();c.removeClass("in");a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title);a=a.toString().replace(/(^\s*|\s*$)/,"");return a},tip:function(){return this.$tip=this.$tip||a(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"]()}};a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f));typeof c=="string"&&e[c]()})};a.fn.tooltip.Constructor=b;a.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);var Aes={};Aes.cipher=function(a,b){var c=4,d=b.length/c-1,e=[[],[],[],[]];for(var f=0;f<4*c;f++)e[f%4][Math.floor(f/4)]=a[f];e=Aes.addRoundKey(e,b,0,c);for(var g=1;g<d;g++){e=Aes.subBytes(e,c);e=Aes.shiftRows(e,c);e=Aes.mixColumns(e,c);e=Aes.addRoundKey(e,b,g,c)}e=Aes.subBytes(e,c);e=Aes.shiftRows(e,c);e=Aes.addRoundKey(e,b,d,c);var h=new Array(4*c);for(var f=0;f<4*c;f++)h[f]=e[f%4][Math.floor(f/4)];return h};Aes.keyExpansion=function(a){var b=4,c=a.length/4,d=c+6,e=new Array(b*(d+1)),f=new Array(4);for(var g=0;g<c;g++){var h=[a[4*g],a[4*g+1],a[4*g+2],a[4*g+3]];e[g]=h}for(var g=c;g<b*(d+1);g++){e[g]=new Array(4);for(var i=0;i<4;i++)f[i]=e[g-1][i];if(g%c==0){f=Aes.subWord(Aes.rotWord(f));for(var i=0;i<4;i++)f[i]^=Aes.rCon[g/c][i]}else c>6&&g%c==4&&(f=Aes.subWord(f));for(var i=0;i<4;i++)e[g][i]=e[g-c][i]^f[i]}return e};Aes.subBytes=function(a,b){for(var c=0;c<4;c++)for(var d=0;d<b;d++)a[c][d]=Aes.sBox[a[c][d]];return a};Aes.shiftRows=function(a,b){var c=new Array(4);for(var d=1;d<4;d++){for(var e=0;e<4;e++)c[e]=a[d][(e+d)%b];for(var e=0;e<4;e++)a[d][e]=c[e]}return a};Aes.mixColumns=function(a,b){for(var c=0;c<4;c++){var d=new Array(4),e=new Array(4);for(var f=0;f<4;f++){d[f]=a[f][c];e[f]=a[f][c]&128?a[f][c]<<1^283:a[f][c]<<1}a[0][c]=e[0]^d[1]^e[1]^d[2]^d[3];a[1][c]=d[0]^e[1]^d[2]^e[2]^d[3];a[2][c]=d[0]^d[1]^e[2]^d[3]^e[3];a[3][c]=d[0]^e[0]^d[1]^d[2]^e[3]}return a};Aes.addRoundKey=function(a,b,c,d){for(var e=0;e<4;e++)for(var f=0;f<d;f++)a[e][f]^=b[c*4+f][e];return a};Aes.subWord=function(a){for(var b=0;b<4;b++)a[b]=Aes.sBox[a[b]];return a};Aes.rotWord=function(a){var b=a[0];for(var c=0;c<3;c++)a[c]=a[c+1];a[3]=b;return a};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(a,b,c){var d=16;if(c!=128&&c!=192&&c!=256)return"";a=Utf8.encode(a);b=Utf8.encode(b);var e=c/8,f=new Array(e);for(var g=0;g<e;g++)f[g]=isNaN(b.charCodeAt(g))?0:b.charCodeAt(g);var h=Aes.cipher(f,Aes.keyExpansion(f));h=h.concat(h.slice(0,e-16));var i=new Array(d),j=(new Date).getTime(),k=j%1e3,l=Math.floor(j/1e3),m=Math.floor(Math.random()*65535);for(var g=0;g<2;g++)i[g]=k>>>g*8&255;for(var g=0;g<2;g++)i[g+2]=m>>>g*8&255;for(var g=0;g<4;g++)i[g+4]=l>>>g*8&255;var n="";for(var g=0;g<8;g++)n+=String.fromCharCode(i[g]);var o=Aes.keyExpansion(h),p=Math.ceil(a.length/d),q=new Array(p);for(var r=0;r<p;r++){for(var s=0;s<4;s++)i[15-s]=r>>>s*8&255;for(var s=0;s<4;s++)i[15-s-4]=r/4294967296>>>s*8;var t=Aes.cipher(i,o),u=r<p-1?d:(a.length-1)%d+1,v=new Array(u);for(var g=0;g<u;g++){v[g]=t[g]^a.charCodeAt(r*d+g);v[g]=String.fromCharCode(v[g])}q[r]=v.join("")}var w=n+q.join("");w=Base64.encode(w);return w};Aes.Ctr.decrypt=function(a,b,c){var d=16;if(c!=128&&c!=192&&c!=256)return"";a=Base64.decode(a);b=Utf8.encode(b);var e=c/8,f=new Array(e);for(var g=0;g<e;g++)f[g]=isNaN(b.charCodeAt(g))?0:b.charCodeAt(g);var h=Aes.cipher(f,Aes.keyExpansion(f));h=h.concat(h.slice(0,e-16));var i=new Array(8);ctrTxt=a.slice(0,8);for(var g=0;g<8;g++)i[g]=ctrTxt.charCodeAt(g);var j=Aes.keyExpansion(h),k=Math.ceil((a.length-8)/d),l=new Array(k);for(var m=0;m<k;m++)l[m]=a.slice(8+m*d,8+m*d+d);a=l;var n=new Array(a.length);for(var m=0;m<k;m++){for(var o=0;o<4;o++)i[15-o]=m>>>o*8&255;for(var o=0;o<4;o++)i[15-o-4]=(m+1)/4294967296-1>>>o*8&255;var p=Aes.cipher(i,j),q=new Array(a[m].length);for(var g=0;g<a[m].length;g++){q[g]=p[g]^a[m].charCodeAt(g);q[g]=String.fromCharCode(q[g])}n[m]=q.join("")}var r=n.join("");r=Utf8.decode(r);return r};var Base64={};Base64.code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Base64.encode=function(a,b){b=typeof b=="undefined"?!1:b;var c,d,e,f,g,h,i,j,k=[],l="",m,n,o,p=Base64.code;n=b?a.encodeUTF8():a;m=n.length%3;if(m>0)while(m++<3){l+="=";n+="\0"}for(m=0;m<n.length;m+=3){c=n.charCodeAt(m);d=n.charCodeAt(m+1);e=n.charCodeAt(m+2);f=c<<16|d<<8|e;g=f>>18&63;h=f>>12&63;i=f>>6&63;j=f&63;k[m/3]=p.charAt(g)+p.charAt(h)+p.charAt(i)+p.charAt(j)}o=k.join("");o=o.slice(0,o.length-l.length)+l;return o};Base64.decode=function(a,b){b=typeof b=="undefined"?!1:b;var c,d,e,f,g,h,i,j,k=[],l,m,n=Base64.code;m=b?a.decodeUTF8():a;for(var o=0;o<m.length;o+=4){f=n.indexOf(m.charAt(o));g=n.indexOf(m.charAt(o+1));h=n.indexOf(m.charAt(o+2));i=n.indexOf(m.charAt(o+3));j=f<<18|g<<12|h<<6|i;c=j>>>16&255;d=j>>>8&255;e=j&255;k[o/4]=String.fromCharCode(c,d,e);i==64&&(k[o/4]=String.fromCharCode(c,d));h==64&&(k[o/4]=String.fromCharCode(c))}l=k.join("");return b?l.decodeUTF8():l};var Utf8={};Utf8.encode=function(a){var b=a.replace(/[\u0080-\u07ff]/g,function(a){var b=a.charCodeAt(0);return String.fromCharCode(192|b>>6,128|b&63)});b=b.replace(/[\u0800-\uffff]/g,function(a){var b=a.charCodeAt(0);return String.fromCharCode(224|b>>12,128|b>>6&63,128|b&63)});return b};Utf8.decode=function(a){var b=a.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(a){var b=(a.charCodeAt(0)&15)<<12|(a.charCodeAt(1)&63)<<6|a.charCodeAt(2)&63;return String.fromCharCode(b)});b=b.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(a){var b=(a.charCodeAt(0)&31)<<6|a.charCodeAt(1)&63;return String.fromCharCode(b)});return b};if(typeof VMM!="undefined"){VMM.attachElement=function(a,b){typeof jQuery!="undefined"&&$(a).html(b)};VMM.appendElement=function(a,b){typeof jQuery!="undefined"&&$(a).append(b)};VMM.getHTML=function(a){var b;if(typeof jQuery!="undefined"){b=jQuery(a).html();return b}};VMM.getElement=function(a,b){var c;if(typeof jQuery!="undefined"){b?c=jQuery(a).parent().get(0):c=jQuery(a).get(0);return c}};VMM.bindEvent=function(a,b,c,d){var e,f="click",g={};c!=null&&c!=""&&(f=c);g!=null&&g!=""&&(g=d);typeof jQuery!="undefined"&&jQuery(a).bind(f,g,b)};VMM.unbindEvent=function(a,b,c){var d,e="click",f={};c!=null&&c!=""&&(e=c);typeof jQuery!="undefined"&&jQuery(a).unbind(e,b)};VMM.fireEvent=function(a,b,c){var d,e="click",f=[];b!=null&&b!=""&&(e=b);c!=null&&c!=""&&(f=c);typeof jQuery!="undefined"&&jQuery(a).trigger(e,f)};VMM.getJSON=function(a,b,c){if(typeof jQuery!="undefined"){if(!(VMM.Browser.browser=="Explorer"&&parseInt(VMM.Browser.version,10)>=7&&window.XDomainRequest)){trace("getJSON");return jQuery.getJSON(a,b,c)}trace("it's ie");var d=a;if(d.match("^http://")){trace("RUNNING GET JSON");d=d.replace("http://","//");return jQuery.getJSON(a,b,c)}if(!d.match("^https://"))return jQuery.getJSON(a,b,c);trace("RUNNING XDR");d=d.replace("https://","http://");var e=new XDomainRequest;e.open("get",d);e.onload=function(){var a=VMM.parseJSON(e.responseText);trace(e.responseText);if(type.of(a)!="null"&&type.of(a)!="undefined")return b(a);trace("IE JSON ERROR")};e.send()}};VMM.parseJSON=function(a){if(typeof jQuery!="undefined")return jQuery.parseJSON(a)};VMM.appendAndGetElement=function(a,b,c,d){var e,f="<div>",g="",h="";b!=null&&b!=""&&(f=b);c!=null&&c!=""&&(g=c);d!=null&&d!=""&&(h=d);if(typeof jQuery!="undefined"){e=$(b);e.addClass(g);e.html(h);jQuery(a).append(e)}return e};VMM.Element={init:function(){return this},hide:function(a,b){b!=null&&b!=""?typeof jQuery!="undefined"&&jQuery(a).hide(b):typeof jQuery!="undefined"&&jQuery(a).hide()},remove:function(a){typeof jQuery!="undefined"&&jQuery(a).remove()},detach:function(a){typeof jQuery!="undefined"&&jQuery(a).detach()},append:function(a,b){typeof jQuery!="undefined"&&jQuery(a).append(b)},show:function(a,b){b!=null&&b!=""?typeof jQuery!="undefined"&&jQuery(a).show(b):typeof jQuery!="undefined"&&jQuery(a).show()},load:function(a,b,c){var d={elem:a};d!=null&&d!=""&&(d=c);typeof jQuery!="undefined"&&jQuery(a).load(d,b)},addClass:function(a,b){typeof jQuery!="undefined"&&jQuery(a).addClass(b)},removeClass:function(a,b){typeof jQuery!="undefined"&&jQuery(a).removeClass(b)},attr:function(a,b,c){if(c!=null&&c!="")typeof jQuery!="undefined"&&jQuery(a).attr(b,c);else if(typeof jQuery!="undefined")return jQuery(a).attr(b)},prop:function(a,b,c){typeof jQuery=="undefined"||!/[1-9]\.[3-9].[1-9]/.test($.fn.jquery)?VMM.Element.attribute(a,b,c):jQuery(a).prop(b,c)},attribute:function(a,b,c){if(c!=null&&c!="")typeof jQuery!="undefined"&&jQuery(a).attr(b,c);else if(typeof jQuery!="undefined")return jQuery(a).attr(b)},visible:function(a,b){if(b!=null)typeof jQuery!="undefined"&&(b?jQuery(a).show(0):jQuery(a).hide(0));else if(typeof jQuery!="undefined")return jQuery(a).is(":visible")?!0:!1},css:function(a,b,c){if(c!=null&&c!="")typeof jQuery!="undefined"&&jQuery(a).css(b,c);else if(typeof jQuery!="undefined")return jQuery(a).css(b)},cssmultiple:function(a,b){if(typeof jQuery!="undefined")return jQuery(a).css(b)},offset:function(a){var b;typeof jQuery!="undefined"&&(b=jQuery(a).offset());return b},position:function(a){var b;typeof jQuery!="undefined"&&(b=jQuery(a).position());return b},width:function(a,b){if(b!=null&&b!="")typeof jQuery!="undefined"&&jQuery(a).width(b);else if(typeof jQuery!="undefined")return jQuery(a).width()},height:function(a,b){if(b!=null&&b!="")typeof jQuery!="undefined"&&jQuery(a).height(b);else if(typeof jQuery!="undefined")return jQuery(a).height()},toggleClass:function(a,b){typeof jQuery!="undefined"&&jQuery(a).toggleClass(b)},each:function(a,b){typeof jQuery!="undefined"&&jQuery(a).each(b)},html:function(a,b){var c;if(typeof jQuery!="undefined"){c=jQuery(a).html();return c}if(b!=null&&b!="")typeof jQuery!="undefined"&&jQuery(a).html(b);else{var c;if(typeof jQuery!="undefined"){c=jQuery(a).html();return c}}},find:function(a,b){if(typeof jQuery!="undefined")return jQuery(a).find(b)},stop:function(a){typeof jQuery!="undefined"&&jQuery(a).stop()},animate:function(a,b,c,d,e){var f="easein",g=1e3,h={};b!=null&&(b<1?g=1:g=Math.round(b));c!=null&&c!=""&&(f=c);d!=null?h=d:h={opacity:0};if(VMM.Browser.device=="mobile"||VMM.Browser.device=="tablet"){var i=Math.round(g/1500*10)/10,j=i+"s";VMM.Element.css(a,"-webkit-transition","all "+j+" ease");VMM.Element.css(a,"-moz-transition","all "+j+" ease");VMM.Element.css(a,"-o-transition","all "+j+" ease");VMM.Element.css(a,"-ms-transition","all "+j+" ease");VMM.Element.css(a,"transition","all "+j+" ease");VMM.Element.cssmultiple(a,h)}else typeof jQuery!="undefined"&&(e!=null&&e!=""?jQuery(a).animate(h,{queue:!1,duration:g,easing:f,complete:e}):jQuery(a).animate(h,{queue:!1,duration:g,easing:f}))}}.init()}if(typeof jQuery!="undefined"){jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c}})}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(a){return a==0||a==180?"portrait":a==90||a==-90?"landscape":"normal"},searchDevice:function(a){return a.match(/Android/i)||a.match(/iPhone|iPod/i)?"mobile":a.match(/iPad/i)?"tablet":a.match(/BlackBerry/i)||a.match(/IEMobile/i)?"other mobile":"desktop"},searchString:function(a){for(var b=0;b<a.length;b++){var c=a[b].string,d=a[b].prop;this.versionSearchString=a[b].versionSearch||a[b].identity;if(c){if(c.indexOf(a[b].subString)!=-1)return a[b].identity}else if(d)return a[b].identity}},searchVersion:function(a){var b=a.indexOf(this.versionSearchString);if(b==-1)return;return parseFloat(a.substring(b+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.MediaElement=="undefined"&&(VMM.MediaElement={init:function(){return this},thumbnail:function(a,b,c){_w=32;_h=32;b!=null&&b!=""&&(_w=b);c!=null&&c!=""&&(_h=c);if(a.media!=null&&a.media!=""){_valid=!0;var d="",e={};e=VMM.MediaType(a.media);if(e.type=="image"){d="<div class='thumbnail'><img src='"+e.id+"' width='"+_w+"px' height='"+_h+"px'></div>";return d}if(e.type=="flickr"){d="<div class='thumbnail'><img id='flickr_"+e.id+"_thumb' width='"+_w+"px' height='"+_h+"px'></div>";return d}if(e.type=="youtube"){d="<div class='thumbnail youtube'></div>";return d}if(e.type!="googledoc"){if(e.type=="vimeo"){d="<div class='thumbnail vimeo'></div>";return d}if(e.type=="twitter"){d="<div class='thumbnail twitter'></div>";return d}if(e.type=="twitter-ready"){d="<div class='thumbnail twitter'></div>";return d}if(e.type=="soundcloud"){d="<div class='thumbnail soundcloud'></div>";return d}if(e.type=="google-map"){d="<div class='thumbnail map'></div>";return d}if(e.type=="unknown"){d="";return d}if(e.type=="website"){d="<div class='thumbnail website'></div>";return d}d="<div class='thumbnail'></div>";return d}d=""}},create:function(a,b,c,d,e){_return=c;_w=500;_h=400;$mediacontainer=a;var f=!1;d!=null&&d!=""&&(_w=d);e!=null&&e!=""&&(_h=e);if(b.media!=null&&b.media!=""){f=!0;var g="",h="",i="",j={},k=_h-50,l=!1;b.credit!=null&&b.credit!=""&&(i="<div class='credit'>"+VMM.Util.linkify_with_twitter(b.credit,"_blank")+"</div>");b.caption!=null&&b.caption!=""&&(h="<div class='caption'>"+VMM.Util.linkify_with_twitter(b.caption,"_blank")+"</div>");j=VMM.MediaType(b.media);if(j.type=="image")g="<img src='"+j.id+"'>";else if(j.type=="flickr"){var m="flickr_"+j.id;g="<a href='"+j.link+"' target='_blank'><img id='"+m+"_large"+"'></a>";VMM.ExternalAPI.flickr.getPhoto(j.id,"#"+m)}else if(j.type=="googledoc")j.id.match(/docs.google.com/i)?g="<iframe class='media-frame doc' frameborder='0' width='100%' height='100%' src='"+j.id+"&embedded=true'></iframe>":g="<iframe class='media-frame doc' frameborder='0' width='100%' height='100%' src='http://docs.google.com/viewer?url="+j.id+"&embedded=true'></iframe>";else if(j.type=="youtube"){g="<div class='media-frame video youtube' id='youtube_"+j.id+"'>Loading YouTube video...</div>";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="<iframe class='media-frame video vimeo' frameborder='0' width='100%' height='100%' src='http://player.vimeo.com/video/"+j.id+"?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff'></iframe>";else if(j.type=="twitter"){g="<div class='twitter' id='twitter_"+j.id+"'>Loading Tweet</div>";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="<div class='media-frame soundcloud' id='"+n+"'>Loading Sound</div>";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="<div class='media-frame map' id='"+o+"'>Loading Map...</div>";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="<iframe class='media-frame' frameborder='0' width='100%' height='100%' scrolling='yes' marginheight='0' marginwidth='0' src='"+j.id+"'></iframe>";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="<div class='media-container' >"+g+i+h+"</div>";if(_return)return l?"<div class='media text-media'><div class='media-wrapper'>"+g+"</div></div>":"<div class='media'><div class='media-wrapper'>"+g+"</div></div>";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"<div>","media");i=VMM.appendAndGetElement(h,"<div>","container");j=VMM.appendAndGetElement(i,"<div>","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,"<img src='"+d.id+"'>"):d.type=="youtube"?VMM.appendElement(j,"<iframe frameborder='0' src='http://www.youtube.com/embed/"+d.id+"?&rel=0&theme=light&showinfo=0&hd=1&autohide=0&color=white' allowfullscreen>"):d.type=="vimeo"&&VMM.appendElement(j,"<iframe frameborder='0' src='http://player.vimeo.com/video/"+d.id+"?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff'>");e.credit!=null&&e.credit!=""&&VMM.appendElement(i,VMM.createElement("div",e.credit,"credit"));e.caption!=null&&e.caption!=""&&VMM.appendElement(i,VMM.createElement("div",e.caption,"caption"))}};this.setData=function(a){if(typeof a!="undefined"){e=a;m()}else trace("NO DATA")}};VMM.Media.prototype.height=function(a){if(a==null||a=="")return config.height;config.height=a;reSize()};VMM.Media.prototype.width=function(a){if(a==null||a=="")return config.width;config.width=a;reSize()};VMM.Media.prototype.getData=function(){return data};VMM.Media.prototype.setConfig=function(a){typeof a!="undefined"?config=a:trace("NO CONFIG DATA")};VMM.Media.prototype.getConfig=function(){return config};VMM.Media.prototype.setSize=function(a,b){a!=null&&(config.width=a);b!=null&&(config.height=b);_active&&reSize()};VMM.Media.prototype.active=function(){return _active}}typeof VMM!="undefined"&&typeof VMM.FileExtention=="undefined"&&(VMM.FileExtention={googleDocType:function(a){var b=a,c="";c=b.substr(b.length-5,5);var d=["DOC","DOCX","XLS","XLSX","PPT","PPTX","PDF","PAGES","AI","PSD","TIFF","DXF","SVG","EPS","PS","TTF","XPS","ZIP","RAR"],e=!1;for(var f=0;f<d.length;f++)if(c.toLowerCase().match(d[f].toString().toLowerCase())||b.match("docs.google.com"))e=!0;return e}});typeof VMM!="undefined"&&typeof VMM.ExternalAPI=="undefined"&&(VMM.ExternalAPI={twitter:{tweetArray:[],getHTML:function(a){var b="http://api.twitter.com/1/statuses/oembed.json?id="+a+"&callback=?";VMM.getJSON(b,VMM.ExternalAPI.twitter.onJSONLoaded)},onJSONLoaded:function(a){trace("TWITTER JSON LOADED");var b=a.id;VMM.attachElement("#"+b,VMM.Util.linkify_with_twitter(a.html))},parseTwitterDate:function(a){var b=new Date(Date.parse(a));return b},prettyParseTwitterDate:function(a){var b=new Date(Date.parse(a));return VMM.Util.date.prettyDate(b,!0)},getTweets:function(a){var b=[],c=a.length;for(var d=0;d<a.length;d++){var e="";a[d].tweet.match("status/")?e=a[d].tweet.split("status/")[1]:a[d].tweet.match("statuses/")?e=a[d].tweet.split("statuses/")[1]:e="";var f="http://api.twitter.com/1/statuses/show.json?id="+e+"&include_entities=true&callback=?";VMM.getJSON(f,function(a){var d={},e="<div class='twitter'><blockquote><p>",f=VMM.Util.linkify_with_twitter(a.text,"_blank");e+=f;e+="</p>";e+="— "+a.user.name+" (<a href='https://twitter.com/"+a.user.screen_name+"'>@"+a.user.screen_name+"</a>) <a href='https://twitter.com/"+a.user.screen_name+"/status/"+a.id+"'>"+VMM.ExternalAPI.twitter.prettyParseTwitterDate(a.created_at)+" </a></blockquote></div>";d.content=e;d.raw=a;b.push(d);if(b.length==c){var g={tweetdata:b};VMM.fireEvent(global,"TWEETSLOADED",g)}}).success(function(){trace("second success")}).error(function(){trace("error")}).complete(function(){trace("complete")})}},getTweetSearch:function(a,b){var c=40;b!=null&&b!=""&&(c=b);var d="http://search.twitter.com/search.json?q="+a+"&rpp="+c+"&include_entities=true&result_type=mixed",e=[];VMM.getJSON(d,function(a){for(var b=0;b<a.results.length;b++){var c={},d="<div class='twitter'><blockquote><p>",f=VMM.Util.linkify_with_twitter(a.results[b].text,"_blank");d+=f;d+="</p>";d+="— "+a.results[b].from_user_name+" (<a href='https://twitter.com/"+a.results[b].from_user+"'>@"+a.results[b].from_user+"</a>) <a href='https://twitter.com/"+a.results[b].from_user+"/status/"+a.id+"'>"+VMM.ExternalAPI.twitter.prettyParseTwitterDate(a.results[b].created_at)+" </a></blockquote></div>";c.content=d;c.raw=a.results[b];e.push(c)}var g={tweetdata:e};VMM.fireEvent(global,"TWEETSLOADED",g)})},prettyHTML:function(a){var a=a.toString(),b={twitterid:a},c="http://api.twitter.com/1/statuses/show.json?id="+a+"&include_entities=true&callback=?";trace("id "+a);var d=setTimeout(VMM.ExternalAPI.twitter.notFoundError,4e3,a);VMM.getJSON(c,VMM.ExternalAPI.twitter.formatJSON).error(function(b,c,d){trace("TWITTER error");trace("TWITTER ERROR: "+c+" "+b.responseText);VMM.attachElement("#twitter_"+a,"<p>ERROR LOADING TWEET "+a+"</p>")}).success(function(){clearTimeout(d)})},notFoundError:function(a){trace("TWITTER JSON ERROR TIMEOUT "+a);VMM.attachElement("#twitter_"+a,"<p>TWEET NOT FOUND "+a+"</p>")},formatJSON:function(a){trace("TWITTER JSON LOADED F");trace(a);var b=a.id_str,c="<blockquote><p>",d=VMM.Util.linkify_with_twitter(a.text,"_blank");c+=d;c+="</p></blockquote>";c+=" <a href='https://twitter.com/"+a.user.screen_name+"/status/"+a.id+"' target='_blank' alt='link to original tweet' title='link to original tweet'>"+"<span class='created-at'></span>"+" </a>";c+="<div class='vcard author'>";c+="<a class='screen-name url' href='https://twitter.com/"+a.user.screen_name+"' data-screen-name='"+a.user.screen_name+"' target='_blank'>";c+="<span class='avatar'><img src=' "+a.user.profile_image_url+"' alt=''></span>"
;c+="<span class='fn'>"+a.user.name+"</span>";c+="<span class='nickname'>@"+a.user.screen_name+"</span>";c+="</a>";c+="</div>";VMM.attachElement("#twitter_"+b.toString(),c)}},googlemaps:{getMap:function(a,b){var c=VMM.Util.getUrlVars(a);trace(c);var d="http://maps.googleapis.com/maps/api/js?key="+Aes.Ctr.decrypt(VMM.master_config.keys.google,VMM.master_config.vp,256)+"&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady",e={url:a,vars:c,id:b};if(VMM.master_config.googlemaps.active)VMM.master_config.googlemaps.createMap(e);else{VMM.master_config.googlemaps.que.push(e);VMM.master_config.googlemaps.api_loaded||VMM.LoadLib.js(d,function(){trace("Google Maps API Library Loaded")})}},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;for(var a=0;a<VMM.master_config.googlemaps.que.length;a++)VMM.ExternalAPI.googlemaps.createMap(VMM.master_config.googlemaps.que[a])}},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:20,attribution:"apple"},watercolor:{url:"http://{S}tile.stamen.com/watercolor/{Z}/{X}/{Y}.jpg",minZoom:3,maxZoom:16,attribution:"stamen"}},createMap:function(a){function c(a){if(a in VMM.ExternalAPI.googlemaps.map_providers){b=VMM.ExternalAPI.googlemaps.map_attribution[VMM.ExternalAPI.googlemaps.map_providers[a].attribution];return VMM.ExternalAPI.googlemaps.map_providers[a]}throw'No such provider: "'+a+'"'}function o(){var b=a.url+"&output=kml";b=b.replace("&output=embed","");var c=new google.maps.KmlLayer(b,{preserveViewport:!0});c.setMap(m);var d=new google.maps.InfoWindow;google.maps.event.addListenerOnce(c,"defaultviewport_changed",function(){h&&m.panTo(e);i?m.setZoom(g):m.fitBounds(c.getDefaultViewport())});google.maps.event.addListener(c,"click",function(a){function c(a){d.setContent(a);d.open(m)}var b=a.featureData.description;trace(a.featureData.infoWindowHtml);c(b)})}trace(VMM.ExternalAPI.googlemaps.stamen_map_attribution);var b="";google.maps.VeriteMapType=function(a){var b=c(a);return google.maps.ImageMapType.call(this,{getTileUrl:function(a,c){var d=(c+a.x+a.y)%VMM.ExternalAPI.googlemaps.map_subdomains.length;return[b.url.replace("{S}",VMM.ExternalAPI.googlemaps.map_subdomains[d]).replace("{Z}",c).replace("{X}",a.x).replace("{Y}",a.y).replace("{z}",c).replace("{x}",a.x).replace("{y}",a.y)]},tileSize:new google.maps.Size(256,256),name:a,minZoom:b.minZoom,maxZoom:b.maxZoom})};google.maps.VeriteMapType.prototype=new google.maps.ImageMapType("_");var d;type.of(VMM.master_config.Timeline.maptype)=="string"?d=VMM.master_config.Timeline.maptype:d="toner";var e=new google.maps.LatLng(41.875696,-87.624207),f,g=11,h=!1,i=!1,j;if(type.of(VMM.Util.getUrlVars(a.url)["ll"])=="string"){h=!0;f=VMM.Util.getUrlVars(a.url).ll.split(",");e=new google.maps.LatLng(parseFloat(f[0]),parseFloat(f[1]))}else if(type.of(VMM.Util.getUrlVars(a.url)["sll"])=="string"){h=!0;f=VMM.Util.getUrlVars(a.url).sll.split(",");e=new google.maps.LatLng(parseFloat(f[0]),parseFloat(f[1]))}if(type.of(VMM.Util.getUrlVars(a.url)["z"])=="string"){i=!0;g=parseFloat(VMM.Util.getUrlVars(a.url).z)}var k={zoom:g,disableDefaultUI:!0,mapTypeControl:!1,zoomControl:!0,zoomControlOptions:{style:google.maps.ZoomControlStyle.SMALL,position:google.maps.ControlPosition.TOP_RIGHT},center:e,mapTypeId:d,mapTypeControlOptions:{mapTypeIds:[d]}},l=a.id.toString()+"_gmap";VMM.attachElement("#"+a.id,"<div class='google-map' id='"+l+"' style='width=100%;height=100%;'></div>");var m=new google.maps.Map(document.getElementById(l),k);m.mapTypes.set(d,new google.maps.VeriteMapType(d));var n="<div class='map-attribution'><div class='attribution-text'>"+b+"</div></div>";VMM.appendElement("#"+l,n);o()}},flickr:{getPhoto:function(a,b){var c="http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key="+Aes.Ctr.decrypt(VMM.master_config.keys.flickr,VMM.master_config.vp,256)+"&photo_id="+a+"&format=json&jsoncallback=?";VMM.getJSON(c,VMM.ExternalAPI.flickr.setPhoto)},setPhoto:function(a){var b=a.sizes.size[0].url.split("photos/")[1].split("/")[1],c="flickr_"+b,d=c+"_large",e=c+"_thumb",f,g=!1;for(var h=0;h<a.sizes.size.length;h++)if(a.sizes.size[h].label=="Large"){g=!0;f=a.sizes.size[h].source}g||(f=a.sizes.size[a.sizes.size.length-1].source);var i=a.sizes.size[0].source;VMM.Element.attr("#"+d,"src",f);VMM.Element.attr("#"+e,"src",i)}},soundcloud:{getSound:function(a,b){var c="http://soundcloud.com/oembed?url="+a+"&format=js&callback=?";VMM.getJSON(c,function(a){VMM.attachElement("#"+b,a.html)})}},youtube:{init:function(a){if(VMM.master_config.youtube.active)VMM.master_config.youtube.createPlayer(a);else{VMM.master_config.youtube.que.push(a);VMM.master_config.youtube.api_loaded||VMM.LoadLib.js("http://www.youtube.com/player_api",function(){trace("YouTube API Library Loaded")})}},onAPIReady:function(){trace("YOUTUBE API READY");VMM.master_config.youtube.active=!0;for(var a=0;a<VMM.master_config.youtube.que.length;a++)VMM.ExternalAPI.youtube.createPlayer(VMM.master_config.youtube.que[a])},createPlayer:function(a){var b={active:!1,player:{},name:"youtube_"+a,playing:!1};b.player["youtube_"+a]=new YT.Player("youtube_"+a,{height:"390",width:"640",playerVars:{enablejsapi:1,color:"white",showinfo:0,theme:"light",rel:0,origin:"http://timeline.verite.co"},videoId:a,events:{onReady:VMM.ExternalAPI.youtube.onPlayerReady,onStateChange:VMM.ExternalAPI.youtube.onStateChange}});VMM.master_config.youtube.array.push(b)},stopPlayers:function(){for(var a=0;a<VMM.master_config.youtube.array.length;a++)if(VMM.master_config.youtube.array[a].playing){var b=VMM.master_config.youtube.array[a].name;VMM.master_config.youtube.array[a].player[b].stopVideo()}},onStateChange:function(a){for(var b=0;b<VMM.master_config.youtube.array.length;b++){var c=VMM.master_config.youtube.array[b].name;VMM.master_config.youtube.array[b].player[c]==a.target&&a.data==YT.PlayerState.PLAYING&&(VMM.master_config.youtube.array[b].playing=!0)}},onPlayerReady:function(a){}}});typeof VMM!="undefined"&&typeof VMM.TouchSlider=="undefined"&&(VMM.TouchSlider={createPanel:function(a,b,c,d,e,f){VMM.TouchSlider.vertical=!1;VMM.TouchSlider.vertical=e;var g=d;VMM.TouchSlider.width=c;VMM.TouchSlider.height=f;VMM.TouchSlider.makeTouchable(a,b)},removePanel:function(a){VMM.unbindEvent(a,VMM.TouchSlider.onTouchStart,"touchstart");VMM.unbindEvent(a,VMM.TouchSlider.onTouchMove,"touchmove");VMM.unbindEvent(a,VMM.TouchSlider.onTouchEnd,"touchend")},makeTouchable:function(a,b){VMM.bindEvent(a,VMM.TouchSlider.onTouchStart,"touchstart",{element:b});VMM.bindEvent(a,VMM.TouchSlider.onTouchMove,"touchmove",{element:b});VMM.bindEvent(a,VMM.TouchSlider.onTouchEnd,"touchend",{element:b})},onTouchStart:function(a){VMM.TouchSlider.touchStart(a.data.element,a);a.preventDefault();a.stopPropagation();return!0},onTouchEnd:function(a){a.preventDefault();a.stopPropagation();if(VMM.TouchSlider.sliding){VMM.TouchSlider.sliding=!1;VMM.TouchSlider.touchEnd(a.data.element,a);return!1}return!0},onTouchMove:function(a){VMM.TouchSlider.touchMove(a.data.element,a);a.preventDefault();a.stopPropagation();return!1},getLeft:function(a){return parseInt(VMM.Element.css(a,"left").substring(0,VMM.Element.css(a,"left").length-2),10)},getTop:function(a){return parseInt(VMM.Element.css(a,"top").substring(0,VMM.Element.css(a,"top").length-2),10)},touchStart:function(a,b){VMM.Element.css(a,"-webkit-transition-duration","0");VMM.TouchSlider.startX=b.originalEvent.touches[0].screenX;VMM.TouchSlider.startY=b.originalEvent.touches[0].screenY;VMM.TouchSlider.startLeft=VMM.TouchSlider.getLeft(a);VMM.TouchSlider.startTop=VMM.TouchSlider.getTop(a);VMM.TouchSlider.touchStartTime=(new Date).getTime()},touchEnd:function(a,b){if(VMM.TouchSlider.getLeft(a)>0){VMM.TouchSlider.vertical?VMM.Element.animate(a,1e3,"",{top:0}):VMM.Element.animate(a,1e3,"",{left:0});VMM.TouchSlider.startX=null;VMM.TouchSlider.startY=null;VMM.fireEvent(a,"TOUCHUPDATE",[0])}else VMM.TouchSlider.slideMomentum(a,b)},slideMomentum:function(a,b){var c=((new Date).getTime()-VMM.TouchSlider.touchStartTime)*10,d=c,e=VMM.TouchSlider.getLeft(a),f=VMM.TouchSlider.getTop(a),g=6e3*(Math.abs(VMM.TouchSlider.startLeft)-Math.abs(e)),h=6e3*(Math.abs(VMM.TouchSlider.startTop)-Math.abs(f));c=Math.round(g/c);slideAdjustY=Math.round(h/c);var i=c+e,j=slideAdjustY+f,k=j%VMM.TouchSlider.height,l=i%VMM.TouchSlider.width,m={top:Math.min(0,j),left:Math.min(0,i),time:d};VMM.fireEvent(a,"TOUCHUPDATE",[m]);VMM.TouchSlider.startX=null;VMM.TouchSlider.startY=null},doSlide:function(a,b,c){VMM.Element.css(a,"-webkit-transition-property","left");VMM.Element.css(a,"-webkit-transition-duration",c);VMM.Element.css(a,"left",b)},touchMove:function(a,b){!!VMM.TouchSlider.sliding;VMM.TouchSlider.sliding=!0;if(VMM.TouchSlider.vertical)if(VMM.TouchSlider.startY>b.originalEvent.touches[0].screenY){VMM.Element.css(a,"top",-(VMM.TouchSlider.startY-b.originalEvent.touches[0].screenY-VMM.TouchSlider.startTop));VMM.TouchSlider.slidingTop=!0}else{var c=b.originalEvent.touches[0].screenY-VMM.TouchSlider.startY+VMM.TouchSlider.startTop;VMM.Element.css(a,"top",-(VMM.TouchSlider.startY-b.originalEvent.touches[0].screenY-VMM.TouchSlider.startTop));VMM.TouchSlider.slidingTop=!1}else if(VMM.TouchSlider.startX>b.originalEvent.touches[0].screenX){VMM.Element.css(a,"left",-(VMM.TouchSlider.startX-b.originalEvent.touches[0].screenX-VMM.TouchSlider.startLeft));VMM.TouchSlider.slidingLeft=!0}else{var d=b.originalEvent.touches[0].screenX-VMM.TouchSlider.startX+VMM.TouchSlider.startLeft;VMM.Element.css(a,"left",-(VMM.TouchSlider.startX-b.originalEvent.touches[0].screenX-VMM.TouchSlider.startLeft));VMM.TouchSlider.slidingLeft=!1}}});typeof VMM!="undefined"&&typeof VMM.DragSlider=="undefined"&&(VMM.DragSlider={createPanel:function(a,b,c,d,e){var f=d;VMM.DragSlider.width=c;VMM.DragSlider.makeDraggable(a,b);VMM.DragSlider.drag_elem=a;VMM.DragSlider.sticky=e},makeDraggable:function(a,b){VMM.bindEvent(a,VMM.DragSlider.onDragStart,"mousedown",{element:b,delement:a});VMM.bindEvent(a,VMM.DragSlider.onDragEnd,"mouseup",{element:b,delement:a});VMM.bindEvent(a,VMM.DragSlider.onDragLeave,"mouseleave",{element:b,delement:a})},cancelSlide:function(a){VMM.unbindEvent(VMM.DragSlider.drag_elem,VMM.DragSlider.onDragMove,"mousemove");return!0},onDragLeave:function(a){VMM.unbindEvent(a.data.delement,VMM.DragSlider.onDragMove,"mousemove");a.preventDefault();a.stopPropagation();return!0},onDragStart:function(a){VMM.DragSlider.dragStart(a.data.element,a.data.delement,a);a.preventDefault();a.stopPropagation();return!0},onDragEnd:function(a){a.preventDefault();a.stopPropagation();if(VMM.DragSlider.sliding){VMM.DragSlider.sliding=!1;VMM.DragSlider.dragEnd(a.data.element,a.data.delement,a);return!1}return!0},onDragMove:function(a){VMM.DragSlider.dragMove(a.data.element,a);a.preventDefault();a.stopPropagation();return!1},dragStart:function(a,b,c){VMM.DragSlider.startX=c.pageX;VMM.DragSlider.startLeft=VMM.DragSlider.getLeft(a);VMM.DragSlider.dragStartTime=(new Date).getTime();VMM.DragSlider.dragWidth=VMM.Element.width(b);var d=Math.round(VMM.DragSlider.startX-c.pageX-VMM.DragSlider.startLeft);VMM.Element.stop(a);VMM.bindEvent(b,VMM.DragSlider.onDragMove,"mousemove",{element:a})},dragEnd:function(a,b,c){VMM.unbindEvent(b,VMM.DragSlider.onDragMove,"mousemove");VMM.DragSlider.getLeft(a)>0||VMM.DragSlider.dragMomentum(a,c)},dragMove:function(a,b){!!VMM.DragSlider.sliding;VMM.DragSlider.sliding=!0;if(VMM.DragSlider.startX>b.pageX){VMM.Element.css(a,"left",-(VMM.DragSlider.startX-b.pageX-VMM.DragSlider.startLeft));VMM.DragSlider.slidingLeft=!0}else{var c=b.pageX-VMM.DragSlider.startX+VMM.DragSlider.startLeft;VMM.Element.css(a,"left",-(VMM.DragSlider.startX-b.pageX-VMM.DragSlider.startLeft));VMM.DragSlider.slidingLeft=!1}},dragMomentum:function(a,b){var c=((new Date).getTime()-VMM.DragSlider.dragStartTime)*10,d=c,e=VMM.DragSlider.getLeft(a),f=6e3*(Math.abs(VMM.DragSlider.startLeft)-Math.abs(e));c=Math.round(f/c);var g=e+c,h=g%VMM.DragSlider.width,i={left:Math.min(g),time:d};VMM.fireEvent(a,"DRAGUPDATE",[i]);var j="easeOutExpo";i.time>0&&VMM.Element.animate(a,i.time,j,{left:i.left})},getLeft:function(a){return parseInt(VMM.Element.css(a,"left").substring(0,VMM.Element.css(a,"left").length-2),10)}});typeof VMM!="undefined"&&typeof VMM.Slider=="undefined"&&(VMM.Slider=function(a,b){function w(){trace("onConfigSet")}function x(a,b){var c=!0,d=!1;a!=null&&(c=a);b!=null&&(d=b);j=s.slider.width;s.slider.nav.height=VMM.Element.height(u.prevBtnContainer);s.slider.content.width=j-s.slider.content.padding*2;VMM.Element.width(r,e.length*s.slider.content.width);if(d){var f=VMM.Element.position(e[i]);VMM.Element.css(q,"left",f.left)}F();G();VMM.Element.css(u.nextBtn,"left",j-s.slider.nav.width);VMM.Element.height(u.prevBtn,s.slider.height);VMM.Element.height(u.nextBtn,s.slider.height);VMM.Element.css(u.nextBtnContainer,"top",s.slider.height/2-s.slider.nav.height/2);VMM.Element.css(u.prevBtnContainer,"top",s.slider.height/2-s.slider.nav.height/2);VMM.Element.height(p,s.slider.height);VMM.Element.width(p,j);c&&I(i,"linear",1);i==0&&VMM.Element.visible(u.prevBtn,!1)}function y(a){if(i==e.length-1)VMM.Element.animate(q,s.duration,s.ease,{left:-VMM.Element.position(e[i]).left});else{I(i+1);C()}}function z(a){if(i==0)I(i);else{I(i-1);C()}}function A(a){switch(a.keyCode){case 39:y(a);break;case 37:z(a)}}function B(a,b){if(g.length==0)for(var c=0;c<e.length;c++){var d=VMM.Element.position(e[c]);g.push(d.left)}if(typeof b.left=="number"){var f=b.left;f<-VMM.Element.position(e[i]).left-s.slider_width/3?y():f>-VMM.Element.position(e[i]).left+s.slider_width/3?z():VMM.Element.animate(q,s.duration,s.ease,{left:-VMM.Element.position(e[i]).left})}else VMM.Element.animate(q,s.duration,s.ease,{left:-VMM.Element.position(e[i]).left});typeof b.top=="number"&&VMM.Element.animate(q,s.duration,s.ease,{top:-b.top})}function C(){VMM.fireEvent(n,"UPDATE")}var c={},d=[],e=[],f=[],g=[],h="",i=0,j=960,k={move:!1,x:10,y:0,off:0,dampen:48},l="",m=!1,n=a,o,p,q,r,s={slider:{width:720,height:400,content:{width:720,height:400,padding:130},nav:{width:100,height:200}}},t={interval:10,something:0,width:720,height:400,ease:"easeInOutExpo",duration:1e3,timeline:!1,spacing:15},u={nextBtn:"",prevBtn:"",nextDate:"",prevDate:"",nextTitle:"",prevTitle:""};this.ver="0.6";if(type.of(b)=="object"){var v;for(v in b)Object.prototype.hasOwnProperty.call(b,v)&&(s[v]=b[v])}else if(type.of(t)=="object"){var v;for(v in t)Object.prototype.hasOwnProperty.call(t,v)&&(s[v]=t[v])}s.slider.width=s.width;s.slider.height=s.height;this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};this.width=function(a){if(a==null||a=="")return s.slider.width;s.slider.width=a;x()};this.height=function(a){if(a==null||a=="")return s.slider.height;s.slider.height=a;x()};this.setData=function(a){if(typeof a!="undefined"){d=a;K()}else trace("NO DATA")};this.getData=function(){return d};this.setConfig=function(a){typeof a!="undefined"?s=a:trace("NO CONFIG DATA")};this.getConfig=function(){return s};this.setSize=function(a,b){a!=null&&(s.slider.width=a);b!=null&&(s.slider.height=b);m&&x()};this.active=function(){return m};this.getCurrentNumber=function(){return i};this.setSlide=function(a){I(a)};var D=function(a){d=a},E=function(a){VMM.attachElement(r,"");for(var b=0;b<a.length;b++){var c="",d,f;c=VMM.createElement("div",a[b].content,"content");d=VMM.appendAndGetElement(r,"<div>","slider-item",c);e.push(d)}},F=function(){VMM.Element.css(".slider-item","width",s.slider.content.width);VMM.Element.height(".slider-item",s.slider.height);var a=Math.round(s.slider.height)-160,b=Math.round(a/9*16),c=s.slider.content.width/100*60,d=Math.round(c/16*9)+25,e=Math.round(s.slider.height)-160,f=s.slider.content.width/100*60,g=!1;j<=650?g=!0:VMM.Browser.device=="mobile"&&VMM.Browser.orientation=="portrait"?g=!0:VMM.Browser.device=="tablet"&&VMM.Browser.orientation=="portrait"&&(g=!0);if(g){e=s.slider.height/100*40-40;c=s.slider.content.width;a=Math.round(c/16*9);f=s.slider.content.width;VMM.Element.css(".slider-item .layout-text-media .text","width","100%");VMM.Element.css(".slider-item .layout-text-media .text","display","block");VMM.Element.css(".slider-item .layout-text-media .media","float","none");VMM.Element.css(".slider-item .media blockquote p","line-height","18px");VMM.Element.css(".slider-item .media blockquote p","font-size","16px");VMM.Element.css(".slider-item .content","height",s.slider.height);VMM.Element.css(".slider-item","display","block");VMM.Element.css(".slider-item","overflow-y","auto")}else{e=s.slider.height-40;c=s.slider.content.width/100*60;f=s.slider.content.width/100*60;VMM.Element.css(".slider-item .layout-text-media .text","width","40%");VMM.Element.css(".slider-item .layout-text-media .text","display","table-cell");VMM.Element.css(".slider-item .layout-text-media .media","float","left");VMM.Element.css(".slider-item .layout-text-media","display","table");VMM.Element.css(".slider-item","display","table");VMM.Element.css(".slider-item","overflow-y","auto")}VMM.Element.css(".slider-item .layout-text-media .media .media-container img","max-height",e);VMM.Element.css(".slider-item .layout-media .media .media-container img","max-height",e-60);VMM.Element.css(".slider-item .layout-text-media .media .media-container img","max-width",f);VMM.Element.css(".slider-item .layout-text-media .media .media-container img","max-width",f);VMM.Element.css(".slider-item .media .media-container .twitter .avatar img","max-width",32);VMM.Element.css(".slider-item .media .media-container .twitter .avatar img","max-height",32);VMM.Element.height(".slider-item .media .media-container .media-frame",d);VMM.Element.width(".slider-item .media .media-container .media-frame",c);VMM.Element.height(".slider-item .layout-media .media .media-container .media-frame",a);VMM.Element.width(".slider-item .layout-media .media .media-container .media-frame",b);VMM.Element.height(".slider-item .layout-media .media .media-container .soundcloud",s.slider.height-150);VMM.Element.width(".slider-item .layout-media .media .media-container .soundcloud",s.slider.content.width);VMM.Element.width(".slider-item .layout-text-media .media .media-container .soundcloud",c);VMM.Element.css(".slider-item .media .media-container .soundcloud","max-height",168);VMM.Element.height(".slider-item .layout-text-media .media .media-container .map",e);VMM.Element.height(".slider-item .layout-media .media .media-container .map",a+60);VMM.Element.width(".slider-item .layout-media .media .media-container .map",c);VMM.Element.height(".slider-item .layout-text-media .media .media-container .doc",e);VMM.Element.height(".slider-item .layout-media .media .media-container .doc",a+60);VMM.Element.css(".slider-item .layout-text-media .media .media-container .media-frame","max-width",s.slider.content.width)},G=function(){var a=0;for(var b=0;b<e.length;b++){a=b*(s.slider.width+s.spacing);VMM.Element.css(e[b],"left",a)}},H=function(a){var b="linear";for(var c=0;c<e.length;c++)c==i?VMM.Element.animate(e[c],s.duration,b,{opacity:1}):c==i-1?VMM.Element.animate(e[c],s.duration,b,{opacity:.1}):c==i+1?VMM.Element.animate(e[c],s.duration,b,{opacity:.1}):VMM.Element.css(e[c],"opacity",a)},I=function(a,b,c,f,g){VMM.ExternalAPI.youtube.stopPlayers();i=a;var h=s.ease,j=s.duration,k=!1,l=!1;i==0&&(l=!0);i+1==e.length&&(k=!0);b!=null&&b!=""&&(h=b);c!=null&&c!=""&&(j=c);var m=VMM.Element.position(e[i]);if(l)VMM.Element.visible(u.prevBtn,!1);else{VMM.Element.visible(u.prevBtn,!0);s.type=="timeline"&&VMM.attachElement(u.prevDate,d[i-1].date);VMM.attachElement(u.prevTitle,VMM.Util.unlinkify(d[i-1].title))}if(k)VMM.Element.visible(u.nextBtn,!1);else{VMM.Element.visible(u.nextBtn,!0);s.type=="timeline"&&VMM.attachElement(u.nextDate,d[i+1].date);VMM.attachElement(u.nextTitle,VMM.Util.unlinkify(d[i+1].title))}if(f)VMM.Element.css(q,"left",-(m.left-s.slider.content.padding));else{VMM.Element.stop(q);VMM.Element.animate(q,j,h,{left:-(m.left-s.slider.content.padding)})}g&&VMM.fireEvent(n,"LOADED");if(VMM.Element.height(e[i])>s.slider_height)VMM.Element.css(".slider","overflow-y","scroll");else{VMM.Element.css(n,"overflow-y","hidden");VMM.Element.animate(n,j,h,{scrollTop:VMM.Element.prop(n,"scrollHeight")-VMM.Element.height(n)})}},J=function(){var a="<div class='icon'>&nbsp;</div>";u.nextBtn=VMM.appendAndGetElement(o,"<div>","nav-next");u.prevBtn=VMM.appendAndGetElement(o,"<div>","nav-previous");u.nextBtnContainer=VMM.appendAndGetElement(u.nextBtn,"<div>","nav-container",a);u.prevBtnContainer=VMM.appendAndGetElement(u.prevBtn,"<div>","nav-container",a);if(s.type=="timeline"){u.nextDate=VMM.appendAndGetElement(u.nextBtnContainer,"<div>","date","1957");u.prevDate=VMM.appendAndGetElement(u.prevBtnContainer,"<div>","date","1957")}u.nextTitle=VMM.appendAndGetElement(u.nextBtnContainer,"<div>","title","Title Goes Here");u.prevTitle=VMM.appendAndGetElement(u.prevBtnContainer,"<div>","title","Title Goes Here");VMM.bindEvent(".nav-next",y);VMM.bindEvent(".nav-previous",z);VMM.bindEvent(window,A,"keydown")},K=function(){VMM.attachElement(n,"");o=VMM.getElement("div.slider");p=VMM.appendAndGetElement(o,"<div>","slider-container-mask");q=VMM.appendAndGetElement(p,"<div>","slider-container");r=VMM.appendAndGetElement(q,"<div>","slider-item-container");J();E(d);var a=3e3;if(VMM.Browser.device=="tablet"||VMM.Browser.device=="mobile"){s.duration=500;a=1e3;VMM.TouchSlider.createPanel(q,q,VMM.Element.width(e[0]),s.spacing,!0);VMM.bindEvent(q,B,"TOUCHUPDATE")}else VMM.Browser.device!="mobile";x(!1,!0);VMM.Element.visible(u.prevBtn,!1);I(0,"easeOutExpo",a,!0,!0);m=!0}});if(typeof VMM!="undefined"&&typeof VMM.Util=="undefined"){VMM.Util={init:function(){return this},randomBetween:function(a,b){return Math.floor(Math.random()*(b-a+1)+a)},average:function(a){var b={mean:0,variance:0,deviation:0},c=a.length;for(var d,e=0,f=c;f--;e+=a[f]);for(d=b.mean=e/c,f=c,e=0;f--;e+=Math.pow(a[f]-d,2));return b.deviation=Math.sqrt(b.variance=e/c),b},customSort:function(a,b){var c=a,d=b;return c==d?0:c>d?1:-1},number2money:function(a,b,c){var b=b!==null?b:!0,c=c!==null?c:!1,d=VMM.Math2.floatPrecision(a,2),e=this.niceNumber(d);!e.split(/\./g)[1]&&c&&(e+=".00");b&&(e="$"+e);return e},wordCount:function(a){var b=a+" ",c=/^[^A-Za-z0-9\'\-]+/gi,d=b.replace(c,""),e=/[^A-Za-z0-9\'\-]+/gi,f=d.replace(e," "),g=f.split(" "),h=g.length-1;b.length<2&&(h=0);return h},parseDate:function(a){var b;if(a.match(/,/gi)){var c=a.split(",");for(var d=0;d<c.length;d++)c[d]=parseInt(c[d]);b=new Date;c[0]&&b.setFullYear(c[0]);c[1]>1?b.setMonth(c[1]-1):b.setMonth(0);c[2]>1?b.setDate(c[2]):b.setDate(1);c[3]>1?b.setHours(c[3]):b.setHours(0);c[4]>1?b.setMinutes(c[4]):b.setMinutes(0);c[5]>1?b.setSeconds(c[5]):b.setSeconds(0);c[6]>1?b.setMilliseconds(c[6]):b.setMilliseconds(0)}else if(a.match("/"))b=new Date(a);else if(a.length<5){b=new Date;b.setFullYear(parseInt(a));b.setMonth(0);b.setDate(1);b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}else b=new Date(parseInt(a.slice(0,4)),parseInt(a.slice(4,6))-1,parseInt(a.slice(6,8)),parseInt(a.slice(8,10)),parseInt(a.slice(10,12)));return b},ratio:{r16_9:function(a,b){if(a!==null&&a!=="")return Math.round(b/16*9);if(b!==null&&b!=="")return Math.round(a/9*16)},r4_3:function(a,b){if(a!==null&&a!=="")return Math.round(b/4*3);if(b!==null&&b!=="")return Math.round(a/3*4)}},date:{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:"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>'"},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"],setLanguage:function(a){trace("SET DATE LANGUAGE");VMM.Util.date.dateformats=a.dateformats;VMM.Util.date.month=a.date.month;VMM.Util.date.month_abbr=a.date.month_abbr;VMM.Util.date.day=a.date.day;VMM.Util.date.day_abbr=a.date.day_abbr;dateFormat.i18n.dayNames=a.date.day_abbr.concat(a.date.day);dateFormat.i18n.monthNames=a.date.month_abbr.concat(a.date.month)},prettyDate:function(a,b,c){var d="";if(type.of(a)=="date")a.getMonth()===0&&a.getDate()==1&&a.getHours()===0&&a.getMinutes()===0?d=dateFormat(a,VMM.Util.date.dateformats.year):a.getDate()<=1&&a.getHours()===0&&a.getMinutes()===0?b?d=dateFormat(a,VMM.Util.date.dateformats.month_short):d=dateFormat(a,VMM.Util.date.dateformats.month):a.getHours()===0&&a.getMinutes()===0?b?d=dateFormat(a,VMM.Util.date.dateformats.full_short):d=dateFormat(a,VMM.Util.date.dateformats.full):a.getMinutes()===0?b?d=dateFormat(a,VMM.Util.date.dateformats.time_no_seconds_short):d=dateFormat(a,VMM.Util.date.dateformats.time_no_seconds_small_date):b?d=dateFormat(a,VMM.Util.date.dateformats.time_no_seconds_short):d=dateFormat(a,VMM.Util.date.dateformats.full_long);else{trace("NOT A VALID DATE?");trace(a)}return d}},doubledigit:function(a){return(a<10?"0":"")+a},truncateWords:function(a,b,c){b||(b=30);c||(c=b);var d=/^[^A-Za-z0-9\'\-]+/gi,e=a.replace(d,""),f=e.split(" "),g=[];b=Math.min(f.length,b);c=Math.min(f.length,c);for(var h=0;h<b;h++)g.push(f[h]);for(var i=b;h<c;h++){var j=f[h];g.push(j);if(j.charAt(j.length-1)==".")break}return g.join(" ")},linkify:function(a,b,c){var d=/\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim,e=/(^|[^\/])(www\.[\S]+(\b|$))/gim,f=/(([a-zA-Z0-9_\-\.]+)@[a-zA-Z_]+?(?:\.[a-zA-Z]{2,6}))+/gim;return a.replace(d,"<a target='_blank' href='$&' onclick='void(0)'>$&</a>").replace(e,"$1<a target='_blank' onclick='void(0)' href='http://$2'>$2</a>").replace(f,"<a target='_blank' onclick='void(0)' href='mailto:$1'>$1</a>")},linkify_with_twitter:function(a,b,c){function h(a){var b=/(\b(https?|ftp|file):\/\/([-A-Z0-9+&@#%?=~_|!:,.;]*)([-A-Z0-9+&@#%?\/=~_|!:,.;]*)[-A-Z0-9+&@#\/%=~_|])/ig;return a.replace(b,"<a href='$1' target='_blank'>$3</a>")}var d=/\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim,e=/(\()((?: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,f='$1$4$7$10$13<a href="$2$5$8$11$14" class="hyphenate">$2$5$8$11$14</a>$3$6$9$12',g=/(^|[^\/])(www\.[\S]+(\b|$))/gim,i=/(([a-zA-Z0-9_\-\.]+)@[a-zA-Z_]+?(?:\.[a-zA-Z]{2,6}))+/gim,j=/(@([\w]+))/g,k=/(#([\w]+))/g;return a.replace(e,f).replace(g,"$1<a target='_blank' class='hyphenate' onclick='void(0)' href='http://$2'>$2</a>").replace(i,"<a target='_blank' onclick='void(0)' href='mailto:$1'>$1</a>").replace(j,"<a href='http://twitter.com/$2' target='_blank' onclick='void(0)'>$1</a>").replace(k,"<a href='http://twitter.com/#search?q=%23$2' target='_blank' 'void(0)'>$1</a>")},unlinkify:function(a){if(!a)return a;a=a.replace(/<a\b[^>]*>/i,"");a=a.replace(/<\/a>/i,"");return a},nl2br:function(a){return a.replace(/(\r\n|[\r\n]|\\n|\\r)/g,"<br/>")},unique_ID:function(a){var b=function(a){return Math.floor(Math.random()*a)},c=function(){var a="abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ";return a.substr(b(62),1)},d=function(a){var b="";for(var d=0;d<a;d++)b+=c();return b};return d(a)},isEven:function(a){return a%2===0?!0:!1},getUrlVars:function(a){var b=a.toString();b.match("&#038;")?b=b.replace("&#038;","&"):b.match("&#38;")?b=b.replace("&#38;","&"):b.match("&amp;")&&(b=b.replace("&amp;","&"));var c=[],d,e=b.slice(b.indexOf("?")+1).split("&");for(var f=0;f<e.length;f++){d=e[f].split("=");c.push(d[0]);c[d[0]]=d[1]}return c},toHTML:function(a){a=this.nl2br(a);a=this.linkify(a);return a.replace(/\s\s/g,"&nbsp;&nbsp;")},toCamelCase:function(a,b){b!==!1&&(b=!0);var c=(b?a.toLowerCase():a).split(" ");for(var d=0;d<c.length;d++)c[d]=c[d].substr(0,1).toUpperCase()+c[d].substr(1);return c.join(" ")},properQuotes:function(a){return a.replace(/\"([^\"]*)\"/gi,"&#8220;$1&#8221;")},niceNumber:function(a){var b=String(Math.abs(Number(a))),c=b.split(/\./g)[0],d=b.split(/\./g)[1],e="",f=c.toArray();f.reverse();for(var g=1;g<=f.length;g++)g%3==0&&g<f.length?e=","+f[g-1]+e:e=f[g-1]+e;return d!=null&&d!=""&&d!=undefined?e+"."+d:e},toTitleCase:function(a){var b={__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(a){var b="",c=a.split(/([:.;?!][ ]|(?:[ ]|^)["“])/);for(var d=0;d<c.length;++d){var e=c[d];e=e.replace(/\b([a-zA-Z][a-z.'’]*)\b/g,this.__titleCaseDottedWordReplacer);e=e.replace(this.__lowerCaseWordsRE,this.__lowerReplacer);e=e.replace(this.__firstWordRE,this.__firstToUpperCase);e=e.replace(this.__lastWordRE,this.__firstToUpperCase);b+=e}b=b.replace(/ V(s?)\. /g," v$1. ");b=b.replace(/(['’])S\b/g,"$1s");b=b.replace(/\b(AT&T|Q&A)\b/ig,this.__upperReplacer);return b},__titleCaseDottedWordReplacer:function(a){return a.match(/[a-zA-Z][.][a-zA-Z]/)?a:b.__firstToUpperCase(a)},__lowerReplacer:function(a){return a.toLowerCase()},__upperReplacer:function(a){return a.toUpperCase()},__firstToUpperCase:function(a){var b=a.split(/(^[^a-zA-Z0-9]*[a-zA-Z0-9])(.*)$/);b[1]=b[1].toUpperCase();return b.join("")}};b.init();a=a.replace(/_/g," ");a=b.toTitleCase(a);return a}}.init();String.linkify||(String.prototype.linkify=function(){var a=/\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim,b=/(^|[^\/])(www\.[\S]+(\b|$))/gim,c=/(([a-zA-Z0-9_\-\.]+)@[a-zA-Z_]+?(?:\.[a-zA-Z]{2,6}))+/gim,d=/(@([\w]+))/g,e=/(#([\w]+))/g;return this.replace(a,'<a target="_blank" href="$&">$&</a>').replace(b,'$1<a target="_blank" href="http://$2">$2</a>').replace(c,'<a target="_blank" href="mailto:$1">$1</a>').replace(d,"<a href='http://twitter.com/$2' target='_blank'>$1</a>").replace(e,"<a href='http://twitter.com/#search?q=%23$2' target='_blank'>$1</a>")});var dateFormat=function(){var a=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,b=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,c=/[^-+\dA-Z]/g,d=function(a,b){a=String(a);b=b||2;while(a.length<b)a="0"+a;return a};return function(e,f,g){var h=dateFormat;if(arguments.length==1&&Object.prototype.toString.call(e)=="[object String]"&&!/\d/.test(e)){f=e;e=undefined}e=e?new Date(e):new Date;if(isNaN(e))throw SyntaxError("invalid date");f=String(h.masks[f]||f||h.masks["default"]);if(f.slice(0,4)=="UTC:"){f=f.slice(4);g=!0}var i=g?"getUTC":"get",j=e[i+"Date"]()
,k=e[i+"Day"](),l=e[i+"Month"](),m=e[i+"FullYear"](),n=e[i+"Hours"](),o=e[i+"Minutes"](),p=e[i+"Seconds"](),q=e[i+"Milliseconds"](),r=g?0:e.getTimezoneOffset(),s={d:j,dd:d(j),ddd:h.i18n.dayNames[k],dddd:h.i18n.dayNames[k+7],m:l+1,mm:d(l+1),mmm:h.i18n.monthNames[l],mmmm:h.i18n.monthNames[l+12],yy:String(m).slice(2),yyyy:m,h:n%12||12,hh:d(n%12||12),H:n,HH:d(n),M:o,MM:d(o),s:p,ss:d(p),l:d(q,3),L:d(q>99?Math.round(q/10):q),t:n<12?"a":"p",tt:n<12?"am":"pm",T:n<12?"A":"P",TT:n<12?"AM":"PM",Z:g?"UTC":(String(e).match(b)||[""]).pop().replace(c,""),o:(r>0?"-":"+")+d(Math.floor(Math.abs(r)/60)*100+Math.abs(r)%60,4),S:["th","st","nd","rd"][j%10>3?0:(j%100-j%10!=10)*j%10]};return f.replace(a,function(a){return a in s?s[a]:a.slice(1,a.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(a,b){return dateFormat(this,a,b)}}window.loadedJS=[];typeof VMM!="undefined"&&typeof VMM.LoadLib=="undefined"&&(VMM.LoadLib=function(a){function i(a){var b=!1;for(var c=0;c<h.length;c++)h[c]==a&&(b=!0);b||h.push(a);return b}function j(b,c){var d=a.createElement(b),e;for(e in c)c.hasOwnProperty(e)&&d.setAttribute(e,c[e]);return d}function k(a){var b=d[a],c,g;if(b){c=b.callback;g=b.urls;g.shift();e=0;if(!g.length){c&&c.call(b.context,b.obj);d[a]=null;f[a].length&&m(a)}}}function l(){var c=navigator.userAgent;b={async:a.createElement("script").async===!0};(b.webkit=/AppleWebKit\//.test(c))||(b.ie=/MSIE/.test(c))||(b.opera=/Opera/.test(c))||(b.gecko=/Gecko\//.test(c))||(b.unknown=!0)}function m(e,g,h,i,m){var p=function(){k(e)},q=e==="css",r=[],s,t,u,v,w,x;b||l();if(g){g=typeof g=="string"?[g]:g.concat();if(q||b.async||b.gecko||b.opera)f[e].push({urls:g,callback:h,obj:i,context:m});else for(s=0,t=g.length;s<t;++s)f[e].push({urls:[g[s]],callback:s===t-1?h:null,obj:i,context:m})}if(d[e]||!(v=d[e]=f[e].shift()))return;c||(c=a.head||a.getElementsByTagName("head")[0]);w=v.urls;for(s=0,t=w.length;s<t;++s){x=w[s];if(q)u=b.gecko?j("style"):j("link",{href:x,rel:"stylesheet"});else{u=j("script",{src:x});u.async=!1}u.className="lazyload";u.setAttribute("charset","utf-8");if(b.ie&&!q)u.onreadystatechange=function(){if(/loaded|complete/.test(u.readyState)){u.onreadystatechange=null;p()}};else if(q&&(b.gecko||b.webkit))if(b.webkit){v.urls[s]=u.href;o()}else{u.innerHTML='@import "'+x+'";';n(u)}else u.onload=u.onerror=p;r.push(u)}for(s=0,t=r.length;s<t;++s)c.appendChild(r[s])}function n(a){var b;try{b=!!a.sheet.cssRules}catch(c){e+=1;e<200?setTimeout(function(){n(a)},50):b&&k("css");return}k("css")}function o(){var a=d.css,b;if(a){b=g.length;while(--b>=0)if(g[b].href===a.urls[0]){k("css");break}e+=1;a&&(e<200?setTimeout(o,50):k("css"))}}var b,c,d={},e=0,f={css:[],js:[]},g=a.styleSheets,h=[];return{css:function(a,b,c,d){if(i(a))return b;m("css",a,b,c,d)},js:function(a,b,c,d){if(i(a))return b;m("js",a,b,c,d)}}}(this.document));typeof VMM!="undefined"&&typeof VMM.Language=="undefined"&&(VMM.Language={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:"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>'"},messages:{loading_timeline:"Loading Timeline... ",return_to_title:"Return to Title",expand_timeline:"Expand Timeline",contract_timeline:"Contract Timeline"}});if(typeof VMM!="undefined"&&typeof VMM.Timeline=="undefined"){VMM.Timeline=function(a,b,c){function r(a,b){k=b.timeline;type.of(k.era)!="array"&&(k.era=[]);H()}function s(){D()}function t(){F();p.setSize(m.feature.width,m.feature.height);q.setSize(m.width,m.height);G()}function u(a){m.loaded.slider=!0;v()}function v(a){m.loaded.percentloaded=m.loaded.percentloaded+25;m.loaded.slider&&m.loaded.timenav&&B()}function w(a){m.loaded.timenav=!0;v()}function x(a){q.setMarker(p.getCurrentNumber(),m.ease,m.duration)}function y(a){p.setSlide(q.getCurrentNumber())}var d="0.98";trace("TIMELINE VERSION "+d);var e=VMM.getElement("#timeline"),f,g,h=VMM.getElement("#timeline");f=VMM.appendAndGetElement(e,"<div>","feedback","");g=VMM.appendAndGetElement(f,"<div>","messege","#Timeline");var i="private",j={},k={},l=[],m={type:"timeline",maptype:"toner",interval:10,something:0,width:960,height:540,spacing:15,loaded:{slider:!1,timenav:!1,percentloaded:0},nav:{width:960,height:200},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};VMM.Timeline.Config=m;VMM.master_config.Timeline=VMM.Timeline.Config;if(a!=null&&a!=""){m.width=a;VMM.Element.width(e,a)}else m.width=VMM.Element.width(e);if(b!=null&&b!=""){m.height=b;VMM.Element.height(e,b)}else m.height=VMM.Element.height(e);m.nav={width:m.width,height:200};m.feature={width:m.width,height:m.height-m.nav.height};VMM.Browser.device=="mobile"&&(m.feature.height=m.height);if(typeof timeline_config=="object"){trace("HAS TIMELINE CONFIG");var n;for(n in timeline_config)Object.prototype.hasOwnProperty.call(timeline_config,n)&&(m[n]=timeline_config[n])}else if(typeof c=="object"){var n;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(m[n]=c[n])}var o=!1;VMM.Browser.browser=="MSIE"&&parseInt(VMM.Browser.version,10)==7&&(o=!0);var p=new VMM.Slider("div.slider",m),q=new VMM.Timeline.TimeNav("div.navigation",720,400,!0);this.init=function(a){trace("TIMELINE INIT");trace(VMM.Timeline.Config.language);VMM.Util.date.setLanguage(VMM.Timeline.Config.language);VMM.bindEvent(global,r,"DATAREADY");VMM.bindEvent(global,A,"MESSEGE");if(o){f=VMM.appendAndGetElement(e,"<div>","feedback","");g=VMM.appendAndGetElement(f,"<div>","messege","Internet Explorer 7 is not supported by #Timeline.")}else{type.of(a)=="string"?VMM.Timeline.DataObj.getData(a):VMM.Timeline.DataObj.getData(h);f=VMM.appendAndGetElement(e,"<div>","feedback","");g=VMM.appendAndGetElement(f,"<div>","messege",VMM.Timeline.Config.language.messages.loading_timeline)}};this.iframeLoaded=function(){trace("iframeLoaded")};var z=function(a){VMM.getJSON(a,function(a){k=VMM.Timeline.DataObj.getData(a);VMM.fireEvent(global,"DATAREADY")})},A=function(a,b){g=VMM.appendAndGetElement(f,"<div>","messege",b)},B=function(){VMM.Element.animate(f,m.duration,m.ease*4,{opacity:0},C)},C=function(){VMM.Element.detach(f)},D=function(){VMM.attachElement(e,"");VMM.appendElement(e,"<div class='container main'><div class='feature'><div class='slider'></div></div><div class='navigation'></div></div>");t();VMM.bindEvent("div.slider",u,"LOADED");VMM.bindEvent("div.navigation",w,"LOADED");VMM.bindEvent("div.slider",x,"UPDATE");VMM.bindEvent("div.navigation",y,"UPDATE");p.init(l);q.init(l,k.era);VMM.bindEvent(global,t,"resize")},E=function(a,b){F();var c=a,d="",e={};e._text="";e._media="";var f=!1,g=!1,h=!1;if(type.of(b)=="date"){f=!0;a.type!="start"&&(e._text+=VMM.createElement("h2",VMM.Util.date.prettyDate(b),"date"));c.headline!=null&&c.headline!=""&&c.type!="tweets"&&(a.type=="start"?e._text+=VMM.createElement("h2",VMM.Util.linkify_with_twitter(c.headline,"_blank"),"start"):e._text+=VMM.createElement("h3",VMM.Util.linkify_with_twitter(c.headline,"_blank")));if(c.text!=null&&c.text!=""){h=!0;e._text+=VMM.createElement("p",VMM.Util.linkify_with_twitter(c.text,"_blank"))}e._text=VMM.createElement("div",e._text,"container");e._text=VMM.createElement("div",e._text,"text")}if(f&&c.asset!=null&&c.asset!=""&&c.asset.media!=null&&c.asset.media!=""){g=!0;e._media=VMM.MediaElement.create("",c.asset,!0,m.feature.width,m.feature.height)}if(f){var i="content-container layout";h&&(i+="-text");g&&(i+="-media");d=VMM.createElement("div",e._text+e._media,i)}return d},F=function(){m.width=VMM.Element.width(e);m.height=VMM.Element.height(e);m.nav.width=m.width;m.feature.width=m.width;VMM.Browser.device=="mobile"?m.feature.height=m.height:m.feature.height=m.height-m.nav.height-3},G=function(){if(m.width<=480){VMM.Element.hide("div.navigation");VMM.Element.hide("div.nav-next");VMM.Element.hide("div.nav-previous");VMM.Element.height(".slider-container-mask",m.height)}else{VMM.Element.show("div.navigation");VMM.Element.show("div.nav-next");VMM.Element.show("div.nav-previous");VMM.Element.height(".slider-container-mask",m.feature.height)}},H=function(){F();VMM.fireEvent(global,"MESSEGE","Building Dates");for(var a=0;a<k.date.length;a++)if(k.date[a].startDate!=null&&k.date[a].startDate!=""){var b={};if(k.date[a].type=="tweets")b.startdate=VMM.ExternalAPI.twitter.parseTwitterDate(k.date[a].startDate);else if(k.date[a].type=="google spreadsheet"){b.startdate=new Date(Date.parse(k.date[a].startDate));trace(b.startdate)}else b.startdate=VMM.Util.parseDate(k.date[a].startDate);b.uniqueid=k.date[a].startDate.toString()+"-"+a.toString();k.date[a].endDate!=null&&k.date[a].endDate!=""?k.date[a].type=="tweets"?b.enddate=VMM.ExternalAPI.twitter.parseTwitterDate(k.date[a].endDate):k.date[a].type=="google spreadsheet"?b.enddate=new Date(Date.parse(k.date[a].endDate)):b.enddate=VMM.Util.parseDate(k.date[a].endDate):b.enddate=b.startdate;b.title=k.date[a].headline;b.type=k.date[a].type;b.date=VMM.Util.date.prettyDate(b.startdate);b.asset=k.date[a].asset;b.fulldate=b.startdate.getTime();b.content=E(k.date[a],b.startdate);b.content!=null&&b.content!=""&&l.push(b)}l.sort(function(a,b){return a.fulldate-b.fulldate});if(k.headline!=null&&k.headline!=""&&k.text!=null&&k.text!=""){trace("HAS STARTPAGE");var b={};k.type=="google spreadsheet"?trace("google spreadsheet startpage date "+k.startDate):b.startdate=VMM.Util.parseDate(k.startDate);b.startdate=new Date(l[0].startdate);var c=l[0].startdate,d=0;trace(c);c.getMonth()===0&&c.getDate()==1&&c.getHours()===0&&c.getMinutes()===0?b.startdate.setFullYear(c.getFullYear()-1):c.getDate()<=1&&c.getHours()===0&&c.getMinutes()===0?b.startdate.setMonth(c.getMonth()-1):c.getHours()===0&&c.getMinutes()===0?b.startdate.setDate(c.getDate()-1):c.getMinutes()===0?b.startdate.setHours(c.getHours()-1):b.startdate.setMinutes(c.getMinutes()-1);trace(c);b.uniqueid=VMM.Util.unique_ID(5);b.enddate=b.startdate;b.title=k.headline;b.headline=k.headline;b.text=k.text;b.type="start";b.date=VMM.Util.date.prettyDate(k.startDate);b.asset=k.asset;b.fulldate=b.startdate.getTime();b.content=E(b,b.startdate);(b.content!=null&&b.content!=""||b.title!=null&&b.title!="")&&l.push(b)}l.sort(function(a,b){return a.fulldate-b.fulldate});s()}};VMM.Timeline.Config={}}typeof VMM.Timeline!="undefined"&&typeof VMM.Timeline.TimeNav=="undefined"&&(VMM.Timeline.TimeNav=function(a,b,c){function K(){trace("onConfigSet")}function L(a){VMM.Element.css(D,"left",Math.round(t.width/2)+2);cb(l,t.ease,t.duration,!0,a)}function M(){VMM.fireEvent(J,"UPDATE")}function N(){VMM.DragSlider.cancelSlide();if(t.multiplier>t.min_multiplier){t.multiplier<=1?t.multiplier=t.multiplier-.25:t.multiplier>5?t.multiplier=Math.round(t.multiplier-4):t.multiplier=Math.round(t.multiplier-1);t.multiplier<=0&&(t.multiplier=t.min_multiplier);eb()}}function O(){VMM.DragSlider.cancelSlide();if(t.multiplier<t.max_multiplier){t.multiplier>4?t.multiplier=Math.round(t.multiplier+4):t.multiplier=Math.round(t.multiplier+1);t.multiplier>=t.max_multiplier&&(t.multiplier=t.max_multiplier);eb()}}function P(a){VMM.DragSlider.cancelSlide();cb(0);M()}function Q(a){VMM.DragSlider.cancelSlide();cb(a.data.number);M()}function R(a){VMM.Element.toggleClass(a.data.elem,"zFront")}function S(a,b){VMM.Element.animate(v,b.time/2,t.ease,{left:b.left})}trace("VMM.Timeline.TimeNav");var d={},e=[],f,g=[],h=[],i=[],j=[],k={},l=0,m=!1,n={day:24,month:12,year:10,hour:60,minute:60,second:1e3,decade:10,century:100,millenium:1e3,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},o={day:864e5,week:7,month:30.4166666667,year:12,hour:24,minute:1440,second:86400,decade:10,century:100,millenium:1e3},p={type:"year",number:10,first:1970,last:2011,multiplier:100},q={type:"year",number:10,first:1970,last:2011,multiplier:100},r={type:"year",number:10,first:1970,last:2011,multiplier:100},s={day:{},month:{},year:{},hour:{},minute:{},second:{},decade:{},century:{},millenium:{},week:{}},t=VMM.Timeline.Config;t.something=0;t.nav_width=100;t.nav_height=200;t.timeline=!1;t.marker_width=150;t.marker_height=48;t.density=1;t.timeline_width=900;t.interval_width=200;t.rows=[1,1,1];t.multiplier=6;t.max_multiplier=16;t.min_multiplier=.1;t.has_start_page=!1;t.rows=[t.marker_height,t.marker_height*2,1];b!=null&&b!=""&&(t.width=b);c!=null&&c!=""&&(t.height=c);var u="",m=!1,v="",w="",x="",y="",z="",A="",B="",C="",D="",E="",F="",G="",H="",I={};I.nextBtn;I.prevBtn;I.nextDate;I.prevDate;I.nextTitle;I.prevTitle;this.ver="0.1";var J=a;this.init=function(a,b){trace("VMM.Timeline.TimeNav init");typeof a!="undefined"?this.setData(a,b):trace("WAITING ON DATA")};this.setData=function(a,b){if(typeof a!="undefined"){e=a;f=b;db()}else trace("NO DATA")};this.setSize=function(a,b){a!=null&&(t.width=a);b!=null&&(t.height=b);m&&L()};this.setMarker=function(a,b,c,d){cb(a,b,c)};this.getCurrentNumber=function(){return l};var T=function(){var a=2,b=0,c=0;for(var d=0;d<e.length;d++){var i="",j,k,l,m,n,o;j=VMM.appendAndGetElement(w,"<div>","marker");k=VMM.appendAndGetElement(j,"<div>","flag");l=VMM.appendAndGetElement(k,"<div>","flag-content");m=VMM.appendAndGetElement(j,"<div>","dot");n=VMM.appendAndGetElement(j,"<div>","line");o=VMM.appendAndGetElement(n,"<div>","event-line");e[d].asset!=null&&e[d].asset!=""&&VMM.appendElement(l,VMM.MediaElement.thumbnail(e[d].asset,32,32));VMM.appendElement(l,"<h3>"+VMM.Util.unlinkify(e[d].title)+"</h3><h4>"+e[d].date+"</h4>");VMM.Element.attr(j,"id",e[d].uniqueid.toString());VMM.bindEvent(k,Q,"",{number:d});VMM.bindEvent(k,R,"mouseenter mouseleave",{number:d,elem:k});var p={marker:j,flag:k,lineevent:o,type:"marker"};if(e[d].type=="start"){trace("BUILD MARKER HAS START PAGE");t.has_start_page=!0;p.type="start"}h.push(p)}for(var q=0;q<f.length;q++){var i="",r={content:"",startdate:"",enddate:"",headline:"",uniqueid:"",color:""};r.title=f[q].headline;r.uniqueid=VMM.Util.unique_ID(4);r.color=f[q].color;r.content=VMM.appendAndGetElement(w,"<div>","era");VMM.Element.attr(r.content,"id",r.uniqueid);VMM.Element.css(r.content,"background",r.color);VMM.appendElement(r.content,"<h3>"+VMM.Util.unlinkify(r.title)+"</h3>");r.startdate=VMM.Util.parseDate(f[q].startDate);r.enddate=VMM.Util.parseDate(f[q].endDate);g.push(r)}},U=function(a,b,c){var d=a.type,e=a.multiplier,f=Z(b),g,h,i;h=b.months;if(type.of(c)=="date"){g=Z(c);i=c.months;if(d=="millenium"){h=b.milleniums;i=c.milleniums}else if(d=="century"){h=f.centuries;i=g.centuries}else if(d=="decade"){h=f.decades;i=g.decades}else if(d=="year"){h=f.years;i=g.years}else if(d=="month"){h=f.months;i=g.months}else if(d=="week"){h=f.weeks;i=g.weeks}else if(d=="day"){h=f.days;i=g.days}else if(d=="hour"){h=f.hours;i=g.hours}else if(d=="minute"){h=f.minutes;i=g.minutes}_pos=(h-p.base)*(t.interval_width/t.multiplier);_pos_end=(i-p.base)*(t.interval_width/t.multiplier)}else{if(d=="millenium"){h=b.milleniums;i=b.milleniums}else if(d=="century"){h=f.centuries;i=f.centuries}else if(d=="decade"){h=f.decades;i=f.decades}else if(d=="year"){h=f.years;i=f.years}else if(d=="month"){h=f.months;i=f.months}else if(d=="week"){h=f.weeks;i=f.weeks}else if(d=="day"){h=f.days;i=f.days}else if(d=="hour"){h=f.hours;i=f.hours}else if(d=="minute"){h=f.minutes;i=f.minutes}_pos=(h-p.base)*(t.interval_width/t.multiplier);_pos_end=_pos}return pos={begin:_pos,end:_pos_end}},V=function(){var a=0,b=0,c=0,d=[];for(var f=0;f<h.length;f++)if(e[f].type!="start"){var g=U(p,e[f].startdate,e[f].enddate);a=b;b=g.begin;c=b-a;d.push(c)}return VMM.Util.average(d).mean},W=function(){var a=0,b=0,c=0,d=[],f=!0;for(var g=0;g<e.length;g++)if(e[g].type=="start")trace("DATA DATE IS START");else{var h=e[g].startdate;a=b;b=h;c=b-a;d.push(c)}return VMM.Util.average(d)},X=function(){var a=t.multiplier;for(var b=0;b<a;b++)V()<75&&t.multiplier>1&&(t.multiplier=t.multiplier-1)},Y=function(a){var b=p.type,c=p.multiplier,d=2,f=0,i=0,j=150,k=6,m=0;VMM.Element.removeClass(".flag","row1");VMM.Element.removeClass(".flag","row2");VMM.Element.removeClass(".flag","row3");for(var n=0;n<h.length;n++){var o,q=h[n].marker,r=h[n].flag,s=h[n].lineevent,u=U(p,e[n].startdate,e[n].enddate);A=u.begin;_pos_end=u.end;var w=-2;A=Math.round(A+w);_pos_end=Math.round(_pos_end+w);o=Math.round(_pos_end-A);if(a){VMM.Element.stop(q);VMM.Element.animate(q,t.duration/2,t.ease,{left:A})}else VMM.Element.css(q,"left",A);n==l&&(m=A);if(o>5){VMM.Element.css(s,"height",k);VMM.Element.css(s,"width",o);VMM.Element.css(s,"top",j)}if(A-f<t.marker_width+t.spacing)if(d<t.rows.length-1)d++;else{d=0;i++}else{i=0;d=0}f=A;if(a){VMM.Element.stop(r);VMM.Element.animate(r,t.duration,t.ease,{top:t.rows[d]})}else VMM.Element.css(r,"top",t.rows[d]);t.has_start_page&&h[n].type=="start"&&VMM.Element.visible(q,!1)}for(var x=0;x<g.length;x++){var o,y=g[x],z=y.content,A=U(p,y.startdate,y.enddate),B=A.end-A.begin,C=25;VMM.Element.css(z,"left",A.begin);VMM.Element.css(z,"width",B)}if(a){VMM.Element.stop(v);VMM.Element.animate(v,t.duration/2,t.ease,{left:t.width/2-m})}},Z=function(a,b){var c={};c.days=a/o.day;c.weeks=c.days/o.week;c.months=c.days/o.month;c.years=c.months/o.year;c.hours=c.days*o.hour;c.minutes=c.days*o.minute;c.seconds=c.days*o.second;c.decades=c.years/o.decade;c.centuries=c.years/o.century;c.milleniums=c.years/o.millenium;return c},$=function(){var a=Z(e[0].startdate),b=Z(e[e.length-1].enddate);s.millenium.type="millenium";s.millenium.first=a.milleniums;s.millenium.base=Math.floor(a.milleniums);s.millenium.last=b.milleniums;s.millenium.number=k.milleniums;s.millenium.multiplier=n.millenium;s.millenium.minor=n.millenium;s.century.type="century";s.century.first=a.centuries;s.century.base=Math.floor(a.centuries);s.century.last=b.centuries;s.century.number=k.centuries;s.century.multiplier=n.century;s.century.minor=n.century;s.decade.type="decade";s.decade.first=a.decades;s.decade.base=Math.floor(a.decades);s.decade.last=b.decades;s.decade.number=k.decades;s.decade.multiplier=n.decade;s.decade.minor=n.decade;s.year.type="year";s.year.first=a.years;s.year.base=Math.floor(a.years);s.year.last=b.years;s.year.number=k.years;s.year.multiplier=1;s.year.minor=n.month;s.month.type="month";s.month.first=a.months;s.month.base=Math.floor(a.months);s.month.last=b.months;s.month.number=k.months;s.month.multiplier=1;s.month.minor=Math.round(n.week);s.week.type="week";s.week.first=a.weeks;s.week.base=Math.floor(a.weeks);s.week.last=b.weeks;s.week.number=k.weeks;s.week.multiplier=1;s.week.minor=7;s.day.type="day";s.day.first=a.days;s.day.base=Math.floor(a.days);s.day.last=b.days;s.day.number=k.days;s.day.multiplier=1;s.day.minor=24;s.hour.type="hour";s.hour.first=a.hours;s.hour.base=Math.floor(a.hours);s.hour.last=b.hours;s.hour.number=k.hours;s.hour.multiplier=1;s.hour.minor=60;s.minute.type="minute";s.minute.first=a.minutes;s.minute.base=Math.floor(a.minutes);s.minute.last=b.minutes;s.minute.number=k.minutes;s.minute.multiplier=1;s.minute.minor=60;s.second.type="decade";s.second.first=a.seconds;s.second.base=Math.floor(a.seconds);s.second.last=b.seconds;s.second.number=k.seconds;s.second.multiplier=1;s.second.minor=10},_=function(a,b){var c=p.type,d=p.multiplier,e=0,f=0;for(var g=0;g<a.length;g++){var h=a[g].interval_element,i=a[g].interval_date,j=a[g].interval_visible,k=U(p,i),l=k.begin;b?VMM.Element.animate(h,t.duration/2,t.ease,{left:l}):VMM.Element.css(h,"left",l);var m=!0;l-e<65&&(l-e<35?g%4==0?l==0&&(m=!1):m=!1:VMM.Util.isEven(g)||(m=!1));if(j){if(!m){VMM.Element.animate(h,t.duration*2,t.ease,{opacity:0});a[g].interval_visible=!1}}else if(m){VMM.Element.animate(h,t.duration*2,t.ease,{opacity:100});a[g].interval_visible=!0}e=l}var n=50,o=e+n*6;VMM.Element.width(E,o)},ab=function(){VMM.attachElement(z,"");VMM.attachElement(A,"");p.date=new Date(e[0].startdate.getFullYear(),0,1,0,0,0);q.date=new Date(e[0].startdate.getFullYear(),0,1,0,0,0);r.date=new Date(e[0].startdate.getFullYear(),0,1,0,0,0);var a=0,b=0,c=!0,d=0,f=0,g=0;for(var h=0;h<p.number+1;h++){var k;if(p.type=="century"){c&&p.date.setFullYear(Math.floor(e[0].startdate.getFullYear()/100)*100);p.date.setFullYear(p.date.getFullYear()+a*100)}else if(p.type=="decade"){c&&p.date.setFullYear(Math.floor(e[0].startdate.getFullYear()/10)*10);p.date.setFullYear(p.date.getFullYear()+a*10)}else if(p.type=="year"){!c;p.date.setFullYear(p.date.getFullYear()+a)}else if(p.type=="month"){c&&p.date.setMonth(e[0].startdate.getMonth());p.date.setMonth(p.date.getMonth()+a)}else if(p.type=="week"){if(c){p.date.setMonth(e[0].startdate.getMonth());p.date.setDate(Math.floor(e[0].startdate.getDate()*7))}p.date.setDate(p.date.getDate()+a*7)}else if(p.type=="day"){if(c){p.date.setMonth(e[0].startdate.getMonth());p.date.setDate(e[0].startdate.getDate())}p.date.setDate(p.date.getDate()+a)}else if(p.type=="hour"){if(c){p.date.setMonth(e[0].startdate.getMonth());p.date.setDate(e[0].startdate.getDate());p.date.setHours(e[0].startdate.getHours())}p.date.setHours(p.date.getHours()+a)}else if(p.type=="minute"){if(c){p.date.setMonth(e[0].startdate.getMonth());p.date.setDate(e[0].startdate.getDate());p.date.setHours(e[0].startdate.getHours());p.date.setMinutes(e[0].startdate.getMinutes())}p.date.setMinutes(p.date.getMinutes()+a)}else if(p.type=="second"){if(c){p.date.setMonth(e[0].startdate.getMonth());p.date.setDate(e[0].startdate.getDate());p.date.setHours(e[0].startdate.getHours());p.date.setMinutes(e[0].startdate.getMinutes());p.date.setSeconds(e[0].startdate.getSeconds())}p.date.setSeconds(p.date.getSeconds()+a)}k=VMM.Util.date.prettyDate(p.date,!0,p.type);a=1;c&&(d=m);c=!1;var l=U(p,p.date),m=l.begin,n=VMM.appendAndGetElement(z,"<div>","_idd"),o=!1;VMM.appendElement(n,k);VMM.Element.css(n,"text-indent",-(VMM.Element.width(n)/2));VMM.Element.css(n,"opacity","0");f=m;var s=new Date(p.date),u={interval_element:n,interval_date:s,interval_visible:o,type:"interval"};i.push(u)}c=!0;_major_first_pos=0;_major_last_pos=0;for(var h=0;h<Math.ceil(q.number)+1;h++){var k;if(q.type=="century"){c&&q.date.setFullYear(Math.floor(e[0].startdate.getFullYear()/100)*100);q.date.setFullYear(q.date.getFullYear()+b*100)}else if(q.type=="decade"){c&&q.date.setFullYear(Math.floor(e[0].startdate.getFullYear()/10)*10);q.date.setFullYear(q.date.getFullYear()+b*10)}else if(q.type=="year"){!c;q.date.setFullYear(q.date.getFullYear()+b)}else if(q.type=="month"){c&&q.date.setMonth(e[0].startdate.getMonth());q.date.setMonth(q.date.getMonth()+b)}else if(q.type=="week"){if(c){q.date.setMonth(e[0].startdate.getMonth());q.date.setDate(Math.floor(e[0].startdate.getDate()*7))}q.date.setDate(q.date.getDate()+b*7)}else if(q.type=="day"){if(c){q.date.setMonth(e[0].startdate.getMonth());q.date.setDate(e[0].startdate.getDate())}q.date.setDate(q.date.getDate()+b)}else if(q.type=="hour"){if(c){q.date.setMonth(e[0].startdate.getMonth());q.date.setDate(e[0].startdate.getDate());q.date.setHours(e[0].startdate.getHours())}q.date.setHours(q.date.getHours()+b)}else if(q.type=="minute"){if(c){q.date.setMonth(e[0].startdate.getMonth());q.date.setDate(e[0].startdate.getDate());q.date.setHours(e[0].startdate.getHours());q.date.setMinutes(e[0].startdate.getMinutes())}q.date.setMinutes(q.date.getMinutes()+b)}else if(q.type=="second"){if(c){q.date.setMonth(e[0].startdate.getMonth());q.date.setDate(e[0].startdate.getDate());q.date.setHours(e[0].startdate.getHours());q.date.setMinutes(e[0].startdate.getMinutes());q.date.setSeconds(e[0].startdate.getSeconds())}q.date.setSeconds(q.date.getSeconds()+b)}trace("interval_major.type "+q.type);k=VMM.Util.date.prettyDate(q.date,!1,q.type);b=1;var l=U(p,q.date),m=l.begin;_interval_major_element=VMM.appendAndGetElement(A,"<div>","major");VMM.appendElement(_interval_major_element,k);VMM.Element.css(_interval_major_element,"text-indent",-(VMM.Element.width(_interval_major_element)/2));c&&(_major_first_pos=m);c=!1;g=m;_major_last_pos=m;var v=new Date(q.date),x={interval_element:_interval_major_element,interval_date:v,interval_visible:!0,type:"interval major"};j.push(x)}VMM.Element.width(w,p.number*(t.interval_width/t.multiplier));_minor_pos_offset=50;var y=_major_last_pos-_major_first_pos+_minor_pos_offset*6,B=f+_minor_pos_offset*6;y<B?VMM.Element.width(E,B):VMM.Element.width(E,y);_(i,!0);_(j,!0);t.timeline_width=VMM.Element.width(z)},bb=function(){k=Z(e[e.length-1].enddate-e[0].startdate,!0);trace(k);$();if(k.milleniums>e.length/t.density){p=s.millenium;q=s.millenium;r=s.millenium}else if(k.centuries>e.length/t.density){p=Math.ceil(s.century);q=s.millenium;r=s.decade}else if(k.decades>e.length/t.density){p=s.decade;q=Math.ceil(s.century);r=s.year}else if(k.years>e.length/t.density){p=s.year;q=s.decade;r=s.month}else if(k.months>e.length/t.density){p=s.month;q=s.year;r=s.day}else if(k.days>e.length/t.density){p=s.day;q=s.month;r=s.hour}else if(k.hours>e.length/t.density){p=s.hour;q=s.day;r=s.minute}else if(k.minutes>e.length/t.density){p=s.minute;q=s.hour;r=s.second}else if(k.seconds>e.length/t.density){p=s.second;q=s.minute;r=s.second}else{trace("NO IDEA WHAT THE TYPE SHOULD BE");p=s.day;q=s.month;r=s.hour}trace(p.type);trace(q.type);trace();E=VMM.appendAndGetElement(y,"<div>","minor")},cb=function(a,b,c,d,e){l=a;var f=t.ease,g=t.duration,i=!1,j=!1;l==0&&(j=!0);l+1==h.length&&(i=!0);b!=null&&b!=""&&(f=b);c!=null&&c!=""&&(g=c);var k=VMM.Element.position(h[l].marker);for(var m=0;m<h.length;m++)VMM.Element.removeClass(h[m].marker,"active");if(t.has_start_page&&h[l].type=="start"){VMM.Element.visible(h[l].marker,!1);VMM.Element.addClass(h[l].marker,"start")}VMM.Element.addClass(h[l].marker,"active");!j;!i;VMM.Element.stop(v);VMM.Element.animate(v,g,f,{left:t.width/2-k.left})},db=function(){VMM.attachElement(J,"");v=VMM.appendAndGetElement(J,"<div>","timenav");w=VMM.appendAndGetElement(v,"<div>","content");x=VMM.appendAndGetElement(v,"<div>","time");y=VMM.appendAndGetElement(x,"<div>","time-interval-minor");A=VMM.appendAndGetElement(x,"<div>","time-interval-major");z=VMM.appendAndGetElement(x,"<div>","time-interval");B=VMM.appendAndGetElement(J,"<div>","timenav-background");D=VMM.appendAndGetElement(B,"<div>","timenav-line");C=VMM.appendAndGetElement(B,"<div>","timenav-interval-background","<div class='top-highlight'></div>");bb();T();X();Y();ab();L(!0);VMM.fireEvent(J,"LOADED");F=VMM.appendAndGetElement(J,"<div>","toolbar");if(t.has_start_page){$backhome=VMM.appendAndGetElement(F,"<div>","back-home","<div class='icon'></div>");VMM.bindEvent(".back-home",P,"click");VMM.Element.css(F,"top",27);VMM.Element.attribute($backhome,"title",VMM.Timeline.Config.language.messages.return_to_title);VMM.Element.attribute($backhome,"rel","tooltip")}G=VMM.appendAndGetElement(F,"<div>","zoom-in","<div class='icon'></div>");H=VMM.appendAndGetElement(F,"<div>","zoom-out","<div class='icon'></div>");VMM.Element.attribute(G,"title",VMM.Timeline.Config.language.messages.expand_timeline);VMM.Element.attribute(G,"rel","tooltip");VMM.Element.attribute(H,"title",VMM.Timeline.Config.language.messages.contract_timeline);VMM.Element.attribute(H,"rel","tooltip");VMM.bindEvent(".zoom-in",N,"click");VMM.bindEvent(".zoom-out",O,"click");F.tooltip({selector:"div[rel=tooltip]",placement:"right"});if(VMM.Browser.device=="mobile"||VMM.Browser.device=="tablet"){VMM.TouchSlider.createPanel(B,v,t.width,t.spacing,!1);VMM.bindEvent(v,S,"TOUCHUPDATE")}else VMM.DragSlider.createPanel(J,v,t.width,t.spacing,!1);m=!0},eb=function(){trace("config.multiplier "+t.multiplier);Y(!0);_(i,!0);_(j,!0)}});typeof VMM.Timeline!="undefined"&&typeof VMM.Timeline.DataObj=="undefined"&&(VMM.Timeline.DataObj={data_obj:{},model_array:[],getData:function(a){data=VMM.Timeline.DataObj.data_obj;if(type.of(a)!="string"){trace("DATA SOURCE: NOT JSON");trace("TRYING HTML PARSE");VMM.Timeline.DataObj.parseHTML(a)}else if(a.match("%23")){trace("DATA SOURCE: TWITTER SEARCH");VMM.Timeline.DataObj.model_Tweets.getData("%23medill")}else if(a.match("spreadsheet")){trace("DATA SOURCE: GOOGLE SPREADSHEET");VMM.Timeline.DataObj.model_GoogleSpreadsheet.getData(a)}else{trace("DATA SOURCE: JSON");VMM.getJSON(a,VMM.Timeline.DataObj.parseJSON)}},parseHTML:function(a){trace("parseHTML");var b=VMM.Timeline.DataObj.data_template_obj;if(VMM.Element.find("#timeline section","time")[0]){b.timeline.startDate=VMM.Element.html(VMM.Element.find("#timeline section","time")[0]);b.timeline.headline=VMM.Element.html(VMM.Element.find("#timeline section","h2"));b.timeline.text=VMM.Element.html(VMM.Element.find("#timeline section","article"));var c=!1;if(VMM.Element.find("#timeline section","figure img").length!=0){c=!0;b.timeline.asset.media=VMM.Element.attr(VMM.Element.find("#timeline section","figure img"),"src")}else if(VMM.Element.find("#timeline section","figure a").length!=0){c=!0;b.timeline.asset.media=VMM.Element.attr(VMM.Element.find("#timeline section","figure a"),"href")}if(c){VMM.Element.find("#timeline section","cite").length!=0&&(b.timeline.asset.credit=VMM.Element.html(VMM.Element.find("#timeline section","cite")));VMM.Element.find(this,"figcaption").length!=0&&(b.timeline.asset.caption=VMM.Element.html(VMM.Element.find("#timeline section","figcaption")))}}VMM.Element.each("#timeline li",function(a,c){var d=!1,e={type:"default",startDate:"",headline:"",text:"",asset:{media:"",credit:"",caption:""},tags:"Optional"};if(VMM.Element.find(this,"time")!=0){d=!0;e.startDate=VMM.Element.html(VMM.Element.find(this,"time")[0]);VMM.Element.find(this,"time")[1]&&(e.endDate=VMM.Element.html(VMM.Element.find(this,"time")[0]));e.headline=VMM.Element.html(VMM.Element.find(this,"h3"));e.text=VMM.Element.html(VMM.Element.find(this,"article"));var f=!1;if(VMM.Element.find(this,"figure img").length!=0){f=!0;e.asset.media=VMM.Element.attr(VMM.Element.find(this,"figure img"),"src")}else if(VMM.Element.find(this,"figure a").length!=0){f=!0;e.asset.media=VMM.Element.attr(VMM.Element.find(this,"figure a"),"href")}if(f){VMM.Element.find(this,"cite").length!=0&&(e.asset.credit=VMM.Element.html(VMM.Element.find(this,"cite")));VMM.Element.find(this,"figcaption").length!=0&&(e.asset.caption=VMM.Element.html(VMM.Element.find(this,"figcaption")))}trace(e);b.timeline.date.push(e)}});VMM.fireEvent(global,"DATAREADY",b)},parseJSON:function(a){if(a.timeline.type=="default"){trace("DATA SOURCE: JSON STANDARD TIMELINE");VMM.fireEvent(global,"DATAREADY",a)}else if(a.timeline.type=="twitter"){trace("DATA SOURCE: JSON TWEETS");VMM.Timeline.DataObj.model_Tweets.buildData(a)}else{trace("DATA SOURCE: NO IDEA");trace(type.of(a.timeline))}},model_Tweets:{type:"twitter",buildData:function(a){VMM.bindEvent(global,VMM.Timeline.DataObj.model_Tweets.onTwitterDataReady,"TWEETSLOADED");VMM.ExternalAPI.twitter.getTweets(a.timeline.tweets)},getData:function(a){VMM.bindEvent(global,VMM.Timeline.DataObj.model_Tweets.onTwitterDataReady,"TWEETSLOADED");VMM.ExternalAPI.twitter.getTweetSearch(a)},onTwitterDataReady:function(a,b){var c=VMM.Timeline.DataObj.data_template_obj;for(var d=0;d<b.tweetdata.length;d++){var e={type:"tweets",startDate:"",headline:"",text:"",asset:{media:"",credit:"",caption:""},tags:"Optional"};e.startDate=b.tweetdata[d].raw.created_at;type.of(b.tweetdata[d].raw.from_user_name)?e.headline=b.tweetdata[d].raw.from_user_name+" (<a href='https://twitter.com/"+b.tweetdata[d].raw.from_user+"'>"+"@"+b.tweetdata[d].raw.from_user+"</a>)":e.headline=b.tweetdata[d].raw.user.name+" (<a href='https://twitter.com/"+b.tweetdata[d].raw.user.screen_name+"'>"+"@"+b.tweetdata[d].raw.user.screen_name+"</a>)";e.asset.media=b.tweetdata[d].content;c.timeline.date.push(e)}VMM.fireEvent(global,"DATAREADY",c)}},model_GoogleSpreadsheet:{type:"google spreadsheet",getData:function(
a){var b=VMM.Util.getUrlVars(a).key,c="https://spreadsheets.google.com/feeds/list/"+b+"/od6/public/values?alt=json";VMM.getJSON(c,VMM.Timeline.DataObj.model_GoogleSpreadsheet.buildData)},buildData:function(a){var b=VMM.Timeline.DataObj.data_template_obj;for(var c=0;c<a.feed.entry.length;c++){var d=a.feed.entry[c];if(d.gsx$titleslide.$t.match("start")){b.timeline.startDate=d.gsx$startdate.$t;b.timeline.headline=d.gsx$headline.$t;b.timeline.asset.media=d.gsx$media.$t;b.timeline.asset.caption=d.gsx$mediacaption.$t;b.timeline.asset.credit=d.gsx$mediacredit.$t;b.timeline.text=d.gsx$text.$t;b.timeline.type="google spreadsheet"}else{var e={type:"google spreadsheet",startDate:"",endDate:"",headline:"",text:"",type:"google spreadsheet",asset:{media:"",credit:"",caption:""},tags:"Optional"};e.endDate=d.gsx$enddate.$t;e.startDate=d.gsx$startdate.$t;e.headline=d.gsx$headline.$t;e.asset.media=d.gsx$media.$t;e.asset.caption=d.gsx$mediacaption.$t;e.asset.credit=d.gsx$mediacredit.$t;e.text=d.gsx$text.$t;b.timeline.date.push(e)}}VMM.fireEvent(global,"DATAREADY",b)}},data_template_obj:{timeline:{headline:"",description:"",asset:{media:"",credit:"",caption:""},date:[]}},date_obj:{startDate:"2012,2,2,11,30",headline:"",text:"",asset:{media:"http://youtu.be/vjVfu8-Wp6s",credit:"",caption:""},tags:"Optional"}});typeof VMM!="undefined"&&(VMM.Language={date:{month:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settebre","Ottobre","Novembre","Dicembre"],month_abbr:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],day:["Domenica","Lunedi","Martedi","Mercoledi","Giovedi","Venerdi","Sabato"],day_abbr:["Dom.","Lun.","Mar.","Mer.","Gio.","Ven.","Sab."]},dateformats:{year:"yyyy",month_short:"mmm",month:"mmmm yyyy",full_short:"d mmm",full:"d mmmm yyyy",time_no_seconds_short:"HH:MM",time_no_seconds_small_date:"HH:MM'<br/><small>'d mmmm yyyy'</small>'",full_long:"dddd',' d mmm yyyy 'um' HH:MM",full_long_small_date:"HH:MM'<br/><small>'dddd',' d mmm yyyy'</small>'"},messages:{loading_timeline:"Loading Timeline... ",return_to_title:"Return to Title",expand_timeline:"Expand Timeline",contract_timeline:"Contract Timeline"}});