// function slideSwitch() {
//    var $active = jQuery('#slideshow IMG.active');

//   if ( $active.length == 0 ) $active = jQuery('#slideshow IMG:last');

// use this to pull the images in the order they appear in the markup
//    var $next =  $active.next().length ? $active.next()
//        : jQuery('#slideshow IMG:first');

// uncomment the 3 lines below to pull the images in random order
////    
//     var $sibs  = $active.siblings();
//     var rndNum = Math.floor(Math.random() * $sibs.length );
//     var $next  = jQuery( $sibs[ rndNum ] );


//    $active.addClass('last-active');

//    $next.css({opacity: 0.0})
//        .addClass('active')
//        .animate({opacity: 1.0}, 1000, function() {
//            $active.removeClass('active last-active');
//        });
//        
//               
//}

jQuery(document).ready(function() {
    //setInterval( "slideSwitch()", 5000 );

//    jQuery(".menu1").hover(function() {
//        if (jQuery(".dropDownMenu1").is(":hidden")) {
//            jQuery(".dropDownMenu1").slideDown("fast");
//        }
//        
//    },
//        function() {
//            jQuery(".dropDownMenu1").slideUp("fast");
//        }
//      )

//    jQuery(".menu2").hover(function() {
//        if (jQuery(".dropDownMenu2").is(":hidden")) {
//            jQuery(".dropDownMenu2").slideDown("fast");
//        }
//    },
//        function() {
//            jQuery(".dropDownMenu2").slideUp("fast");
//        }
//      )
    jQuery(".program1").hover(function() {
        if (jQuery(".dropdownProgram1").is(":hidden")) {
            jQuery(".dropdownProgram1").slideDown("fast");
        }
    },
        function() {
        jQuery(".dropdownProgram1").slideUp("fast");
        }
    )

        jQuery(".program2").hover(function() {
            if (jQuery(".dropdownProgram2").is(":hidden")) {
                jQuery(".dropdownProgram2").slideDown("fast");
            }
        },
        function() {
            jQuery(".dropdownProgram2").slideUp("fast");
        }
    )

        jQuery(".program3").hover(function() {
        if (jQuery(".dropDownProgram3").is(":hidden")) {
            jQuery(".dropDownProgram3").slideDown("fast");
            }
        },
        function() {
        jQuery(".dropDownProgram3").slideUp("fast");
        }
    )

        jQuery(".program4").hover(function() {
            if (jQuery(".dropDownProgram4").is(":hidden")) {
                jQuery(".dropDownProgram4").slideDown("fast");
            }
        },
        function() {
            jQuery(".dropDownProgram4").slideUp("fast");
        }
    )
    

    });

    function openPartners(element) {
        document.getElementById('spaOverlay').style.height = getDocHeight() + 'px';
    	document.getElementById('spaOverlay').style.display = "block";
        var popupbox = document.getElementById("dlgLogin");
        popupbox.style.display = "block";
    }

    function closeMe(element) {
        var popupbox = document.getElementById("dlgLogin");        
        popupbox.style.display = "none";
        document.getElementById('spaOverlay').style.display = "none";

    }
    function getDocHeight() {
        //utility function to find dimensions of page
        var D = document;
        return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
    }
