(function($) {
	$.fn.stickyFooter = function(){
		
		var windowHeight	=	$(this).height();
		var wrapHeight		=	$('#wrapper').height();
		var pushHeight;
		
		if (wrapHeight < windowHeight) {
			
			pushHeight = windowHeight - wrapHeight;
			
			$('#main').append('<div id=\"push\"></div>');
			$('#push').css({
				'clear'		:	'both',
				'height'	:	pushHeight
			});
		}
		
		$(window).bind('resize', function() {
			$('#push').height(0);
			windowHeight	=	$(this).height();
			wrapHeight		=	$('#wrapper').height();
			if (wrapHeight < windowHeight) {
				pushHeight = windowHeight - wrapHeight;
				$('#push').height(pushHeight);
			}
		});
		
	}
})(jQuery);
