var Catw={holder:null,nodes:null,step:0,topStart:0,sh:100,ivScroll:null,ivAnim:null,speed:4,init:function(){if(document.getElementById("catwalk").firstChild&&cwData.length>3){Catw.holder=document.getElementById("catwalk").firstChild;if(Catw.holder.childNodes.length>2){Catw.step=Catw.holder.childNodes.length;Catw.sh=Catw.holder.childNodes[0].offsetHeight;Catw.speed=Catw.sh/11;Catw.ivScroll=setInterval(Catw.scroll,13E3);for(var c=0;c<cwData.length;c++){var l=new Image(88,88);l.src=staticUrl+cwData[c][1]}}}},
create:function(){var c=document.createElement("A");c.className="u";c.setAttribute("href","/"+language+"/user/?id="+cwData[Catw.step][0]);c.innerHTML='<img src="'+staticUrl+cwData[Catw.step][1]+'" alt="" /><br/>'+cwData[Catw.step][2]+"<br/>";Catw.holder.insertBefore(c,Catw.holder.firstChild);Catw.holder.style.marginTop=-Catw.sh+"px"},scroll:function(){if(Catw.step>=cwData.length)Catw.step=0;Catw.create();Catw.step++;clearInterval(Catw.ivAnim);Catw.ivAnim=setInterval(Catw.animate,500/11)},animate:function(){var c=
Catw.holder.style.marginTop?parseInt(Catw.holder.style.marginTop):0;if(c>=0){clearInterval(Catw.ivAnim);Catw.holder.style.marginTop="0px";Catw.holder.removeChild(Catw.holder.lastChild)}else Catw.holder.style.marginTop=parseInt(c+Catw.speed)+"px"}},lastSelectedAnswer=[];
function selPoll(c,l){if(lastSelectedAnswer[l]!=null){lastSelectedAnswer[l].className="vote";lastSelectedAnswer[l].firstChild.checked="false"}c.className="vote_sel";c.firstChild.checked="true";lastSelectedAnswer[l]=c;document.getElementById("pollvoteform").submit()}
(function(c){c.extend(c.easing,{bounceOut:function(e,a,b,d,h){return(a/=h)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b}});c.fn.slideShow=function(e){var a=c.makeArray(arguments);return this.each(function(){var b=c.data(this,"slideShow")||c.data(this,"slideShow",new l(this,e));c.isFunction(b[e])&&b[e].apply(b,a.slice(1))})};var l=function(e,a,b){if("object"!==typeof a)throw new TypeError;var d=
this,h=c(e);b=c.extend({interval:6E3,transition:400},b);var i=[],k=0;e=c("<div/>").addClass("title").appendTo(h);var m=c("<span/>").addClass("label").appendTo(e);d.showSlide=function(f,j){if("undefined"===typeof i[f]){var g=c("<div/>").addClass("slide");c("<img/>").bind("load.slideshow",function(){d.hideTitle(function(){g.animate({opacity:"show"},b.transition,function(){d.setTitle(a[f].text).showTitle();i.push(g)})})}).attr("src",a[f].image).appendTo(g);g.appendTo(h)}else{g=i[f];g.hide().appendTo(h);
d.hideTitle(function(){g.animate({opacity:"show"},b.transition,function(){d.setTitle(a[f].text).showTitle()})})}k=f;c.isFunction(j)&&j();return d};d.next=function(f){var j=1+k===a.length?0:k+1;d.showSlide(j,f);return d};d.setTitle=function(f){m.html(f);return d};d.hideTitle=function(f){m.animate({opacity:0},{duration:b.transition,complete:f});return d};d.showTitle=function(){m.animate({opacity:1},{duration:b.transition});return d};d.play=function(){timer=setTimeout(function(){d.next(d.play)},b.interval);
return d};d.stop=function(){clearTimeout(timer);return d}};c.fn.flash=function(e,a){function b(){var h=c(this),i=setInterval(function(){5===++d&&clearInterval(i);h.animate({opacity:1},e).animate({opacity:0.25},e*0.75).animate({opacity:1},e).animate({opacity:0},e)},a)}e=e||100;a=a||4E3;var d=0;return this.each(function(){b.call(this)})};c.fn.bounce=function(e,a){function b(){var h=c(this),i=setInterval(function(){4===++d&&clearInterval(i);h.animate({bottom:56},e,function(){h.animate({bottom:0},{duration:e*
3,easing:"bounceOut"})})},a)}e=e||200;a=a||5100;var d=0;return this.each(function(){b.call(this)})};c.fn.pulsate=function(e){function a(){var b=c(this);b.animate({opacity:1},e,function(){b.animate({opacity:0},e,function(){b.pulsate(e)})})}e=e||1E3;return this.each(function(){a.call(this)})};People=function(e,a){if(null==e)throw new TypeError("Not an element");a=c.extend({staticUrl:"/",html:"%id %n %i %c %n %f %n %g %y",perPage:6,interval:12E3},a);var b=this,d=c(e),h=0,i=0,k=0,m=[];b.setData=function(f){if(!f instanceof
Array)throw new TypeError;m=f;i=Math.ceil(m.length/a.perPage)-1;return b};b.show=function(f){var j=a.perPage;f=c.map(m.slice(f*j,f*j+j),function(g){var n='<img src="'+a.staticUrl+b.getImgUrl(g[1])+'"/>',o=g[5]===0&&a.texts.boy||g[5]===1&&a.texts.girl||"";return b.getHtml(a.html,{id:g[0],i:n,n:g[2],f:g[3]?g[3]:"none",c:g[6]===1?"ss":"",g:o,y:g[4]===-1?"":g[4]})}).join(" ");d.html(f);return b};b.play=function(){h=h===i?1:h+1;b.show(h);return b};b.start=function(){k=setInterval(b.play,a.interval);return b};
b.getHtml=function(f,j){return f.replace(/%(\w+)/g,function(g,n){return j[n]})};b.getImgUrl=function(f){if("number"!==typeof f)throw new TypeError;var j=parseInt(f/1E6),g=parseInt(f%1E6/1E3);return"/"+j+"/"+g+"/"+f+".jpg"};d.bind("mouseenter.people",function(){clearInterval(k)}).bind("mouseleave.people",b.start)};c.fn.flipper=function(e){e=c.extend({interval:5E3,linkElements:"a"},e);var a=this.find(e.linkElements),b=a.length,d=1,h=0,i=function(){d=d===b?1:d+1;a.eq(d-1).trigger("click")},k=function(){return setInterval(i,
e.interval)};h=k();return this.bind("mouseenter.flipper",function(){clearInterval(h)}).bind("mouseleave.flipper",k)}})(jQuery);
