/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-10-06 20:11:15 +0200 (Sa, 06 Okt 2007) $
 * $Rev: 3581 $
 *
 * Version: @VERSION
 *
 * Requires: jQuery 1.2+
 */
(function(b){
    b.dimensions={
        version:"@VERSION"
    };

    b.each(["Height","Width"],function(d,c){
        b.fn["inner"+c]=function(){
            if(!this[0]){
                return
            }
            var f=c=="Height"?"Top":"Left",e=c=="Height"?"Bottom":"Right";
            return a(this,c.toLowerCase())+a(this,"padding"+f)+a(this,"padding"+e)
            };

        b.fn["outer"+c]=function(f){
            if(!this[0]){
                return
            }
            var g=c=="Height"?"Top":"Left",e=c=="Height"?"Bottom":"Right";
            f=b.extend({
                margin:false
            },f||{});
            return a(this,c.toLowerCase())+a(this,"border"+g+"Width")+a(this,"border"+e+"Width")+a(this,"padding"+g)+a(this,"padding"+e)+(f.margin?(a(this,"margin"+g)+a(this,"margin"+e)):0)
            }
        });
function a(c,d){
    return parseInt(b.css(c.jquery?c[0]:c,d))||0
    }
})(jQuery);

