|
|
|
/*!
|
|
|
|
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
|
|
|
|
***********************************************//* Verite
|
|
|
|
* Verite JS Master
|
|
|
|
* Version: 0.6
|
|
|
|
* Date: April 26, 2012
|
|
|
|
* Copyright 2012 Verite unless part of Verite Timeline,
|
|
|
|
* if part of Timeline then it inherits Timeline's license.
|
|
|
|
* Designed and built by Zach Wise digitalartwork.net
|
|
|
|
* ----------------------------------------------------- *//* Simple JavaScript Inheritance
|
|
|
|
* By John Resig http://ejohn.org/
|
|
|
|
* MIT Licensed.
|
|
|
|
================================================== */function trace(a){VMM.debug&&(window.console?console.log(a):typeof jsTrace!="undefined"&&jsTrace.send(a))}function onYouTubePlayerAPIReady(){trace("GLOBAL YOUTUBE API CALLED");VMM.ExternalAPI.youtube.onAPIReady()}(function(){var a=!1,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(c){function g(){!a&&this.init&&this.init.apply(this,arguments)}var d=this.prototype;a=!0;var e=new this;a=!1;for(var f in c)e[f]=typeof c[f]=="function"&&typeof d[f]=="function"&&b.test(c[f])?function(a,b){return function(){var c=this._super;this._super=d[a];var e=b.apply(this,arguments);this._super=c;return e}}(f,c[f]):c[f];g.prototype=e;g.prototype.constructor=g;g.extend=arguments.callee;return g}})();var global=function(){return this||(1,eval)("this")}();if(typeof VMM=="undefined"){var VMM=Class.extend({});VMM.debug=!0;VMM.master_config={init:function(){return this},sizes:{api:{width:0,height:0}},vp:"Pellentesque nibh felis, eleifend id, commodo in, interdum vitae, leo",api_keys_master:{flickr:"RAIvxHY4hE/Elm5cieh4X5ptMyDpj7MYIxziGxi0WGCcy1s+yr7rKQ==",google:"jwNGnYw4hE9lmAez4ll0QD+jo6SKBJFknkopLS4FrSAuGfIwyj57AusuR0s8dAo=",twitter:""},timers:{api:7e3},api:{pushques:[]},twitter:{active:!1,array:[],api_loaded:!1,que:[]},flickr:{active:!1,array:[],api_loaded:!1,que:[]},youtube:{active:!1,array:[],api_loaded:!1,que:[]},vimeo:{active:!1,array:[],api_loaded:!1,que:[]},googlemaps:{active:!1,map_active:!1,places_active:!1,array:[],api_loaded:!1,que:[]},googledocs:{active:!1,array:[],api_loaded:!1,que:[]},googleplus:{active:!1,array:[],api_loaded:!1,que:[]},wikipedia:{active:!1,array:[],api_loaded:!1,que:[],tries:0},soundcloud:{active:!1,array:[],api_loaded:!1,que:[]}}.init();VMM.createElement=function(a,b,c,d,e){var f="";if(a!=null&&a!=""){f+="<"+a;c!=null&&c!=""&&(f+=" class='"+c+"'");d!=null&&d!=""&&(f+=" "+d);e!=null&&e!=""&&(f+=" style='"+e+"'");f+=">";b!=null&&b!=""&&(f+=b);f=f+"</"+a+">"}return f};VMM.createMediaElement=function(a,b,c){var d="",e=!1;d+="<div class='media'>";if(a!=null&&a!=""){valid=!0;d+="<img src='"+a+"'>";c!=null&&c!=""&&(d+=VMM.createElement("div",c,"credit"));b!=null&&b!=""&&(d+=VMM.createElement("div",b,"caption"))}d+="</div>";return d};VMM.hideUrlBar=function(){var a=window,b=a.document;if(!location.hash||!a.addEventListener){window.scrollTo(0,1);var c=1,d=setInterval(function(){if(b.body){clearInterval(d);c="scrollTop"in b.body?b.body.scrollTop:1;a.scrollTo(0,c===1?0:1)}},15);a.addEventListener("load",function(){setTimeout(function(){a.scrollTo(0,c===1?0:1)},0)},!1)}}}Array.prototype.remove=function(a,b){var c=this.slice((b||a)+1||this.length);this.length=a<0?this.length+a:a;return this.push.apply(this,c)};Date.prototype.getWeek=function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil(((this-a)/864e5+a.getDay()+1)/7)};Date.prototype.getDayOfYear=function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil((this-a)/864e5)};var is={Null:function(a){return a===null},Undefined:function(a){return a===undefined},nt:function(a){return a===null||a===undefined},Function:function(a){return typeof a=="function"?a.constructor.toString().match(/Function/)!==null:!1},String:function(a){return typeof a=="string"?!0:typeof a=="object"?a.constructor.toString().match(/string/i)!==null:!1},Array:function(a){return typeof a=="object"?a.constructor.toString().match(/array/i)!==null||a.length!==undefined:!1},Boolean:function(a){return typeof a=="boolean"?!0:typeof a=="object"?a.constructor.toString().match(/boolean/i)!==null:!1},Date:function(a){return typeof a=="date"?!0:typeof a=="object"?a.constructor.toString().match(/date/i)!==null:!1},HTML:function(a){return typeof a=="object"?a.constructor.toString().match(/html/i)!==null:!1},Number:function(a){return typeof a=="number"?!0:typeof a=="object"?a.constructor.toString().match(/Number/)!==null:!1},Object:function(a){return typeof a=="object"?a.constructor.toString().match(/object/i)!==null:!1},RegExp:function(a){return typeof a=="function"?a.constructor.toString().match(/reg
|
|
|
|
.twitter.que.remove(0)}},getHTML:function(a){var b="http://api.twitter.com/1/statuses/oembed.json?id="+a+"&callback=?";VMM.getJSON(b,VMM.ExternalAPI.twitter.onJSONLoaded)},onJSONLoaded:function(a){trace("TWITTER JSON LOADED");var b=a.id;VMM.attachElement("#"+b,VMM.Util.linkify_with_twitter(a.html))},parseTwitterDate:function(a){var b=new Date(Date.parse(a));return b},prettyParseTwitterDate:function(a){var b=new Date(Date.parse(a));return VMM.Date.prettyDate(b,!0)},getTweets:function(a){var b=[],c=a.length;for(var d=0;d<a.length;d++){var e="";a[d].tweet.match("status/")?e=a[d].tweet.split("status/")[1]:a[d].tweet.match("statuses/")?e=a[d].tweet.split("statuses/")[1]:e="";var f="http://api.twitter.com/1/statuses/show.json?id="+e+"&include_entities=true&callback=?";VMM.getJSON(f,function(a){var d={},e="<div class='twitter'><blockquote><p>",f=VMM.Util.linkify_with_twitter(a.text,"_blank");e+=f;e+="</p>";e+="— "+a.user.name+" (<a href='https://twitter.com/"+a.user.screen_name+"'>@"+a.user.screen_name+"</a>) <a href='https://twitter.com/"+a.user.screen_name+"/status/"+a.id+"'>"+VMM.ExternalAPI.twitter.prettyParseTwitterDate(a.created_at)+" </a></blockquote></div>";d.content=e;d.raw=a;b.push(d);if(b.length==c){var g={tweetdata:b};VMM.fireEvent(global,"TWEETSLOADED",g)}}).success(function(){trace("second success")}).error(function(){trace("error")}).complete(function(){trace("complete")})}},getTweetSearch:function(a,b){var c=40;b!=null&&b!=""&&(c=b);var d="http://search.twitter.com/search.json?q="+a+"&rpp="+c+"&include_entities=true&result_type=mixed",e=[];VMM.getJSON(d,function(a){for(var b=0;b<a.results.length;b++){var c={},d="<div class='twitter'><blockquote><p>",f=VMM.Util.linkify_with_twitter(a.results[b].text,"_blank");d+=f;d+="</p>";d+="— "+a.results[b].from_user_name+" (<a href='https://twitter.com/"+a.results[b].from_user+"'>@"+a.results[b].from_user+"</a>) <a href='https://twitter.com/"+a.results[b].from_user+"/status/"+a.id+"'>"+VMM.ExternalAPI.twitter.prettyParseTwitterDate(a.results[b].created_at)+" </a></blockquote></div>";c.content=d;c.raw=a.results[b];e.push(c)}var g={tweetdata:e};VMM.fireEvent(global,"TWEETSLOADED",g)})},prettyHTML:function(a,b){var a=a.toString(),c={twitterid:a},d="http://api.twitter.com/1/statuses/show.json?id="+a+"&include_entities=true&callback=?",e=setTimeout(VMM.ExternalAPI.twitter.errorTimeOut,VMM.master_config.timers.api,a);VMM.getJSON(d,VMM.ExternalAPI.twitter.formatJSON).error(function(b,c,d){trace("TWITTER error");trace("TWITTER ERROR: "+c+" "+b.responseText);VMM.attachElement("#twitter_"+a,"<p>ERROR LOADING TWEET "+a+"</p>")}).success(function(a){clearTimeout(e);b&&VMM.ExternalAPI.twitter.secondaryMedia(a)})},formatJSON:function(a){var b=a.id_str,c="<blockquote><p>",d=VMM.Util.linkify_with_twitter(a.text,"_blank");c+=d;c+="</p></blockquote>";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 class='thumbnail-inline'></span></span>";c+="</a>";c+="</div>";typeof a.entities.media!="undefined"&&a.entities.media[0].type=="photo"&&(c+="<img src=' "+a.entities.media[0].media_url+"' alt=''>");VMM.attachElement("#twitter_"+b.toString(),c);VMM.attachElement("#text_thumb_"+b.toString(),a.text)}},googlemaps:{get:function(a,b){var c,d,e;e=VMM.Util.getUrlVars(a);VMM.master_config.Timeline.api_keys.google!=""?d=VMM.master_config.Timeline.api_keys.google:d=Aes.Ctr.decrypt(VMM.master_config.api_keys_master.google,VMM.master_config.vp,256);var f="http://maps.googleapis.com/maps/api/js?key="+d+"&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady",g={url:a,vars:e,id:b};if(VMM.master_config.googlemaps.active)VMM.master_config.googlemaps.que.push(g);else{VMM.master_config.googlemaps.que.push(g);VMM.master_config.googlemaps.api_loaded||VMM.LoadLib.js(f,function(){trace("G
|
|
|
|
d;VMM.DragSlider.width=c;VMM.DragSlider.makeDraggable(a,b);VMM.DragSlider.drag_elem=a;VMM.DragSlider.sticky=e},makeDraggable:function(a,b){VMM.bindEvent(a,VMM.DragSlider.onDragStart,"mousedown",{element:b,delement:a});VMM.bindEvent(a,VMM.DragSlider.onDragEnd,"mouseup",{element:b,delement:a});VMM.bindEvent(a,VMM.DragSlider.onDragLeave,"mouseleave",{element:b,delement:a})},cancelSlide:function(a){VMM.unbindEvent(VMM.DragSlider.drag_elem,VMM.DragSlider.onDragMove,"mousemove");return!0},onDragLeave:function(a){VMM.unbindEvent(a.data.delement,VMM.DragSlider.onDragMove,"mousemove");a.preventDefault();a.stopPropagation();return!0},onDragStart:function(a){VMM.DragSlider.dragStart(a.data.element,a.data.delement,a);a.preventDefault();a.stopPropagation();return!0},onDragEnd:function(a){a.preventDefault();a.stopPropagation();if(VMM.DragSlider.sliding){VMM.DragSlider.sliding=!1;VMM.DragSlider.dragEnd(a.data.element,a.data.delement,a);return!1}return!0},onDragMove:function(a){VMM.DragSlider.dragMove(a.data.element,a);a.preventDefault();a.stopPropagation();return!1},dragStart:function(a,b,c){VMM.DragSlider.startX=c.pageX;VMM.DragSlider.startLeft=VMM.DragSlider.getLeft(a);VMM.DragSlider.dragStartTime=(new Date).getTime();VMM.DragSlider.dragWidth=VMM.Lib.width(b);var d=Math.round(VMM.DragSlider.startX-c.pageX-VMM.DragSlider.startLeft);VMM.Lib.stop(a);VMM.bindEvent(b,VMM.DragSlider.onDragMove,"mousemove",{element:a})},dragEnd:function(a,b,c){VMM.unbindEvent(b,VMM.DragSlider.onDragMove,"mousemove");VMM.DragSlider.getLeft(a)>0||VMM.DragSlider.dragMomentum(a,c)},dragMove:function(a,b){!!VMM.DragSlider.sliding;VMM.DragSlider.sliding=!0;if(VMM.DragSlider.startX>b.pageX){VMM.Lib.css(a,"left",-(VMM.DragSlider.startX-b.pageX-VMM.DragSlider.startLeft));VMM.DragSlider.slidingLeft=!0}else{var c=b.pageX-VMM.DragSlider.startX+VMM.DragSlider.startLeft;VMM.Lib.css(a,"left",-(VMM.DragSlider.startX-b.pageX-VMM.DragSlider.startLeft));VMM.DragSlider.slidingLeft=!1}},dragMomentum:function(a,b){var c=((new Date).getTime()-VMM.DragSlider.dragStartTime)*10,d=c,e=VMM.DragSlider.getLeft(a),f=6e3*(Math.abs(VMM.DragSlider.startLeft)-Math.abs(e));c=Math.round(f/c);var g=e+c,h=g%VMM.DragSlider.width,i={left:Math.min(g),time:d};VMM.fireEvent(a,"DRAGUPDATE",[i]);var j="easeOutExpo";i.time>0&&VMM.Lib.animate(a,i.time,j,{left:i.left})},getLeft:function(a){return parseInt(VMM.Lib.css(a,"left").substring(0,VMM.Lib.css(a,"left").length-2),10)}});typeof VMM!="undefined"&&typeof VMM.Slider=="undefined"&&(VMM.Slider=function(a,b){function u(){trace("onConfigSet")}function v(a,b){var c=!0,e=!1;a!=null&&(c=a);b!=null&&(e=b);n=d.slider.width;d.slider.nav.height=VMM.Lib.height(s.prevBtnContainer);d.slider.content.width=n-d.slider.content.padding*2;VMM.Lib.width(h,j.length*d.slider.content.width);if(e){var i=j[m].leftpos();VMM.Lib.css(g,"left",i)}G();H();VMM.Lib.css(s.nextBtn,"left",n-d.slider.nav.width);VMM.Lib.height(s.prevBtn,d.slider.height);VMM.Lib.height(s.nextBtn,d.slider.height);VMM.Lib.css(s.nextBtnContainer,"top",d.slider.height/2-d.slider.nav.height/2+10);VMM.Lib.css(s.prevBtnContainer,"top",d.slider.height/2-d.slider.nav.height/2+10);VMM.Lib.height(f,d.slider.height);VMM.Lib.width(f,n);c&&J(m,"linear",1);m==0&&VMM.Lib.visible(s.prevBtn,!1)}function w(a){if(m==j.length-1)VMM.Lib.animate(g,d.duration,d.ease,{left:-j[m].leftpos()});else{J(m+1);A()}}function x(a){if(m==0)J(m);else{J(m-1);A()}}function y(a){switch(a.keyCode){case 39:w(a);break;case 37:x(a)}}function z(a,b){if(k.length==0)for(var c=0;c<j.length;c++)k.push(j[c].leftpos());if(typeof b.left=="number"){var e=b.left,f=-j[m].leftpos();e<f-d.slider_width/3?w():e>f+d.slider_width/3?x():VMM.Lib.animate(g,d.duration,d.ease,{left:f})}else VMM.Lib.animate(g,d.duration,d.ease,{left:f});typeof b.top=="number"&&VMM.Lib.animate(g,d.duration,d.ease,{top:-b.top})}function A(){d.current_slide=m;VMM.fireEvent(r,"UPDATE")}var c={},d,e,f,g,h,i=[],j=[],k=[],l="",m=0,n=960,o={move:!1,x:10,y:0,off:0,dampen:48},p="",q=!1,r=a,s={nextBtn:"",prevBtn:"",nextDate:"",prevDate:"",nextTitle:"",prevTitle:""},t;typeof VMM.Timeline!="undefined"
|
|
|
|
(1);isNaN(t)||(o.current_slide=parseInt(t))}window.onhashchange=function(){if(o.hash_bookmark)if(s){var a=window.location.hash.substring(1);E(parseInt(a))}else s=!1};var u=function(a){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;o.nav.height=200;o.feature.width=o.width;o.feature.height=o.height-o.nav.height;VMM.Timeline.Config=o;VMM.master_config.Timeline=VMM.Timeline.Config;this.events=o.events},v=function(a,b){e=VMM.getElement(k);VMM.Lib.addClass(k,"vmm-timeline");f=VMM.appendAndGetElement(e,"<div>","feedback","");g=VMM.appendAndGetElement(f,"<div>","messege","Timeline");h=new VMM.Slider(k+" div.slider",o);i=new VMM.Timeline.TimeNav(k+" div.navigation");p?VMM.Lib.width(e,o.width):o.width=VMM.Lib.width(e);q?VMM.Lib.height(e,o.height):o.height=VMM.Lib.height(e)},E=function(a){if(a<=n.length-1&&a>=0){o.current_slide=a;h.setSlide(o.current_slide);i.setMarker(o.current_slide,o.ease,o.duration)}};this.init=function(c,d,h){type.of(d)=="string"&&(d.match("#")?k=d:k="#"+d);u(h);v(a,b);trace("TIMELINE INIT");VMM.Date.setLanguage(VMM.Timeline.Config.language);VMM.master_config.language=VMM.Timeline.Config.language;f=VMM.appendAndGetElement(e,"<div>","feedback","");g=VMM.appendAndGetElement(f,"<div>","messege",VMM.master_config.language.messages.loading_timeline);VMM.bindEvent(global,w,o.events.data_ready);VMM.bindEvent(global,H,o.events.messege);if(VMM.Browser.browser=="MSIE"&&parseInt(VMM.Browser.version,10)==7){r=!0;VMM.fireEvent(global,o.events.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")};this.reload=function(a){trace("loadNewDates"+a);g=VMM.appendAndGetElement(f,"<div>","messege",VMM.master_config.language.messages.loading_timeline);m={};VMM.Timeline.DataObj.getData(a)};var G=function(a){VMM.getJSON(a,function(a){m=VMM.Timeline.DataObj.getData(a);VMM.fireEvent(global,o.events.data_ready)})},H=function(a,b){trace("showMessege "+b);VMM.attachElement(g,b)},I=function(){VMM.Lib.animate(f,o.duration,o.ease*4,{opacity:0},J)},J=function(){VMM.Lib.detach(f)},K=function(){o.start_at_end&&o.current_slide==0&&(o.current_slide=n.length-1);VMM.attachElement(e,"");VMM.appendElement(e,"<div class='container main'><div class='feature'><div class='slider'></div></div><div class='navigation'></div></div>");y();VMM.bindEvent("div.slider",z,"LOADED");VMM.bindEvent("div.navigation",B,"LOADED");VMM.bindEvent("div.slider",C,"UPDATE");VMM.bindEvent("div.navigation",D,"UPDATE");h.init(n);i.init(n,m.era);VMM.bindEvent(global,y,o.events.resize)},L=function(){trace("UPDATE SIZE");o.width=VMM.Lib.width(e);o.height=VMM.Lib.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},M=function(){n=[];VMM.fireEvent(global,o.events.messege,"Building Dates");L();for(var a=0;a<m.date.length;a++)if(m.date[a].startDate!=null&&m.date[a].startDate!=""){var b={};m.date[a].type=="tweets"?b.startdate=VMM.ExternalAPI.twitter.parseTwitterDate(m.date[a].startDate):b.startdate=VMM.Date.parse(m.date[a].startDate);if(!isNaN(b.startdate)){m.date[a].endDate!=null&&m.date[a].endDate!=""?m.date[a].type=="tweets"?b.enddate=VMM.ExternalAPI.twitter.parseTwitterDate(m.date[a].endDate):b.enddate=VMM.Date.parse(m.date[a].endDate):b.enddate=b.startdate;b.needs_slug=!1;m.date[a].headline==""&&m.date[a].slug!=null&&m.date[a].slug!=""&&(b.needs_slug=!0);b.title=m.date[a].headline;b.headline=m.date[a].headline;b.type=m.date[a].type;b.date=VMM.Date.prettyDate(b.startdate);b.asset=m.date[a].asset;b.fulldate=b.startdate.getTime();b.text=m.date[a].text;b.content="";b.tag=m.date[a].tag;b.slug=m.date[a].slug;b.uniqueid=VMM.Util.unique_ID(7);n.push(b)}}m.type!="storify"&&n.sort(functio
|
|
|
|
g.attribution.thumbnail+"' style='max-width: 32px; max-height: 32px;'></span>";m+="<span class='fn'>"+d+"</span>";m+="<span class='nickname'>"+e+"<span class='thumbnail-inline'></span></span>";m+="</a></div></div>";j.text=m;if(f+1>=a.content.elements.length)j.startDate=a.content.elements[f-1].posted_at;else if(a.content.elements[f+1].type=="text"&&a.content.elements[f+1].permalink.match("storify"))if(f+2>=a.content.elements.length)j.startDate=a.content.elements[f-1].posted_at;else if(a.content.elements[f+2].type=="text"&&a.content.elements[f+2].permalink.match("storify"))if(f+3>=a.content.elements.length)j.startDate=a.content.elements[f-1].posted_at;else if(a.content.elements[f+3].type=="text"&&a.content.elements[f+3].permalink.match("storify"))j.startDate=a.content.elements[f-1].posted_at;else{trace("LEVEL 3");j.startDate=a.content.elements[f+3].posted_at}else{trace("LEVEL 2");j.startDate=a.content.elements[f+2].posted_at}else{trace("LEVEL 1");j.startDate=a.content.elements[f+1].posted_at}j.endDate=j.startDate}}else if(g.type=="video"){j.headline=g.data.video.title;j.asset.caption=g.data.video.description;j.asset.caption=g.source.username;j.asset.media=g.data.video.src}else{trace("NO MATCH ");trace(g)}h&&(j.slug=VMM.Util.untagify(g.data.text));b.timeline.date.push(j)}VMM.fireEvent(global,VMM.Timeline.Config.events.data_ready,b)}},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,VMM.Timeline.Config.events.data_ready,c)}}},data_template_obj:{timeline:{headline:"",description:"",asset:{media:"",credit:"",caption:""},date:[]}},date_obj:{startDate:"2012,2,2,11,30",headline:"",text:"",asset:{media:"http://youtu.be/vjVfu8-Wp6s",credit:"",caption:""},tags:"Optional"}});VMM.debug=!1;
|