";typeof t.entities.media!="undefined"&&t.entities.media[0].type=="photo";r+=" ";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="",i=VMM.Util.linkify_with_twitter(t.text,"_blank");r+=i;r+="
You've reached the maximum number of tweets you can load in an hour.
";n+="You can view tweets again starting at:
"+t.reset_time+"
Still waiting on Twitter. "+e.mid+"
";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",s=VMM.Util.linkify_with_twitter(e.text,"_blank");i+=s;i+="
";i+="— "+e.user.name+" (@"+e.user.screen_name+") "+VMM.ExternalAPI.twitter.prettyParseTwitterDate(e.created_at)+"
";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,"",s=VMM.Util.linkify_with_twitter(e.results[t].text,"_blank");r+=s;r+="
";r+="— "+e.results[t].from_user_name+" (@"+e.results[t].from_user+") "+VMM.ExternalAPI.twitter.prettyParseTwitterDate(e.results[t].created_at)+"
ERROR LOADING TWEET "+e+"
")}).success(function(e){clearTimeout(i);t&&VMM.ExternalAPI.twitter.secondaryMedia(e)})},formatJSON:function(e){var t=e.id_str,n="";n+=" ";typeof e.entities.media!="undefined"&&e.entities.media[0].type=="photo"&&(n+="");VMM.attachElement("#twitter_"+t.toString(),n);VMM.attachElement("#text_thumb_"+t.toString(),e.text)}},googlemaps:{maptype:"toner",setMapType:function(e){e!=""&&(VMM.ExternalAPI.googlemaps.maptype=e)},get:function(e){var t,n,r;e.vars=VMM.Util.getUrlVars(e.id);VMM.ExternalAPI.keys.google!=""?n=VMM.ExternalAPI.keys.google:n=Aes.Ctr.decrypt(VMM.ExternalAPI.keys_master.google,VMM.ExternalAPI.keys_master.vp,256);r="http://maps.googleapis.com/maps/api/js?key="+n+"&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady";if(VMM.master_config.googlemaps.active)VMM.master_config.googlemaps.que.push(e);else{VMM.master_config.googlemaps.que.push(e);VMM.master_config.googlemaps.api_loaded||LoadLib.js(r,function(){trace("Google Maps API Library Loaded")})}},create:function(e){VMM.ExternalAPI.googlemaps.createAPIMap(e)},createiFrameMap:function(e){var t=e.id+"&output=embed",n="",r=e.uid.toString()+"_gmap";n+="",r=VMM.Util.linkify_with_twitter(e.text,"_blank");n+=r;n+="
"+t.object.attachments[r].content+"
";o+="";o+="ERROR LOADING GOOGLE+
"+i.error.message+"
"))}).success(function(e){clearTimeout(googleplus_timeout);clearTimeout(callback_timeout);t()})},pushQue:function(){if(VMM.master_config.googleplus.que.length>0){VMM.ExternalAPI.googleplus.create(VMM.master_config.googleplus.que[0],VMM.ExternalAPI.googleplus.pushQue);VMM.master_config.googleplus.que.remove(0)}},errorTimeOut:function(e){trace("GOOGLE+ JSON ERROR TIMEOUT "+e.activity);VMM.attachElement("#googleplus_"+e.activity,VMM.MediaElement.loadingmessage("Still waiting on GOOGLE+
"+e.activity+"
"))}},googledocs:{get:function(e){VMM.master_config.googledocs.que.push(e);VMM.master_config.googledocs.active=!0},create:function(e){var t="";e.id.match(/docs.google.com/i)?t="":t="";VMM.attachElement("#"+e.uid,t)},pushQue:function(){for(var e=0;eWikipedia entry unable to load using Internet Explorer 8 or below.
";VMM.attachElement("#"+e.uid,r)}VMM.getJSON(n,function(t){if(t.query){var n,r,i="",s="",o=1,u=[];n=VMM.Util.getObjectAttributeByIndex(t.query.pages,0).extract;r=VMM.Util.getObjectAttributeByIndex(t.query.pages,0).title;n.match("")?u=n.split("
"):u.push(n);for(var a=0;a Wikipedia is not responding "+o.data.text.replace(/<\s*\/?\s*b\s*.*?>/g,"")+" You've reached the maximum number of tweets you can load in an hour. You can view tweets again starting at: Still waiting on Twitter. "+e.mid+" ",s=VMM.Util.linkify_with_twitter(e.text,"_blank");i+=s;i+=" ",s=VMM.Util.linkify_with_twitter(e.results[t].text,"_blank");r+=s;r+=" ERROR LOADING TWEET "+e+" ",r=VMM.Util.linkify_with_twitter(e.text,"_blank");n+=r;n+=" "+t.object.attachments[r].content+" ERROR LOADING GOOGLE+ "+i.error.message+" Still waiting on GOOGLE+ "+e.activity+" Wikipedia entry unable to load using Internet Explorer 8 or below. ")?u=n.split(" "):u.push(n);for(var a=0;a Wikipedia is not responding The requested content cannot be loaded. "+o.data.text.replace(/<\s*\/?\s*b\s*.*?>/g,"")+" The requested content cannot be loaded."+r+"
";i+=""+VMM.master_config.language.messages.wikipedia+"";i+=VMM.Util.linkify_wikipedia(s);n.match("REDIRECT")||VMM.attachElement("#"+e.uid,i)}}).error(function(n,r,i){trace("WIKIPEDIA error");trace("WIKIPEDIA ERROR: "+r+" "+n.responseText);trace(i);VMM.attachElement("#"+e.uid,VMM.MediaElement.loadingmessage(""+v+"
");else{VMM.appendElement(f,""+v+"
");VMM.appendElement(f,""+v+"
")}VMM.Lib.attr(u,"id",("marker_"+T[r].uniqueid).toString());VMM.bindEvent(a,Q,"",{number:r});VMM.bindEvent(a,G,"mouseenter mouseleave",{number:r,elem:a});d={marker:u,flag:a,lineevent:p,type:"marker",full:!0,relative_pos:_marker_relative_pos,tag:T[r].tag,pos_left:0};if(T[r].type=="start"){trace("BUILD MARKER HAS START PAGE");b.start_page=!0;d.type="start"}T[r].type=="storify"&&(d.type="storify");T[r].tag&&A.push(T[r].tag);C.push(d)}A=VMM.Util.deDupeArray(A);A.length>3?b.nav.rows.current=b.nav.rows.half:b.nav.rows.current=b.nav.rows.full;for(i=0;i"+A[i]+"
";n+=" ";n+=""+o.data.quote.text.replace(/<\s*\/?\s*b\s*.*?>/g,"")+"
"}}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=""+o.data.link.title+"";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="
";h+="
mmm d',' yyyy''"},month:["January","February","March","April","May","June","July","August","September","October","November","December"],month_abbr:["Jan.","Feb.","March","April","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."],day:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],day_abbr:["Sun.","Mon.","Tues.","Wed.","Thurs.","Fri.","Sat."],hour:[1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12],hour_suffix:["am"],bc_format:{year:"yyyy",month_short:"mmm",month:"mmmm yyyy",full_short:"mmm d",full:"mmmm d',' yyyy",time_no_seconds_short:"h:MM TT",time_no_seconds_small_date:"dddd', 'h:MM TT'
'mmmm d',' yyyy''",full_long:"dddd',' mmm d',' yyyy 'at' hh:MM TT",full_long_small_date:"hh:MM TT'
'dddd',' mmm d',' yyyy''"},setLanguage:function(e){trace("SET DATE LANGUAGE");VMM.Date.dateformats=e.dateformats;VMM.Date.month=e.date.month;VMM.Date.month_abbr=e.date.month_abbr;VMM.Date.day=e.date.day;VMM.Date.day_abbr=e.date.day_abbr;dateFormat.i18n.dayNames=e.date.day_abbr.concat(e.date.day);dateFormat.i18n.monthNames=e.date.month_abbr.concat(e.date.month)},parse:function(e,t){"use strict";var n,r,i,s,o={year:!1,month:!1,day:!1,hour:!1,minute:!1,second:!1,millisecond:!1};if(type.of(e)=="date"){trace("DEBUG THIS, ITs A DATE");n=e}else{n=new Date(0,0,1,0,0,0,0);if(e.match(/,/gi)){r=e.split(",");for(var u=0;u
")},unique_ID:function(e){var t=function(e){return Math.floor(Math.random()*e)},n=function(){var e="abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ";return e.substr(t(62),1)},r=function(e){var t="";for(var r=0;r
mmm d',' yyyy''"},messages:{loading_timeline:"Loading Timeline... ",return_to_title:"Return to Title",expand_timeline:"Expand Timeline",contract_timeline:"Contract Timeline",wikipedia:"From Wikipedia, the free encyclopedia",loading_content:"Loading Content",loading:"Loading"}});typeof VMM!="undefined"&&typeof VMM.ExternalAPI=="undefined"&&(VMM.ExternalAPI={keys:{google:"",flickr:"",twitter:""},keys_master:{vp:"Pellentesque nibh felis, eleifend id, commodo in, interdum vitae, leo",flickr:"RAIvxHY4hE/Elm5cieh4X5ptMyDpj7MYIxziGxi0WGCcy1s+yr7rKQ==",google:"jwNGnYw4hE9lmAez4ll0QD+jo6SKBJFknkopLS4FrSAuGfIwyj57AusuR0s8dAo=",twitter:""},init:function(){return this},setKeys:function(e){VMM.ExternalAPI.keys=e},pushQues:function(){VMM.master_config.googlemaps.active&&VMM.ExternalAPI.googlemaps.pushQue();VMM.master_config.youtube.active&&VMM.ExternalAPI.youtube.pushQue();VMM.master_config.soundcloud.active&&VMM.ExternalAPI.soundcloud.pushQue();VMM.master_config.googledocs.active&&VMM.ExternalAPI.googledocs.pushQue();VMM.master_config.googleplus.active&&VMM.ExternalAPI.googleplus.pushQue();VMM.master_config.wikipedia.active&&VMM.ExternalAPI.wikipedia.pushQue();VMM.master_config.vimeo.active&&VMM.ExternalAPI.vimeo.pushQue();VMM.master_config.vine.active&&VMM.ExternalAPI.vine.pushQue();VMM.master_config.twitter.active&&VMM.ExternalAPI.twitter.pushQue();VMM.master_config.flickr.active&&VMM.ExternalAPI.flickr.pushQue();VMM.master_config.webthumb.active&&VMM.ExternalAPI.webthumb.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=?";VMM.ExternalAPI.twitter.getOEmbed(e,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="
"+t.reset_time+"
";n+=" ";typeof e.entities.media!="undefined"&&e.entities.media[0].type=="photo"&&(n+="");VMM.attachElement("#twitter_"+t.toString(),n);VMM.attachElement("#text_thumb_"+t.toString(),e.text)}},googlemaps:{maptype:"toner",setMapType:function(e){e!=""&&(VMM.ExternalAPI.googlemaps.maptype=e)},get:function(e){var t,n,r;e.vars=VMM.Util.getUrlVars(e.id);VMM.ExternalAPI.keys.google!=""?n=VMM.ExternalAPI.keys.google:n=Aes.Ctr.decrypt(VMM.ExternalAPI.keys_master.google,VMM.ExternalAPI.keys_master.vp,256);r="http://maps.googleapis.com/maps/api/js?key="+n+"&v=3.9&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady";if(VMM.master_config.googlemaps.active)VMM.master_config.googlemaps.que.push(e);else{VMM.master_config.googlemaps.que.push(e);VMM.master_config.googlemaps.api_loaded||LoadLib.js(r,function(){trace("Google Maps API Library Loaded")})}},create:function(e){VMM.ExternalAPI.googlemaps.createAPIMap(e)},createiFrameMap:function(e){var t=e.id+"&output=embed",n="",r=e.uid.toString()+"_gmap";n+=""+t.object.attachments[r].displayName+"
";o+=""+e.url+"
";r+=""+VMM.master_config.language.messages.wikipedia+"";r+=""+r+"
";i+=""+VMM.master_config.language.messages.wikipedia+"";i+=VMM.Util.linkify_wikipedia(s);n.match("REDIRECT")||VMM.attachElement("#"+e.uid,i)}}).error(function(n,r,i){trace("WIKIPEDIA error");trace("WIKIPEDIA ERROR: "+r+" "+n.responseText);trace(i);VMM.attachElement("#"+e.uid,VMM.MediaElement.loadingmessage("
Please try again later."+v+"
");else{VMM.appendElement(f,""+v+"
");VMM.appendElement(f,""+v+"
")}VMM.Lib.attr(u,"id",("marker_"+T[r].uniqueid).toString());VMM.bindEvent(a,Q,"",{number:r});VMM.bindEvent(a,G,"mouseenter mouseleave",{number:r,elem:a});d={marker:u,flag:a,lineevent:p,type:"marker",full:!0,relative_pos:_marker_relative_pos,tag:T[r].tag,pos_left:0};if(T[r].type=="start"){trace("BUILD MARKER HAS START PAGE");b.start_page=!0;d.type="start"}T[r].type=="storify"&&(d.type="storify");T[r].tag&&A.push(T[r].tag);C.push(d)}A=VMM.Util.deDupeArray(A);A.length>3?b.nav.rows.current=b.nav.rows.half:b.nav.rows.current=b.nav.rows.full;for(i=0;i"+A[i]+"
";n+=" ";n+=""+o.data.quote.text.replace(/<\s*\/?\s*b\s*.*?>/g,"")+"
"}}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=""+o.data.link.title+"";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="
";h+="
'mmmm d',' yyyy''",
full_long: "mmm d',' yyyy 'at' hh:MM TT",
@@ -1277,6 +1284,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Date == 'undefined') {
};
if (type.of(d) == "date") {
+ trace("DEBUG THIS, ITs A DATE");
date = d;
} else {
date = new Date(0, 0, 1, 0, 0, 0, 0);
@@ -1308,11 +1316,15 @@ if(typeof VMM != 'undefined' && typeof VMM.Date == 'undefined') {
}
if (date_array[5]) {
date.setSeconds(date_array[5]);
- p.second = true;
+ if (date_array[5] >= 1) {
+ p.second = true;
+ }
}
if (date_array[6]) {
date.setMilliseconds(date_array[6]);
- p.millisecond = true;
+ if (date_array[6] >= 1) {
+ p.millisecond = true;
+ }
}
} else if (d.match("/")) {
if (d.match(" ")) {
@@ -1398,7 +1410,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Date == 'undefined') {
p.second = true;
p.millisecond = true;
}
- } else if (d.length <= 5) {
+ } else if (d.length <= 8) {
p.year = true;
date.setFullYear(parseInt(d, 10));
date.setMonth(0);
@@ -1423,11 +1435,15 @@ if(typeof VMM != 'undefined' && typeof VMM.Date == 'undefined') {
}
if (time_array[2] >= 1) {
date.setSeconds(time_array[2]);
- p.second = true;
+ if (time_array[2] >= 1) {
+ p.second = true;
+ }
}
if (time_array[3] >= 1) {
date.setMilliseconds(time_array[3]);
- p.millisecond = true;
+ if (time_array[3] >= 1) {
+ p.millisecond = true;
+ }
}
}
date_array = time_parse[0].split("-");
@@ -1446,15 +1462,19 @@ if(typeof VMM != 'undefined' && typeof VMM.Date == 'undefined') {
} else {
date = new Date(Date.parse(d));
+ p.year = true;
+ p.month = true;
+ p.day = true;
+ p.hour = true;
+ p.minute = true;
+ if (date.getSeconds() >= 1) {
+ p.second = true;
+ }
+ if (date.getMilliseconds() >= 1) {
+ p.millisecond = true;
+ }
}
} else {
- p.year = true;
- p.month = true;
- p.day = true;
- p.hour = true;
- p.minute = true;
- p.second = true;
- p.millisecond = true;
date = new Date(
parseInt(d.slice(0,4), 10),
parseInt(d.slice(4,6), 10) - 1,
@@ -1462,6 +1482,18 @@ if(typeof VMM != 'undefined' && typeof VMM.Date == 'undefined') {
parseInt(d.slice(8,10), 10),
parseInt(d.slice(10,12), 10)
);
+ p.year = true;
+ p.month = true;
+ p.day = true;
+ p.hour = true;
+ p.minute = true;
+ if (date.getSeconds() >= 1) {
+ p.second = true;
+ }
+ if (date.getMilliseconds() >= 1) {
+ p.millisecond = true;
+ }
+
}
}
@@ -1497,7 +1529,14 @@ if(typeof VMM != 'undefined' && typeof VMM.Date == 'undefined') {
if (type.of(d) == "date") {
if (type.of(p) == "object") {
- if (p.millisecond || p.second || p.minute) {
+ if (p.millisecond || p.second && d.getSeconds() >= 1) {
+ // YEAR MONTH DAY HOUR MINUTE
+ if (is_abbr){
+ format = VMM.Date.dateformats.time_short;
+ } else {
+ format = VMM.Date.dateformats.time_short;
+ }
+ } else if (p.minute) {
// YEAR MONTH DAY HOUR MINUTE
if (is_abbr){
format = VMM.Date.dateformats.time_no_seconds_short;
@@ -1985,7 +2024,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
// http://, https://, ftp://
var urlPattern = /\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim;
var url_pattern = /(\()((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\))|(\[)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\])|(\{)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(\})|(<|&(?:lt|#60|#x3c);)((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]+)(>|&(?:gt|#62|#x3e);)|((?:^|[^=\s'"\]])\s*['"]?|[^=\s]\s+)(\b(?:ht|f)tps?:\/\/[a-z0-9\-._~!$'()*+,;=:\/?#[\]@%]+(?:(?!&(?:gt|#0*62|#x0*3e);|&(?:amp|apos|quot|#0*3[49]|#x0*2[27]);[.!&',:?;]?(?:[^a-z0-9\-._~!$&'()*+,;=:\/?#[\]@%]|$))&[a-z0-9\-._~!$'()*+,;=:\/?#[\]@%]*)*[a-z0-9\-_~$()*+=\/#[\]@%])/img;
- var url_replace = '$1$4$7$10$13$2$5$8$11$14$3$6$9$12';
+ var url_replace = '$1$4$7$10$13$2$5$8$11$14$3$6$9$12';
// www. sans http:// or https://
var pseudoUrlPattern = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
@@ -2724,6 +2763,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Language == 'undefined') {
month: "mmmm yyyy",
full_short: "mmm d",
full: "mmmm d',' yyyy",
+ time_short: "h:MM:ss TT",
time_no_seconds_short: "h:MM TT",
time_no_seconds_small_date: "h:MM TT'
'mmmm d',' yyyy''",
full_long: "mmm d',' yyyy 'at' h:MM TT",
@@ -2824,9 +2864,14 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
var id = tweet.mid.toString(),
error_obj = { twitterid: tweet.mid },
- the_url = "http://api.twitter.com/1/statuses/show.json?id=" + tweet.mid + "&include_entities=true&callback=?",
- twitter_timeout = setTimeout(VMM.ExternalAPI.twitter.errorTimeOut, VMM.master_config.timers.api, tweet),
- callback_timeout= setTimeout(callback, VMM.master_config.timers.api, tweet);
+ the_url = "http://api.twitter.com/1/statuses/show.json?id=" + tweet.mid + "&include_entities=true&callback=?";
+ //twitter_timeout = setTimeout(VMM.ExternalAPI.twitter.errorTimeOut, VMM.master_config.timers.api, tweet),
+ //callback_timeout= setTimeout(callback, VMM.master_config.timers.api, tweet);
+
+ VMM.ExternalAPI.twitter.getOEmbed(tweet, callback);
+
+ /*
+ // Disabled thanks to twitter's new api
VMM.getJSON(the_url, function(d) {
var id = d.id_str,
@@ -2871,6 +2916,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
callback();
});
+ */
},
errorTimeOut: function(tweet) {
@@ -2893,18 +2939,65 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
},
+ errorTimeOutOembed: function(tweet) {
+ trace("TWITTER JSON ERROR TIMEOUT " + tweet.mid);
+ VMM.attachElement("#"+tweet.id.toString(), VMM.MediaElement.loadingmessage("Still waiting on Twitter: " + tweet.mid) );
+ },
+
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);
}
},
-
-
+
+ getOEmbed: function(tweet, callback) {
+
+ var the_url = "http://api.twitter.com/1/statuses/oembed.json?id=" + tweet.mid + "&omit_script=true&include_entities=true&callback=?",
+ twitter_timeout = setTimeout(VMM.ExternalAPI.twitter.errorTimeOutOembed, VMM.master_config.timers.api, tweet);
+ //callback_timeout= setTimeout(callback, VMM.master_config.timers.api, tweet);
+
+ VMM.getJSON(the_url, function(d) {
+ var twit = "",
+ tuser = "";
+
+
+ // TWEET CONTENT
+ twit += d.html.split("<\/p>\—")[0] + "";
+ tuser = d.author_url.split("twitter.com\/")[1];
+
+
+ // TWEET AUTHOR
+ twit += " ";
+
+ VMM.attachElement("#"+tweet.id.toString(), twit );
+ VMM.attachElement("#text_thumb_"+tweet.id.toString(), d.html );
+ VMM.attachElement("#marker_content_" + tweet.id.toString(), d.html );
+ })
+ .error(function(jqXHR, textStatus, errorThrown) {
+ trace("TWITTER error");
+ trace("TWITTER ERROR: " + textStatus + " " + jqXHR.responseText);
+ clearTimeout(twitter_timeout);
+ //clearTimeout(callback_timeout);
+ VMM.attachElement("#"+tweet.id, VMM.MediaElement.loadingmessage("ERROR LOADING TWEET " + tweet.mid) );
+ })
+ .success(function(d) {
+ clearTimeout(twitter_timeout);
+ clearTimeout(callback_timeout);
+ callback();
+ });
+
+ },
getHTML: function(id) {
//var the_url = document.location.protocol + "//api.twitter.com/1/statuses/oembed.json?id=" + id+ "&callback=?";
- var the_url = "http://api.twitter.com/1/statuses/oembed.json?id=" + id+ "&callback=?";
+ var the_url = "http://api.twitter.com/1/statuses/oembed.json?id=" + id+ "&omit_script=true&include_entities=true&callback=?";
VMM.getJSON(the_url, VMM.ExternalAPI.twitter.onJSONLoaded);
},
@@ -3095,7 +3188,13 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
api_key = Aes.Ctr.decrypt(VMM.ExternalAPI.keys_master.google, VMM.ExternalAPI.keys_master.vp, 256);
}
- map_url = "http://maps.googleapis.com/maps/api/js?key=" + api_key + "&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady";
+
+ /*
+ Investigating a google map api change on the latest release that causes custom map types to stop working
+ http://stackoverflow.com/questions/13486271/google-map-markermanager-cannot-call-method-substr-of-undefined
+ soulution is to use api ver 3.9
+ */
+ map_url = "http://maps.googleapis.com/maps/api/js?key=" + api_key + "&v=3.9&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady";
if (VMM.master_config.googlemaps.active) {
VMM.master_config.googlemaps.que.push(m);
@@ -3581,7 +3680,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
"stamen": "Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.",
"apple": "Map data © 2012 Apple, Imagery © 2012 Apple"
},
-
+
map_providers: {
"toner": {
"url": "http://{S}tile.stamen.com/toner/{Z}/{X}/{Y}.png",
@@ -4840,6 +4939,7 @@ if(typeof VMM != 'undefined' && typeof VMM.DragSlider == 'undefined') {
function onDragMove(e) {
dragMove(e.data.element, e);
+
}
function dragStart(elem, delem, e) {
@@ -5993,6 +6093,7 @@ if (typeof VMM.Slider != 'undefined') {
if (data.text != null && data.text != "") {
c.has.text = true;
c.text += VMM.createElement("p", VMM.Util.linkify_with_twitter(data.text, "_blank"));
+
}
if (c.has.text || c.has.headline) {
@@ -6038,7 +6139,16 @@ if (typeof VMM.Slider != 'undefined') {
VMM.Lib.addClass($slide, c.layout);
}
-
+ /* ADD MODALS
+ ================================================== */
+ // MOVE TO EVENT LISTENER UP THE FOOD CHAIN
+ /*
+ VMM.modal('.vmm-modal', {
+ openEffect: 'elastic',
+ closeEffect: 'elastic',
+ padding: [2, 2, 2, 2]
+ });
+ */
};
}
@@ -6047,173 +6157,2198 @@ if (typeof VMM.Slider != 'undefined') {
/* **********************************************
- Begin AES.js
+ Begin jquery.fancybox.js
********************************************** */
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-/* AES implementation in JavaScript (c) Chris Veness 2005-2011 */
-/* - see http://csrc.nist.gov/publications/PubsFIPS.html#197 */
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-
-var Aes = {}; // Aes namespace
-
-/**
- * AES Cipher function: encrypt 'input' state with Rijndael algorithm
- * applies Nr rounds (10/12/14) using key schedule w for 'add round key' stage
+/*!
+ * fancyBox - jQuery Plugin
+ * version: 2.1.5 (Fri, 14 Jun 2013)
+ * @requires jQuery v1.6 or later
+ *
+ * Examples at http://fancyapps.com/fancybox/
+ * License: www.fancyapps.com/fancybox/#license
+ *
+ * Copyright 2012 Janis Skarnelis - janis@fancyapps.com
*
- * @param {Number[]} input 16-byte (128-bit) input state array
- * @param {Number[][]} w Key schedule as 2D byte-array (Nr+1 x Nb bytes)
- * @returns {Number[]} Encrypted output state array
*/
-Aes.cipher = function(input, w) { // main Cipher function [§5.1]
- var Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES)
- var Nr = w.length/Nb - 1; // no of rounds: 10/12/14 for 128/192/256-bit keys
- var state = [[],[],[],[]]; // initialise 4xNb byte-array 'state' with input [§3.4]
- for (var i=0; i<4*Nb; i++) state[i%4][Math.floor(i/4)] = input[i];
+(function (window, document, $, undefined) {
+ "use strict";
- state = Aes.addRoundKey(state, w, 0, Nb);
+ var H = $("html"),
+ W = $(window),
+ D = $(document),
+ F = $.fancybox = function () {
+ F.open.apply( this, arguments );
+ },
+ IE = navigator.userAgent.match(/msie/i),
+ didUpdate = null,
+ isTouch = document.createTouch !== undefined,
- for (var round=1; round
Please try again later.