function movebackground(f) {
$(".circle1, .circle2, .circle3, bigcircle1, .bigcircle2, .bigcircle3").each(function (index) {
$(this).animate({ "background-position": "-=100 -=100" }, 3000, function () {
$(this).animate({ "background-position": "+=100 -=100" }, 3000 , function () {
$(this).animate({ "background-position": "+=100 +=100" }, 3000 , function () {
$(this).animate({ "background-position": "-=100 +=100" }, 3000 , function ()
{ f();} );
});
});
});
}
)}
var i = 1;
setInterval(function () {
if (i < 3) ++i; else i = 1;
$(".circle1").css('z-index', 0);
$(".circle2").css('z-index', 0);
$(".circle3").css('z-index', 0);
$(".circle1" + i).css({ width: "0px", height: "0px" });
$(".circle" + i).css('z-index', 1);
var lis = $('.circle' + i);
var j = 0;
(function displayImages() {
lis.eq(j++).animate({ width: "88px", height: "88px" }, 250, displayImages);
})();
$(".bigcircle1").css('z-index', 0);
$(".bigcircle2").css('z-index', 0);
$(".bigcircle3").css('z-index', 0);
$(".bigcircle" + i).css({ width: "0px", height: "0px" });
$(".bigcircle" + i).css('z-index', 1);
var lis2 = $('.bigcircle' + i);
var j2 = 0;
(function displayImages2() {
lis2.eq(j2++).animate({ width: "178px", height: "178px" }, {queue:false,duration:250}, displayImages2);
})();
}, 15000);