jQuery.fn._height=jQuery.fn.height;jQuery.fn._width=jQuery.fn.width;jQuery.fn.height=function(){if(this[0]==window){return self.innerHeight||jQuery.boxModel&&document.documentElement.clientHeight||document.body.clientHeight}if(this[0]==document){return Math.max(document.body.scrollHeight,document.body.offsetHeight)}return this._height(arguments[0])};jQuery.fn.width=function(){if(this[0]==window){return self.innerWidth||jQuery.boxModel&&document.documentElement.clientWidth||document.body.clientWidth}if(this[0]==document){return Math.max(document.body.scrollWidth,document.body.offsetWidth)}return this._width(arguments[0])};jQuery.fn.innerHeight=function(){return this[0]==window||this[0]==document?this.height():this.css("display")!="none"?this[0].offsetHeight-(parseInt(this.css("borderTopWidth"))||0)-(parseInt(this.css("borderBottomWidth"))||0):this.height()+(parseInt(this.css("paddingTop"))||0)+(parseInt(this.css("paddingBottom"))||0)};jQuery.fn.innerWidth=function(){return this[0]==window||this[0]==document?this.width():this.css("display")!="none"?this[0].offsetWidth-(parseInt(this.css("borderLeftWidth"))||0)-(parseInt(this.css("borderRightWidth"))||0):this.height()+(parseInt(this.css("paddingLeft"))||0)+(parseInt(this.css("paddingRight"))||0)};jQuery.fn.outerHeight=function(){return this[0]==window||this[0]==document?this.height():this.css("display")!="none"?this[0].offsetHeight:this.height()+(parseInt(this.css("borderTopWidth"))||0)+(parseInt(this.css("borderBottomWidth"))||0)+(parseInt(this.css("paddingTop"))||0)+(parseInt(this.css("paddingBottom"))||0)};jQuery.fn.outerWidth=function(){return this[0]==window||this[0]==document?this.width():this.css("display")!="none"?this[0].offsetWidth:this.height()+(parseInt(this.css("borderLeftWidth"))||0)+(parseInt(this.css("borderRightWidth"))||0)+(parseInt(this.css("paddingLeft"))||0)+(parseInt(this.css("paddingRight"))||0)};jQuery.fn.scrollLeft=function(){if(this[0]==window||this[0]==document){return self.pageXOffset||jQuery.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft}return this[0].scrollLeft};jQuery.fn.scrollTop=function(){if(this[0]==window||this[0]==document){return self.pageYOffset||jQuery.boxModel&&document.documentElement.scrollTop||document.body.scrollTop}return this[0].scrollTop};jQuery.fn.offset=function(n,g){var j=0,i=0,c=this[0],k=this[0],e=false,h=false,f,d=0,m=0,n=jQuery.extend({margin:true,border:true,padding:false,scroll:true},n||{});do{j+=k.offsetLeft||0;i+=k.offsetTop||0;if(jQuery.browser.mozilla||jQuery.browser.msie){var l=parseInt(jQuery.css(k,"borderTopWidth"))||0;var b=parseInt(jQuery.css(k,"borderLeftWidth"))||0;j+=b;i+=l;if(jQuery.browser.mozilla&&k!=c&&jQuery.css(k,"overflow")!="visible"){j+=b;i+=l}if(jQuery.css(k,"position")=="absolute"){e=true}if(jQuery.css(k,"position")=="relative"){h=true}}if(n.scroll){f=k.offsetParent;do{d+=k.scrollLeft||0;m+=k.scrollTop||0;k=k.parentNode;if(jQuery.browser.mozilla&&k!=c&&k!=f&&jQuery.css(k,"overflow")!="visible"){j+=parseInt(jQuery.css(k,"borderLeftWidth"))||0;i+=parseInt(jQuery.css(k,"borderTopWidth"))||0}}while(f&&k!=f)}else{k=k.offsetParent}if(k&&(k.tagName.toLowerCase()=="body"||k.tagName.toLowerCase()=="html")){if((jQuery.browser.safari||(jQuery.browser.msie&&jQuery.boxModel))&&jQuery.css(c,"position")!="absolute"){j+=parseInt(jQuery.css(k,"marginLeft"))||0;i+=parseInt(jQuery.css(k,"marginTop"))||0}if((jQuery.browser.mozilla&&!e)||(jQuery.browser.msie&&jQuery.css(c,"position")=="static"&&(!h||!e))){j+=parseInt(jQuery.css(k,"borderLeftWidth"))||0;i+=parseInt(jQuery.css(k,"borderTopWidth"))||0}break}}while(k);if(!n.margin){j-=parseInt(jQuery.css(c,"marginLeft"))||0;i-=parseInt(jQuery.css(c,"marginTop"))||0}if(n.border&&(jQuery.browser.safari||jQuery.browser.opera)){j+=parseInt(jQuery.css(c,"borderLeftWidth"))||0;i+=parseInt(jQuery.css(c,"borderTopWidth"))||0}else{if(!n.border&&!(jQuery.browser.safari||jQuery.browser.opera)){j-=parseInt(jQuery.css(c,"borderLeftWidth"))||0;i-=parseInt(jQuery.css(c,"borderTopWidth"))||0}}if(n.padding){j+=parseInt(jQuery.css(c,"paddingLeft"))||0;i+=parseInt(jQuery.css(c,"paddingTop"))||0}if(n.scroll&&jQuery.browser.opera&&jQuery.css(c,"display")=="inline"){d-=c.scrollLeft||0;m-=c.scrollTop||0}var a=n.scroll?{top:i-m,left:j-d,scrollTop:m,scrollLeft:d}:{top:i,left:j};if(g){jQuery.extend(g,a);return this}else{return a}};