(function($){var _2=$.fn.height,_3=$.fn.width;$.fn.extend({height:function(){if(this[0]==window){return self.innerHeight||$.boxModel&&document.documentElement.clientHeight||document.body.clientHeight;}if(this[0]==document){return Math.max(document.body.scrollHeight,document.body.offsetHeight);}return _2.apply(this,arguments);},width:function(){if(this[0]==window){return self.innerWidth||$.boxModel&&document.documentElement.clientWidth||document.body.clientWidth;}if(this[0]==document){return Math.max(document.body.scrollWidth,document.body.offsetWidth);}return _3.apply(this,arguments);},innerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight-_4(this,"borderTopWidth")-_4(this,"borderBottomWidth"):this.height()+_4(this,"paddingTop")+_4(this,"paddingBottom");},innerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth-_4(this,"borderLeftWidth")-_4(this,"borderRightWidth"):this.width()+_4(this,"paddingLeft")+_4(this,"paddingRight");},outerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight:this.height()+_4(this,"borderTopWidth")+_4(this,"borderBottomWidth")+_4(this,"paddingTop")+_4(this,"paddingBottom");},outerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth:this.width()+_4(this,"borderLeftWidth")+_4(this,"borderRightWidth")+_4(this,"paddingLeft")+_4(this,"paddingRight");},scrollLeft:function(_5){if(_5!=undefined){return this.each(function(){if(this==window||this==document){window.scrollTo(_5,$(window).scrollTop());}else{this.scrollLeft=_5;}});}if(this[0]==window||this[0]==document){return self.pageXOffset||$.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft;}return this[0].scrollLeft;},scrollTop:function(_6){if(_6!=undefined){return this.each(function(){if(this==window||this==document){window.scrollTo($(window).scrollLeft(),_6);}else{this.scrollTop=_6;}});}if(this[0]==window||this[0]==document){return self.pageYOffset||$.boxModel&&document.documentElement.scrollTop||document.body.scrollTop;}return this[0].scrollTop;},position:function(_7,_8){var _9=this[0],_a=_9.parentNode,op=_9.offsetParent,_7=$.extend({margin:false,border:false,padding:false,scroll:false},_7||{}),x=_9.offsetLeft,y=_9.offsetTop,sl=_9.scrollLeft,st=_9.scrollTop;if($.browser.mozilla||$.browser.msie){x+=_4(_9,"borderLeftWidth");y+=_4(_9,"borderTopWidth");}if($.browser.mozilla){do{if($.browser.mozilla&&_a!=_9&&$.css(_a,"overflow")!="visible"){x+=_4(_a,"borderLeftWidth");y+=_4(_a,"borderTopWidth");}if(_a==op){break;}}while((_a=_a.parentNode)&&(_a.tagName.toLowerCase()!="body"||_a.tagName.toLowerCase()!="html"));}var _10=_11(_9,_7,x,y,sl,st);if(_8){$.extend(_8,_10);return this;}else{return _10;}},offset:function(_12,_13){var x=0,y=0,sl=0,st=0,_18=this[0],_19=this[0],op,_1b,_1c=$.css(_18,"position"),mo=$.browser.mozilla,ie=$.browser.msie,sf=$.browser.safari,oa=$.browser.opera,_21=false,_22=false,_12=$.extend({margin:true,border:false,padding:false,scroll:true,lite:false},_12||{});if(_12.lite){return this.offsetLite(_12,_13);}if(_18.tagName.toLowerCase()=="body"){x=_18.offsetLeft;y=_18.offsetTop;if(mo){x+=_4(_18,"marginLeft")+(_4(_18,"borderLeftWidth")*2);y+=_4(_18,"marginTop")+(_4(_18,"borderTopWidth")*2);}else{if(oa){x+=_4(_18,"marginLeft");y+=_4(_18,"marginTop");}else{if(ie&&jQuery.boxModel){x+=_4(_18,"borderLeftWidth");y+=_4(_18,"borderTopWidth");}}}}else{do{_1b=$.css(_19,"position");x+=_19.offsetLeft;y+=_19.offsetTop;if(mo||ie){x+=_4(_19,"borderLeftWidth");y+=_4(_19,"borderTopWidth");if(mo&&_1b=="absolute"){_21=true;}if(ie&&_1b=="relative"){_22=true;}}op=_19.offsetParent;if(_12.scroll||mo){do{if(_12.scroll){sl+=_19.scrollLeft;st+=_19.scrollTop;}if(mo&&_19!=_18&&$.css(_19,"overflow")!="visible"){x+=_4(_19,"borderLeftWidth");y+=_4(_19,"borderTopWidth");}_19=_19.parentNode;}while(_19!=op);}_19=op;if(_19.tagName.toLowerCase()=="body"||_19.tagName.toLowerCase()=="html"){if((sf||(ie&&$.boxModel))&&_1c!="absolute"&&_1c!="fixed"){x+=_4(_19,"marginLeft");y+=_4(_19,"marginTop");}if((mo&&!_21&&_1c!="fixed")||(ie&&_1c=="static"&&!_22)){x+=_4(_19,"borderLeftWidth");y+=_4(_19,"borderTopWidth");}break;}}while(_19);}var _23=_11(_18,_12,x,y,sl,st);if(_13){$.extend(_13,_23);return this;}else{return _23;}},offsetLite:function(_24,_25){var x=0,y=0,sl=0,st=0,_2a=this[0],op,_24=$.extend({margin:true,border:false,padding:false,scroll:true},_24||{});do{x+=_2a.offsetLeft;y+=_2a.offsetTop;op=_2a.offsetParent;if(_24.scroll){do{sl+=_2a.scrollLeft;st+=_2a.scrollTop;_2a=_2a.parentNode;}while(_2a!=op);}_2a=op;}while(_2a&&_2a.tagName.toLowerCase()!="body"&&_2a.tagName.toLowerCase()!="html");var _2c=_11(this[0],_24,x,y,sl,st);if(_25){$.extend(_25,_2c);return this;}else{return _2c;}}});var _4=function(el,_2e){return parseInt($.css(el.jquery?el[0]:el,_2e))||0;};var _11=function(_2f,_30,x,y,sl,st){if(!_30.margin){x-=_4(_2f,"marginLeft");y-=_4(_2f,"marginTop");}if(_30.border&&($.browser.safari||$.browser.opera)){x+=_4(_2f,"borderLeftWidth");y+=_4(_2f,"borderTopWidth");}else{if(!_30.border&&!($.browser.safari||$.browser.opera)){x-=_4(_2f,"borderLeftWidth");y-=_4(_2f,"borderTopWidth");}}if(_30.padding){x+=_4(_2f,"paddingLeft");y+=_4(_2f,"paddingTop");}if(_30.scroll){sl-=_2f.scrollLeft;st-=_2f.scrollTop;}return _30.scroll?{top:y-st,left:x-sl,scrollTop:st,scrollLeft:sl}:{top:y,left:x};};})(jQuery);