//document ready
$(function() {

    // show/hide question field on reservation form
    $('#reservation-form #inquiry').change(function() {
        if ($(this).val() == 'other') {
            $('#reservation-form .questions').css({ display : 'block' });
            $('#reservation-form #questions').focus();
        } else {
            $('#reservation-form .questions').css({ display : 'none' });
        }
    });

    //main slideshow
    $('#slideshow ul li').simpleFade({
        speed: 1500,
        duration: 4000
    });

    // Cycle the testimonials
    $('ul#slideshow1').cycle({
        timeout: 11000
    });
    
    $('.place-gallery ul li a').lightBox({fixedNavigation:true});

    //colorbox
    /*
    $('.place-gallery ul li a').colorbox({
        opacity: 0,
        href: 'ajax/popup.html',
        close: '',
        onOpen: function() {
            container = $(this).parents('.place-gallery');
            title = $('h2', container).text();
            clickedIdx = $(this).parent().index();
        },
        onLoad: function() {
        },
        onComplete: function() {
            //append images
            $('a', container).each(function() {
                var src = $(this).attr('href');
                var alt = $(this).attr('title');
                $('#gallery-popup .slideshow').append('<li><img src="' + src + '" alt="' + alt + '" /></li>');
            });
            
            $('#gallery-popup h2').text(title);

            //start slideshow
            $('#gallery-popup .slideshow li').simpleFade({
                speed: 0,
                auto: false,
                init: function() {
                    popupFader = this;
                    popupFader.fadeToItem(clickedIdx);
                },
                onAfterFade: function(index) {
                    var caption = $('#gallery-popup .slideshow li').eq(index).find('img').attr('alt');
                    $('#gallery-popup .caption').text(caption);
                    $('#gallery-popup .slideshow').show();
                }
            });

            //create external controls
            $("#gallery-popup .prev").live('click', function() {
                popupFader.prev();
                return false;
            });

            $("#gallery-popup .next").live('click', function() {
                popupFader.next();
                return false;
            });
        }
    });
    */
    
    

});

