﻿var exploreButtonOff = new Image();
exploreButtonOff.src = "/Bgt/images/Explore_Busch_Gardens.gif";

var exploreButtonOn = new Image();
exploreButtonOn.src = "/Bgt/images/Explore_Busch_Gardens-on.gif";

function main() {
    $('#exploreButton').hover(function() { showSubMenu('#exploreMenu'); }, function() { hideSubMenu('#exploreMenu') });
    $('#exploreMenu').hover(function() { showSubMenu('#exploreMenu'); }, function() { hideSubMenu('#exploreMenu') });
    $('#planButton').hover(function() { showSubMenu('#planMenu'); }, function() { hideSubMenu('#planMenu') });
    $('#planMenu').hover(function() { showSubMenu('#planMenu'); }, function() { hideSubMenu('#planMenu') });
    $('#purchaseButton').hover(function() { showSubMenu('#purchaseMenu'); }, function() { hideSubMenu('#purchaseMenu') });
    $('#purchaseMenu').hover(function() { showSubMenu('#purchaseMenu'); }, function() { hideSubMenu('#purchaseMenu') });
    $('#stayButton').hover(function() { showSubMenu('#stayMenu'); }, function() { hideSubMenu('#stayMenu') });
    $('#stayMenu').hover(function() { showSubMenu('#stayMenu'); }, function() { hideSubMenu('#stayMenu') });

    //auto size tabbed box in restaraunts.aspx and giftshops.aspx pages.
    $('.bigTabs').height($('#col1').height() + 50);
    $('#parkMap').html('<img src="/Bgt/images/jungala_park_map.jpg" />');

    // Add water mark effect to search box
    $('#search input[type="text"]').example('Search', { className: 'example_text' });
}

function showSubMenu(obj) {
    $('#exploreButton').attr({ src: exploreButtonOn.src });
    $(obj).css({ display: "block" });
}

function hideSubMenu(obj) {
    $('#exploreButton').attr({ src: exploreButtonOff.src });
    $(obj).css({ display: "none" });
}

function modalDialog(id) {
    $(id).css({ display: "block" });
    $(id).dialog({
        modal: true,
        resizable: false,
        width: 466,
        height: 658,
        overlay: {
            opacity: 0.8,
            background: "black"
        }
    });
}

    
