
(function ($) {
// VERTICALLY ALIGN FUNCTION
$.fn.vAlign = function() {
	return this.each(function(i){
	var ah = $(this).height();
	/*var ph = $(this).parent().height();*/
	var ph = $(window).height();
	var mh = Math.ceil((Math.abs(ph-ah) / 2));
	//$(this).css('margin-top', mh);
	$(this).css('padding-top', mh);
	});
};
})(jQuery);

$(document).ready(function() {
    document.body.className += "hasJs";
	
	jQuery.event.add(window, "resize", resizeFrame);
	
	function resizeFrame() { 
		$('#container').vAlign();
	}
	resizeFrame();
});

