(function(){if(typeof(LinkedIn)=="undefined"){LinkedIn={}}function g(p){return(typeof p=="string")?document.getElementById(p):p}function k(p){if(p&&p.match(/:/)){return"dataavailable"}return{keypress:"keydown"}[p]||p}var i=function(s){if(!s){return[]}var q=[];for(var p=0,r=s.length;p<r;p++){q.push(s[p])}return q};Function.prototype.bind=function(){var p=this,r=i(arguments),q=r.shift();return function(){return p.apply(q,r.concat(i(arguments)))}};Function.prototype.bindAsEventListener=function(r){var p=this,q=i(arguments),r=q.shift();return function(s){return p.apply(r,[s||window.event].concat(q))}};function b(){return self.innerWidth||(document.documentElement.clientWidth||document.body.clientWidth)}function f(){return self.innerHeight||(document.documentElement.clientHeight||document.body.clientHeight)}function e(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft}function d(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop}function j(p){var q=0;do{q+=p.offsetLeft||0;q+=p.style.paddingLeft||0;p=p.offsetParent}while(p);return q}function h(q){var p=0;do{p+=q.offsetTop||0;q=q.offsetParent}while(q);return p}function m(p){var q=0;do{q+=p.scrollLeft||0;p=p.parentNode}while(p);return q}function l(q){var p=0;do{p+=q.scrollTop||0;q=q.parentNode}while(q);return p}function a(q){var s=0;do{s+=q.offsetLeft||0;q=q.offsetParent;if(q){if(q.tagName=="BODY"){break}var r=Element.getStyle(q,"position");if(r=="relative"||r=="absolute"){break}}}while(q);return s}function o(r){var q=0;do{q+=r.offsetTop||0;r=r.offsetParent;if(r){if(r.tagName=="BODY"){break}var s=Element.getStyle(r,"position");if(s=="relative"||s=="absolute"){break}}}while(r);return q}var c={create:function(){return function(){this.initialize.apply(this,arguments)}}};var n={observe:function(r,p,s){r=g(r);var q=k(p);if(r.addEventListener){r.addEventListener(q,s,false)}else{r.attachEvent("on"+q,s)}return r}};LinkedIn.CompanyInsider={infoWindowWidth:220,infoWindowHeight:250,infoIframeHeight:250,infoIframeWidth:220,iconUrl:"http://www.linkedin.com/img/icon/icon_company_insider_in_12x12.gif",iconWidth:12,iconHeight:12,infoWindowId:"company-insider-info-window",boxClassName:"company-insider-box",popUpClassName:"company-insider-pop-up",urlFor:function(q,p){if(!q){q=""}return"http://www.linkedin.com/companyInsider?data&companyName="+encodeURIComponent(q)+"&backgroundColor=FFFFFF&titleBackgroundColor=FFFFFF&textColor=4c4c4c&trackinginfo="+encodeURIComponent(window.location)+"&isPopup="+p}};LinkedIn.CompanyInsiderBox=c.create();LinkedIn.CompanyInsiderBox.prototype={initialize:function(q,r,p){this._element=g(q);this._element.className=this._element.className+" "+LinkedIn.CompanyInsider.boxClassName;this._companyName=r;this._options=p||{};this._createIFrame();return this},_createIFrame:function(){var p=document.createElement("iframe");p.src=LinkedIn.CompanyInsider.urlFor(this._companyName,"no");p.width=LinkedIn.CompanyInsider.infoIframeWidth;p.height=LinkedIn.CompanyInsider.infoIframeHeight;p.frameBorder="yes";p.scrolling="no";this._element.appendChild(p);this._iframe=p}};LinkedIn.CompanyInsiderInfoWindow=c.create();LinkedIn.CompanyInsiderInfoWindow.prototype={initialize:function(){this.marker=null;this._createWindow();LinkedIn.CompanyInsider.infoWindow=this;return this},open:function(p){if(this._marker){this._marker.infoWindow=null}this._marker=p;this._marker.infoWindow=this;this._iframe.src=LinkedIn.CompanyInsider.urlFor(this._marker.companyName,"yes");this._window.style.display="inline";var q=this._calculateWindowOffset();this._window.style.top=q.top+"px";this._window.style.left=q.left+"px"},close:function(){if(this._marker){this._marker.infoWindow=null}this._marker=null;this._window.style.display="none";return false},_createWindow:function(){var r=document.createElement("div");r.id=LinkedIn.CompanyInsider.infoWindowId;r.style.position="absolute";r.style.top="";r.style.left="";r.style.width=LinkedIn.CompanyInsider.infoWindowWidth+"px";r.style.height=LinkedIn.CompanyInsider.infoWindowHeight+"px";r.style.display="none";var s=document.createElement("div");var q=document.createElement("a");q.innerHTML="close";q.href="#";q.onclick=this.close.bind(this);s.appendChild(q);r.appendChild(s);var p=document.createElement("iframe");p.width=LinkedIn.CompanyInsider.infoWindowWidth;p.height=LinkedIn.CompanyInsider.infoIframeHeight;p.frameBorder="no";p.scrolling="no";p.allowTransparency=false;r.appendChild(p);document.body.appendChild(r);this._window=r;this._iframe=p},_calculateWindowOffset:function(){var t=this._marker.markerOffset();var u={};var q=b();var s=f();var r=t.left-e();var p=t.top-d();if(p<s/2){u.top=t.top+LinkedIn.CompanyInsider.iconHeight+2;if(r<q/2){u.left=t.left-27;this._window.className="top-left"}else{u.left=t.left-LinkedIn.CompanyInsider.infoWindowWidth+LinkedIn.CompanyInsider.iconWidth+30;this._window.className="top-right"}}else{u.top=t.top-LinkedIn.CompanyInsider.infoWindowHeight-LinkedIn.CompanyInsider.iconHeight-15;if(r<q/2){u.left=t.left-27;this._window.className="bottom-left"}else{u.left=t.left-LinkedIn.CompanyInsider.infoWindowWidth+LinkedIn.CompanyInsider.iconWidth+30;this._window.className="bottom-right"}}return u}};LinkedIn.CompanyInsiderPopup=c.create();LinkedIn.CompanyInsiderPopup.prototype={initialize:function(q,r,p){this._element=g(q);this._element.className=this._element.className+" "+LinkedIn.CompanyInsider.popUpClassName;this.companyName=r;this._options=p||{};this.infoWindow=null;this._createIcon();this._attachEventHandlers();return this},_createIcon:function(){var p=document.createElement("img");p.src=LinkedIn.CompanyInsider.iconUrl;p.width=LinkedIn.CompanyInsider.iconWidth;p.height=LinkedIn.CompanyInsider.iconHeight;this._element.appendChild(p)},_attachEventHandlers:function(){this._element.onclick=this._toggleInfoWindow.bindAsEventListener(this)},markerOffset:function(){return{top:h(this._element.lastChild),left:j(this._element.lastChild)}},_toggleInfoWindow:function(p){if(this.infoWindow){this._closeInfoWindow(p)}else{this._openInfoWindow(p)}},_openInfoWindow:function(q){if(!LinkedIn.CompanyInsider.infoWindow){new LinkedIn.CompanyInsiderInfoWindow()}var p=LinkedIn.CompanyInsider.infoWindow;if(p.marker){p.close()}p.open(this)},_closeInfoWindow:function(p){this.infoWindow.close()}};LinkedIn.CompanyInsiderStylesheet=c.create();LinkedIn.CompanyInsiderStylesheet.prototype={initialize:function(){css=this._createStylesheet();styleNode=document.createElement("style");styleNode.type="text/css";if(styleNode.styleSheet){styleNode.styleSheet.cssText=css}else{var p=document.createTextNode(css);styleNode.appendChild(p)}document.getElementsByTagName("head")[0].appendChild(styleNode);return this},_createStylesheet:function(){var p="#company-insider-info-window { position: relative; text-align:right; padding-top:30px; }#company-insider-info-window div a { color:#ccc; display:block; text-decoration:none; font:11px arial; position:absolute; top:25px; right:25px; -right:15px; width:10px; }#company-insider-info-window div { display:block;width:15px; } #company-insider-info-window iframe {padding: 0; margin: 0; width: 210px; height: 220px; position: absolute; left: 3px; }div.bottom-right div a, div.bottom-left div a {  margin-top:-20px; }div.bottom-right iframe, div.bottom-left iframe { top:25px; }div.top-right iframe, div.top-left iframe { top:40px; }div.bottom-right { background:url(http://www.linkedin.com/img/bg/bg_co_btm_rt.png) no-repeat;  -background:url(http://www.linkedin.com/img/bg/bg_co_btm_rt.gif) no-repeat;}div.bottom-left { background:url(http://www.linkedin.com/img/bg/bg_co_btm_lt.png) no-repeat;  -background:url(http://www.linkedin.com/img/bg/bg_co_btm_lft2.gif) no-repeat;}div.top-right {background:url(http://www.linkedin.com/img/bg/bg_co_top_rt.png) no-repeat;  -background:url(http://www.linkedin.com/img/bg/bg_co_top_rt.gif) no-repeat;}div.top-left {background:url(http://www.linkedin.com/img/bg/bg_co_top_lt.png) no-repeat;  -background:url(http://www.linkedin.com/img/bg/bg_co_top_lt.gif) no-repeat;}";return p}};n.observe(window,"load",function(){new LinkedIn.CompanyInsiderInfoWindow();new LinkedIn.CompanyInsiderStylesheet()})})();
