LI.TalkIn.register("ads",function(t){"use strict";function e(t){var e;if(!t)throw Error("ExpandableContainer requires a config object. Refer to the API for details.");return e=this.getOrSetCache(t.containerId),e.expandData?e:t.width||t.height||t.top?e.configure(t):void 0}var n=t.document;return e.prototype={UNIT:"px",MIN_ZINDEX:5,MAX_ZINDEX:1e4,ATTRIBUTES:["left","width","height","top"],_cache:{},getOrSetCache:function(t){var e=this._cache,n=e[t];return n?n:(e[t]=this,this)},configure:function(e){var n=this.container=this.getElement(e.containerId),i=this.containerStyle=n.style,a=e.delta,o={},r={};return o.width=n.offsetWidth,o.height=n.offsetHeight,r.width=+((a&&e.width?o.width:0)+(e.width||o.width||n.width)),r.height=+((a&&e.height?o.height:0)+(e.height||o.height||n.height)),e.top&&(o.top=n.offsetTop,r.top=+((a?o.top:0)+e.top),r.height+=-1*r.top),e.push||(this.detach(o),o.left=parseInt(i.left,10),r.left=o.left-(r.width-o.width)),this.animation=t.$&&t.$().animate&&e.animate,this.setStateData(o,r),e.forget&&(this.forget=!0),this.parentZIndex=this.getStyle("z-index",n.parentNode),this},setStateData:function(t,e){for(var n,i=this.UNIT,a=this.ATTRIBUTES.slice(0);a.length;)n=a.pop(),t[n]===e[n]?(delete t[n],delete e[n]):(t[n]+=i,e[n]+=i);t.zIndex=this.MIN_ZINDEX,e.zIndex=this.MAX_ZINDEX,this.collapseData=t,this.expandData=e},getElement:function(t){return isNaN(t)?n.getElementById(t):this.getElementByTileId(t)},getElementByTileId:function(t){for(var e,i,a=/(;tile|&ti)=\d/g,o=n.getElementsByTagName("iframe"),r=o.length;r--;)if(e=o[r],i=e.src.match(a),i&&i[0].slice(i[0].indexOf("=")+1)===t)return e;return null},getStyle:function(e,n){if(n=n||this.container,n&&e){if(t.getComputedStyle)return t.getComputedStyle(n).getPropertyValue(e);if(n.currentStyle)return n.currentStyle[this.camelize(e)]}return""},camelize:function(t){return t.replace(/\-[a-z]/g,function(t){return t[1].toUpperCase()})},detach:function(t){var e=this.container,n=this.containerStyle;this.placeholder||(e.parentNode.insertBefore(this.createPlaceholder(t),e.nextSibling),n.position="absolute",n.top=e.offsetTop+this.UNIT,n.left=e.offsetLeft+this.UNIT,n.zIndex=this.MIN_ZINDEX)},createPlaceholder:function(t){var e=this.placeholder=n.createElement("div"),i=e.style,a=this.getStyle("display");return i.width=t.width+this.UNIT,i.height=t.height+this.UNIT,i.display="inline"===a?"inline-block":a,e},expand:function(){var t=this.expandData;this.animation?(this.containerStyle.display="",this.containerStyle.zIndex=t.zIndex,this.animate(t)):this.resize(t),this.forget&&(delete this.forget,this.expandData=null)},collapse:function(){var t=this.collapseData;this.animation?this.animate(t):this.resize(t)},resize:function(t){var e,n=this.containerStyle;for(e in t)n[e]=t[e];isNaN(this.parentZIndex)||(this.container.parentNode.style.zIndex=t.zIndex===this.MAX_ZINDEX?this.MAX_ZINDEX:this.parentZIndex)},animate:function(e){t.$(this.container).animate(e,this.animation)}},{ExpandableContainer:e,initialize:function(t){return new e(t)},expand:function(t){this.initialize(t).expand()},collapse:function(t){this.initialize(t).collapse()}}}(window));