$(document).ready(function () {
    /* Drop down navigation */

    $("#navcolumn ul ul").css({ display: "none" });
    //$("#navcolumn ul li a.active").parent("li").find("ul").slideDown("slow");
    /*
    $("#navcolumn ul li a").bind("click", function(){
    this.preventDefault;
    $(this).parent("li").find("ul:visible").slideUp();
    $(this).parent("li").find("ul:hidden").slideDown();
    });*/

    /* Availability drop down */
    $("#availability").css({ height: "20px", overflow: "hidden" });
    $("#availability a").click(function () {
        if ($("#availability").height() > 100)
            $(this).parent("#availability").animate({ height: "20px" });
        else
            $(this).parent("#availability").animate({ height: 170 });
    });

    if ($('#highlight').length > 0) {
        // Make highlight or content bigger, depending on height of biggest
        if (parseInt($("#highlight").height()) < parseInt($("#content3").height()))
            $("#highlight").css({ height: (parseInt($("#content3").height())) + "px" });
        else
            $("#content3").css({ height: (parseInt($("#highlight").height())) + "px" });
    }

    // If no highlight is shown, increase the content width and remove the margin
    if ($('#highlight').length == 0) {
        $("#content3").css({ width: "520px" });
        $("#content3").css("margin-left", "20px");
    }

    /* Announcements */
    $("#announcement").css({ width: 0 }).delay(2000).animate({ width: 778 }, 1000, function () { $(this).delay(7000).animate({ opacity: 0 }) });
    $("#accent img, #announcement").bind("mouseout", function () { $("#announcement").stop(true).delay(2000).animate({ opacity: 0 }); });
    $("#accent img, #announcement").bind("mouseover", function () {
        $("#announcement").stop(true).animate({ opacity: 1, width: 778 });
    });

    /* Languages rollover */
    $("#languages a").hover(function () {
        $(this).css({ backgroundColor: "#4f4036" }).animate({ backgroundPosition: "-30 0" }, 200);
    }, function () { $(this).css({ backgroundColor: "#4f4036" }).animate({ backgroundPosition: "0 0" }, 200); });

    $("a[rel='gallery']").colorbox();

    $("#bottomstuff").css({ top: parseInt($(document).height()) });
    
    var pageTracker = _gat._getTracker("UA-7569046-1");
    pageTracker._initData();
    pageTracker._trackPageview();
    pageTracker._setDomainName("none");
    pageTracker._setAllowLinker(true);
    var linkURL = pageTracker._getLinkerUrl("https://gc.synxis.com/rez.aspx?Hotel=19318&Chain=5301");
    var bsubonclick = "javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions('" + SubmitButton + "', '', false, '', '" + linkURL + "', false, false))"
    document.getElementById(SubmitButton).onclick = Function(bsubonclick);
});
