﻿jQuery(function(g){var e=[6,7,17],f=[],h=[],i=g('#full > div'),m=250,d=1000,p=3000,n=500,b,k=true,o=function(){k=false;i.each(function(a){b=g(this).children(':last');if(b[0].complete){if(g(this).children().length>=e[a])return h[a]=e[a]-1;f[a]%=e[a];b=b.clone().hide();b.attr('src',b.attr('src').replace(/\d+\.jpg/,++f[a]+'.jpg'));b.appendTo(this);++h[a]}k=true});if(k)setTimeout(o,m)},c,j,q=function(){return g.nth(this,2,'nextSibling')||this.parentNode.firstChild},l=function(){c=i.filter(function(a){return f[a]<h[a]||f[a]+1>=e[a]});if(c.length==e.length){c=i.children(':visible');j=c.map(q);c.eq(0).fadeOut(d);j.eq(0).fadeIn(d);setTimeout(function(){c.eq(1).fadeOut(d);j.eq(1).fadeIn(d);setTimeout(function(){c.eq(2).fadeOut(d);j.eq(2).fadeIn(d,function(){setTimeout(l,p)})},n)},n)}else setTimeout(l,m)};i.find('img:last').each(function(){f.push(parseInt(this.src.match(/\d+/g).pop()));h.push(-1)});o();l()});
