LazyLoad=function(doc){var env,head,pending={},pollCount=0,queue={css:[],js:[]},styleSheets=doc.styleSheets;function createNode(name,attrs){var node=doc.createElement(name),attr;for(attr in attrs){if(attrs.hasOwnProperty(attr)){node.setAttribute(attr,attrs[attr])}}return node}function finish(type){var p=pending[type],callback,urls;if(p){callback=p.callback;urls=p.urls;urls.shift();pollCount=0;if(!urls.length){callback&&callback.call(p.context,p.obj);pending[type]=null;queue[type].length&&load(type)}}}function getEnv(){var ua=navigator.userAgent;env={async:doc.createElement("script").async===true};(env.webkit=/AppleWebKit\//.test(ua))||(env.ie=/MSIE/.test(ua))||(env.opera=/Opera/.test(ua))||(env.gecko=/Gecko\//.test(ua))||(env.unknown=true)}function load(type,urls,callback,obj,context){var _finish=function(){finish(type)},isCSS=type==="css",nodes=[],i,len,node,p,pendingUrls,url;env||getEnv();if(urls){urls=typeof urls==="string"?[urls]:urls.concat();if(isCSS||env.async||env.gecko||env.opera){queue[type].push({urls:urls,callback:callback,obj:obj,context:context})}else{for(i=0,len=urls.length;i=0){if(styleSheets[i].href===css.urls[0]){finish("css");break}}pollCount+=1;if(css){if(pollCount<200){setTimeout(pollWebKit,50)}else{finish("css")}}}}return{css:function(urls,callback,obj,context){load("css",urls,callback,obj,context)},js:function(urls,callback,obj,context){load("js",urls,callback,obj,context)}}}(this.document);LoadLib=function(doc){var loaded=[];function isLoaded(url){var i=0,has_loaded=false;for(i=0;ineed;break}}}}catch(err){ready.jquery=false}if(!ready.jquery){LoadLib.js(path.jquery,onloaded_jquery)}else{onloaded_jquery()}function onloaded_jquery(){ LoadLib.js(storyjs_e_config.js,onloaded_js)}function onloaded_js(){ready.js=true;if(storyjs_e_config.lang!="en"){LazyLoad.js("//cdn.knightlab.com/libs/timeline/latest/js/locale/de.js",onloaded_language)}else{ready.language=true}onloaded_check()}function onloaded_language(){ready.language=true;onloaded_check()}function onloaded_css(){ready.css=true;onloaded_check()}function onloaded_font_css(){ready.font.css=true;onloaded_check()}function onloaded_font_js(){ready.font.js=true;onloaded_check()}function onloaded_check(){if(ready.checks>40){return;alert("Error Loading Files")}else{ready.checks++;if(ready.js&&ready.css&&ready.font.css&&ready.font.js&&ready.language){if(!ready.finished){ready.finished=true;buildEmbed()}}else{ready.timeout=setTimeout("onloaded_check_again();",250)}}}this.onloaded_check_again=function(){onloaded_check()};function createEmbedDiv(){var embed_classname="storyjs-embed";t=document.createElement("div");if(storyjs_e_config.embed_id!=""){te=document.getElementById(storyjs_e_config.embed_id)}else{te=document.getElementById("timeline-embed")}te.appendChild(t);t.setAttribute("id",storyjs_e_config.id);if(storyjs_e_config.width.toString().match("%")){te.style.width=storyjs_e_config.width.split("%")[0]+"%"}else{storyjs_e_config.width=storyjs_e_config.width-2;te.style.width=storyjs_e_config.width+"px"}if(storyjs_e_config.height.toString().match("%")){te.style.height=storyjs_e_config.height;embed_classname+=" full-embed";te.style.height=storyjs_e_config.height.split("%")[0]+"%"}else if(storyjs_e_config.width.toString().match("%")){embed_classname+=" full-embed";storyjs_e_config.height=storyjs_e_config.height-16;te.style.height=storyjs_e_config.height+"px"}else{embed_classname+=" sized-embed";storyjs_e_config.height=storyjs_e_config.height-16;te.style.height=storyjs_e_config.height+"px"}te.setAttribute("class",embed_classname);te.setAttribute("className",embed_classname);t.style.position="relative"}function buildEmbed(){VMM.debug=storyjs_e_config.debug;storyjs_embedjs=new VMM.Timeline(storyjs_e_config.id);storyjs_embedjs.init(storyjs_e_config);if(isCDN){VMM.bindEvent(global,onHeadline,"HEADLINE")}}} function TimelinerController() { }; TimelinerController.NODE_TYPE = 'timeliner'; TimelinerController.TIMELINE_TYPE = 'timeline'; TimelinerController.WRAPPER_WITH = '100%'; TimelinerController.DEBUG_INFOS = false; TimelinerController.prototype = jQuery.extend(new BaseController(), { site: 'mdr', name: 'Das Doping-Netzwerk aus Erfurt', wrapper_id: 'wrapper-timelinerContainer', wrapper_height: '700', source_json: '/json100.json', addListener: function () { var that = this; setTimeout(function() { $(".storyjs-embed .vco-navigation .marker, .storyjs-embed .nav-container .icon").click(function() { that.app.tracking.trackStandardPixel(); } ); $(".vco-slider .nav-previous, .vco-slider .nav-next").click(function() { that.app.tracking.trackStandardPixel(); } ); }, 2000); }, createObject: function () { var that = this; if (this.rootConfig.wrapper_id !== undefined) { that.wrapper_id = this.rootConfig.wrapper_id; } if (this.rootConfig.source_json !== undefined) { that.source_json = this.rootConfig.source_json; } if (this.rootConfig.wrapper_height !== undefined) { that.wrapper_height = this.rootConfig.wrapper_height; } if (this.rootConfig.name !== undefined) { that.name = this.rootConfig.name; } createStoryJS({ type: TimelinerController.TIMELINE_TYPE, width: TimelinerController.WRAPPER_WITH, height: that.wrapper_height, lang: 'de', font: 'BreeSerif-OpenSans', source: that.source_json, embed_id: that.wrapper_id, debug: TimelinerController.DEBUG_INFOS }); that.addListener(); } }); Application.CONTROLLERS.push(TimelinerController);