function rollover() {
    var image_cache = new Object();  
    $("img[src*='_o.']").not("[src*='_h.']").each(function(i) {  
        var imgsrc = this.src;  
        var imgsrc_on = this.src.replace("_o.", "_h.");
        image_cache[this.src] = new Image();  
        image_cache[this.src].src = imgsrc_on;  
        $(this).hover(  
            function() { this.src = imgsrc_on; },  
            function() { this.src = imgsrc; }  
        );  
    });  
}  


$(function(){
    rollover();
});

function init(){
    var adjust = function(){
        $(".layout", "#irContent").each(function(){
            var _c = $(this).attr("class");
            var _w1 = $(this).width();
            var _w2 = $('> .image img', this).width();
            $(this).width(_w1);
            $(".image", this).width(_w2);
            if(!_c.match("turn")){
                if(_c.match("right")){
                    $("> .content", this).css("margin-right", _w2 + 15);
                } else {
                    $("> .content", this).css("margin-left", _w2 + 15);
                }
            }
        });
    }

    if($.browser.safari){
        setTimeout(function(){
            adjust();
        }, 100);
    } else {
        adjust();
    }  
}