I have a crazy problem in my portfolio: http://hericdk.com
I made a simple animation with jquery, an animation with a space ship flying, and then it appears my work, this idea is nice, everyone liked, but the problem is that for some strange reason, when I click to see my projects and the ship starts to fly, if I change the browser tab and then return, all the background animation works normally.. but the animation remains of the ship is still waiting for the next action of the animation until I return to the tab of my portfolio.
I'll put here the code of the animation of the space ship for you all understand.
$('#spaceship a').click(function(){
$('#spaceship').spState(2).sprite({fps: 9, no_of_frames: 12});
$('#space').stop().delay(3000).animate({'top':'0px'},9000,'easeInOutQuad');
$('#spaceship').animate({'top':'150px','left':'55%'},3000,'easeInOutExpo').delay(200)
.animate({'top':'350px','left':'65%'},2000,'easeInOutExpo').delay(100)
.animate({'top':'-400px','left':'65%'},1300,'easeInBack').delay(100)
.animate({'top':'-400px','left':'88%'},300,'easeInBack').delay(3000)
.animate({'top':$(window).height()-305+'px','left':'88%'},4000,'easeOutQuad',function(){
$('#spaceship').spState(1).spStop(true);
});// spaceship launch
return false;
}); //spaceship animation