function newsModel(n,r,u){n.news={};n.uwlimit=9;n.Load=function(){var r=geturi("News");u({method:"GET",url:r}).success(function(r){var u=[],f=0;$.each(r,function(n,r){if(r.logo=r.logo===null?"<span class='logo_tic'>"+r.logoticker+"<\/span>":"<img src='"+r.logo+"' alt='"+r.logoticker+"'>",(r.logo.indexOf(r.logoticker+"_logo.")>-1||r.logo.indexOf("<span class='logo_tic'>")>-1)&&(r.logo="<a href='/Profile/"+r.logoticker+"'>"+r.logo+"<\/a>"),r.summary.indexOf("[")>-1&&r.summary.indexOf("]")>-1){var s=r.summary.split(""),e=0,o=0;for(i=0;i<s.length;i++)s[i]==="["&&(e=i),s[i]==="]"&&(o=i),e>0&&o>0&&(u[f]=r.summary.substring(e,o+1),f+=1,e=0,o=0);for(t=0;t<u.length;t++)r.summary=r.summary.replace(u[t],linktoprofile(u[t]))}u=[];f=0});n.news=r})};n.Load();n.all=function(){n.uwlimit===12?(n.uwlimit=9,$(".all").text("See More"),$(".ipo-marketwatch-signup-banner-inner").get(0).scrollIntoView()):(n.uwlimit=12,$(".all").text("See Less"))}}function linktoprofile(n){var t=n.replace("[","").replace("]","").toUpperCase();return"<a class='profilelink' href='/Profile/"+t+"'>"+t+"<\/a>"}var app=angular.module("myApp",["ngSanitize"]);app.controller("newsModel",newsModel);newsModel.$inject=["$scope","$sce","$http"]