/*
 * Footer Align to Bottom
 * 
 * @author Claudiu Marginean <claudiu@boonsoft.net>
 * @copyright Copyright 2010 Boonsoft Romania - PHP Development Team
 * @version: v1
 */

(function($){
	//alert($(window).height());
	
	$.event.add(window, "load", autoFooterHeight);
	$.event.add(window, "resize", autoFooterHeight);

	
	function autoFooterHeight() 
	{
	    var wh = $(window).height();
	    var ah = $("#wrap_all").height();
	    var dif_h = wh - ah + 5;
	    //alert(dif_h);
	    //alert(wh+"px");
	    $("#wrap_footer_bg_m").css('height',(dif_h > 0) ? Math.round(dif_h)+"px" : 0+"px");
	}

})(jQuery);
