(function($){
  $.fn.vCenter = function(options) {
    options = options || {};
    var pos = {
    sTop : function() {
      return window.pageYOffset
      || document.documentElement && document.documentElement.scrollTop
      ||    document.body.scrollTop;
    },
    wHeight : function() {
      return window.innerHeight
      || document.documentElement && document.documentElement.clientHeight
      || document.body.clientHeight;
    }
    };
    return this.each(function(index) {
      if (index == 0) {
        var $this = $(this);
        var elHeight = options.height || $this.height();
        var elTop = pos.sTop() + (pos.wHeight() / 2) - (elHeight / 2);
        $this.css({
//          position: 'absolute',
//          marginTop: '0',
//          top: elTop
            marginTop: elTop
        });
      }
    });
  };
})(jQuery);

