// JavaScript Document
$(document).ready(function() {


    if ($("#slideshow a").length > 0) {
        $('#slideshow a').overlay({
            target: '#gallery',
            expose: {
                maskId: 'exposeMask',
                color: '#533524',
                opacity: 0.95
            }
        }).gallery({
            speed: 800
        });
    }

    //Navigation
    $('ul#nav ul').css({ 'display': 'block' }); // Fallback remove
    $('ul#nav ul').hide();

    $('ul#nav li').hover(
		    function() {
		        $(this).children('ul').stop().height('auto').slideDown(200);
		    },
		    function() {
		        $(this).stop().height('auto').children('ul').slideUp(100);
		    }
	    );


    $('#overhead_close').click(function() {
        $('#overhead').slideUp("slow");
        $('#overhead_close').hide();
        setTimeout(function() { $('#overhead_open').fadeIn(); }, 600);
        return false;
    });

    $('#overhead_open').click(function() {
        $('#overhead').slideDown("slow");
        $('#overhead_open').hide();
        if ($.browser.msie) {
            setTimeout(function() { $('#overhead_close').show(); }, 600);
        } else 
        {
            setTimeout(function() { $('#overhead_close').fadeIn(); }, 600);
        }
        return false;
    });

});


function showonstart() {
    setTimeout(function() {
        $('#overhead').slideDown("slow");
        $('#overhead_open').hide();
        if ($.browser.msie) {
            setTimeout(function() { $('#overhead_close').show(); }, 600);
        } else {
            setTimeout(function() { $('#overhead_close').fadeIn(); }, 600);
        }
        return false;
    }, 800);
}


