﻿$(document).ready(function () {
    $(".round").corner("15px");
    $("#centerbox").center();
    $(window).resize(
                function () {
                    $("#centerbox").center();
                });
});

jQuery.fn.center = function () {
    this.css("position", "absolute");
    var top = (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop();
    if (top < 0) top = 10;

    var left = (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft();
    if (left < 0) left = 10;

    this.css("top", top + "px");
    this.css("left", left + "px");
    return this;
};
        

