Javascript

codice:
<script src="http://images.apple.com/global/scripts/downloadcounter.js" type="text/javascript" charset="utf-8"></script> 	<script type="text/javascript"> 		var isCountdownShowing = false; 		var downloadCounter = new DownloadCounter("/autopush/us/itunes/includes/countdown.inc"), 			maxCount = 24999999990, 			setup = function() { 				var currentCount = this.currentCount(), 					billionApps = $('billion-apps'), 					thanks = $('thanks'); 				if (currentCount >= maxCount) { 					billionApps.hide(); 					downloadCounter.stop(); 					if(thanks) { 						thanks.show(); 					} 				} else { 					if(thanks) { 						thanks.hide(); 					} 					billionApps.hide(); 					downloadCounter.setElement($('downloadCounter')); 				} 				$('swap-container').style.visibility = 'visible'; 			}; 			 		downloadCounter.setMaxCount(maxCount); 		downloadCounter.setDigitImageAnimationCount(6); 		downloadCounter.setDigitImageHeight(103); 		downloadCounter.setDelegate({ 			counterDidReachValue: function(downloadCounter, currentCount) { 				if(currentCount >= maxCount) { 					downloadCounter.stop(); 					new Effect.Fade('billion-apps', { 						afterFinish: function() { 							$('billion-apps').hide(); 							new Effect.Appear('thanks', {duration:0.8}); 						} 					}); 				} else { 					if(!isCountdownShowing && !isNaN(downloadCounter.currentCount())){ 						$('billion-apps').show(); 						isCountdownShowing = true; 					} 				} 			}, 			didLoadData: function() { 				Event.onDOMReady(setup.bind(this)); 			} 		});  	</script>