if("undefined"===typeof(simTracker)&&"undefined"===typeof(this.simTracker)){this.simTracker={config:{NAME:"pro7",DOMAINS:["prosieben.de","prosieben.ch","prosieben.at"],getIvwUrlTemplate:function(a){var b=a.domain.toLowerCase();return({"prosieben.de":"http://pro7.ivwbox.de/cgi-bin/ivw/CP/{agof};{path}?r={referrer}&d={time}","prosieben.ch":"http://pro7.wemfbox.ch/cgi-bin/ivw/CP/{agof};{path}?r={referrer}&d={time}","prosieben.at":"http://svpro7.oewabox.at/cgi-bin/ivw/CP/{agof}/pro7.at/;{path}?r={referrer}&d={time}"})[b]},beforeFilter:function(b){var a=b.simTrackerMetainfo;if(b===document&&a.channel===undefined&&a.ivwPath==="/"&&a.agofCode==="1101pro7home"){b.simTrackerMetainfo.channel="home";b.simTrackerMetainfo.ivwPath="/home"}}},INFO:"ProSiebenSat1 Tracking Abstraction Framework v1.7 [pro7] (Mon Oct 12 21:36:25 +0200 2009)",DOCUMENT:"SIM_TRACKER_DOCUMENT",GALLERY:"SIM_TRACKER_GALLERY",VIDEO:"SIM_TRACKER_VIDEO",TAB:"SIM_TRACKER_TAB",TYPE_PAGE:"TYPE_PAGE",TYPE_MODULE:"TYPE_MODULE",TYPE_EVENT:"TYPE_EVENT",systemMap:{OmnitureSiteCatalystTracker:"01",IvwTracker:"10"},helpers:{processTemplate:function(c,b){var a=c;simTracker.helpers.eachKeyValue(b,function(e,d){a=a.replace("{"+e+"}",d)});return a},camelize:function(b){if(b===""){return b}var a=b.split("_");a=simTracker.helpers.map(a,function(c){var d=c.toLowerCase();return d.substr(0,1).toUpperCase()+d.substr(1)});return a.join("")},each:function(a,d,c){for(var b=0;b<a.length;b+=1){d.call(c,a[b],b)}},eachKeyValue:function(d,c,b){for(var a in d){if("undefined"===typeof(Object.prototype[a])){c.call(b,a,d[a])}}},map:function(b,e,d){var a=[],c;for(c=0;c<b.length;c+=1){a.push(e.call(d,b[c]))}return a},keys:function(a){var b=[];simTracker.helpers.eachKeyValue(a,function(d,c){b.push(d)});return b},delegateTo:function(a,b){return function(){b.apply(a,arguments)}},clone:function(b){var a={};simTracker.helpers.eachKeyValue(b,function(d,c){a[d]=c});return a},concatIvwPath:function(){var a=[];simTracker.helpers.each(arguments,function(b){if("string"===typeof(b)){simTracker.helpers.each(b.split("/"),function(c){if(c!==""){a.push(c)}})}});return"/"+a.join("/")}},track:function(b,a){simTracker._tracker.track(b,a)},_fixEventListening:function(){if("function"!==typeof(window.addEventListener)){if(document.attachEvent){window.addEventListener=function(b,c,a){window.attachEvent("on"+b,c)}}else{throw new Error("no event listening workaround available!")}}},onLeavePage:function(){simTracker.videoPlayerAdapter.onLeavePage()},onPageLoaded:function(){},setup:function(){this._fixEventListening();simTracker._tracker=new simTracker.SimTrackerDispatcher();simTracker._tracker.register(new simTracker.IvwTracker());simTracker._tracker.register(new simTracker.OmnitureSiteCatalystTracker());simTracker.videoPlayerAdapter=new simTracker.VideoPlayerAdapter();window.addEventListener("unload",function(){simTracker.onLeavePage()},false);window.addEventListener("load",function(){simTracker.onPageLoaded()},false)}};simTracker.TrackerBase=function(){this.className="TrackerBase"};simTracker.TrackerBase.prototype.trackingAllowedFor=function(c){var a=false,b=c.simTrackerMetainfo.trackingSys,d=simTracker.systemMap[this.className];if("undefined"===typeof(b)){if("object"===typeof(document.simTrackerMetainfo)){b=document.simTrackerMetainfo.simTrackerMetainfo}}if("undefined"===typeof(b)||"undefined"===typeof(d)){a=true}else{b=parseInt(b,2);d=parseInt(d,2);a=(b&d)!==0}return a};simTracker.TrackerBase.prototype.metaTypeNameOf=function(a){var b=a.simTrackerMetainfo.type;return simTracker.helpers.camelize(b.substr(12))};simTracker.TrackerBase.prototype.checkType=function(b,a){if("undefined"===typeof(b)&&"undefined"===typeof(a)){return simTracker.TYPE_PAGE}if("undefined"!==typeof(b)&&"undefined"===typeof(a)){return simTracker.TYPE_MODULE}if("undefined"!==typeof(b)&&"undefined"!==typeof(a)){return simTracker.TYPE_EVENT}};simTracker.TrackerBase.prototype.concatIvwPath=simTracker.helpers.concatIvwPath;simTracker.IvwTracker=function(){this.constructor();this.className="IvwTracker";this._imgList=[];window.count_ivw=window.wert=window.get_ivw=simTracker.helpers.delegateTo(this,this.onLegacyFunctionCall)};simTracker.IvwTracker.prototype=new simTracker.TrackerBase();simTracker.IvwTracker.prototype.onLegacyFunctionCall=function(c,a){var b={simTrackerMetainfo:simTracker.helpers.clone(document.simTrackerMetainfo)};if("string"===typeof(a)&&a!==""){b.simTrackerMetainfo.ivwPath=this.concatIvwPath(a,c)}else{b.simTrackerMetainfo.ivwPath=this.concatIvwPath(b.simTrackerMetainfo.ivwPath,c)}this.track(b)};simTracker.IvwTracker.prototype.track=function(c,b){var e,d,a;if(!this._mustTrack(c,b)){return}e={agof:(c&&c.simTrackerMetainfo&&c.simTrackerMetainfo.agofCode?c:document).simTrackerMetainfo.agofCode,path:(c&&c.simTrackerMetainfo&&c.simTrackerMetainfo.ivwPath?c:document).simTrackerMetainfo.ivwPath,time:(new Date()).getTime()+"_"+Math.round(Math.random()*100000),referrer:escape(document.referrer)};d=simTracker.config.getIvwUrlTemplate(document.simTrackerMetainfo);if("string"!==typeof(d)){throw new Error("IVW URL template not found!")}a=simTracker.helpers.processTemplate(d,e);this._imgList.splice(0,1,new Image());this._imgList[0].src=a};simTracker.IvwTracker.prototype._mustTrack=function(d,c){var b=this.checkType(d,c),a;switch(b){case simTracker.TYPE_PAGE:return document.simTrackerMetainfo.isTrackable;case simTracker.TYPE_MODULE:return true;case simTracker.TYPE_EVENT:a=d.simTrackerMetainfo.type;return a==simTracker.GALLERY||a==simTracker.TAB}return false};simTracker.OmnitureSiteCatalystTracker=function(){this.constructor();this.className="OmnitureSiteCatalystTracker";this._videoViewTime=0;this._omnitureEvents={};if("object"===typeof(s)){this._s=s}else{throw new Error("s_code.js missing!")}};simTracker.OmnitureSiteCatalystTracker.prototype=new simTracker.TrackerBase();simTracker.OmnitureSiteCatalystTracker.prototype._trackPage=function(){var c=[],b,a=document.simTrackerMetainfo;this._s.pageName=this.concatIvwPath(a.ivwPath,a.title);this._s.channel=a.channel;this._s.server=a.domain;this._s.prop1=a.title;this._s.prop2=a.contentType;this._s.prop3=a.ivwPath;this._s.prop4=a.agofCode;this._s.eVar3=this._s.pageName;this._s.eVar4=this._s.channel;this._s.eVar6=this._s.server;this._s.eVar15=a.tvBrand;this._s.eVar18=a.subchannel1;this._s.eVar19=a.subchannel2;this._s.eVar20=a.subchannel3;this._s.eVar21=a.subchannel4;this._s.eVar22=a.subchannel5;b=["domain","channel","subchannel1","subchannel2","subchannel3","subchannel4","subchannel5"];simTracker.helpers.each(b,function(e){var d=a[e];if("string"===typeof(d)){c.push(d.replace(/([\\\/])/g,"_"))}});this._s.hier1=c.join("/");if(a.isTrackable){this._s.t()}};simTracker.OmnitureSiteCatalystTracker.prototype._trackModule=function(b,a){var c="_track"+this.metaTypeNameOf(b);if("undefined"===typeof(this[c])){throw new Error("missing OSC function '"+c+"'!")}else{this[c](b,a)}};simTracker.OmnitureSiteCatalystTracker.prototype._trackVideo=function(c,b){if(this.checkType(c,b)===simTracker.TYPE_EVENT){this._trackVideoEvent(c,b)}else{var a=c.simTrackerMetainfo;this._s.pageName=this.concatIvwPath(a.ivwPath,a.title);this._s.prop1=a.title;this._s.prop3=a.ivwPath;this._s.prop4=a.agofCode;this._s.prop23=a.videoID;this._s.prop24=a.playerType;this._s.eVar3=this._s.pageName;this._s.eVar16=this._s.pageName;this._s.eVar23=a.videoType;this._s.eVar24=a.episode;this._s.eVar25=a.title;this._s.products=undefined;this._s.eVar14=undefined;this._s.events="event6";this._s.t()}};simTracker.OmnitureSiteCatalystTracker.prototype._trackVideoEvent=function(c,b){switch(b.type){case"contentClip_start":this._omnitureEvents.event19=true;this._videoViewTime=0;break;case"viewTimeXplus":this._omnitureEvents.event65=true;break;case"contentClip_completed":case"contentClip_canceled":this._omnitureEvents.event66=true;this._omnitureEvents.event68=true;this._s.products=";;;;event66="+this._videoViewTime;this._s.eVar14="viewTime "+this._videoViewTime;this._videoViewTime=0;break;case"updatePosition":this._videoViewTime+=5;break;default:}var a=simTracker.helpers.keys(this._omnitureEvents);if(a.length>0){this._s.linkTrackVars="events,products,eVar14,eVar16";this._s.events=a.join(",");this._s.linkTrackEvents=this._s.events;this._s.tl(this,"o",c.simTrackerMetainfo.title);this._omnitureEvents={};this._s.products=undefined;this._s.eVar14=undefined}};simTracker.OmnitureSiteCatalystTracker.prototype._trackTab=function(e,d){var c,b,f,a;this._s.events="";c=e.simTrackerMetainfo;b=document.simTrackerMetainfo;f=c.ivwPath||b.ivwPath;a=c.agofCode||b.agofCode;this._s.pageName=this.concatIvwPath(f,c.title);this._s.prop1=c.title;this._s.prop3=f;this._s.prop4=a;this._s.eVar3=this.concatIvwPath(f,c.title);this._s.t()};simTracker.OmnitureSiteCatalystTracker.prototype._trackGallery=function(b,a){this._trackTab(b,a)};simTracker.OmnitureSiteCatalystTracker.prototype.track=function(b,a){if(this.checkType(b,a)===simTracker.TYPE_PAGE){this._trackPage()}else{this._trackModule(b,a)}};simTracker.SimTrackerDispatcher=function(){this._trackers=[]};simTracker.SimTrackerDispatcher.prototype.track=function(c,b){var a=(c||document).simTrackerMetainfo.type;if("undefined"===typeof(document.simTrackerMetainfo)){throw new Error("document metainfos are missing!")}if("undefined"===typeof(a)||a.match(/^SIM_TRACKER_/)===null){return false}simTracker.helpers.each(this._trackers,function(d){if("object"===typeof(d)&&"function"===typeof(d.track)){simTracker.config.beforeFilter(c||document);this._cleanupMetainfoIn(c||document);if(d.trackingAllowedFor(c||document)){d.track(c,b)}}},this)};simTracker.SimTrackerDispatcher.prototype._cleanupMetainfoIn=function(a){if("undefined"!==typeof(a)){simTracker.helpers.eachKeyValue(a.simTrackerMetainfo,function(c,b){if(b===""){a.simTrackerMetainfo[c]=b=undefined}if(c==="ivwPath"){if("string"!==typeof(b)){a.simTrackerMetainfo.agofCode="0000keincode"}a.simTrackerMetainfo.ivwPath=simTracker.helpers.concatIvwPath(a.simTrackerMetainfo.ivwPath)}if(c==="isTrackable"){a.simTrackerMetainfo.isTrackable=(b===true||b==="true")}})}};simTracker.SimTrackerDispatcher.prototype.register=function(a){this._trackers.push(a)};simTracker.VideoPlayerAdapter=function(){this._clipIsPlaying=false};simTracker.VideoPlayerAdapter.prototype._convertToNode=function(c){var b={simTrackerMetainfo:c},a;if("undefined"===typeof(b.simTrackerMetainfo.type)){b.simTrackerMetainfo.type=simTracker.VIDEO}if("undefined"===typeof(b.id)){b.id=c.id}a={videoID:"id",agofCode:"agof",viewDuration:"playback_duration",ivwPath:"ivwpath",videoType:"video_type",playerType:"playertype"};simTracker.helpers.eachKeyValue(a,function(e,d){b.simTrackerMetainfo[e]=b.simTrackerMetainfo[d]});return b};simTracker.VideoPlayerAdapter.prototype._convertToEvent=function(b){var a;if("object"===typeof(b)){a={CAPTURING_PHASE:1,AT_TARGET:2,BUBBLING_PHASE:3,type:"string"===typeof(b.evtname)?b.evtname:"unknown",target:window,currentTarget:window,eventPhase:1,bubbles:false,cancelable:false,timeStamp:"object"===typeof(b.timeStamp)?b.timeStamp:new Date(),stopPropagation:function(){},preventDefault:function(){this._isDefaultPrevented=true},initEvent:function(d,e,c){},namespaceURI:"http://www.prosieben.de/video/domevents",isCustom:function(){return true},stopImmediatePropagation:function(){},_isDefaultPrevented:false,isDefaultPrevented:function(){return this._isDefaultPrevented},initEventNS:function(d,e,f,c){}}}return a};simTracker.VideoPlayerAdapter.prototype.track=function(d,c){var b,a;b=this._convertToNode(c);a=this._convertToEvent(d);switch(a.type){case"contentClip_start":this._clipIsPlaying=true;break;case"contentClip_completed":this._clipIsPlaying=false;break}if("PageViews"===a.type){this._lastVideoMetainfo=c;simTracker.track(b)}else{simTracker.track(b,a)}};simTracker.VideoPlayerAdapter.prototype._trackContentClipCanceledEvent=function(){var b,a;this._clipIsPlaying=false;b=this._convertToNode(this._lastVideoMetainfo);a=this._convertToEvent({evtname:"contentClip_canceled"});simTracker.track(b,a)};simTracker.VideoPlayerAdapter.prototype.onLeavePage=function(){if(this._clipIsPlaying){this._trackContentClipCanceledEvent()}};simTracker.VideoPlayerAdapter.prototype.onSendFinal=function(){if(this._clipIsPlaying){this._trackContentClipCanceledEvent()}};simTracker.setup()};