ink = function() {
    return {

        ticker: {
            len: 0,
            text: null,
            pos: 0,
            el: null
        },



        // Update the time on the element
        updatetime: function() {
            curTime = new Date();
            hours = curTime.getHours();
            minutes = curTime.getMinutes();
            
            minutes = this.strPad(minutes);
            
            $('.livetime').html(hours + ':' + minutes);
        },


        textTickerSetup: function(el)
        {
            this.ticker.text = $(el).text();
            this.ticker.len  = this.ticker.text.length;
            this.ticker.el   = el;

            el.html('');

            setTimeout("ink.textTicker()", 5500);
        },


        // Ticks the text in
        textTicker: function()
        {
            if(ink.ticker.pos <= this.ticker.len) {
                ink.ticker.el.append(ink.ticker.text.substring(ink.ticker.pos - 1, ink.ticker.pos));
                ink.ticker.pos++;

                setTimeout("ink.textTicker()", 60);
            }
        },
        
        /**
         * Pads the string with a leading 0 if needed
         *
         */
        strPad: function(val)
        {
            return (!isNaN(val) && val.toString().length == 1) ? "0" + val : val;
        }
    }
}();


