// Initialize sIFR
if (typeof sIFR == "function"){
  sIFR.replaceElement("h2.sifr", named({sFlashSrc: "/images/fonts/sigma.swf", sColor: "#ffffff", sWmode: "transparent"}))
}


// brae house
var brae = {

    /**
     * Init functions
     */         
    init: function () {
        brae.rollovers();
        brae.emulateHover($('#nav li')); 
        brae.preloadImages(["images/buttons/brochure_over.gif", 
                           "images/buttons/contact_over.gif",
                           "images/buttons/demo_over.gif",
                           "images/buttons/overview_over.gif"]);
    },
    
    /**
     * Rollovers buttons
     */
    rollovers: function () {
        $('.rollover').hover(
            function () {
                $(this).attr('src', $(this).attr('src').replace(/.gif/, '_over.gif'));
            },
            function () {
                $(this).attr('src', $(this).attr('src').replace(/_over.gif/, '.gif')); 
            }
        );
     },
     
    /**
     * Preload images
     * @param {Array} images array with names of images   
     */               
    preloadImages: function (images) {
        for (var i = 0; i < images.length; i++) {
            var image = new Image();
            image.src = images[i];
        }
    },
    
    /**
     * Emulate hover in IE6
     */          
    emulateHover: function (items) {
        items.hover(
            function () {
                $(this).addClass('hover');
            },
            function () {
                $(this).removeClass('hover');
            }
        )
    }
}

$(document).ready(function () {
    brae.init();
});
<!-- main end -->

