(function(a){EYE.extend({getPosition:function(a,b){var c=0;var d=0;var e=a.style;var f=false;if(b&&jQuery.curCSS(a,"display")=="none"){var g=e.visibility;var h=e.position;f=true;e.visibility="hidden";e.display="block";e.position="absolute"}var i=a;if(i.getBoundingClientRect){var j=i.getBoundingClientRect();c=j.left+Math.max(document.documentElement.scrollLeft,document.body.scrollLeft)-2;d=j.top+Math.max(document.documentElement.scrollTop,document.body.scrollTop)-2}else{c=i.offsetLeft;d=i.offsetTop;i=i.offsetParent;if(a!=i){while(i){c+=i.offsetLeft;d+=i.offsetTop;i=i.offsetParent}}if(jQuery.browser.safari&&jQuery.curCSS(a,"position")=="absolute"){c-=document.body.offsetLeft;d-=document.body.offsetTop}i=a.parentNode;while(i&&i.tagName.toUpperCase()!="BODY"&&i.tagName.toUpperCase()!="HTML"){if(jQuery.curCSS(i,"display")!="inline"){c-=i.scrollLeft;d-=i.scrollTop}i=i.parentNode}}if(f==true){e.display="none";e.position=h;e.visibility=g}return{x:c,y:d}},getSize:function(a){var b=parseInt(jQuery.curCSS(a,"width"),10);var c=parseInt(jQuery.curCSS(a,"height"),10);var d=0;var e=0;if(jQuery.curCSS(a,"display")!="none"){d=a.offsetWidth;e=a.offsetHeight}else{var f=a.style;var g=f.visibility;var h=f.position;f.visibility="hidden";f.display="block";f.position="absolute";d=a.offsetWidth;e=a.offsetHeight;f.display="none";f.position=h;f.visibility=g}return{w:b,h:c,wb:d,hb:e}},getClient:function(a){var b,c;if(a){c=a.clientWidth;b=a.clientHeight}else{var d=document.documentElement;c=window.innerWidth||self.innerWidth||d&&d.clientWidth||document.body.clientWidth;b=window.innerHeight||self.innerHeight||d&&d.clientHeight||document.body.clientHeight}return{w:c,h:b}},getScroll:function(a){var b=0,c=0,d=0,e=0,f=0,g=0;if(a&&a.nodeName.toLowerCase()!="body"){b=a.scrollTop;c=a.scrollLeft;d=a.scrollWidth;e=a.scrollHeight}else{if(document.documentElement){b=document.documentElement.scrollTop;c=document.documentElement.scrollLeft;d=document.documentElement.scrollWidth;e=document.documentElement.scrollHeight}else if(document.body){b=document.body.scrollTop;c=document.body.scrollLeft;d=document.body.scrollWidth;e=document.body.scrollHeight}if(typeof pageYOffset!="undefined"){b=pageYOffset;c=pageXOffset}f=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;g=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}return{t:b,l:c,w:d,h:e,iw:f,ih:g}},getMargins:function(a,b){var c=jQuery.curCSS(a,"marginTop")||"";var d=jQuery.curCSS(a,"marginRight")||"";var e=jQuery.curCSS(a,"marginBottom")||"";var f=jQuery.curCSS(a,"marginLeft")||"";if(b)return{t:parseInt(c,10)||0,r:parseInt(d,10)||0,b:parseInt(e,10)||0,l:parseInt(f,10)};else return{t:c,r:d,b:e,l:f}},getPadding:function(a,b){var c=jQuery.curCSS(a,"paddingTop")||"";var d=jQuery.curCSS(a,"paddingRight")||"";var e=jQuery.curCSS(a,"paddingBottom")||"";var f=jQuery.curCSS(a,"paddingLeft")||"";if(b)return{t:parseInt(c,10)||0,r:parseInt(d,10)||0,b:parseInt(e,10)||0,l:parseInt(f,10)};else return{t:c,r:d,b:e,l:f}},getBorder:function(a,b){var c=jQuery.curCSS(a,"borderTopWidth")||"";var d=jQuery.curCSS(a,"borderRightWidth")||"";var e=jQuery.curCSS(a,"borderBottomWidth")||"";var f=jQuery.curCSS(a,"borderLeftWidth")||"";if(b)return{t:parseInt(c,10)||0,r:parseInt(d,10)||0,b:parseInt(e,10)||0,l:parseInt(f,10)||0};else return{t:c,r:d,b:e,l:f}},traverseDOM:function(a,b){b(a);a=a.firstChild;while(a){EYE.traverseDOM(a,b);a=a.nextSibling}},getInnerWidth:function(a,b){var c=a.offsetWidth;return b?Math.max(a.scrollWidth,c)-c+a.clientWidth:a.clientWidth},getInnerHeight:function(a,b){var c=a.offsetHeight;return b?Math.max(a.scrollHeight,c)-c+a.clientHeight:a.clientHeight},getExtraWidth:function(b){if(a.boxModel)return(parseInt(a.curCSS(b,"paddingLeft"))||0)+(parseInt(a.curCSS(b,"paddingRight"))||0)+(parseInt(a.curCSS(b,"borderLeftWidth"))||0)+(parseInt(a.curCSS(b,"borderRightWidth"))||0);return 0},getExtraHeight:function(b){if(a.boxModel)return(parseInt(a.curCSS(b,"paddingTop"))||0)+(parseInt(a.curCSS(b,"paddingBottom"))||0)+(parseInt(a.curCSS(b,"borderTopWidth"))||0)+(parseInt(a.curCSS(b,"borderBottomWidth"))||0);return 0},isChildOf:function(b,c,d){if(b==c){return true}if(!c||!c.nodeType||c.nodeType!=1){return false}if(b.contains&&!a.browser.safari){return b.contains(c)}if(b.compareDocumentPosition){return!!(b.compareDocumentPosition(c)&16)}var e=c.parentNode;while(e&&e!=d){if(e==b)return true;e=e.parentNode}return false},centerEl:function(b,c){var d=EYE.getScroll();var e=EYE.getSize(b);if(!c||c=="vertically")a(b).css({top:d.t+(Math.min(d.h,d.ih)-e.hb)/2+"px"});if(!c||c=="horizontally")a(b).css({left:d.l+(Math.min(d.w,d.iw)-e.wb)/2+"px"})}});if(!a.easing.easeout){a.easing.easeout=function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c}}})(jQuery)
