All pastes #740247 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-10-17 20:11 UTC
rendered paste body
	<style type="text/css" media="screen">
	    
	    #leopard-countdown .countdown {overflow: hidden;}
		#leopard-countdown .countdown div {width: 63px; height: 57px; font-size: 30px; text-align: center; background: url(http://images.apple.com/home/2007/images/counter_background.png) no-repeat; color: white; float:left; margin: 0 3px; behavior: url(/global/scripts/lib/iepngfix.htc); }
		#leopard-countdown .countdown div img { height: 57px; width: 25px; }
	</style>
	
	<script type="text/javascript" charset="utf-8">
        
        var init = function() {
            
            var renderStrategy = DigitImageCounterStrategy;
            
            if (AC.Detector.isMobile()) {
                renderStrategy = TextCounterStrategy;
            }
            
            var doubleDigitsPath = 'http://images.apple.com/home/2007/images/countdown_images/digit_images/digit_#{VALUE}.png';
            var singleDigitPath = doubleDigitsPath;
            
            var renderOptions = {singleDigitPath: singleDigitPath, doubleDigitsPath: doubleDigitsPath};
            var renderWithLeadingZero = {singleDigitPath: singleDigitPath, doubleDigitsPath: doubleDigitsPath, leadingZero: true}
            
            leopardLaunch = new Countdown(new Date("October 26, 2007 18:00:00"), {
                daysCounter: new Counter(0, 364, 'Days', new renderStrategy(renderOptions)),
                hoursCounter: new Counter(0, 23, 'Hours', new renderStrategy(renderOptions)),
                minutesCounter: new Counter(0, 59, 'Minutes', new renderStrategy(renderWithLeadingZero)),
                secondsCounter: new Counter(0, 59, 'Seconds', new renderStrategy(renderWithLeadingZero))
            });
            
            if (!leopardLaunch.isFinished()) {
                $('leopard-countdown').appendChild(leopardLaunch.counterFrame);
            }
        }
        
        Event.onDOMReady(init);
        
    </script>