(function(){if(typeof (window.LinkedIn)=="undefined"){window.LinkedIn={};}LinkedIn.Badges=(function(){var init,iface;init=function(){var nodes,i,li,ss,do_popup_listener=false;if(window.location.href.match(/^https:\/\//)){LinkedIn.Badges.Config.protocol="https";}counter=0;nodes=getElementsByClassName(LinkedIn.Badges.Config.match_class.profilepop,null,document);
i=0;while(node=nodes[i++]){if(LinkedIn.Badges.Config.match_urls.profile.test(node.href)){li=new LinkedIn.Badges.ProfilePopup(node);counter++;}continue;}nodes=getElementsByClassName(LinkedIn.Badges.Config.match_class.profileinline,null,document);i=0;while(node=nodes[i++]){if(LinkedIn.Badges.Config.match_urls.profile.test(node.href)){li=new LinkedIn.Badges.ProfileInline(node);
counter++;}}LinkedIn.Badges.trackTotals({widget_count:counter});LinkedIn.Badges.Util.addListener(document,"click",function(e){LinkedIn.Badges.hideAllPopups();});};iface={};iface.init=init;return iface;})();LinkedIn.Badges.trackTotals=function(oConfig){var img,url=LinkedIn.Badges.Config.protocol+"://"+LinkedIn.Badges.Config.overrides.tracking_domain+"/analytics"+"?type=widgetJSTracking&trk={HOST}&ct={WIDGETCOUNT}&wt=pprofile4";
url=url.replace(/\{HOST\}/,escape(window.location.href)).replace(/\{WIDGETCOUNT\}/,escape(oConfig.widget_count));img=document.createElement("img");img.setAttribute("src",url);};LinkedIn.Badges.ids={ProfilePopup:{}};LinkedIn.Badges.ProfileInline=function(node){url=LinkedIn.Badges.Config.query_urls.profile.replace("{PROTOCOL}",LinkedIn.Badges.Config.protocol).replace("{DOMAIN}",LinkedIn.Badges.Config.overrides.domain).replace("{INPUB}",node.href.match(LinkedIn.Badges.Config.match_urls.profile)[1]).replace("{NAME}",node.href.match(LinkedIn.Badges.Config.match_urls.profile)[2])+"?trk={HOST}&widget=1&type=inline#rpctoken={RPCTOKEN}&rpcname={RPCNAME}";
frame=LinkedIn.Badges.Util.getIFrame(node);frame.style.position="relative";rpctoken=LinkedIn.Badges.Util.generateUUID();go_url=url.replace("{RPCTOKEN}",rpctoken).replace("{RPCNAME}",frame.name).replace("{HOST}",escape(window.location.href));frame.style.width="1px";frame.style.height="1px";gadgets.rpc.setAuthToken(iframe.name,rpctoken);
frame.src=go_url;node.parentNode.removeChild(node);};LinkedIn.Badges.ProfilePopup=function(node){var url,xy,popup_id,div,callback,close,carat;if(!node.id){node.id=LinkedIn.Badges.Util.generateId();}node.style.paddingRight="16px";node.style.backgroundImage="url("+LinkedIn.Badges.Config.in_btn_url.replace("{PROTOCOL}",LinkedIn.Badges.Config.protocol).replace("{DOMAIN}",LinkedIn.Badges.Config.overrides.img_domain)+")";
node.style.backgroundRepeat="no-repeat";node.style.backgroundPosition="right bottom";url=LinkedIn.Badges.Config.query_urls.profile.replace("{PROTOCOL}",LinkedIn.Badges.Config.protocol).replace("{DOMAIN}",LinkedIn.Badges.Config.overrides.domain).replace("{INPUB}",node.href.match(LinkedIn.Badges.Config.match_urls.profile)[1]).replace("{NAME}",node.href.match(LinkedIn.Badges.Config.match_urls.profile)[2])+"?trk={HOST}&widget=1&type=popup#x={X}&y={Y}&vx={VX}&vy={VY}&rpctoken={RPCTOKEN}&rpcname={RPCNAME}";
LinkedIn.Badges.Util.addListener(node,"click",function(e){LinkedIn.Badges.hideAllPopups();LinkedIn.Badges.Util.preventDefault(e);LinkedIn.Badges.Util.stopPropagation(e);xy=getXY(e);frame=LinkedIn.Badges.Util.getIFrame(document.body.firstChild);rpctoken=LinkedIn.Badges.Util.generateUUID();go_url=url.replace("{X}",xy[0]).replace("{Y}",xy[1]).replace("{VX}",getViewportWidth()).replace("{VY}",getViewportHeight()).replace("{RPCTOKEN}",rpctoken).replace("{RPCNAME}",frame.name).replace("{HOST}",escape(window.location.href));
LinkedIn.Badges.ids.ProfilePopup[frame.name]=true;frame.style.width="1px";frame.style.height="1px";frame.style.zIndex="999";gadgets.rpc.setAuthToken(iframe.name,rpctoken);frame.src=go_url;});};LinkedIn.Badges.hideAllPopups=function(){for(id in LinkedIn.Badges.ids.ProfilePopup){if(LinkedIn.Badges.ids.ProfilePopup.hasOwnProperty(id)){node=document.getElementById(id);
node.parentNode.removeChild(node);delete LinkedIn.Badges.ids.ProfilePopup[id];}}};LinkedIn.Badges.ProfilePopup.resizeFrame=function(args){LinkedIn.Badges.Util.resizeIFrame("popup",this.f,args);};LinkedIn.Badges.ProfilePopup.repositionFrame=function(args){frame=document.getElementById(this.f);if(!frame){return ;
}x=args[0];y=args[1];frame.style.left=x+"px";frame.style.top=y+"px";};LinkedIn.Badges.ProfilePopup.addChrome=function(node){d1=document.createElement("div");d2=document.createElement("div");d3=document.createElement("div");carat=document.createElement("div");clearfix=document.createElement("div");clearfix.style.height="1px";
clearfix.style.width="1px";clearfix.style.clear="both";clearfix.style.visibility="hidden";closebtn=document.createElement("a");closebtn.href="#";LinkedIn.Badges.Util.addListener(closebtn,"click",function(e){LinkedIn.Badges.Util.preventDefault(e);LinkedIn.Badges.Util.stopPropagation(e);gadgets.rpc.call("..","close_profileiframe",null,null);
});LinkedIn.Badges.Util.addClass(d1,"chrome-top");LinkedIn.Badges.Util.addClass(d2,"chrome-mid");LinkedIn.Badges.Util.addClass(d3,"chrome-bot");LinkedIn.Badges.Util.addClass(closebtn,"close");LinkedIn.Badges.Util.addClass(carat,"carat");LinkedIn.Badges.Util.addClass(node,"linkedin-public-profile-with-chrome");
while(node.firstChild){d2.appendChild(node.firstChild);}node.appendChild(d1);d1.appendChild(closebtn);node.appendChild(d2);d2.appendChild(clearfix);node.appendChild(d3);node.appendChild(carat);};LinkedIn.Badges.Config={initial_url:null,page_is_widget:false,match_class:{profilepop:"linkedin-profileinsider-popup",profileinline:"linkedin-profileinsider-inline"},match_urls:{profile:new RegExp("^http(?:s)?://(?:.*)/(in|pub)/(.*$)")},query_urls:{profile:"{PROTOCOL}://{DOMAIN}/{INPUB}/{NAME}"},offsets:{x:-40,y:10,y_bot:0},popup_padding:{x:20,y:40},link_url:"http://www.linkedin.com",in_btn_url:"{PROTOCOL}://{DOMAIN}/img/icon/icon_company_insider_in_12x12.gif",protocol:"http",overrides:{domain:"www.linkedin.com",img_domain:"static.linkedin.com",tracking_domain:"www.linkedin.com"}};
LinkedIn.Badges.Util={generateId_counter:0,generateId:function(){return"linkedin_badge_gen_"+(LinkedIn.Badges.Util.generateId_counter++);},getIFrame:function(insert){id=LinkedIn.Badges.Util.generateId();try{iframe=document.createElement('<iframe allowtransparency=true frameborder="0">');}catch(e){iframe=document.createElement("iframe");
}iframe.id=id;iframe.style.position="absolute";iframe.style.border=0;iframe.style.overflow="hidden";iframe.style.backgroundColor="transparent";iframe.name=id;insert.parentNode.insertBefore(iframe,insert);return iframe;},resizeIFrame:function(type,id,args){frame=document.getElementById(id);if(!frame){return ;
}width=args[0];height=args[1];frame.style.width=width+"px";frame.style.height=height+"px";},generateUUID:(function(){uuid_chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";return function(len){var uuid=[],i;if(len){for(var i=0;i<len;i++){uuid[i]=uuid_chars[0|Math.random()*62];}return uuid.join("");
}else{return LinkedIn.Badges.Util.generateUUID(32);}};})(),addListener:function(ele,type,fn){if(window.addEventListener){ele.addEventListener(type,fn,false);}else{ele.attachEvent("on"+type,fn);}return true;},stopPropagation:function(e){if(!e){var e=window.event;}e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();
}},preventDefault:function(e){try{e.preventDefault();}catch(exception){e.returnValue=false;}return false;},hasClass:function(ele,className){return getClassNameRegex(className).test(ele.className);},removeClass:function(ele,className){return ele.className.replace(getClassNameRegex(className),"");},addClass:function(ele,className){if(!LinkedIn.Badges.Util.hasClass(ele,className)){ele.className=[ele.className,className].join(" ");
}}};getClassNameRegex=function(className){return new RegExp(("(^|\\s)"+className+"(\\s|$)"),"i");};getViewportWidth=function(){return self["innerWidth"]||(document.documentElement["clientWidth"]||document.body["clientWidth"]);};getViewportHeight=function(){return self["innerHeight"]||(document.documentElement["clientHeight"]||document.body["clientHeight"]);
};var getXY=function(e){return(typeof (e.pageX)!="undefined")?[e.pageX,e.pageY]:[e.clientX+document.body.scrollLeft,e.clientY+document.body.scrollTop];};var getElementsByClassName=function(className,tag,elm){if(document.getElementsByClassName){getElementsByClassName=function(className,tag,elm){elm=elm||document;
var elements=elm.getElementsByClassName(className),nodeName=(tag)?new RegExp("\\b"+tag+"\\b","i"):null,returnElements=[],current;for(var i=0,il=elements.length;i<il;i+=1){current=elements[i];if(!nodeName||nodeName.test(current.nodeName)){returnElements.push(current);}}return returnElements;};}else{if(document.evaluate){getElementsByClassName=function(className,tag,elm){tag=tag||"*";
elm=elm||document;var classes=className.split(" "),classesToCheck="",xhtmlNamespace="http://www.w3.org/1999/xhtml",namespaceResolver=(document.documentElement.namespaceURI===xhtmlNamespace)?xhtmlNamespace:null,returnElements=[],elements,node;for(var j=0,jl=classes.length;j<jl;j+=1){classesToCheck+="[contains(concat(' ', @class, ' '), ' "+classes[j]+" ')]";
}try{elements=document.evaluate(".//"+tag+classesToCheck,elm,namespaceResolver,0,null);}catch(e){elements=document.evaluate(".//"+tag+classesToCheck,elm,null,0,null);}while((node=elements.iterateNext())){returnElements.push(node);}return returnElements;};}else{getElementsByClassName=function(className,tag,elm){tag=tag||"*";
elm=elm||document;var classes=className.split(" "),classesToCheck=[],elements=(tag==="*"&&elm.all)?elm.all:elm.getElementsByTagName(tag),current,returnElements=[],match;for(var k=0,kl=classes.length;k<kl;k+=1){classesToCheck.push(new RegExp("(^|\\s)"+classes[k]+"(\\s|$)"));}for(var l=0,ll=elements.length;
l<ll;l+=1){current=elements[l];match=false;for(var m=0,ml=classesToCheck.length;m<ml;m+=1){match=classesToCheck[m].test(current.className);if(!match){break;}}if(match){returnElements.push(current);}}return returnElements;};}}return getElementsByClassName(className,tag,elm);};var bindReady=(function(){var isReady=false;
var readyBound=false;var userAgent=navigator.userAgent.toLowerCase();var browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};
var ready=function(fn){if(isReady){return ;}isReady=true;fn.apply(window);};var bindReady=function(fn){if(isReady){return fn.apply(window);}if(readyBound){return window.setTimeout(function(){bindReady(fn);},0);}readyBound=true;if(document.addEventListener&&!browser.opera){document.addEventListener("DOMContentLoaded",function(){ready(fn);
},false);}if(browser.msie&&window==top){(function(){if(isReady){return ready(fn);}try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return ;}ready(fn);})();}if(browser.opera){document.addEventListener("DOMContentLoaded",function(){if(isReady){return ;}for(var i=0;
i<document.styleSheets.length;i++){if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return ;}}ready(fn);},false);}if(browser.safari){var numStyles;(function(){if(isReady){return ;}if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return ;
}if(numStyles===undefined){numStyles=(function(){var nodes=document.getElementsByTagName("style");var res=[];var nodes_len=nodes.length;for(var i=0;i<nodes_len;nodes++){if(nodes[i].rel=="stylesheet"){res.push(nodes[i]);}}return res;}).length;}if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);
return ;}ready(fn);})();}LinkedIn.Badges.Util.addListener(window,"load",function(){ready(fn);});};return bindReady;})();bindReady(function(){if(!LinkedIn.Badges.Config.acts_as_widget){gadgets.rpc.register("resize_profileiframe",LinkedIn.Badges.ProfilePopup.resizeFrame);gadgets.rpc.register("reposition_profileiframe",LinkedIn.Badges.ProfilePopup.repositionFrame);
gadgets.rpc.register("close_profileiframe",LinkedIn.Badges.hideAllPopups);LinkedIn.Badges.init();}});LinkedIn.Badges.Util.addListener(window,"load",function(){if(!LinkedIn.Badges.Config.acts_as_widget){return ;}node=document.getElementById("pprofile");params=gadgets.util.getUrlParameters();if(window!=window.top){window.name=params.rpcname;
width=0;height=0;if(params.x){width=LinkedIn.Badges.Config.popup_padding.x;height=LinkedIn.Badges.Config.popup_padding.y;LinkedIn.Badges.ProfilePopup.addChrome(node);}height=height+Math.max(node.offsetHeight,node.scrollHeight);width=width+Math.max(node.offsetWidth,node.scrollWidth);gadgets.rpc.setRelayUrl("..",unescape(params.trk)+"?rseed="+Math.floor(Math.random()*1000000001)+"#liwidgetmode=true");
gadgets.rpc.call("..","resize_profileiframe",null,[width,height]);if(!params.x){return ;}x=params.x*1;y=params.y*1;vx=params.vx;vy=params.vy;if(x+width+LinkedIn.Badges.Config.popup_padding.x>vx&&x-width-LinkedIn.Badges.Config.popup_padding.x>0){x=x-width-LinkedIn.Badges.Config.offsets.x;LinkedIn.Badges.Util.addClass(node,"carat-right");
}else{x=x+LinkedIn.Badges.Config.offsets.x;LinkedIn.Badges.Util.addClass(node,"carat-left");}if(y+height+LinkedIn.Badges.Config.popup_padding.y>vy&&y-height-LinkedIn.Badges.Config.popup_padding.y>0){y=y-height-LinkedIn.Badges.Config.offsets.y_bot;LinkedIn.Badges.Util.addClass(node,"carat-bottom");}else{y=y+LinkedIn.Badges.Config.offsets.y;
LinkedIn.Badges.Util.addClass(node,"carat-top");}gadgets.rpc.call("..","reposition_profileiframe",null,[x,y]);}});if(window.location.href.indexOf("#liwidgetmode=true")!=-1){var url=window.location.href,isIE=
/*@cc_on!@*/
false,hashParams,targetFrame,receive;if(isIE){url=url.substr(url.indexOf("#liwidgetmode=true")+18);
url=url.replace(/#/g,"");hashParams=url.split("&");}else{url=unescape(url.replace(/#liwidgetmode=true/,""));hashParams=url.substr(url.indexOf("#")+1).split("&");}try{targetFrame=(hashParams[0]==="..")?parent.parent:parent.frames[hashParams[0]];receive=targetFrame.gadgets.rpc.receive;}catch(e){}receive&&receive(hashParams);
try{window.stop();}catch(e){}try{document.execCommand("Stop");}catch(e){}}})();
