/ * !
TimelineJS
Version 1.71
Designed and built by Zach Wise at VéritéCo
This program is free software : you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
http : //www.gnu.org/licenses/
* //***********************************************
Begin VMM . StoryJS . License . js
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //*!
StoryJS
Designed and built by Zach Wise at VéritéCo
This Source Code Form is subject to the terms of the Mozilla Public
License , v . 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at http : //mozilla.org/MPL/2.0/.
* //***********************************************
Begin VMM . js
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //**
* VéritéCo JS Core
* Designed and built by Zach Wise at VéritéCo zach @ verite . co
* This Source Code Form is subject to the terms of the Mozilla Public
* License , v . 2.0 . If a copy of the MPL was not distributed with this
* file , You can obtain one at http : //mozilla.org/MPL/2.0/.
* //* Simple JavaScript Inheritance
By John Resig http : //ejohn.org/
MIT Licensed .
=== === === === === === === === === === === === === === === === == * / f u n c t i o n t r a c e ( e ) { V M M . d e b u g & & ( w i n d o w . c o n s o l e ? c o n s o l e . l o g ( e ) : t y p e o f j s T r a c e ! = " u n d e f i n e d " & & j s T r a c e . s e n d ( e ) ) } f u n c t i o n o n Y o u T u b e P l a y e r A P I R e a d y ( ) { t r a c e ( " G L O B A L Y O U T U B E A P I C A L L E D " ) ; V M M . E x t e r n a l A P I . y o u t u b e . o n A P I R e a d y ( ) } ( f u n c t i o n ( ) { v a r e = ! 1 , t = / x y z / . t e s t ( f u n c t i o n ( ) { x y z } ) ? / \ b _ s u p e r \ b / : / . * / ; t h i s . C l a s s = f u n c t i o n ( ) { } ; C l a s s . e x t e n d = f u n c t i o n ( n ) { f u n c t i o n o ( ) { ! e & & t h i s . i n i t & & t h i s . i n i t . a p p l y ( t h i s , a r g u m e n t s ) } v a r r = t h i s . p r o t o t y p e ; e = ! 0 ; v a r i = n e w t h i s ; e = ! 1 ; f o r ( v a r s i n n ) i [ s ] = t y p e o f n [ s ] = = " f u n c t i o n " & & t y p e o f r [ s ] = = " f u n c t i o n " & & t . t e s t ( n [ s ] ) ? f u n c t i o n ( e , t ) { r e t u r n f u n c t i o n ( ) { v a r n = t h i s . _ s u p e r ; t h i s . _ s u p e r = r [ e ] ; v a r i = t . a p p l y ( t h i s , a r g u m e n t s ) ; t h i s . _ s u p e r = n ; r e t u r n i } } ( s , n [ s ] ) : n [ s ] ; o . p r o t o t y p e = i ; o . p r o t o t y p e . c o n s t r u c t o r = o ; o . e x t e n d = a r g u m e n t s . c a l l e e ; r e t u r n o } } ) ( ) ; v a r g l o b a l = f u n c t i o n ( ) { r e t u r n t h i s | | ( 1 , e v a l ) ( " t h i s " ) } ( ) ; i f ( t y p e o f V M M = = " u n d e f i n e d " ) { v a r V M M = C l a s s . e x t e n d ( { } ) ; V M M . d e b u g = ! 0 ; V M M . m a s t e r _ c o n f i g = { i n i t : f u n c t i o n ( ) { r e t u r n t h i s } , s i z e s : { a p i : { w i d t h : 0 , h e i g h t : 0 } } , v p : " P e l l e n t e s q u e n i b h f e l i s , e l e i f e n d i d , c o m m o d o i n , i n t e r d u m v i t a e , l e o " , a p i _ k e y s _ m a s t e r : { f l i c k r : " R A I v x H Y 4 h E / E l m 5 c i e h 4 X 5 p t M y D p j 7 M Y I x z i G x i 0 W G C c y 1 s + y r 7 r K Q = = " , g o o g l e : " u Q K a d H 1 V M l C s p 5 6 0 g N 2 a O i M z 4 e v W k l 1 s 3 4 y r y l 3 F / 9 F J O s n + / 9 4 8 C b B U v K L N 4 6 U = " , t w i t t e r : " " } , t i m e r s : { a p i : 7 e 3 } , a p i : { p u s h q u e s : [ ] } , t w i t t e r : { a c t i v e : ! 1 , a r r a y : [ ] , a p i _ l o a d e d : ! 1 , q u e : [ ] } , f l i c k r : { a c t i v e : ! 1 , a r r a y : [ ] , a p i _ l o a d e d : ! 1 , q u e : [ ] } , y o u t u b e : { a c t i v e : ! 1 , a r r a y : [ ] , a p i _ l o a d e d : ! 1 , q u e : [ ] } , v i m e o : { a c t i v e : ! 1 , a r r a y : [ ] , a p i _ l o a d e d : ! 1 , q u e : [ ] } , g o o g l e m a p s : { a c t i v e : ! 1 , m a p _ a c t i v e : ! 1 , p l a c e s _ a c t i v e : ! 1 , a r r a y : [ ] , a p i _ l o a d e d : ! 1 , q u e : [ ] } , g o o g l e d o c s : { a c t i v e : ! 1 , a r r a y : [ ] , a p i _ l o a d e d : ! 1 , q u e : [ ] } , g o o g l e p l u s : { a c t i v e : ! 1 , a r r a y : [ ] , a p i _ l o a d e d : ! 1 , q u e : [ ] } , w i k i p e d i a : { a c t i v e : ! 1 , a r r a y : [ ] , a p i _ l o a d e d : ! 1 , q u e : [ ] , t r i e s : 0 } , s o u n d c l o u d : { a c t i v e : ! 1 , a r r a y : [ ] , a p i _ l o a d e d : ! 1 , q u e : [ ] } } . i n i t ( ) ; V M M . c r e a t e E l e m e n t = f u n c t i o n ( e , t , n , r , i ) { v a r s = " " ; i f ( e ! = n u l l & & e ! = " " ) { s + = " < " + e ; n ! = n u l l & & n ! = " " & & ( s + = " c l a s s = ' " + n + " ' " ) ; r ! = n u l l & & r ! = " " & & ( s + = " " + r ) ; i ! = n u l l & & i ! = " " & & ( s + = " s t y l e = ' " + i + " ' " ) ; s + = " > " ; t ! = n u l l & & t ! = " " & & ( s + = t ) ; s = s + " < / " + e + " > " } r e t u r n s } ; V M M . c r e a t e M e d i a E l e m e n t = f u n c t i o n ( e , t , n ) { v a r r = " " , i = ! 1 ; r + = " < d i v c l a s s = ' m e d i a ' > " ; i f ( e ! = n u l l & & e ! = " " ) { v a l i d = ! 0 ; r + = " < i m g s r c = ' " + e + " ' > " ; n ! = n u l l & & n ! = " " & & ( r + = V M M . c r e a t e E l e m e n t ( " d i v " , n , " c r e d i t " ) ) ; t ! = n u l l & & t ! = " " & & ( r + = V M M . c r e a t e E l e m e n t ( " d i v " , t , " c a p t i o n " ) ) } r + = " < / d i v > " ; r e t u r n r } ; V M M . h i d e U r l B a r = f u n c t i o n ( ) { v a r e = w i n d o w , t = e . d o c u m e n t ; i f ( ! l o c a t i o n . h a s h | | ! e . a d d E v e n t L i s t e n e r ) { w i n d o w . s c r o l l T o ( 0 , 1 ) ; v a r n = 1 , r = s e t I n t e r v a l ( f u n c t i o n ( ) { i f ( t . b o d y ) { c l e a r I n t e r v a l ( r ) ; n = " s c r o l l T o p " i n t . b o d y ? t . b o d y . s c r o l l T o p : 1 ; e . s c r o l l T o ( 0 , n = = = 1 ? 0 : 1 ) } } , 1 5 ) ; e . a d d E v e n t L i s t e n e r ( " l o a d " , f u n c t i o n ( ) { s e t T i m e o u t ( f u n c t i o n ( ) { e . s c r o l l T o ( 0 , n = = = 1 ? 0 : 1 ) } , 0 ) } , ! 1 ) } } } A r r a y . p r o t o t y p e . r e m o v e = f u n c t i o n ( e , t ) { v a r n = t h i s . s l i c e ( ( t | | e ) + 1 | | t h i s . l e n g t h ) ; t h i s . l e n g t h = e < 0 ? t h i s . l e n g t h + e : e ; r e t u r n t h i s . p u s h . a p p l y ( t h i s , n ) } ; D a t e . p r o t o t y p e . g e t W e e k = f u n c t i o n ( ) { v a r e = n e w D a t e ( t h i s . g e t F u l l Y e a r ( ) , 0 , 1 ) ; r e t u r n M a t h . c e i l ( ( ( t h i s - e ) / 8 6 4 e 5 + e . g e t D a y ( ) + 1 ) / 7 ) } ; D a t e . p r o t o t y p e . g e t D a y O f Y e a r = f u n c t i o n ( ) { v a r e = n e w D a t e ( t h i s . g e t F u l l Y e a r ( ) , 0 , 1 ) ; r e t u r n M a t h . c e i l ( ( t h i s - e ) / 8 6 4 e 5 ) } ; v a r i s = { N u l l : f u n c t i o n ( e ) { r e t u r n e = = = n u l l } , U n d e f i n e d : f u n c t i o n ( e ) { r e t u r n e = = = u n d e f i n e d } , n t : f u n c t i o n ( e ) { r e t u r n e = = = n u l l | | e = = = u n d e f i n e d } , F u n c t i o n : f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " f u n c t i o n " ? e . c o n s t r u c t o r . t o S t r i n g ( ) . m a t c h ( / F u n c t i o n / ) ! = = n u l l : ! 1 } , S t r i n g : f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " s t r i n g " ? ! 0 : t y p e o f e = = " o b j e c t " ? e . c o n s t r u c t o r . t o S t r i n g ( ) . m a t c h ( / s t r i n g / i ) ! = = n u l l : ! 1 } , A r r a y : f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " o b j e c t " ? e . c o n s t r u c t o r . t o S t r i n g ( ) . m a t c h ( / a r r a y / i ) ! = = n u l l | | e . l e n g t h ! = = u n d e f i n e d : ! 1 } , B o o l e a n : f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " b o o l e a n " ? ! 0 : t y p e o f e = = " o b j e c t " ? e . c o n s t r u c t o r . t o S t r i n g ( ) . m a t c h ( / b o o l e a n / i ) ! = = n u l l : ! 1 } , D a t e : f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " d a t e " ? ! 0 : t y p e o f e = = " o b j e c t " ? e . c o n s t r u c t o r . t o S t r i n g ( ) . m a t c h ( / d a t e / i ) ! = = n u l l : ! 1 } , H T M L : f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " o b j e c t " ? e . c o n s t r u c t o r . t o S t r i n g ( ) . m a t c h ( / h t m l / i ) ! = = n u l l : ! 1 } , N u m b e r : f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " n u m b e r " ? ! 0 : t y p e o f e = = " o b j e c t " ? e . c o n s t r u c t o r . t o S t r i n g ( ) . m a t c h ( / N u m b e r / ) ! = = n u l l : ! 1 } , O b j e c t : f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " o b j e c t " ? e . c o n s t r u c t o r . t o S t r i n g ( ) . m a t c h ( / o b j e c t / i ) ! = = n u l l : ! 1 } , R e g E x p : f u n c t i o n ( e ) { r e t u r n t y p e o f e = = " f u n c t i o n " ? e . c o n s t r u c t o r . t o S t r i n g ( ) . m a t c h ( / r e g
VMM . ExternalAPI . twitter . pushQue ( ) ; VMM . master _config . flickr . active && VMM . ExternalAPI . flickr . pushQue ( ) } , twitter : { tweetArray : [ ] , get : function ( e ) { var t = { mid : e . id , id : e . uid } ; VMM . master _config . twitter . que . push ( t ) ; VMM . master _config . twitter . active = ! 0 } , create : function ( e , t ) { var n = e . mid . toString ( ) , r = { twitterid : e . mid } , i = "http://api.twitter.com/1/statuses/show.json?id=" + e . mid + "&include_entities=true&callback=?" , s = setTimeout ( VMM . ExternalAPI . twitter . errorTimeOut , VMM . master _config . timers . api , e ) , o = setTimeout ( t , VMM . master _config . timers . api , e ) ; VMM . getJSON ( i , function ( t ) { var n = t . id _str , r = "<blockquote><p>" , i = VMM . Util . linkify _with _twitter ( t . text , "_blank" ) ; r += i ; r += "</p></blockquote>" ; typeof t . entities . media != "undefined" && t . entities . media [ 0 ] . type == "photo" ; r += "<div class='vcard author'>" ; r += "<a class='screen-name url' href='https://twitter.com/" + t . user . screen _name + "' data-screen-name='" + t . user . screen _name + "' target='_blank'>" ; r += "<span class='avatar'><img src=' " + t . user . profile _image _url + "' alt=''></span>" ; r += "<span class='fn'>" + t . user . name + "</span>" ; r += "<span class='nickname'>@" + t . user . screen _name + "<span class='thumbnail-inline'></span></span>" ; r += "</a>" ; r += "</div>" ; VMM . attachElement ( "#" + e . id . toString ( ) , r ) ; VMM . attachElement ( "#text_thumb_" + e . id . toString ( ) , t . text ) ; VMM . attachElement ( "#marker_content_" + e . id . toString ( ) , t . text ) } ) . error ( function ( t , n , r ) { trace ( "TWITTER error" ) ; trace ( "TWITTER ERROR: " + n + " " + t . responseText ) ; VMM . attachElement ( "#" + e . id , VMM . MediaElement . loadingmessage ( "ERROR LOADING TWEET " + e . mid ) ) } ) . success ( function ( e ) { clearTimeout ( s ) ; clearTimeout ( o ) ; t ( ) } ) } , errorTimeOut : function ( e ) { trace ( "TWITTER JSON ERROR TIMEOUT " + e . mid ) ; VMM . attachElement ( "#" + e . id . toString ( ) , VMM . MediaElement . loadingmessage ( "Still waiting on Twitter: " + e . mid ) ) ; VMM . getJSON ( "http://api.twitter.com/1/account/rate_limit_status.json" , function ( t ) { trace ( "REMAINING TWITTER API CALLS " + t . remaining _hits ) ; trace ( "TWITTER RATE LIMIT WILL RESET AT " + t . reset _time ) ; var n = "" ; if ( t . remaining _hits == 0 ) { n = "<p>You've reached the maximum number of tweets you can load in an hour.</p>" ; n += "<p>You can view tweets again starting at: <br/>" + t . reset _time + "</p>" } else n = "<p>Still waiting on Twitter. " + e . mid + "</p>" ; VMM . attachElement ( "#" + e . id . toString ( ) , VMM . MediaElement . loadingmessage ( n ) ) } ) } , pushQue : function ( ) { if ( VMM . master _config . twitter . que . length > 0 ) { VMM . ExternalAPI . twitter . create ( VMM . master _config . twitter . que [ 0 ] , VMM . ExternalAPI . twitter . pushQue ) ; VMM . master _config . twitter . que . remove ( 0 ) } } , getHTML : function ( e ) { var t = "http://api.twitter.com/1/statuses/oembed.json?id=" + e + "&callback=?" ; VMM . getJSON ( t , VMM . ExternalAPI . twitter . onJSONLoaded ) } , onJSONLoaded : function ( e ) { trace ( "TWITTER JSON LOADED" ) ; var t = e . id ; VMM . attachElement ( "#" + t , VMM . Util . linkify _with _twitter ( e . html ) ) } , parseTwitterDate : function ( e ) { var t = new Date ( Date . parse ( e ) ) ; return t } , prettyParseTwitterDate : function ( e ) { var t = new Date ( Date . parse ( e ) ) ; return VMM . Date . prettyDate ( t , ! 0 ) } , getTweets : function ( e ) { var t = [ ] , n = e . length ; for ( var r = 0 ; r < e . length ; r ++ ) { var i = "" ; e [ r ] . tweet . match ( "status/" ) ? i = e [ r ] . tweet . split ( "status/" ) [ 1 ] : e [ r ] . tweet . match ( "statuses/" ) ? i = e [ r ] . tweet . split ( "statuses/" ) [ 1 ] : i = "" ; var s = "http://api.twitter.com/1/statuses/show.json?id=" + i + "&include_entities=true&callback=?" ; VMM . getJSON ( s , function ( e ) { var r = { } , i = "<div class='twitter'><blockquote><p>" , s = VMM . Util . linkify _with _twitter ( e . text , "_blank" ) ; i += s ; i += "</p>" ; i += "— " + e . user . name + " (<a href='https://twitter.com/" + e . user . screen _name + "'>@" + e . user . screen _name + "</a>) <a href='https://twitter.com/" + e . user . screen _name + "/status/" + e . id + "'>" + VMM . ExternalAPI . twitter . prettyParseTwitterDate ( e . created _at ) + " </a></blockquote></div>" ; r . content = i ; r . raw = e ; t . push ( r ) ; if ( t . length == n ) { var o = { tweetdata : t } ; VMM . fireEvent ( global , "TWEETSLOADED" , o ) } } ) . success ( function ( ) { trace ( "second success" ) } ) . error ( function ( ) { trace ( "error" ) } ) . complete ( function ( ) { trace ( "complete" ) } ) } } , getTweetSearch : function ( e , t ) { var n = 40 ; t != null && t != "" && ( n = t ) ; var r = "http://search.twitter.com/search.json?q=" + e + "&rpp=" + n + "&include_entities=true&result_type=mixed" , i = [ ] ; VMM . getJSON ( r , function ( e ) { for ( var t = 0 ; t < e . results . length ; t ++ ) { var n = { } , r = " < div class = 'twitter' > < bl
: 0 , end : 0 } , left : { start : 0 , end : 0 } , time : { start : 0 , end : 0 } , touch : ! 1 , ease : "easeOutExpo" } , t = { down : "mousedown" , up : "mouseup" , leave : "mouseleave" , move : "mousemove" } , n = { down : "mousedown" , up : "mouseup" , leave : "mouseleave" , move : "mousemove" } , r = { down : "touchstart" , up : "touchend" , leave : "mouseleave" , move : "touchmove" } ; this . createPanel = function ( s , o , u , a ) { e . element = s ; e . element _move = o ; u != null && u != "" ? e . constraint = u : e . constraint = ! 1 ; a ? e . touch = a : e . touch = ! 1 ; trace ( "TOUCH" + e . touch ) ; e . touch ? t = r : t = n ; i ( e . element , e . element _move ) } ; this . updateConstraint = function ( t ) { trace ( "updateConstraint" ) ; e . constraint = t } ; var i = function ( e , n ) { VMM . bindEvent ( e , o , t . down , { element : n , delement : e } ) ; VMM . bindEvent ( e , u , t . up , { element : n , delement : e } ) ; VMM . bindEvent ( e , s , t . leave , { element : n , delement : e } ) } ; this . cancelSlide = function ( n ) { VMM . unbindEvent ( e . element , a , t . move ) ; return ! 0 } ; var s = function ( n ) { VMM . unbindEvent ( n . data . delement , a , t . move ) ; e . touch || n . preventDefault ( ) ; n . stopPropagation ( ) ; if ( e . sliding ) { e . sliding = ! 1 ; l ( n . data . element , n . data . delement , n ) ; return ! 1 } return ! 0 } , o = function ( t ) { f ( t . data . element , t . data . delement , t ) ; e . touch || t . preventDefault ( ) ; t . stopPropagation ( ) ; return ! 0 } , u = function ( t ) { e . touch || t . preventDefault ( ) ; t . stopPropagation ( ) ; if ( e . sliding ) { e . sliding = ! 1 ; l ( t . data . element , t . data . delement , t ) ; return ! 1 } return ! 0 } , a = function ( e ) { c ( e . data . element , e ) ; e . preventDefault ( ) ; e . stopPropagation ( ) ; return ! 1 } , f = function ( n , r , i ) { if ( e . touch ) { trace ( "IS TOUCH" ) ; VMM . Lib . css ( n , "-webkit-transition-duration" , "0" ) ; e . pagex . start = i . originalEvent . touches [ 0 ] . screenX } else e . pagex . start = i . pageX ; e . left . start = p ( n ) ; e . time . start = ( new Date ) . getTime ( ) ; VMM . Lib . stop ( n ) ; VMM . bindEvent ( r , a , t . move , { element : n } ) } , l = function ( e , n , r ) { VMM . unbindEvent ( n , a , t . move ) ; h ( e , r ) } , c = function ( t , n ) { e . sliding = ! 0 ; e . touch ? e . pagex . end = n . originalEvent . touches [ 0 ] . screenX : e . pagex . end = n . pageX ; e . left . end = p ( t ) ; VMM . Lib . css ( t , "left" , - ( e . pagex . start - e . pagex . end - e . left . start ) ) } , h = function ( t , n ) { var r = { left : e . left . end , left _adjust : 0 , change : { x : 0 } , time : ( ( new Date ) . getTime ( ) - e . time . start ) * 10 , time _adjust : ( ( new Date ) . getTime ( ) - e . time . start ) * 10 } , i = 3e3 ; e . touch && ( i = 6e3 ) ; r . change . x = i * ( Math . abs ( e . pagex . end ) - Math . abs ( e . pagex . start ) ) ; r . left _adjust = Math . round ( r . change . x / r . time ) ; r . left = Math . min ( r . left + r . left _adjust ) ; if ( e . constraint ) if ( r . left > e . constraint . left ) { r . left = e . constraint . left ; r . time > 5e3 && ( r . time = 5e3 ) } else if ( r . left < e . constraint . right ) { r . left = e . constraint . right ; r . time > 5e3 && ( r . time = 5e3 ) } VMM . fireEvent ( t , "DRAGUPDATE" , [ r ] ) ; r . time > 0 && ( e . touch ? VMM . Lib . animate ( t , r . time , "easeOutCirc" , { left : r . left } ) : VMM . Lib . animate ( t , r . time , e . ease , { left : r . left } ) ) } , p = function ( e ) { return parseInt ( VMM . Lib . css ( e , "left" ) . substring ( 0 , VMM . Lib . css ( e , "left" ) . length - 2 ) , 10 ) } } ) ; typeof VMM != "undefined" && typeof VMM . Slider == "undefined" && ( VMM . Slider = function ( e , t ) { function w ( ) { trace ( "onConfigSet" ) } function E ( e , t ) { var r = ! 0 , i = ! 1 ; e != null && ( r = e ) ; t != null && ( i = t ) ; d = n . slider . width ; n . slider . nav . height = VMM . Lib . height ( b . prevBtnContainer ) ; n . slider . content . width = d - n . slider . content . padding * 2 ; VMM . Lib . width ( u , l . length * n . slider . content . width ) ; i && VMM . Lib . css ( o , "left" , l [ p ] . leftpos ( ) ) ; _ ( ) ; D ( ) ; VMM . Lib . css ( b . nextBtn , "left" , d - n . slider . nav . width ) ; VMM . Lib . height ( b . prevBtn , n . slider . height ) ; VMM . Lib . height ( b . nextBtn , n . slider . height ) ; VMM . Lib . css ( b . nextBtnContainer , "top" , n . slider . height / 2 - n . slider . nav . height / 2 + 10 ) ; VMM . Lib . css ( b . prevBtnContainer , "top" , n . slider . height / 2 - n . slider . nav . height / 2 + 10 ) ; VMM . Lib . height ( s , n . slider . height ) ; VMM . Lib . width ( s , d ) ; r && H ( p , "linear" , 1 ) ; p == 0 && VMM . Lib . visible ( b . prevBtn , ! 1 ) } function S ( e ) { if ( p == l . length - 1 ) VMM . Lib . animate ( o , n . duration , n . ease , { left : - l [ p ] . leftpos ( ) } ) ; else { H ( p + 1 ) ; C ( ) } } function x ( e ) { if ( p == 0 ) H ( p ) ; else { H ( p - 1 ) ; C ( ) } } function T ( e ) { switch ( e . keyCode ) { case 39 : S ( e ) ; break ; case 37 : x ( e ) } } function N ( e , t ) { if ( c . length == 0 ) for ( var r = 0 ; r < l . length ; r ++ ) c . push ( l [ r ] . leftpos ( ) ) ; if ( typeof t . left == "number" ) { var i = t . left , s = - l [ p ] . leftpos ( ) ; i < s - n . slider _width / 3 ? S ( ) : i > s + n . slider _width / 3 ? x ( ) : VMM . Lib . animate ( o , n . duration , n . ease , { left : s } ) } else VMM . Lib . animate ( o , n . duration , n . ease , { left : s } ) ; typeof t . top == "number" && VMM . Lib . animate ( o , n . duration , n . ease , { top : - t . top } ) } function C ( ) { n . current _slide = p ; VMM . fireEvent ( y , "UPDATE" ) } var n , r , i , s , o , u , a = { } , f = [ ] , l = [ ] , c =
. fulldate - t . fulldate } ) ; N ( ) } var r , i , s , o , u , a , f , l , c = "2.05" , h = "#timelinejs" , p = { } , d = { } , v = [ ] , m = { } , g = ! 1 , y = ! 1 , b = ! 1 , w = ! 1 ; type . of ( e ) == "string" ? e . match ( "#" ) ? h = e : h = "#" + e : h = "#timelinejs" ; trace ( "VERSION " + c ) ; m = { embed : ! 1 , events : { data _ready : "DATAREADY" , messege : "MESSEGE" , headline : "HEADLINE" , slide _change : "SLIDE_CHANGE" , resize : "resize" } , id : h , source : "nothing" , type : "timeline" , touch : ! 1 , orientation : "normal" , maptype : "toner" , preload : 4 , current _slide : 0 , hash _bookmark : ! 1 , start _at _end : ! 1 , start _at _slide : 0 , start _zoom _adjust : 0 , start _page : ! 1 , api _keys : { google : "" , flickr : "" , twitter : "" } , interval : 10 , something : 0 , width : 960 , height : 540 , spacing : 15 , loaded : { slider : ! 1 , timenav : ! 1 , percentloaded : 0 } , nav : { start _page : ! 1 , interval _width : 200 , density : 4 , minor _width : 0 , minor _left : 0 , constraint : { left : 0 , right : 0 , right _min : 0 , right _max : 0 } , zoom : { adjust : 0 } , multiplier : { current : 6 , min : . 1 , max : 50 } , rows : [ 1 , 1 , 1 ] , width : 960 , height : 200 , marker : { width : 150 , height : 50 } } , feature : { width : 960 , height : 540 } , slider : { width : 720 , height : 400 , content : { width : 720 , height : 400 , padding : 130 } , nav : { width : 100 , height : 200 } } , ease : "easeInOutExpo" , duration : 1e3 , gmap _key : "" , language : VMM . Language } ; if ( t != null && t != "" ) { m . width = t ; g = ! 0 } if ( n != null && n != "" ) { m . height = n ; y = ! 0 } if ( window . location . hash ) { var E = window . location . hash . substring ( 1 ) ; isNaN ( E ) || ( m . current _slide = parseInt ( E ) ) } window . onhashchange = function ( ) { var e = window . location . hash . substring ( 1 ) ; m . hash _bookmark ? w ? _ ( parseInt ( e ) ) : w = ! 1 : _ ( parseInt ( e ) ) } ; this . init = function ( e , t ) { trace ( "INIT" ) ; S ( e ) ; x ( ) ; type . of ( t ) == "string" && ( m . source = t ) ; VMM . Date . setLanguage ( m . language ) ; VMM . master _config . language = m . language ; VMM . ExternalAPI . setKeys ( m . api _keys ) ; VMM . ExternalAPI . googlemaps . setMapType ( m . maptype ) ; VMM . bindEvent ( global , T , m . events . data _ready ) ; VMM . bindEvent ( global , I , m . events . messege ) ; VMM . fireEvent ( global , m . events . messege , m . language . messages . loading _timeline ) ; ( VMM . Browser . browser == "Explorer" || VMM . Browser . browser == "MSIE" ) && parseInt ( VMM . Browser . version , 10 ) <= 7 && ( b = ! 0 ) ; type . of ( m . source ) == "string" || type . of ( m . source ) == "object" ? VMM . Timeline . DataObj . getData ( m . source ) : VMM . Timeline . DataObj . getData ( VMM . getElement ( h ) ) } ; this . iframeLoaded = function ( ) { trace ( "iframeLoaded" ) } ; this . reload = function ( e ) { trace ( "loadNewDates" + e ) ; VMM . fireEvent ( global , m . events . messege , m . language . messages . loading _timeline ) ; d = { } ; VMM . Timeline . DataObj . getData ( e ) } } ; VMM . Timeline . Config = { } } typeof VMM . Timeline != "undefined" && typeof VMM . Timeline . TimeNav == "undefined" && ( VMM . Timeline . TimeNav = function ( e , t , n ) { function U ( ) { trace ( "onConfigSet" ) } function z ( e ) { b . nav . constraint . left = b . width / 2 ; b . nav . constraint . right = b . nav . constraint . right _min - b . width / 2 ; y . updateConstraint ( b . nav . constraint ) ; VMM . Lib . css ( h , "left" , Math . round ( b . width / 2 ) + 2 ) ; VMM . Lib . css ( p , "left" , Math . round ( b . width / 2 ) - 8 ) ; Y ( b . current _slide , b . ease , b . duration , ! 0 , e ) } function W ( ) { VMM . fireEvent ( x , "UPDATE" ) } function X ( ) { y . cancelSlide ( ) ; if ( b . nav . multiplier . current > b . nav . multiplier . min ) { b . nav . multiplier . current <= 1 ? b . nav . multiplier . current = b . nav . multiplier . current - . 25 : b . nav . multiplier . current > 5 ? b . nav . multiplier . current > 16 ? b . nav . multiplier . current = Math . round ( b . nav . multiplier . current - 10 ) : b . nav . multiplier . current = Math . round ( b . nav . multiplier . current - 4 ) : b . nav . multiplier . current = Math . round ( b . nav . multiplier . current - 1 ) ; b . nav . multiplier . current <= 0 && ( b . nav . multiplier . current = b . nav . multiplier . min ) ; K ( ) } } function V ( ) { y . cancelSlide ( ) ; if ( b . nav . multiplier . current < b . nav . multiplier . max ) { b . nav . multiplier . current > 4 ? b . nav . multiplier . current > 16 ? b . nav . multiplier . current = Math . round ( b . nav . multiplier . current + 10 ) : b . nav . multiplier . current = Math . round ( b . nav . multiplier . current + 4 ) : b . nav . multiplier . current = Math . round ( b . nav . multiplier . current + 1 ) ; b . nav . multiplier . current >= b . nav . multiplier . max && ( b . nav . multiplier . current = b . nav . multiplier . max ) ; K ( ) } } function $ ( e ) { y . cancelSlide ( ) ; Y ( 0 ) ; W ( ) } function J ( e ) { var t = 0 , n = 0 ; e || ( e = window . event ) ; e . originalEvent && ( e = e . originalEvent ) ; e . wheelDelta ? t = e . wheelDelta / 6 : e . detail && ( t = - e . detail * 12 ) ; if ( t ) { e . preventDefault && e . preventDefault ( ) ; e . returnValue = ! 1 } if ( typeof e . wheelDeltaX != "undefined" ) { t = e . wheelDeltaY / 6 ; Math . abs ( e . wheelDeltaX ) > Math . abs ( e . wheelDeltaY ) ? t = e . wheelDeltaX / 6 : t = e . wheelDeltaY / 6 } n = VMM . Lib . position ( r ) . left + t ; n > b . nav . const
( /<\s*\/?\s*b\s*.*?>/g , "" ) + "</blockquote>" } } else if ( o . type == "link" ) { f . headline = o . data . link . title ; f . text = o . data . link . description ; o . data . link . thumbnail != "undefined" && o . data . link . thumbnail != "" ? f . asset . media = o . data . link . thumbnail : f . asset . media = o . permalink ; f . asset . caption = "<a href='" + o . permalink + "' target='_blank'>" + o . data . link . title + "</a>" ; f . slug = o . data . link . title } else if ( o . type == "text" ) { if ( o . permalink . match ( "storify" ) ) { u = ! 0 ; var l = e . content . author . username , c = "" ; if ( typeof o . attribution . name != "undefined" ) { r = o . attribution . name ; i = o . attribution . username + " " } var h = "<div class='storify'>" ; h += "<blockquote><p>" + o . data . text . replace ( /<\s*\/?\s*b\s*.*?>/g , "" ) + "</p></blockquote>" ; h += "<div class='vcard author'><a class='screen-name url' href='" + o . attribution . href + "' target='_blank'>" ; h += "<span class='avatar'><img src='" + o . attribution . thumbnail + "' style='max-width: 32px; max-height: 32px;'></span>" ; h += "<span class='fn'>" + r + "</span>" ; h += "<span class='nickname'>" + i + "<span class='thumbnail-inline'></span></span>" ; h += "</a></div></div>" ; f . text = h ; if ( s + 1 >= e . content . elements . length ) f . startDate = e . content . elements [ s - 1 ] . posted _at ; else if ( e . content . elements [ s + 1 ] . type == "text" && e . content . elements [ s + 1 ] . permalink . match ( "storify" ) ) if ( s + 2 >= e . content . elements . length ) f . startDate = e . content . elements [ s - 1 ] . posted _at ; else if ( e . content . elements [ s + 2 ] . type == "text" && e . content . elements [ s + 2 ] . permalink . match ( "storify" ) ) if ( s + 3 >= e . content . elements . length ) f . startDate = e . content . elements [ s - 1 ] . posted _at ; else if ( e . content . elements [ s + 3 ] . type == "text" && e . content . elements [ s + 3 ] . permalink . match ( "storify" ) ) f . startDate = e . content . elements [ s - 1 ] . posted _at ; else { trace ( "LEVEL 3" ) ; f . startDate = e . content . elements [ s + 3 ] . posted _at } else { trace ( "LEVEL 2" ) ; f . startDate = e . content . elements [ s + 2 ] . posted _at } else { trace ( "LEVEL 1" ) ; f . startDate = e . content . elements [ s + 1 ] . posted _at } f . endDate = f . startDate } } else if ( o . type == "video" ) { f . headline = o . data . video . title ; f . asset . caption = o . data . video . description ; f . asset . caption = o . source . username ; f . asset . media = o . data . video . src } else { trace ( "NO MATCH " ) ; trace ( o ) } u && ( f . slug = VMM . Util . untagify ( o . data . text ) ) ; t . timeline . date . push ( f ) } VMM . fireEvent ( global , VMM . Timeline . Config . events . data _ready , t ) } } , tweets : { type : "twitter" , buildData : function ( e ) { VMM . bindEvent ( global , VMM . Timeline . DataObj . model . tweets . onTwitterDataReady , "TWEETSLOADED" ) ; VMM . ExternalAPI . twitter . getTweets ( e . timeline . tweets ) } , getData : function ( e ) { VMM . bindEvent ( global , VMM . Timeline . DataObj . model . tweets . onTwitterDataReady , "TWEETSLOADED" ) ; VMM . ExternalAPI . twitter . getTweetSearch ( e ) } , onTwitterDataReady : function ( e , t ) { var n = VMM . Timeline . DataObj . data _template _obj ; for ( var r = 0 ; r < t . tweetdata . length ; r ++ ) { var i = { type : "tweets" , startDate : "" , headline : "" , text : "" , asset : { media : "" , credit : "" , caption : "" } , tags : "Optional" } ; i . startDate = t . tweetdata [ r ] . raw . created _at ; type . of ( t . tweetdata [ r ] . raw . from _user _name ) ? i . headline = t . tweetdata [ r ] . raw . from _user _name + " (<a href='https://twitter.com/" + t . tweetdata [ r ] . raw . from _user + "'>" + "@" + t . tweetdata [ r ] . raw . from _user + "</a>)" : i . headline = t . tweetdata [ r ] . raw . user . name + " (<a href='https://twitter.com/" + t . tweetdata [ r ] . raw . user . screen _name + "'>" + "@" + t . tweetdata [ r ] . raw . user . screen _name + "</a>)" ; i . asset . media = t . tweetdata [ r ] . content ; n . timeline . date . push ( i ) } VMM . fireEvent ( global , VMM . Timeline . Config . events . data _ready , n ) } } } , data _template _obj : { timeline : { headline : "" , description : "" , asset : { media : "" , credit : "" , caption : "" } , date : [ ] , era : [ ] } } , date _obj : { startDate : "2012,2,2,11,30" , headline : "" , text : "" , asset : { media : "http://youtu.be/vjVfu8-Wp6s" , credit : "" , caption : "" } , tags : "Optional" } } ) ; VMM . debug = ! 1 ;