﻿$(document).ready
(
    function() {
    	// Handles the animation of the menu drop-down items
    	$("#Header #Nav li").hover
        (
            function() {
            	$(this).children("ul.navChildren").show();
            	$(this).children("a.navParent").css({ 'background-color': '#D7DCE0', 'border': '1px solid #687785' });
            },
            function() {
            	$(this).children("ul.navChildren").hide();
            	$(this).children("a.navParent").css({ 'background-color': 'Transparent', 'border': 'none' });
            }
        );
    	footerPush('#Container');
    }
);

$(window).resize
(
	function() {
		footerPush('#Container');
	}
);

function footerPush(bodyElement) {

	if ($(window).height() > $(document.body).height()) {
		if ($.browser.msie) {             //If Microsoft's IE
			$(bodyElement).height($(bodyElement).height() + ($(window).height() - $(document.body).height()) - 0);
		} else if ($.browser.mozilla) {     //If Mozilla's Firefox
			$(bodyElement).height($(bodyElement).height() + ($(window).height() - $(document.body).height()) - 17);
		} else if ($.browser.safari) {      //If Apple's Safari *or* Google's Chrome
			$(bodyElement).height($(bodyElement).height() + ($(window).height() - $(document.body).height()) - 58);
		} else {                            //Any other browser, default to 'standard' implementation
			$(bodyElement).height($(bodyElement).height() + ($(window).height() - $(document.body).height()) - 0);
		};
	};
	if ($.browser.opera) {     //If Opera
		if (window.innerHeight > $(document.body).height()) {
			$(bodyElement).height($(bodyElement).height() + (window.innerHeight - $(document.body).height()) - 0);
		};
	};
};