(function($){

	$.fn.extend({ 
 		
 		vAlign: function() {

			//Iterate over the current set of matched elements
    		return this.each(function() {
				var obj = $(this);
				obj.css( { "display": "none" } );
				setTimeout(function(){
					// calculate the new padding and height
					var childHeight = obj.height();
					var parentHeight = obj.parent().height();
					var diff = Math.round( ( (parentHeight - childHeight) / 2) );
	
					// apply new values
					obj.css( { "display": "block", "padding-top": ""+diff+"px" } );
									},120);
			
    		});
    	}
	});
			
})(jQuery);
