(function($){ $.fn.valign = function(options){
	
	var T = this;
	var P = this.parent();
	var H = P.height();
	var h = H/2;
	
	this.css({height: h, paddingTop: h/2});
}})(jQuery); 



/*(function($){ $.fn.valign = function(options){

        var defaults = {
                wraps:false,
                wrapper: "",
                halign: false
        };
    
        var T = this;
      
        options = $.extend(defaults, options);

        if(options.wrapper.length>0) {
            //custom wrapper is specified
                T.wrapAll(options.wrapper);
        } else if( (options.wraps==true) || T.parent().is("body")) {
            //no wrapper defined, use default
                T.wrapAll("<div></div>");  
                console.log(options.wraps==true);              
        }
        //shift focus of this to wrapper
            T=this.parent();
            
        TP = T.parent();
            
        if(TP.is("body")) {         
            //if the parent is the BODY then make the body & HTML 100% height
                TP.css("height","100%");
                $("html").attr("style","height:100%");
        }
        
        if(TP.css("position")!="absolute") TP.css("position","relative");
        T.css({
            "position":"absolute",
            "height":T.height(),
            "top":"50%",
            "left":"0px",
            "margin-top": 0-(T.height()/2)
        })
        if(options.halign) {
            T.css({
                "width":T.width(),
                "left":"50%",
                "margin-left": 0-(T.width()/2)
            })   
        }
}})(jQuery); */
