$(document).ready(function(){
    $("#nav li").hover(function(){
        $("ul", this).show();
    }, function(){
        $("ul", this).hide();
    });
    $("#properties li").mouseover(function(){
        $("#splash img").show().animate(
            {opacity: 0},
            {queue:false, duration:400}
        );
        $("#" + this.id.substr(4)).animate(
            {opacity: 1},
            {queue:false, duration:400}
        );
    });
    $("#properties").mouseout(function(){
        $("#splash img").animate(
            {opacity: 0},
            {queue:false, duration:400}
        );
        $("#default").animate(
            {opacity: 1},
            {queue:false, duration:400}
        );
    });
    $("#gallery a[rel=gallery]").fancybox({
        'titleShow'     : false,
        'transitionIn'  : 'elastic',
        'transitionOut' : 'elastic'
    });
    $("#slideshow a[rel=gallery]").fancybox({
        'titleShow'     : false,
        'transitionIn'  : 'elastic',
        'transitionOut' : 'elastic'
    });
});
function switchImage(ix) {
    var imgs = $("#slideshow img");
    var current = ix;
    if(++ix >= imgs.length) { ix = 0; }
    $(imgs[current]).fadeOut("slow");
    $(imgs[ix]).fadeIn("slow");
    window.setTimeout('switchImage(' + ix + ')', 4000);
}

