$(document).ready(function() {

    $(document).pngFix();

    jQuery('ul.sf-menu').superfish({
        delay: 800,
        autoArrows: false
    });

    FixHeights();

});

$(window).load(function() {

    $('.slides').innerfade({
        animationtype: 'fade',
        speed: 1500,
        timeout: 4000,
        type: 'sequence',
        containerheight: '284px'
    });
    
});

function FixHeights() {
    if (document.getElementById("QuickLinks")) {
        var maxHeight, temp;
        maxHeight = parseInt(document.getElementById("content").clientHeight, 10);
        temp = parseInt(document.getElementById("QuickLinks").clientHeight, 10);
        if (temp > maxHeight) {
            maxHeight = temp;
        }
        document.getElementById("QuickLinks").style.height = maxHeight + "px";
        document.getElementById("content").style.height = maxHeight + "px";
        document.getElementById("tbl_home").style.height = maxHeight + "px";  //Opera needs this
    }
}  


    
//    SetUpAjax();

//    function SetUpAjax() {

//        $(".sf-menu a, #pnlChildren a, #pnlFeatured a, .footer_menu a, .breadcrumb a")
//            .unbind("click")
//            .click(function() {

//            var linkObj = $(this);
//            var ajaxURL = linkObj.attr("href");
//            //alert(ajaxURL);

//            //Make the Ajax call 
//            $.ajax({
//                type: "GET",
//                url: ajaxURL,
//                success: function(data, textStatus) {
//                    var dom = $('#ajax_content', data);
//                    $('#ajax_content').html(dom.html());
//                },
//                complete: function(XMLHttpRequest, textStatus) {                    
//                    SetUpAjax();
//                }
//            }); //end of .ajax function

//            //Hide menu. The pages are ajax loaded
//            $('ul.sf-menu').hideSuperfishUl();

//            //This statement will prevent the browser from actually navigating to the address in the link 
//            return false;
//        });

//       

//    }
    
    



