function iecompattest(){
	return ((document.compatMode && document.compatMode!="BackCompat") && !window.opera)? document.documentElement : document.body
}

function checkheight() {
	if (document.getElementById("footer")) {
		var e = $("#footer");
		if ($("body").height()+110 > iecompattest().clientHeight) {
			e.css({"top":"","bottom":"0px"});
		} else {
			e.css("top",$("body").height());
		}
	}
}

function showprofile() {
	$(this).find("#profile").animate({ height: 'show' }, 'slow', function() {
		checkheight();
  });
}

$(document).ready(function(){
	$(this).find("a.profileToggle").click( function() {
  	$("#profile").animate({height: 'toggle'}, 'slow', function() {
				checkheight();
				$("#clickme").slideToggle('fast');
  	})
 	});
 	$(this).find("a.dock-item").click(function() {
 		$("#maxpop").css({display:"none", left:"0", top:"0", width:"100%"});
 	});
 	$("#footer").css({position:"fixed"}).ready(function(){
		checkheight();
	})
});

window.onresize=checkheight;