j$(function(){
    j$("img.rollover").each(function() {
        var off = this.src;
        var dot = this.src.lastIndexOf('.');
        var on = this.src.substr(0, dot) +
            '_on' + this.src.substr(dot, 4);
        j$(this).hover(
            function() { this.src = on; },
            function() { this.src = off; });
    });
    
    var pass = 24 * 30;

    // display content
    var content = '<img src="' + blog_url + 'images/new.gif" width="25" height="12" />';
    var currentDate = new Date(); 
    
    j$("span.new").each(function(){
       time = this.childNodes[0].nodeValue.split(":");
       var entryDate = new Date(time[0], time[1]-1, time[2], time[3], time[4], time[5]);
       var now = (entryDate.getTime() - currentDate.getTime())/(60*60*1000);
       now = Math.ceil(now);
       if(-now <= pass){
         this.innerHTML = content;
         //this.style.display = 'inline';
         this.style.margin = "0 5px 0 0";
       } else {
         this.innerHTML = "";
       }
    });
});
