","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},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'
'mmmm d',' yyyy''",full_long:"dddd',' mmm d',' yyyy 'at' hh:MM TT",full_long_small_date:"hh:MM TT'
'dddd',' mmm d',' yyyy''"},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)},parse:function(a){if(type.of(a)=="date")return a;var b=new Date(0,0,1,0,0,0,0),c,d;if(a.match(/,/gi)){c=a.split(",");for(var e=0;e
1&&b.setMonth(c[1]-1);c[2]>1&&b.setDate(c[2]);c[3]>1&&b.setHours(c[3]);c[4]>1&&b.setMinutes(c[4]);c[5]>1&&b.setSeconds(c[5]);c[6]>1&&b.setMilliseconds(c[6])}else if(a.match("/")){var f,g;if(a.match(" ")){f=a.split(" ");if(a.match(":")){d=f[1].split(":");d[0]>=1&&b.setHours(d[0]);d[1]>=1&&b.setMinutes(d[1]);d[2]>=1&&b.setSeconds(d[2]);d[3]>=1&&b.setMilliseconds(d[3])}c=f[0].split("/")}else c=a.split("/");c[2]&&b.setFullYear(c[2]);c[0]>1&&b.setMonth(c[0]-1);c[1]>1&&b.setDate(c[1])}else if(a.length<5){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},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$&").replace(e,"$1$2").replace(f,"$1")},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,"$3")}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$2$5$8$11$14$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$2").replace(i,"$1").replace(j,"$1").replace(k,"$1")},unlinkify:function(a){if(!a)return a;a=a.replace(/]*>/i,"");a=a.replace(/<\/a>/i,"");return a},nl2br:function(a){return a.replace(/(\r\n|[\r\n]|\\n|\\r)/g,"
")},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$&').replace(b,'$1$2').replace(c,'$1').replace(d
,"$1").replace(e,"$1")});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.length99?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=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'
'mmmm d',' yyyy''",full_long:"dddd',' mmm d',' yyyy 'at' hh:MM TT",full_long_small_date:"hh:MM TT'
'dddd',' mmm d',' yyyy''"},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,d){function u(a,b){m=b.timeline;type.of(m.era)!="array"&&(m.era=[]);K()}function v(){G()}function w(){I();h.setSize(o.feature.width,o.feature.height);i.setSize(o.width,o.height);J()}function x(a){o.loaded.slider=!0;y()}function y(a){o.loaded.percentloaded=o.loaded.percentloaded+25;o.loaded.slider&&o.loaded.timenav&&E()}function z(a){o.loaded.timenav=!0;y()}function A(a){i.setMarker(h.getCurrentNumber(),o.ease,o.duration)}function B(a){h.setSlide(i.getCurrentNumber())}var e,f,g,h,i,j,k,l={},m={},n=[],o={},p=!1,q=!1,r=!1;type.of(d)=="string"?k=d:k="#timeline";j="0.98.1";trace("TIMELINE VERSION "+j);o={id:k,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};if(a!=null&&a!=""){o.width=a;p=!0}if(b!=null&&b!=""){o.height=b;q=!0}var s=function(a){VMM.Timeline.Config=o;VMM.master_config.Timeline=VMM.Timeline.Config;if(typeof timeline_config=="object"){trace("HAS TIMELINE CONFIG");var b;for(b in _timeline_config)Object.prototype.hasOwnProperty.call(_timeline_config,b)&&(o[b]=_timeline_config[b])}else if(typeof a=="object"){var b;for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&(o[b]=a[b])}o.nav={width:o.width,height:200};o.feature={width:o.width,height:o.height-o.nav.height};VMM.Browser.device!="mobile"},t=function(a,b){e=VMM.getElement(k);VMM.Element.addClass(k,"vmm-timeline");f=VMM.appendAndGetElement(e,"","feedback","");g=VMM.appendAndGetElement(f,"
","messege","Timeline");h=new VMM.Slider(k+" div.slider",o);i=new VMM.Timeline.TimeNav(k+" div.navigation",720,400,!0);p?VMM.Element.width(e,o.width):o.width=VMM.Element.width(e);q?VMM.Element.height(e,o.height):o.height=VMM.Element.height(e)};this.init=function(c,d,h){type.of(d)=="string"&&(d.match("#")?k=d:k="#"+d);s(h);t(a,b);trace("TIMELINE INIT");VMM.Util.date.setLanguage(VMM.Timeline.Config.language);f=VMM.appendAndGetElement(e,"
","feedback","");g=VMM.appendAndGetElement(f,"
","messege",VMM.Timeline.Config.language.messages.loading_timeline);VMM.bindEvent(global,u,"DATAREADY");VMM.bindEvent(global,D,"MESSEGE");if(VMM.Browser.browser=="MSIE"&&parseInt(VMM.Browser.version,10)==7){r=!0;VMM.fireEvent(global,"MESSEGE","Internet Explorer 7 is not supported by #Timeline.")}else type.of(c)=="string"||type.of(c)=="object"?VMM.Timeline.DataObj.getData(c):VMM.Timeline.DataObj.getData(VMM.getElement(k))};this.iframeLoaded=function(){trace("iframeLoaded")};var C=function(a){VMM.getJSON(a,function(a){m=VMM.Timeline.DataObj.getData(a);VMM.fireEvent(global,"DATAREADY")})},D=function(a,b){trace("showMessege "+b);VMM.attachElement(g,b)},E=function(){VMM.Element.animate(f,o.duration,o.ease*4,{opacity:0},F)},F=function(){VMM.Element.detach(f)},G=function(){VMM.attachElement(e,"");VMM.appendElement(e,"
");w();VMM.bindEvent("div.slider",x,"LOADED");VMM.bindEvent("div.navigation",z,"LOADED");VMM.bindEvent("div.slider",A,"UPDATE");VMM.bindEvent("div.navigation",B,"UPDATE");h.init(n);i.init(n,m.era);VMM.bindEvent(global,w,"resize")},H=function(a,b){I();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,o.feature.width,o.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},I=function(){trace("UPDATE SIZE");o.width=VMM.Element.width(e);o.height=VMM.Element.height(e);o.nav.width=o.width;o.feature.width=o.width;VMM.Browser.device!="mobile";o.feature.height=o.height-o.nav.height-3},J=function(){!(o.width<=480)},K=function(){I();VMM.fireEvent(global,"MESSEGE","Building Dates");for(var a=0;a
J.min_multiplier){J.multiplier<=1?J.multiplier=J.multiplier-.25:J.multiplier>5?J.multiplier>16?J.multiplier=Math.round(J.multiplier-10):J.multiplier=Math.round(J.multiplier-4):J.multiplier=Math.round(J.multiplier-1);J.multiplier<=0&&(J.multiplier=J.min_multiplier);eb()}}function O(){VMM.DragSlider.cancelSlide();if(J.multiplier4?J.multiplier>16?J.multiplier=Math.round(J.multiplier+10):J.multiplier=Math.round(J.multiplier+4):J.multiplier=Math.round(J.multiplier+1);J.multiplier>=J.max_multiplier&&(J.multiplier=J.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(w,b.time/2,J.ease,{left:b.left})}trace("VMM.Timeline.TimeNav");var d={},e={},f={},g=a,h=[],i=[],j=[],k=[],l=[],m,n,o=0,p=!1,q={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},r={day:864e5,week:7,month:30.4166666667,year:12,hour:24,minute:1440,second:86400,decade:10,century:100,millenium:1e3},s={type:"year",number:10,first:1970,last:2011,multiplier:100},t={type:"year",number:10,first:1970,last:2011,multiplier:100},u={type:"year",number:10,first:1970,last:2011,multiplier:100},v={day:{},month:{},year:{},hour:{},minute:{},second:{},decade:{},century:{},millenium:{},week:{}},w,x,y,z,A,B,C,D,E,F,G,H,I,J=VMM.Timeline.Config;J.something=0;J.nav_width=100;J.nav_height=200;J.timeline=!1;J.marker_width=150;J.marker_height=48;J.density=1;J.timeline_width=900;J.interval_width=200;J.rows=[1,1,1];J.multiplier=6;J.max_multiplier=50;J.min_multiplier=.1;J.has_start_page=!1;J.rows=[J.marker_height,J.marker_height*2,1];b!=null&&b!=""&&(J.width=b);c!=null&&c!=""&&(J.height=c);f.nextBtn;f.prevBtn;f.nextDate;f.prevDate;f.nextTitle;f.prevTitle;this.ver="0.1";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"){h=a;m=b;db()}else trace("NO DATA")};this.setSize=function(a,b){a!=null&&(J.width=a);b!=null&&(J.height=b);p&&L()};this.setMarker=function(a,b,c,d){cb(a,b,c)};this.getCurrentNumber=function(){return o};var T=function(){var a=2,b=0,c=0;for(var d=0;d","marker");g=VMM.appendAndGetElement(f,"","flag");k=VMM.appendAndGetElement(g,"
","flag-content");l=VMM.appendAndGetElement(f,"
","dot");n=VMM.appendAndGetElement(f,"
","line");o=VMM.appendAndGetElement(n,"
","event-line");h[d].asset!=null&&h[d].asset!=""&&VMM.appendElement(k,VMM.MediaElement.thumbnail(h[d].asset,32,32));VMM.appendElement(k,"
"+VMM.Util.unlinkify(h[d].title)+"
"+h[d].date+"
");VMM.Element.attr(f,"id",h[d].uniqueid.toString());VMM.bindEvent(g,Q,"",{number:d});VMM.bindEvent(g,R,"mouseenter mouseleave",{number:d,elem:g});var p={marker:f,flag:g,lineevent:o,type:"marker"};if(h[d].type=="start"){trace("BUILD MARKER HAS START PAGE");J.has_start_page=!0;p.type="start"}j.push(p)}for(var q=0;q
","era");VMM.Element.attr(r.content,"id",r.uniqueid);VMM.Element.css(r.content,"background",r.color);VMM.appendElement(r.content,""+VMM.Util.unlinkify(r.title)+"
");r.startdate=VMM.Util.parseDate(m[q].startDate);r.enddate=VMM.Util.parseDate(m[q].endDate);i.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-s.base)*(J.interval_width/J.multiplier);_pos_end=(i-s.base)*(J.interval_width/J.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-s.base)*(J.interval_width/J.multiplier);_pos_end=_pos}return pos={begin:_pos,end:_pos_end}},V=function(){var a=0,b=0,c=0,d=[];for(var e=0;e1&&(J.multiplier=J.multiplier-1)},Y=function(a){var b=s.type,c=s.multiplier,d=2,e=0,f=0,g=150,k=6,l=0;VMM.Element.removeClass(".flag","row1");VMM.Element.removeClass(".flag","row2");VMM.Element.removeClass(".flag","row3");for(var m=0;m5){VMM.Element.css(r,"height",k);VMM.Element.css(r,"width",n);VMM.Element.css(r,"top",g)}if(z-e16&&c?n=!1:m-f<65&&(m-f<35?h%4==0?m==0&&(n=!1):n=!1:VMM.Util.isEven(h)||(n=!1));if(k){if(!n){VMM.Element.animate(i,J.duration*2,J.ease,{opacity:0});a[h].interval_visible=!1}}else if(n){VMM.Element.animate(i,J.duration*2,J.ease,{opacity:100});a[h].interval_visible=!0}f=m}var o=50,p=f+o*6;VMM.Element.width(F,p)},ab=function(){VMM.attachElement(A,"");VMM.attachElement(B,"");s.date=new Date(h[0].startdate.getFullYear(),0,1,0,0,0);t.date=new Date(h[0].startdate.getFullYear(),0,1,0,0,0);u.date=new Date(h[0].startdate.getFullYear(),0,1,0,0,0);var a=0,b=0,c=!0,d=0,e=0,f=0;for(var g=0;g","_idd"),o=!1;VMM.appendElement(n,i);VMM.Element.css(n,"text-indent",-(VMM.Element.width(n)/2));VMM.Element.css(n,"opacity","0");e=m;var p=new Date(s.date),q={interval_element:n,interval_date:p,interval_visible:o,type:"interval"};k.push(q)}c=!0;_major_first_pos=0;_major_last_pos=0;for(var g=0;g","major");VMM.appendElement(_interval_major_element,i);VMM.Element.css(_interval_major_element,"text-indent",-(VMM.Element.width(_interval_major_element)/2));c&&(_major_first_pos=m);c=!1;f=m;_major_last_pos=m;var r=new Date(t.date),v={interval_element:_interval_major_element,interval_date:r,interval_visible:!0,type:"interval major"};l.push(v)}VMM.Element.width(x,s.number*(J.interval_width/J.multiplier));_minor_pos_offset=50;var w=_major_last_pos-_major_first_pos+_minor_pos_offset*6,y=e+_minor_pos_offset*6;wh.length/J.density){s=v.millenium;t=v.millenium;u=v.millenium}else if(e.centuries>h.length/J.density){s=Math.ceil(v.century);t=v.millenium;u=v.decade}else if(e.decades>h.length/J.density){s=v.decade;t=Math.ceil(v.century);u=v.year}else if(e.years>h.length/J.density){s=v.year;t=v.decade;u=v.month}else if(e.months>h.length/J.density){s=v.month;t=v.year;u=v.day}else if(e.days>h.length/J.density){s=v.day;t=v.month;u=v.hour}else if(e.hours>h.length/J.density){s=v.hour;t=v.day;u=v.minute}else if(e.minutes>h.length/J.density){s=v.minute;t=v.hour;u=v.second}else if(e.seconds>h.length/J.density){s=v.second;t=v.minute;u=v.second}else{trace("NO IDEA WHAT THE TYPE SHOULD BE");s=v.day;t=v.month;u=v.hour}trace(s.type);trace(t.type);trace();F=VMM.appendAndGetElement(z,"","minor")},cb=function(a,b,c,d,e){o=a;var f=J.ease,g=J.duration,h=!1,i=!1;o==0&&(i=!0);o+1==j.length&&(h=!0);b!=null&&b!=""&&(f=b);c!=null&&c!=""&&(g=c);var k=VMM.Element.position(j[o].marker);for(var l=0;l
","timenav");x=VMM.appendAndGetElement(w,"","content");y=VMM.appendAndGetElement(w,"
","time");z=VMM.appendAndGetElement(y,"
","time-interval-minor");B=VMM.appendAndGetElement(y,"
","time-interval-major");A=VMM.appendAndGetElement(y,"
","time-interval");C=VMM.appendAndGetElement(g,"
","timenav-background");E=VMM.appendAndGetElement(C,"
","timenav-line");D=VMM.appendAndGetElement(C,"
","timenav-interval-background","
");bb();T();X();Y();ab();L(!0);VMM.fireEvent(g,"LOADED");G=VMM.appendAndGetElement(g,"
","toolbar");if(J.has_start_page){$backhome=VMM.appendAndGetElement(G,"
","back-home","
");VMM.bindEvent(".back-home",P,"click");VMM.Element.css(G,"top",27);VMM.Element.attribute($backhome,"title",VMM.Timeline.Config.language.messages.return_to_title);VMM.Element.attribute($backhome,"rel","tooltip")}H=VMM.appendAndGetElement(G,"
","zoom-in","
");I=VMM.appendAndGetElement(G,"
","zoom-out","
");VMM.Element.attribute(H,"title",VMM.Timeline.Config.language.messages.expand_timeline);VMM.Element.attribute(H,"rel","tooltip");VMM.Element.attribute(I,"title",VMM.Timeline.Config.language.messages.contract_timeline);VMM.Element.attribute(I,"rel","tooltip");VMM.bindEvent(".zoom-in",N,"click");VMM.bindEvent(".zoom-out",O,"click");G.tooltip({selector:"div[rel=tooltip]",placement:"right"});if(VMM.Browser.device=="mobile"||VMM.Browser.device=="tablet"){VMM.TouchSlider.createPanel(C,w,J.width,J.spacing,!1);VMM.bindEvent(w,S,"TOUCHUPDATE")}else VMM.DragSlider.createPanel(g,w,J.width,J.spacing,!1);p=!0},eb=function(){trace("config.multiplier "+J.multiplier);Y(!0);_(k,!0,!0);_(l,!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)=="object"){trace("DATA SOURCE: JSON OBJECT");VMM.Timeline.DataObj.parseJSON(a)}else if(type.of(a)=="string")if(a.match("%23")){trace("DATA SOURCE: TWITTER SEARCH");VMM.Timeline.DataObj.model_Tweets.getData("%23medill")}else if(a.match("spreadsheet")){VMM.fireEvent(global,"MESSEGE","Loading Data");trace("DATA SOURCE: GOOGLE SPREADSHEET");VMM.Timeline.DataObj.model_GoogleSpreadsheet.getData(a)}else{VMM.fireEvent(global,"MESSEGE","Loading Data");trace("DATA SOURCE: JSON");VMM.getJSON(a,VMM.Timeline.DataObj.parseJSON)}else if(type.of(a)=="html"){trace("DATA SOURCE: HTML");VMM.Timeline.DataObj.parseHTML(a)}else trace("DATA SOURCE: UNKNOWN")},parseHTML:function(a){trace("parseHTML");trace("WARNING: THIS IS STILL ALPHA AND WILL NOT WORK WITH ID's other than #timeline");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: UNKNOWN JSON");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[d].raw.from_user+")":e.headline=b.tweetdata[d].raw.user.name+" ("+"@"+b.tweetdata[d].raw.user.screen_name+")";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){VMM.fireEvent(global,"MESSEGE","Parsing Data");var b=VMM.Timeline.DataObj.data_template_obj;for(var c=0;c'd mmmm yyyy''",full_long:"dddd',' d mmm yyyy 'um' HH:MM",full_long_small_date:"HH:MM'
'dddd',' d mmm yyyy''"},messages:{loading_timeline:"Chargement de la frise en cours... ",return_to_title:"Retour à la page d'accueil",expand_timeline:"Elargir la frise",contract_timeline:"Réduire la frise"}});