var obj = null;
var pop = null;


 
function checkHover() {
    if (obj) {
        obj.find(".ToggleMenu").css("top", "-1000px");
        obj.find(".MenuClicker").removeClass("Active");
    }
    setTimeout("checkHover()", 1000);
}
function showHover() {
    pop.find(".ToggleMenu").css("top", "29px");
    pop.find(".MenuClicker").addClass("Active");
}

$(document).ready(function(){  
        
    $(".ToggleMenuHover").hover(function() {
        if (obj) {
            obj.find(".ToggleMenu").css("top", "-1000px");
            obj.find(".MenuClicker").removeClass("Active");
            obj = null;
        }
        pop = $(this);
        s = setTimeout("showHover()", 500);
        
    }, function() {
        obj = $(this);
        clearTimeout(s);
        setTimeout("checkHover()", 1000);
    });
    
    //Set tabs
    $("#Tabs").tabs({
        select: function(event, ui) {
            var url = $.data(ui.tab, 'load.tabs');
            if( url ) {
                location.href = url;
                return false;
            }
            return true;
        }


    });
    
    $("#LessContent").hide();
    $(".CityInformationTable a").css("font-weight","bold");
        $(".CityInformationTable tr:gt(2)").hide();
            $("#ShowMeMore").click(function() {
            $(".CityInformationTable tr").fadeIn(200);
            $("#ShowMeMore").fadeOut(200, function() {
            $("#LessContent").fadeIn(200)
        });

        });
        $("#LessContent").click(function() {
            $(".CityInformationTable tr:gt(2)").fadeOut(200);
            $("#LessContent").fadeOut(200, function() {
                $("#ShowMeMore").fadeIn(200);
        });

});
    
    
    
    //Alternate Rows
    $(".TabularOffers tr:odd").addClass("Alternate");
    
    //Checkboxes
    $("input[type='checkbox']").custCheckBox();
    
    //RadioButtons
    //$("input[type='radio']").custCheckBox();
});