$.fn.centerInClient = function(options) {
     var opt = { 
       container: window,    
       completed: null
     };
     $.extend(opt, options);
     return this.each(function(i) {
       var el = $(this);
       var jWin = $(opt.container);
       var isWin = opt.container == window;
       // have to make absolute
       el.css("position", "absolute");
       // height is off a bit so fudge it
       var hFudge = 2.2;
       var x = (isWin ? jWin.width() : 
          Win.outerWidth()) / 2 - el.outerWidth() / 2;
       var y = (isWin ? jWin.height() : 
          jWin.outerHeight()) / hFudge - 
          el.outerHeight() / 2;
       el.css({ left: x + jWin.scrollLeft(), 
         top: y + jWin.scrollTop() });
       //var zi = el.css("zIndex");
       //if (!zi || zi == "auto")
       //  el.css("zIndex", 1);
       // if specified make callback and pass element
       if (opt.completed)
         opt.completed(this);
     });
   }
