
if(typeof PLISTA=='undefined'||!PLISTA.path){var PLISTA={};PLISTA.path='http://plugin.plista.com/';PLISTA.cdnpath='http://static.plista.com/';PLISTA.debug=false;var plista=PLISTA;}
PLISTA.domainid=275;PLISTA.lang='en';PLISTA.ratingbar_style='<div style="color:#999; font-size:11px; height:18px">'+'<div style="float:left;font-family:arial,sans-serif;">[rating]&nbsp;[bypeople]</div>'+'<div style="float:right">[logo]</div><br style="clear:both" /></div>';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.util.cookie={domain:'',createCookie:function(name,value,days){var expires='',date=days;if(typeof days==='number'){date=new Date();date.setDate(date.getDate()+days);}
if(date){expires="; expires="+date.toGMTString();}
document.cookie=name+"="+value+expires+"; path=/"+(PLISTA.util.cookie.domain?';domain='+PLISTA.util.cookie.domain:'');},readCookie:function(name){var nameEQ=name+"=",i,c,ca;ca=document.cookie.split(';');for(i=0;i<ca.length;i++){c=ca[i];while(c.charAt(0)===' '){c=c.substring(1,c.length);}
if(c.indexOf(nameEQ)===0){return c.substring(nameEQ.length,c.length);}}
return null;},eraseCookie:function(name){PLISTA.util.cookie.createCookie(name,"",-1);}};PLISTA.util.xpath=(function(){var xpath=function(query,e){e=e||document;if(document.createExpression){PLISTA.util.benchmark.start('xpath '+query);var r,expr=document.createExpression(query,null);PLISTA.util.benchmark.stop('xpath '+query);r=expr.evaluate(e,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);PLISTA.util.benchmark.stop('xpath '+query);return r;}else{PLISTA.util.logger.getLogger('util.xpath').error('no xpath support!');}};return function(x,e){try{var v=xpath(x,e),d=[],i=0;for(;v&&(i<v.snapshotLength);i+=1){d.push(v.snapshotItem(i));}
return d;}catch(ex){PLISTA.util.logger.getLogger('util.xpath').error('exception when executing xpath: '+ex);return[];}};}());(function(w,d,f){function XPath(e){this.e=e;this.i=0;this.js=['with(XPath){return ','}'];this.expression(1,1)||this.error();return new Function('n','nsr',this.js.join(''));}
XPath.ie=/MSIE/.test(navigator.userAgent);XPath.prototype={match:function(rx,x){var m,r;if(!(m=rx.exec(this.e.substr(this.i)))||(typeof x=='number'&&!(r=m[x]))||(typeof x=='object'&&!(r=x[m[1]])))return false;this.m=m;this.i+=m[0].length;return r||m;},error:function(m){m=(m||'Syntax error')+' at index '+this.i+': '+this.e.substr(this.i);var e;try{e=new XPathException(51,m)}
catch(x){e=new Error(m)}
throw e;},step:function(l,r,s,n){var i=3;if(this.match(/^(\/\/?|\.\.?|@)\s*/,1)){switch(this.m[1]){case'/':if(s)this.error();if(!n)return this.step(l,r,1);this.js.splice(l,0,' axis(axes["','document-root','"],');i+=this.nodeTypes.node.call(this,l+i);s=1;break;case'//':if(s)this.error();this.js.splice(l,0,' axis(axes["','descendant-or-self','"],');i+=this.nodeTypes.node.call(this,l+i);s=1;break;case'.':if(!s&&!n)this.error();this.js.splice(l,0,' axis(axes["','self','"],');i+=this.nodeTypes.node.call(this,l+i);s=0;break;case'..':if(!s&&!n)this.error();this.js.splice(l,0,' axis(axes["','parent','"],');i+=this.nodeTypes.node.call(this,l+i);s=0;break;case'@':if(!s&&!n)this.error();this.js.splice(l,0,' axis(axes["','attribute','"],');i+=this.nodeTest(l+i,'node')||this.error('Missing nodeTest after @');s=0;}}
else if(!s&&!n)return s?this.error():0;else if(this.match(/^([a-z]+(?:-[a-z]+)*)\s*::\s*/,XPath.axes)){this.js.splice(l,0,' axis(axes["',this.m[1],'"],');i+=this.nodeTest(l+i,(this.m[1]=='attribute')?'node':'element')||this.error('Missing nodeTest after ::');s=0;}
else if(i=this.nodeTest(l,'element')){this.js.splice(l,0,' axis(axes["','child','"],');i+=3;s=0;}
else return 0;for(var j;j=this.predicate(l+i);i+=j);if(n)this.js.splice(r+i++,0,n);i+=this.step(l,r+i,s);this.js.splice(r+i++,0,')');return i;},expression:function(l,r,p){var o,i=this.operand(l);while(o=this.match(/^(or|and|!?=|[<>]=?|[|*+-]|div|mod)\s*/,this.operators)){if(p&&p[0]>=o[0]){this.i-=this.m[0].length;break;}
this.js.splice(l,0,o[1]);i++;this.js.splice(l+i++,0,o[2]);i+=this.expression(l+i,r,o)||this.error('Missing operand');this.js.splice(l+i++,0,o[3]);}
return i;},operand:function(l){if(this.match(/^(-?(?:[0-9]+(?:\.[0-9]+)?|\.[0-9]+)|"[^"]*"|'[^']*')\s*/,1)){this.js.splice(l,0,this.m[1]);return 1;}
var fn;if(fn=this.match(/^([a-z]+(?:-[a-z]+)*)\s*\(\s*/,this.functions)){var i=1,j;this.js.splice(l,0,fn[1]);do{if(j)this.js.splice(l+i++,0,',');i+=(j=this.expression(l+i,l+i));}while(j&&this.match(/^,\s*/));this.match(/^\)\s*/)||this.error('Missing (');if(fn[0]){if(j)this.js.splice(l+i++,0,',');this.js.splice(l+i++,0,fn[0]);}
if(fn[2])this.js.splice(l+i++,0,fn[2]);else if(j>1)this.error('Function has arguments');i+=this.step(l,l+i);return i;}
if(this.match(/^\(\s*/)){var i=1;this.js.splice(l,0,'(');i+=this.expression(l+i,l+i);this.match(/^\)\s*/)||this.error('Missing )');this.js.splice(l+i++,')');return i;}
return this.step(l,l,0,'[n]');},operators:{'|':[1,'union(',',',')'],'or':[1,'bool(',')||bool(',')'],'and':[2,'bool(',')&&bool(',')'],'=':[3,'compare(eq,',',',')'],'!=':[3,'compare(ne,',',',')'],'<':[4,'compare(lt,',',',')'],'>':[4,'compare(gt,',',',')'],'<=':[4,'compare(le,',',',')'],'>=':[4,'compare(ge,',',',')'],'+':[5,'number(',')+number(',')'],'-':[5,'number(',')-number(',')'],'*':[6,'number(',')*number(',')'],'div':[6,'number(',')/number(',')'],'mod':[6,'number(',')%number(',')']},functions:{'last':[0,'nl.length'],'position':[0,'(i+1)'],'count':['nl','(','.length||0)'],'id':['n','id(',')'],'local-name':['nl','localName(',')'],'namespace-uri':['nl','namespaceURI(',')'],'name':['nl','qName(',')'],'string':['n','string(',')'],'concat':[0,'concat(',')'],'starts-with':[0,'startsWith(',')'],'contains':[0,'contains(',')'],'substring-before':[0,'substringBefore(',')'],'substring-after':[0,'substringAfter(',')'],'substring':[0,'substring(',')'],'string-length':['n','string(',').length'],'normalize-space':['n','normalizeSpace(',')'],'translate':[0,'translate(',')'],'boolean':[0,'bool(',')'],'not':[0,'!bool(',')'],'true':[0,'true '],'false':[0,'false '],'number':['n','number(',')'],'floor':[0,'Math.floor(number(','))'],'ceiling':[0,'Math.ceil(number(','))'],'round':[0,'Math.round(number(','))'],'sum':[0,'sum(',')']},predicate:function(l){var i=0;if(this.match(/^\[\s*/)){if(i=this.expression(l,l)){this.js.splice(l,0,'function(n,i,nl){with(XPath){var r=');i++;this.js.splice(l+i++,0,';return typeof r=="number"?Math.round(r)==i+1:bool(r)}},');}
this.match(/^\]\s*/)||this.error('Missing ]');}
return i;},nodeTest:function(l,t){var fn;if(fn=this.match(/^([a-z]+(?:-[a-z]+)*)\(([^)]*)\)\s*/,this.nodeTypes))
return fn.call(this,l,this.m[2]);if(this.match(/^\*\s*/))
return this.nodeTypes[t].call(this,l);return this.nodeName(l)},nodeType:function(l,t){this.js.splice(l,0,'function(n){return n.nodeType==',t,'},');return 3;},nodeTypes:{'node':function(l){this.js.splice(l,0,'null,');return 1;},'element':function(l){return this.nodeType(l,1);},'attribute':function(l){return this.nodeType(l,2);},'text':function(l){return this.nodeType(l,3);},'processing-instruction':function(l,t){if(!t)return this.nodeType(l,7);this.js.splice(l,0,'function(n){return n.nodeType==7&&n.target==',t,'},');return 3;},'comment':function(l){return this.nodeType(l,8);}},nodeName:function(l){if(!this.match(/^([a-zA-Z_]+(?:-?[a-zA-Z0-9]+)*)(?::([a-zA-Z_]+(?:-?[a-zA-Z0-9]+)*))?\s*/,1))
return 0;if(this.m[2]){this.js.splice(l,0,'function(n){if(!nsr)throw new XPathException(14);return "',this.m[2],'"==',XPath.ie?'n.baseName':'n.localName','&&nsr.lookupNamespaceURI("',this.m[1],'")==n.namespaceURI},');return 7;}
else{this.js.splice(l,0,'function(n){return/^',this.m[1],'$/i.test(n.nodeName)},');return 3;}}};XPath.order=function(l,r){var x=l.compareDocumentPosition?l.compareDocumentPosition(r):XPath.compareDocumentPosition.call(l,r);if(x&32){l=Array.prototype.indexOf.call(l.attributes,l);r=Array.prototype.indexOf.call(r.attributes,r);return(l<r)?-1:(l>r)?1:0;}
if(!x){if(l==r)
return 0;if((l=l.ownerElement)&&(r=r.ownerElement))
return XPath.order(l,r);return XPath.ie?1:0;}
return 3-((x&6)||3);};XPath.compare=function(fn,l,r){if(l instanceof Array&&r instanceof Array){var ls=l.map(this.string),rs=r.map(this.string);for(l=ls.length;--l>=0;)
for(r=rs.length;--r>=0;)
if(!fn(ls[l],rs[r]))return false;return true;}
if(l instanceof Array){for(var i=l.length;--i>=0;)
if(!fn(this[typeof r](l[i]),r))return false;return l.length>0;}
if(r instanceof Array){for(var i=r.length;--i>=0;)
if(!fn(l,this[typeof l](r[i])))return false;return r.length>0;}
if(typeof l=='boolean'||typeof r=='boolean')
return fn(this.bool(l),this.bool(r));if(typeof l=='number'||typeof r=='number')
return fn(this.number(l),this.number(r));return fn(this.string(l),this.string(r));};XPath.eq=function(l,r){return l==r};XPath.ne=function(l,r){return l!=r};XPath.lt=function(l,r){return l<r};XPath.gt=function(l,r){return l>r};XPath.le=function(l,r){return l<=r};XPath.ge=function(l,r){return l>=r};XPath.id=function(s,n){if(arguments.length==1)n=s;var nl=[];for(var id=this.string(s).split(/\s+/),i=id.length;--i>=0;)
if(s=(n.ownerDocument||n).getElementById(id[i]))
nl.push(s);return nl.sort(this.order);};XPath.localName=new Function('nl','return (nl.length&&nl[0].'+(XPath.ie?'baseName':'localName')+')||""');XPath.namespaceURI=function(nl){return(nl.length&&nl[0].namespaceURI)||'';};XPath.qName=function(nl){return(nl.length&&nl[0].nodeName)||'';};XPath.union=function(a,b){if(!a.length)return b;if(!b.length)return a;var nl=[],i=a.length-1,j=b.length-1;for(;;){switch(this.order(a[i],b[j])){case-1:nl.unshift(b[j--]);break;case 0:j--;case 1:nl.unshift(a[i--]);break;default:throw new Error('Invalid order');}
if(i<0){if(++j>0)nl.unshift.apply(nl,nl.slice.call(b,0,j));break;}
if(j<0){if(++i>0)nl.unshift.apply(nl,nl.slice.call(a,0,i));break;}}
return nl;};XPath.string=XPath.object=function(v){if(v instanceof Array&&typeof(v=v[0])=='undefined')return'';if(typeof v=='string')return v;switch(v.nodeType){case 1:case 9:case 11:return Array.prototype.map.call(v.childNodes,this.string,this).join('');default:return v.nodeValue||'';}
return String(v);};XPath.concat=function(){return Array.prototype.map.call(arguments,this.string,this).join('');};XPath.startsWith=function(a,b){return this.string(a).substr(0,(b=this.string(b)).length)==b;};XPath.contains=function(a,b){return this.string(a).indexOf(this.string(b))!=-1;};XPath.substringBefore=function(a,b){a=this.string(a);b=a.indexOf(this.string(b));return b!=-1?a.substr(0,b):'';};XPath.substringAfter=function(a,b){a=this.string(a);b=this.string(b);var i=a.indexOf(b);return i!=-1?a.substr(i+b.length):'';};XPath.substring=function(s,i,l){s=this.string(s);i=Math.round(this.number(i))-1;return(arguments.length==2)?s.substr(i<0?0:i):s.substr(i<0?0:i,Math.round(this.number(l))-Math.max(0,-i));};XPath.normalizeSpace=function(s){return this.string(s).replace(/^\s+/,'').replace(/\s+$/,'').replace(/\s+/g,' ');};XPath.translate=function(a,b,c){a=this.string(a);b=this.string(b);c=this.string(c);var o=[],l=a.length,i=0,j,x;while(--l>=0)
if((j=b.indexOf(x=a.charAt(i++)))==-1||(x=c.charAt(j)))o.push(x);return o.join('');};XPath.bool=XPath['boolean']=function(v){if(typeof v=='boolean')return v;if(v instanceof Array||typeof v=='string')return v.length>0;return Boolean(v);};XPath.number=function(v){if(v instanceof Array&&typeof(v=v[0])=='undefined')return 0;if(typeof v=='number')return v;if(typeof v=='boolean')return v?1:0;return Number(this.string(v));};XPath.sum=function(nl){var r=0,i=nl.length;while(--i>=0)r+=this.number(nl[i]);return r;};XPath.walk=function(n,nl){var x,c=n.firstChild;while(c){if(PLISTA.isIE6&&(nl.indexOf(c)!==-1)){throw'DOM bug: infinite loop in XPath.walk! Current node exists already at pos '+nl.indexOf(c)+' in a list of '+nl.length+' nodes';}
nl.push(c);if(x=c.firstChild)c=x;else for(x=c;!(c=x.nextSibling)&&(x=x.parentNode)&&(x!=n););}
return nl;};XPath.axes={'ancestor':function(n){var nl=[];while(n=n.parentNode)nl.unshift(n);return nl;},'ancestor-or-self':function(n){var nl=[];do{nl.unshift(n)}while(n=n.parentNode);return nl;},'attribute':new Function('n','var nl = [], a = n.attributes;if(a){attr:for(var x,i=a.length;--i>=0;){if(!(x=a[i]).specified){'+
(XPath.ie?'switch(x.nodeName){case"selected":case"value":if(x.nodeValue)break;default:continue attr;}':'continue;')+'}nl.unshift(x);}}return nl;'),'child':function(n){return n.childNodes?Array.prototype.map.call(n.childNodes,function(v){return v;}):[];},'descendant':function(n){return this.walk(n,[]);},'descendant-or-self':function(n){return this.walk(n,[n]);},'following':function(n){var nl=[],x;while(n){if(x=n.nextSibling){nl.push(n=x);if(x=n.firstChild)nl.push(n=x);}
else n=n.parentNode;}
return nl;},'following-sibling':function(n){var nl=[];while(n=n.nextSibling)nl.push(n);return nl;},'parent':function(n){return n.parentNode?[n.parentNode]:[];},'preceding':function(n){var nl=[],x,p=n.parentNode;while(n){if(x=n.previousSibling){for(n=x;x=n.lastChild;n=x);nl.unshift(n);}
else if(n=n.parentNode){if(n==p)p=p.parentNode;else nl.unshift(n);}}
return nl;},'preceding-sibling':function(n){var nl=[];while(n=n.previousSibling)nl.unshift(n);return nl;},'self':function(n){return[n];},'document-root':function(n){return[n.ownerDocument||n];}};XPath.axis=function(fn,nt){var r,x,al=arguments.length-1,nl=arguments[al],ap=Array.prototype;for(var i=0,j,l=nl.length;--l>=0;){x=fn.call(this,nl[i++]);if(nt&&x.length)x=ap.filter.call(x,nt,this);for(j=2;j<al&&x.length;x=ap.filter.call(x,arguments[j++],this));r=r?this.union(r,x):x;}
return r||[];};XPath.cache={};function compareDocumentPosition(n){if(this==n)return 0;if(this.nodeType==2&&n.nodeType==2)
return(this.ownerElement&&this.ownerElement==n.ownerElement)?32:0;var l=this.ownerElement||this,r=n.ownerElement||n;if(l.sourceIndex>=0&&r.sourceIndex>=0&&l.contains&&r.contains){return(((l.contains(r)&&16)||(r.contains(l)&&8))|((l.sourceIndex<r.sourceIndex&&4)||(r.sourceIndex<l.sourceIndex&&2)))||1;}
var la=l,ra=r,ld=0,rd=0;while(la=la.parentNode)ld++;while(ra=ra.parentNode)rd++;if(ld>rd){while(ld--!=rd)l=l.parentNode;if(l==r)return 2|8;}
else if(rd>ld){while(rd--!=ld)r=r.parentNode;if(r==l)return 4|16;}
while((la=l.parentNode)!=(ra=r.parentNode))
if(!(l=la)||!(r=ra))return 1;while(l=l.nextSibling)
if(l==r)return 4;return 2;};if(w.Node&&w.Node.prototype){var np=w.Node.prototype;if(f||!np.compareDocumentPosition)
np.compareDocumentPosition=compareDocumentPosition;if(f||!np.contains){np.contains=function(n){return Boolean(this.compareDocumentPosition(n)&16);};}}
else
XPath.compareDocumentPosition=compareDocumentPosition;if(f||!w.XPathException){function XPathException(c,m){this.name='XPathException';this.code=c;this.message=m;}
var e=XPathException,p=new Error;p.toString=function(){return this.name+':'+this.message;};e.prototype=p;e.NAMESPACE_ERR=14;e.INVALID_EXPRESSION_ERR=51;e.TYPE_ERR=52;w.XPathException=e;}
if(f||!w.XPathNSResolver){function XPathNSResolver(n){this.ns={};for(var m,a,i=n.attributes.length;--i>=0;)
if(m=/xmlns:(.+)/.exec((a=n.attributes[i]).nodeName))
this.ns[m[1]]=a.nodeValue;this.ns['']=n.getAttribute('targetNamespace');}
XPathNSResolver.prototype={lookupNamespaceURI:function(p){return this.ns[p||''];}};w.XPathNSResolver=XPathNSResolver;}
if(f||!w.XPathExpression){function XPathExpression(e,nsr){this.fn=XPath.cache[e]||(XPath.cache[e]=new XPath(e));this.nsr=nsr;}
XPathExpression.prototype={evaluate:function(n,rt){return new XPathResult(this.fn(n,this.nsr),rt);}};w.XPathExpression=XPathExpression;}
if(f||!w.XPathResult){function XPathResult(r,rt){if(rt==0){switch(typeof r){default:rt++;case'boolean':rt++;case'string':rt++;case'number':rt++;}}
this.resultType=rt;switch(rt){case 1:this.numberValue=XPath.number(r);return;case 2:this.stringValue=XPath.string(r);return;case 3:this.booleanValue=XPath.bool(r);return;case 4:case 5:if(r instanceof Array){this.value=r;this.index=0;this.invalidIteratorState=false;return;}
break;case 6:case 7:if(r instanceof Array){this.value=r;this.snapshotLength=r.length;return;}
break;case 8:case 9:if(r instanceof Array){this.singleNodeValue=r[0];return;}}
throw new XPathException(52);}
var r=XPathResult;r.ANY_TYPE=0;r.NUMBER_TYPE=1;r.STRING_TYPE=2;r.BOOLEAN_TYPE=3;r.UNORDERED_NODE_ITERATOR_TYPE=4;r.ORDERED_NODE_ITERATOR_TYPE=5;r.UNORDERED_NODE_SNAPSHOT_TYPE=6;r.ORDERED_NODE_SNAPSHOT_TYPE=7;r.ANY_UNORDERED_NODE_TYPE=8;r.FIRST_ORDERED_NODE_TYPE=9;r.prototype={iterateNext:function(){switch(this.resultType){case 4:case 5:return this.value[this.index++];}
throw new XPathException(52);},snapshotItem:function(i){switch(this.resultType){case 6:case 7:return this.value[i];}
throw new XPathException(52);}};w.XPathResult=r;}
if(f||!w.XPathEvaluator){function XPathEvaluator(){}
var e=XPathEvaluator;e.prototype={createExpression:function(e,nsr){return new XPathExpression(e,nsr);},createNSResolver:function(n){return new XPathNSResolver(n);},evaluate:function(e,n,nsr,rt){return new XPathExpression(e,nsr).evaluate(n,rt);}};e.install=function(o,f){for(var k in XPathEvaluator.prototype)
if(f||!o[k])o[k]=XPathEvaluator.prototype[k];};w.XPathEvaluator=e;if(w.Document)
e.install(w.Document.prototype,f);else
e.install(document,f);w.XPath=XPath;}})(window,document,/WebKit/.test(navigator.userAgent));PLISTA.addEmbedContainer=function(item,myproto,e,f){if(this.isIncompatible){return false;}
PLISTA.setAutoInit();var c;if(myproto&&(typeof myproto==='function')){myproto.prototype=new PLISTA.lib.EmbedContainer();c=new myproto();}else{c=new PLISTA.lib.EmbedContainer();}
c.init(e,item,f);return c;};PLISTA.initStore=function(){if(typeof PLISTA.store==='undefined'){try{PLISTA.store=new PLISTA.PlistaStore.Store('plista');}catch(e){PLISTA.util.logger.log('PlistaStore initialization failed: '+e.message,'warn');return false;}
if(!PLISTA.PlistaStore.size){return false;}}
return true;};PLISTA.PlistaStore=(function(){var copyright='Copyright (c) 2008 Paul Duncan (paul@pablotron.org), 2009 plista GmbH - license minified, see http://pablotron.org';var VERSION='0.1.1',C,P,B,esc,init,empty,ec;empty=function(){};esc=function(str){return'PS'+str.replace(/_/g,'__').replace(/ /g,'_s');};C={search_order:['localstorage','whatwg_db','globalstorage','ie'],name_re:/^[a-z][a-z0-9_ \-]+$/i,methods:['init','get','set','remove','load','save'],sql:{version:'1',create:"CREATE TABLE IF NOT EXISTS persist_data (k TEXT UNIQUE NOT NULL PRIMARY KEY, v TEXT NOT NULL)",get:"SELECT v FROM persist_data WHERE k = ?",set:"INSERT INTO persist_data(k, v) VALUES (?, ?)",remove:"DELETE FROM persist_data WHERE k = ?"}};B={whatwg_db:{size:200*1024,test:function(){var name='PersistJS Test',desc='Persistent database test.';if(!window.openDatabase){return false;}
if(!window.openDatabase(name,C.sql.version,desc,B.whatwg_db.size)){return false;}
return true;},methods:{transaction:function(fn){if(!this.db_created){var sql=C.sql.create;this.db.transaction(function(t){t.executeSql(sql,[],function(){this.db_created=true;});},empty);}
this.db.transaction(fn);},init:function(){var desc,size;desc=this.o.about||"Persistent storage for "+this.name;size=this.o.size||B.whatwg_db.size;this.db=openDatabase(this.name,C.sql.version,desc,size);},get:function(key,fn,scope){var sql=C.sql.get;if(!fn){return;}
scope=scope||this;this.transaction(function(t){t.executeSql(sql,[key],function(t,r){if(r.rows.length>0){fn.call(scope,true,r.rows.item(0).v);}else{fn.call(scope,false,null);}});});},set:function(key,val,fn,scope){var rm_sql=C.sql.remove,sql=C.sql.set;this.transaction(function(t){t.executeSql(rm_sql,[key],function(){t.executeSql(sql,[key,val],function(t,r){if(fn){fn.call(scope||this,true,val);}});});});return val;},remove:function(key,fn,scope){var get_sql=C.sql.get;sql=C.sql.remove;this.transaction(function(t){if(fn){t.executeSql(get_sql,[key],function(t,r){if(r.rows.length>0){var val=r.rows.item(0).v;t.executeSql(sql,[key],function(t,r){fn.call(scope||this,true,val);});}else{fn.call(scope||this,false,null);}});}else{t.executeSql(sql,[key]);}});}}},globalstorage:{size:5*1024*1024,test:function(){return window.globalStorage?true:false;},methods:{key:function(key){return esc(this.name)+esc(key);},init:function(){this.store=globalStorage[this.o.domain];},get:function(key,fn,scope){var val;key=this.key(key);if(fn){val=this.store.getItem(key);if(val&&(typeof val.value!=='undefined')){val=val.value;}
fn.call(scope||this,true,val);}},set:function(key,val,fn,scope){key=this.key(key);this.store.setItem(key,val);if(fn){fn.call(scope||this,true,val);}},remove:function(key,fn,scope){key=this.key(key);val=this.store[key];this.store.removeItem(key);if(fn){fn.call(scope||this,(val!==null),val);}}}},localstorage:{size:-1,test:function(){return window.localStorage?true:false;},methods:{key:function(key){return esc(this.name)+esc(key);},init:function(){this.store=localStorage;},get:function(key,fn,scope){var val;key=this.key(key);if(fn){val=this.store.getItem(key);if(val&&(typeof val.value!=='undefined')){val=val.value;}
fn.call(scope||this,true,val);}},set:function(key,val,fn,scope){key=this.key(key);this.store.setItem(key,val);if(fn){fn.call(scope||this,true,val);}},remove:function(key,fn,scope){var val;key=this.key(key);val=this.getItem(key);this.store.removeItem(key);if(fn){fn.call(scope||this,(val!==null),val);}}}},ie:{prefix:'_persist_data-',size:64*1024,test:function(){return window.ActiveXObject?true:false;},make_userdata:function(id){var el=document.createElement('meta');el.id=id;el.style.display='none';el.addBehavior('#default#userData');document.getElementsByTagName('head')[0].appendChild(el);return el;},methods:{init:function(){var id=B.ie.prefix+esc(this.name);this.el=B.ie.make_userdata(id);if(this.o.defer){this.load();}},get:function(key,fn,scope){var val;key=esc(key);if(!this.o.defer){try{this.load();}catch(e){PLISTA.util.logger.log("Exception in IE storage, loading "+
key+", message: "+e.message);}}
val=this.el.getAttribute(key);if(fn){fn.call(scope||this,val?true:false,val);}},set:function(key,val,fn,scope){key=esc(key);this.el.setAttribute(key,val);if(!this.o.defer){this.save();}
if(fn){fn.call(scope||this,true,val);}},load:function(){this.el.load(esc(this.name));},save:function(){this.el.save(esc(this.name));}}}};init=function(){var i,l,b,key,fns=C.methods,keys=C.search_order;for(i=0,l=fns.length;i<l;i++){P.Store.prototype[fns[i]]=empty;}
P.type=null;P.size=-1;for(i=0,l=keys.length;!P.type&&i<l;i++){b=B[keys[i]];if(b.test()){P.type=keys[i];P.size=b.size;if(keys[i]==='dummy'){P.Store.prototype.nopersist=true;}else{P.Store.prototype.nopersist=false;}
for(key in b.methods){if(typeof key!=='undefined'){P.Store.prototype[key]=b.methods[key];}}}}
P._init=true;};P={VERSION:VERSION,type:null,size:0,add:function(o){B[o.id]=o;C.search_order=[o.id].concat(C.search_order);init();},remove:function(id){var ofs=C.search_order.indexOf(id);if(ofs<0){return;}
C.search_order.splice(ofs,1);delete B[id];init();},Cookie:ec,Store:function(name,o){if(!C.name_re.exec(name)){throw new Error("Invalid name");}
if(!P.type){throw new Error("No suitable storage found");}
o=o||{};this.name=name;o.domain=o.domain||location.hostname||'localhost.localdomain';this.o=o;o.expires=o.expires||365*2;o.path=o.path||'/';this.init();}};init();return P;})();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.setStyle=function(style){PLISTA.ratingbar_style=style;};PLISTA.addRating=function(objectid,rating,callback){PLISTA.remotedata.getData('type:addrating;objectid:'+objectid+';rating:'+rating,function(data){data=PLISTA.util.JSON.parse(data);if(data&&data.action&&data.action==='sendItemData'){PLISTA.sendItemData(data.params,callback);}else if(callback){callback();}});};PLISTA.objectids=[];PLISTA.data={};PLISTA.panels=[];PLISTA.panels.refreshByItem=function(item){for(var i=0;i<PLISTA.panels.length;i++){if(item.objectid===PLISTA.panels[i].objectid){PLISTA.panels[i].refresh();}}};PLISTA.panels.getRatingdata=function(){var objectids=PLISTA.objectids.join(",");var objectidpart;var j;var ratingdata_cb=function(data){data=PLISTA.util.JSON.parse(data);if(!data.ratingdata){PLISTA.util.logger.log('sth went wrong: got no ratingdata o.O');return;}
for(var i=0;i<data.ratingdata.length;i++){PLISTA.data[data.ratingdata[i].objectid]=data.ratingdata[i];if(PLISTA.panels){PLISTA.panels.refreshByItem(data.ratingdata[i]);}}
if(PLISTA.reorder){PLISTA.reorderItems();}};while(objectids.length>0){if(objectids.length>1950){j=objectids.substring(0,1950).lastIndexOf(',');if(j===-1){j=objectids.length;}
objectidpart=objectids.substring(0,j);objectids=objectids.substr(j+1);}else{objectidpart=objectids;objectids="";}
PLISTA.remotedata.getData('type:ratingdata;objectids:'+objectidpart,ratingdata_cb);}};PLISTA.render.defaultStyleElements.augment({bypeople:function(item){var bypeople_fmt='by <a class="plista_bypeople">%% people</a> like you';return"<span class=\"bypeople\">"+PLISTA.util.trans(bypeople_fmt,item.num_friends)+"</span>";},logo:function(item){var ending=".png";if((navigator.appName.indexOf("Explorer")!==-1)&&(navigator.appVersion.substring(22,23)==='6')){ending=".gif";}
var events='onmouseover="this.style.color=\'#666\';this.style.backgroundPosition=\'0px -15px\';" onmouseout="this.style.color=\'#999999\';this.style.backgroundPosition=\'0px 0px\';"   onclick="plista.popup.openByObjectid(\''+item.objectid+'\')" ';return'<div style="background:url('+"'"+PLISTA.cdnpath+'images/pics/logo_plista2'+ending+"'"+') no-repeat top left;padding:0 0 0 20px;font:11px Verdana,sans-serif normal !important;cursor:pointer;height:15px;line-height:15px;color:#999999" '+'href="#" '+
events+'title="plista">plista</div>';},ratedwith:function(item){return'<span class="bypeople">Rated with '+'<span style="color:#000">'+PLISTA.render.i18n.rating_description[item.myrating]+'</span></span>';},ratinginline:{star_image:PLISTA.star_image||PLISTA.cdnpath+'images/stars_simple.png',star_width:PLISTA.star_width||11,getContent:(function(){var count=0;return function(item){var events=(!PLISTA.disabled?' href="#" '+'onclick="plista.Panel.prototype.stareventinline(this, event, \''+item.objectid+'\');return false;" '+'onmouseover="plista.Panel.prototype.stareventinline(this,event, \''+item.objectid+'\')" '+'onmouseout="plista.Panel.prototype.stareventinline(this,event, \''+item.objectid+'\')"':'');var sw=this.star_width;var style1='background: url(\''+this.star_image+'\') left -1000px repeat-x;';var style2='position:absolute;top:0;left:0;text-indent:-1000em;height:'+sw+'px;line-height:'+sw+'px;outline:none;overflow:hidden;border:none;margin:0;';count+=1;PLISTA.util.loadCSS('.star-rating'+count+' a:hover, .star-rating'+count+' a:active, .star-rating'+count+' a:focus {'+style1+'background-position: left bottom;}');return'<span style="display:-moz-inline-block;display:-moz-inline-box;display:inline-block;" id="'+PLISTA.render.prefix+item.objectid+'">'+'<ul class="star-rating star-rating'+count+'" style="'+style1+';background-position:left top;height:'+sw+'px;list-style:none;margin:0;overflow:hidden;padding:0;position:relative;width:'+(sw*5)+'px;">'+'<li style="display:inline;width:'+(item.myrating*sw)+'px;'+style1+style2+';background-position:left bottom;z-index:2;">Your rating '+item.myrating+'/5 Stars</li>'+'<li style="display:inline;width:'+(item.rating*sw)+'px;'+style1+style2+';background-position:left center;z-index:1;">Expected '+item.rating+'/5 Stars</li>'+'<li style="display:inline;"><a '+events+' title="1/5" style="width:20%;z-index:7;'+style2+'">1</a></li>'+'<li style="display:inline;"><a '+events+' title="2/5" style="width:40%;z-index:6;'+style2+'">2</a></li>'+'<li style="display:inline;"><a '+events+' title="3/5" style="width:60%;z-index:5;'+style2+'">3</a></li>'+'<li style="display:inline;"><a '+events+' title="4/5" style="width:80%;z-index:4;'+style2+'">4</a></li>'+'<li style="display:inline;"><a '+events+' title="5/5" style="width:100%;z-index:3;'+style2+'">5</a></li>'+'</ul></span>';};}())},predictedstars:{star_image:PLISTA.star_image||PLISTA.cdnpath+'images/stars/black_smart.gif',star_width:PLISTA.star_width||11,getContent:function(item){var sw=this.star_width;return'<div style="background:url(\''+this.star_image+'\');width:'+(5*sw)+'px;height:'+sw+'px">'+'<div style="background:url(\''+this.star_image+'\') left center;width:'+Math.round(item.expected_rating*sw)+'px;height:'+sw+'px"></div>'+'</div>';}}});PLISTA.disable=function(){PLISTA.util.logger.log('disabling PLISTA...');PLISTA.disabled=true;for(var i=0;i<PLISTA.panels.length;i++){PLISTA.panels[i].refresh();}};PLISTA.util.trans=function(str,a){var i;if(typeof a==='object'){for(i=0;i<a.length;i++){str=str.replace('%%'+(i+1),a[i]);}}else if(typeof a!=='undefined'){str=str.replace('%%',a);}
return str;};PLISTA.Panel=function(objectid,itemStyle,container,styleElements){this.objectid=objectid;this.ratingbar_style=itemStyle?itemStyle:PLISTA.ratingbar_style;this.styleElements=styleElements||PLISTA.render.defaultStyleElements;if(PLISTA.objectids.indexOf(objectid)===-1){PLISTA.objectids.push(objectid);}
PLISTA.panels.push(this);};PLISTA.Panel.prototype={style:'',setStyle:function(style){this.ratingbar_style=style;},content:function(){if(!PLISTA.data[this.objectid]){PLISTA.data[this.objectid]={objectid:this.objectid,rating:3,num_friends:'',myrating:0};}
return PLISTA.render.parseStyle(this.ratingbar_style,PLISTA.data[this.objectid],this.styleElements);},refresh:function(){var inner=document.createElement("div");inner.innerHTML=this.content();inner.className='plistapanel';inner.plistaPanel=this;if(this.e&&this.e.parentNode){this.e.parentNode.replaceChild(inner,this.e);}
this.e=inner;if(this.style){this.e.style.cssText+=this.style;}
this.setStarInfo();return this.e;},getByObjectId:function(objectid){for(var i=0;i<PLISTA.panels.length;i++){if(PLISTA.panels[i].objectid===objectid){return PLISTA.panels[i];}}},starevent:function(e,evt,objectid){var r;var panel=this.getByObjectId(objectid);var stars=e.firstChild.firstChild;var star_width=PLISTA.star_width;if(panel&&panel.styleElements){star_width=panel.styleElements.rating.star_width;}
if(evt.type==='mouseout'){stars.style.width=((PLISTA.data[objectid].myrating||0)*star_width)+"px";panel.setStarInfo();}else if(evt.type==='click'){panel.addStarRating(parseInt(stars.style.width,10)/star_width);}else{r=Math.ceil((typeof evt.layerX==='undefined'?evt.x:evt.layerX)/star_width);stars.style.width=(r*star_width)+'px';panel.setStarInfo(r);}},stareventinline:function(ob,evt,objectid){if(evt.type==='mouseover'){ob.parentNode.parentNode.firstChild.style.zIndex=0;}else if(evt.type==='mouseout'){ob.parentNode.parentNode.firstChild.style.zIndex=2;}else{var rating=parseInt(ob.title.substring(0,1),10);this.getByObjectId(objectid).addStarRating(rating);}},setStarInfo:function(hoverrating){var i=0,o=this.e.getElementsByTagName('span'),e,f;function ratewith(){return'<span class="bypeople">This is '+'<span style="color:#000">'+
PLISTA.render.i18n.rating_description[hoverrating]+'</span></span>';}
for(i=0;i<o.length;i++){if(o[i].className==='bypeople'){e=o[i];break;}}
if(e){if(typeof hoverrating!=='undefined'){f=PLISTA.util.DOM.createElement('div',ratewith());}else{if(PLISTA.data[this.objectid].myrating){f=PLISTA.util.DOM.createElement('div',PLISTA.render.defaultStyleElements.ratedwith(PLISTA.data[this.objectid]));}else{f=PLISTA.util.DOM.createElement('div',PLISTA.render.defaultStyleElements.bypeople(PLISTA.data[this.objectid]));}}
e.parentNode.replaceChild(f.firstChild,e);}},addStarRating:function(rating){var objectid=this.objectid;PLISTA.data[objectid].myrating=rating;PLISTA.addRating(objectid,rating,function(){PLISTA.onStarRating.fire(objectid);});for(var i=0;i<PLISTA.panels.length;i++){if(PLISTA.panels[i].objectid===objectid){PLISTA.panels[i].refresh();}}}};PLISTA.onStarRating.subscribe(function(){if(PLISTA.reload_after_rating){setTimeout(function(){PLISTA.loadWidgetData();},700);}});PLISTA.onBeforeReInit.subscribe(function(){PLISTA.data={};PLISTA.objectids=[];});PLISTA.render.defaultStyleElements.rating={star_image:PLISTA.star_image||PLISTA.cdnpath+'images/stars_simple.png',star_width:PLISTA.star_width||11,getContent:function(item){var sw=this.star_width;var events=(!PLISTA.disabled?'onmousemove="plista.Panel.prototype.starevent(this,event, \''+item.objectid+'\');" '+'onmouseover="plista.Panel.prototype.starevent(this,event, \''+item.objectid+'\');" '+'onmouseout="plista.Panel.prototype.starevent(this,event, \''+item.objectid+'\')" '+'onclick="plista.Panel.prototype.starevent(this,event, \''+item.objectid+'\')" ':'');var style1="background-image: url('"+this.star_image+"');"+"overflow: hidden; "+(!PLISTA.disabled?"cursor: pointer;":"")+"width: "+(5*sw)+"px;height:"+sw+"px;"+"float: left; position: relative;"+"padding: 0px; margin: 0px 5px 0px 0px;";var style2="padding:0; "+"background:url('"+this.star_image+"') 0px -"+(sw)+"px;"+"height:100%;width:"+(20*item.rating)+"%;";var style3="padding:0; "+"background:url('"+this.star_image+"') 0px -"+(2*sw)+"px;"+"height:100%;width:"+(item.myrating*sw)+"px";return'<div '+
events+' style="'+style1+'">'+'<div style="'+style2+'">'+'<div id="'+(item.myrating*sw)+'" style="'+style3+'">'+'</div></div></div>';}};PLISTA.searchItems=function(){};PLISTA.onBeforeInit.subscribe(function(){PLISTA.searchItems();},PLISTA,'searchItems');PLISTA.container=[];PLISTA.container.initParser=function(){var tmp;if(PLISTA.parser&&PLISTA.options.parserActive){tmp=PLISTA.parser.get('objectid');if((PLISTA.container.length===0)&&tmp){PLISTA.addContainer("//body",tmp,function(){this.noreorder=true;this.getUrl=function(){return PLISTA.parser.get('url');};this.getTitle=function(){return PLISTA.parser.get('title');};this.getText=function(){return PLISTA.parser.get('text');};this.getImage=function(){return PLISTA.parser.get('image');};this.addPanel=function(){};});}}};PLISTA.container.initPanels=function(){if(PLISTA.container.length===1){PLISTA.isarticle=1;}
for(var i=0;i<PLISTA.container.length;i++){try{PLISTA.container[i].addPanel_src();}catch(f){PLISTA.util.logger.log("could not add panel for container["+i+"], exception as follows: "+f.message||f,'error');PLISTA.container[i].destroy();PLISTA.container.splice(i,1);PLISTA.util.logger.log("container["+i+"] has been deleted.",'info');i--;}}};PLISTA.onLoad.subscribe(function(){PLISTA.util.loadCSS('.plistareset {visibility:hidden} .plistapanel {display:none}','print');});PLISTA.onBeforeReInit.subscribe(function(){PLISTA.panels.splice(0,PLISTA.panels.length);var p,c=PLISTA.container.pop();while(c){p=c.panels.pop();while(p){p.e.parentNode.removeChild(p.e);p=c.panels.pop();}
c.destroy();c=PLISTA.container.pop();}});PLISTA.Container=PLISTA.lib.Container=function(){};PLISTA.options.urlRemoveAnchor=true;PLISTA.options.urlRemoveQuery=false;PLISTA.Container.prototype={findUrl:".//a[@href]",findText:".//p",findTitle:".//*[self::h1 or self::h2 or self::h3 or self::h4]",findImage:".//img",findObjectid:null,panels:[],noreorder:false,addPanelFirst:function(){this.addPanelBefore(this.e.firstChild);},destroy:function(){if(this.reorderList){this.reorderList.remove(this);}},addPanelAfter:function(e){if(!e){this.addPanelFirst();}else if(e.nextSibling){this.addPanelBefore(e.nextSibling);}else{e.parentNode.appendChild(this.panel.e);}},addPanelBefore:function(beforeelm){try{beforeelm.parentNode.insertBefore(this.panel.e,beforeelm);}catch(e){PLISTA.util.logger.log('addPanelBefore:'+e.message,'error');this.e.insertBefore(this.panel.e,this.e.firstChild);}},addPanel_src:function(){var o=this.getObjectid_src();if(!o){throw{message:'panel not added, could not find an objectid. url: "'+this.getUrl()+'"'};}
this.panels.push(new PLISTA.Panel(o,this.ratingbar_style,this,this.styleElements));this.panel=this.panels[this.panels.length-1];this.panel.refresh();try{this.addPanel();}catch(e){PLISTA.util.logger.log('addPanel_src: '+e.message,'error');}
if(!this.e.id){this.e.id='article_'+o;}},getObjectid:undefined,getObjectid_src:function(){if(this.objectid){return this.objectid;}
if(typeof this.getObjectid!=='undefined'){this.objectid=this.getObjectid();}else{this.objectid=PLISTA.util.urlToObjectid(this.getUrl());}
return this.objectid;},urlElement:function(){var v=this.findUrl;if(typeof v==='string'){v=PLISTA.util.xpath(v,this.e);}
if(v&&v.length){return v[0];}},getUrl:function(){var v;if(PLISTA.isArticle()){v=document.location.href;}else{v=this.urlElement().href;if(v.substr(0,1)==="/"){v=document.location.protocol+"//"+document.location.hostname+v;}}
if(typeof v==='string'){if(PLISTA.options.urlRemoveAnchor){v=v.replace(/#.*$/,'');}
if(PLISTA.options.urlRemoveQuery){v=v.replace(/\?.*$/,'');}}
return v;},titleElement:function(){var v=this.findTitle;if(typeof v==='string'){v=PLISTA.util.xpath(v,this.e);}
if(v&&v.length){return v[0];}},getTitle:function(){return PLISTA.util.DOM.textContent(this.titleElement());},textElement:function(){var v=this.findText;if(typeof v==='string'){v=PLISTA.util.xpath(v,this.e);}
return v.length?v[0]:false;},getText:function(){return PLISTA.util.DOM.textContent(this.textElement());},imageElement:function(){var v=this.findImage;if(typeof v==='string'){v=PLISTA.util.xpath(v,this.e);}
for(var i=0;i<v.length;i++){var img=v[i];if(img.width>80&&img.height>50){return img;}}},getImage:function(){try{return this.imageElement().src;}catch(e){PLISTA.util.logger.log('getImage: '+e.message,'error');}},getItemData_cached:function(){return PLISTA.items.getByObjectId(this.objectid)||this.getItemData();},getItemData:function(){var objectid,data={};try{objectid=this.getObjectid_src();data=PLISTA.items.getByObjectId(objectid);if(!data){data={objectid:objectid};PLISTA.items.push(data);}
data.url=this.getUrl();data.title=this.getTitle();}catch(e){PLISTA.util.logger.log('getItemData: '+e.message,'error');}
try{data.text=this.getText();}catch(f){PLISTA.util.logger.log('getItemData: '+f.message,'error');}
try{data.img=this.getImage();}catch(g){PLISTA.util.logger.log('getItemData: '+g.message,'error');}
return data;},contentOf:function(v){if(typeof v==='string'){v=PLISTA.util.xpath(v,this.e);}
try{v=v[0];}catch(e){PLISTA.util.logger.log('contentOf: '+e.message);}
try{return PLISTA.util.DOM.textContent(v);}catch(f){PLISTA.util.logger.log('contentOf: '+f.message);return'';}},init:function(e,objectid){this.e=e;this.objectid=objectid;this.getItemData();PLISTA.container.push(this);if(!this.noreorder&&PLISTA.reorder){this.reorderList=this.reorderList||PLISTA.reorder.getDefaultList();this.reorderList.push(this);}}};PLISTA.lib.Container.prototype.addPanel=PLISTA.lib.Container.prototype.addPanelFirst;PLISTA.lib.EmbedContainer=function(){this.getUrl=undefined;this.getText=undefined;this.getTitle=undefined;this.getImage=undefined;this.init=function(e,item,panelPlaceholder){var tmp;if(!item.objectid){item.objectid=PLISTA.util.urlToObjectid(typeof item.url!=='undefined'?item.url:document.location.href);}
this.objectid=item.objectid;var pItem=PLISTA.items.getByObjectId(item.objectid);if(!pItem){pItem=item;PLISTA.items.push(pItem);}else{for(tmp in item){if(item.hasOwnProperty(tmp)){pItem[tmp]=item[tmp];}}}
if(!panelPlaceholder){tmp='plistapanel_'+this.objectid;document.write('<span id="'+tmp+'"></span>');panelPlaceholder=document.getElementById(tmp);}
this.addPanel=function(){if(panelPlaceholder){panelPlaceholder.parentNode.replaceChild(this.panel.e,panelPlaceholder);}else{PLISTA.util.logger.log('could not find temp node','error');}};this.getItemData=function(){return PLISTA.items.getByObjectid(item.objectid);};if(typeof e==='number'){tmp=panelPlaceholder;while((e>0)&&tmp){tmp=tmp.parentNode;e--;}
e=tmp;}else if(typeof e==='string'){e=document.getElementById(e);}
if((typeof e!=='object')||(e===null)){this.noreorder=true;e=panelPlaceholder.parentNode;}
this.e=e;PLISTA.container.push(this);if(!this.noreorder&&PLISTA.reorder){this.reorderList=this.reorderList||PLISTA.reorder.getDefaultList();this.reorderList.push(this);}};};PLISTA.lib.EmbedContainer.prototype=PLISTA.lib.Container.prototype;PLISTA.addContainer=function(e,objectid,MyConstructor){if(PLISTA.isIncompatible){return false;}
var c;if(typeof MyConstructor==='undefined'){c=new PLISTA.Container();}else{MyConstructor.prototype=new PLISTA.Container();c=new MyConstructor();}
c.init(e,objectid);return c;};PLISTA.addContainers=function(v,myproto){PLISTA.setAutoInit();var i;if(typeof v==='string'){v=PLISTA.util.xpath(v);}
if(typeof v.snapshotLength==='number'){var d=[];for(i=0;i<v.snapshotLength;i++){d.push(v.snapshotItem(i));}
v=d;}
if(typeof v.length==='number'){var c=[];for(i=0;i<v.length;i++){c.push(PLISTA.addContainer(v[i],undefined,myproto));}
return c;}};PLISTA.gm_url_to_objectid=function(url){PLISTA.util.logger.log('deprecated use of gm_url_to_objectid','warn');var urlHost;if(typeof url!=='string'){PLISTA.util.logger.log('gm_url_to_objectid: parameter is no string');return false;}
if(/^(\w+):\/\/([\w\.\-]+)/.test(url)){return PLISTA.util.urlToObjectid(url);}else{if(url.substr(0,1)==='/'){url=url.substr(1);}
return url.replace(/\W/g,'_');}};PLISTA.that=function(){PLISTA.popup.open("plista_that");};PLISTA.helper={};PLISTA.HelperPrototype=function(){this.helper_count=0;this.setupDiv=function(){if(this.div){return;}
var d=document.createElement('div');this.div=d;this.refresh();d.className='plistareset';if(this.fix){PLISTA.util.DOM.setAttribute(d,'style','width:'+this.width+'px;z-index:1000000004;position:fixed;opacity:0');d.style.top=(this.elm.offsetTop+this.elm.offsetHeight-5)+'px';var l=Math.round(this.elm.offsetLeft+this.elm.offsetWidth/2-20);d.style.left=(l<2?2:l)+'px';var body=document.getElementsByTagName('body')[0];body.insertBefore(d,body.firstChild);}else{PLISTA.util.DOM.setAttribute(d,'style','width:'+this.width+'px;z-index:1000000004;position:absolute;opacity:0');d.style.marginTop=this.elm.offsetHeight-5+'px';d.style.marginLeft=this.elm.offsetWidth/2-20+'px';this.elm.parentNode.insertBefore(d,this.elm);}
d.onmouseover=this.elm.onmouseover;d.onmouseout=this.elm.onmouseout;};this.refresh=function(){this.div.innerHTML=this.getInnerHTML();};this.getInnerHTML=function(){var c='<div style="width:100%;float:left"><div style="background:url('+PLISTA.cdnpath+'images/bg/helper2.png) -35px 0;margin: 0px 10px 0px 35px;height:20px"></div></div>';c+='<div style="background:url('+PLISTA.cdnpath+'images/bg/helper2.png) -1190px 0px;height:20px;width:10px;float:left;margin-left:-10px"></div>';c+='<div style="background:url('+PLISTA.cdnpath+'images/bg/helper2.png) 0px 0px;height:20px;width:35px;float:left;margin-left:-100%"></div>';c+='<div style="background:url('+PLISTA.cdnpath+'images/bg/tb_e.png) repeat-y right 0;clear:both;margin-right:-2px;">';c+='<div style="background:url('+PLISTA.cdnpath+'images/bg/helper2.png) 0px -20px;padding-left:12px;margin-right:10px;padding-right:5px" class="plistabubble">';c+=this.content;c+='</div></div>';c+='<div style="width:100%;float:left;clear:both"><div style="background:url('+PLISTA.cdnpath+'images/bg/helper2.png) -35px -785px;margin: 0px 10px 0px 20px;height:15px"></div></div>';c+='<div style="background:url('+PLISTA.cdnpath+'images/bg/helper2.png) -1190px -785px;height:15px;width:10px;float:left;margin-left:-10px"></div>';c+='<div style="background:url('+PLISTA.cdnpath+'images/bg/helper2.png) 0px -785px;height:15px;width:20px;float:left;margin-left:-100%"></div>';return c;};this.setupHover=function(){var that=this;try{this.elm.onmouseover=function(evt){if(evt){var from=evt.relatedTarget||evt.fromElement;if((from===that.elm)||PLISTA.util.descendantOf(that.elm,from)||(from===that.div)||PLISTA.util.descendantOf(that.div,from)){return;}}
PLISTA.helper[that.elm.id].over();};this.elm.onmouseout=function(evt){if(evt){var to=evt.relatedTarget||evt.toElement;if((to===that.elm)||PLISTA.util.descendantOf(that.elm,to)||(to===that.div)||PLISTA.util.descendantOf(that.div,to)){return;}}
PLISTA.helper[that.elm.id].out();};}catch(e){PLISTA.util.logger.log("setupHover:"+(e.message||e));}};this.over=function(){this.setupDiv();PLISTA.changer.start(this.div,'opacity',1);this.div.style.display='';};this.out=function(){var that=this;PLISTA.changer.start(this.div,'opacity',0,function(){that.div.style.display="none";that.onBlur.fire();});};};PLISTA.Helper=function(elm,content,fix,width,immediateDiv){try{var that=this;if(!elm.id){elm.id='elm_'+(PLISTA.Helper.prototype.helper_count++);}
if(PLISTA.helper[elm.id]){PLISTA.helper[elm.id].elm=elm;PLISTA.helper[elm.id].content=content;return PLISTA.helper[elm.id];}else{PLISTA.helper[elm.id]=this;}
this.elm=elm;this.content=content;this.fix=(fix&&!PLISTA.isIEquirksmode);this.width=width;this.onBlur=PLISTA.util.newEvent(this,'blur');this.setupHover();if(immediateDiv){this.setupDiv();}
this.getContentElement=function(){return that.div.firstChild.nextSibling.nextSibling.nextSibling.firstChild;};}catch(e){PLISTA.util.logger.log('Helper:'+(e.message||e));}};PLISTA.Helper.prototype=new PLISTA.HelperPrototype();PLISTA.parser={default_url:document.location.href,default_title:document.title,default_text:'',default_image:function(){var i,e=document.getElementsByTagName('img');for(i=0;i<e.length;i++){if((e[i].src.substring(e[i].src.length-3)==='jpg')&&(e[i].width>200)&&(e[i].height>150)){break;}}
if(i<e.length){return e[i].src;}},default_objectid:function(url){return PLISTA.util.urlToObjectid(url);},default_isarticle:function(url){if(PLISTA.widgetdatarequested){return PLISTA.objectids.length===1;}},base_objectid:document.location.href,base_isarticle:document.location.href,base_url:document.location.href,base_title:document.title,base_text:'',get:function(v){try{var d=PLISTA.parser[v];if(typeof d==='undefined'){d=PLISTA.parser['default_'+v];}
if(typeof d==='string'){return d;}else if(typeof d==='function'){return d(PLISTA.parser['base_'+v]);}else if(typeof d==='object'){var regexp=d.exec(PLISTA.parser['base_'+v]);return regexp?regexp[regexp.length-1]:false;}}catch(e){PLISTA.util.logger.log('exception in PLISTA.parser.get("'+((typeof v==='string')?v:'')+'"): '+e.message);return'';}}};PLISTA.parser_get=function(v){if(PLISTA.options.parserActive){return PLISTA.parser.get(v);}};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.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;};PLISTA.userdata=(function(){var my={spec:{type:'userdata'},defaultData:{screenname:'',complete:0,facebookid:null,skiptour:true}};var that=PLISTA.lib.dataobject(my);PLISTA.onStarRating.subscribe(function(){that.refreshData();});that.toString=function(){return"plista.userdata";};that.logout=function(){throw'not supported any more';};return that;})();PLISTA.reorder_defaultoff=false;PLISTA.reorder_disabled=false;PLISTA.reorderActive=function(){var cookie=PLISTA.util.cookie.readCookie('autoreorder');if(typeof cookie==='string'){return(cookie!=='0');}else{return!PLISTA.reorder_defaultoff;}};PLISTA.setReorderActive=function(r){PLISTA.util.cookie.createCookie('autoreorder',r,365);PLISTA.reorderItems();};PLISTA.toggle_reorder=function(){PLISTA.setReorderActive(PLISTA.reorderActive()?0:1);try{PLISTA.reorder.toggle();}catch(e){PLISTA.util.logger.log("PLISTA.reorder.toggle: "+e.message);}};PLISTA.reorderItems=function(){if(!PLISTA.reorder||PLISTA.isArticle()||PLISTA.reorder_disabled){return;}
var active=PLISTA.reorderActive();if((PLISTA.reorder.isReordered()&&active)||(!PLISTA.reorder.isReordered()&&!active)){return;}
PLISTA.reorder.toggle();};PLISTA.reorder=(function(){var reorderLists=[],reorder,undoreorder,reordered=false,createOrdered,orderContainers,newReorderList;createOrdered=function(unordered){var i,c,o,ratings=[],ordered=[];for(i=0;i<unordered.length;i+=1){c=unordered[i];ordered[ordered.length]=c;try{o=c.getObjectid_src();ratings[o]=PLISTA.data[o].myrating?PLISTA.data[o].myrating:parseInt(PLISTA.data[o].rating,10)+10;}catch(e){PLISTA.util.logger.log('createOrdered:'+e.message);}}
ordered.sort(function(a,b){return ratings[b.objectid]-ratings[a.objectid];});return ordered;};newReorderList=function(){var newList=(function(){var list=[],ordered;list.reorder=function(){ordered=createOrdered(this);orderContainers(this,ordered);};list.undoreorder=function(){orderContainers(ordered,this);};list.remove=function(container){var i=this.indexOf(container);if(i>-1){this.splice(i,1);return true;}else{return false;}};return list;}());reorderLists.push(newList);return newList;};orderContainers=function(a,b){var i,j,ae,be,done=[],elm=document.createElement((a[0]&&a[0].e)?a[0].e.tagName:'div');try{for(i=0;i<a.length;i+=1){ae=a[i];if(done.indexOf(ae)===-1){done[done.length]=ae;ae.e.parentNode.replaceChild(elm,ae.e);while(true){j=b.indexOf(ae);if(j===-1){break;}
be=ae;ae=a[j];if(done.indexOf(ae)!==-1){ae=be;break;}
done[done.length]=ae;ae.e.parentNode.replaceChild(be.e,ae.e);}
elm.parentNode.replaceChild(ae.e,elm);}else{}}}catch(e){PLISTA.util.logger.log('Exception in PLISTA.reorder#orderContainers: i: '+i+' j: '+j+'\nae.e:'+ae.e.innerHTML+'\nbe.e: '+(be?be.e.innerHTML:'')+'\n'+done.join('.')+'error: '+e.message);PLISTA.reorder_disabled=true;}};reorder=function(){for(var i=0;i<reorderLists.length;i+=1){reorderLists[i].reorder();}
reordered=true;};undoreorder=function(){for(var i=0;i<reorderLists.length;i+=1){reorderLists[i].undoreorder();}
reordered=false;};return{isReordered:function(){return reordered;},toggle:function(){return reordered?undoreorder():reorder();},getNewReorderList:function(){return newReorderList();},getDefaultList:(function(){var defaultList=newReorderList();return function(){return defaultList;};}())};}());PLISTA.popup=(function(){if(PLISTA.onStarRating){PLISTA.onStarRating.subscribe(function(caller,objectid){if(PLISTA.popup.options.open_after_rating){PLISTA.popup.openByObjectid(objectid);}});}
if(PLISTA.onBeforeReInit){PLISTA.onBeforeReInit.subscribe(function(){PLISTA.popup.close();});}
if(PLISTA.userdata){PLISTA.userdata.onChange.subscribe(function(){if(PLISTA.popup.isOpen()){PLISTA.popup.close();PLISTA.popup.open();}});}
return{options:{logo_head:'',background_head:PLISTA.cdnpath+"images/bg/w3_header_bg.png",background_head_replace:false,background_content:'',background_footer:'',left:0,top:0,open_after_rating:false},isOpen:function(){return(document.getElementById('plistaWidget')!==null);},openByObjectid:function(objectid){PLISTA.addRating(objectid,-1);PLISTA.popup.close();PLISTA.popup.open(null,objectid);},close:function(){var div=document.getElementById('plistaWidget');if(div){div.parentNode.removeChild(div);}},open:function(action,objectid){PLISTA.popup.addCSS();var div=document.createElement('div');div.id='plistaWidget';PLISTA.popup.sendAJAX("iframectrl.php",((typeof action!=='undefined')&&action)?action:'','openWidget=1',objectid);var innerHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight);var innerWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);div.style.top=this.options.top?this.options.top:(Math.max((innerHeight/2)-(500/2),50)+'px');div.style.left=this.options.left?this.options.left:((innerWidth/2)-(580/2)+'px');if(PLISTA.isIEquirksmode){div.style.position='absolute';}else{div.style.position='fixed';}
div.style.zIndex=2147483647;document.getElementsByTagName("body")[0].appendChild(div);},sendAJAX:function(script,action,postMSG,objectid){var opt=PLISTA.popup.options;objectid=objectid||(PLISTA.items[0]?PLISTA.items[0].objectid:null);PLISTA.addRemoteScriptTag(PLISTA.path+"iframe/"+script+"?action="+action+
(PLISTA.domainid?"&domainid="+PLISTA.domainid:'')+
(objectid?"&objectid="+objectid:"")+"&logo="+encodeURIComponent(opt.logo_head||PLISTA.iframe_logo_head||'')+"&header="+encodeURIComponent(opt.background_head)+"&header_replace="+encodeURIComponent(opt.background_head_replace)+"&content="+encodeURIComponent(opt.background_content)+"&footer="+encodeURIComponent(opt.background_footer)+"&lang="+PLISTA.lang+
(typeof postMSG!=='undefined'?"&"+postMSG:'')+"&pluginversion="+PLISTA.pluginversion+"&time="+(new Date()).getTime()+"&hash="+PLISTA.pluginhash+
(PLISTA.isIE?"&charset="+document.charset:""),"iframeScript");return false;},addCSS:(function(){var cssloaded=false;return function(){if(cssloaded){return;}
if(navigator.appName.indexOf("Explorer")!==-1){PLISTA.util.loadCSS(PLISTA.path+'css/widget-iframe_ie.css');}else{PLISTA.util.loadCSS(PLISTA.path+'css/widget-iframe.css');}
PLISTA.util.loadCSS(PLISTA.path+"library/content/styles/loginform.css");cssloaded=true;};})(),scroll:function(list,elements,steps,scrollUp){if(window.isAllreadyScrolling===true){return false;}
var posNow,targetPos=0;function keepDownScrolling(){if(posNow>targetPos+20){posNow-=20;list.style.top=posNow+"px";}else if(posNow>targetPos){posNow-=1;list.style.top=posNow+"px";}else{window.isAllreadyScrolling=false;clearInterval(this.pointer);}}
function keepUpScrolling(){if(posNow<targetPos-20){posNow+=20;list.style.top=posNow+"px";}else if(posNow<targetPos){posNow+=1;list.style.top=posNow+"px";}else{window.isAllreadyScrolling=false;clearInterval(this.pointer);}}
var firstElement=list.getAttribute('pos');firstElement=(!firstElement)?0:parseInt(firstElement,10);posNow=-elements[firstElement].offsetTop;if(scrollUp){if(firstElement-steps>0){firstElement-=steps;targetPos=-elements[firstElement].offsetTop;window.isAllreadyScrolling=true;this.pointer=setInterval(keepUpScrolling,1);}else if(firstElement-steps===0){firstElement=0;targetPos=0;window.isAllreadyScrolling=true;this.pointer=setInterval(keepUpScrolling,20);}}else{if(firstElement+steps<elements.length){firstElement+=steps;targetPos=-elements[firstElement].offsetTop;window.isAllreadyScrolling=true;this.pointer=setInterval(keepDownScrolling,20);}}
list.setAttribute("pos",firstElement);}};}());PLISTA.scroll=PLISTA.popup.scroll;PLISTA.util.sha1=function(msg){function rotate_left(n,s){var t4=(n<<s)|(n>>>(32-s));return t4;}
function cvt_hex(val){var str="";var i;var v;for(i=7;i>=0;i--){v=(val>>>(i*4))&0x0f;str+=v.toString(16);}
return str;}
function Utf8Encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}
return utftext;}
var blockstart;var i,j;var W=[];var H0=0x67452301;var H1=0xEFCDAB89;var H2=0x98BADCFE;var H3=0x10325476;var H4=0xC3D2E1F0;var A,B,C,D,E;var temp;msg=Utf8Encode(msg);var msg_len=msg.length;var word_array=[];for(i=0;i<msg_len-3;i+=4){j=msg.charCodeAt(i)<<24|msg.charCodeAt(i+1)<<16|msg.charCodeAt(i+2)<<8|msg.charCodeAt(i+3);word_array.push(j);}
switch(msg_len%4){case 0:i=0x080000000;break;case 1:i=msg.charCodeAt(msg_len-1)<<24|0x0800000;break;case 2:i=msg.charCodeAt(msg_len-2)<<24|msg.charCodeAt(msg_len-1)<<16|0x08000;break;case 3:i=msg.charCodeAt(msg_len-3)<<24|msg.charCodeAt(msg_len-2)<<16|msg.charCodeAt(msg_len-1)<<8|0x80;break;}
word_array.push(i);while((word_array.length%16)!=14){word_array.push(0);}
word_array.push(msg_len>>>29);word_array.push((msg_len<<3)&0x0ffffffff);for(blockstart=0;blockstart<word_array.length;blockstart+=16){for(i=0;i<16;i++){W[i]=word_array[blockstart+i];}
for(i=16;i<=79;i++){W[i]=rotate_left(W[i-3]^W[i-8]^W[i-14]^W[i-16],1);}
A=H0;B=H1;C=H2;D=H3;E=H4;for(i=0;i<=19;i++){temp=(rotate_left(A,5)+((B&C)|(~B&D))+E+W[i]+0x5A827999)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp;}
for(i=20;i<=39;i++){temp=(rotate_left(A,5)+(B^C^D)+E+W[i]+0x6ED9EBA1)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp;}
for(i=40;i<=59;i++){temp=(rotate_left(A,5)+((B&C)|(B&D)|(C&D))+E+W[i]+0x8F1BBCDC)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp;}
for(i=60;i<=79;i++){temp=(rotate_left(A,5)+(B^C^D)+E+W[i]+0xCA62C1D6)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp;}
H0=(H0+A)&0x0ffffffff;H1=(H1+B)&0x0ffffffff;H2=(H2+C)&0x0ffffffff;H3=(H3+D)&0x0ffffffff;H4=(H4+E)&0x0ffffffff;}
temp=cvt_hex(H0)+cvt_hex(H1)+cvt_hex(H2)+cvt_hex(H3)+cvt_hex(H4);return temp.toLowerCase();};PLISTA.slider={};PLISTA.slider.slider=function(track,handle){var that={},mousedown,mouseup,mousemove,getPosFraction,getPosAbsolute,setPosFraction,setPosAbsolute,setFromMousePosition,clientXmin,clientXmax,effectiveWidth=parseInt(track.style.width,10)-parseInt(handle.style.width,10),active=false;if((!track)||(!handle)){throw{type:'InvalidParameterException',message:'plista.slider.getNewSlider: need DOM elements as parameters'};}
getPosFraction=function(){if(handle.style.display!=='none'){return getPosAbsolute()/effectiveWidth;}};getPosAbsolute=function(){if(handle.style.display!=='none'){return parseInt(handle.style.left,10);}};setPosFraction=function(pos){if(pos<0||pos>1){return false;}
return setPosAbsolute(pos*effectiveWidth);};setPosAbsolute=function(pos){if((pos>effectiveWidth)||(pos<0)){return false;}
if((typeof pos!=='number')||isNaN(pos)){}else{handle.style.display='block';handle.style.left=Math.floor(pos).toString()+'px';}
return true;};setFromMousePosition=function(clientX){var x=Math.max(Math.min(clientX,clientXmax),clientXmin);handle.style.left=(x-clientXmin).toString()+'px';that.onChange.fire();};mousedown=function(evt){var offsetX,target=evt.target||evt.srcElement;if(active){return false;}
effectiveWidth=parseInt(track.style.width,10)-parseInt(handle.style.width,10);if(typeof evt.offsetX!=='undefined'){offsetX=evt.offsetX;}else{offsetX=evt.layerX;}
if(target===handle){offsetX+=(parseInt(handle.style.left,10)||0);}
clientXmin=evt.clientX-offsetX;clientXmax=clientXmin+effectiveWidth;if(isNaN(clientXmin)||isNaN(clientXmax)){PLISTA.util.logger.log('slider mousedown: not a number o.O');return;}
PLISTA.util.DOM.addEventListener(document,'mousemove',mousemove);PLISTA.util.DOM.addEventListener(document,'mouseup',mouseup);that.onStart.fire();active=true;setFromMousePosition(evt.clientX);};mousemove=function(evt){if(active){setFromMousePosition(evt.clientX);}else{PLISTA.util.logger.log('slider mousemove: not active o.O');PLISTA.util.DOM.removeEventListener(document,'mousemove',mousemove);}};mouseup=function(evt){PLISTA.util.DOM.removeEventListener(document,'mousemove',mousemove);PLISTA.util.DOM.removeEventListener(document,'mouseup',mouseup);that.onStop.fire();active=false;};PLISTA.util.DOM.addEventListener(track,'mousedown',mousedown);PLISTA.util.DOM.addEventListener(handle,'mousedown',mousedown);that.getPosFraction=getPosFraction;that.setPosFraction=setPosFraction;that.setPosAbsolute=setPosAbsolute;that.getPosAbsolute=getPosAbsolute;that.onStart=PLISTA.util.newEvent(that,'start');that.onChange=PLISTA.util.newEvent(that,'change');that.onStop=PLISTA.util.newEvent(that,'stop');return that;};PLISTA.slider.sliderWidget=function(settings){if(typeof settings.elm==='string'){settings.elm=document.getElementById(settings.elm);}
var widthstring='width: '+(settings.width||100)+'px;';settings.elm.innerHTML='<div style="display: block;'+'width: '+widthstring+' height: 20px; '+'background: url(\''+settings.imgpath+'slider_middle.gif\') repeat-x left center;">'+'<div style="'+widthstring+' padding:0px; margin: 0px; '+'background: url(\''+settings.imgpath+'slider_left.gif\') no-repeat left center;">'+'<div style="'+widthstring+' padding:0px; margin: 0px; '+'position: relative; '+'background: url(\''+settings.imgpath+'slider_right.gif\') no-repeat right center;">'+'<div style="width: 7px; height: 20px; padding: 0; margin: 0; '+'position: relative; display: block; '+'background: url(\''+settings.imgpath+'slider_grip.gif\') no-repeat center center;">'+'</div></div></div>';var track=settings.elm.firstChild.firstChild.firstChild;return PLISTA.slider.slider(track,track.firstChild);};if(PLISTA.isIE){PLISTA.changer=[];PLISTA.changer.start=function(elm,style,val,cb){if(elm&&elm.style){elm.style[style]=val;}
if(cb){cb();}};}else{PLISTA.changer=(function(){var that=[];function setval(x){this.current=x;if(['marginTop'].indexOf(this.style)>-1){x=x+'px';}
this.elm.style[this.style]=x;}
function dostep(){var step=(this.origval-this.targetval)/5;if((Math.abs(this.targetval-this.current)<Math.abs(step))||(step===0)){setval.apply(this,[this.targetval]);window.clearInterval(this.interval);this.interval=0;delete that[this.id];if(this.cb){this.cb();}}else{setval.apply(this,[this.current-step]);}}
that.start=function(elm,style,val,cb){if(!elm){return;}
var i,x,changer,currentVal=parseFloat(elm.style[style]);for(i=0;i<that.length;i++){x=that[i];if((typeof x!=='undefined')&&(x.elm===elm)&&(x.style===style)){x.origval=x.targetval;x.targetval=val;x.cb=cb;return x;}}
if(val===currentVal){return;}
changer={elm:elm,style:style,targetval:val,cb:cb,current:currentVal,origval:currentVal};changer.id=that.push(changer)-1;changer.interval=window.setInterval(function(){dostep.apply(that[changer.id]);},50);return changer;};return that;}());}
if(!PLISTA.lib){PLISTA.lib={};}
PLISTA.loadtopbar=true;PLISTA.onBeforeReInit.subscribe(function(){if(PLISTA.topbar){delete PLISTA.topbar.topbarpanel;}});PLISTA.initTopbar=function(){if((typeof PLISTA.topbar==='undefined')&&!PLISTA.isIE6&&!PLISTA.isIncompatible&&(screen.width>=800)){PLISTA.loadtopbar=true;if(PLISTA.initStore){PLISTA.initStore();}
PLISTA.topbar=new PLISTA.lib.PlistaTopbar();if(PLISTA.store){PLISTA.store.get('topbar_mode',function(o,v){if(o){PLISTA.topbar.mode=parseInt(v,10);}
PLISTA.topbar.setElements(1);});}else{PLISTA.topbar.setElements(1);}}else if(PLISTA.topbar){PLISTA.topbar.refreshTopbar();}};PLISTA.lib.PlistaTopbar=function(){this.pulldowns=[];this.TopbarPulldown=function(){};this.TopbarPulldown.prototype={toString:function(){return'TopbarPulldownPrototype';},e:null,width:375,offsetLeft:0,li_mouseover:(PLISTA.isIEquirksmode?'onmouseover="this.className+=\' dkgrey_hover\';" onmouseout="this.className=this.className.replace(/ dkgrey_hover/, \'\')"':''),setRefElement:function(e){this.offsetLeft=e.offsetLeft;this.e=e;},setup:function(){if(PLISTA.topbar.options.pdObject){PLISTA.topbar.options.pdObject.remove();}
this.setPosition();this.setContent();PLISTA.topbar.options.pdObject=this;},remove:function(){},setContent:function(){PLISTA.topbar.options.innerHTML=this.fullHtml();if(this.afterFill){this.afterFill();}},setPosition:function(){var div=PLISTA.topbar.options;div.onmouseover();div.style.left=this.offsetLeft+'px';div.style.width=(this.width+7)+'px';},fullHtml:function(){var c='';if(!PLISTA.topbar.display_config.performance_hacks){c+='<div style="background:url('+PLISTA.cdnpath+'images/bg/tb_e.png) repeat-y right 0;padding-right:10px;overflow:hidden;">';}
c+='<ul class="plistapd">';c+=this.liList();c+='</ul></div>';c+=this.bottom();if(!PLISTA.topbar.display_config.performance_hacks){c+='<div style="width:100%;float:left"><div style="background:url('+PLISTA.cdnpath+'images/bg/tb_s.png) repeat-x 0 -3px;height:8px;margin: 0 11px"></div></div>';c+='<div style="background:url('+PLISTA.cdnpath+'images/bg/tb_sw.png) -0px -3px;height:8px;width:11px;float:left;margin-left:-100%"></div>';c+='<div style="background:url('+PLISTA.cdnpath+'images/bg/tb_se.png) -2px -2px;height:8px;width:9px;float:left;margin-left:-11px"></div>';}
return c;},items:function(){return[];},liList:function(){var items=this.items();if(!items||(items.length<=(PLISTA.topbar.small?0:1))){return'';}
var c='';for(var i=(PLISTA.topbar.small?0:1);((i<items.length)&&((this.skip&&(i<this.skip+this.maxcount))||(!this.skip&&i<this.maxcount)));i+=1){c+='<li class="dkgrey" '+this.li_mouseover+'>'+PLISTA.topbar.rcLink(items[i],i+1,this.logtype)+'</li>';}
return c;},listElement:function(){return PLISTA.xpath('.//ul',PLISTA.topbar.options)[0];},refreshList:function(){this.listElement().innerHTML=this.liList();},bottom:function(){return'';},optList:function(n,k,o){var c='<li class="kat">'+n+'</li>';var v=PLISTA.topbar[k];for(var i in o){if(typeof o[i]==='string'){c+='<li class="dkgrey'+(v===i?' dkgrey_active':' dkgrey_inactive')+'" '+this.li_mouseover+'><a onclick="PLISTA.topbar.set_'+k+'('+i+')">'+o[i]+'</a></li>';}}
return c;}};this.TopbarPulldownOptions=function(){this.toString=function(){return'TopbarPulldownOptions';};this.width=175;this.offsetLeft=2;this.liList=function(){var c=this.optList('Style','mode',{0:'Only icon',1:'Complete'});if(!PLISTA.reorder_disabled&&PLISTA.container&&(PLISTA.container.length>1)){PLISTA.topbar.reorder=PLISTA.reorderActive();c+=this.optList('Resort items','reorder',{0:'Inactive',1:'Active'});}
c+='<li class="kat">Actions</li>';if(PLISTA.store&&(!PLISTA.isIE||document.createExpression)){c+='<li class="dkgrey" '+this.li_mouseover+'><a onclick="return PLISTA.topbar.tour_click()">Start on-site Tour</a></li>';}
return c;};};this.TopbarPulldownOptions.prototype=this.TopbarPulldown.prototype;this.TopbarPulldownRcs=function(){this.toString=function(){return'TopbarPulldownRcs';};this.logtype='recommendations';this.wheelevent=function(event){var delta=0;var that=PLISTA.topbar.pulldownRcs;if(!event){event=window.event;}
if(event.wheelDelta){delta=event.wheelDelta/120;if(window.opera){delta=-delta;}}else if(event.detail){delta=-event.detail/3;}
if(event.preventDefault){event.preventDefault();}
event.returnValue=false;that.skip-=Math.round(delta*2);that.skip=Math.max(that.skip,0);that.skip=Math.min(that.skip,that.items().length-that.maxcount);var fc=PLISTA.topbar.options.firstChild;if(!that.target_height){that.target_height=fc.clientHeight;}
that.refreshList();that.listElement().style.marginTop=(-that.skip*21)+'px';fc.style.height=that.target_height+'px';PLISTA.itemlists.getByDataSource('recommendations').setCount(100);};this.items=function(){var rcs=PLISTA.topbar.rcs;if(rcs&&(typeof rcs==='object')&&(typeof rcs.length==='number')){return rcs;}else{return[];}};this.bottom=function(){var c='<div id="plista_tb_slider" style="background:url('+PLISTA.cdnpath+'images/bg/tb_e.png) repeat-y right 0;padding-right:10px;overflow:hidden;">';c+='<div style="background-color:#222;border:1px solid #777;border-top:0px;padding:3px 0 5px 10px">';c+='<div><div style="float:left;width:100px;margin:3px 10px 0 0;text-align:right;color:#fff">Niche</div><div id="plista_tb_nicheslider" style="width:100px;float:left;"></div><div id="plista_tb_nicheslider_info" style="float:left;margin:3px 0 0 10px"></div></div>';c+='<br style="clear:both" />';c+='<div><div style="float:left;width:100px;margin:3px 10px 0 0;text-align:right;color:#fff">Best ever</div><div id="plista_tb_ageslider" style="width:100px;float:left;"></div><div id="plista_tb_ageslider_info" style="float:left;margin:3px 0 0 10px"></div></div>';c+='<br style="clear:both" />';c+='</div></div>';return c;};this.afterFill=function(){var list=PLISTA.itemlists.getByDataSource('recommendations'),setNicheCaption,setAgeCaption;setNicheCaption=function(val){var elm=document.getElementById('plista_tb_nicheslider_info');if(typeof val==='number'){elm.innerHTML=Math.round(val*100)+"% Mainstream";}else{elm.innerHTML="Mainstream";}};setAgeCaption=function(val){var elm=document.getElementById('plista_tb_ageslider_info');if(typeof val==='number'){elm.innerHTML=Math.round(val*100)+"% Just added";}else{elm.innerHTML="Just added";}};var nicheslider=PLISTA.slider.sliderWidget({elm:'plista_tb_nicheslider',width:100,imgpath:PLISTA.cdnpath+'images/slider/'}),ageslider=PLISTA.slider.sliderWidget({elm:'plista_tb_ageslider',width:100,imgpath:PLISTA.cdnpath+'images/slider/'});var slidersetting=list.getNicheSlider();nicheslider.setPosFraction(slidersetting);setNicheCaption(slidersetting);slidersetting=list.getAgeSlider();ageslider.setPosFraction(slidersetting);setAgeCaption(slidersetting);nicheslider.onStop.subscribe(function(){var newVal=nicheslider.getPosFraction();if(newVal!==list.getNicheSlider()){list.setNicheSlider(newVal);}
setNicheCaption(newVal);});ageslider.onStop.subscribe(function(){var newVal=ageslider.getPosFraction();if(newVal!==list.getAgeSlider()){list.setAgeSlider(newVal);}
setAgeCaption(newVal);});list.onSettingsChange.subscribe(function(){var tmp=list.getNicheSlider();if(tmp!==nicheslider.getPosFraction()){nicheslider.setPosFraction(tmp);}
tmp=list.getAgeSlider();if(tmp!==ageslider.getPosFraction()){ageslider.setPosFraction(tmp);}});if(window.addEventListener&&this.items().length>10){PLISTA.util.DOM.addEventListener(window,'DOMMouseScroll',this.wheelevent,false);}};this.maxcount=10;this.target_height=0;this.skip=0;this.remove=function(){PLISTA.util.DOM.removeEventListener(window,'DOMMouseScroll',this.wheelevent,false);PLISTA.topbar.pulldownRcs.skip=0;};};this.TopbarPulldownRcs.prototype=this.TopbarPulldown.prototype;this.TopbarPulldownSimilar=function(){this.toString=function(){return'TopbarPulldownSimilar';};this.logtype='similar';this.maxcount=10;this.skip=0;this.items=function(){return PLISTA.topbar.similar;};};this.TopbarPulldownSimilar.prototype=this.TopbarPulldown.prototype;this.TopbarPulldownShare=function(){this.toString=function(){return'TopbarPulldownShare';};this.width=150;PLISTA.objectid=PLISTA.topbar.topbarpanel.objectid;this.liList=function(){var o=PLISTA.topbar.topbarpanel.objectid;var u=PLISTA.path+'sharer.php?domainid='+PLISTA.domainid+'&objectid='+o+'&site=';var c='<li class="dkgrey" '+this.li_mouseover+'><a href="#" onclick="this.blur();window.open(\''+u+'facebook\',\'sharer\',\'toolbar=0,status=0,width=626,height=380\');return false;" target="_blank"><img src="http://static.plista.com/images/buttons/icon_faceb.gif"/>Facebook</a></li>';c+='<li class="dkgrey" '+this.li_mouseover+'><a href="'+u+'myspace" target="_blank"><img src="http://static.plista.com/images/buttons/icon_mysp.gif"/>Myspace</a></li>';c+='<li class="dkgrey" '+this.li_mouseover+'><a href="'+u+'addthis" target="_blank"><img src="http://static.plista.com/images/buttons/addthis.gif"/>Share with Addthis</a></li>';return c;};};this.TopbarPulldownShare.prototype=this.TopbarPulldown.prototype;this.init_walk=function(){if(!PLISTA.store||(PLISTA.isIE&&!document.createExpression)){return;}
PLISTA.store.get('walker_finished',function(o,v){if(!o||!parseInt(v,10)){PLISTA.store.get('walker_step',function(o,v){PLISTA.topbar.walk_setwalkers();if(o&&v&&PLISTA.topbar.walkers[v]&&PLISTA.topbar.walkers[v].next){PLISTA.topbar.walkers[v].next.show();}else if(PLISTA.matching){PLISTA.topbar.walkers.logo.show();}});}});};this.walk_setwalkers=function(){if(this.walkers){return;}
this.walkers=[];this.walkers.logo=new Walker(this.logo,'<h3>This website is plista enabled!</h3><br> If you see the <img src="http://static.plista.com/images/icon_23_24.png"> Icon in the upper left side of a website, it indicates that this website is plista enabled!<p class="action">To start the tour, click the icon</b>, or <a href="javascript:plista.topbar.walker.close(1)">skip</a>.</p>',true,250);this.walkers.logo.autonext=false;this.walkers.logo.preAction=function(){PLISTA.topbar.set_mode(0);this.elm.onclick=function(){PLISTA.topbar.walkers.logo.goNext();};this.elm.onmouseover=null;};this.walkers.topbar=new Walker(PLISTA.topbar.bar,'<h3>This is the plista Topbar</h3><br> It helps you to find interesting content on this website, by analyzing what interests you the most. The result will appear as recommendations.<p class="action">Move your mouse over the recommendations</p>',true,250);this.walkers.topbar.preAction=function(){if(!PLISTA.topbar.showRcs_orig){PLISTA.topbar.set_mode(1);PLISTA.topbar.options.onmouseout();PLISTA.topbar.showRcs_orig=PLISTA.topbar.showRcs;PLISTA.topbar.showRcs=function(e){PLISTA.topbar.showRcs_orig(e);if(this.walkers.topbar.current){this.walkers.topbar.goNext();}
var pd=PLISTA.topbar.pulldownRcs;if(!pd.remove_orig){pd.remove_orig=pd.remove;pd.remove=function(){if(PLISTA.topbar.walkers.rcs.current){PLISTA.topbar.walkers.rcs.goPrev();}
this.remove_orig();};}};}};this.walkers.logo.next=this.walkers.topbar;this.walkers.rcs=new Walker(PLISTA.topbar.options,'<h3>These are your Recommendations</h3><br> This is, what plista recommends you - the stars indicate, how much we expect you to like the item and the sliders give you the option to get customized recommendations.<p class="action">Click now on any recommendation</p>',true,250);this.walkers.rcs.preAction=function(){PLISTA.topbar.showRcs();};this.walkers.topbar.next=this.walkers.rcs;this.walkers.rating=new Walker(document.getElementById('plista_topbar_panel'),'<h3>Rate the item</h3><br>To improve your recommendation quality, you can rate an item at the item-page between 1=worst and 5=best <p class="action">Try rating by clicking on the stars</p>',true,250);this.walkers.rating.preAction=function(){if(!PLISTA.isArticle()){PLISTA.topbar.walkers.error.show();return false;}
PLISTA.onStarRating.subscribe(PLISTA.topbar.walkers.rating.callGoNext);};this.walkers.rating.callGoNext=function(){PLISTA.topbar.walker.goNext();};this.walkers.rating.postAction=function(){PLISTA.onStarRating.unsubscribe(PLISTA.topbar.walkers.rating.callGoNext);};this.walkers.rcs.next=this.walkers.rating;this.walkers.finish=new Walker(PLISTA.topbar.bar,'<h3>Thank your for completing the tour...</h3><br>We hope you enjoy plista. Further information: <ul><li><a href="http://plista.com/?page=more&lang=en#3" target="_new">List of supported sites</a></li><li><a href="http://plista.com" target="_new">Read more about plista</a></li></ul><br>To add your friends to plista and see what they are reading, buying, etc. use the <img src="http://static.plista.com/images/facebook_logo.png"> Button.<br><br><p class="action">Click to <a href="javascript:plista.topbar.walker.close()">close</a></p>',true,350);this.walkers.finish.preAction=function(){PLISTA.topbar.bar.onmouseover();PLISTA.store.set('walker_finished',1);};this.walkers.error=new Walker(PLISTA.topbar.bar,'<h3>Help Error: no item page</h3><br>This is no item page - have you tried clicking on a recommendation? If this failed please report to <a href="mailto:error@plista.com">error@plista.com</a>.',true,250);this.walkers.error.next=this.walkers.rating;var quality=document.getElementById('plista_complete');if(quality){this.walkers.quality=new Walker(document.getElementById('plista_complete'),'<h3>How complete?</h3><br>To give you an indication, how complete your profile is, we show this bar - the more you rate the fuller it gets!<br><p class="action">Click to <a href="javascript:plista.topbar.walker.goNext()">continue</a></p>',true,250);this.walkers.quality.preAction=function(){window.scrollTo(0,0);PLISTA.topbar.bar.onmouseover();this.elm=document.getElementById('plista_complete');if(this.elm.onmouseover){this.elm_onmouseover=this.elm.onmouseover;this.elm.onmouseover=null;}};this.walkers.quality.next=this.walkers.finish;}
var next=this.walkers.finish;if(this.walkers.quality){next=this.walkers.quality;}
var rcs=document.getElementById('_plista_recommencations');if(rcs){this.walkers.rcscontent=new Walker(rcs,'<h3>And your Recommendations...</h3><br>... convenient at this location. But remember to rate to increase the recommendations quality!<br><p class="action">Click to <a href="javascript:plista.topbar.walker.goNext()">continue</a></p>',false,250);this.walkers.rcscontent.next=next;next=this.walkers.rcscontent;}
var contentpanel=null;for(var i=0;i<PLISTA.panels.length;i++){if(PLISTA.panels[i]!=PLISTA.topbar.topbarpanel){contentpanel=PLISTA.panels[i];break;}}
if(contentpanel){var e=contentpanel.refresh();this.walkers.ratingcontent=new Walker(e,'<h3>Or rate the item here</h3><br>On certain pages - like this one - we integrated rating stars and recommendations in the content of the page for higher convenience.<p class="action">Click to <a href="javascript:plista.topbar.walker.goNext()">continue</a></p>',false,250);this.walkers.ratingcontent.panel=contentpanel;this.walkers.ratingcontent.preAction=function(){this.elm=this.panel.refresh();};this.walkers.ratingcontent.next=next;next=this.walkers.ratingcontent;}
this.walkers.rating.next=next;};this.tour_click=function(){PLISTA.addRemoteScriptTag(PLISTA.path+'topbar.php'+'?domainid='+PLISTA.domainid+'&hash='+PLISTA.pluginhash+'&action=starttour');PLISTA.topbar.walk_setwalkers();PLISTA.store.set('walker_finished',0);PLISTA.store.set('walker_step',false);PLISTA.topbar.walkers.logo.show();};Walker.prototype=PLISTA.Helper.prototype;function Walker(elm,content,fix,width){this.elm=elm;this.content='<img src="'+PLISTA.cdnpath+'images/buttons/close_active.gif" '+'style="cursor:pointer;float:right" onclick="plista.topbar.walker.close(1)"/>'+content;this.fix=fix;this.width=width;this.current=false;this.autonext=true;this.show=function(){if(PLISTA.topbar.walker){PLISTA.topbar.walker.close();}
PLISTA.topbar.walker=this;if(this.elm.onmouseover){this.elm_onmouseover=this.elm.onmouseover;}
if(this.elm.onclick){this.elm_onclick=this.elm.onclick;}
if(this.preAction){if(this.preAction()===false){return;}}
this.over();this.current=true;if(this.autonext){for(var element in PLISTA.topbar.walkers){if(this==PLISTA.topbar.walkers[element]){PLISTA.store.set('walker_step',element);}}}};this.goNext=function(){this.close();if(this.next){this.next.prev=this;this.next.show();}};this.goPrev=function(){if(this.prev){this.close();this.prev.show();}};this.close=function(finish){if(this.postAction){this.postAction();}
if(this.elm_onmouseover){this.elm.onmouseover=this.elm_onmouseover;}
if(this.elm_onclick){this.elm.onclick=this.elm_onclick;}
if(this.div){this.div.style.display='none';}
this.current=false;if(finish){PLISTA.addRemoteScriptTag(PLISTA.path+'topbar.php'+'?domainid='+PLISTA.domainid+'&hash='+PLISTA.pluginhash+'&action=skiptour');}};}
PLISTA.userdata.onChange.subscribe(function(){if(PLISTA.userdata.getData().skiptour===false){PLISTA.topbar.init_walk();}});var topbarStyleElements=Object.create(PLISTA.render.defaultStyleElements);topbarStyleElements.ratinginline=Object.create(topbarStyleElements.ratinginline);topbarStyleElements.ratinginline.star_image=PLISTA.cdnpath+"images/gelb_anti.png";topbarStyleElements.ratinginline.star_width=12;topbarStyleElements.predictedstars=Object.create(topbarStyleElements.predictedstars);topbarStyleElements.predictedstars.star_image=PLISTA.cdnpath+"images/gelb_anti.png";topbarStyleElements.predictedstars.star_width=12;topbarStyleElements.anzeige=function(item){return(item.type==='pet')?'<span style="color: #999;">ANZEIGE</span>':'';};topbarStyleElements.expected_rating=function(item){return item.expected_rating.toFixed(2);};this.height=24;this.toString=function(){return'Topbar';};this.topbarcss='@CHARSET "UTF-8"; .plistareset{overflow-x:hidden;cursor:default}.plistareset *{font-family:Arial,Helvetica,sans-serif;border:0 none;float:none;line-height:1;margin:0;padding:0;text-decoration:none;font-size:12px;font-variant:normal:}.plistareset a,.plistareset a:link,.plistareset a:visited,.plistareset a:active{border:none;margin:0px;padding-left:0px;padding-right:0px;top:0px;bottom:0px;line-height:normal;font-size:normal;background:none;border:none;font-stretch:normal}.plistareset a{font-size:12px;text-decoration:none;display:inline;background:none}.plistareset a:hover{margin:0px;padding-left:0px;padding-right:0px;top:0px;bottom:0px;line-height:normal;font-size:normal;background:none;border:none;font-stretch:normal}.plistareset b{color:#000;margin:0px;padding-left:0px;padding-right:0px;top:0px;bottom:0px;line-height:normal;font-size:12px;font-weight:bold;background:none;border:none;font-stretch:normal}.plistareset p{margin:0px;padding-left:0px;padding-right:0px;top:0px;bottom:0px;line-height:normal;font-size:normal;background:none;border:none;font-stretch:normal}.plistareset span{float:none;margin:0px;padding-left:0px;padding-right:0px;top:0px;bottom:0px;line-height:normal;font-size:normal;background:none;border:none;font-stretch:normal}.plistareset img{margin:0px;padding:0px;float:none;background:none;border:none}.plistareset div.plistabubble{text-align:left;line-height:1.3em;color:#000}.plistareset .plistabubble span,.plistareset .plistabubble ul,.plistareset .plistabubble h3{line-height:1.3em;color:#000}.plistareset .plistabubble p.action{color:#CC0000;margin-top:10px;font-weight:bold}.plistareset div.plistabubble a{text-decoration:underline;color:#003399}div.plistatopbar{ font-size:12px;text-align:left;width:100px;position:fixed;top:24px;z-index:1000000002;overflow-x:hidden;color:#DDD}html head:first-child+body div.plistatopbar_bar div.top_box{overflow:hidden}div.plistatopbar_bar{ position:fixed;top:0px;width:100%;z-index:100000000;overflow-x:hidden;left:0px}div.plistatopbar_bar a{color:#FA7D19;text-decoration:none;font-family:Arial,Helvetica,sans-serif}div.plistatopbar_bar div.top_box{float:left;padding:4px 10px 0px 10px;border:0px;border-left:1px solid #666;height:24px;line-height:15px;overflow-x:hidden;white-space:nowrap} #plistatopbar_pd{position:fixed;top:24px; } #plistatopbar_logo img{margin:0px;padding:0px;float:none;border:none;background:none} ul.plistapd{margin:0px;padding:0px;border-bottom:1px solid #777;background-color:#222; overflow-x:hidden}ul.plistapd li{list-style:none;border:1px solid #777;border-bottom:0px;background-image:none; }ul.plistapd li.dkgrey,ul.plistapd li.dkgrey_active{background-color:#222;color:white;margin:0;opacity:0.95;padding:0}ul.plistapd li.dkgrey a{display:block;padding:4px 5px 4px 10px;color:white;text-decoration:none;cursor:pointer}ul.plistapd li.dkgrey a img{margin:0 5px -2px 0}ul.plistapd li.activity img{vertical-align:middle;width:23px;height:23px}ul.plistapd li.activity a{display:inline}ul.plistapd li.dkgrey_active a{border-left:5px solid #F39956;padding-left:10px}ul.plistapd li.dkgrey_inactive a{padding-left:15px;color:#AAA}ul.plistapd li.dkgrey:hover,ul.plistapd li.dkgrey:hover a{background-color:#4F2700}ul.plistapd li.c{background-color:#222}#plista_tb_slider > div{overflow-y:hidden } ul.plistapd li.kat{background-color:#000;opacity:0.95;font-weight:bold;color:white;padding:4px 5px;margin-top:0px}';this.mode=1;this.display_config={performance_hacks:PLISTA.isIE};this.over=function(){PLISTA.changer.start(PLISTA.topbar.bar,'opacity',1);};this.out=function(){if(window.pageYOffset>=PLISTA.topbar.height){PLISTA.changer.start(PLISTA.topbar.bar,'opacity',0.2);}
PLISTA.topbar.options.onmouseout({relatedTarget:PLISTA.topbar.bar});};this.onscroll=function(){if(window.pageYOffset<PLISTA.topbar.height){PLISTA.topbar.over();}else{PLISTA.topbar.out();}};this.initFillTopbar=function(){var rcsList=PLISTA.itemlists.getByDataSource('recommendations',15);this.rcs=rcsList.getData()||'loading';rcsList.onChange.subscribe(function(){PLISTA.topbar.rcs=rcsList.getData();PLISTA.topbar.refreshTopbar();if(PLISTA.topbar.options.pdObject&&PLISTA.topbar.options.pdObject.toString()==='TopbarPulldownRcs'){if(PLISTA.topbar.options.style.display==='block'){PLISTA.topbar.options.pdObject.setContent();}else{PLISTA.topbar.options.innerHTML=PLISTA.topbar.options.pdObject.fullHtml();}}});var similarList;if(PLISTA.isArticle()){similarList=PLISTA.itemlists.getByDataSource('similar',10);this.similar=similarList.getData();similarList.onChange.subscribe(function(){PLISTA.topbar.similar=similarList.getData();PLISTA.topbar.refreshTopbar();if(PLISTA.topbar.options.pdObject&&PLISTA.topbar.options.pdObject.toString()==='TopbarPulldownSimilar'){PLISTA.topbar.options.pdObject.setContent();}});}
PLISTA.userdata.onChange.subscribe(function(){PLISTA.topbar.refreshTopbar();if(PLISTA.topbar.options.pdObject&&PLISTA.topbar.options.pdObject.toString()==='TopbarPulldownOptions'){PLISTA.topbar.options.pdObject.setContent();}});PLISTA.topbar.refreshTopbar();};this.refreshTopbar=function(){if(!this.bar){return;}
this.small=PLISTA.isArticle()&&window.innerWidth<=1024;var c='',userdata=PLISTA.userdata.getData()||{};c='<div style="background:#000;height:'+this.height+'px;border-bottom:1px solid #666;overflow:hidden;">'+'<div class="top_box" style="padding-left:28px;border:0px;font-weight:bold;color:#FFF;cursor:pointer" onmouseover="plista.topbar.showOpt(this)">Setup</div>'+'<div class="top_box">'+
(userdata.screenname?'<div style="float:left;margin:2px 5px 0 0;color:#FFF">'+'Hi %s!'.replace('%s',userdata.screenname)+'</div>'+'<div id="plista_complete" style="background:url(\''+PLISTA.cdnpath+'images/profile_complete.png\') 0px 16px;width:113px;height:16px;float:left;">'+
(userdata.complete?'<div style="background:url(\''+PLISTA.cdnpath+'images/profile_complete.png\');width:'+Math.round(5+108/100*userdata.complete)+'px;height:16px;float:left;"></div>':'')+'</div>':'')+'</div>';var rcs=PLISTA.itemlists.getByDataSource('recommendations').getData();c+='<div class="top_box" id="plista_topbar_recommendations" style="width:'+(this.small?220:350)+'px;cursor:pointer;color:#FFF" onmouseover="plista.topbar.showRcs(this)">'+
(rcs&&rcs.length===0?(this.small?'<b style="color:#FFF">Rate now to get recommendations!</b>':'Rate more content to get <b style="color:#FFF">personalized recommendations</b>!'):'<b style="color:#FFF">Top Recommendation: </b>'+
(rcs==='loading'||!rcs?'loading ...':this.rcLink(rcs[0],1,"recommendations")))+'</div>';if(((PLISTA.isArticle()&&PLISTA.items.length>0)||(PLISTA.items.length===1))&&PLISTA.panels){if(!this.topbarpanel){this.topbarpanel=new PLISTA.Panel(PLISTA.currentObjectid(),'[ratinginline]',undefined,topbarStyleElements);this.topbarpanel.style='display: inline';if(PLISTA.container&&PLISTA.container[0]){PLISTA.container[0].panels.push(this.topbarpanel);}}
c+='<div class="top_box" id="plista_topbar_panel">Rate:</div>';c+='<div class="top_box" id="plista_topbar_similar" style="width:'+(this.small?150:200)+'px" onmouseover="plista.topbar.showSimilar(this)"><strong style="color:#FFF">Similar: </strong>'+
(!this.similar?'loading ...':this.rcLink(this.similar[0],1,"similar"))+'</div>';}
if(userdata.screenname&&!userdata.facebookid){c+='<div id="plista_topbar_facebookbtn" class="top_box" style="cursor:pointer;" onclick="plista.popup.open(\'facebook\');"><img src="'+PLISTA.cdnpath+'images/facebook_logo.png" /></div>';}
c+='<div class="top_box" style="cursor:pointer;float:right;padding-right:8px;color:#FFF" onclick="plista.topbar.set_mode(0)">close [x]</div>';c+='</div>';if(!this.display_config.performance_hacks){c+='<div style="clear:both;background:transparent url('+PLISTA.cdnpath+'images/bg/tb_s.png) repeat-x scroll center -2px; height:10px"></div>';}
this.bar.innerHTML=c;if(userdata.screenname&&!userdata.facebookid){var helper_fb=new PLISTA.Helper(document.getElementById('plista_topbar_facebookbtn'),"<b>Import Facebook</b><br><br>Just import your Facebook settings in plista. You can import your name, location, ... or even your avatar picture. Just choose what <b>you</b> want to import!",true,270);helper_fb.setupHover();}
var panelbox=document.getElementById('plista_topbar_panel');if(panelbox){panelbox.appendChild(PLISTA.topbar.topbarpanel.refresh());}
if(!PLISTA.widgetdatarequested){PLISTA.loadWidgetData(PLISTA.objectids);}};this.rcLink=function(item,i,what){if(!item||!item.title){return'';}
var style,tracking=' onmousedown="return PLISTA.click(this,\''+(item.domainid)+'\',\''+(item.objectid)+'\','+
(i)+',\'0\','+'\'topbar'+((PLISTA.isArticle()?'article':''))+(typeof what!=='undefined'?what:'')+'\')"';if(item.type==='pet'){tracking+=' target="_blank"';}
if(i>1){style='<a href="[url]" title="[text]" '+tracking+'><div><div style="float:left;color:#fff">'+i+'.'+'[title(43, true)]</div><div style="float:right">[predictedstars]</div><div style="float: right">[anzeige]</div><br style="clear:both" /></div></a>';}else{style='<a href="[url]" title="[text]"'+tracking+'>[anzeige] [title(40, true)]</a>';}
return PLISTA.render.parseStyle(style,item,topbarStyleElements);};this.rendererOpt=null;this.showOpt=function(){var pd=new this.TopbarPulldownOptions();pd.setup();};this.set_mode=function(i){this.mode=i;if(PLISTA.store){PLISTA.store.set('topbar_mode',i);}
this.showOpt();this.setElements();};this.set_reorder=function(i){PLISTA.setReorderActive(i);this.showOpt();};this.pulldownRcs=null;this.showRcs=function(){if(!this.pulldownRcs){this.pulldownRcs=new this.TopbarPulldownRcs();}
this.pulldownRcs.setRefElement(document.getElementById('plista_topbar_recommendations'));this.pulldownRcs.setup();};this.showSimilar=function(){var pd=new this.TopbarPulldownSimilar();pd.setRefElement(document.getElementById('plista_topbar_similar'));pd.setup();};this.showShare=function(){var pd=new this.TopbarPulldownShare();pd.setRefElement(document.getElementById('plista_topbar_share'));pd.setup();};this.setElements=function(init){if(this.bar){init=0;}
var body=document.getElementsByTagName('body')[0];var a=(this.mode===1);document.onscroll=a?this.onscroll:null;if(init){if(PLISTA.isIEquirksmode){this.topbarcss+='div.plistatopbar_bar, div.plistatopbar, #plistatopbar_pd {position:absolute;}\n'+'#plistatopbar_pd {top:23px;}';}else if(PLISTA.isIE7){this.topbarcss+='.dkgrey {\n'+'padding-top: 2px !important\n'+'padding-bottom: 2px !important;\n'+'background-color:#666;\n}';}
PLISTA.util.loadCSS(this.topbarcss);this.bar=document.createElement("div");this.bar.onmouseover=this.over;this.bar.onmouseout=this.out;this.bar.className='plistareset plistatopbar plistatopbar_bar';body.insertBefore(this.bar,body.firstChild);}
this.bar.style.display=a?'block':'none';this.bar.style.opacity=1;if(a){if(!this.spacer){this.spacer=document.createElement("div");PLISTA.util.DOM.setAttribute(this.spacer,'style','background:#000;height:24px;');body.insertBefore(this.spacer,body.firstChild);if(this.spacer.offsetLeft){this.spacer.style.marginLeft='-'+this.spacer.offsetLeft+'px';}
if(this.spacer.offsetTop){this.spacer.style.marginTop='-'+this.spacer.offsetTop+'px';}}}else if(this.spacer){this.spacer.parentNode.removeChild(this.spacer);this.spacer=null;}
if(a){this.initFillTopbar();}
if(init){this.logo=document.createElement("div");this.logo.onmouseover=function(){PLISTA.topbar.showOpt(PLISTA.topbar.logo);};this.logo.onclick=function(){if(PLISTA.topbar.mode===1){PLISTA.popup.openByObjectid(PLISTA.currentObjectid());}else{PLISTA.topbar.set_mode(1);}};this.logo.id='plistatopbar_logo';var positioncss=(PLISTA.isIEquirksmode?'position: absolute; ':'position: fixed;');PLISTA.util.DOM.setAttribute(this.logo,'style','height:24px;width:27px; '+positioncss+'top:0;left:0;z-index:1000000001;cursor:pointer;');this.logo.innerHTML='<img class="plistareset" src="'+PLISTA.cdnpath+'images/icon_23_24.png">';body.insertBefore(this.logo,body.firstChild);this.options=document.createElement("div");this.options.className='plistareset plistatopbar';this.options.id='plistatopbar_pd';this.options.onmouseout=function(evt){if(evt){var to=evt.relatedTarget||evt.toElement;if((PLISTA.topbar.options===to)||PLISTA.util.descendantOf(PLISTA.topbar.options,to)){return;}}
PLISTA.changer.start(PLISTA.topbar.options,'opacity',0,function(){try{PLISTA.topbar.options.style.display='none';PLISTA.topbar.options.pdObject.remove();}catch(e){PLISTA.util.logger.log("exception in topbar.options.mouseout: "+e.message);}});};this.options.onmouseover=function(){PLISTA.topbar.options.style.display='block';PLISTA.changer.start(PLISTA.topbar.options,'opacity',1);PLISTA.topbar.over();};PLISTA.util.DOM.setAttribute(this.options,'style','display:none;opacity:0;');body.insertBefore(this.options,body.firstChild);}
this.options.style.display=a?'block':'none';};};PLISTA.util.DOM.nextSibling=function(elem,nodeType,tagName){nodeType=nodeType||1;elem=elem.nextSibling;while(elem){if((nodeType===elem.nodeType)&&(!tagName||elem.nodeName===tagName.toUpperCase())){return elem;}
elem=elem.nextSibling;}
return null;};PLISTA.util.DOM.previousSibling=function(elem,nodeType,tagName){nodeType=nodeType||1;elem=elem.previousSibling;while(elem){if((nodeType===elem.nodeType)&&(!tagName||elem.nodeName===tagName.toUpperCase())){return elem;}
elem=elem.previousSibling;}
return null;};PLISTA.lib=PLISTA.lib||{};PLISTA.lib.objectidGenerators={hashUrl:function(url){return PLISTA.util.sha1(url).substr(0,23);},specCharsToUnderscore:function(url){var objectid=url.substr(url.indexOf('/',7)+1);if(objectid.substr(0,1)==='/'){objectid=objectid.substr(1);}
return objectid.replace(/\W/g,'_');}};PLISTA.util.urlMatchesPlistaDomain=function(url){var urlHost;if(typeof url!=='string'){PLISTA.util.logger.log('util.urlMatchesPlistaDomain: parameter is no string','error');return false;}
urlHost=/^(\w+):\/\/([\w\.\-]+)/.exec(url);if(!urlHost){PLISTA.util.logger.log('util.urlMatchesPlistaDomain: invalid url: '+url,'info');return false;}
if(urlHost[1].toLowerCase()!=='http'){PLISTA.util.logger.log('util.urlMatchesPlistaDomain: protocol not supported: '+urlHost[1].toLowerCase(),'info');return false;}
if(!(new RegExp(PLISTA.matching).test(urlHost[2]))){PLISTA.util.logger.log('util.urlMatchesPlistaDomain: host '+
urlHost[2]+'does not match '+PLISTA.matching,'info');return false;}
return true;};PLISTA.util.urlToObjectid=function(url){var fn=PLISTA.lib.objectidGenerators[PLISTA.options.objectidGenerator],s='plista.lib.objectidGenerators.'+PLISTA.options.objectidGenerator;if(typeof fn!=='function'){PLISTA.util.logger.log('urlToObjectid: '+s+' is no function');return;}
if(PLISTA.util.urlMatchesPlistaDomain(url)){try{return fn(url);}catch(e){PLISTA.util.logger.log('urlToObjectid: error calling '+s+': '+e.message);return false;}}else{PLISTA.util.logger.log('urlToObjectid: url "'+url+'" does not match current domain');return false;}};PLISTA.render.defaultStyleElements.augment({predictedchars:{color:'#bbb',size:'8px',getContent:function(item){var i,res='<div style="font-family: Serif; font-size: '+this.size+'">',count=Math.round(item.expected_rating);for(i=0;i<count;i++){res+='<span style="color:'+this.color+'">\u2605</span>';}
for(i=count;i<5;i++){res+='<span style="color:'+this.color+'">\u2606</span>';}
res+='</div>';return res;}}});PLISTA.searchItems_call=PLISTA.init;