(function(c){function d(b,a){return parseInt(c.curCSS(b.jquery?b[0]:b,a,!0))||0}c.dimensions={version:"1.2"};c.each(["Height","Width"],function(b,a){c.fn["inner"+a]=function(){if(this[0]){var g="Height"==a?"Top":"Left",b="Height"==a?"Bottom":"Right";return this.is(":visible")?this[0]["client"+a]:d(this,a.toLowerCase())+d(this,"padding"+g)+d(this,"padding"+b)}};c.fn["outer"+a]=function(b){if(this[0]){var e="Height"==a?"Top":"Left",f="Height"==a?"Bottom":"Right",b=c.extend({margin:!1},b||{});return(this.is(":visible")?
this[0]["offset"+a]:d(this,a.toLowerCase())+d(this,"border"+e+"Width")+d(this,"border"+f+"Width")+d(this,"padding"+e)+d(this,"padding"+f))+(b.margin?d(this,"margin"+e)+d(this,"margin"+f):0)}}});c.each(["Left","Top"],function(b,a){c.fn["scroll"+a]=function(b){return!this[0]?void 0:void 0!=b?this.each(function(){this==window||this==document?window.scrollTo("Left"==a?b:c(window).scrollLeft(),"Top"==a?b:c(window).scrollTop()):this["scroll"+a]=b}):this[0]==window||this[0]==document?self["Left"==a?"pageXOffset":
"pageYOffset"]||c.boxModel&&document.documentElement["scroll"+a]||document.body["scroll"+a]:this[0]["scroll"+a]}});c.fn.extend({position:function(){var b=this[0],a,c,e;b&&(e=this.offsetParent(),a=this.offset(),c=e.offset(),a.top-=d(b,"marginTop"),a.left-=d(b,"marginLeft"),c.top+=d(e,"borderTopWidth"),c.left+=d(e,"borderLeftWidth"),a={top:a.top-c.top,left:a.left-c.left});return a},offsetParent:function(){for(var b=this[0].offsetParent;b&&!/^body|html$/i.test(b.tagName)&&"static"==c.css(b,"position");)b=
b.offsetParent;return c(b)}})})(jQuery);
