(function($) {
$.fn.valign = function(s) {
    var s = $.extend({
        height: null,
        top:null
    }, s);
    
    return this.each(function(i,e){
    	var it = $(e);
    	
    	$(window).load(function(){
    		var h = it.height();
    		var top = s.height/2 - h/2 + s.top;
    		
    		it.css('margin-top', top);
    	});
    });
}})(jQuery);
