Type.registerNamespace("MySpace.UI.Pages");MySpace.UI.Pages.resizeObjects=function(C){if(!C||C.nodeType!==1){return}var G=C.getElementsByTagName("OBJECT");if(G.length>0){for(var D=0;D<G.length;D++){var F=G[D].parentNode;if(F.clientWidth<1){continue}var E=F.clientWidth;var B=1;while((F&&F.className&&F.className.indexOf("autoResize")===-1)&&(B<10)){F=F.parentNode;E=F.clientWidth;B++}if(H===0){continue}var H=G[D].height;var A=G[D].width;if((!G[D]._ratio)&&(!G[D]._origWidth)){if((H!==0)&&(A!==0)){G[D]._ratio=(MySpace.UI.Pages.isValidPercent(A))?((E*(parseInt(A)/100))/H):(A/H);G[D]._origWidth=A}}if(G[D]._ratio===0){continue}if(MySpace.UI.Pages.isValidPercent(G[D]._origWidth)){G[D].height=(E*(parseInt(A)/100))/G[D]._ratio}else{if(!isNaN(G[D]._origWidth)){if(G[D]._origWidth>=E){G[D].height=E/G[D]._ratio;G[D].width=E}else{if(G[D]._origWidth!==G[D].width){G[D].height=G[D]._origWidth/G[D]._ratio;G[D].width=G[D]._origWidth}}}}}}};MySpace.UI.Pages.isValidPercent=function(B){var A=parseInt(B);return((B.lastIndexOf("%")===(B.length-1))&&(!isNaN(A))&&(A>0&&A<=100))};Type.registerNamespace("MySpace.UI.Pages");MySpace.UI.Pages._Data=function(){MySpace.UI.Pages._Data.initializeBase(this)};MySpace.UI.Pages._Data.prototype={_maxRetries:5,_retryDelay:100,request:function(B,C,H,A,F,E,G){var D=new Sys.Net.WebRequest();if(A){D.set_body(A)}if(F){for(i=0;i<F.length;i++){D.get_headers()[F[i].key]=F[i].value}}if(MySpace.UI.Pages.HashMashter){D.get_headers()["Hash"]=MySpace.UI.Pages.HashMashter}if(MySpace.UI.Pages.CurrentPageId){D.get_headers()["PageId"]=MySpace.UI.Pages.CurrentPageId}D.set_url(String.format("/Modules/PageEditor/Handlers/{0}/{1}",MySpace.UI.Pages.WebModule,B));D.set_httpVerb(G||"POST");D.set_userContext(C);E=E||{retryCount:0,url:B};D.add_completed(Function.createDelegate(this,function(J,K){if(J.getResponseHeader("Retry")&&E.retryCount<this._maxRetries){E.retryCount++;var I=this;setTimeout(function(){I.request(E.url+(E.url.indexOf("?")>0?"&":"?")+"retry="+E.retryCount,C,H,A,F,E)},I._retryDelay);return}if(H){H.apply(this,arguments)}}));D.invoke()}};MySpace.UI.Pages.Data=new MySpace.UI.Pages._Data();(function(A){MySpace._GenericCommentsControls&&A.each(MySpace._GenericCommentsControls,function(){var L=this,H=L.maxEntries+1,C=A("#genericComments"+L.uniqueId),K=A("ul.moduleList",C),B=A("a.moreComments",C);L.pagingContext.CurrentPageNumber=1;B.click(F);C.delegate(".deleteComment","click",D);A(document).bind("quickPost.posted",E);function F(M){M.preventDefault();L.pagingContext.CurrentPageNumber++;I("RenderComments",{startIndex:H,maxEntries:L.maxEntries,pagingContext:L.pagingContext},G)}function G(M){var N=A(M.html);K.append(N);H+=L.maxEntries;L.pagingContext.ReferringPageNumber++;L.pagingContext.FirstRecordInPreviousPage=N[0].id.split("_")[5];L.pagingContext.LastRecordInPreviousPage=N[N.length-1].id.split("_")[5];L.totalComments=M.totalComments;J()}function D(M){M.preventDefault();if(!confirm(MySpaceRes.UserPage.AreYouSureYouWantToDeleteComment)){return}var O=A(this).parents(".moduleList > li"),N=O.attr("id").split("_");I("DeleteComment",{commentId:N[5],authorId:N[6]},function(){O.remove();L.totalComments--;J()})}function E(M,O){if(!(L.commentType==O.commentType&&L.ownerId==O.ownerId&&L.resourceId==O.resourceId&&(!L.extendedResourceId||L.extendedResourceId==O.extendedResourceId)&&(!L.videoReleaseId||L.videoReleaseId==O.videoReleaseId))){return}var N=A('<div class="userComment">').append(A("<div>",{"class":"autoResize comment",html:O.result.comment})).append(A("<p>",{"class":"datePosted",html:O.result.postedDate})).append('<div class="clear">');A('<li class="odd">').append(A("<div>",{"class":"user",html:O.result.profileImageLink})).append(N).prependTo(K);L.totalComments++;J()}function J(){A("> li:odd",K).filter(".odd").removeClass("odd").addClass("even");A("> li:even",K).filter(".even").removeClass("even").addClass("odd");A("> li.last",K).removeClass("last");A("> li:last",K).addClass("last");var M=A("> li",K).length;A("span.cnt",B).text(String.format("{0} of {1}",M,L.totalComments));B.css("display",M<L.totalComments?"":"none")}function I(M,N,P){var O={commentType:L.commentType,ownerId:L.ownerId,resourceId:L.resourceId,extendedResourceId:L.extendedResourceId,videoReleaseId:L.videoReleaseId};A.extend(O,N);MySpace.Net.asmx({servicePath:"/Modules/Common/Services/GenericComments.asmx",methodName:M,params:O,onSuccess:P,onFailure:function(){alert(MySpaceRes.Header.ErrorMessage.replace(/<br[^>]*>/ig,"\n"))}})}Type.registerNamespace("MySpace.UI.Comments");MySpace.UI.Comments.reload=function(N){K.empty();A.extend(L,N);H=L.maxEntries+1;I("RenderComments",{startIndex:1,maxEntries:L.maxEntries,pagingContext:L.pagingContext},G);var M=MySpace._GenericCommentsQP["qp"+L.uniqueId];M.reset();M.set_webServiceParams({commentType:N.commentType,ownerId:N.ownerId,resourceId:N.resourceId,extendedResourceId:N.extendedResourceId,videoReleaseId:N.videoReleaseId})}})})(jQuery);(function(B){B("a.addComment").click(MySpace.UI.ProfileCommentQuickPostPopup.show);var A=$q("li.suggestFriend a");if(A.length>0){A[0].style.visibility="visible";$addHandler(A[0],"click",function(C){if(!C.target.popper){var D=new MySpace.UI.Popup.IFrameContent(A[0].innerHTML,784,A[0].href,"friendSuggestionPopupContainer");window.friendSuggestionPopup=D.get_popup();C.target.popper=D;D.show()}else{C.target.popper.show()}if(C.preventDefault){C.preventDefault()}else{C.returnValue=false}})}})(jQuery);Sys.Application.add_init(function(){if(!MySpace.Application.keyDisabled("DWBeaconAppClicks")){}});Type.registerNamespace("MySpace.UI.Profiles.Stream");MySpace.UI.Profiles.Stream.SetInlineVideoDefaultWidth=function(){var A=$q(".activityStreamModule,.activityMedia",null,true);if(A){var B=MySpace.UI.getContentBox(A);if(B.w<=0&&Sys.Browser.agent==Sys.Browser.InternetExplorer){B.w=A.offsetWidth-18}MySpace.UI.InlineVideoMetadata.DefaultWidth=B.w||MySpace.UI.InlineVideoMetadata.DefaultWidth}};Type.registerNamespace("MySpace.UI.Stream");MySpace.UI.Stream.Initialize=function(){if(MySpace.UI.Home.StatusMoodEditor){MySpace.UI.Home.StatusMoodEditor.Instance.add_saved(MySpace.UI.Stream.AddStatusMood)}if(MySpace.UI._ProfileImageLink){MySpace.UI._ProfileImageLink.load()}if(MySpace.UI.Stream.Pivots.Instance){if(MySpace.UI.Stream.Pivots.Instance.get_clientCache()){MySpace.UI.Stream.Pivots.Instance.sendRequest()}}};MySpace.UI.Stream.AddStatusMood=function(B,A){if(MySpace.UI.Stream.Pivots.Instance){var C=MySpace.UI.Stream.Pivots.Instance.get_filter();var D=MySpace.UI.Stream.Pivots.Instance.get_source();if((C==MySpace.UI.Stream.Pivot.All||C==MySpace.UI.Stream.Pivot.Status)&&(D==MySpace.UI.Stream.FriendCategory.All||D==MySpace.UI.Stream.FriendCategory.Me)){MySpace.UI.Stream.AddItems(A.activityHtml)}}else{MySpace.UI.Stream.AddItems(A.activityHtml)}};MySpace.UI.Stream.AddItems=function(J){var E=$q(".activityStreamModule .activitiesContainer",null,true);if(!E){var R=$q(".activityStreamModule .noActivities",null,true);if(R){E=document.createElement("ol");E.className="moduleList clearfix activitiesContainer";R.parentNode.insertBefore(E,R)}else{if(!MySpace.UI.Pages.Modules){return}for(var L=0;L<MySpace.UI.Pages.Modules.length;L++){var A=MySpace.UI.Pages.Modules[L];if(A.typeId==23){var D;Array.forEach(MySpace.UI.Pages.ModuleMetaData,function(S){if(S.typeId==A.typeId){D=S}});if(!D){return}var G=$create(MySpace.UI.Pages.Module,{uid:A.id,targetId:A.targetId,name:D.name,typeid:A.typeId,element:$get("module"+(A.id!=0?A.id:D.name)),runScripts:true});G.loadContent();return}}return}}var I=document.createElement("div");var B=document.createElement("div");var H=[];I.innerHTML=J;var Q=E.firstChild;var F;while(I.firstChild){F=I.firstChild;if(F.nodeName.toLowerCase()=="script"){B.appendChild(F)}else{E.insertBefore(F,Q);if(F.nodeType==1){H.push(F)}}}var P=$q(".activityItem",E);for(var M=0;M<P.length;M++){Sys.UI.DomElement.removeCssClass(P[M],"odd");Sys.UI.DomElement.removeCssClass(P[M],"even");if(M==0){Sys.UI.DomElement.addCssClass(P[M],"first")}else{Sys.UI.DomElement.removeCssClass(P[M],"first")}Sys.UI.DomElement.addCssClass(P[M],M%2==0?"odd":"even")}var K=$create(MySpace.UI.Pages.Control,{element:B});K._executeScripts();while(H.length>0){var C=H.pop();if(MySpace.UI.ReShare){MySpace.UI.ReShare.wire(function(){MySpace.UI.Stream.Pivots.Instance.sendRequest()},C)}if(MySpace.UI.InlineVideo){var N=$q(".activityBody .Video .thumbnailImage",C,true);if(N){var O=N.className.split(" ");if(O.length>1){MySpace.UI.InlineVideo.attach(null,O[1])}}}MySpace.UI.Stream.WireDelete(C)}};MySpace.UI.Stream.WireDelete=function(D){var F=MySpace.UI.Stream.DeleteHash;if(!F){return}var E=D||$q(".activityStreamModule .activitiesContainer",null,true);if(E){var C=$q(".delete",E,false);for(var B in C){var A=C[B];var G=A.id;A.onclick=function(){var I=this;var J=new Array();J=I.id.split("-");var M=J[0].substring(8);var K=J[1];var H=window.deleteActivityPopup;if(!H){var L=document.createElement("div");L.appendChild(document.createTextNode(MySpace.UI.Stream.Text.DeleteStatusMoodUpdate));H=window.deleteActivityPopup=MySpace.UI.Popup.create(L,MySpace.UI.Stream.Text.ConfirmDelete);H.set_top(200);H.set_width(500);H.set_parent(this)}else{H.remove_buttons()}H.add_button(MySpace.UI.Stream.Text.Yes,false,function(){Sys.Net.WebServiceProxy.invoke("/modules/friends/services/FriendsService.asmx","DeleteStatusMoodWithTicks",false,{userId:MySpace.ClientContext.UserId,timeTick:M,token:F},function(){I.parentNode.style.display="none";H._hide();Sys.UI.DomElement.removeCssClass(H._box.childNodes[2],"deleteProcessing")},function(){H._hide()});Sys.UI.DomElement.addCssClass(H._box.childNodes[2],"deleteProcessing")});H.add_button(MySpace.UI.Stream.Text.No,false,function(){H._hide()});H.show();MySpace.UI.Stream.ActivityClickTracking(K,MySpace.UI.Stream.EventIdEnum.ActivityDelete)}}}};MySpace.UI.Stream.EventIdEnum={ActivityDelete:401,CommentDelete:402,CommentAdd:403,ReShare:404,InlineVideo:405};MySpace.UI.Stream.ActivityClickTracking=function(C,B){if(MySpace.UI.ACTP&&MySpace.Beacon&&C){var A=MySpace.UI.ACTP[C];if(A){var D={eventid:B,raised_activity:A.ActivityType,oid:A.ActivityObjectID,parent_oid:A.ActivityParentID,raise_ts:A.CreationDate,init_uid:A.InitiatorUserID,display_context:A.ActivityDisplayClientID};MySpace.Beacon.Request(D)}}};MySpace.UI.Stream.wire=function(){if(MySpace.UI.InlineComment){MySpace.UI.InlineComment.wire()}if(MySpace.UI.InlineVideoMetadata&&MySpace.UI.InlineVideoMetadata.RegisteredControls&&MySpace.UI.InlineVideoMetadata.RegisteredControls.length>0){MySpace.UI.InlineVideo.wire(MySpace.UI.InlineVideoMetadata.DefaultWidth)}MySpace.UI.Stream.WireDelete();if(MySpace.UI.ReShare){var A=function(){if(MySpace.UI.Stream.Pivots&&MySpace.UI.Stream.Pivots.Instance){MySpace.UI.Stream.Pivots.Instance.sendRequest()}};MySpace.UI.ReShare.wire(A)}if(MySpace.UI.Pages.Activity){MySpace.UI.Pages.Activity.WireSponsored()}if(MySpace.UI.Home&&MySpace.UI.Home.Events){MySpace.UI.Home.Events.WireWalmartClickTracking()}};Type.registerNamespace("MySpace.UI");MySpace.UI.HorizontalMenu=function(A){MySpace.UI.HorizontalMenu.initializeBase(this,[A])};MySpace.UI.HorizontalMenu.prototype={_items:null,_selectedItem:null,_selectedIndex:null,_hasDropdown:null,_dropdown:null,_dropdownItems:null,_dropdownTitle:null,_dropdownList:null,_links:null,initialize:function(){this._items=$q("li",this._element);this._links=$q("li>a",this._element);this._selectedItem=$q("li.selected",this._element,true);this._hasDropdown=false;this._dropdownItems=0;this.resize();this.wire();this._element.style.overflow="visible";MySpace.UI.HorizontalMenu.callBaseMethod(this,"initialize")},wire:function(){for(var A=0;A<this._links.length;A++){$addHandler(this._links[A],"click",Function.createDelegate(this,this.itemClick))}},itemClick:function(A){A.preventDefault();this.selectItem(A.target.parentNode)},selectItem:function(A){if(this._selectedItem!=null){Sys.UI.DomElement.removeCssClass(this._selectedItem,"selected")}this._selectedItem=A;Sys.UI.DomElement.addCssClass(this._selectedItem,"selected");this._selectedIndex=this.itemIndex(this._selectedItem);if(this._selectedIndex>=this._items.length-this._dropdownItems){Sys.UI.DomElement.addCssClass(this._dropdown,"selectedDropdown");this._dropdownTitle.innerHTML=$q("a",this._selectedItem,true).innerHTML}else{if(this._dropdown!=null){Sys.UI.DomElement.removeCssClass(this._dropdown,"selectedDropdown");this._dropdownTitle.innerHTML=MySpaceRes.ProfileDisplayV3.More}}},itemIndex:function(B){for(var A=0;A<this._items.length;A++){if(this._items[A]==B){return A}}return -1},resize:function(){var C=Sys.UI.DomElement.getBounds(this._items[0]);var B=this._dropdownItems==0?this._items[this._items.length-1]:this._dropdown;var A=Sys.UI.DomElement.getBounds(B);if(A.y==C.y){while(A.y==C.y&&this._dropdownItems>0){this.removeFromDropdown(this._items[this._items.length-this._dropdownItems]);A=Sys.UI.DomElement.getBounds(B)}A=Sys.UI.DomElement.getBounds(B);if(this._dropdownItems==0){this.removeDropdown()}else{if(A.y!=C.y){this.addToDropdown(this._items[this._items.length-1-this._dropdownItems])}}}else{this.showDropdown();while(this._dropdownItems<this._items.length-1){A=Sys.UI.DomElement.getBounds(this._dropdown);if(A.y==C.y){break}this.addToDropdown(this._items[this._items.length-1-this._dropdownItems])}this._dropdownTitle.style.width=""}this.selectItem(this._selectedItem)},createDropdown:function(){if(this._dropdown!=null){return}this._dropdown=document.createElement("li");this._dropdownTitle=document.createElement("span");this._dropdownTitle.innerHTML=MySpaceRes.ProfileDisplayV3.More;this._dropdown.appendChild(this._dropdownTitle);var C=document.createElement("small");C.innerHTML="▼";this._dropdown.appendChild(C);this._dropdownList=document.createElement("ol");this._dropdown.appendChild(this._dropdownList);this._element.appendChild(this._dropdown);Sys.UI.DomElement.addCssClass(this._dropdown,"dropdown");var B=Sys.UI.DomElement.getBounds(this._dropdownTitle).width;for(var A=0;A<this._items.length;A++){var D=Sys.UI.DomElement.getBounds(this._items[A]);if(D.width>B){B=D.width}}this._dropdownTitle.style.width=B+"px"},removeDropdown:function(){if(this._dropdownItems>0||this._dropdown==null){return}this._element.removeChild(this._dropdown);this._dropdown=null},showDropdown:function(){if(this._dropdown==null){this.createDropdown()}this._dropdown.style.display="block"},addToDropdown:function(A){this._element.removeChild(A);if(this._dropdownitems==0){this._dropdownList.appendChild(A)}else{this._dropdownList.insertBefore(A,this._dropdownList.firstChild)}this._dropdownItems++},removeFromDropdown:function(A){this._dropdownList.removeChild(A);this._element.insertBefore(A,this._dropdown);this._dropdownItems--}};MySpace.UI.HorizontalMenu.registerClass("MySpace.UI.HorizontalMenu",Sys.UI.Control);Type.registerNamespace("MySpace.UI.Stream");if(!MySpace.UI.Stream.TimeDiff){MySpace.UI.Stream.TimeDiff=new Date()-new Date(MySpace.UI.Stream.CurrentTime)}MySpace.UI.Stream.Pivots=function(){MySpace.UI.Stream.Pivots.initializeBase(this)};MySpace.UI.Stream.Pivots.prototype={_streamModule:null,_pivotsContainer:null,_streamContainer:null,_sourceMenu:null,_totalFeaturedItems:0,_currentSource:null,_currentFilter:null,_currentFilterType:"All",_currentFilterItem:null,_requestingData:false,_waitingImage:null,_menu:null,_viewMoreEl:null,_urlCreateFriendCategory:"",_urlStandaloneStream:"",_datahandler:"RenderUnifiedActivities.ashx",_userId:0,_clientCache:false,_checkInterval:120000,_deltaDate:null,_enableUpdates:false,_timeoutId:0,_activitiesContainer:null,_lastRefreshDate:null,_updateContainer:null,get_requestScripts:function(){if(this._currentFilter===MySpace.UI.Stream.Pivot.Bulletins){return true}return false},get_requestClientResources:function(){return typeof(MySpaceRes.Comment)==="undefined"},get_streamModule:function(){return this._streamModule},set_streamModule:function(A){this._streamModule=A},get_filter:function(){return this._currentFilter},set_filter:function(A){this._currentFilter=A},get_source:function(){return this._currentSource},set_source:function(A){this._currentSource=A},get_urlcreatefriendcategory:function(){return this._urlCreateFriendCategory},set_urlcreatefriendcategory:function(A){this._urlCreateFriendCategory=A},get_urlstandalonestream:function(){return this._urlStandaloneStream},set_urlstandalonestream:function(A){this._urlStandaloneStream=A},get_datahandler:function(){return this._datahandler},set_datahandler:function(A){this._datahandler=A||this._datahandler},get_userId:function(){return this._userId},set_userId:function(A){this._userId=A},get_clientCache:function(){return this._clientCache},set_clientCache:function(A){this._clientCache=A},get_checkInterval:function(){return this._checkInterval},set_checkInterval:function(A){this._checkInterval=A},get_enableUpdates:function(){return this._enableUpdates},set_enableUpdates:function(A){this._enableUpdates=A},add_render:function(B){if(B){if(typeof B==="string"){var A=this._parseHander(B);if(!A.methodName){return}B=function(D,C){A.instance[A.methodName](D,C)}}this.get_events().addHandler("render",B)}},remove_render:function(A){this.get_events().removeHandler("render",A)},add_afterPivotClicked:function(B){if(B){if(typeof B==="string"){var A=this._parseHander(B);if(!A.methodName){return}B=function(D,C){A.instance[A.methodName](D,C)}}this.get_events().addHandler("afterPivotClicked",B)}},remove_afterPivotClicked:function(A){this.get_events().removeHandler("afterPivotClicked",A)},_parseHander:function(C){var D=C.split(".");var E,A=window;for(var B=0;B<D.length;B++){if(B==D.length-1){E=D[B]}else{if(A[D[B]]){A=A[D[B]]}else{break}}}return{methodName:E,instance:A}},initialize:function(){MySpace.UI.Stream.Pivots.callBaseMethod(this,"initialize");this._streamModule=this._streamModule||$q(".activityStreamModule",null,true);this._streamContainer=$q(".streamContainer",this._streamModule,true);this._pivotsContainer=$q(".pivotsContainer",this._streamModule,true);this._toolBarEl=$q(".toolbar",this._streamModule,false);this._viewMoreEl=$q(".viewAllAnchor",this._streamModule,true);this._activitiesContainer=$q(".activitiesContainer",this._streamModule,true);this._updateContainer=$q(".updateContainer",this._streamModule,true);this._totalFeaturedItems=this.totalFeaturedItems;this._sourceMenu=$q("select",this._pivotsContainer,true);var A=$q(".horizontalMenu",this._pivotsContainer,true);this._menu=$create(MySpace.UI.HorizontalMenu,{},null,null,A);this._currentFilterItem=this._menu._selectedItem;this._currentFilterType=this.getFilterType(this._currentFilter);this.wire();this.render()},render:function(){this.resetSourceMenu();this.wirePostBulletinLink();this.createViewMoreLink()},raiseRender:function(){var A=this.get_events().getHandler("render");if(A){A(this,Sys.EventArgs.Empty)}if(!this._clientCache){MySpace.UI.Stream.wire()}},createViewMoreLink:function(){var A=this.get_urlstandalonestream();if(this._viewMoreEl&&A){if(A.indexOf("?")==-1){this._viewMoreEl.href=String.format("{0}/{1}",A,this._currentFilterType.toLowerCase())}else{this._viewMoreEl.href=String.format("{0}&f={1}&s={2}",A,this._currentFilter,this._currentSource)}}},dispose:function(){this._streamModule=null;this._pivotsContainer=null;this._streamContainer=null;this._activitiesContainer=null;this._updateContainer=null;this._sourceMenu=null;this._filterList=null;this._filterListItems=null;this._waitingImage=null;this._menu=null;this._viewMoreEl=null},wire:function(){var B=this;var A=$q("li a",this._pivotsContainer,false);Array.forEach(A,function(C){C.onclick=function(){B.executeFilter(this);return false}});if(this._enableUpdates&&this._checkInterval>0){this.startUpdateTimer()}if(this._sourceMenu){this._sourceMenu.onchange=function(){B.executeFilter()}}},executeFilter:function(B){if(this._requestingData===true){if(typeof(B)!="undefined"){this._menu.selectItem(this._currentFilterItem)}return}this._requestingData=true;if(this._sourceMenu&&this._sourceMenu.value==="-1"){document.location.href=this.get_urlcreatefriendcategory()}else{this.wait();if(typeof B==="undefined"&&this._sourceMenu){this._currentSource=this._sourceMenu.value}else{this._currentFilter=this.getDataFilter(B);this._currentFilterType=this.getFilterType(this._currentFilter);this._currentFilterItem=B.parentNode}if(!MySpace.Application.keyDisabled("DWBeaconStreamFilters")&&MySpace.Beacon){var A=this._currentSource<0?-1:this._currentSource;MySpace.Beacon.Request({ustype:this._currentFilter,ussource:A})}this.sendRequest()}},wait:function(){this._streamContainer.innerHTML="";Sys.UI.DomElement.addCssClass(this._streamContainer,"loading");if(this._toolBarEl){Array.forEach(this._toolBarEl,function(A){A.style.display="none"})}},unWait:function(){if(this._toolBarEl){Array.forEach(this._toolBarEl,function(A){A.style.display=""})}Sys.UI.DomElement.removeCssClass(this._streamContainer,"loading")},sendRequest:function(){if(this._enableUpdates&&this._checkInterval>0){this.stopUpdateTimer()}if(this._clientCache===true){MySpace.UI.Pages.Data.request(String.format("GetActivityBase.ashx?uid={0}&f={1}&s={2}&sc={3}&r={4}",MySpace.ClientContext.UserId,this._currentFilter,this._currentSource,this.get_requestScripts(),this.get_requestClientResources()),null,Function.createDelegate(this,this.handleActivityBaseResponse),null,null,null,"GET")}else{MySpace.UI.Pages.Data.request(this.get_datahandler(),this,this.handleResponse,String.format("f={0}&s={1}&sc={2}&r={3}&userId={4}",this._currentFilter,this._currentSource,this.get_requestScripts(),this.get_requestClientResources(),this._userId))}},handleActivityBaseResponse:function(A){var B=Sys.Serialization.JavaScriptSerializer.deserialize(A.get_responseData());this._activityBaseData=B.activities;this._streamContainer.innerHTML=B.activities;this.executeScripts(this._streamContainer);var E=[];if(MySpace.UI.InlineCommentMetadata){for(var C=0;C<MySpace.UI.InlineCommentMetadata.RegisteredControls.length;C++){E.push(MySpace.UI.InlineCommentMetadata.RegisteredControls[C].cid+"|"+MySpace.UI.InlineCommentMetadata.RegisteredControls[C].aid+"|"+MySpace.UI.InlineCommentMetadata.RegisteredControls[C].ud)}}var D=new Date(new Date(B.cacheDate).valueOf()+MySpace.UI.Stream.TimeDiff);if(new Date()-D>15000){MySpace.UI.Pages.Data.request("GetActivityDelta.ashx",this,this.handleResponse,String.format("f={0}&s={1}&sc={2}&r={3}&cacheDate={4}&cid={5}",this._currentFilter,this._currentSource,this.get_requestScripts(),this.get_requestClientResources(),B.cacheDate,E))}else{this.unWait();this.wireActivities();MySpace.UI.Stream.wire();this._requestingData=false}},handleResponse:function(I,H){var G=I.get_webRequest().get_userContext();try{if(I.get_responseAvailable()){var J=I.get_responseData();G.unWait();if(G._clientCache===true){var A=Sys.Serialization.JavaScriptSerializer.deserialize(J);G._streamContainer.innerHTML=A.deltaActivities+G._activityBaseData;for(var C in A.deltaComments){var E=$get(C);if(E){E.innerHTML=A.deltaComments[C]}}var B=$q(".activityItem",G._streamContainer,false);for(var D=0;D<B.length;D++){Sys.UI.DomElement.removeCssClass(B[D],"first");Sys.UI.DomElement.removeCssClass(B[D],"odd");Sys.UI.DomElement.removeCssClass(B[D],"even");if(D==0&&D%2==0){Sys.UI.DomElement.addCssClass(B[D],"odd first")}else{if(D%2==0){Sys.UI.DomElement.addCssClass(B[D],"odd")}else{Sys.UI.DomElement.addCssClass(B[D],"even")}}}}else{var F=Sys.Serialization.JavaScriptSerializer.deserialize(J);G._streamContainer.innerHTML=F.activities;G._lastRefreshDate=F.lastRefreshDate;if(G._enableUpdates&&G._checkInterval>0){G.showUpdateCount(false)}}G.clearMetaData();G.wireActivities()}}finally{MySpace.UI.Stream.wire();G._requestingData=false}},wireActivities:function(){var A=this.executeScripts(this._streamContainer);if(this._currentFilter==MySpace.UI.Stream.Pivot.Bulletins){this.wirePostBulletinLink()}this.wireBeaconTrack();this.createViewMoreLink();this.raiseAfterPivotClicked()},raiseAfterPivotClicked:function(){var A=this.get_events().getHandler("afterPivotClicked");if(A){A(this,Sys.EventArgs.Empty)}},clearMetaData:function(){if(MySpace.UI.InlineCommentMetadata){MySpace.UI.InlineCommentMetadata.RegisteredControls=[]}if(MySpace.UI.InlineVideoMetadata){MySpace.UI.InlineVideoMetadata.RegisteredControls=[]}},wireBeaconTrack:function(){if(MySpace.UI.Pages.Home.AppActivityTrack){if(this._currentFilter==MySpace.UI.Stream.Pivot.All||this._currentFilter==MySpace.UI.Stream.Pivot.Apps){MySpace.UI.Stream.MDPAppBeacon.WireBeaconTrack()}}},wirePostBulletinLink:function(){var A=$q(".bulletinsLinks a",this._streamContainer,true);if(A){A.onclick=function(B){openCommentPopup(B)}}},loadProfileImages:function(){if(MySpace.UI._ProfileImageLink){MySpace.UI._ProfileImageLink.load()}},executeScripts:function(F){var H=false;var C=false;if(F){var A=F.getElementsByTagName("script");if(A.length>0){var B=[];for(var E=A.length-1;E>-1;E--){var G=document.createElement("script");G.type="text/javascript";if(A[E].text!==""){G.text=A[E].text;if(G.text.indexOf("InlineCommentMetadata")>-1){H=true}if(G.text.indexOf("InlineVideoMetadata")>-1){C=true}}else{G.src=A[E].src}A[E].parentNode.removeChild(A[E]);Array.add(B,G)}if(B.length>0){var D=document.getElementsByTagName("head")[0];for(var E=B.length-1;E>-1;E--){D.appendChild(B[E])}}this.loadProfileImages()}}return{wireComments:H,wireVideos:C}},parseUrlForFilter:function(B){var E=B.substring(B.indexOf("?")+1).split("&");for(var C=0;C<E.length;C++){var F=E[C].indexOf("=");if(F>=0){var A=E[C].substring(0,F);var D=E[C].substring(F+1);if(A==="f"){return D}}}return this._currentFilter},getDataFilter:function(A){return A.getAttribute("data-value")},getFilterType:function(A){A=A|0;return Array.find(MySpace.UI.Stream.Filters,function(B){return B.Key===A}).Value},resetSourceMenu:function(){if(this._sourceMenu&&this._sourceMenu.value==="-1"){this._sourceMenu.value=this._currentSource}},doUpdateCheck:function(){MySpace.UI.Pages.Data.request("GetActivityDeltaWithCount.ashx",this,this.handleUpdateCheckResponse,String.format("f={0}&s={1}&sc={2}&r={3}&lastRefreshDate={4}",this._currentFilter,this._currentSource,this.get_requestScripts(),this.get_requestClientResources(),this._lastRefreshDate))},handleUpdateCheckResponse:function(B,C){var G=B.get_webRequest().get_userContext();try{if(B.get_responseAvailable()){var A=B.get_responseData();var D=Sys.Serialization.JavaScriptSerializer.deserialize(A);G._deltaDate=D.lastRefreshDate;if(!G._lastRefreshDate){G._lastRefreshDate=D.lastRefreshDate}var F=parseInt(D.updateCount);if(F>0){G._updateContainer.innerHTML=D.activityUpdateText;$clearHandlers(G._updateContainer);$addHandler(G._updateContainer,"click",Function.createDelegate(G,G.showStreamUpdates))}G.showUpdateCount(F>0)}}catch(E){}},showStreamUpdates:function(){this.stopUpdateTimer();this._lastRefreshDate=this._deltaDate;this.sendRequest()},showUpdateCount:function(A){if(!A){Sys.UI.DomElement.removeCssClass(this._updateContainer,"newupdates")}else{Sys.UI.DomElement.addCssClass(this._updateContainer,"newupdates")}this.startUpdateTimer()},stopUpdateTimer:function(){clearTimeout(this._timeoutId);this._timeoutId=0},startUpdateTimer:function(){if(this._timeoutId>0){this.stopUpdateTimer()}this._timeoutId=setTimeout(Function.createDelegate(this,this.doUpdateCheck),this._checkInterval)}};MySpace.UI.Stream.Pivots.registerClass("MySpace.UI.Stream.Pivots",Sys.Component);MySpace.UI.InlineComment=function(){throw"Cannot instantiate static class."};MySpace.UI.InlineComment.show=function(A,E,D,C,B){$create(MySpace.UI._InlineComment,{ownerId:A,updateDate:E,comments:D,commentLinkId:C,elementId:B},null,null,$get(B))};MySpace.UI.InlineComment.wire=function(){if(!MySpace.UI.InlineCommentMetadata||!MySpace.UI.InlineCommentMetadata.RegisteredControls){return}var D=null,B=null;for(var A=0;A<MySpace.UI.InlineCommentMetadata.RegisteredControls.length;A++){D=MySpace.UI.InlineCommentMetadata.RegisteredControls[A];B=$get(D.cid);if(B&&!D.wired){var E={inputWidth:D.iw,defComments:D.dc,commentLinkId:D.clid,ownerId:D.aid,updateDate:D.ud,commentType:D.ctype,resourceId:D.resourceId,extendedResourceId:D.extendedResourceId,showOnLoad:D.ol,preRendered:true,showInputDiv:D.sid,title:D.title,activity_ctpId:D.activity_ctpId,customObjectInfo:D.customObjectInfo};if(D.tt.length>0){E.textboxTip=D.tt}var C=!MySpace.UI.InlineCommentMetadata.OnQuickPostCreated?null:{quickPostCreated:MySpace.UI.InlineCommentMetadata.OnQuickPostCreated};D.control=$create(MySpace.UI._InlineComment,E,C,null,B);D.wired=true}}};MySpace.UI._InlineComment=function(A){MySpace.UI._InlineComment.initializeBase(this,[A])};MySpace.UI._InlineComment.prototype={webServiceParams:null,webServiceUrl:"/Modules/Common/Services/InlineComment.asmx",_commentLinkId:null,_comments:null,_inputWidth:492,_defComments:2,_preRendered:false,_ownerId:null,_textboxTip:"",_totalCount:0,_updateDate:null,_showOnLoad:true,_showInputDiv:true,_commentsDiv:null,_container:null,_cssclass:"",_enableLinkCount:false,_inputDiv:null,_firstShow:true,_isVisible:true,_linksDiv:null,_loadingDiv:null,_quickPostInlineControl:null,_hideAllLink:null,_rendered:false,_showAllLink:null,_showMoreLink:null,_textArea:null,_totalLabel:null,_totalShown:0,_commentType:0,_resourceId:0,_extendedResourceId:"",_title:"",_activity_ctpId:"",_customObjectInfo:"",get_commentLinkId:function(){return this._commentLinkId},set_commentLinkId:function(A){this._commentLinkId=A},get_comments:function(){return this._comments},set_comments:function(A){this._comments=A},get_inputWidth:function(){return this._inputWidth},set_inputWidth:function(A){this._inputWidth=A},get_defComments:function(){return this._defComments},set_defComments:function(A){this._defComments=A},get_preRendered:function(){return this._preRendered},set_preRendered:function(A){this._preRendered=A},get_showOnLoad:function(){return this._showOnLoad},set_showOnLoad:function(A){this._showOnLoad=A},get_ownerId:function(){return this._ownerId},set_ownerId:function(A){this._ownerId=A},get_textboxTip:function(){return this._textboxTip},set_textboxTip:function(A){this._textboxTip=A},get_totalCount:function(){return this._totalCount},set_totalCount:function(A){this._totalCount=A},get_updateDate:function(){return this._updateDate},set_updateDate:function(A){this._updateDate=A},get_showInputDiv:function(){return this._showInputDiv},set_showInputDiv:function(A){this._showInputDiv=A},get_commentType:function(){return this._commentType},set_commentType:function(A){this._commentType=A},set_resourceId:function(A){this._resourceId=A},get_resourceId:function(){return this._resourceId},set_extendedResourceId:function(A){this._extendedResourceId=A},get_extendedResourceId:function(){return this._extendedResourceId},get_title:function(){return this._title},set_title:function(A){this._title=A},get_activity_ctpId:function(){return this._activity_ctpId},set_activity_ctpId:function(A){this._activity_ctpId=A},get_customObjectInfo:function(){return this._customObjectInfo},set_customObjectInfo:function(A){this._customObjectInfo=A},add_quickPostCreated:function(A){this.get_events().addHandler("quickPostCreated",A)},remove_quickPostCreated:function(A){this.get_events().removeHandler("quickPostCreated",A)},initialize:function(){this._commentDeletedHandler=Function.createDelegate(this,this._commentDeleted);this._postSuccessHandler=Function.createDelegate(this,this._postSuccess);this._hideAllHandler=Function.createDelegate(this,this._showLess);this._showAllHandler=Function.createDelegate(this,this._showAll);this._showMoreHandler=Function.createDelegate(this,this._showMore);this._toggleHandler=Function.createDelegate(this,this.toggle);if(MySpaceRes.Comment&&MySpaceRes.Comment.ShowMore){this._wireCommentLink();if((this._comments&&this._comments.TotalComments>0)||this._preRendered){this.show(true)}else{this._isVisible=false}}else{this._loadResourceStrings()}},toggle:function(A){this._showInputDiv=true;this.show()},cancelEvent:function(A){A.preventDefault()},show:function(A){if(this._firstShow){this._textboxTip=MySpaceRes.Comment.AddInlineComment+"...";if(!this._rendered){this._renderInput();if(this._preRendered){this._wireComments();if(this._totalCount<1){return}}else{if(this._comments){this._loadComments()}}}if(!this._showOnLoad&&!this._ready){this._isVisible=false;this._inputDiv.style.display="none";this._commentsDiv.style.display="none";this._firstShow=true;this._ready=true;this._toggleShowMoreLink();return}this._firstShow=false}if(!A){window.setTimeout(Function.createDelegate(this,this._openQuickPost),0)}this._isVisible=true;if(typeof(this._showInputDiv)=="boolean"){this._inputDiv.style.display=this._showInputDiv?"block":"none"}else{this._inputDiv.style.display=Boolean.parse(this._showInputDiv)?"block":"none"}this._showInputDiv=true;this._commentsDiv.style.display=(this._totalShown>0?"block":"none");this._toggleShowMoreLink()},hide:function(){this._isVisible=false;this._inputDiv.style.display="none";this._commentsDiv.style.display="none";this._toggleShowMoreLink()},_call:function(A,C,D){C=C||{};C.args=this.webServiceParams;var B=this.webServiceUrl.replace(/https?:\/\/[^\/]*\//,"/");Sys.Net.WebServiceProxy.invoke(B,A,false,C,Function.createPartial(this,D,C.args),Function.createDelegate(this,this._onError))},_onError:function(A){alert(MySpaceRes.Header.ErrorMessage.replace(/<br.*>/gi,"\n"))},_wireCommentLink:function(){if(this._commentLinkId||this._commentLink){var A=$get(this._commentLinkId);A.innerHTML=MySpaceRes.HomeDisplay.Comment;if(this._enableLinkCount){if(this._totalCount==1){A.innerHTML=String.format("{0} {1}",1,MySpaceRes.HomeDisplay.Comment)}else{if(this._totalCount>1){A.innerHTML=String.format("{0} {1}",this._totalCount,MySpaceRes.HomeDisplay.Comments)}}}$addHandler(A,"mousedown",this._toggleHandler);$addHandler(A,"click",Function.createDelegate(this,this.cancelEvent))}},_wireShowMoreLinks:function(){var A=MySpace.Utils.Selector.query("a",this._linksDiv);if(A.length>1){this._showMoreLink=A[0];this._hideAllLink=A[1];this._showAllLink=A[2];$addHandler(this._showMoreLink,"mousedown",this._showMoreHandler);$addHandler(this._hideAllLink,"mousedown",this._hideAllHandler);$addHandler(this._showAllLink,"click",this._showAllHandler)}this._totalLabel=MySpace.Utils.Selector.query(".icTotal",this._linksDiv)[0]},_showMore:function(){this._inputDiv.style.display="block";if(this._firstShow){this.show(true)}else{this._getRecentComments(this._totalShown,10);this._updateCssClasses()}},_updateCssClasses:function(){var A="odd";for(var B=0;B<this._commentsDiv.childNodes.length;B++){A=(B%2==0)?"odd":"even";this._commentsDiv.childNodes[B].className=A+(B==this._commentsDiv.childNodes.length-1?" last":"")}},_showAll:function(){this.show(true)},_showLess:function(){this.hide()},_postSuccess:function(A,B){this._renderComment(B.data.comment,"",true);this._totalCount++;this._updateCssClasses();this._toggleShowMoreLink();this._commentsDiv.style.display="";if(MySpace.UI.Stream&&MySpace.UI.Stream.ActivityClickTracking){MySpace.UI.Stream.ActivityClickTracking(this.get_activity_ctpId(),MySpace.UI.Stream.EventIdEnum.CommentAdd)}},_clearComments:function(){this._removeChildrenFromNode(this._commentsDiv)},_getRecentComments:function(A,B,C){this._loadingDiv.style.display="block";if(A<1&&!C){this._clearComments();this._totalShown=0}this.webServiceParams={doInsert:C||false};var E={commentType:this._commentType,ownerId:this._ownerId,resourceId:this._resourceId,extendedResourceId:this._extendedResourceId,startIdx:A+1,count:B,title:this._title,customObjectInfo:this._customObjectInfo};var D=Function.createDelegate(this,this._loadComments);this._call("GetComments",E,D)},_removeChildrenFromNode:function(B){if(!this._isValidObj(B)){return}var A=B.childNodes.length;while(B.hasChildNodes()){B.removeChild(B.firstChild)}},_isValidObj:function(A){if(null==A){return false}if("undefined"==typeof(A)){return false}return true},_renderInput:function(){if(!this._preRendered){var B='<div class="inlineCommentCtl"><div class="icWrap"><div class="icInputRow">           <div class="icInput">             <div class="icTxtArea"><textarea>'+this._textboxTip+'</textarea></div>               <button class="fakeButton" onClick="return false;"></button>           </div>           <div class="icButtons">               <div class="hsmButton" tabindex="503" style="display:none;">                   Submit                   <div class="hsmButtonRight"></div>               </div>           </div></div><ul class="icComments"></ul><div class="icLinks">   <span class="icTotal"></span>   <a class="showMore">'+MySpaceRes.Comment.ShowMore+'</a>   <a class="showLess">'+MySpaceRes.Comment.HideAll+'</a>   <a class="showAll">'+MySpaceRes.ProfileEdit.Show.toLowerCase()+'</a>   <div class="icAjaxLoader"></div>   <div class="clear"></div></div></div></div>';this._element.innerHTML=B}var C=this.get_element();this._container=MySpace.Utils.Selector.query("div.inlineCommentCtl",C,true);this._inputDiv=MySpace.Utils.Selector.query("div.icInputRow",C,true);this._commentsDiv=MySpace.Utils.Selector.query("ul.icComments",C,true);this._linksDiv=MySpace.Utils.Selector.query("div.icLinks",C,true);this._textArea=MySpace.Utils.Selector.query(".icTxtArea textarea",C,true);this._loadingDiv=MySpace.Utils.Selector.query("div.icAjaxLoader",C,true);this._wireShowMoreLinks();var A=MySpace.Utils.Selector.query(".icInput",this._inputDiv)[0];$addHandler(A.getElementsByTagName("textarea")[0],"focus",Function.createDelegate(this,this._openQuickPost));this._textArea.removeAttribute("disabled");this._rendered=true},reset:function(){this._linksDiv.style.display="none";this._container.style.display="none";this._commentsDiv.innerHTML="";this.set_totalCount(0)},_openQuickPost:function(A){if(A&&A.preventDefault){A.preventDefault()}MySpace.UI.addQuickPostScript(Function.createDelegate(this,function(){if(!this._quickPostInlineControl){var C=MySpace.Utils.Selector.query(".icInput",this._inputDiv)[0];this._quickPostInlineControl=$create(MySpace.UI.QuickPostInline,{enableCancel:true,enableBlurBehavior:true,textboxWrapClass:"icTxtArea",textboxTip:this._textboxTip,webServiceUrl:this.webServiceUrl,webServiceParams:{friendId:this._ownerId,updateDate:this._updateDate,type:this._commentType,resourceId:this._resourceId,extendedResourceId:this._extendedResourceId,authorId:this._commentAuthorId,title:this._title,customObjectInfo:this._customObjectInfo}},{success:this._postSuccessHandler},null,C);this._quickPostInlineControl.show();var B=this.get_events().getHandler("quickPostCreated");if(B){B(this,C)}return}this._quickPostInlineControl.show()}))},_loadComments:function(B,A){if(A){this._comments=A}if(this._comments&&this._comments.TotalComments){this._totalCount=this._comments.TotalComments;for(var C=0;C<this._comments.CommentsList.length;C++){this._cssclass=this._cssclass=="odd"?"even":"odd";var D=C==this._comments.CommentsList.length-1?" last":"";var E=(B&&B.doInsert?B.doInsert:false);this._renderComment(this._comments.CommentsList[C],this._cssclass+D,E)}this._commentsDiv.style.display="block";this._toggleShowMoreLink()}this._loadingDiv.style.display="none"},_wireComments:function(){this._totalCount=this._commentsDiv.getAttribute("ttl");for(var B=0;B<this._commentsDiv.childNodes.length;B++){var A=MySpace.Utils.Selector.query(".icDeleteBtn",this._commentsDiv.childNodes[B])[0];$create(MySpace.UI.Comment,{deleteBtn:A,defComments:this._defComments,resourceId:this._resourceId,extendedResourceId:this._extendedResourceId,commentType:this._commentType},{commentDeleted:this._commentDeletedHandler},null,this._commentsDiv);this._totalShown++}},_renderComment:function(C,A,B){$create(MySpace.UI.Comment,{comment:C,statusAuthorId:this._ownerId,cssClass:A,defComments:this._defComments,resourceId:this._resourceId,extendedResourceId:this._extendedResourceId,commentType:this._commentType,webServiceUrl:this.webServiceUrl,updateDate:this._updateDate,doInsert:B},{commentDeleted:this._commentDeletedHandler},null,this._commentsDiv);this._totalShown++},_commentDeleted:function(B,A){this._commentsDiv.removeChild(this._commentsDiv.childNodes[A.currIdx]);if(A.CommentsList&&A.CommentsList.length>0&&parseInt(A.currIdx)<=1&&this._totalShown==this._defComments){this._renderComment(A.CommentsList[0],"",false)}this._totalCount--;this._totalShown--;if(this._totalCount==0){this._inputDiv.style.display="block"}this._updateCssClasses();this._toggleShowMoreLink();if(MySpace.UI.Stream&&MySpace.UI.Stream.ActivityClickTracking){MySpace.UI.Stream.ActivityClickTracking(this.get_activity_ctpId(),MySpace.UI.Stream.EventIdEnum.CommentDelete)}},_toggleShowMoreLink:function(){this._totalLabel.innerHTML=this._totalCount>1?String.format(MySpaceRes.Comment.CommentsTotal,this._totalCount):MySpaceRes.Comment.CommentTotal;this._totalLabel.style.display=this._totalCount>0?"":"none";if(this._isVisible){this._showMoreLink.style.display=parseInt(this._totalShown)<parseInt(this._totalCount)&&parseInt(this._totalCount)>parseInt(this._defComments)?"block":"none";this._hideAllLink.style.display=parseInt(this._totalShown)>parseInt(this._defComments)&&parseInt(this._totalShown)==parseInt(this._totalCount)?"block":"none";this._showAllLink.style.display="none";this._container.style.display="block"}else{this._showMoreLink.style.display=(this._firstShow&&!this._showOnLoad&&this._totalCount>0?"block":"none");this._hideAllLink.style.display="none";this._showAllLink.style.display=(this._firstShow&&!this._showOnLoad?"none":"block");this._container.style.display=this._totalCount>0?"block":"none"}this._linksDiv.style.display=this._totalCount>0?"block":"none"},dispose:function(){},_loadResourceStrings:function(){this._call("GetResources",{},Function.createDelegate(this,this._addResourceStrings))},_addResourceStrings:function(B,A){this._addStrings(A.strings);if(this._comments&&this._comments.TotalComments>0){this.show(true)}else{this._isVisible=false}this._wireCommentLink()},_addStrings:function(A){for(var B in A){if(!MySpaceRes[B]){MySpaceRes[B]={}}for(var C in A[B]){MySpaceRes[B][C]=A[B][C]}}}};MySpace.UI._InlineComment.registerClass("MySpace.UI._InlineComment",Sys.UI.Control);MySpace.UI.Comment=function(A){MySpace.UI.Comment.initializeBase(this,[A])};MySpace.UI.Comment.prototype={webServiceParams:{},_statusAuthorId:0,_comment:null,_cssClass:"",_doInsert:false,_updateDate:null,_webServiceUrl:"/Modules/Common/Services/InlineComment.asmx",_commentDate:null,_commentAuthorId:null,_currIdx:0,_userId:-1,_resourceId:-1,_extendedResourceId:"",_commentId:-1,_commentType:0,get_defComments:function(){return this._defComments},set_defComments:function(A){this._defComments=A},get_statusAuthorId:function(){return this._statusAuthorId},set_statusAuthorId:function(A){this._statusAuthorId=A},get_cssClass:function(){return this._cssClass},set_cssClass:function(A){this._cssClass=A},get_comment:function(){return this._comment},set_comment:function(A){this._comment=A},get_deleteBtn:function(){return this._deleteBtn},set_deleteBtn:function(A){this._deleteBtn=A},get_doInsert:function(){return this._doInsert},set_doInsert:function(A){this._doInsert=A},get_updateDate:function(){return this._updateDate},set_updateDate:function(A){this._updateDate=A},get_webServiceUrl:function(){return this._webServiceUrl},set_webServiceUrl:function(A){this._webServiceUrl=A},get_resourceId:function(){return this._resourceId},set_resourceId:function(A){this._resourceId=A},get_extendedResourceId:function(){return this._extendedResourceId},set_extendedResourceId:function(A){this._extendedResourceId=A},get_commentId:function(){return this._commentId},set_commentId:function(A){this._commentId=A},get_commentType:function(){return this._commentType},set_commentType:function(A){this._commentType=A},initialize:function(){this._deleteCommentHandler=Function.createDelegate(this,this._deleteComment);this._successHandler=Function.createDelegate(this,this._success);this._userId=MySpace.ClientContext.UserId;if(!this._deleteBtn){var B='<div class="icContent"><div class="icProfileImage"></div>   <div class="icCommentBody">       <div class="icUpdateInfo">           <span class="icLink"><a href="'+this._comment.ProfileUrl+'">'+this._comment.UserName+'</a></span>           <span class="icLastUpdate">'+this._comment.LastUpdateText+'</span>       </div>       <div class="icComment">'+this._comment.Body+'</div>   </div>   <div class="icDelete"></div></div><div class="clear"></div>';this._commentDate=this._comment.PostedDateText;this._commentAuthorId=this._comment.AuthorId;this._commentId=this._comment.CommentId;var D=this._createItem(B);if(this._cssClass.length>0){D.className=this._cssClass}if(this._statusAuthorId==this._userId||this._comment.AuthorId==this._userId){var C=MySpace.Utils.Selector.query(".icDelete",D)[0];var A=document.createElement("div");A.className="icDeleteBtn";A.setAttribute("cd",this._commentDate);A.setAttribute("aid",this._commentAuthorId);A.setAttribute("cid",this._comment.CommentId);A.setAttribute("ctype",this._commentType);$addHandler(A,"click",Function.createDelegate(this,this._confirmDelete));C.appendChild(A)}$create(MySpace.UI.ProfileImageLink,this._comment.ProfileImageUrl,{},{},D.firstChild.firstChild);D.setAttribute("cd",this._commentDate);D.setAttribute("aid",this._commentAuthorId);D.setAttribute("cid",this._comment.CommentId);if(this._doInsert&&this._element.childNodes.length>0){this._element.insertBefore(D,this._element.childNodes[0])}else{this._element.appendChild(D)}}else{this._commentDate=this._deleteBtn.getAttribute("cd");this._commentAuthorId=this._deleteBtn.getAttribute("aid");this._statusAuthorId=this._deleteBtn.getAttribute("said");this._updateDate=this._deleteBtn.getAttribute("ud");this._currIdx=this._deleteBtn.getAttribute("idx");this._commentId=this._deleteBtn.getAttribute("cid");this._commentType=this._deleteBtn.getAttribute("ctype");if(this._statusAuthorId==this._userId||this._commentAuthorId==this._userId){$addHandler(this._deleteBtn,"click",Function.createDelegate(this,this._confirmDelete))}else{this._deleteBtn.style.display="none"}}},_confirmDelete:function(D){for(var B=0;B<this._element.childNodes.length;B++){if(D.target.getAttribute("cd")==this._element.childNodes[B].getAttribute("cd")&&D.target.getAttribute("aid")==this._element.childNodes[B].getAttribute("aid")){this._currIdx=B}}if(this._commentAuthorId==this._userId){MySpace.UI.Popup.confirm(MySpaceRes.Comment.AreYouSureDelete,this._deleteCommentHandler)}else{var C=MySpaceRes.Comment.DeleteCommentConfirmationText;C=C.replace(new RegExp("\n","g"),"<br>");C=String.format(C,'<a href="http://profileedit.myspace.com/index.cfm?fuseaction=accountSettings.blockedUsers">',"</a>");var A=MySpace.UI.Popup.create(C,MySpaceRes.Common.Attention,this._deleteCommentHandler);A.add_button(MySpaceRes.Comment.DeleteComment,true);A.add_button(MySpaceRes.Comment.DeleteCommentAndBlockUser,false);A.set_width(400);A.show()}},_createItem:function(A){var B=document.createElement("li");if(typeof(A)==="string"){B.innerHTML=A}else{B.appendChild(A)}return B},_deleteComment:function(A,B){var D=B.target.value;if(B.target&&(D===MySpaceRes.Common.Yes||D===MySpaceRes.Comment.DeleteComment||D===MySpaceRes.Comment.DeleteCommentAndBlockUser)){var C={ownerId:this._statusAuthorId,updateDate:this._updateDate,commentAuthorId:this._commentAuthorId,userId:this._userId,commentPostDate:this._commentDate,currIdx:this._currIdx,defCmts:this._defComments,hash:MySpace.UI._QuickPost.hashToken,blockUser:(D===MySpaceRes.Comment.DeleteCommentAndBlockUser),resourceId:this._resourceId,extendedResourceId:this._extendedResourceId,commentId:this._commentId,commentType:this._commentType};this._call("DeleteComment",C,this._successHandler)}},dispose:function(){},_raiseEvent:function(A,B){var C=this.get_events().getHandler(A);if(C){if(!B){B=new Sys.EventArgs()}C(this,B)}},add_commentDeleted:function(A){this.get_events().addHandler("commentDeleted",A)},remove_commentDeleted:function(A){this.get_events().removeHandler("commentDeleted",A)},_call:function(A,C,D){C=C||{};C.args=this.webServiceParams;var B=this._webServiceUrl.replace(/https?:\/\/[^\/]*\//,"/");Sys.Net.WebServiceProxy.invoke(B,A,false,C,Function.createPartial(this,D,C.args),Function.createDelegate(this,this._onError))},_success:function(B,A){for(var C=0;C<this._element.childNodes.length;C++){if(this._commentDate==this._element.childNodes[C].getAttribute("cd")&&this._commentAuthorId==this._element.childNodes[C].getAttribute("aid")){A.currIdx=C}}this._raiseEvent("commentDeleted",A)},_onError:function(A){alert(MySpaceRes.Header.ErrorMessage.replace(/<br.*>/gi,"\n"))}};MySpace.UI.Comment.registerClass("MySpace.UI.Comment",Sys.UI.Control);MySpace.UI.ProfileImageLink=function(A){MySpace.UI.ProfileImageLink.initializeBase(this,[A])};MySpace.UI.ProfileImageLink.prototype={html:"",initialize:function(){MySpace.UI.ProfileImageLink.callBaseMethod(this,"initialize");var A=this.get_element();A.innerHTML=this.html;MySpace.UI._ProfileImageLink.init(A.firstChild);if(MySpace.UI.FriendToolTip){MySpace.UI.FriendToolTip.attachHandlers(MySpace.Utils.Selector.query(".friendToolTipBox",A))}}};MySpace.UI.ProfileImageLink.registerClass("MySpace.UI.ProfileImageLink",Sys.UI.Behavior);MySpace.UI.InlineVideo=function(){throw"Cannot instantiate static class."};MySpace.UI.InlineVideo.wire=function(E){if(!MySpace.UI.InlineVideoMetadata||!MySpace.UI.InlineVideoMetadata.RegisteredControls){return}var B=null,D=null;for(var C=0,A=MySpace.UI.InlineVideoMetadata.RegisteredControls.length;C<A;C++){B=MySpace.UI.InlineVideoMetadata.RegisteredControls[C];D=$q("."+B.objectId,null,true);if(D){var F={defWidth:E,mediaUrl:B.mediaUrl,mediaType:B.mediaType,height:B.height,width:B.width,videoId:B.videoId,objectId:B.objectId,clickTrackingJsonKey:B.clickTrackingJsonKey};B.control=$create(MySpace.UI._InlineVideo,F,null,null,D)}}};MySpace.UI.InlineVideo.attach=function(F,A){if(!MySpace.UI.InlineVideoMetadata||!MySpace.UI.InlineVideoMetadata.RegisteredControls){return}var C=null,E=null;var H=MySpace.UI.InlineVideoMetadata.DefaultWidth||350;E=$q("."+A,null,true);if(E){for(var D=0,B=MySpace.UI.InlineVideoMetadata.RegisteredControls.length;D<B;D++){C=MySpace.UI.InlineVideoMetadata.RegisteredControls[D];if(C.objectId==A){var G={defWidth:H,mediaUrl:C.mediaUrl,mediaType:C.mediaType,height:C.height,width:C.width,videoId:C.videoId,objectId:C.objectId,target:F};C.control=$create(MySpace.UI._InlineVideo,G,null,null,E);return C.control}}}};MySpace.UI._InlineVideo=function(A){MySpace.UI._InlineVideo.initializeBase(this,[A])};MySpace.UI._InlineVideo.prototype={HuluMediaUrl:"http://player.hulu.com/embed/myspace_viral_player.swf?embed=true&videoID={0},ap=1",MySpaceMediaUrl:"http://mediaservices.myspace.com/services/media/embed.aspx/m={0},t=1,mt=video,ap=1",_chrome:40,_defWidth:null,_handlerURL:"/Modules/Common/Services/InlineVideo.ashx",_mediaType:null,_mediaUrl:null,_height:null,_width:null,_objectId:null,_showVideoHandler:null,_target:null,_videoId:null,_clickTrackingJsonKey:null,get_chrome:function(){return this._chrome},set_chrome:function(A){this._chrome=A},get_defWidth:function(){return this._defWidth},set_defWidth:function(A){this._defWidth=A},get_mediaType:function(){return this._mediaType},set_mediaType:function(A){this._mediaType=A},get_mediaUrl:function(){return this._mediaUrl},set_mediaUrl:function(A){this._mediaUrl=A},get_height:function(){return this._height},set_height:function(A){this._height=A},get_width:function(){return this._width},set_width:function(A){this._width=A},get_objectId:function(){return this._objectId},set_objectId:function(A){this._objectId=A},get_target:function(){return this._target},set_target:function(A){this._target=A},get_videoId:function(){return this._videoId},set_videoId:function(A){this._videoId=A},get_clickTrackingJsonKey:function(){return this._clickTrackingJsonKey},set_clickTrackingJsonKey:function(A){this._clickTrackingJsonKey=A},initialize:function(){this._embedCode=null;this._showVideoHandler=Function.createDelegate(this,this._getEmbedCode);this._element.onclick=null;if(this._element.parentNode.nodeName.toLowerCase()=="a"){$addHandler(this._element.parentNode,"click",function(B){B.preventDefault()})}var A=$q(".videoIcon",this._element.parentNode,true);if(A!=null){$addHandler(A,"click",this._showVideoHandler)}if(this._target){$addHandler(this._target,"click",this._showVideoHandler)}else{$addHandler(this._element,"click",this._showVideoHandler)}},dispose:function(){this._showVideoHandler=null},_getEmbedCode:function(){var B=this._getMediaUrl();if(this._embedCode){this._showPlayer(this._embedCode)}else{if(B.length>1){if(this._height==0){this._height=parseInt(this._defWidth/1.6)}var A=parseInt(this._defWidth/(this._width/this._height))+this._chrome;MySpace.WebRequest.invoke(this._handlerURL+"?h="+A+"&w="+this._defWidth+"&src="+encodeURIComponent(B),true,"",Function.createDelegate(this,this._showPlayer),null,null,0)}}},_showPlayer:function(D){this._embedCode=D;if(this._embedCode.length>0){var A=$q(".player",this._element.parentNode,true);if(A!=null){return}if(this._element.parentNode.nodeName.toLowerCase()=="a"){Sys.UI.DomElement.addCssClass(this._element.parentNode,"playing")}if(this._element.parentNode.parentNode.nodeName.toLowerCase()=="li"){Sys.UI.DomElement.addCssClass(this._element.parentNode.parentNode,"playing")}var B=document.createElement("div");B.className="player";B.innerHTML=this._embedCode;this._element.style.display="none";var C=this._element.parentNode;C.appendChild(B);if(MySpace.UI.Stream&&MySpace.UI.Stream.ActivityClickTracking){MySpace.UI.Stream.ActivityClickTracking(this.get_clickTrackingJsonKey(),MySpace.UI.Stream.EventIdEnum.InlineVideo)}}},_getMediaUrl:function(){switch(this._mediaType.toLowerCase()){case"other":return this._mediaUrl;break;default:return String.format(this._mediaType.toLowerCase()=="hulu"?this.HuluMediaUrl:this.MySpaceMediaUrl,this._videoId)}}};MySpace.UI._InlineVideo.registerClass("MySpace.UI._InlineVideo",Sys.UI.Control);MySpace.UI._ReShare=function(){MySpace.UI._ReShare.initializeBase(this)};MySpace.UI._ReShare.prototype={_contentUrl:null,_contentTitle:null,_contentDesc:null,_contentThumb:null,_height:440,_width:440,_usePopup:false,_callBack:null,_activity_ctpId:null,_url:"/Modules/PostTo/Pages/?u={0}&t={1}&c={2}&i={3}&opid={4}",get_contentUrl:function(){return this._contentUrl},set_contentUrl:function(A){this._contentUrl=A},get_contentTitle:function(){return this._contentTitle},set_contentTitle:function(A){this._contentTitle=A},get_contentDesc:function(){return this._contentDesc},set_contentDesc:function(A){this._contentDesc=A},get_contentThumb:function(){return this._contentThumb},set_contentThumb:function(A){this._contentThumb=A},get_element:function(){return this._element},set_element:function(A){this._element=A},get_height:function(){return this._height},set_height:function(A){this._height=A},get_width:function(){return this._width},set_width:function(A){this._width=A},get_usePopup:function(){return this._usePopup},set_usePopup:function(A){this._usePopup=A},get_callBack:function(){return this._callBack},set_callBack:function(A){this._callBack=A},get_activity_ctpId:function(){return this._activity_ctpId},set_activity_ctpId:function(A){this._activity_ctpId=A},initialize:function(){if(this._contentUrl.length>0){var B=-1;if(MySpace.UI.ACTP){var A=MySpace.UI.ACTP[this.get_activity_ctpId()];B=A?A.InitiatorUserID:-1}this._url=String.format(this._url,encodeURIComponent(this._contentUrl),this._contentTitle?encodeURI(this._contentTitle):"",this._contentDesc?encodeURI(this._contentDesc):"",this._contentThumb?encodeURIComponent(this._contentThumb):"",B);if(this._element){$addHandler(this._element,"click",Function.createDelegate(this,this.show))}}},show:function(G){if(this._usePopup){window.open(this._url,"ptm","height="+this._height+",width="+this._width)}else{var D='<iframe width="'+this._width+'" height="'+this._height+'" MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no allowTransparency=true src="'+this._url+'"></iframe>';var F=MySpace.UI.Popup.create(D,"");F.set_width(this._width+20);var C=F._hide;var B=this;F._hide=function(){C.apply(F);if(F.successReShare&&typeof(B._callBack)==="function"){B._callBack()}};var A=F._box.childNodes[2].firstChild;if(A){var E=function(M){var K=M.target;var J=K.contentWindow.document.getElementById("module-1");if(J){var I=$q(".mainWidth .closeWindow",J,true);if(I){I.style.display="block";I.onclick=function(){F._hide();return false}}var L=$q(".confirmation",J,true);if(L){F.successReShare=true;var H=$q(".homeLink",L,true);if(H){H.style.display="none"}setTimeout(function(){F._hide()},2000)}}};$addHandler(A,"load",E)}F.show();MySpace.UI.Stream.ActivityClickTracking(B.get_activity_ctpId(),MySpace.UI.Stream.EventIdEnum.ReShare)}if(G){G.preventDefault()}}};MySpace.UI._ReShare.registerClass("MySpace.UI._ReShare",Sys.Component);MySpace.UI.ReShare=function(){throw"Cannot instantiate static class."};MySpace.UI.ReShare.create=function(A){var B=$create(MySpace.UI._ReShare,{contentUrl:A},null,null,null);B.show()};MySpace.UI.ReShare.generic=function(D,A,C,B){var E=$create(MySpace.UI._ReShare,{contentUrl:D,height:A,width:C,usePopup:B},null,null,null);E.show()};MySpace.UI.ReShare.wire=function(C,H){var H=H||null;var I=$q(".reshare",H);var B=null;for(var G=0,D=I.length;G<D;G++){B=I[G];if(B&&B.href){Sys.UI.DomElement.addCssClass(B,"shareable");var N=new Array();N=B.rel.split("-");var K=N[1];var P="activityItem"+N[0];var A=$q(".portraitDetailItem",P);var J=null;var L=null;if(A){for(var F=0;F<A.length;F++){var Q=A[F];if(Q.firstChild.nodeName=="A"){J=Q.firstChild.innerHTML}else{L=Q.innerHTML}}}var M=$q(".thumbnailImage",P);var O=(M&&M.length>0)?M[0].src:null;var E={contentUrl:B.href,contentTitle:J,contentDesc:L,contentThumb:O,element:B,usePopup:false,callBack:C,activity_ctpId:K};$create(MySpace.UI._ReShare,E,null,null,null);B.href="#"}}};Type.registerNamespace("MySpace.UI.Stream.MDPAppBeacon");MySpace.UI.Stream.MDPAppBeacon.trackAppLinkClick=function(C){var E="0";var A=this.href;var F=A.indexOf("appId=")+6;var D=A.indexOf("&",F);if(D<0){D=A.length}currentAppId=A.substring(F,D);var B=AppBeaconEnum.em_canvas;if(A.indexOf("appinstall_source")>0){B=AppBeaconEnum.em_addapp}MySpace.Apps.trackClick(null,AppBeaconEnum.ec_userhome,B,MySpace.ClientContext.FunctionalContext,currentAppId)};MySpace.UI.Stream.MDPAppBeacon.WireBeaconTrack=function(){if(MySpace.Application.keyDisabled("DWBeaconStreamAppClicks")){return}var B=$q(".streamContainer .application a",null);for(var A=0;A<B.length;A++){if(B[A].href.toLowerCase().indexOf("canvas.aspx")>0){$addHandler(B[A],"click",Function.createDelegate(B[A],MySpace.UI.Stream.MDPAppBeacon.trackAppLinkClick))}}};Type.registerNamespace("MySpace.UI.Pages.Home.StandaloneStream");MySpace.UI.Pages.Home.StandaloneStream.Filters=function(){MySpace.UI.Pages.Home.StandaloneStream.Filters.initializeBase(this)};MySpace.UI.Pages.Home.StandaloneStream.Filters.prototype={_isFilterByFriend:false,_selectedFriend:-1,initialize:function(){MySpace.UI.Pages.Home.StandaloneStream.Filters.callBaseMethod(this,"initialize");this._isFilterByFriend=MySpace.UI.Pages.Home.ActivityStream.Selections.isFilterByFriend;this._selectedFriend=MySpace.UI.Pages.Home.ActivityStream.Selections.selectedFriend;var C=$q(".filterstreambyfriend",this._pivotsContainer,true);var A=$get("friendInput");if(A){var B=$q(".filters",this._pivotsContainer,"true");A.orgValue=A.value;A.onblur=this.setFriendSelectText;A.onfocus=this.clearFriendSelectText}else{if(C){C.style.display="none"}}this.wireBeaconTrack()},sendRequest:function(){var A;if(this._isFilterByFriend){A=String.format("f={0}&s={1}&sc={2}&r={3}&uid={4}",this.get_filter(),MySpace.UI.Pages.Home.ActivityStream.Selections.personalFeed,this.get_requestScripts(),this.get_requestClientResources(),this._selectedFriend)}else{A=String.format("f={0}&s={1}&sc={2}&r={3}",this.get_filter(),this.get_source(),this.get_requestScripts(),this.get_requestClientResources())}MySpace.UI.Pages.Data.request("RenderStandaloneStream.ashx",this,this.handleResponse,A)},filterByFriend:function(A){if(MySpace.UI.Pages.Home.StandaloneStream.FriendSelector.isProcessed){MySpace.UI.Pages.Home.StandaloneStream.FriendSelector.isProcessed=false;return}if(A._selectedFriend){this._isFilterByFriend=true;this._selectedFriend=A._selectedFriend.UserId;this.sendRequest();this.wait()}else{if(this._isFilterByFriend){this._isFilterByFriend=false;this._selectedFriend=-1;this.sendRequest();this.wait()}}},wire:function(){MySpace.UI.Pages.Home.StandaloneStream.Filters.callBaseMethod(this,"wire");if(this._sourceMenu){var A=this;this._sourceMenu.onchange=function(){A.onSourceMenuChange()}}},onSourceMenuChange:function(){this._isFilterByFriend=false;this._selectedFriend=-1;if(MySpace.UI.Pages.Home.StandaloneStream.FriendSelector){MySpace.UI.Pages.Home.StandaloneStream.FriendSelector.selectFriendById(null)}this.setFriendSelectText();this.executeFilter()},setFriendSelectText:function(){var A=$get("friendInput");if(A){A.value=A.orgValue}},clearFriendSelectText:function(){var A=$get("friendInput");if(A){A.value=""}},wireBeaconTrack:function(){if(MySpace.UI.Stream.MDPAppBeacon){if(this._currentFilter==MySpace.UI.Stream.Pivot.All||this._currentFilter==MySpace.UI.Stream.Pivot.Apps){MySpace.UI.Stream.MDPAppBeacon.WireBeaconTrack()}}},handleResponse:function(B,A){MySpace.UI.Pages.Home.StandaloneStream.Filters.callBaseMethod(this,"handleResponse",[B,A]);document.title=MySpace.UI.Pages.Home.ActivityStream.PageTitle}};MySpace.UI.Pages.Home.StandaloneStream.Filters.registerClass("MySpace.UI.Pages.Home.StandaloneStream.Filters",MySpace.UI.Stream.Pivots);MySpace.UI.Pages.Home.StandaloneStream.wireSyncPromo=function(){var B=$get("syncTwitterIcon");if(B){B.onlick=function(){MySpace.CMS.track("8ba515d7-611e-46e4-826b-6e9ca40defca","34098")}}var A=$get("syncSettings");if(A){A.onclick=function(){MySpace.CMS.track("8ba515d7-611e-46e4-826b-6e9ca40defca","34099")}}};Type.registerNamespace("MySpace.UI.Pages.Activity");MySpace.UI.Pages.Activity.WireSponsored=function(){if(!MySpace.UI.Pages.Activity.OverlayMetadata){return}var A=$create(MySpace.UI.Pages.Activity.OverlayedActivity,null,null,null,null)};MySpace.UI.Pages.Activity.OverlayedActivity=function(){MySpace.UI.Pages.Activity.OverlayedActivity.initializeBase(this)};MySpace.UI.Pages.Activity.OverlayedActivity.prototype={_modal:null,_title:null,_invisibleDiv:null,_inlineVideoCtrl:null,initialize:function(){MySpace.UI.Pages.Activity.OverlayedActivity.callBaseMethod(this,"initialize");this.processOverlayActivities()},processOverlayActivities:function(){var C=$q(".streamContainer .activitiesContainer",null,true);if(C){var A=$q(".overlayActivity",C,false);for(var B=0;B<A.length;B++){this.processOverlayActivity(A[B],MySpace.UI.Pages.Activity.OverlayMetadata.ClickThruUrls[B],MySpace.UI.Pages.Activity.OverlayMetadata.ClickThruBeaconUrls[B])}}},processOverlayActivity:function(C,A,D){var B=this;if(this.IsSponsored(C)){this._title=MySpace.UI.Pages.Activity.OverlayMetadata.Title;C.onclick=function(){B.handleSponsoredClicks(A,D);return false}}else{C.onclick=function(){B.handleOverlayDivClicks(A,D);return false}}C.style.cursor="pointer"},IsSponsored:function(A){return new RegExp("\\bsponsoredActivity\\b").test(A.className)},handleOverlayDivClicks:function(A,B){this.BeaconCall(B);window.open(A)},handleSponsoredClicks:function(A,B){if(MySpace.UI.Pages.Activity.OverlayMetadata.InlineVideoObject){if(!this._inlineVideoCtrl){this.BeaconCall();this._content=MySpace.UI.Pages.Activity.OverlayMetadata.InlineVideoObject;if(MySpace.UI.InlineVideo){this._inlineVideoCtrl=MySpace.UI.InlineVideo.attach(this._invisibleDiv,this._content);this._inlineVideoCtrl._showVideoHandler();this._invisibleDiv.parentNode.style.height="auto";this._invisibleDiv.parentNode.removeChild(this._invisibleDiv)}}}else{this.BeaconCall(B);this._content=A;this._modal=this.createModal();this._modal.show(Function.createDelegate(this,this.clearModal))}},clearModal:function(){this._modal.set_content("")},BeaconCall:function(B){var A=document.createElement("img");A.src=B;A.className="trackingpixel"},createModal:function(){var D=document.createElement("iframe");D.src=this._content;D.frameBorder=0;D.setAttribute("width","100%");D.setAttribute("height","100%");var B=MySpace.UI.Popup.create(D,this._title);var C=610;var A=360;B.set_width(C);B._box.childNodes[2].style.height=A+"px";B._box.childNodes[2].style.padding="0px";return B}};MySpace.UI.Pages.Activity.OverlayedActivity.registerClass("MySpace.UI.Pages.Activity.OverlayedActivity",Sys.Component);Type.registerNamespace("MySpace.UI.Home.Events");MySpace.UI.Home.Events.WireWalmartClickTracking=function(){var M=$q(".activityStreamModule .event");var F=MySpace.ClientContext.UserId;var E=new Object();for(var D=0;D<M.length;D++){var B=M[D];var A;var H=$q("a.view-details",B,true);if(H){A=H.href.split("/")[4];$addHandler(H,"click",Function.createDelegate(A,function(N){MySpace.Beacon.Request({et:"events",em:"click",ec:"stream_view_details",eid:this,uid:F,ip:""})}))}var K=$q(".description a",B,true);if(K){$addHandler(K,"click",Function.createDelegate(A,function(N){MySpace.Beacon.Request({et:"events",em:"click",ec:"stream_event_title",eid:this,uid:F,ip:""})}))}var I=$q(".event-img a",B,true);if(I){$addHandler(I,"click",Function.createDelegate(A,function(N){MySpace.Beacon.Request({et:"events",em:"click",ec:"stream_event_image",eid:this,uid:F,ip:""})}))}var G=$q(".rsvp a.yes",B,true);if(G){$addHandler(G,"click",Function.createDelegate(A,function(N){MySpace.Beacon.Request({et:"events",em:"click",ec:"stream_rsvp_yes",eid:this,uid:F,ip:""})}))}var C=$q(".rsvp a.maybe",B,true);if(C){$addHandler(C,"click",Function.createDelegate(A,function(N){MySpace.Beacon.Request({et:"events",em:"click",ec:"stream_rsvp_maybe",eid:this,uid:F,ip:""})}))}var J=$q(".sponsor a",B,true);if(J){$addHandler(J,"click",Function.createDelegate(A,function(N){MySpace.Beacon.Request({et:"events",em:"click",ec:"stream_sponsor_logo",eid:this,uid:F,ip:""})}));if(!E[A]){E[A]=1}else{E[A]++}}}for(var A in E){var L=E[A];MySpace.Beacon.Request({et:"events",em:"impressions",ec:"stream",eid:A,uid:F,ip:"",ic:L})}};
