/ * V e r i t e
* 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 .
=== === === === === === === === === === === === === === === === == * / f u n c t i o n t r a c e ( a ) { 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 ( a ) : 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 ( a ) ) } 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 a = ! 1 , b = / 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 ( c ) { f u n c t i o n g ( ) { ! a & & 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 d = t h i s . p r o t o t y p e ; a = ! 0 ; v a r e = n e w t h i s ; a = ! 1 ; f o r ( v a r f i n c ) e [ f ] = t y p e o f c [ f ] = = " f u n c t i o n " & & t y p e o f d [ f ] = = " f u n c t i o n " & & b . t e s t ( c [ f ] ) ? f u n c t i o n ( a , b ) { r e t u r n f u n c t i o n ( ) { v a r c = t h i s . _ s u p e r ; t h i s . _ s u p e r = d [ a ] ; v a r e = b . 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 = c ; r e t u r n e } } ( f , c [ f ] ) : c [ f ] ; g . p r o t o t y p e = e ; g . p r o t o t y p e . c o n s t r u c t o r = g ; g . 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 g } } ) ( ) ; 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 } , 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 " , k e y s : { 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 = " } , 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 : [ ] } , 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 : [ ] } , 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 ( a , b , c , d , e ) { v a r f = " " ; i f ( a ! = n u l l & & a ! = " " ) { f + = " < " + a ; c ! = n u l l & & c ! = " " & & ( f + = " c l a s s = ' " + c + " ' " ) ; d ! = n u l l & & d ! = " " & & ( f + = " " + d ) ; e ! = n u l l & & e ! = " " & & ( f + = " " + e ) ; f + = " > " ; b ! = n u l l & & b ! = " " & & ( f + = b ) ; f = f + " < / " + a + " > " } r e t u r n f } ; 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 ( a , b , c ) { v a r d = " " , e = ! 1 ; d + = " < d i v c l a s s = ' m e d i a ' > " ; i f ( a ! = n u l l & & a ! = " " ) { v a l i d = ! 0 ; d + = " < i m g s r c = ' " + a + " ' > " ; c ! = n u l l & & c ! = " " & & ( d + = V M M . c r e a t e E l e m e n t ( " d i v " , c , " c r e d i t " ) ) ; b ! = n u l l & & b ! = " " & & ( d + = V M M . c r e a t e E l e m e n t ( " d i v " , b , " c a p t i o n " ) ) } d + = " < / d i v > " ; r e t u r n d } ; V M M . h i d e U r l B a r = f u n c t i o n ( ) { v a r a = w i n d o w , b = a . d o c u m e n t ; i f ( ! l o c a t i o n . h a s h | | ! a . 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 c = 1 , d = s e t I n t e r v a l ( f u n c t i o n ( ) { i f ( b . b o d y ) { c l e a r I n t e r v a l ( d ) ; c = " s c r o l l T o p " i n b . b o d y ? b . b o d y . s c r o l l T o p : 1 ; a . s c r o l l T o ( 0 , c = = = 1 ? 0 : 1 ) } } , 1 5 ) ; a . 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 ( ) { a . s c r o l l T o ( 0 , c = = = 1 ? 0 : 1 ) } , 0 ) } , ! 1 ) } } } 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 a = 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 - a ) / 8 6 4 e 5 + a . 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 a = 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 - a ) / 8 6 4 e 5 ) } ; v a r i s = { N u l l : f u n c t i o n ( a ) { r e t u r n a = = = n u l l } , U n d e f i n e d : f u n c t i o n ( a ) { r e t u r n a = = = u n d e f i n e d } , n t : f u n c t i o n ( a ) { r e t u r n a = = = n u l l | | a = = = 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 ( a ) { r e t u r n t y p e o f a = = " f u n c t i o n " ? a . 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 ( a ) { r e t u r n t y p e o f a = = " s t r i n g " ? ! 0 : t y p e o f a = = " o b j e c t " ? a . 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 ( a ) { r e t u r n t y p e o f a = = " o b j e c t " ? a . 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 | | a . 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 ( a ) { r e t u r n t y p e o f a = = " b o o l e a n " ? ! 0 : t y p e o f a = = " o b j e c t " ? a . 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 ( a ) { r e t u r n t y p e o f a = = " d a t e " ? ! 0 : t y p e o f a = = " o b j e c t " ? a . 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 ( a ) { r e t u r n t y p e o f a = = " o b j e c t " ? a . 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 ( a ) { r e t u r n t y p e o f a = = " n u m b e r " ? ! 0 : t y p e o f a = = " o b j e c t " ? a . 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 ( a ) { r e t u r n t y p e o f a = = " o b j e c t " ? a . 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 ( a ) { r e t u r n t y p e o f a = = " f u n c t i o n " ? a . 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 e x p / i ) ! = = n u l l : ! 1 } } , t y p e = { o f : f u n c t i o n ( a ) { f o r ( v a r b i n i s ) i f ( i s [ b ] ( a ) ) r e t u r n b . t o L o w e r C a s e ( ) } } ; ! f u n c t i o n ( a ) { " u s e s t r i c t " ; v a r b = f u n c t i o n ( a , b ) { t h i s . i n i t ( " t o o l t i p " , a , b ) } ; b . p r o t o t y p e = { c o n s t r u c t o r : b , i n i t : f u n c t i o n ( b , c , d ) { v a r e , f ; t h i s . t y p e = b ; t h i s . $ e l e m e n t = a ( c ) ; t h i s . o p t i o n s = t h i s . g e t O p t i o n s ( d ) ; t h i s . e n a b l e d = ! 0 ; i f ( t h i s . o p t i o n s . t r i g g e r ! = " m a n u a l " ) { e = t h i s . o p t i o n s . t r i g g e r = = " h o v e r " ? " m o u s e e n t e r " : " f o c u s " ; f = t h i s . o p t i o n s . t r i g g e r = = " h o v e r " ? " m o u s e l e a v e " : " b l u r " ; t h i s . $ e l e m e n t . o n ( e , t h i s . o p t i o n s . s e l e c t o r , a . p r o x y ( t h i s . e n t e r ,
) ; 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 : { get : function ( a , b ) { var c , d = VMM . Util . getUrlVars ( a ) ; trace ( d ) ; var e = "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" , f = { url : a , vars : d , id : b } ; trace ( f ) ; if ( VMM . master _config . googlemaps . active ) VMM . master _config . googlemaps . que . push ( f ) ; else { VMM . master _config . googlemaps . que . push ( f ) ; VMM . master _config . googlemaps . api _loaded || VMM . LoadLib . js ( e , function ( ) { trace ( "Google Maps API Library Loaded" ) } ) } } , create : function ( a ) { function e ( 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 ] } if ( VMM . ExternalAPI . googlemaps . defaultType ( a ) ) { trace ( "GOOGLE MAP DEFAULT TYPE" ) ; return google . maps . MapTypeId [ a . toUpperCase ( ) ] } trace ( "Not a maptype: " + a ) } function o ( ) { var b = a . url + "&output=kml" ; b = b . replace ( "&output=embed" , "" ) ; var c = new google . maps . KmlLayer ( b , { preserveViewport : ! 0 } ) , e = new google . maps . InfoWindow ; c . setMap ( d ) ; google . maps . event . addListenerOnce ( c , "defaultviewport_changed" , function ( ) { d . fitBounds ( c . getDefaultViewport ( ) ) ; i && d . panTo ( f ) ; j && d . setZoom ( h ) } ) ; google . maps . event . addListener ( c , "click" , function ( a ) { function c ( a ) { e . setContent ( a ) ; e . open ( d ) } var b = a . featureData . description ; c ( b ) } ) } var b = "" , c , d ; google . maps . VeriteMapType = function ( a ) { if ( VMM . ExternalAPI . googlemaps . defaultType ( a ) ) return google . maps . MapTypeId [ a . toUpperCase ( ) ] ; var b = e ( 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 ( "_" ) ; type . of ( VMM . master _config . Timeline . maptype ) == "string" ? VMM . ExternalAPI . googlemaps . defaultType ( VMM . master _config . Timeline . maptype ) ? c = google . maps . MapTypeId [ VMM . master _config . Timeline . maptype . toUpperCase ( ) ] : c = VMM . master _config . Timeline . maptype : c = "toner" ; var f = new google . maps . LatLng ( 41.875696 , - 87.624207 ) , g , h = 11 , i = ! 1 , j = ! 1 , k ; if ( type . of ( VMM . Util . getUrlVars ( a . url ) [ "ll" ] ) == "string" ) { i = ! 0 ; g = VMM . Util . getUrlVars ( a . url ) . ll . split ( "," ) ; f = new google . maps . LatLng ( parseFloat ( g [ 0 ] ) , parseFloat ( g [ 1 ] ) ) } else if ( type . of ( VMM . Util . getUrlVars ( a . url ) [ "sll" ] ) == "string" ) { g = VMM . Util . getUrlVars ( a . url ) . sll . split ( "," ) ; f = new google . maps . LatLng ( parseFloat ( g [ 0 ] ) , parseFloat ( g [ 1 ] ) ) } if ( type . of ( VMM . Util . getUrlVars ( a . url ) [ "z" ] ) == "string" ) { j = ! 0 ; h = parseFloat ( VMM . Util . getUrlVars ( a . url ) . z ) } var l = { zoom : h , disableDefaultUI : ! 0 , mapTypeControl : ! 1 , zoomControl : ! 0 , zoomControlOptions : { style : google . maps . ZoomControlStyle . SMALL , position : google . maps . ControlPosition . TOP _RIGHT } , center : f , mapTypeId : c , mapTypeControlOptions : { mapTypeIds : [ c ] } } , m = a . id . toString ( ) + "_gmap" ; VMM . attachElement ( "#" + a . id , "<div class='google-map' id='" + m + "' style='width=100%;height=100%;'></div>" ) ; var d = new google . maps . Map ( document . getElementById ( m ) , l ) ; if ( ! VMM . ExternalAPI . googlemaps . defaultType ( VMM . master _config . Timeline . maptype ) ) { d . mapTypes . set ( c , new google . maps . VeriteMapType ( c ) ) ; var n = " < div class = 'map-attribution' > <
, 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 ( "&" ) ? b = b . replace ( "&" , "&" ) : b . match ( "&" ) ? b = b . replace ( "&" , "&" ) : b . match ( "&" ) && ( b = b . replace ( "&" , "&" ) ) ; 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 , " " ) } , 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 , "“$1”" ) } , 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 ( ? : [ P M C E A ] [ S D P ] T | ( ? : P a c i f i c | M o u n t a i n | C e n t r a l | E a s t e r n | A t l a n t i c ) ( ? : S t a n d a r d | D a y l i g h t | P r e v a i l i n g ) T i
) ; 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 . Lib . find ( "#timeline section" , "time" ) [ 0 ] ) { b . timeline . startDate = VMM . Lib . html ( VMM . Lib . find ( "#timeline section" , "time" ) [ 0 ] ) ; b . timeline . headline = VMM . Lib . html ( VMM . Lib . find ( "#timeline section" , "h2" ) ) ; b . timeline . text = VMM . Lib . html ( VMM . Lib . find ( "#timeline section" , "article" ) ) ; var c = ! 1 ; if ( VMM . Lib . find ( "#timeline section" , "figure img" ) . length != 0 ) { c = ! 0 ; b . timeline . asset . media = VMM . Lib . attr ( VMM . Lib . find ( "#timeline section" , "figure img" ) , "src" ) } else if ( VMM . Lib . find ( "#timeline section" , "figure a" ) . length != 0 ) { c = ! 0 ; b . timeline . asset . media = VMM . Lib . attr ( VMM . Lib . find ( "#timeline section" , "figure a" ) , "href" ) } if ( c ) { VMM . Lib . find ( "#timeline section" , "cite" ) . length != 0 && ( b . timeline . asset . credit = VMM . Lib . html ( VMM . Lib . find ( "#timeline section" , "cite" ) ) ) ; VMM . Lib . find ( this , "figcaption" ) . length != 0 && ( b . timeline . asset . caption = VMM . Lib . html ( VMM . Lib . find ( "#timeline section" , "figcaption" ) ) ) } } VMM . Lib . each ( "#timeline li" , function ( a , c ) { var d = ! 1 , e = { type : "default" , startDate : "" , headline : "" , text : "" , asset : { media : "" , credit : "" , caption : "" } , tags : "Optional" } ; if ( VMM . Lib . find ( this , "time" ) != 0 ) { d = ! 0 ; e . startDate = VMM . Lib . html ( VMM . Lib . find ( this , "time" ) [ 0 ] ) ; VMM . Lib . find ( this , "time" ) [ 1 ] && ( e . endDate = VMM . Lib . html ( VMM . Lib . find ( this , "time" ) [ 0 ] ) ) ; e . headline = VMM . Lib . html ( VMM . Lib . find ( this , "h3" ) ) ; e . text = VMM . Lib . html ( VMM . Lib . find ( this , "article" ) ) ; var f = ! 1 ; if ( VMM . Lib . find ( this , "figure img" ) . length != 0 ) { f = ! 0 ; e . asset . media = VMM . Lib . attr ( VMM . Lib . find ( this , "figure img" ) , "src" ) } else if ( VMM . Lib . find ( this , "figure a" ) . length != 0 ) { f = ! 0 ; e . asset . media = VMM . Lib . attr ( VMM . Lib . find ( this , "figure a" ) , "href" ) } if ( f ) { VMM . Lib . find ( this , "cite" ) . length != 0 && ( e . asset . credit = VMM . Lib . html ( VMM . Lib . find ( this , "cite" ) ) ) ; VMM . Lib . find ( this , "figcaption" ) . length != 0 && ( e . asset . caption = VMM . Lib . html ( VMM . Lib . 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 . 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 ) { VMM . fireEvent ( global , "MESSEGE" , "Parsing Data" ) ; 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 spreadshe