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