$(document).ready( function(){
		
        // Countdown
        if(auctions != null)
        {
                 jQuery.each (auctions, function(){                      
                        dt = new Date();
                        dt.setTime(this.endTime*1000);
                 
                        $('.countdown .time#countdown-'+this.auctionID).countdown({
                                until: dt,
                                compact:false,
                                format: 'DHMS',
                                layout: '{d<}{dn} {dl} {d>} {hnn}:{mnn}:{snn}',
                                expiryText : expiryText,
                                onExpiry: function(){
                                                                        $(this).parent().removeClass('countdown').addClass('countdown-expired').addClass('bg-darkergrey');
                                                                        $(this).parent().prev(".action-countdown").text("");
                                                        }
                        });
                });
        }
});