// JavaScript Document
	  
	$.fn.hoverClass = function(c) {
			return this.each(function(){
				$(this).hover( 
					function() { $(this).addClass(c);  },
					function() { $(this).removeClass(c); }
				);
			});
		};	
		
	jQuery.fn.equalCols = function(){
	//Array Sorter
	var sortNumber = function(a,b){return b - a;};
	var heights = [];
	//Push each height into an array
	$(this).each(function(){
	heights.push($(this).height());
	});
	heights.sort(sortNumber);
	var maxHeight = heights[0];
	return this.each(function(){
	//Set each column to the max height
	$(this).css({'height': maxHeight});
	});
	};	
	
	$(document).ready(function(){
			$("#nav-one li").hover(
				function(){ $("ul", this).fadeIn("fast"); }, 
				function() {$("ul", this).fadeOut("fast"); } 
			);
	  	if (document.all) {
				$("#nav-one li").hoverClass ("sfHover");
			}
		var slide = false;
		var height = $('#footer_content').height();
		$('#footer_button').click(function() {
			var docHeight = $(document).height();
			var windowHeight = $(window).height();
			var scrollPos = docHeight - windowHeight + height;
			$('#footer_content').animate({ height: "toggle"}, 1000);
			if(slide == false) {
				$('html, body').animate({scrollTop: scrollPos+'px'}, 1000);
				slide = true;
			} else {
				slide = false;
			}
		});	
		$('#col1,#col2').equalCols();
	  });
	
function getPage(target,Page){
       $("#"+target).html("<table cellpadding='0' cellspacing='0' border='0' width='100%'><tr><td align='center'> <img src='images/loading.gif' style='padding-top:55px;'></td></tr><tr><td align='center' style='font-size:11px'>Loading...</td></tr></table>")
	   $.ajax({
                 url: Page,
                 cache: false,
                 success: function(html){
                       $("#"+target).html(html);
                 }
       });
}		
