(function ($) {
// VERTICALLY ALIGN FUNCTION
$.fn.vAlign = function(position) {
	return this.each(function(i){
	var ah = $(this).height();
	var ph = $(this).parent().height();
	var mh = 0;
	switch (position)
	{
		case 'center' : mh = (ph - ah) / 2; break;
		case 'bottom' : mh = (ph - ah); break;
	}
	$(this).css('margin-top', mh);
	});
};
})(jQuery);

