
if(typeof PLISTA=='undefined'||!PLISTA.path){var PLISTA={};PLISTA.path='http://farm.plista.com/';PLISTA.cdnpath='http://static.plista.com/';PLISTA.debug=false;var plista=PLISTA;}
PLISTA.path=PLISTA.path||((document.location.protocol==='https')?'https://farm.plista.com/':'http://farm.plista.com/');PLISTA.cdnpath=PLISTA.cdnpath||((document.location.protocol==='https')?'https://static.plista.com/':'http://static.plista.com/');PLISTA.widgetdatarequested=0;PLISTA.isIE6=/MSIE (5\.5|6\.)/.test(navigator.userAgent);PLISTA.isIE7=/MSIE (7\.)/.test(navigator.userAgent);PLISTA.isIE=PLISTA.isIE6||PLISTA.isIE7||/MSIE (8\.)/.test(navigator.userAgent);PLISTA.isIEquirksmode=(PLISTA.isIE&&(document.compatMode==='BackCompat'));PLISTA.isOpera=/Opera/.test(navigator.userAgent);PLISTA.isIncompatible=(function(){var i,ua=navigator.userAgent,incompatBrowsers=[/^Nokia/,/Opera Mini/,/Symbian/,/MSIE [45]\./];for(i=0;i<incompatBrowsers.length;i++){if(incompatBrowsers[i].test(ua)){return true;}}
return false;}());PLISTA.items=[];PLISTA.items.getByObjectId=function(objectid,domainid){var i,item;if(!domainid){domainid=PLISTA.domainid;}
for(i=0;i<PLISTA.items.length;i++){item=PLISTA.items[i];if((item.objectid==objectid)&&(!item.domainid||domainid==item.domainid)){return item;}}};PLISTA.lib={};PLISTA.options={objectidGenerator:'specCharsToUnderscore',autoinit:('1')?true:false,parserActive:false,sendItemDataAttributes:[]};if(!document.baseURI){document.baseURI=(function(){var b=document.getElementsByTagName('base')[0];if(b){return b.href;}else{return document.location.protocol+'//'+document.location.hostname+'/';}}());}
if(typeof String.prototype.trim==='undefined'){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};}
if(typeof String.prototype.deentityify==='undefined'){String.prototype.deentityify=(function(){var entity={quot:'"',lt:'<',gt:'>',amp:'&'};return function(){return this.replace(/&([^&;]*);/ig,function(a,b){var r=entity[b];return(typeof r==='string')?r:a;});};}());}
(function(ap){if(!ap.forEach){ap.forEach=function(fn){var thisp=arguments[1],i=0,len=this.length;for(;i<len;i+=1){if(i in this){fn.call(thisp,this[i],i,this);}}};}
if(!ap.map){ap.map=function(fn){var len=this.length,res=[],thisp=arguments[1],i=0;if(typeof fn!=="function"){throw new TypeError();}
for(;i<len;i+=1){if(i in this){res[i]=fn.call(thisp,this[i],i,this);}}
return res;};}
if(!ap.filter||/this\.each/.test(ap.filter.toString())){ap.filter=function(fn){var len=this.length,res=[],thisp=arguments[1],i=0,val;if(typeof fn!=="function"){throw new TypeError();}
for(;i<len;i+=1){if(i in this){val=this[i];if(fn.call(thisp,val,i,this)){res.push(val);}}}
return res;};}
if(!ap.indexOf){ap.indexOf=function(f){var l=this.length,i=arguments[1]||0;i+=(i<0)?l:0;for(i=Math.max(i,0);i<l;i+=1){if(this[i]===f){return i;}}
return-1;};}
if(!ap.reduce){ap.reduce=function(fn){var l=this.length,i=0,rv=arguments[1];if(arguments.length<2){do{if(i in this){rv=this[i++];break;}
if(++i>=l){throw new TypeError();}}
while(true);}
if(l===0&&arguments.length===1){throw new TypeError();}
for(;i<l;i+=1){if(i in this){rv=fn.call(null,rv,this[i],i,this);}}
return rv;};}}(Array.prototype));if(!Array.isArray){Array.isArray=function(a){return!!(a&&(typeof a==='object')&&(a instanceof Array));};}
if(!Object.hasOwnProperty('create')){Object.create=(function(){var F=function(){};return function(o){F.prototype=o;var c=new F();if(arguments[1]){throw new TypeError('Object.create: augmenting object not implemented, please dont use the second parameter');}
return c;};}());}
PLISTA.util={DOM:{addEventListener:function(elem,type,listener,useCapture){if((typeof elem!=='object')||(elem===null)){throw'Parameter needs to be DOM element';}
if((type==='DOMMouseScroll')&&(PLISTA.isIE||PLISTA.isOpera)){type='mousewheel';}
if(type==='tripleclick'){return PLISTA.util.DOM.addEventListener(elem,'click',PLISTA.util.DOM.onTripleClick(elem,listener));}
if(elem.addEventListener){elem.addEventListener(type,listener,(typeof useCapture!=='undefined'&&useCapture)?true:false);}else if(window.attachEvent){if(type==='load'&&elem!==window){elem.onreadystatechange=(function(){var f=function(){if(!f.hasRun&&(elem.readyState==='complete')||(elem.readyState==='loaded')){listener();f.hasRun=true;}};f.hasRun=false;return f;}());}else{elem.attachEvent('on'+type,listener);}}else{throw'cannot attach event';}},removeEventListener:function(elem,type,listener,useCapture){if((typeof elem!=='object')||(elem===null)){throw'Parameter needs to be DOM element';}
if((type==='DOMMouseScroll')&&(PLISTA.isIE||PLISTA.isOpera)){type='mousewheel';}
if(elem.removeEventListener){elem.removeEventListener(type,listener,(typeof useCapture!=='undefined'&&useCapture)?true:false);}else if(window.detachEvent){if(type==='DOMMouseScroll'){type='mousewheel';}
if(type==='load'&&elem!==window){elem.onreadystatechange=null;}else{elem.detachEvent('on'+type,listener);}}else{throw'Cannot attach event';}},textContent:function(elem){if(!elem){return false;}
if(PLISTA.isIE&&(elem.nodeType===3)){return elem.data.trim();}
return(elem.textContent||elem.innerText||'').trim();},setAttribute:function(elem,attr,value){if((PLISTA.isIE||PLISTA.isOpera)&&(attr==='style')){elem.style.cssText=value;}else if(PLISTA.isIE&&(attr==='class')){elem.className=value;}else{elem.setAttribute(attr,value);}},createElement:function(name,content){var newElem=document.createElement(name);if(!content){return newElem;}
if(name==='style'){newElem.type='text/css';if(PLISTA.isIE){newElem.styleSheet.cssText=content;}else{newElem.textContent=content;}}else if(name==='script'){newElem.type='text/javascript';if(PLISTA.isIE){newElem.text=content;}else{newElem.innerHTML=content;}}else{newElem.innerHTML=content;}
return newElem;},onTripleClick:function(elm,fn,timeout){var timer=0,cnt=0,click=function(evt){cnt+=1;if(((new Date()).getTime()-timer)>timeout){timer=(new Date()).getTime();cnt=1;}
if(cnt===3){cnt=0;fn();}};if(typeof fn!=='function'){throw'detectTripleClick wants callback function!';}
timeout=timeout||800;PLISTA.util.DOM.addEventListener(elm,'click',click);return click;},getAbsolutePosition:function(e){var x=0,y=0;if(typeof e.offsetParent!=='undefined'){while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent;}}
return{x:x,y:y};},getDimensions:function(e){var x=e.width||e.clientWidth,y=e.height||e.clientHeight;if(!x&&!y&&e.currentStyle){x=parseInt(e.currentStyle.width,10);y=parseInt(e.currentStyle.height,10);}
if(!x&&!y&&window.getComputedStyle){var cs=window.getComputedStyle(e,null);x=parseInt(cs.getPropertyValue("height"),10);y=parseInt(cs.getPropertyValue("width"),10);}
return{x:x,y:y};}},newEvent:function(subject,type){var listeners=[];return{subscribe:function(fn,scope,name){if(typeof fn!=='function'){throw'newEvent.subscribe: parameter no function';}
listeners.push({fn:fn,scope:scope,name:name});},unsubscribe:function(fn){var r=false;listeners.forEach(function(val,key,obj){if(val.fn===fn){obj.splice(key,1);r=true;}});return r;},fire:function(data){var i,length=listeners.length;for(i=0;i<length;i+=1){try{listeners[i].fn.apply(listeners[i].scope||window,[subject,data,type]);}catch(e){PLISTA.util.logger.log((typeof subject!=='undefined'?subject.toString()+': ':'')+'exception while triggering callback '+(listeners[i].name||i)+' for '+type+' event: '+(e.message||e));if(PLISTA.debug){throw e;}}}}};},logger:(function(){var messages=[],loggers={},getLogFn=function(logger,level){return function(msg){var o={message:msg,level:level,logger:logger,type:'log'};messages.push(o);if(PLISTA.debug){PLISTA.remotedata.getData(o);}};};messages.toString=function(){var result='',m;for(var i=0;i<this.length;i+=1){m=this[i];result+=m.logger+' '+m.level+':'+m.message+'\n';}
return result;};return{log:getLogFn('default','DEBUG'),getLogger:function(logger){if(!loggers[logger]){loggers[logger]={trace:getLogFn(logger,'TRACE'),debug:getLogFn(logger,'DEBUG'),info:getLogFn(logger,'INFO'),warn:getLogFn(logger,'WARN'),error:getLogFn(logger,'ERROR'),fatal:getLogFn(logger,'FATAL')};}
return loggers[logger];},getMessages:function(){return messages;}};}()),htmlEntities:(function(){var entity=[34,39,60,62];return function(s){for(var i=0;i<entity.length;i+=1){s=s.split(String.fromCharCode(entity[i])).join('&#'+entity[i]+';');}
return s;};}()),trim:function(s,numChar,p){numChar=parseInt(numChar,10);if(typeof s!=="string"){return"";}
s=s.trim();s=s.replace(/<[^>]*>/g,"");numChar+=s.length-PLISTA.util.realStrLength(s);if(numChar&&s.length>(numChar+(p?2:0))){s=s.slice(0,numChar);s=s.slice(0,Math.max(s.lastIndexOf("-")+1,s.lastIndexOf(" ")));if(p){s+='...';}}
return s;},realStrLength:function(s){var m=s.match(/&#\d+;/g);return m?m.reduce(function(prev,val){return prev+1-val.length;},s.length):s.length;},text_clean:function(str){var ta=document.createElement("textarea");ta.innerHTML=str.replace(/(<([^>]+)>)/ig,"");return ta.value;},loadCSS:function(content,media){var elm;if(/^https?\:\/\/.*/.test(content)){elm=document.createElement("link");elm.href=content;elm.rel="stylesheet";elm.type="text/css";}else{elm=PLISTA.util.DOM.createElement('style',content);}
if(media){PLISTA.util.DOM.setAttribute(elm,'media',media);}
document.getElementsByTagName("head")[0].appendChild(elm);},augment:function(obj){for(var n in obj){if(obj.hasOwnProperty(n)){this[n]=obj[n];}}
return this;},evalScriptTags:function(containerId){var e=document.getElementById(containerId),c='',s=0;for(;s<e.getElementsByTagName('script').length;s+=1){c+=e.getElementsByTagName('script')[s].innerHTML;}
eval(c);},JSON:{parse:function(json){if(typeof json!=='string'){return json;}
if((typeof JSON==='object')&&JSON&&JSON.parse){return JSON.parse(json);}else{return eval('(function () { return '+json+'; })()');}}},mousePosition:function(e){if(!e){e=window.event;}
var body=(window.document.compatMode&&window.document.compatMode==="CSS1Compat")?window.document.documentElement:window.document.body;return{y:e.pageY?e.pageY:e.clientY+body.scrollTop-body.clientTop,x:e.pageX?e.pageX:e.clientX+body.scrollLeft-body.clientLeft};},descendantOf:function(container,descendant){while(descendant){if(descendant===container){return true;}
descendant=descendant.parentNode;}
return false;},absoluteUrl:function(url){if(!url){return'';}
if(url.indexOf('/')===0){url=document.baseURI.slice(0,-1)+url;}else if(!(/^[a-z]+:/.test(url))){url=document.location.protocol+'//'+url;}
return url;},stringSum:function(s){var sum=0,i=0,j=s.length;for(;i<j;i+=1){sum+=s.charCodeAt(i);}
return sum;},benchmark:(function(){var timers={};var marks={};return{start:function(key){timers[key]=(new Date()).getTime();marks[key]=0;},stop:function(key){marks[key]+=1;var t=(new Date()).getTime()-timers[key];PLISTA.util.logger.getLogger('util.benchmark').info('('+key+marks[key]+') : '+t);return t;}};}())};PLISTA.onBeforeInit=PLISTA.util.newEvent(PLISTA,'beforeinit');PLISTA.onLoad=PLISTA.util.newEvent(PLISTA,'load');PLISTA.onStarRating=PLISTA.util.newEvent(PLISTA,'starrating');PLISTA.onBeforeReInit=PLISTA.util.newEvent(PLISTA,'reinit');PLISTA.onClick=PLISTA.util.newEvent(PLISTA,'click');PLISTA.getItemData_clean=function(data){if(!data){return;}
var cleaners={img:function(val){val=PLISTA.util.absoluteUrl(val);if(!(/https?\:\/\/[a-z0-9\-\.]+\.[a-z]+\/.*/.test(val))){return null;}
if(val.lastIndexOf('/')===(val.length-1)){return null;}
return val;},url:function(val){return PLISTA.util.absoluteUrl(val);},objectid:function(val){return val;}};for(var name in data){if(typeof data[name]==='string'){if(cleaners[name]){data[name]=cleaners[name](data[name]);}else{data[name]=PLISTA.util.trim(PLISTA.util.text_clean(data[name]),250,true);}
if(data[name]&&(data[name].length>255)){PLISTA.util.logger.log('property "'+name+'" of item "'+(data.objectid||'')+'" is too long: '+data[name],'error');delete data[name];}}}
return data;};PLISTA.sendItemData=function(params,callback){if(!params.objectid||!params.type){PLISTA.util.logger.log('request to send item data did not contain objectid and type');return;}
var item=PLISTA.getItemData_clean(PLISTA.items.getByObjectId(params.objectid));for(var name in item){if(item.hasOwnProperty(name)){params[name]=item[name];}}
params.datacomplete='true';PLISTA.remotedata.getData(params,callback);};PLISTA.click=function(ref,domainid,objectid,position,widgetkey,src,params,friendid,clickdomainid,campaignid){var name,request=[],clickprops;if(arguments.length>1){clickprops={domainid:domainid,objectid:objectid,position:position,widgetkey:widgetkey,src:src,params:params,friendid:friendid,clickdomainid:clickdomainid,campaignid:campaignid};}else if((arguments.length===1)&&(typeof arguments[0]==='object')&&(arguments[0]!==null)){clickprops={};for(name in arguments[0]){if(arguments[0].hasOwnProperty(name)){clickprops[name]=arguments[0][name];}}}
for(name in clickprops){if(typeof clickprops[name]!=='undefined'){request.push(name+'='+encodeURIComponent(clickprops[name]));}}
request.push('clientrev=8');if(document.images){(new Image()).src=PLISTA.path+'redirect.php?'+request.join('&');}
PLISTA.onClick.fire(clickprops);return true;};PLISTA.isarticle=null;PLISTA.isArticle=function(){if(PLISTA.isarticle===null){if(PLISTA.parser&&PLISTA.parser.get('isarticle')){PLISTA.isarticle=true;}else{if(PLISTA.widgetdatarequested){PLISTA.isarticle=(PLISTA.items.length===1);}}}
return PLISTA.isarticle;};PLISTA.currentObjectid=function(){if(PLISTA.items.length>0){return PLISTA.items[0].objectid;}};PLISTA.loadWidgetData=function(){PLISTA.widgetdatarequested=1;var isarticlerequest,attrs,k;if(PLISTA.isArticle()&&PLISTA.items[0]&&!PLISTA.clickadded){PLISTA.getItemData_clean(PLISTA.items[0]);if(!PLISTA.items[0].objectid){PLISTA.util.logger.log('item 0 has no objectid. NOT sending data...');}else{isarticlerequest={type:'isarticle',objectid:PLISTA.items[0].objectid};attrs=PLISTA.options.sendItemDataAttributes;for(k=0;k<attrs.length;k++){if(attrs[k]){isarticlerequest[attrs[k]]=PLISTA.items[0][attrs[k]];}}
PLISTA.remotedata.getData(isarticlerequest,function(data){data=PLISTA.util.JSON.parse(data);if(data.action&&(data.action==='sendItemData')){setTimeout(function(){PLISTA.sendItemData(data.params);},5000);}});PLISTA.clickadded=true;}}};PLISTA.init=function(){PLISTA.onBeforeInit.fire();if(PLISTA.container){PLISTA.container.initParser();PLISTA.container.initPanels();}
if(PLISTA.loadtopbar&&PLISTA.lib.PlistaTopbar){PLISTA.initTopbar();}
if(PLISTA.panels&&PLISTA.panels.getRatingdata){PLISTA.panels.getRatingdata();}
if(!PLISTA.widgetdatarequested){PLISTA.loadWidgetData();}
if(PLISTA.itemlists){PLISTA.lists.load();}
PLISTA.onLoad.fire();};PLISTA.reinit=function(){PLISTA.items=[];PLISTA.widgetdatarequested=0;PLISTA.onBeforeReInit.fire();PLISTA.init();};PLISTA.setAutoInit=(function(){var f=function(){if(PLISTA.options.autoinit&&!f.onLoadAdded){if(PLISTA.util.DOM.ready){PLISTA.util.DOM.ready(PLISTA.init);}else{PLISTA.util.DOM.addEventListener(window,'load',function(){if(!PLISTA.widgetdatarequested){PLISTA.init();}});}
f.onLoadAdded=true;}};f.onLoadAdded=false;return f;}());PLISTA.addRemoteScriptTag=function(url,id){var tag=PLISTA.util.DOM.createElement('script');if(id){tag.id=id;}
tag.type='text/javascript';tag.src=url;tag.charset='utf-8';document.getElementsByTagName('head')[0].appendChild(tag);return tag;};PLISTA.loadModules=function(names,fn,force){(function loadModule(){var name=names.shift();if(name){if(force||!PLISTA[name]){var tag=PLISTA.addRemoteScriptTag(PLISTA.path+'scripts/'+name+'.js');PLISTA.util.DOM.addEventListener(tag,'load',loadModule);}else{loadModule();}}else{if(typeof fn==='function'){fn();}}}());};PLISTA.remotedata=(function(){var httpRequests=[],callbacks=[];function sendRequests(){var i=0,query,data='';while(i<callbacks.length){if(typeof callbacks[i]!=='undefined'){query=PLISTA.path+'widgetdata.php'+'?clientrev=8'+
(PLISTA.domainid?'&domainid='+PLISTA.domainid:'')+
(PLISTA.pluginhash?'&hash='+PLISTA.pluginhash:'')+
(PLISTA.pluginversion?'&version='+PLISTA.pluginversion:'')+
(PLISTA.publickey?'&publickey='+PLISTA.publickey:'')+
(PLISTA.osh?'&osh='+PLISTA.osh:'')+'&requestID='+httpRequests.length;httpRequests.push([]);data='';while(i<callbacks.length){if(typeof callbacks[i]==='undefined'){PLISTA.util.logger.log('callbacks[i] undefined');i++;}else if(callbacks[i].request.length>2000){PLISTA.util.logger.log('data request too long, starting with: '+
callbacks[i].request.substr(0,50));i++;}else if((data+callbacks[i].request).length>2100){PLISTA.addRemoteScriptTag(query+data);break;}else{data+='&'+i.toString()+'='+callbacks[i].request;httpRequests[httpRequests.length-1][i]=callbacks[i];callbacks[i]=undefined;i++;}}}else{i++;}}
if(data.length>0){PLISTA.addRemoteScriptTag(query+data);}}
return{mode:'queue',sendRequests:sendRequests,getData:function(request,onSetData,onAfterDataSet){if(typeof request!=='string'){request=PLISTA.remoteData.getSpecificationString(request);}
callbacks.push({request:encodeURIComponent(request),onSetData:onSetData,onAfterDataSet:onAfterDataSet});if(this.mode==='run'){sendRequests();}},setData:function(data,requestSubID,requestID){httpRequests[requestID].time=httpRequests[requestID].time||(new Date()).getTime();var req=httpRequests[requestID][requestSubID];if(typeof req.onSetData==='function'){req.onSetData(data,httpRequests[requestID].time);req.onSetData=undefined;}},setTime:function(requestID){var req,i;for(i=0;i<httpRequests[requestID].length;i++){req=httpRequests[requestID][i];if(req&&(typeof req.onAfterDataSet==='function')){req.onAfterDataSet();req.onAfterDataSet=undefined;}}},getSpecificationString:function(spec){var res='',name;for(name in spec){if(spec.hasOwnProperty(name)&&(typeof spec[name]!=='undefined')&&(spec[name]!==null)){res+=name+':'+spec[name].toString().replace(/([;:])/g,'\\$1')+';';}}
return res;},getDebugData:function(){if(PLISTA.debug){return{callbacks:callbacks,httpRequests:httpRequests};}}};}());PLISTA.remoteData=PLISTA.remotedata;PLISTA.onLoad.subscribe(function(){PLISTA.remoteData.mode='run';PLISTA.remoteData.sendRequests();});PLISTA.onBeforeReInit.subscribe(function(){PLISTA.remoteData.mode='queue';});PLISTA.render={parseStyle:function(style,data,styleElements,context){var getVal=function(attr,args){var val;try{if(typeof styleElements[attr]==='function'){val=styleElements[attr](data,args,context);}else if(typeof styleElements[attr]==='undefined'){val=data[attr];}else{val=styleElements[attr].getContent(data,args,context);}
val=val.toString();}catch(e){PLISTA.util.logger.log('util.parseStyle#getVal: error parsing style "'+attr+'": '+(e.message||e));val='';}
return val;},trimEach=function(val,i,obj){obj[i]=val.trim();};styleElements=styleElements||this.defaultStyleElements;context=context||{};var regmatch=/\[([a-z_0-9]+)(\(([A-Za-z_0-9, ]*)\))?\]/i.exec(style),args,tmp,cnt=0;while(regmatch!==null&&regmatch[0]&&regmatch[1]){cnt+=1;if(cnt>100){PLISTA.util.logger.getLogger('PLISTA.render.parseStyle').error('reached maximum replacement count of 100. possible endless loop, plz check ['+regmatch[1]+']!');return'';}
if(regmatch[3]){args=regmatch[3].split(',');args.forEach(trimEach);}else{args=[];}
tmp=getVal(regmatch[1],args);if(!PLISTA.isIE){tmp=tmp.replace(/\$/g,'$$$$');}
style=style.replace(regmatch[0],tmp);regmatch=/\[([a-z_0-9]+)(\(([A-Za-z_0-9, ]*)\))?\]/i.exec(style);}
return style;},defaultStyleElements:{image:function(item,args){var src=item.img;if((args[0]||item.type==='pet')&&src&&item.objectid){src=PLISTA.render.imageUrl(item,args[0],args[1],args[2]);}
return src?'<img src="'+src+'" title="[title]" alt="" />':'';},imgnoresize:(function(){var newImgId=(function(){var id=0;return function(){id+=1;return'plista_widget_imgnoresize_'+id;};}()),setCheckAndResize=function(id){var interval=function interval(){var img=document.getElementById(id);if(img&&(img.naturalWidth||img.complete)){PLISTA.render.resizeImage(img);}else{setTimeout(interval,50);}};interval();};return function(item,args){var src=item.img,dim='',imgId=newImgId();if(!src){return'';}
if(args[0]){dim+='width:'+args[0]+'px;';}
if(args[1]){dim+='height:'+args[1]+'px;';}
setCheckAndResize(imgId);return'<span style="display: block;'+dim+'overflow: hidden;" '+'class="plista_widget_imgwrapper">'+'<img id="'+imgId+'" src="'+src+'" title="[title]" alt="" /></span>';};}()),title:function(item,args){var s=item.title||item.item;if(args[0]){s=PLISTA.util.trim(s,args[0],args[1]);}
return s;},text:function(item,args){var s=item.text;if(args[0]){s=PLISTA.util.trim(s,args[0],args[1]);}
return s;},number:function(item,args,ctx){return ctx.position;},url:function(item){return((item.url.indexOf('%'))===-1)?encodeURI(item.url):item.url;},created_at:{format:'d.m.Y',getContent:function(item){var t=parseInt(item.created_at,10);if(!t){throw'created_at: item.created_at is not set or evaluates to 0';}
var format=this.format;if(format.indexOf('%')===-1){format=format.replace(/([a-z])/ig,'%$1');}
return PLISTA.render.strftime(format,t);}},augment:PLISTA.util.augment},strftime:function(f,t){function pad(val,len){if(typeof val!=='string'){val=val.toString();}
len=len||2;while(val.length<len){val='0'+val;}
return val;}
var date=new Date(t*1000);f=f.replace('%%','%');f=f.replace('%Y',pad(date.getFullYear()));f=f.replace('%y',pad(date.getFullYear()%100));f=f.replace('%m',pad(date.getMonth()+1));f=f.replace('%d',pad(date.getDate()));f=f.replace('%H',pad(date.getHours()));f=f.replace('%i',pad(date.getMinutes()));f=f.replace('%s',pad(date.getSeconds()));return f;},i18n:{rating_description:{1:'irrelevant',2:'boring',3:'okay',4:'good',5:'excellent'}},imageUrl:function(item,width,height,bgColor){var hash=PLISTA.util.stringSum(item.img||'');return PLISTA.cdnpath+'image/resized/'+
(item.domainid||PLISTA.domainid)+'/'+
(bgColor?bgColor+'/':'')+
item.objectid+'_'+(width||0)+'x'+(height||0)+'_'+hash+'.jpg';},resizeImage:function(img){var pDim=PLISTA.util.DOM.getDimensions(img.parentNode),imgOrig=PLISTA.util.DOM.getDimensions(img),ratio={x:pDim.x/imgOrig.x,y:pDim.y/imgOrig.y},t;if(ratio.x<1&&ratio.y<1){t=(ratio.x<ratio.y)?ratio.y:ratio.x;img.height=imgOrig.y*t;img.width=imgOrig.x*t;}
img.style.marginTop=((pDim.y-img.height)/2).toString()+'px';img.style.marginLeft=((pDim.x-img.width)/2).toString()+'px';}};PLISTA.render.defaultStyleElements.imgresize=(function(){var defaultImage=PLISTA.render.defaultStyleElements.image;return function(item,args,ctx){var src=item.img,dim='';if(!src){return'';}
if(args[0]){dim+='width:'+args[0]+'px;';}
if(args[1]){dim+='height:'+args[1]+'px;';}
return'<span class="plista_widget_imgwrapper" style="display: block; overflow: hidden;'+dim+'">'+defaultImage(item,args,ctx)+'</span>';};}());PLISTA.lib=PLISTA.lib||{};PLISTA.lib.dataobject=function(my){var data,udage=0,refreshing=false,logger=PLISTA.util.logger.getLogger('dataobject'),that;if(typeof my!=='object'||!my){throw{message:'parameter missing'};}
data=my.defaultData;if(typeof my.spec!=='object'||!my.spec){throw{message:'specification missing'};}
my.autoload=my.autoload||false;if(typeof my.spec.type!=='string'){throw'datasource must be string';}
my.filterGetData=my.filterGetData||function(data){return data;};that={getUpdateAge:function(){return udage;},refreshData:function(){refreshing=true;PLISTA.remotedata.getData(my.spec,function(newData,time){try{data=PLISTA.util.JSON.parse(newData);}catch(e){logger.error('error eval\'ing remote data starting with "'+newData.substr(0,50)+'": '+e);return;}
udage=time;refreshing=false;},that.onChange.fire);},getData:function(maxage){maxage=maxage||30000;if((new Date()).getTime()-maxage>udage){if(refreshing){logger.info('getData, already refreshing: '+this.toString());}else{logger.debug('getData, starting refresh: '+this.toString()+', udage: '+udage);that.refreshData();}}
return my.filterGetData(data);},toString:function(){return"dataobject";},getDebug:function(){if(PLISTA.debug){return{data:data,udage:udage,refreshing:refreshing,my:my};}}};that.onChange=PLISTA.util.newEvent(that,'change');return that;};PLISTA.lists=[];PLISTA.lists.load=function(){for(var i=0;i<this.length;i++){PLISTA.listwidgets.widget(this[i].settings).init();if(typeof this[i].cb==='function'){this[i].cb();}}};PLISTA.itemlists=(function(){var that=[],basicItemList,recommendationList,similarList;basicItemList=function(my){var that,algoinfo,reloadcount=0;my=my||{};my.spec=my.spec||{};my.spec.type=my.spec.type||'list';my.defaultData={items:[]};my.spec.datasource=my.spec.datasource||'recommendations';my.spec.objectid=my.spec.objectid||PLISTA.currentObjectid();if(isNaN(parseInt(my.spec.count,10))){my.spec.count=15;}
my.required=my.required||[];my.filterGetData=my.filterGetData||function(data){algoinfo=data.algoinfo;if(data.action&&(typeof data.action.reload==='number')&&(data.action.reload>=0)&&reloadcount===0){window.setTimeout(that.refreshData,data.action.reload);reloadcount++;}
return data.items;};that=PLISTA.lib.dataobject(my);that.setCount=function(count,force){count=parseInt(count,10);if(isNaN(count)){throw'itemlist.setCount expects a number';}
if((my.spec.count<count)||force){my.spec.count=count;that.refreshData();}};that.getAlgoInfo=function(){return algoinfo||'';};that.getSpecProperty=function(name){return my.spec[name];};that.setSpecProperty=function(name,value){my.spec[name]=value;};that.toString=function(){return'basicItemList';};PLISTA.itemlists.push(that);return that;};recommendationList=function(my){my=my||{};my.spec=my.spec||{};my.spec.datasource='recommendations';var that=basicItemList(my);that.toString=function(){return"recommendationsList";};that.onSettingsChange=PLISTA.util.newEvent(that,'settingschange');that.getNicheSlider=function(){return 0;};that.getAgeSlider=function(){return 0;};that.setNicheSlider=function(niche){};that.setAgeSlider=function(age){};PLISTA.onStarRating.subscribe(function(){that.refreshData();});return that;};similarList=function(my){my=my||{};my.spec=my.spec||{};my.spec.datasource='similar';var that=basicItemList(my);that.toString=function(){return"similarList";};return that;};that.basicItemList=basicItemList;that.recommendationList=recommendationList;that.getByDataSource=function(datasource,count){return that.getBySpec({datasource:datasource,count:count});};that.getBySpec=function(spec,nostore){var list,i,my,prop,existingValue,match;spec.count=parseInt(spec.count,10);for(i=0;i<that.length;i++){match=true;for(prop in spec){if(spec.hasOwnProperty(prop)&&(typeof spec[prop]!==undefined)&&(spec[prop]!==null)){existingValue=that[i].getSpecProperty(prop);if((prop!=='count')&&(existingValue!==spec[prop])){match=false;break;}}}
if(match){if(spec.count&&!isNaN(spec.count)){that[i].setCount(spec.count);}
return that[i];}}
my={spec:spec,nostore:nostore};switch(spec.datasource){case'recommendations':list=recommendationList(my);break;case'similar':list=similarList(my);break;default:PLISTA.util.logger.log('unknown list type: '+(spec.datasource||'undefined'),'warn');list=basicItemList(my);}
return list;};return that;}());PLISTA.listwidgets=[];PLISTA.onBeforeReInit.subscribe(function(){var lw=PLISTA.listwidgets.pop();while(lw){lw.destroy();lw=PLISTA.listwidgets.pop();}});PLISTA.listwidgets.widget=function(spec){var that;function manipulateLinks(item,innerhtml,pos){var match,stuff='title="[title]"';if(item.url&&((item.url.indexOf(PLISTA.path)===-1)||item.forceTracking)){stuff+=' onmousedown="return PLISTA.click('+"this,"+"'"+(PLISTA.domainid)+"',"+"'"+(item.objectid)+"',"+
pos+","+"'"+(spec.widgetkey||'')+"',"+"'listwidget"+((PLISTA.isArticle()?'article':'')+
spec.list.getSpecProperty('datasource'))+"',"+"'"+(typeof item.bucketid!=='undefined'?item.bucketid:spec.list.getAlgoInfo())+"',"+"'"+(spec.list.getSpecProperty('objectid')||'')+"',"+"'"+(item.domainid||'')+"',"+"'"+(item.campaignid||'')+'\');" ';}
var ix=0,rx=/<a\s[^>]*href=[\'\"]\[url\][\'\"][^>]*>/g;match=rx.exec(innerhtml);while(match!==null){ix=rx.lastIndex-1;innerhtml=innerhtml.substr(0,ix)+stuff+innerhtml.substr(ix);match=rx.exec(innerhtml);}
return innerhtml;}
function onChange(){that.refresh();}
if(typeof spec.target==='string'){spec.target=document.getElementById(spec.target);}
if(!spec.target){throw new Error('PLISTA.listwidgets.widget: no target element');}
spec.itemStyle=spec.itemStyle||'<li><a href="[url]">[title]</a></li>';spec.count=parseInt(spec.count,10)||5;spec.offset=parseInt(spec.offset,10)||0;if((typeof spec.list==='string')||(typeof spec.list==='undefined')){PLISTA.util.logger.getLogger('listwidget').warn('deprecated warning - list parameter for widget should be list object instead of "'+spec.list+'"');spec.list=PLISTA.itemlists.getBySpec({datasource:spec.list||'recommendations',count:spec.count,objectid:spec.objectid});}
spec.list.setCount(spec.count+spec.offset);if(!spec.styleElements){spec.styleElements=PLISTA.render.defaultStyleElements;}
that={spec:spec,setCount:function(cnt){spec.list.setCount(cnt);spec.count=cnt;},init:function(){this.refresh();},refresh:function(){function htmlSafeItemData(item){var safe={},name;for(name in item){if(typeof item[name]==='string'){safe[name]=PLISTA.util.htmlEntities(item[name]);}else{safe[name]=item[name];}}
return safe;}
var i,html='',data=spec.list.getData(),style,ctx=spec.context||{};ctx.listwidget=this;if((typeof data==='object')&&data&&(typeof data.length==='number')){for(i=0;spec.petpos&&(i<data.length);i++){if(data[i].type==="pet"){data.splice(spec.petpos-1,0,data.splice(i,1)[0]);}}
for(i=spec.offset;(i<data.length)&&(i<(spec.offset+spec.count));i++){ctx.position=i+1;if((typeof spec.itemStyle==='object')&&spec.itemStyle){style=spec.itemStyle[data[i].type||'default']||'';}else if(!data[i].type){style=spec.itemStyle;}else{PLISTA.util.logger.log('no matching style for item '+data[i].domainid+'/'+data[i].objectid);style='';}
style=manipulateLinks(data[i],style,i+1);if(style&&data[i].ad_html){style+='<div style="display:none">'+data[i].ad_html+"</div>";}
html+=PLISTA.render.parseStyle(style,htmlSafeItemData(data[i]),spec.styleElements,ctx);}}
if((typeof PLISTA!=='undefined')&&(PLISTA.type==='embedded')){html+='<li class="plista_items_logo"><img src="'+PLISTA.cdnpath+'images/logo15x15.png" /> <a href="http://www.plista.com" style="text-decoration:none;">powered by plista</a></li>';}
if(html===''){if(PLISTA.options.showloading){html='loading ...';}else{html='';}}
that.getTarget().innerHTML=html;that.onRefresh.fire();return true;},destroy:function(){spec.list.onChange.unsubscribe(onChange);spec.getTarget().innerHTML='';},toString:function(){return"list widget";},setList:function(list){spec.list.onChange.unsubscribe(onChange);list.onChange.subscribe(onChange);spec.list=list;}};that.onRefresh=PLISTA.util.newEvent(that,'refresh');if(typeof spec.target==='function'){that.getTarget=spec.target;}else{that.getTarget=function(){return spec.target;};}
that.setList(spec.list);PLISTA.listwidgets.push(that);return that;};(function(){var status=0,k,t=20000,errorPath=PLISTA.path+'errorreport.php',fn=function(){if(status>=0&&status<2){var url=errorPath+'?domainid='+PLISTA.domainid+'&msgkey=not_initialized&error=not yet initialized after '+t+'ms. status '+status;PLISTA.addRemoteScriptTag(url);PLISTA.util.logger.getLogger('errorreport').debug('called '+url);PLISTA.selfmonitoring.onErrorReport.fire();status=-1;}};PLISTA.onBeforeInit.subscribe(function(){status=1;});PLISTA.onLoad.subscribe(function(){status=2;});PLISTA.selfmonitoring={getStatus:function(){return status;},setDelay:function(delay){t=delay;if(k){clearTimeout(k);}
k=setTimeout(fn,t);}};PLISTA.selfmonitoring.onErrorReport=PLISTA.util.newEvent(PLISTA.selfmonitoring);PLISTA.selfmonitoring.setDelay(t);}());PLISTA.loadtopbar=false;PLISTA.options.autoinit=false;PLISTA.options.showloading=false;PLISTA.partner={options:(function(){var o,k=false,r=/plista\[([a-z]+)\]=([a-z0-9]+)/g,d={type:'options'};while((o=r.exec(decodeURIComponent(PLISTA.test&&PLISTA.test.search?PLISTA.test.search:document.location.search)))){d[o[1]]=o[2];k=true;}
if(k){PLISTA.remotedata.getData(d);}
return d;}()),setWidgets:function(widgets){if((typeof widgets!=='object')||(widgets===null)){return;}
function gotoFirstWidget(){if(PLISTA.listwidgets[0]){document.location.hash='#'+PLISTA.listwidgets[0].getTarget().id;}}
function displayBlock(e){return function(){e.style.display='block';};}
function addOnFirstDataEvent(itemlist){if(itemlist.onFirstData){return;}
itemlist.onFirstData=PLISTA.util.newEvent(itemlist,'firstdata');itemlist.onChange.subscribe((function(){var hasRun=false;return function(itemlist){if(!hasRun&&itemlist.getData().length>0){itemlist.onFirstData.fire();}};}()));}
function addClickTracks(e){var i,es=e.getElementsByTagName('a'),clicktrack=function(){PLISTA.click({domainid:PLISTA.domainid,objectid:'advertisehere_de_1',friendid:PLISTA.currentObjectid(),clickdomainid:this.clickdomainid});};for(i=0;i<es.length;i+=1){if(es[i].href.indexOf('http://www.plista.com/advertiser')===0){es[i].clickdomainid=1083;PLISTA.util.DOM.addEventListener(es[i],'mousedown',clicktrack);if(PLISTA.items[0]){es[i].href='http://www.plista.com/advertiser/registrations/advertisehere/'+PLISTA.domainid+'/'+PLISTA.items[0].objectid;}}else if(/^http\:\/\/www\.plista\.com\/?$/.test(es[i].href)){es[i].clickdomainid=1141;PLISTA.util.DOM.addEventListener(es[i],'mousedown',clicktrack);}}}
var widget,list,i;for(i=0;i<widgets.length;i+=1){if((typeof widgets[i]==='object')&&widgets[i]){widget=widgets[i];if(typeof widget.target==='string'){widget.target=document.getElementById(widget.target);}
widget.target.style.display='none';if(widget.targetHTML){widget.target.innerHTML=widget.targetHTML;addClickTracks(widget.target);}
if(!widget.plistaListWidgetDef.target){widget.plistaListWidgetDef.target=widget.target;}
list=widget.plistaListWidgetDef.list;if(typeof list==='string'){list=PLISTA.itemlists.getBySpec({datasource:'recommendations',count:1,objectid:PLISTA.items[0]?PLISTA.items[0].objectid:null,widgetkey:widget.plistaListWidgetDef.widgetkey,flash:widget.plistaListWidgetDef.itemStyle&&widget.plistaListWidgetDef.itemStyle.flashPet&&PLISTA.flash&&PLISTA.flash.flPlugin});}
addOnFirstDataEvent(list);widget.plistaListWidgetDef.list=list;list.onFirstData.subscribe(displayBlock(widget.target));if(document.location.hash==='#plista'){list.onFirstData.subscribe(gotoFirstWidget);}
PLISTA.listwidgets.widget(widget.plistaListWidgetDef).init();}}}};PLISTA.domainid=1308;PLISTA.publickey='62bd378a9152c5dc0d59bba9354ba686fff32444';PLISTA.partner.init=function(placing){var widgets=[];if(!placing){placing={'belowArticle':document.getElementById('plista_widget_belowArticle')};}
if(placing['belowArticle']){widgets.push({"plistaListWidgetDef":{"count":4,"list":PLISTA.itemlists.getBySpec({"adcount":1,"count":4,"datasource":"recommendations","widgetname":"belowArticle","flash":false&&PLISTA.flash&&PLISTA.flash.flPlugin}),"itemStyle":{"default":"<div style=\"border:1px solid #EEEEEF; border-top:none;\">\n<a class=\"itemLink\" href=\"[url]\" title=\"[title]\">\n\t[image]\n\t<div class=\"itemTitle\">[title(50, true)]<\/div>\n\t<p style=\"[margin]; padding:0 0 5px 0; font-weight: normal; position: relative; color:#555;\">[text(120, true)]&nbsp;<span class=\"pagebrowser\"><span class=\"itemMore\">mehr<\/span>&nbsp;\u00bb<\/span><\/p>\n\t<div style=\"clear:both\"><\/div>\n<\/a>\n<\/div>","pet":"<a target=\"_blank\" class=\"itemLinkPET\" href=\"[url]\" title=\"[title]\">\n\t[imagepet(70)]\n\t<div class=\"itemTitle\">[title(50, true)]<\/div>\n\t<p class=\"itemText\" style=\"[margin]\">[text(120, true)]&nbsp;<span class=\"itemMore\">mehr<\/span><\/p>\n\t<span class=\"PETcontainer\">\n\t\t<img src=\"http:\/\/static.plista.com\/images\/newtab.gif\" border=\"0\" \/>\n\t\t<span class=\"PETclue\">ANZEIGE<\/span>\n\t<\/span>\n\t<div style=\"clear:both\"><\/div>\n<\/a>"},"styleElements":Object.create(PLISTA.render.defaultStyleElements).augment({image:function(item){return item.img?'<img style="width: 70px; float: left; margin: 3px 10px 4px 0; position: relative" border="0" title="[title]" src="'+item.img+'"/>':'';},imagepet:function(item,args){return item.img?'<img style="float: left; margin: 3px 10px 4px 0; position: relative" border="0" title="[title]" src="'+PLISTA.render.imageUrl(item,args[0],args[1])+'"/>':'';},margin:function(item){return item.img?'margin-left: 80px;':'';}}),"target":"plista_widget_list_belowArticle","widgetkey":"belowArticle"},"targetHTML":"<div style=\"width: 450px\">\n\t<div class=\"accordion_toggle\" style=\"width: auto\">Das k\u00f6nnte Sie auch interessieren<\/div>\n\t<div id=\"plista_widget_list_belowArticle\"><\/div>\n\t<div class=\"plistaPowered\">\n\t\t<a title=\"powered by plista\" href=\"http:\/\/www.plista.com\" target=\"_blank\">\n\t\t\t<img alt=\"plista Blume\" src=\"http:\/\/static.plista.com\/images\/logo15x15_trans.gif\"\/>\n\t\tpowered by plista<\/a>\n\t<\/div>\n<\/div>","target":placing["belowArticle"]});PLISTA.util.loadCSS(".accordion_toggle{font-weight:bold;font-size:13px;font-family:Arial;background:#eaeaea;padding:5px;color:#555555}.itemLink{display:block;padding:5px 4px 0px 9px;text-decoration:none !important;color:#000000}.itemLink:hover,.itemLinkPET:hover{background-color:#EEEEEF;color:#000;text-decoration:none }.itemLinkPET{display:block;text-decoration:none;padding:4px 4px 0px 9px;background-color:#EEEEEF;text-decoration:none !important;color:#000}.itemTitle{color:#2255AA;font-size:12px;margin:1px 0;position:relative;font-weight:bold}.itemText{margin:0;padding:0;font-weight:normal;position:relative;color:#555}.itemMore{font-weight:bold}.PETcontainer{text-align:right;position:relative;margin-top:-15px;float:right}.PETcontainer img{vertical-align:middle;float:none;height:auto;margin:0;padding:0;width:auto;border:none}.PETclue{font-size:10px;color:#aaa;display:inline;margin:0 0 0 4px;padding:0}.plistaPowered{text-align:right;padding:5px;border:1px solid #EEEEEF}.plistaPowered a{font-size:9px;color:#777777 !important;text-decoration:none;font-weight:normal }.plistaPowered img{vertical-align:middle;border:none }");}
PLISTA.partner.setWidgets(widgets);PLISTA.init();};