/ * !
TimelineJS
Designed and built by Zach Wise at VéritéCo
This program is free software : you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
http : //www.gnu.org/licenses/
* //***********************************************
Begin VMM . js
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* VéritéCo JS Master
Version : 0.6
Date : June 19 , 2012
Copyright 2012 VéritéCo unless part of TimelineJS ,
if part of TimelineJS then it inherits TimelineJS ' s license .
Designed and built by Zach Wise digitalartwork . net
=== === === === === === === === === === === === === === === === == * //* Simple JavaScript Inheritance
By John Resig http : //ejohn.org/
MIT Licensed .
=== === === === === === === === === === === === === === === === == * / 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 : " j w N G n Y w 4 h E 9 l m A e z 4 l l 0 Q D + j o 6 S K B J F k n k o p L S 4 F r S A u G f I w y j 5 7 A u s u R 0 s 8 d A o = " , 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 . master _config . twitter . que . remove ( 0 ) } } , getHTML : function ( e ) { var t = "http://api.twitter.com/1/statuses/oembed.json?id=" + e + "&callback=?" ; VMM . getJSON ( t , VMM . ExternalAPI . twitter . onJSONLoaded ) } , onJSONLoaded : function ( e ) { trace ( "TWITTER JSON LOADED" ) ; var t = e . id ; VMM . attachElement ( "#" + t , VMM . Util . linkify _with _twitter ( e . html ) ) } , parseTwitterDate : function ( e ) { var t = new Date ( Date . parse ( e ) ) ; return t } , prettyParseTwitterDate : function ( e ) { var t = new Date ( Date . parse ( e ) ) ; return VMM . Date . prettyDate ( t , ! 0 ) } , getTweets : function ( e ) { var t = [ ] , n = e . length ; for ( var r = 0 ; r < e . length ; r ++ ) { var i = "" ; e [ r ] . tweet . match ( "status/" ) ? i = e [ r ] . tweet . split ( "status/" ) [ 1 ] : e [ r ] . tweet . match ( "statuses/" ) ? i = e [ r ] . tweet . split ( "statuses/" ) [ 1 ] : i = "" ; var s = "http://api.twitter.com/1/statuses/show.json?id=" + i + "&include_entities=true&callback=?" ; VMM . getJSON ( s , function ( e ) { var r = { } , i = "<div class='twitter'><blockquote><p>" , s = VMM . Util . linkify _with _twitter ( e . text , "_blank" ) ; i += s ; i += "</p>" ; i += "— " + e . user . name + " (<a href='https://twitter.com/" + e . user . screen _name + "'>@" + e . user . screen _name + "</a>) <a href='https://twitter.com/" + e . user . screen _name + "/status/" + e . id + "'>" + VMM . ExternalAPI . twitter . prettyParseTwitterDate ( e . created _at ) + " </a></blockquote></div>" ; r . content = i ; r . raw = e ; t . push ( r ) ; if ( t . length == n ) { var o = { tweetdata : t } ; VMM . fireEvent ( global , "TWEETSLOADED" , o ) } } ) . success ( function ( ) { trace ( "second success" ) } ) . error ( function ( ) { trace ( "error" ) } ) . complete ( function ( ) { trace ( "complete" ) } ) } } , getTweetSearch : function ( e , t ) { var n = 40 ; t != null && t != "" && ( n = t ) ; var r = "http://search.twitter.com/search.json?q=" + e + "&rpp=" + n + "&include_entities=true&result_type=mixed" , i = [ ] ; VMM . getJSON ( r , function ( e ) { for ( var t = 0 ; t < e . results . length ; t ++ ) { var n = { } , r = "<div class='twitter'><blockquote><p>" , s = VMM . Util . linkify _with _twitter ( e . results [ t ] . text , "_blank" ) ; r += s ; r += "</p>" ; r += "— " + e . results [ t ] . from _user _name + " (<a href='https://twitter.com/" + e . results [ t ] . from _user + "'>@" + e . results [ t ] . from _user + "</a>) <a href='https://twitter.com/" + e . results [ t ] . from _user + "/status/" + e . id + "'>" + VMM . ExternalAPI . twitter . prettyParseTwitterDate ( e . results [ t ] . created _at ) + " </a></blockquote></div>" ; n . content = r ; n . raw = e . results [ t ] ; i . push ( n ) } var o = { tweetdata : i } ; VMM . fireEvent ( global , "TWEETSLOADED" , o ) } ) } , prettyHTML : function ( e , t ) { var e = e . toString ( ) , n = { twitterid : e } , r = "http://api.twitter.com/1/statuses/show.json?id=" + e + "&include_entities=true&callback=?" , i = setTimeout ( VMM . ExternalAPI . twitter . errorTimeOut , VMM . master _config . timers . api , e ) ; VMM . getJSON ( r , VMM . ExternalAPI . twitter . formatJSON ) . error ( function ( t , n , r ) { trace ( "TWITTER error" ) ; trace ( "TWITTER ERROR: " + n + " " + t . responseText ) ; VMM . attachElement ( "#twitter_" + e , "<p>ERROR LOADING TWEET " + e + "</p>" ) } ) . success ( function ( e ) { clearTimeout ( i ) ; t && VMM . ExternalAPI . twitter . secondaryMedia ( e ) } ) } , formatJSON : function ( e ) { var t = e . id _str , n = "<blockquote><p>" , r = VMM . Util . linkify _with _twitter ( e . text , "_blank" ) ; n += r ; n += "</p></blockquote>" ; n += "<div class='vcard author'>" ; n += "<a class='screen-name url' href='https://twitter.com/" + e . user . screen _name + "' data-screen-name='" + e . user . screen _name + "' target='_blank'>" ; n += "<span class='avatar'><img src=' " + e . user . profile _image _url + "' alt=''></span>" ; n += "<span class='fn'>" + e . user . name + "</span>" ; n += "<span class='nickname'>@" + e . user . screen _name + "<span class='thumbnail-inline'></span></span>" ; n += "</a>" ; n += "</div>" ; typeof e . entities . media != "undefined" && e . entities . media [ 0 ] . type == "photo" && ( n += "<img src=' " + e . entities . media [ 0 ] . media _url + "' alt=''>" ) ; VMM . attachElement ( "#twitter_" + t . toString ( ) , n ) ; VMM . attachElement ( "#text_thumb_" + t . toString ( ) , e . text ) } } , googlemaps : { get : function ( e , t ) { var n , r , i ; i = VMM . Util . getUrlVars ( e ) ; VMM . master _config . Timeline . api _keys . google != "" ? r = VMM . master _config . Timeline . api _keys . google : r = Aes . Ctr . decrypt ( VMM . master _config . api _keys _master . google , VMM . master _config . vp , 256 ) ; var s = "http://maps.googleapis.com/maps/api/js?key=" + r + "&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady" , o = { url : e , vars : i , id : t } ; if ( VMM . master _config . googlemaps . active ) VMM . master _config . googlemaps . que . push ( o ) ; else { VMM . master _config . googlemaps . que . push ( o ) ; VMM . master _config . googlemaps . api _loaded || VMM . LoadLib . js ( s ,
} } } ) ; typeof VMM != "undefined" && typeof VMM . DragSlider == "undefined" && ( VMM . DragSlider = function ( ) { var e = { element : "" , element _move : "" , constraint : "" , sliding : ! 1 , pagex : { start : 0 , end : 0 } , left : { start : 0 , end : 0 } , time : { start : 0 , end : 0 } , touch : ! 1 } , 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 ) ; n . preventDefault ( ) ; n . stopPropagation ( ) ; if ( e . sliding ) { e . sliding = ! 1 ; l ( n . data . element , n . data . delement , n ) ; return ! 1 } return ! 0 } , o = function ( e ) { f ( e . data . element , e . data . delement , e ) ; e . preventDefault ( ) ; e . stopPropagation ( ) ; return ! 0 } , u = function ( t ) { 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 = "easeOutExpo" ; r . change . x = 6e3 * ( 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 ] ) ; if ( r . time > 0 ) if ( e . touch ) { VMM . Lib . css ( t , "-webkit-transition-property" , "left" ) ; VMM . Lib . css ( t , "-webkit-transition-duration" , r . time ) ; VMM . Lib . css ( t , "left" , r . left ) } else VMM . Lib . animate ( t , r . time , i , { left : r . left } ) } , p = function ( e ) { return parseInt ( VMM . Lib . css ( e , "left" ) . substring ( 0 , VMM . Lib . css ( e , "left" ) . length - 2 ) , 10 ) } } ) ; typeof VMM != "undefined" && typeof VMM . Slider == "undefined" && ( VMM . Slider = function ( e , t ) { function w ( ) { trace ( "onConfigSet" ) } function E ( e , t ) { var n = ! 0 , i = ! 1 ; e != null && ( n = e ) ; t != null && ( i = t ) ; p = r . slider . width ; r . slider . nav . height = VMM . Lib . height ( y . prevBtnContainer ) ; r . slider . content . width = p - r . slider . content . padding * 2 ; VMM . Lib . width ( u , f . length * r . slider . content . width ) ; if ( i ) { var a = f [ h ] . leftpos ( ) ; VMM . Lib . css ( o , "left" , a ) } _ ( ) ; D ( ) ; VMM . Lib . css ( y . nextBtn , "left" , p - r . slider . nav . width ) ; VMM . Lib . height ( y . prevBtn , r . slider . height ) ; VMM . Lib . height ( y . nextBtn , r . slider . height ) ; VMM . Lib . css ( y . nextBtnContainer , "top" , r . slider . height / 2 - r . slider . nav . height / 2 + 10 ) ; VMM . Lib . css ( y . prevBtnContainer , "top" , r . slider . height / 2 - r . slider . nav . height / 2 + 10 ) ; VMM . Lib . height ( s , r . slider . height ) ; VMM . Lib . width ( s , p ) ; n && H ( h , "linear" , 1 ) ; h == 0 && VMM . Lib . visible ( y . prevBtn , ! 1 ) } function S ( e ) { if ( h == f . length - 1 ) VMM . Lib . animate ( o , r . duration , r . ease , { left : - f [ h ] . leftpos ( ) } ) ; else { H ( h + 1 ) ; C ( ) } } function x ( e ) { if ( h == 0 ) H ( h ) ; else { H ( h - 1 ) ; C ( ) } } function T ( e ) { switch ( e . keyCode ) { case 39 : S ( e ) ; break ; case 37 : x ( e ) } } function N ( e , t ) { if ( l . length == 0 ) for ( var n = 0 ; n < f . length ; n ++ ) l . push ( f [ n ] . leftpos ( ) ) ; if ( typeof t . left == "number" ) { var i = t . left , s = - f [ h ] . leftpos ( ) ; i < s - r . slider _width / 3 ? S ( ) : i > s + r . slider _width / 3 ? x ( ) : VMM . Lib . animate ( o , r . duration , r . ease , { left : s } ) } else VMM
: 0 , hash _bookmark : ! 1 , start _at _end : ! 1 , start _at _slide : 0 , start _zoom _adjust : 0 , start _page : ! 1 , api _keys : { google : "" , flickr : "" , twitter : "" } , interval : 10 , something : 0 , width : 960 , height : 540 , spacing : 15 , loaded : { slider : ! 1 , timenav : ! 1 , percentloaded : 0 } , nav : { start _page : ! 1 , interval _width : 200 , density : 4 , minor _width : 0 , minor _left : 0 , constraint : { left : 0 , right : 0 , right _min : 0 , right _max : 0 } , zoom : { adjust : 0 } , multiplier : { current : 6 , min : . 1 , max : 50 } , rows : [ 1 , 1 , 1 ] , width : 960 , height : 200 , marker : { width : 150 , height : 50 } } , feature : { width : 960 , height : 540 } , slider : { width : 720 , height : 400 , content : { width : 720 , height : 400 , padding : 130 } , nav : { width : 100 , height : 200 } } , ease : "easeInOutExpo" , duration : 1e3 , language : VMM . Language } ; if ( e != null && e != "" ) { p . width = e ; d = ! 0 } if ( t != null && t != "" ) { p . height = t ; v = ! 0 } if ( window . location . hash ) { var y = window . location . hash . substring ( 1 ) ; isNaN ( y ) || ( p . current _slide = parseInt ( y ) ) } window . onhashchange = function ( ) { var e = window . location . hash . substring ( 1 ) ; p . hash _bookmark ? g ? A ( parseInt ( e ) ) : g = ! 1 : A ( parseInt ( e ) ) } ; var b = function ( e ) { if ( typeof timeline _config == "object" ) { trace ( "HAS TIMELINE CONFIG" ) ; var t ; for ( t in timeline _config ) Object . prototype . hasOwnProperty . call ( timeline _config , t ) && ( p [ t ] = timeline _config [ t ] ) } else if ( typeof e == "object" ) { var t ; for ( t in e ) Object . prototype . hasOwnProperty . call ( e , t ) && ( p [ t ] = e [ t ] ) } p . nav . width = p . width ; p . nav . height = 200 ; p . feature . width = p . width ; p . feature . height = p . height - p . nav . height ; p . nav . zoom . adjust = parseInt ( p . start _zoom _adjust , 10 ) ; VMM . Timeline . Config = p ; VMM . master _config . Timeline = VMM . Timeline . Config ; this . events = p . events } , w = function ( e , t ) { i = VMM . getElement ( f ) ; VMM . Lib . addClass ( f , "vmm-timeline" ) ; s = VMM . appendAndGetElement ( i , "<div>" , "feedback" , "" ) ; o = new VMM . Slider ( f + " div.slider" , p ) ; u = new VMM . Timeline . TimeNav ( f + " div.navigation" ) ; d ? VMM . Lib . width ( i , p . width ) : p . width = VMM . Lib . width ( i ) ; v ? VMM . Lib . height ( i , p . height ) : p . height = VMM . Lib . height ( i ) } , A = function ( e ) { if ( e <= h . length - 1 && e >= 0 ) { p . current _slide = e ; o . setSlide ( p . current _slide ) ; u . setMarker ( p . current _slide , p . ease , p . duration ) } } ; this . init = function ( n , r , o ) { type . of ( r ) == "string" && ( r . match ( "#" ) ? f = r : f = "#" + r ) ; b ( o ) ; w ( e , t ) ; trace ( "TIMELINE INIT" ) ; VMM . Date . setLanguage ( VMM . Timeline . Config . language ) ; VMM . master _config . language = VMM . Timeline . Config . language ; s = VMM . appendAndGetElement ( i , "<div>" , "feedback" , "" ) ; VMM . bindEvent ( global , E , p . events . data _ready ) ; VMM . bindEvent ( global , _ , p . events . messege ) ; VMM . fireEvent ( global , p . events . messege , VMM . master _config . language . messages . loading _timeline ) ; ( VMM . Browser . browser == "Explorer" || VMM . Browser . browser == "MSIE" ) && parseInt ( VMM . Browser . version , 10 ) <= 7 && ( m = ! 0 ) ; type . of ( n ) == "string" || type . of ( n ) == "object" ? VMM . Timeline . DataObj . getData ( n ) : VMM . Timeline . DataObj . getData ( VMM . getElement ( f ) ) } ; this . iframeLoaded = function ( ) { trace ( "iframeLoaded" ) } ; this . reload = function ( e ) { trace ( "loadNewDates" + e ) ; VMM . fireEvent ( global , p . events . messege , VMM . master _config . language . messages . loading _timeline ) ; c = { } ; VMM . Timeline . DataObj . getData ( e ) } ; var M = function ( e ) { VMM . getJSON ( e , function ( e ) { c = VMM . Timeline . DataObj . getData ( e ) ; VMM . fireEvent ( global , p . events . data _ready ) } ) } , _ = function ( e , t ) { trace ( "showMessege " + t ) ; VMM . attachElement ( s , VMM . MediaElement . loadingmessage ( t ) ) } , D = function ( ) { VMM . Lib . animate ( s , p . duration , p . ease * 4 , { opacity : 0 } , P ) } , P = function ( ) { VMM . Lib . detach ( s ) } , H = function ( ) { parseInt ( p . start _at _slide ) > 0 && p . current _slide == 0 && ( p . current _slide = parseInt ( p . start _at _slide ) ) ; p . start _at _end && p . current _slide == 0 && ( p . current _slide = h . length - 1 ) ; if ( m ) { m = ! 0 ; VMM . fireEvent ( global , p . events . messege , "Internet Explorer " + VMM . Browser . version + " is not supported by TimelineJS. Please update your browser to version 8 or higher." ) } else { VMM . attachElement ( i , "" ) ; VMM . appendElement ( i , "<div class='container main'><div class='feature'><div class='slider'></div></div><div class='navigation'></div></div>" ) ; x ( ) ; VMM . bindEvent ( "div.slider" , T , "LOADED" ) ; VMM . bindEvent ( "div.navigation" , C , "LOADED" ) ; VMM . bindEvent ( "div.slider" , k , "UPDATE" ) ; VMM . bindEvent ( "div.navigation" , L , "UPDATE" ) ; o . init ( h ) ; u . init ( h , c . era ) ; VMM . bindEvent ( global , x , p . events . resize ) } } , B = function ( ) { trace ( "IE7 or lower" ) ; for ( var e = 0 ; e < h . length ; e ++ ) trace ( h [ e ] ) } , j = function ( ) { trace ( "UPDATE SIZE" ) ; p . width = VMM . Lib . width ( i ) ; p . height = VMM . Lib . height ( i ) ; p .
: { media : r . gsx$media . $t , credit : r . gsx$mediacredit . $t , caption : r . gsx$mediacaption . $t } , tag : "" } ; typeof r . gsx$tag != "undefined" && ( o . tag = r . gsx$tag . $t ) ; t . timeline . date . push ( o ) } } VMM . fireEvent ( global , VMM . Timeline . Config . events . data _ready , t ) } } , storify : { getData : function ( e ) { VMM . fireEvent ( global , VMM . Timeline . Config . events . messege , "Loading Storify..." ) ; var t = e . split ( "storify.com/" ) [ 1 ] , n = "http://api.storify.com/v1/stories/" + t + "?per_page=300&callback=?" , r = setTimeout ( function ( ) { trace ( "STORIFY timeout" ) ; VMM . fireEvent ( global , VMM . Timeline . Config . events . messege , "Storify is not responding" ) } , 6e3 ) ; VMM . getJSON ( n , VMM . Timeline . DataObj . model . storify . buildData ) . error ( function ( e , t , n ) { trace ( "STORIFY error" ) ; trace ( "STORIFY ERROR: " + t + " " + e . responseText ) } ) . success ( function ( e ) { clearTimeout ( r ) } ) } , buildData : function ( e ) { VMM . fireEvent ( global , VMM . Timeline . Config . events . messege , "Parsing Data" ) ; var t = VMM . Timeline . DataObj . data _template _obj ; t . timeline . startDate = new Date ( e . content . date . created ) ; t . timeline . headline = e . content . title ; trace ( e ) ; var n = "" , r = e . content . author . username , i = "" ; if ( typeof e . content . author . name != "undefined" ) { r = e . content . author . name ; i = e . content . author . username + " " } typeof e . content . description != "undefined" && e . content . description != null && ( n += e . content . description ) ; n += "<div class='storify'>" ; n += "<div class='vcard author'><a class='screen-name url' href='" + e . content . author . permalink + "' target='_blank'>" ; n += "<span class='avatar'><img src='" + e . content . author . avatar + "' style='max-width: 32px; max-height: 32px;'></span>" ; n += "<span class='fn'>" + r + "</span>" ; n += "<span class='nickname'>" + i + "<span class='thumbnail-inline'></span></span>" ; n += "</a>" ; n += "</div>" ; n += "</div>" ; t . timeline . text = n ; t . timeline . asset . media = e . content . thumbnail ; t . timeline . type = "storify" ; for ( var s = 0 ; s < e . content . elements . length ; s ++ ) { var o = e . content . elements [ s ] , u = ! 1 , a = new Date ( o . posted _at ) ; trace ( o . type ) ; var f = { type : "storify" , startDate : o . posted _at , endDate : o . posted _at , headline : " " , slug : "" , text : "" , asset : { media : "" , credit : "" , caption : "" } } ; if ( o . type == "image" ) { if ( typeof o . source . name != "undefined" ) if ( o . source . name == "flickr" ) { f . asset . media = "http://flickr.com/photos/" + o . meta . pathalias + "/" + o . meta . id + "/" ; f . asset . credit = "<a href='" + f . asset . media + "'>" + o . attribution . name + "</a>" ; f . asset . credit += " on <a href='" + o . source . href + "'>" + o . source . name + "</a>" } else if ( o . source . name == "instagram" ) { f . asset . media = o . permalink ; f . asset . credit = "<a href='" + o . permalink + "'>" + o . attribution . name + "</a>" ; f . asset . credit += " on <a href='" + o . source . href + "'>" + o . source . name + "</a>" } else { f . asset . credit = "<a href='" + o . permalink + "'>" + o . attribution . name + "</a>" ; typeof o . source . href != "undefined" && ( f . asset . credit += " on <a href='" + o . source . href + "'>" + o . source . name + "</a>" ) ; f . asset . media = o . data . image . src } else { f . asset . credit = "<a href='" + o . permalink + "'>" + o . attribution . name + "</a>" ; f . asset . media = o . data . image . src } f . slug = o . attribution . name ; if ( typeof o . data . image . caption != "undefined" && o . data . image . caption != "undefined" ) { f . asset . caption = o . data . image . caption ; f . slug = o . data . image . caption } } else if ( o . type == "quote" ) { if ( o . permalink . match ( "twitter" ) ) { f . asset . media = o . permalink ; f . slug = VMM . Util . untagify ( o . data . quote . text ) } else if ( o . permalink . match ( "storify" ) ) { u = ! 0 ; f . asset . media = "<blockquote>" + o . data . quote . text . replace ( /<\s*\/?\s*b\s*.*?>/g , "" ) + "</blockquote>" } } else if ( o . type == "link" ) { f . headline = o . data . link . title ; f . text = o . data . link . description ; o . data . link . thumbnail != "undefined" && o . data . link . thumbnail != "" ? f . asset . media = o . data . link . thumbnail : f . asset . media = o . permalink ; f . asset . caption = "<a href='" + o . permalink + "' target='_blank'>" + o . data . link . title + "</a>" ; f . slug = o . data . link . title } else if ( o . type == "text" ) { if ( o . permalink . match ( "storify" ) ) { u = ! 0 ; var l = e . content . author . username , c = "" ; if ( typeof o . attribution . name != "undefined" ) { r = o . attribution . name ; i = o . attribution . username + " " } 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 : 32 px ; m