diff --git a/locale/de.js b/locale/de.js index 957b91c..b666b2c 100644 --- a/locale/de.js +++ b/locale/de.js @@ -8,7 +8,7 @@ * ----------------------------------------------------- *//* 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},vp:"Pellentesque nibh felis, eleifend id, commodo in, interdum vitae, leo",keys:{flickr:"RAIvxHY4hE/Elm5cieh4X5ptMyDpj7MYIxziGxi0WGCcy1s+yr7rKQ==",google:"jwNGnYw4hE9lmAez4ll0QD+jo6SKBJFknkopLS4FrSAuGfIwyj57AusuR0s8dAo="},youtube:{active:!1,array:[],api_loaded:!1,que:[]},googlemaps:{active:!1,map_active:!1,places_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+=" "+e);f+=">";b!=null&&b!=""&&(f+=b);f=f+""}return f};VMM.createMediaElement=function(a,b,c){var d="",e=!1;d+="
";if(a!=null&&a!=""){valid=!0;d+="";c!=null&&c!=""&&(d+=VMM.createElement("div",c,"credit"));b!=null&&b!=""&&(d+=VMM.createElement("div",b,"caption"))}d+="
";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)}}}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(/regexp/i)!==null:!1}},type={of:function(a){for(var b in is)if(is[b](a))return b.toLowerCase()}};!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b;this.$element=a(c);this.options=this.getOptions(d);this.enabled=!0;if(this.options.trigger!="manual"){e=this.options.trigger=="hover"?"mouseenter":"focus";f=this.options.trigger=="hover"?"mouseleave":"blur";this.$element.on(e,this.options.selector,a.proxy(this.enter,this));this.$element.on(f,this.options.selector,a.proxy(this.leave,this))}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){b=a.extend({},a.fn[this.type].defaults,b,this.$element.data());b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay});return b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);if(!c.options.delay||!c.options.delay.show)c.show();else{c.hoverState="in";setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show)}},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);if(!c.options.delay||!c.options.delay.hide)c.hide();else{c.hoverState="out";setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)}},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip();this.setContent();this.options.animation&&a.addClass("fade");f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement;b=/in/.test(f);a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body);c=this.getPosition(b);d=a[0].offsetWidth;e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle());a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b);c.remove()})}var b=this,c=this.tip();c.removeClass("in");a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title);a=a.toString().replace(/(^\s*|\s*$)/,"");return a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}};a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f));typeof c=="string"&&e[c]()})};a.fn.tooltip.Constructor=b;a.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'
'}}(window.jQuery);var Aes={};Aes.cipher=function(a,b){var c=4,d=b.length/c-1,e=[[],[],[],[]];for(var f=0;f<4*c;f++)e[f%4][Math.floor(f/4)]=a[f];e=Aes.addRoundKey(e,b,0,c);for(var g=1;g6&&g%c==4&&(f=Aes.subWord(f));for(var i=0;i<4;i++)e[g][i]=e[g-c][i]^f[i]}return e};Aes.subBytes=function(a,b){for(var c=0;c<4;c++)for(var d=0;d>>g*8&255;for(var g=0;g<2;g++)i[g+2]=m>>>g*8&255;for(var g=0;g<4;g++)i[g+4]=l>>>g*8&255;var n="";for(var g=0;g<8;g++)n+=String.fromCharCode(i[g]);var o=Aes.keyExpansion(h),p=Math.ceil(a.length/d),q=new Array(p);for(var r=0;r>>s*8&255;for(var s=0;s<4;s++)i[15-s-4]=r/4294967296>>>s*8;var t=Aes.cipher(i,o),u=r>>o*8&255;for(var o=0;o<4;o++)i[15-o-4]=(m+1)/4294967296-1>>>o*8&255;var p=Aes.cipher(i,j),q=new Array(a[m].length);for(var g=0;g0)while(m++<3){l+="=";n+="\0"}for(m=0;m>18&63;h=f>>12&63;i=f>>6&63;j=f&63;k[m/3]=p.charAt(g)+p.charAt(h)+p.charAt(i)+p.charAt(j)}o=k.join("");o=o.slice(0,o.length-l.length)+l;return o};Base64.decode=function(a,b){b=typeof b=="undefined"?!1:b;var c,d,e,f,g,h,i,j,k=[],l,m,n=Base64.code;m=b?a.decodeUTF8():a;for(var o=0;o>>16&255;d=j>>>8&255;e=j&255;k[o/4]=String.fromCharCode(c,d,e);i==64&&(k[o/4]=String.fromCharCode(c,d));h==64&&(k[o/4]=String.fromCharCode(c))}l=k.join("");return b?l.decodeUTF8():l};var Utf8={};Utf8.encode=function(a){var b=a.replace(/[\u0080-\u07ff]/g,function(a){var b=a.charCodeAt(0);return String.fromCharCode(192|b>>6,128|b&63)});b=b.replace(/[\u0800-\uffff]/g,function(a){var b=a.charCodeAt(0);return String.fromCharCode(224|b>>12,128|b>>6&63,128|b&63)});return b};Utf8.decode=function(a){var b=a.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(a){var b=(a.charCodeAt(0)&15)<<12|(a.charCodeAt(1)&63)<<6|a.charCodeAt(2)&63;return String.fromCharCode(b)});b=b.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(a){var b=(a.charCodeAt(0)&31)<<6|a.charCodeAt(1)&63;return String.fromCharCode(b)});return b};if(typeof VMM!="undefined"){VMM.attachElement=function(a,b){typeof jQuery!="undefined"&&$(a).html(b)};VMM.appendElement=function(a,b){typeof jQuery!="undefined"&&$(a).append(b)};VMM.getHTML=function(a){var b;if(typeof jQuery!="undefined"){b=jQuery(a).html();return b}};VMM.getElement=function(a,b){var c;if(typeof jQuery!="undefined"){b?c=jQuery(a).parent().get(0):c=jQuery(a).get(0);return c}};VMM.bindEvent=function(a,b,c,d){var e,f="click",g={};c!=null&&c!=""&&(f=c);g!=null&&g!=""&&(g=d);typeof jQuery!="undefined"&&jQuery(a).bind(f,g,b)};VMM.unbindEvent=function(a,b,c){var d,e="click",f={};c!=null&&c!=""&&(e=c);typeof jQuery!="undefined"&&jQuery(a).unbind(e,b)};VMM.fireEvent=function(a,b,c){var d,e="click",f=[];b!=null&&b!=""&&(e=b);c!=null&&c!=""&&(f=c);typeof jQuery!="undefined"&&jQuery(a).trigger(e,f)};VMM.getJSON=function(a,b,c){if(typeof jQuery!="undefined"){if(!(VMM.Browser.browser=="Explorer"&&parseInt(VMM.Browser.version,10)>=7&&window.XDomainRequest)){trace("getJSON");return jQuery.getJSON(a,b,c)}trace("it's ie");var d=a;if(d.match("^http://")){trace("RUNNING GET JSON");d=d.replace("http://","//");return jQuery.getJSON(a,b,c)}if(!d.match("^https://"))return jQuery.getJSON(a,b,c);trace("RUNNING XDR");d=d.replace("https://","http://");var e=new XDomainRequest;e.open("get",d);e.onload=function(){var a=VMM.parseJSON(e.responseText);trace(e.responseText);if(type.of(a)!="null"&&type.of(a)!="undefined")return b(a);trace("IE JSON ERROR")};e.send()}};VMM.parseJSON=function(a){if(typeof jQuery!="undefined")return jQuery.parseJSON(a)};VMM.appendAndGetElement=function(a,b,c,d){var e,f="
",g="",h="";b!=null&&b!=""&&(f=b);c!=null&&c!=""&&(g=c);d!=null&&d!=""&&(h=d);if(typeof jQuery!="undefined"){e=$(b);e.addClass(g);e.html(h);jQuery(a).append(e)}return e};VMM.Element={init:function(){return this},hide:function(a,b){b!=null&&b!=""?typeof jQuery!="undefined"&&jQuery(a).hide(b):typeof jQuery!="undefined"&&jQuery(a).hide()},remove:function(a){typeof jQuery!="undefined"&&jQuery(a).remove()},detach:function(a){typeof jQuery!="undefined"&&jQuery(a).detach()},append:function(a,b){typeof jQuery!="undefined"&&jQuery(a).append(b)},show:function(a,b){b!=null&&b!=""?typeof jQuery!="undefined"&&jQuery(a).show(b):typeof jQuery!="undefined"&&jQuery(a).show()},load:function(a,b,c){var d={elem:a};d!=null&&d!=""&&(d=c);typeof jQuery!="undefined"&&jQuery(a).load(d,b)},addClass:function(a,b){typeof jQuery!="undefined"&&jQuery(a).addClass(b)},removeClass:function(a,b){typeof jQuery!="undefined"&&jQuery(a).removeClass(b)},attr:function(a,b,c){if(c!=null&&c!="")typeof jQuery!="undefined"&&jQuery(a).attr(b,c);else if(typeof jQuery!="undefined")return jQuery(a).attr(b)},prop:function(a,b,c){typeof jQuery=="undefined"||!/[1-9]\.[3-9].[1-9]/.test($.fn.jquery)?VMM.Element.attribute(a,b,c):jQuery(a).prop(b,c)},attribute:function(a,b,c){if(c!=null&&c!="")typeof jQuery!="undefined"&&jQuery(a).attr(b,c);else if(typeof jQuery!="undefined")return jQuery(a).attr(b)},visible:function(a,b){if(b!=null)typeof jQuery!="undefined"&&(b?jQuery(a).show(0):jQuery(a).hide(0));else if(typeof jQuery!="undefined")return jQuery(a).is(":visible")?!0:!1},css:function(a,b,c){if(c!=null&&c!="")typeof jQuery!="undefined"&&jQuery(a).css(b,c);else if(typeof jQuery!="undefined")return jQuery(a).css(b)},cssmultiple:function(a,b){if(typeof jQuery!="undefined")return jQuery(a).css(b)},offset:function(a){var b;typeof jQuery!="undefined"&&(b=jQuery(a).offset());return b},position:function(a){var b;typeof jQuery!="undefined"&&(b=jQuery(a).position());return b},width:function(a,b){if(b!=null&&b!="")typeof jQuery!="undefined"&&jQuery(a).width(b);else if(typeof jQuery!="undefined")return jQuery(a).width()},height:function(a,b){if(b!=null&&b!="")typeof jQuery!="undefined"&&jQuery(a).height(b);else if(typeof jQuery!="undefined")return jQuery(a).height()},toggleClass:function(a,b){typeof jQuery!="undefined"&&jQuery(a).toggleClass(b)},each:function(a,b){typeof jQuery!="undefined"&&jQuery(a).each(b)},html:function(a,b){var c;if(typeof jQuery!="undefined"){c=jQuery(a).html();return c}if(b!=null&&b!="")typeof jQuery!="undefined"&&jQuery(a).html(b);else{var c;if(typeof jQuery!="undefined"){c=jQuery(a).html();return c}}},find:function(a,b){if(typeof jQuery!="undefined")return jQuery(a).find(b)},stop:function(a){typeof jQuery!="undefined"&&jQuery(a).stop()},animate:function(a,b,c,d,e){var f="easein",g=1e3,h={};b!=null&&(b<1?g=1:g=Math.round(b));c!=null&&c!=""&&(f=c);d!=null?h=d:h={opacity:0};if(VMM.Browser.device=="mobile"||VMM.Browser.device=="tablet"){var i=Math.round(g/1500*10)/10,j=i+"s";VMM.Element.css(a,"-webkit-transition","all "+j+" ease");VMM.Element.css(a,"-moz-transition","all "+j+" ease");VMM.Element.css(a,"-o-transition","all "+j+" ease");VMM.Element.css(a,"-ms-transition","all "+j+" ease");VMM.Element.css(a,"transition","all "+j+" ease");VMM.Element.cssmultiple(a,h)}else typeof jQuery!="undefined"&&(e!=null&&e!=""?jQuery(a).animate(h,{queue:!1,duration:g,easing:f,complete:e}):jQuery(a).animate(h,{queue:!1,duration:g,easing:f}))}}.init()}if(typeof jQuery!="undefined"){jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c}})}if(typeof VMM!="undefined"&&typeof VMM.Browser=="undefined"){VMM.Browser={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";this.device=this.searchDevice(navigator.userAgent);this.orientation=this.searchOrientation(window.orientation)},searchOrientation:function(a){return a==0||a==180?"portrait":a==90||a==-90?"landscape":"normal"},searchDevice:function(a){return a.match(/Android/i)||a.match(/iPhone|iPod/i)?"mobile":a.match(/iPad/i)?"tablet":a.match(/BlackBerry/i)||a.match(/IEMobile/i)?"other mobile":"desktop"},searchString:function(a){for(var b=0;b
";return d}if(e.type=="flickr"){d="
";return d}if(e.type=="youtube"){d="
";return d}if(e.type!="googledoc"){if(e.type=="vimeo"){d="
";return d}if(e.type=="twitter"){d="";return d}if(e.type=="twitter-ready"){d="";return d}if(e.type=="soundcloud"){d="
";return d}if(e.type=="google-map"){d="
";return d}if(e.type=="unknown"){d="";return d}if(e.type=="website"){d="
";return d}d="
";return d}d=""}},create:function(a,b,c,d,e){_return=c;_w=500;_h=400;$mediacontainer=a;var f=!1;d!=null&&d!=""&&(_w=d);e!=null&&e!=""&&(_h=e);if(b.media!=null&&b.media!=""){f=!0;var g="",h="",i="",j={},k=_h-50,l=!1;b.credit!=null&&b.credit!=""&&(i="
"+VMM.Util.linkify_with_twitter(b.credit,"_blank")+"
");b.caption!=null&&b.caption!=""&&(h="
"+VMM.Util.linkify_with_twitter(b.caption,"_blank")+"
");j=VMM.MediaType(b.media);if(j.type=="image")g="";else if(j.type=="flickr"){var m="flickr_"+j.id;g="";VMM.ExternalAPI.flickr.getPhoto(j.id,"#"+m)}else if(j.type=="googledoc")j.id.match(/docs.google.com/i)?g="":g="";else if(j.type=="youtube"){g="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="";else if(j.type=="twitter"){g="";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="
"+g+i+h+"
";if(_return)return l?"
"+g+"
":"
"+g+"
";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":c="";else if(f.type=="youtube"){c="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(f.id)}else if(f.type=="vimeo")c="";else if(f.type=="twitter"){c="";g=!0;VMM.ExternalAPI.twitter.prettyHTML(f.id)}else if(f.type=="twitter-ready")c=f.id;else if(f.type=="soundcloud"){var i="soundcloud_"+VMM.Util.unique_ID(5);c="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(f.id,i)}else if(f.type=="google-map"){var j="googlemap_"+VMM.Util.unique_ID(7);c="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(f.id,j)}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");c=VMM.Util.properQuotes(f.id)}else if(f.type=="website")c="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}c="
"+c+e+d+"
";return g?"
"+c+"
":"
"+c+"
"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":g="";else if(j.type=="youtube"){g="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="";else if(j.type=="twitter"){g="";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="
"+g+i+h+"
";if(_return)return l?"
"+g+"
":"
"+g+"
";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":c="";else if(f.type=="youtube"){c="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(f.id)}else if(f.type=="vimeo")c="";else if(f.type=="twitter"){c="";g=!0;VMM.ExternalAPI.twitter.prettyHTML(f.id)}else if(f.type=="twitter-ready")c=f.id;else if(f.type=="soundcloud"){var i="soundcloud_"+VMM.Util.unique_ID(5);c="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(f.id,i)}else if(f.type=="google-map"){var j="googlemap_"+VMM.Util.unique_ID(7);c="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(f.id,j)}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");c=VMM.Util.properQuotes(f.id)}else if(f.type=="website")c="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}c="
"+c+e+d+"
";return g?"
"+c+"
":"
"+c+"
"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":g="";else if(j.type=="youtube"){g="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="";else if(j.type=="twitter"){g="";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="
"+g+i+h+"
";if(_return)return l?"
"+g+"
":"
"+g+"
";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":c="";else if(f.type=="youtube"){c="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(f.id)}else if(f.type=="vimeo")c="";else if(f.type=="twitter"){c="";g=!0;VMM.ExternalAPI.twitter.prettyHTML(f.id)}else if(f.type=="twitter-ready")c=f.id;else if(f.type=="soundcloud"){var i="soundcloud_"+VMM.Util.unique_ID(5);c="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(f.id,i)}else if(f.type=="google-map"){var j="googlemap_"+VMM.Util.unique_ID(7);c="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(f.id,j)}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");c=VMM.Util.properQuotes(f.id)}else if(f.type=="website")c="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}c="
"+c+e+d+"
";return g?"
"+c+"
":"
"+c+"
"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":g="";else if(j.type=="youtube"){g="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="";else if(j.type=="twitter"){g="";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="
"+g+i+h+"
";if(_return)return l?"
"+g+"
":"
"+g+"
";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":c="";else if(f.type=="youtube"){c="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(f.id)}else if(f.type=="vimeo")c="";else if(f.type=="twitter"){c="";g=!0;VMM.ExternalAPI.twitter.prettyHTML(f.id)}else if(f.type=="twitter-ready")c=f.id;else if(f.type=="soundcloud"){var i="soundcloud_"+VMM.Util.unique_ID(5);c="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(f.id,i)}else if(f.type=="google-map"){var j="googlemap_"+VMM.Util.unique_ID(7);c="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(f.id,j)}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");c=VMM.Util.properQuotes(f.id)}else if(f.type=="website")c="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}c="
"+c+e+d+"
";return g?"
"+c+"
":"
"+c+"
"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":g="";else if(j.type=="youtube"){g="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="";else if(j.type=="twitter"){g="";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="
"+g+i+h+"
";if(_return)return l?"
"+g+"
":"
"+g+"
";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":c="";else if(f.type=="youtube"){c="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(f.id)}else if(f.type=="vimeo")c="";else if(f.type=="twitter"){c="";g=!0;VMM.ExternalAPI.twitter.prettyHTML(f.id)}else if(f.type=="twitter-ready")c=f.id;else if(f.type=="soundcloud"){var i="soundcloud_"+VMM.Util.unique_ID(5);c="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(f.id,i)}else if(f.type=="google-map"){var j="googlemap_"+VMM.Util.unique_ID(7);c="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(f.id,j)}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");c=VMM.Util.properQuotes(f.id)}else if(f.type=="website")c="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}c="
"+c+e+d+"
";return g?"
"+c+"
":"
"+c+"
"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":g="";else if(j.type=="youtube"){g="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="";else if(j.type=="twitter"){g="";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="
"+g+i+h+"
";if(_return)return l?"
"+g+"
":"
"+g+"
";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":c="";else if(f.type=="youtube"){c="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(f.id)}else if(f.type=="vimeo")c="";else if(f.type=="twitter"){c="";g=!0;VMM.ExternalAPI.twitter.prettyHTML(f.id)}else if(f.type=="twitter-ready")c=f.id;else if(f.type=="soundcloud"){var i="soundcloud_"+VMM.Util.unique_ID(5);c="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(f.id,i)}else if(f.type=="google-map"){var j="googlemap_"+VMM.Util.unique_ID(7);c="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(f.id,j)}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");c=VMM.Util.properQuotes(f.id)}else if(f.type=="website")c="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}c="
"+c+e+d+"
";return g?"
"+c+"
":"
"+c+"
"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":g="";else if(j.type=="youtube"){g="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="";else if(j.type=="twitter"){g="";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="
"+g+i+h+"
";if(_return)return l?"
"+g+"
":"
"+g+"
";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":c="";else if(f.type=="youtube"){c="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(f.id)}else if(f.type=="vimeo")c="";else if(f.type=="twitter"){c="";g=!0;VMM.ExternalAPI.twitter.prettyHTML(f.id)}else if(f.type=="twitter-ready")c=f.id;else if(f.type=="soundcloud"){var i="soundcloud_"+VMM.Util.unique_ID(5);c="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(f.id,i)}else if(f.type=="google-map"){var j="googlemap_"+VMM.Util.unique_ID(7);c="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(f.id,j)}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");c=VMM.Util.properQuotes(f.id)}else if(f.type=="website")c="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}c="
"+c+e+d+"
";return g?"
"+c+"
":"
"+c+"
"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":g="";else if(j.type=="youtube"){g="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="";else if(j.type=="twitter"){g="";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="
"+g+i+h+"
";if(_return)return l?"
"+g+"
":"
"+g+"
";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":c="";else if(f.type=="youtube"){c="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(f.id)}else if(f.type=="vimeo")c="";else if(f.type=="twitter"){c="";g=!0;VMM.ExternalAPI.twitter.prettyHTML(f.id)}else if(f.type=="twitter-ready")c=f.id;else if(f.type=="soundcloud"){var i="soundcloud_"+VMM.Util.unique_ID(5);c="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(f.id,i)}else if(f.type=="google-map"){var j="googlemap_"+VMM.Util.unique_ID(7);c="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(f.id,j)}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");c=VMM.Util.properQuotes(f.id)}else if(f.type=="website")c="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}c="
"+c+e+d+"
";return g?"
"+c+"
":"
"+c+"
"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":g="";else if(j.type=="youtube"){g="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="";else if(j.type=="twitter"){g="";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="
"+g+i+h+"
";if(_return)return l?"
"+g+"
":"
"+g+"
";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":c="";else if(f.type=="youtube"){c="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(f.id)}else if(f.type=="vimeo")c="";else if(f.type=="twitter"){c="";g=!0;VMM.ExternalAPI.twitter.prettyHTML(f.id)}else if(f.type=="twitter-ready")c=f.id;else if(f.type=="soundcloud"){var i="soundcloud_"+VMM.Util.unique_ID(5);c="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(f.id,i)}else if(f.type=="google-map"){var j="googlemap_"+VMM.Util.unique_ID(7);c="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(f.id,j)}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");c=VMM.Util.properQuotes(f.id)}else if(f.type=="website")c="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}c="
"+c+e+d+"
";return g?"
"+c+"
":"
"+c+"
"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":g="";else if(j.type=="youtube"){g="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="";else if(j.type=="twitter"){g="";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="
"+g+i+h+"
";if(_return)return l?"
"+g+"
":"
"+g+"
";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":c="";else if(f.type=="youtube"){c="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(f.id)}else if(f.type=="vimeo")c="";else if(f.type=="twitter"){c="";g=!0;VMM.ExternalAPI.twitter.prettyHTML(f.id)}else if(f.type=="twitter-ready")c=f.id;else if(f.type=="soundcloud"){var i="soundcloud_"+VMM.Util.unique_ID(5);c="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(f.id,i)}else if(f.type=="google-map"){var j="googlemap_"+VMM.Util.unique_ID(7);c="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(f.id,j)}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");c=VMM.Util.properQuotes(f.id)}else if(f.type=="website")c="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}c="
"+c+e+d+"
";return g?"
"+c+"
":"
"+c+"
"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":g="";else if(j.type=="youtube"){g="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="";else if(j.type=="twitter"){g="";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="
"+g+i+h+"
";if(_return)return l?"
"+g+"
":"
"+g+"
";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":c="";else if(f.type=="youtube"){c="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(f.id)}else if(f.type=="vimeo")c="";else if(f.type=="twitter"){c="";g=!0;VMM.ExternalAPI.twitter.prettyHTML(f.id)}else if(f.type=="twitter-ready")c=f.id;else if(f.type=="soundcloud"){var i="soundcloud_"+VMM.Util.unique_ID(5);c="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(f.id,i)}else if(f.type=="google-map"){var j="googlemap_"+VMM.Util.unique_ID(7);c="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(f.id,j)}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");c=VMM.Util.properQuotes(f.id)}else if(f.type=="website")c="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}c="
"+c+e+d+"
";return g?"
"+c+"
":"
"+c+"
"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,""; + mediaElem = ""; } else { - mediaElem = ""; + mediaElem = ""; } - - - } else if (m.type == "youtube") { - mediaElem = "
Loading YouTube video...
"; + // YOUTUBE + } else if (m.type == "youtube") { + mediaElem = "
Loading YouTube video...
"; VMM.ExternalAPI.youtube.init(m.id); - //mediaElem = ""; - } else if (m.type == "vimeo") { - mediaElem = ""; - } else if (m.type == "twitter"){ - mediaElem = ""; - //VMM.ExternalAPI.twitter.getHTML(m.id); - trace("TWITTER"); + // VIMEO + } else if (m.type == "vimeo") { + mediaElem = ""; + // TWITTER + } else if (m.type == "twitter"){ + mediaElem = ""; + isTextMedia = true; VMM.ExternalAPI.twitter.prettyHTML(m.id); - isTextMedia = true; - } else if (m.type == "twitter-ready") { - mediaElem = m.id; - } else if (m.type == "soundcloud") { - var soundcloud_id = "soundcloud_" + VMM.Util.unique_ID(5); - mediaElem = "
Loading Sound
"; - VMM.ExternalAPI.soundcloud.getSound(m.id, soundcloud_id) - } else if (m.type == "google-map") { - //mediaElem = "" - var map_id = "googlemap_" + VMM.Util.unique_ID(7); - mediaElem = "
Loading Map...
"; + // TWITTER + } else if (m.type == "twitter-ready") { + mediaElem = m.id; + // SOUNDCLOUD + } else if (m.type == "soundcloud") { + var soundcloud_id = "soundcloud_" + VMM.Util.unique_ID(5); + mediaElem = "
Loading Sound
"; + VMM.ExternalAPI.soundcloud.getSound(m.id, soundcloud_id); + // GOOGLE MAPS + } else if (m.type == "google-map") { + var map_id = "googlemap_" + VMM.Util.unique_ID(7); + mediaElem = "
Loading Map...
"; VMM.ExternalAPI.googlemaps.getMap(m.id, map_id); - } else if (m.type == "unknown") { + // UNKNOWN + } else if (m.type == "unknown") { trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML"); - mediaElem = VMM.Util.properQuotes(m.id); - } else if (m.type == "website") { - mediaElem = ""; - //mediaElem = "" + ""; + mediaElem = VMM.Util.properQuotes(m.id); + // WEBSITE + } else if (m.type == "website") { + mediaElem = ""; + //mediaElem = "" + ""; + // NO MATCH } else { trace("NO KNOWN MEDIA TYPE FOUND"); trace(m.type); } - // WRAP THE MEDIA ELEMENT - mediaElem = "
" + mediaElem + creditElem + captionElem + "
"; + // WRAP THE MEDIA ELEMENT + mediaElem = "
" + mediaElem + creditElem + captionElem + "
"; + // RETURN + if (isTextMedia) { + return "
" + mediaElem + "
"; + } else { + return "
" + mediaElem + "
"; + } + + /* if (_return) { if (isTextMedia) { return "
" + mediaElem + "
"; @@ -167,6 +155,7 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') { VMM.appendElement($mediacontainer, creditElem); VMM.appendElement($mediacontainer, captionElem); } + */ }; }, diff --git a/source/js/VMM.Slider.Slide.js b/source/js/VMM.Slider.Slide.js new file mode 100644 index 0000000..42c028a --- /dev/null +++ b/source/js/VMM.Slider.Slide.js @@ -0,0 +1,138 @@ +/* Slider Slide +================================================== */ +if (typeof VMM.Slider != 'undefined') { + // VMM.Slider.Slide(element, data) + VMM.Slider.Slide = function(d, _parent) { + + var data = d; + var slide = {}; + var media = ""; + var loaded = false; + var element = VMM.appendAndGetElement(_parent, "
", "slider-item"); + + /* PUBLIC + ================================================== */ + this.show = function() { + trace("LOADED: " + loaded); + if (!loaded) { + render(); + } + }; + + this.hide = function() { + if (loaded) { + removeSlide(); + } + }; + + this.elem = function() { + return element; + }; + + this.position = function() { + return VMM.Element.position(element); + }; + + this.leftpos = function(p) { + if(typeof p != 'undefined') { + VMM.Element.css(element, "left", p); + } else { + trace("LEFT: " + VMM.Element.position(element).left); + return VMM.Element.position(element).left + } + }; + + this.animate = function(d, e, p) { + VMM.Element.animate(element, d, e, p); + }; + + this.css = function(p, v) { + VMM.Element.css(element, p, v ); + } + + this.opacity = function(p) { + VMM.Element.css(element, "opacity", p); + } + + this.width = function() { + return VMM.Element.width(element); + }; + + this.height = function() { + return VMM.Element.height(element); + }; + + /* PRIVATE + ================================================== */ + var render = function() { + trace(data); + VMM.attachElement(element, ""); + VMM.appendElement(element, buildSlide() ); + loaded = true; + var timer = setTimeout(VMM.ExternalAPI.pushQues, 500); + }; + + var removeSlide = function() { + VMM.attachElement(element, ""); + loaded = false; + } + + var buildSlide = function() { + var c = {slide:"", text: "", media: "", layout: "content-container layout", has: { text: false, media: false }}; + var b_slide, c_wrap; + + /* DATE + ================================================== */ + if (data.startdate != null && data.startdate != "") { + if (type.of(data.startdate) == "date") { + if (data.type != "start") { + c.text += VMM.createElement("h2", VMM.Util.date.prettyDate(data.startdate), "date"); + } + } + } + + /* HEADLINE + ================================================== */ + if (data.headline != null && data.headline != "") { + if (data.type == "start") { + c.text += VMM.createElement("h2", VMM.Util.linkify_with_twitter(data.headline, "_blank"), "start"); + } else { + c.text += VMM.createElement("h3", VMM.Util.linkify_with_twitter(data.headline, "_blank")); + } + } + + /* TEXT + ================================================== */ + if (data.text != null && data.text != "") { + c.has.text = true; + c.text += VMM.createElement("p", VMM.Util.linkify_with_twitter(data.text, "_blank")); + c.text = VMM.createElement("div", c.text, "container"); + c.text = VMM.createElement("div", c.text, "text"); + } + + /* MEDIA + ================================================== */ + if (data.asset != null && data.asset != "") { + if (data.asset.media != null && data.asset.media != "") { + c.has.media = true; + c.media = VMM.MediaElement.create(data.asset); + } + } + /* COMBINE + ================================================== */ + if (c.has.text) { c.layout += "-text" }; + if (c.has.media){ c.layout += "-media" }; + + c.slide = VMM.createElement("div", c.text + c.media, c.layout); + c_wrap = VMM.createElement("div", c.slide, "content"); + + /* RETURN + ================================================== */ + // return c.slide; + return c_wrap; + + }; + + } + +}; diff --git a/source/js/VMM.Slider.js b/source/js/VMM.Slider.js index 90ece84..f398a44 100644 --- a/source/js/VMM.Slider.js +++ b/source/js/VMM.Slider.js @@ -4,27 +4,26 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { VMM.Slider = function(parent, parent_config) { - /* PRIVATE VARS - ================================================== */ var events = {}, config; - // ARRAYS - var data = [], slides = [], slide_positions = []; - var slides_content = ""; - var current_slide = 0; - var current_width = 960; - var touch = {move: false, x: 10, y:0, off: 0, dampen: 48}; - var content = ""; - var _active = false; - var layout = parent; - // ELEMENTS var $slider, $slider_mask, $slider_container, $slides_items; - // NAVIGATION - var navigation = {nextBtn:"", prevBtn:"", nextDate:"", prevDate:"", nextTitle:"", prevTitle:""}; + var data = [], slides = [], slide_positions = []; + + var slides_content = ""; + var current_slide = 0; + var current_width = 960; + var touch = {move: false, x: 10, y:0, off: 0, dampen: 48}; + var content = ""; + var _active = false; + var layout = parent; + var navigation = {nextBtn:"", prevBtn:"", nextDate:"", prevDate:"", nextTitle:"", prevTitle:""}; + var timer; + // CONFIG if(typeof VMM.Timeline != 'undefined') { config = VMM.Timeline.Config; } else { config = { + preload: 4, current_slide: 0, interval: 10, something: 0, @@ -54,8 +53,8 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { ================================================== */ this.ver = "0.6"; - config.slider.width = config.width; - config.slider.height = config.height; + config.slider.width = config.width; + config.slider.height = config.height; /* PUBLIC FUNCTIONS ================================================== */ @@ -159,8 +158,8 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { VMM.Element.width($slides_items, (slides.length * config.slider.content.width)); if (_from_start) { - var _pos = VMM.Element.position(slides[current_slide]); - VMM.Element.css($slider_container, "left", _pos.left); + var _pos = slides[current_slide].leftpos(); + VMM.Element.css($slider_container, "left", _pos); } // RESIZE SLIDES @@ -176,7 +175,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { VMM.Element.css(navigation.nextBtnContainer, "top", ( (config.slider.height/2) - (config.slider.nav.height/2) ) ); VMM.Element.css(navigation.prevBtnContainer, "top", ( (config.slider.height/2) - (config.slider.nav.height/2) ) ); - // Animate Changes VMM.Element.height($slider_mask, config.slider.height); VMM.Element.width($slider_mask, current_width); @@ -195,7 +193,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { ================================================== */ function onNextClick(e) { if (current_slide == slides.length - 1) { - VMM.Element.animate($slider_container, config.duration, config.ease, {"left": -(VMM.Element.position(slides[current_slide]).left)}); + VMM.Element.animate($slider_container, config.duration, config.ease, {"left": -(slides[current_slide].leftpos()) } ); } else { goToSlide(current_slide+1); upDate(); @@ -227,28 +225,25 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { function onTouchUpdate(e, b) { if (slide_positions.length == 0) { for(var i = 0; i < slides.length; i++) { - var sp = VMM.Element.position(slides[i]); - slide_positions.push(sp.left); + slide_positions.push( slides[i].leftpos() ); } } if (typeof b.left == "number") { var _pos = b.left; - if (_pos < -(VMM.Element.position(slides[current_slide]).left) - (config.slider_width/3)) { + var _slide_pos = -(slides[current_slide].leftpos()); + if (_pos < _slide_pos - (config.slider_width/3)) { onNextClick(); - } else if (_pos > -(VMM.Element.position(slides[current_slide]).left) + (config.slider_width/3)) { + } else if (_pos > _slide_pos + (config.slider_width/3)) { onPrevClick(); } else { - VMM.Element.animate($slider_container, config.duration, config.ease, {"left": -(VMM.Element.position(slides[current_slide]).left)}); + VMM.Element.animate($slider_container, config.duration, config.ease, {"left": _slide_pos }); } } else { - VMM.Element.animate($slider_container, config.duration, config.ease, {"left": -(VMM.Element.position(slides[current_slide]).left)}); + VMM.Element.animate($slider_container, config.duration, config.ease, {"left": _slide_pos }); } if (typeof b.top == "number") { VMM.Element.animate($slider_container, config.duration, config.ease, {"top": -b.top}); - //VMM.Element.animate(layout, _duration, _ease, {scrollTop: VMM.Element.prop(layout, "scrollHeight") + b.top }); - //VMM.Element.animate(layout, _duration, _ease, {scrollTop: VMM.Element.prop(layout, "scrollHeight") + VMM.Element.height(layout) }); - //VMM.Element.animate($slider_container, config.duration, config.ease, {"top": -400}); } else { } @@ -270,24 +265,39 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { /* BUILD SLIDES ================================================== */ var buildSlides = function(d) { - - // Clear out existing content VMM.attachElement($slides_items, ""); slides = []; for(var i = 0; i < d.length; i++) { - var bw = ""; - var _slide; - var _media; - - bw = VMM.createElement("div", d[i].content, "content"); - - _slide = VMM.appendAndGetElement($slides_items, "
", "slider-item" , bw); - + var _slide = new VMM.Slider.Slide(d[i], $slides_items); + //_slide.show(); slides.push(_slide); } + } + + var preloadSlides = function(skip) { + if (skip) { + preloadTimeOutSlides(); + } else { + timer = setTimeout(preloadTimeOutSlides, config.duration); + } + } + + var preloadTimeOutSlides = function() { + trace("preloadTimeOutSlides"); + trace("CURRENT SLIDE: " + current_slide); + for(var j = 0; j < config.preload; j++) { + if ( !((current_slide + j) >= slides.length - 1)) { + trace("PRELOAD: " + (current_slide + j) ); + slides[current_slide + j].show(); + } + if ( !( (current_slide - j) < 0 ) ) { + trace("PRELOAD: " + (current_slide - j) ); + slides[current_slide - j].show(); + } + } - + sizeSlides(); } /* SIZE SLIDES @@ -336,7 +346,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { mediasize.text_media.width = config.slider.content.width; mediasize.text_media.height = ((config.slider.height/100) * 50 ) - 50; - //mediasize.media.height = ((config.slider.height/100) * 80 ) - 40; mediasize.media.height = ((config.slider.height/100) * 70 ) - 40; mediasize.text_media.video = VMM.Util.ratio.fit(mediasize.text_media.width, mediasize.text_media.height, 16, 9); @@ -357,9 +366,9 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { // MAINTAINS VERTICAL CENTER IF IT CAN for(var i = 0; i < slides.length; i++) { if (VMM.Element.height(VMM.Element.find( slides[i], ".content")) > config.slider.height) { - VMM.Element.css(slides[i], "display", "block" ); + slides[i].css("display", "block"); } else { - VMM.Element.css(slides[i], "display", "table" ); + slides[i].css("display", "table"); } } @@ -429,7 +438,8 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { var pos = 0; for(var i = 0; i < slides.length; i++) { pos = i * (config.slider.width+config.spacing); - VMM.Element.css(slides[i], "left", pos); + //VMM.Element.css(slides[i], "left", pos); + slides[i].leftpos(pos); } } @@ -439,13 +449,14 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { var _ease = "linear"; for(var i = 0; i < slides.length; i++) { if (i == current_slide) { - VMM.Element.animate(slides[i], config.duration, _ease, {"opacity": 1}); - } else if (i == current_slide - 1) { - VMM.Element.animate(slides[i], config.duration, _ease, {"opacity": 0.1}); - } else if (i == current_slide + 1) { - VMM.Element.animate(slides[i], config.duration, _ease, {"opacity": 0.1}); + //VMM.Element.animate(slides[i], config.duration, _ease, {"opacity": 1}); + slides[i].animate(config.duration, _ease, {"opacity": 1}); + } else if (i == current_slide - 1 || i == current_slide + 1) { + //VMM.Element.animate(slides[i], config.duration, _ease, {"opacity": 0.1}); + slides[i].animate(config.duration, _ease, {"opacity": 0.1}); } else { - VMM.Element.css(slides[i], "opacity", n); + //VMM.Element.css(slides[i], "opacity", n); + slides[i].opacity(n); } } } @@ -466,21 +477,14 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { var _duration = config.duration; var is_last = false; var is_first = false; + var _pos = slides[current_slide].leftpos(); + //var _pos = VMM.Element.position(slides[current_slide]); - if (current_slide == 0) { - is_first = true; - } - if (current_slide +1 >= slides.length) { - is_last = true - } - + if (current_slide == 0) {is_first = true}; + if (current_slide +1 >= slides.length) {is_last = true}; if (ease != null && ease != "") {_ease = ease}; if (duration != null && duration != "") {_duration = duration}; - /* get slide position - ================================================== */ - var _pos = VMM.Element.position(slides[current_slide]); - /* set proper nav titles and dates etc. ================================================== */ if (is_first) { @@ -505,10 +509,10 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { /* ANIMATE SLIDE ================================================== */ if (fast) { - VMM.Element.css($slider_container, "left", -(_pos.left - config.slider.content.padding)); + VMM.Element.css($slider_container, "left", -(_pos - config.slider.content.padding)); } else{ VMM.Element.stop($slider_container); - VMM.Element.animate($slider_container, _duration, _ease, {"left": -(_pos.left - config.slider.content.padding)}); + VMM.Element.animate($slider_container, _duration, _ease, {"left": -(_pos - config.slider.content.padding)}); } if (firstrun) { @@ -518,14 +522,15 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { /* SET Vertical Scoll ================================================== */ //opacitySlides(0.85); - if (VMM.Element.height(slides[current_slide]) > config.slider_height) { + //if (VMM.Element.height(slides[current_slide]) > config.slider_height) { + if (slides[current_slide].height() > config.slider_height) { VMM.Element.css(".slider", "overflow-y", "scroll" ); } else { VMM.Element.css(layout, "overflow-y", "hidden" ); - VMM.Element.animate(layout, _duration, _ease, {scrollTop: VMM.Element.prop(layout, "scrollHeight") - VMM.Element.height(layout) }); - + VMM.Element.animate(layout, _duration, _ease, {scrollTop: VMM.Element.prop(layout, "scrollHeight") - VMM.Element.height(layout) }); } + preloadSlides(); //VMM.Element.css(navigation.nextBtnContainer, "left", ( VMM.Element.width(navigation.nextBtnContainer) - config.slider.nav.width) ); } @@ -578,7 +583,8 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { if (VMM.Browser.device == "tablet" || VMM.Browser.device == "mobile") { config.duration = 500; __duration = 1000; - VMM.TouchSlider.createPanel($slider_container, $slider_container, VMM.Element.width(slides[0]), config.spacing, true); + //VMM.TouchSlider.createPanel($slider_container, $slider_container, VMM.Element.width(slides[0]), config.spacing, true); + VMM.TouchSlider.createPanel($slider_container, $slider_container, slides[0].width(), config.spacing, true); VMM.bindEvent($slider_container, onTouchUpdate, "TOUCHUPDATE"); } else if (VMM.Browser.device == "mobile") { diff --git a/source/js/VMM.Timeline.js b/source/js/VMM.Timeline.js index 4c3baef..6fab8fe 100755 --- a/source/js/VMM.Timeline.js +++ b/source/js/VMM.Timeline.js @@ -31,6 +31,7 @@ // @codekit-prepend "VMM.TouchSlider.js"; // @codekit-prepend "VMM.DragSlider.js"; // @codekit-prepend "VMM.Slider.js"; +// @codekit-prepend "VMM.Slider.Slide.js"; // @codekit-prepend "VMM.Util.js"; // @codekit-prepend "VMM.LoadLib.js"; // @codekit-prepend "VMM.Language.js"; @@ -57,7 +58,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { timeline_id = "#timeline"; } - version = "0.98.72"; + version = "0.99.00"; trace("TIMELINE VERSION " + version); @@ -67,6 +68,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { id: timeline_id, type: "timeline", maptype: "toner", + preload: 4, current_slide: 0, hash_bookmark: false, start_at_end: false, @@ -375,75 +377,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { }; - // BUILD SLIDE CONTENT pass in json object - var buildSlide = function(dd, d_date) { - var d = dd; - var slide = ""; - var _valid = false; - var _hasmedia = false; - var _hastext = false; - var c = {}; - - c._text = ""; - c._media = ""; - - updateSize(); - - if (type.of(d_date) == "date") { - _valid = true; - - if (dd.type != "start") { - c._text += VMM.createElement("h2", VMM.Util.date.prettyDate(d_date), "date"); - } - - if (d.headline != null && d.headline != "") { - if (d.type == "tweets") { - - } else if (dd.type == "start") { - c._text += VMM.createElement("h2", VMM.Util.linkify_with_twitter(d.headline, "_blank"), "start"); - } else { - c._text += VMM.createElement("h3", VMM.Util.linkify_with_twitter(d.headline, "_blank")); - } - } - - if (d.text != null && d.text != "") { - _hastext = true; - c._text += VMM.createElement("p", VMM.Util.linkify_with_twitter(d.text, "_blank")); - } - - c._text = VMM.createElement("div", c._text, "container"); - c._text = VMM.createElement("div", c._text, "text"); - - } - - if (_valid) { - - var _layout_class = "content-container layout"; - - if (d.asset != null && d.asset != "") { - if (d.asset.media != null && d.asset.media != "") { - _hasmedia = true; - c._media = VMM.MediaElement.create("", d.asset, true, config.feature.width, config.feature.height); - } - } - - if (_hastext) { - _layout_class += "-text" - } - if (_hasmedia) { - _layout_class += "-media"; - } - - slide = VMM.createElement("div", c._text + c._media, _layout_class); - - return slide; - - } - - return slide; - - } - var updateSize = function() { trace("UPDATE SIZE"); config.width = VMM.Element.width($timeline); @@ -476,9 +409,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { // START DATE if (data.date[i].type == "tweets") { _date.startdate = VMM.ExternalAPI.twitter.parseTwitterDate(data.date[i].startDate); - } else if (data.date[i].type == "google spreadsheet") { - //_date.startdate = new Date(Date.parse(data.date[i].startDate)); - _date.startdate = VMM.Util.date.parse(data.date[i].startDate); } else { _date.startdate = VMM.Util.date.parse(data.date[i].startDate); } @@ -489,9 +419,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { if (data.date[i].endDate != null && data.date[i].endDate != "") { if (data.date[i].type == "tweets") { _date.enddate = VMM.ExternalAPI.twitter.parseTwitterDate(data.date[i].endDate); - } else if (data.date[i].type == "google spreadsheet") { - //_date.enddate = new Date(Date.parse(data.date[i].endDate)); - _date.enddate = VMM.Util.date.parse(data.date[i].endDate); } else { _date.enddate = VMM.Util.date.parse(data.date[i].endDate); } @@ -499,18 +426,16 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { _date.enddate = _date.startdate; } - _date.title = data.date[i].headline; - _date.type = data.date[i].type; - _date.date = VMM.Util.date.prettyDate(_date.startdate); - _date.asset = data.date[i].asset; - _date.fulldate = _date.startdate.getTime(); + _date.title = data.date[i].headline; + _date.headline = data.date[i].headline; + _date.type = data.date[i].type; + _date.date = VMM.Util.date.prettyDate(_date.startdate); + _date.asset = data.date[i].asset; + _date.fulldate = _date.startdate.getTime(); + _date.text = data.date[i].text; + _date.content = ""; - // BUILD SLIDE CONTENT - _date.content = buildSlide(data.date[i], _date.startdate); - - if (_date.content != null && _date.content != "") { - _dates.push(_date); - } + _dates.push(_date); } @@ -526,25 +451,10 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { ================================================== */ if (data.headline != null && data.headline != "" && data.text != null && data.text != "") { trace("HAS STARTPAGE"); - var _date = {}; - if (data.type == "google spreadsheet") { - trace("google spreadsheet startpage date " + data.startDate); - //_date.startdate = new Date(Date.parse(data.startDate)); - } else { - _date.startdate = VMM.Util.date.parse(data.startDate); - } - - _date.startdate = new Date(_dates[0].startdate); - - var td = _dates[0].startdate; - var td_num = 0; - /* - if (_dates[0].startdate.getDate() > 1) { - _date.startdate.setDate(td.getDate() - 1); - } else if (_dates[0].startdate.getHours() > 0) { - _date.startdate.setHours(td.getHours() - 1); - } - */ + var _date = {}; + var td_num = 0; + var td = _dates[0].startdate; + _date.startdate = VMM.Util.date.parse(data.startDate); if (td.getMonth() === 0 && td.getDate() == 1 && td.getHours() === 0 && td.getMinutes() === 0 ) { // trace("YEAR ONLY"); @@ -563,19 +473,17 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { _date.startdate.setMinutes(td.getMinutes() - 1); } - _date.uniqueid = VMM.Util.unique_ID(5); - _date.enddate = _date.startdate; - _date.title = data.headline; - _date.headline = data.headline; - _date.text = data.text; - _date.type = "start"; - _date.date = VMM.Util.date.prettyDate(data.startDate); - _date.asset = data.asset; - _date.fulldate = _date.startdate.getTime(); - _date.content = buildSlide(_date, _date.startdate); - if (_date.content != null && _date.content != "" || _date.title != null && _date.title != "") { - _dates.push(_date); - } + _date.uniqueid = VMM.Util.unique_ID(5); + _date.enddate = _date.startdate; + _date.title = data.headline; + _date.headline = data.headline; + _date.text = data.text; + _date.type = "start"; + _date.date = VMM.Util.date.prettyDate(data.startDate); + _date.asset = data.asset; + _date.fulldate = _date.startdate.getTime(); + + _dates.push(_date); } /* CUSTOM SORT diff --git a/timeline-min.js b/timeline-min.js index da6714e..2a4ff43 100644 --- a/timeline-min.js +++ b/timeline-min.js @@ -8,7 +8,7 @@ * ----------------------------------------------------- *//* 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},vp:"Pellentesque nibh felis, eleifend id, commodo in, interdum vitae, leo",keys:{flickr:"RAIvxHY4hE/Elm5cieh4X5ptMyDpj7MYIxziGxi0WGCcy1s+yr7rKQ==",google:"jwNGnYw4hE9lmAez4ll0QD+jo6SKBJFknkopLS4FrSAuGfIwyj57AusuR0s8dAo="},youtube:{active:!1,array:[],api_loaded:!1,que:[]},googlemaps:{active:!1,map_active:!1,places_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+=" "+e);f+=">";b!=null&&b!=""&&(f+=b);f=f+""}return f};VMM.createMediaElement=function(a,b,c){var d="",e=!1;d+="
";if(a!=null&&a!=""){valid=!0;d+="";c!=null&&c!=""&&(d+=VMM.createElement("div",c,"credit"));b!=null&&b!=""&&(d+=VMM.createElement("div",b,"caption"))}d+="
";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)}}}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(/regexp/i)!==null:!1}},type={of:function(a){for(var b in is)if(is[b](a))return b.toLowerCase()}};!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b;this.$element=a(c);this.options=this.getOptions(d);this.enabled=!0;if(this.options.trigger!="manual"){e=this.options.trigger=="hover"?"mouseenter":"focus";f=this.options.trigger=="hover"?"mouseleave":"blur";this.$element.on(e,this.options.selector,a.proxy(this.enter,this));this.$element.on(f,this.options.selector,a.proxy(this.leave,this))}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){b=a.extend({},a.fn[this.type].defaults,b,this.$element.data());b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay});return b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);if(!c.options.delay||!c.options.delay.show)c.show();else{c.hoverState="in";setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show)}},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);if(!c.options.delay||!c.options.delay.hide)c.hide();else{c.hoverState="out";setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)}},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip();this.setContent();this.options.animation&&a.addClass("fade");f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement;b=/in/.test(f);a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body);c=this.getPosition(b);d=a[0].offsetWidth;e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle());a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b);c.remove()})}var b=this,c=this.tip();c.removeClass("in");a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title);a=a.toString().replace(/(^\s*|\s*$)/,"");return a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}};a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f));typeof c=="string"&&e[c]()})};a.fn.tooltip.Constructor=b;a.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'
'}}(window.jQuery);var Aes={};Aes.cipher=function(a,b){var c=4,d=b.length/c-1,e=[[],[],[],[]];for(var f=0;f<4*c;f++)e[f%4][Math.floor(f/4)]=a[f];e=Aes.addRoundKey(e,b,0,c);for(var g=1;g6&&g%c==4&&(f=Aes.subWord(f));for(var i=0;i<4;i++)e[g][i]=e[g-c][i]^f[i]}return e};Aes.subBytes=function(a,b){for(var c=0;c<4;c++)for(var d=0;d>>g*8&255;for(var g=0;g<2;g++)i[g+2]=m>>>g*8&255;for(var g=0;g<4;g++)i[g+4]=l>>>g*8&255;var n="";for(var g=0;g<8;g++)n+=String.fromCharCode(i[g]);var o=Aes.keyExpansion(h),p=Math.ceil(a.length/d),q=new Array(p);for(var r=0;r>>s*8&255;for(var s=0;s<4;s++)i[15-s-4]=r/4294967296>>>s*8;var t=Aes.cipher(i,o),u=r>>o*8&255;for(var o=0;o<4;o++)i[15-o-4]=(m+1)/4294967296-1>>>o*8&255;var p=Aes.cipher(i,j),q=new Array(a[m].length);for(var g=0;g0)while(m++<3){l+="=";n+="\0"}for(m=0;m>18&63;h=f>>12&63;i=f>>6&63;j=f&63;k[m/3]=p.charAt(g)+p.charAt(h)+p.charAt(i)+p.charAt(j)}o=k.join("");o=o.slice(0,o.length-l.length)+l;return o};Base64.decode=function(a,b){b=typeof b=="undefined"?!1:b;var c,d,e,f,g,h,i,j,k=[],l,m,n=Base64.code;m=b?a.decodeUTF8():a;for(var o=0;o>>16&255;d=j>>>8&255;e=j&255;k[o/4]=String.fromCharCode(c,d,e);i==64&&(k[o/4]=String.fromCharCode(c,d));h==64&&(k[o/4]=String.fromCharCode(c))}l=k.join("");return b?l.decodeUTF8():l};var Utf8={};Utf8.encode=function(a){var b=a.replace(/[\u0080-\u07ff]/g,function(a){var b=a.charCodeAt(0);return String.fromCharCode(192|b>>6,128|b&63)});b=b.replace(/[\u0800-\uffff]/g,function(a){var b=a.charCodeAt(0);return String.fromCharCode(224|b>>12,128|b>>6&63,128|b&63)});return b};Utf8.decode=function(a){var b=a.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(a){var b=(a.charCodeAt(0)&15)<<12|(a.charCodeAt(1)&63)<<6|a.charCodeAt(2)&63;return String.fromCharCode(b)});b=b.replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(a){var b=(a.charCodeAt(0)&31)<<6|a.charCodeAt(1)&63;return String.fromCharCode(b)});return b};if(typeof VMM!="undefined"){VMM.attachElement=function(a,b){typeof jQuery!="undefined"&&$(a).html(b)};VMM.appendElement=function(a,b){typeof jQuery!="undefined"&&$(a).append(b)};VMM.getHTML=function(a){var b;if(typeof jQuery!="undefined"){b=jQuery(a).html();return b}};VMM.getElement=function(a,b){var c;if(typeof jQuery!="undefined"){b?c=jQuery(a).parent().get(0):c=jQuery(a).get(0);return c}};VMM.bindEvent=function(a,b,c,d){var e,f="click",g={};c!=null&&c!=""&&(f=c);g!=null&&g!=""&&(g=d);typeof jQuery!="undefined"&&jQuery(a).bind(f,g,b)};VMM.unbindEvent=function(a,b,c){var d,e="click",f={};c!=null&&c!=""&&(e=c);typeof jQuery!="undefined"&&jQuery(a).unbind(e,b)};VMM.fireEvent=function(a,b,c){var d,e="click",f=[];b!=null&&b!=""&&(e=b);c!=null&&c!=""&&(f=c);typeof jQuery!="undefined"&&jQuery(a).trigger(e,f)};VMM.getJSON=function(a,b,c){if(typeof jQuery!="undefined"){if(!(VMM.Browser.browser=="Explorer"&&parseInt(VMM.Browser.version,10)>=7&&window.XDomainRequest)){trace("getJSON");return jQuery.getJSON(a,b,c)}trace("it's ie");var d=a;if(d.match("^http://")){trace("RUNNING GET JSON");d=d.replace("http://","//");return jQuery.getJSON(a,b,c)}if(!d.match("^https://"))return jQuery.getJSON(a,b,c);trace("RUNNING XDR");d=d.replace("https://","http://");var e=new XDomainRequest;e.open("get",d);e.onload=function(){var a=VMM.parseJSON(e.responseText);trace(e.responseText);if(type.of(a)!="null"&&type.of(a)!="undefined")return b(a);trace("IE JSON ERROR")};e.send()}};VMM.parseJSON=function(a){if(typeof jQuery!="undefined")return jQuery.parseJSON(a)};VMM.appendAndGetElement=function(a,b,c,d){var e,f="
",g="",h="";b!=null&&b!=""&&(f=b);c!=null&&c!=""&&(g=c);d!=null&&d!=""&&(h=d);if(typeof jQuery!="undefined"){e=$(b);e.addClass(g);e.html(h);jQuery(a).append(e)}return e};VMM.Element={init:function(){return this},hide:function(a,b){b!=null&&b!=""?typeof jQuery!="undefined"&&jQuery(a).hide(b):typeof jQuery!="undefined"&&jQuery(a).hide()},remove:function(a){typeof jQuery!="undefined"&&jQuery(a).remove()},detach:function(a){typeof jQuery!="undefined"&&jQuery(a).detach()},append:function(a,b){typeof jQuery!="undefined"&&jQuery(a).append(b)},show:function(a,b){b!=null&&b!=""?typeof jQuery!="undefined"&&jQuery(a).show(b):typeof jQuery!="undefined"&&jQuery(a).show()},load:function(a,b,c){var d={elem:a};d!=null&&d!=""&&(d=c);typeof jQuery!="undefined"&&jQuery(a).load(d,b)},addClass:function(a,b){typeof jQuery!="undefined"&&jQuery(a).addClass(b)},removeClass:function(a,b){typeof jQuery!="undefined"&&jQuery(a).removeClass(b)},attr:function(a,b,c){if(c!=null&&c!="")typeof jQuery!="undefined"&&jQuery(a).attr(b,c);else if(typeof jQuery!="undefined")return jQuery(a).attr(b)},prop:function(a,b,c){typeof jQuery=="undefined"||!/[1-9]\.[3-9].[1-9]/.test($.fn.jquery)?VMM.Element.attribute(a,b,c):jQuery(a).prop(b,c)},attribute:function(a,b,c){if(c!=null&&c!="")typeof jQuery!="undefined"&&jQuery(a).attr(b,c);else if(typeof jQuery!="undefined")return jQuery(a).attr(b)},visible:function(a,b){if(b!=null)typeof jQuery!="undefined"&&(b?jQuery(a).show(0):jQuery(a).hide(0));else if(typeof jQuery!="undefined")return jQuery(a).is(":visible")?!0:!1},css:function(a,b,c){if(c!=null&&c!="")typeof jQuery!="undefined"&&jQuery(a).css(b,c);else if(typeof jQuery!="undefined")return jQuery(a).css(b)},cssmultiple:function(a,b){if(typeof jQuery!="undefined")return jQuery(a).css(b)},offset:function(a){var b;typeof jQuery!="undefined"&&(b=jQuery(a).offset());return b},position:function(a){var b;typeof jQuery!="undefined"&&(b=jQuery(a).position());return b},width:function(a,b){if(b!=null&&b!="")typeof jQuery!="undefined"&&jQuery(a).width(b);else if(typeof jQuery!="undefined")return jQuery(a).width()},height:function(a,b){if(b!=null&&b!="")typeof jQuery!="undefined"&&jQuery(a).height(b);else if(typeof jQuery!="undefined")return jQuery(a).height()},toggleClass:function(a,b){typeof jQuery!="undefined"&&jQuery(a).toggleClass(b)},each:function(a,b){typeof jQuery!="undefined"&&jQuery(a).each(b)},html:function(a,b){var c;if(typeof jQuery!="undefined"){c=jQuery(a).html();return c}if(b!=null&&b!="")typeof jQuery!="undefined"&&jQuery(a).html(b);else{var c;if(typeof jQuery!="undefined"){c=jQuery(a).html();return c}}},find:function(a,b){if(typeof jQuery!="undefined")return jQuery(a).find(b)},stop:function(a){typeof jQuery!="undefined"&&jQuery(a).stop()},animate:function(a,b,c,d,e){var f="easein",g=1e3,h={};b!=null&&(b<1?g=1:g=Math.round(b));c!=null&&c!=""&&(f=c);d!=null?h=d:h={opacity:0};if(VMM.Browser.device=="mobile"||VMM.Browser.device=="tablet"){var i=Math.round(g/1500*10)/10,j=i+"s";VMM.Element.css(a,"-webkit-transition","all "+j+" ease");VMM.Element.css(a,"-moz-transition","all "+j+" ease");VMM.Element.css(a,"-o-transition","all "+j+" ease");VMM.Element.css(a,"-ms-transition","all "+j+" ease");VMM.Element.css(a,"transition","all "+j+" ease");VMM.Element.cssmultiple(a,h)}else typeof jQuery!="undefined"&&(e!=null&&e!=""?jQuery(a).animate(h,{queue:!1,duration:g,easing:f,complete:e}):jQuery(a).animate(h,{queue:!1,duration:g,easing:f}))}}.init()}if(typeof jQuery!="undefined"){jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c}})}if(typeof VMM!="undefined"&&typeof VMM.Browser=="undefined"){VMM.Browser={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";this.device=this.searchDevice(navigator.userAgent);this.orientation=this.searchOrientation(window.orientation)},searchOrientation:function(a){return a==0||a==180?"portrait":a==90||a==-90?"landscape":"normal"},searchDevice:function(a){return a.match(/Android/i)||a.match(/iPhone|iPod/i)?"mobile":a.match(/iPad/i)?"tablet":a.match(/BlackBerry/i)||a.match(/IEMobile/i)?"other mobile":"desktop"},searchString:function(a){for(var b=0;b
";return d}if(e.type=="flickr"){d="
";return d}if(e.type=="youtube"){d="
";return d}if(e.type!="googledoc"){if(e.type=="vimeo"){d="
";return d}if(e.type=="twitter"){d="";return d}if(e.type=="twitter-ready"){d="";return d}if(e.type=="soundcloud"){d="
";return d}if(e.type=="google-map"){d="
";return d}if(e.type=="unknown"){d="";return d}if(e.type=="website"){d="
";return d}d="
";return d}d=""}},create:function(a,b,c,d,e){_return=c;_w=500;_h=400;$mediacontainer=a;var f=!1;d!=null&&d!=""&&(_w=d);e!=null&&e!=""&&(_h=e);if(b.media!=null&&b.media!=""){f=!0;var g="",h="",i="",j={},k=_h-50,l=!1;b.credit!=null&&b.credit!=""&&(i="
"+VMM.Util.linkify_with_twitter(b.credit,"_blank")+"
");b.caption!=null&&b.caption!=""&&(h="
"+VMM.Util.linkify_with_twitter(b.caption,"_blank")+"
");j=VMM.MediaType(b.media);if(j.type=="image")g="";else if(j.type=="flickr"){var m="flickr_"+j.id;g="";VMM.ExternalAPI.flickr.getPhoto(j.id,"#"+m)}else if(j.type=="googledoc")j.id.match(/docs.google.com/i)?g="":g="";else if(j.type=="youtube"){g="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(j.id)}else if(j.type=="vimeo")g="";else if(j.type=="twitter"){g="";trace("TWITTER");VMM.ExternalAPI.twitter.prettyHTML(j.id);l=!0}else if(j.type=="twitter-ready")g=j.id;else if(j.type=="soundcloud"){var n="soundcloud_"+VMM.Util.unique_ID(5);g="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(j.id,n)}else if(j.type=="google-map"){var o="googlemap_"+VMM.Util.unique_ID(7);g="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(j.id,o)}else if(j.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");g=VMM.Util.properQuotes(j.id)}else if(j.type=="website")g="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(j.type)}g="
"+g+i+h+"
";if(_return)return l?"
"+g+"
":"
"+g+"
";VMM.appendElement($mediacontainer,g);VMM.appendElement($mediacontainer,i);VMM.appendElement($mediacontainer,h)}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,"":c="";else if(f.type=="youtube"){c="
Loading YouTube video...
";VMM.ExternalAPI.youtube.init(f.id)}else if(f.type=="vimeo")c="";else if(f.type=="twitter"){c="";g=!0;VMM.ExternalAPI.twitter.prettyHTML(f.id)}else if(f.type=="twitter-ready")c=f.id;else if(f.type=="soundcloud"){var i="soundcloud_"+VMM.Util.unique_ID(5);c="
Loading Sound
";VMM.ExternalAPI.soundcloud.getSound(f.id,i)}else if(f.type=="google-map"){var j="googlemap_"+VMM.Util.unique_ID(7);c="
Loading Map...
";VMM.ExternalAPI.googlemaps.getMap(f.id,j)}else if(f.type=="unknown"){trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");c=VMM.Util.properQuotes(f.id)}else if(f.type=="website")c="";else{trace("NO KNOWN MEDIA TYPE FOUND");trace(f.type)}c="
"+c+e+d+"
";return g?"
"+c+"
":"
"+c+"
"}}}.init());typeof VMM!="undefined"&&typeof VMM.MediaType=="undefined"&&(VMM.MediaType=function(a){var b=!1,c={};if(a.match("div class='twitter'")){c.type="twitter-ready";c.id=a;b=!0}else if(a.match("(www.)?youtube|youtu.be")){a.match("v=")?youtube_id=VMM.Util.getUrlVars(a).v:youtube_id=a.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0];c.type="youtube";c.id=youtube_id;b=!0}else if(a.match("(player.)?vimeo.com")){vimeo_id=a.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];c.type="vimeo";c.id=vimeo_id;b=!0}else if(a.match("(player.)?soundcloud.com")){c.type="soundcloud";c.id=a;b=!0}else if(a.match("(www.)?twitter.com")){trace("TWITTER MATCH");a.match("status/")?twitter_id=a.split("status/")[1]:a.match("statuses/")?twitter_id=a.split("statuses/")[1]:twitter_id="";c.type="twitter";c.id=twitter_id;b=!0}else if(a.match("maps.google")&&!a.match("staticmap")){c.type="google-map";c.id=a.split(/src=['|"][^'|"]*?['|"]/gi);b=!0}else if(a.match("flickr.com/photos")){c.type="flickr";c.id=a.split("photos/")[1].split("/")[1];c.link=a;b=!0}else if(a.match(/jpg|jpeg|png|gif/i)||a.match("staticmap")){c.type="image";c.id=a;b=!0}else if(VMM.FileExtention.googleDocType(a)){c.type="googledoc";c.id=a;b=!0}else if(a.indexOf("http://")==0){c.type="website";c.id=a;b=!0}else{trace("unknown media");c.type="unknown";c.id=a;b=!0}if(b)return c;trace("No valid media id detected");trace(a);return!1});if(typeof VMM!="undefined"&&typeof VMM.Media=="undefined"){VMM.Media=function(a,b,c,d){function n(){}var e={},f=!1,g={width:720,height:400,content_width:720,content_height:400,ease:"easeInOutExpo",duration:1e3,spacing:15},h="",i="",j="",k="",l=a;b!=null&&b!=""&&(g.width=b);c!=null&&c!=""&&(g.height=c);this.init=function(a){typeof a!="undefined"?this.setData(a):trace("WAITING ON DATA")};var m=function(a,b,c){h=VMM.appendAndGetElement(l,"
","media");i=VMM.appendAndGetElement(h,"
","container");j=VMM.appendAndGetElement(i,"
","media-container");if(e.media!=null&&e.media!=""){f=!0;var d={};d=VMM.MediaType(e.media);d.type=="image"?VMM.appendElement(j,""):d.type=="youtube"?VMM.appendElement(j,""; + mediaElem = ""; } else { - mediaElem = ""; + mediaElem = ""; } - - - } else if (m.type == "youtube") { - mediaElem = "
Loading YouTube video...
"; + // YOUTUBE + } else if (m.type == "youtube") { + mediaElem = "
Loading YouTube video...
"; VMM.ExternalAPI.youtube.init(m.id); - //mediaElem = ""; - } else if (m.type == "vimeo") { - mediaElem = ""; - } else if (m.type == "twitter"){ - mediaElem = ""; - //VMM.ExternalAPI.twitter.getHTML(m.id); - trace("TWITTER"); + // VIMEO + } else if (m.type == "vimeo") { + mediaElem = ""; + // TWITTER + } else if (m.type == "twitter"){ + mediaElem = ""; + isTextMedia = true; VMM.ExternalAPI.twitter.prettyHTML(m.id); - isTextMedia = true; - } else if (m.type == "twitter-ready") { - mediaElem = m.id; - } else if (m.type == "soundcloud") { - var soundcloud_id = "soundcloud_" + VMM.Util.unique_ID(5); - mediaElem = "
Loading Sound
"; - VMM.ExternalAPI.soundcloud.getSound(m.id, soundcloud_id) - } else if (m.type == "google-map") { - //mediaElem = "" - var map_id = "googlemap_" + VMM.Util.unique_ID(7); - mediaElem = "
Loading Map...
"; + // TWITTER + } else if (m.type == "twitter-ready") { + mediaElem = m.id; + // SOUNDCLOUD + } else if (m.type == "soundcloud") { + var soundcloud_id = "soundcloud_" + VMM.Util.unique_ID(5); + mediaElem = "
Loading Sound
"; + VMM.ExternalAPI.soundcloud.getSound(m.id, soundcloud_id); + // GOOGLE MAPS + } else if (m.type == "google-map") { + var map_id = "googlemap_" + VMM.Util.unique_ID(7); + mediaElem = "
Loading Map...
"; VMM.ExternalAPI.googlemaps.getMap(m.id, map_id); - } else if (m.type == "unknown") { + // UNKNOWN + } else if (m.type == "unknown") { trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML"); - mediaElem = VMM.Util.properQuotes(m.id); - } else if (m.type == "website") { - mediaElem = ""; - //mediaElem = "" + ""; + mediaElem = VMM.Util.properQuotes(m.id); + // WEBSITE + } else if (m.type == "website") { + mediaElem = ""; + //mediaElem = "" + ""; + // NO MATCH } else { trace("NO KNOWN MEDIA TYPE FOUND"); trace(m.type); } - // WRAP THE MEDIA ELEMENT - mediaElem = "
" + mediaElem + creditElem + captionElem + "
"; + // WRAP THE MEDIA ELEMENT + mediaElem = "
" + mediaElem + creditElem + captionElem + "
"; + // RETURN + if (isTextMedia) { + return "
" + mediaElem + "
"; + } else { + return "
" + mediaElem + "
"; + } + + /* if (_return) { if (isTextMedia) { return "
" + mediaElem + "
"; @@ -1917,6 +1905,7 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') { VMM.appendElement($mediacontainer, creditElem); VMM.appendElement($mediacontainer, captionElem); } + */ }; }, @@ -2237,6 +2226,15 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') { VMM.ExternalAPI = { + pushQues: function() { + if (VMM.master_config.googlemaps.active) { + VMM.ExternalAPI.googlemaps.pushQue(); + } + if (VMM.master_config.youtube.active) { + VMM.ExternalAPI.youtube.pushQue(); + } + }, + twitter: { tweetArray: [], // VMM.ExternalAPI.twitter.getHTML(id); @@ -2421,13 +2419,14 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') { http://maps.google.com/maps?q=Zernikedreef+11,+Leiden,+Nederland&hl=en&sll=37.0625,-95.677068&sspn=45.957536,93.076172&oq=zernike&hnear=Zernikedreef+11,+Leiden,+Zuid-Holland,+The+Netherlands&t=m&z=16 */ getMap: function(url, id) { + var timer; var map_vars = VMM.Util.getUrlVars(url); trace(map_vars); var map_url = "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"; var map = {url: url, vars: map_vars, id: id} - + trace(map); if (VMM.master_config.googlemaps.active) { - VMM.master_config.googlemaps.createMap(map); + VMM.master_config.googlemaps.que.push(map); } else { VMM.master_config.googlemaps.que.push(map); @@ -2459,13 +2458,19 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') { if (!VMM.master_config.googlemaps.active) { if (VMM.master_config.googlemaps.map_active && VMM.master_config.googlemaps.places_active) { VMM.master_config.googlemaps.active = true; - for(var i = 0; i < VMM.master_config.googlemaps.que.length; i++) { - VMM.ExternalAPI.googlemaps.createMap(VMM.master_config.googlemaps.que[i]); - } + VMM.ExternalAPI.googlemaps.pushQue(); } } }, + pushQue: function() { + for(var i = 0; i < VMM.master_config.googlemaps.que.length; i++) { + VMM.ExternalAPI.googlemaps.createMap(VMM.master_config.googlemaps.que[i]); + } + VMM.master_config.googlemaps.que = []; + + }, + defaultType: function(name) { if (name.toLowerCase() == "satellite" || name.toLowerCase() == "hybrid" || name.toLowerCase() == "terrain" || name.toLowerCase() == "roadmap") { return true; @@ -2529,6 +2534,8 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') { ================================================== */ var map_attribution = ""; + var layer; + var map; function mapProvider(name) { if (name in VMM.ExternalAPI.googlemaps.map_providers) { @@ -2575,7 +2582,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') { /* Make the Map ================================================== */ - var layer; + if (type.of(VMM.master_config.Timeline.maptype) == "string") { if (VMM.ExternalAPI.googlemaps.defaultType(VMM.master_config.Timeline.maptype)) { @@ -2630,7 +2637,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') { VMM.attachElement("#" + m.id, "
"); var map = new google.maps.Map(document.getElementById(unique_map_id), map_options); - + if (VMM.ExternalAPI.googlemaps.defaultType(VMM.master_config.Timeline.maptype)) { } else { @@ -2642,6 +2649,8 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') { loadKML(); + + // KML function loadKML() { var kml_url = m.url + "&output=kml"; @@ -2728,9 +2737,10 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') { // VMM.ExternalAPI.youtube.init(id); youtube: { init: function(id) { - + var timer; if (VMM.master_config.youtube.active) { - VMM.master_config.youtube.createPlayer(id); + trace(id); + VMM.master_config.youtube.que.push(id); } else { VMM.master_config.youtube.que.push(id); @@ -2750,13 +2760,21 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') { onAPIReady: function() { trace("YOUTUBE API READY") VMM.master_config.youtube.active = true; - + VMM.ExternalAPI.youtube.pushQue(); + }, + + pushQue: function() { for(var i = 0; i < VMM.master_config.youtube.que.length; i++) { VMM.ExternalAPI.youtube.createPlayer(VMM.master_config.youtube.que[i]); } + + VMM.master_config.youtube.que = []; + }, + // VMM.ExternalAPI.youtube.createPlayer(id); createPlayer: function(id) { + trace("create player") var p = { active: false, player: {}, @@ -2812,6 +2830,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') { } + } } @@ -3182,27 +3201,26 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { VMM.Slider = function(parent, parent_config) { - /* PRIVATE VARS - ================================================== */ var events = {}, config; - // ARRAYS - var data = [], slides = [], slide_positions = []; - var slides_content = ""; - var current_slide = 0; - var current_width = 960; - var touch = {move: false, x: 10, y:0, off: 0, dampen: 48}; - var content = ""; - var _active = false; - var layout = parent; - // ELEMENTS var $slider, $slider_mask, $slider_container, $slides_items; - // NAVIGATION - var navigation = {nextBtn:"", prevBtn:"", nextDate:"", prevDate:"", nextTitle:"", prevTitle:""}; + var data = [], slides = [], slide_positions = []; + + var slides_content = ""; + var current_slide = 0; + var current_width = 960; + var touch = {move: false, x: 10, y:0, off: 0, dampen: 48}; + var content = ""; + var _active = false; + var layout = parent; + var navigation = {nextBtn:"", prevBtn:"", nextDate:"", prevDate:"", nextTitle:"", prevTitle:""}; + var timer; + // CONFIG if(typeof VMM.Timeline != 'undefined') { config = VMM.Timeline.Config; } else { config = { + preload: 4, current_slide: 0, interval: 10, something: 0, @@ -3232,8 +3250,8 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { ================================================== */ this.ver = "0.6"; - config.slider.width = config.width; - config.slider.height = config.height; + config.slider.width = config.width; + config.slider.height = config.height; /* PUBLIC FUNCTIONS ================================================== */ @@ -3337,8 +3355,8 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { VMM.Element.width($slides_items, (slides.length * config.slider.content.width)); if (_from_start) { - var _pos = VMM.Element.position(slides[current_slide]); - VMM.Element.css($slider_container, "left", _pos.left); + var _pos = slides[current_slide].leftpos(); + VMM.Element.css($slider_container, "left", _pos); } // RESIZE SLIDES @@ -3354,7 +3372,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { VMM.Element.css(navigation.nextBtnContainer, "top", ( (config.slider.height/2) - (config.slider.nav.height/2) ) ); VMM.Element.css(navigation.prevBtnContainer, "top", ( (config.slider.height/2) - (config.slider.nav.height/2) ) ); - // Animate Changes VMM.Element.height($slider_mask, config.slider.height); VMM.Element.width($slider_mask, current_width); @@ -3373,7 +3390,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { ================================================== */ function onNextClick(e) { if (current_slide == slides.length - 1) { - VMM.Element.animate($slider_container, config.duration, config.ease, {"left": -(VMM.Element.position(slides[current_slide]).left)}); + VMM.Element.animate($slider_container, config.duration, config.ease, {"left": -(slides[current_slide].leftpos()) } ); } else { goToSlide(current_slide+1); upDate(); @@ -3405,28 +3422,25 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { function onTouchUpdate(e, b) { if (slide_positions.length == 0) { for(var i = 0; i < slides.length; i++) { - var sp = VMM.Element.position(slides[i]); - slide_positions.push(sp.left); + slide_positions.push( slides[i].leftpos() ); } } if (typeof b.left == "number") { var _pos = b.left; - if (_pos < -(VMM.Element.position(slides[current_slide]).left) - (config.slider_width/3)) { + var _slide_pos = -(slides[current_slide].leftpos()); + if (_pos < _slide_pos - (config.slider_width/3)) { onNextClick(); - } else if (_pos > -(VMM.Element.position(slides[current_slide]).left) + (config.slider_width/3)) { + } else if (_pos > _slide_pos + (config.slider_width/3)) { onPrevClick(); } else { - VMM.Element.animate($slider_container, config.duration, config.ease, {"left": -(VMM.Element.position(slides[current_slide]).left)}); + VMM.Element.animate($slider_container, config.duration, config.ease, {"left": _slide_pos }); } } else { - VMM.Element.animate($slider_container, config.duration, config.ease, {"left": -(VMM.Element.position(slides[current_slide]).left)}); + VMM.Element.animate($slider_container, config.duration, config.ease, {"left": _slide_pos }); } if (typeof b.top == "number") { VMM.Element.animate($slider_container, config.duration, config.ease, {"top": -b.top}); - //VMM.Element.animate(layout, _duration, _ease, {scrollTop: VMM.Element.prop(layout, "scrollHeight") + b.top }); - //VMM.Element.animate(layout, _duration, _ease, {scrollTop: VMM.Element.prop(layout, "scrollHeight") + VMM.Element.height(layout) }); - //VMM.Element.animate($slider_container, config.duration, config.ease, {"top": -400}); } else { } @@ -3448,24 +3462,39 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { /* BUILD SLIDES ================================================== */ var buildSlides = function(d) { - - // Clear out existing content VMM.attachElement($slides_items, ""); slides = []; for(var i = 0; i < d.length; i++) { - var bw = ""; - var _slide; - var _media; - - bw = VMM.createElement("div", d[i].content, "content"); - - _slide = VMM.appendAndGetElement($slides_items, "
", "slider-item" , bw); - + var _slide = new VMM.Slider.Slide(d[i], $slides_items); + //_slide.show(); slides.push(_slide); } + } + + var preloadSlides = function(skip) { + if (skip) { + preloadTimeOutSlides(); + } else { + timer = setTimeout(preloadTimeOutSlides, config.duration); + } + } + + var preloadTimeOutSlides = function() { + trace("preloadTimeOutSlides"); + trace("CURRENT SLIDE: " + current_slide); + for(var j = 0; j < config.preload; j++) { + if ( !((current_slide + j) >= slides.length - 1)) { + trace("PRELOAD: " + (current_slide + j) ); + slides[current_slide + j].show(); + } + if ( !( (current_slide - j) < 0 ) ) { + trace("PRELOAD: " + (current_slide - j) ); + slides[current_slide - j].show(); + } + } - + sizeSlides(); } /* SIZE SLIDES @@ -3514,7 +3543,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { mediasize.text_media.width = config.slider.content.width; mediasize.text_media.height = ((config.slider.height/100) * 50 ) - 50; - //mediasize.media.height = ((config.slider.height/100) * 80 ) - 40; mediasize.media.height = ((config.slider.height/100) * 70 ) - 40; mediasize.text_media.video = VMM.Util.ratio.fit(mediasize.text_media.width, mediasize.text_media.height, 16, 9); @@ -3535,9 +3563,9 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { // MAINTAINS VERTICAL CENTER IF IT CAN for(var i = 0; i < slides.length; i++) { if (VMM.Element.height(VMM.Element.find( slides[i], ".content")) > config.slider.height) { - VMM.Element.css(slides[i], "display", "block" ); + slides[i].css("display", "block"); } else { - VMM.Element.css(slides[i], "display", "table" ); + slides[i].css("display", "table"); } } @@ -3607,7 +3635,8 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { var pos = 0; for(var i = 0; i < slides.length; i++) { pos = i * (config.slider.width+config.spacing); - VMM.Element.css(slides[i], "left", pos); + //VMM.Element.css(slides[i], "left", pos); + slides[i].leftpos(pos); } } @@ -3617,13 +3646,14 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { var _ease = "linear"; for(var i = 0; i < slides.length; i++) { if (i == current_slide) { - VMM.Element.animate(slides[i], config.duration, _ease, {"opacity": 1}); - } else if (i == current_slide - 1) { - VMM.Element.animate(slides[i], config.duration, _ease, {"opacity": 0.1}); - } else if (i == current_slide + 1) { - VMM.Element.animate(slides[i], config.duration, _ease, {"opacity": 0.1}); + //VMM.Element.animate(slides[i], config.duration, _ease, {"opacity": 1}); + slides[i].animate(config.duration, _ease, {"opacity": 1}); + } else if (i == current_slide - 1 || i == current_slide + 1) { + //VMM.Element.animate(slides[i], config.duration, _ease, {"opacity": 0.1}); + slides[i].animate(config.duration, _ease, {"opacity": 0.1}); } else { - VMM.Element.css(slides[i], "opacity", n); + //VMM.Element.css(slides[i], "opacity", n); + slides[i].opacity(n); } } } @@ -3644,21 +3674,14 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { var _duration = config.duration; var is_last = false; var is_first = false; + var _pos = slides[current_slide].leftpos(); + //var _pos = VMM.Element.position(slides[current_slide]); - if (current_slide == 0) { - is_first = true; - } - if (current_slide +1 >= slides.length) { - is_last = true - } - + if (current_slide == 0) {is_first = true}; + if (current_slide +1 >= slides.length) {is_last = true}; if (ease != null && ease != "") {_ease = ease}; if (duration != null && duration != "") {_duration = duration}; - /* get slide position - ================================================== */ - var _pos = VMM.Element.position(slides[current_slide]); - /* set proper nav titles and dates etc. ================================================== */ if (is_first) { @@ -3683,10 +3706,10 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { /* ANIMATE SLIDE ================================================== */ if (fast) { - VMM.Element.css($slider_container, "left", -(_pos.left - config.slider.content.padding)); + VMM.Element.css($slider_container, "left", -(_pos - config.slider.content.padding)); } else{ VMM.Element.stop($slider_container); - VMM.Element.animate($slider_container, _duration, _ease, {"left": -(_pos.left - config.slider.content.padding)}); + VMM.Element.animate($slider_container, _duration, _ease, {"left": -(_pos - config.slider.content.padding)}); } if (firstrun) { @@ -3696,14 +3719,15 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { /* SET Vertical Scoll ================================================== */ //opacitySlides(0.85); - if (VMM.Element.height(slides[current_slide]) > config.slider_height) { + //if (VMM.Element.height(slides[current_slide]) > config.slider_height) { + if (slides[current_slide].height() > config.slider_height) { VMM.Element.css(".slider", "overflow-y", "scroll" ); } else { VMM.Element.css(layout, "overflow-y", "hidden" ); - VMM.Element.animate(layout, _duration, _ease, {scrollTop: VMM.Element.prop(layout, "scrollHeight") - VMM.Element.height(layout) }); - + VMM.Element.animate(layout, _duration, _ease, {scrollTop: VMM.Element.prop(layout, "scrollHeight") - VMM.Element.height(layout) }); } + preloadSlides(); //VMM.Element.css(navigation.nextBtnContainer, "left", ( VMM.Element.width(navigation.nextBtnContainer) - config.slider.nav.width) ); } @@ -3756,7 +3780,8 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { if (VMM.Browser.device == "tablet" || VMM.Browser.device == "mobile") { config.duration = 500; __duration = 1000; - VMM.TouchSlider.createPanel($slider_container, $slider_container, VMM.Element.width(slides[0]), config.spacing, true); + //VMM.TouchSlider.createPanel($slider_container, $slider_container, VMM.Element.width(slides[0]), config.spacing, true); + VMM.TouchSlider.createPanel($slider_container, $slider_container, slides[0].width(), config.spacing, true); VMM.bindEvent($slider_container, onTouchUpdate, "TOUCHUPDATE"); } else if (VMM.Browser.device == "mobile") { @@ -3782,6 +3807,150 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') { +/*********************************************** + Begin VMM.Slider.Slide.js +***********************************************/ + +/* Slider Slide +================================================== */ +if (typeof VMM.Slider != 'undefined') { + // VMM.Slider.Slide(element, data) + VMM.Slider.Slide = function(d, _parent) { + + var data = d; + var slide = {}; + var media = ""; + var loaded = false; + var element = VMM.appendAndGetElement(_parent, "
", "slider-item"); + + /* PUBLIC + ================================================== */ + this.show = function() { + trace("LOADED: " + loaded); + if (!loaded) { + render(); + } + }; + + this.hide = function() { + if (loaded) { + removeSlide(); + } + }; + + this.elem = function() { + return element; + }; + + this.position = function() { + return VMM.Element.position(element); + }; + + this.leftpos = function(p) { + if(typeof p != 'undefined') { + VMM.Element.css(element, "left", p); + } else { + trace("LEFT: " + VMM.Element.position(element).left); + return VMM.Element.position(element).left + } + }; + + this.animate = function(d, e, p) { + VMM.Element.animate(element, d, e, p); + }; + + this.css = function(p, v) { + VMM.Element.css(element, p, v ); + } + + this.opacity = function(p) { + VMM.Element.css(element, "opacity", p); + } + + this.width = function() { + return VMM.Element.width(element); + }; + + this.height = function() { + return VMM.Element.height(element); + }; + + /* PRIVATE + ================================================== */ + var render = function() { + trace(data); + VMM.attachElement(element, ""); + VMM.appendElement(element, buildSlide() ); + loaded = true; + var timer = setTimeout(VMM.ExternalAPI.pushQues, 500); + }; + + var removeSlide = function() { + VMM.attachElement(element, ""); + loaded = false; + } + + var buildSlide = function() { + var c = {slide:"", text: "", media: "", layout: "content-container layout", has: { text: false, media: false }}; + var b_slide, c_wrap; + + /* DATE + ================================================== */ + if (data.startdate != null && data.startdate != "") { + if (type.of(data.startdate) == "date") { + if (data.type != "start") { + c.text += VMM.createElement("h2", VMM.Util.date.prettyDate(data.startdate), "date"); + } + } + } + + /* HEADLINE + ================================================== */ + if (data.headline != null && data.headline != "") { + if (data.type == "start") { + c.text += VMM.createElement("h2", VMM.Util.linkify_with_twitter(data.headline, "_blank"), "start"); + } else { + c.text += VMM.createElement("h3", VMM.Util.linkify_with_twitter(data.headline, "_blank")); + } + } + + /* TEXT + ================================================== */ + if (data.text != null && data.text != "") { + c.has.text = true; + c.text += VMM.createElement("p", VMM.Util.linkify_with_twitter(data.text, "_blank")); + c.text = VMM.createElement("div", c.text, "container"); + c.text = VMM.createElement("div", c.text, "text"); + } + + /* MEDIA + ================================================== */ + if (data.asset != null && data.asset != "") { + if (data.asset.media != null && data.asset.media != "") { + c.has.media = true; + c.media = VMM.MediaElement.create(data.asset); + } + } + /* COMBINE + ================================================== */ + if (c.has.text) { c.layout += "-text" }; + if (c.has.media){ c.layout += "-media" }; + + c.slide = VMM.createElement("div", c.text + c.media, c.layout); + c_wrap = VMM.createElement("div", c.slide, "content"); + + /* RETURN + ================================================== */ + // return c.slide; + return c_wrap; + + }; + + } + +}; + + /*********************************************** Begin VMM.Util.js ***********************************************/ @@ -4832,6 +5001,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Language == 'undefined') { // @codekit-prepend "VMM.TouchSlider.js"; // @codekit-prepend "VMM.DragSlider.js"; // @codekit-prepend "VMM.Slider.js"; +// @codekit-prepend "VMM.Slider.Slide.js"; // @codekit-prepend "VMM.Util.js"; // @codekit-prepend "VMM.LoadLib.js"; // @codekit-prepend "VMM.Language.js"; @@ -4858,7 +5028,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { timeline_id = "#timeline"; } - version = "0.98.72"; + version = "0.99.00"; trace("TIMELINE VERSION " + version); @@ -4868,6 +5038,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { id: timeline_id, type: "timeline", maptype: "toner", + preload: 4, current_slide: 0, hash_bookmark: false, start_at_end: false, @@ -4938,6 +5109,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { config.current_slide = parseInt(hash); } } + window.onhashchange = function () { if (config.hash_bookmark) { if (is_moving) { @@ -5175,75 +5347,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { }; - // BUILD SLIDE CONTENT pass in json object - var buildSlide = function(dd, d_date) { - var d = dd; - var slide = ""; - var _valid = false; - var _hasmedia = false; - var _hastext = false; - var c = {}; - - c._text = ""; - c._media = ""; - - updateSize(); - - if (type.of(d_date) == "date") { - _valid = true; - - if (dd.type != "start") { - c._text += VMM.createElement("h2", VMM.Util.date.prettyDate(d_date), "date"); - } - - if (d.headline != null && d.headline != "") { - if (d.type == "tweets") { - - } else if (dd.type == "start") { - c._text += VMM.createElement("h2", VMM.Util.linkify_with_twitter(d.headline, "_blank"), "start"); - } else { - c._text += VMM.createElement("h3", VMM.Util.linkify_with_twitter(d.headline, "_blank")); - } - } - - if (d.text != null && d.text != "") { - _hastext = true; - c._text += VMM.createElement("p", VMM.Util.linkify_with_twitter(d.text, "_blank")); - } - - c._text = VMM.createElement("div", c._text, "container"); - c._text = VMM.createElement("div", c._text, "text"); - - } - - if (_valid) { - - var _layout_class = "content-container layout"; - - if (d.asset != null && d.asset != "") { - if (d.asset.media != null && d.asset.media != "") { - _hasmedia = true; - c._media = VMM.MediaElement.create("", d.asset, true, config.feature.width, config.feature.height); - } - } - - if (_hastext) { - _layout_class += "-text" - } - if (_hasmedia) { - _layout_class += "-media"; - } - - slide = VMM.createElement("div", c._text + c._media, _layout_class); - - return slide; - - } - - return slide; - - } - var updateSize = function() { trace("UPDATE SIZE"); config.width = VMM.Element.width($timeline); @@ -5276,9 +5379,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { // START DATE if (data.date[i].type == "tweets") { _date.startdate = VMM.ExternalAPI.twitter.parseTwitterDate(data.date[i].startDate); - } else if (data.date[i].type == "google spreadsheet") { - //_date.startdate = new Date(Date.parse(data.date[i].startDate)); - _date.startdate = VMM.Util.date.parse(data.date[i].startDate); } else { _date.startdate = VMM.Util.date.parse(data.date[i].startDate); } @@ -5289,9 +5389,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { if (data.date[i].endDate != null && data.date[i].endDate != "") { if (data.date[i].type == "tweets") { _date.enddate = VMM.ExternalAPI.twitter.parseTwitterDate(data.date[i].endDate); - } else if (data.date[i].type == "google spreadsheet") { - //_date.enddate = new Date(Date.parse(data.date[i].endDate)); - _date.enddate = VMM.Util.date.parse(data.date[i].endDate); } else { _date.enddate = VMM.Util.date.parse(data.date[i].endDate); } @@ -5299,18 +5396,16 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { _date.enddate = _date.startdate; } - _date.title = data.date[i].headline; - _date.type = data.date[i].type; - _date.date = VMM.Util.date.prettyDate(_date.startdate); - _date.asset = data.date[i].asset; - _date.fulldate = _date.startdate.getTime(); - - // BUILD SLIDE CONTENT - _date.content = buildSlide(data.date[i], _date.startdate); + _date.title = data.date[i].headline; + _date.headline = data.date[i].headline; + _date.type = data.date[i].type; + _date.date = VMM.Util.date.prettyDate(_date.startdate); + _date.asset = data.date[i].asset; + _date.fulldate = _date.startdate.getTime(); + _date.text = data.date[i].text; + _date.content = ""; - if (_date.content != null && _date.content != "") { - _dates.push(_date); - } + _dates.push(_date); } @@ -5326,25 +5421,10 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { ================================================== */ if (data.headline != null && data.headline != "" && data.text != null && data.text != "") { trace("HAS STARTPAGE"); - var _date = {}; - if (data.type == "google spreadsheet") { - trace("google spreadsheet startpage date " + data.startDate); - //_date.startdate = new Date(Date.parse(data.startDate)); - } else { - _date.startdate = VMM.Util.date.parse(data.startDate); - } - - _date.startdate = new Date(_dates[0].startdate); - - var td = _dates[0].startdate; - var td_num = 0; - /* - if (_dates[0].startdate.getDate() > 1) { - _date.startdate.setDate(td.getDate() - 1); - } else if (_dates[0].startdate.getHours() > 0) { - _date.startdate.setHours(td.getHours() - 1); - } - */ + var _date = {}; + var td_num = 0; + var td = _dates[0].startdate; + _date.startdate = VMM.Util.date.parse(data.startDate); if (td.getMonth() === 0 && td.getDate() == 1 && td.getHours() === 0 && td.getMinutes() === 0 ) { // trace("YEAR ONLY"); @@ -5363,19 +5443,17 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') { _date.startdate.setMinutes(td.getMinutes() - 1); } - _date.uniqueid = VMM.Util.unique_ID(5); - _date.enddate = _date.startdate; - _date.title = data.headline; - _date.headline = data.headline; - _date.text = data.text; - _date.type = "start"; - _date.date = VMM.Util.date.prettyDate(data.startDate); - _date.asset = data.asset; - _date.fulldate = _date.startdate.getTime(); - _date.content = buildSlide(_date, _date.startdate); - if (_date.content != null && _date.content != "" || _date.title != null && _date.title != "") { - _dates.push(_date); - } + _date.uniqueid = VMM.Util.unique_ID(5); + _date.enddate = _date.startdate; + _date.title = data.headline; + _date.headline = data.headline; + _date.text = data.text; + _date.type = "start"; + _date.date = VMM.Util.date.prettyDate(data.startDate); + _date.asset = data.asset; + _date.fulldate = _date.startdate.getTime(); + + _dates.push(_date); } /* CUSTOM SORT