﻿$.fn.SimplePopup = function(options) {

    var opt = {
        container: window
    };
    $.extend(opt, options);

    return this.each(function(i) {
        var el = $(this);
        var h = $(window).height();
        var w = $(window).width();
        var ow = parseInt(el.css('width'));
        var oh = parseInt(el.css('height'));

        // have to make absolute
        el.css("position", "fixed");

        el.css('top', (h - oh) / 2);
        el.css('left', (w - ow) / 2);

        el.css('display', 'block');
    });
}