Type.registerNamespace("MySpace.UI.Pages");MySpace.UI.Pages.UIElement=function(){MySpace.UI.Pages.UIElement.initializeBase(this)};MySpace.UI.Pages.UIElement.prototype={_uid:null,_name:null,_parent:null,_owner:null,_isSelected:false,_title:null,_visible:false,_body:null,_element:null,get_body:function(){return this._body||document.getElementsByTagName("body")[0]},get_element:function(){return this._element},set_element:function(A){this._element=A},get_uid:function(){return this._uid},set_uid:function(A){this._uid=A},get_name:function(){return this._name},set_name:function(A){this._name=A},get_parent:function(){return this._parent},set_parent:function(A){this._parent=A},get_owner:function(){return this._owner},set_owner:function(A){this._owner=A},get_isSelected:function(){return this._isSelected},set_isSelected:function(A){this._isSelected=A;if(this._isSelected){Sys.UI.DomElement.addCssClass(this._element,"selected")}else{Sys.UI.DomElement.removeCssClass(this._element,"selected")}},get_title:function(){return this._title||this._name},set_title:function(A){this._title=A},get_visible:function(){return this._visible},set_visible:function(A){this._visible=A;if(this._element){this._element.style.display=A?"block":"none"}},getText:function(A){if(typeof(MySpaceRes.PageEditor[A])==="undefined"){if(typeof(MySpace.UI.Pages.ResourceName)!="undefined"&&typeof(MySpaceRes[MySpace.UI.Pages.ResourceName][A])!="undefined"){return MySpaceRes[MySpace.UI.Pages.ResourceName][A]}else{return""}}else{return MySpaceRes.PageEditor[A]}},replaceElement:function(B,A){B.parentNode.replaceChild(A,B);return A},removeElement:function(B){var A=B.parentNode;if(A){A.removeChild(B)}},removeChildren:function(A){if(A.hasChildNodes()){while(A.childNodes.length>=1){A.removeChild(A.firstChild)}}},raiseEvent:function(B,A){var C=this.get_events().getHandler(B);if(C){if(!A){A=Sys.EventArgs.Empty}C(this,A)}},createElement:function(A,D,C){var B=document.createElement(A);if(D){B.className=D}if(C){C.appendChild(B)}return B},insertAfter:function(D,B){var C=B.parentNode;var A=B.nextSibling;if(A){C.insertBefore(D,A)}else{C.appendChild(D)}},createElement:function(A,D,C){var B=document.createElement(A);if(D){B.className=D}if(C){C.appendChild(B)}return B},addCssClass:function(A,B){if(!A){return}Sys.UI.DomElement.addCssClass(A,B)},removeCssClass:function(A,B){if(!A){return}Sys.UI.DomElement.removeCssClass(A,B)},dispose:function(){this._uid=null;this._name=null;this._parent=null;this._owner=null;this._isSelected=false;this._title=null;this._visible=false;this._body=null;MySpace.UI.Pages.UIElement.callBaseMethod(this,"dispose")}};MySpace.UI.Pages.UIElement.registerClass("MySpace.UI.Pages.UIElement",Sys.Component);Type.registerNamespace("MySpace.UI.Pages");MySpace.UI.Pages.Control=function(){MySpace.UI.Pages.Control.initializeBase(this)};MySpace.UI.Pages.Control.prototype={_dataSource:null,_runScripts:true,get_dataSource:function(){return this._dataSource},set_dataSource:function(A){this._dataSource=A},get_runScripts:function(){return this._runScripts},set_runScripts:function(A){this._runScripts=A},add_loaded:function(A){this.get_events().addHandler("loaded",A)},remove_loaded:function(A){this.get_events().removeHandler("loaded",A)},initialize:function(){},dispose:function(){this._element=null;MySpace.UI.Pages.Control.callBaseMethod(this,"dispose")},loadContent:function(){MySpace.UI.Pages.Data.request(this._dataSource,this,Function.createDelegate(this,this._onContentLoad),null,null)},setContent:function(A){if(this._element){this._element.innerHTML=A}this._contentLoaded()},_contentLoaded:function(){if(this._runScripts){MySpace.Util.executeScripts(this._element)}if(this._element){MySpace.UI.Pages.resizeObjects(this._element)}this.raiseEvent("loaded")},_onContentLoad:function(A,B){if(A.get_responseAvailable()){this.setContent(A.get_responseData())}}};MySpace.UI.Pages.Control.registerClass("MySpace.UI.Pages.Control",MySpace.UI.Pages.UIElement);Type.registerNamespace("MySpace.UI.Pages");MySpace.UI.Pages.Module=function(){MySpace.UI.Pages.Module.initializeBase(this)};MySpace.UI.Pages.Module.prototype={_typeid:-1,_targetId:null,_handler:null,_parameters:null,_showContainer:null,_isGrouped:false,get_typeid:function(){return this._typeid},set_typeid:function(A){this._typeid=A},get_targetId:function(){return this._targetId},set_targetId:function(A){this._targetId=A},get_handler:function(){return this._handler},set_handler:function(A){this._handler=A},get_parameters:function(){return this._parameters},set_parameters:function(A){this._parameters=A},get_showContainer:function(){return this._showContainer},set_showContainer:function(A){this._showContainer},get_isGrouped:function(){return this._isGrouped},set_isGrouped:function(A){this._isGrouped},initialize:function(){this._handler=this._handler||"Module.ashx";if(this._element){this._bodyElement=$q(".moduleBody",this._element,true)||this._element}},dispose:function(){MySpace.UI.Pages.Module.callBaseMethod(this,"dispose")},loadContent:function(){if(!this._dataSource){var A=String.format("?typeid={0}",this._typeid)+(this._targetId?String.format("&targetid={0}",this._targetId):"")+(this._uid?String.format("&moduleid={0}",this._uid):"");A+=this._addParameters(this._showContainer!==null?"container="+this._showContainer:null);A+=this._addParameters(window.location.search.substring(1));A+=this._addParameters(this._isGrouped?"isGrouped=true":null);A+=this._addParameters(this._parameters);this._dataSource=String.format(this._handler+A)}MySpace.UI.Pages.Module.callBaseMethod(this,"loadContent")},_addParameters:function(A){return A!==null&&A.length>0?"&"+A:""},_onContentLoad:function(A,B){var C=A.get_webRequest().get_userContext();if(A.get_responseAvailable()){if(C._bodyElement){var D=$q(".moduleBodyEnd",C._bodyElement,true);if(D){D.parentNode.removeChild(D)}C._bodyElement.innerHTML=A.get_responseData();if(D){C._bodyElement.appendChild(D)}}else{C._element.innerHTML=A.get_responseData()}C._contentLoaded();if(C._element){Sys.UI.DomElement.removeCssClass(C._element,"noContent")}}}};MySpace.UI.Pages.Module.registerClass("MySpace.UI.Pages.Module",MySpace.UI.Pages.Control);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.Area,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();Type.registerNamespace("MySpace.UI");MySpace.UI.TabNavigation=function(A){this.init(A)};MySpace.UI.TabNavigation.prototype={element:null,tabs:null,moduleBody:null,contentItems:null,hasContentItems:false,init:function(B){this.element=B;this.moduleBody=$q(".moduleBody",this.element,true);this.tabs=$q(".moduleMid2 > nav a",this.element,false);this.contentItems=$q(".tabContent",this.moduleBody,false);this.hasContentItems=this.contentItems.length>0;var A=this;Array.forEach(this.tabs,function(C){$addHandlers(C,{click:A.onTabClick},A)})},onTabClick:function(H){if(H.target.parentNode.className==="dropdown"){return false}var G=null,C=null,B=0,F="";for(var E=0,A=this.tabs.length;E<A;E++){if(this.tabs[E].parentNode===H.target.parentNode&&this.hasContentItems){G=this.contentItems[E]}Sys.UI.DomElement.removeCssClass(this.tabs[E].parentNode,"selected")}Sys.UI.DomElement.addCssClass(H.target.parentNode,"selected");if(this.hasContentItems>0){for(var E=0,A=this.contentItems.length;E<A;E++){if(this.contentItems[E]===G){continue}Sys.UI.DomElement.removeCssClass(this.contentItems[E],"selected")}Sys.UI.DomElement.addCssClass(G,"selected");C=G;B=H.target.getAttribute("data-moduletypeid")}else{C=this.moduleBody;B=this.element.getAttribute("data-mt");F=H.target.getAttribute("data-pivot")}if(B!==null&&B.length!==0){var D=$create(MySpace.UI.Pages.Module,{typeid:B,element:C,isGrouped:this.hasContentItems,runScripts:true});F!==""?D.set_parameters("filter="+F):null;D.loadContent()}H.preventDefault();return false}};(function(){var C=$q(".tabNavigation",null,false);if(C.length>0){for(var B=0,A=C.length;B<A;B++){new MySpace.UI.TabNavigation(C[B])}}})();MySpace.Timer=function(){MySpace.Timer.initializeBase(this);this._interval=1000;this._enabled=false;this._timer=null};MySpace.Timer.prototype={get_interval:function(){return this._interval},set_interval:function(A){if(this._interval!==A){this._interval=A;this.raisePropertyChanged("interval");if(!this.get_isUpdating()&&this._timer!==null){this.restartTimer()}}},get_enabled:function(){return this._enabled},set_enabled:function(A){if(A!==this.get_enabled()){this._enabled=A;this.raisePropertyChanged("enabled");if(!this.get_isUpdating()){if(A){this._startTimer()}else{this._stopTimer()}}}},add_tick:function(A){this.get_events().addHandler("tick",A)},remove_tick:function(A){this.get_events().removeHandler("tick",A)},dispose:function(){this.set_enabled(false);this._stopTimer();MySpace.Timer.callBaseMethod(this,"dispose")},updated:function(){MySpace.Timer.callBaseMethod(this,"updated");if(this._enabled){this.restartTimer()}},_timerCallback:function(){var A=this.get_events().getHandler("tick");if(A){A(this,Sys.EventArgs.Empty)}},restartTimer:function(){this._stopTimer();this._startTimer()},_startTimer:function(){this._timer=window.setInterval(Function.createDelegate(this,this._timerCallback),this._interval)},_stopTimer:function(){window.clearInterval(this._timer);this._timer=null}};MySpace.Timer.registerClass("MySpace.Timer",Sys.Component);Type.registerNamespace("MySpace.UI.Effects");MySpace.UI.Effects.Glitz=function(){throw Error.invalidOperation()};MySpace.UI.Effects.Glitz.interpolate=function(C,B,A,D){if(D){A=100*D(A/100)}return C+(B-C)*(A/100)};MySpace.UI.Effects.Glitz.setElementOpacity=function(B,A){if(B.filters){if(A==1){B.style.cssText=B.style.cssText.replace(/FILTER:[^;]*;?/i,"")}else{B.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+A*100+")"}}else{B.style.opacity=A}};MySpace.UI.Effects.Easing={linear:function(A){return A},quadIn:function(A){return A*A},quadOut:function(A){return A*(A-2)*-1},quadInOut:function(A){A=A*2;if(A<1){return Math.pow(A,2)/2}return -1*((--A)*(A-2)-1)/2},quartIn:function(A){return Math.pow(A,4)},quartOut:function(A){return -1*(Math.pow(A-1,4)-1)},quartInOut:function(A){A=A*2;if(A<1){return Math.pow(A,4)/2}A-=2;return -1/2*(Math.pow(A,4)-2)},circIn:function(A){return -1*(Math.sqrt(1-Math.pow(A,2))-1)},circOut:function(A){A=A-1;return Math.sqrt(1-Math.pow(A,2))},circInOut:function(A){A=A*2;if(A<1){return -1/2*(Math.sqrt(1-Math.pow(A,2))-1)}A-=2;return 1/2*(Math.sqrt(1-Math.pow(A,2))+1)},backIn:function(B){var A=1.70158;return Math.pow(B,2)*((A+1)*B-A)},backOut:function(B){B=B-1;var A=1.70158;return Math.pow(B,2)*((A+1)*B+A)+1},backInOut:function(B){var A=1.70158*1.525;B=B*2;if(B<1){return(Math.pow(B,2)*((A+1)*B-A))/2}B-=2;return(Math.pow(B,2)*((A+1)*B+A)+2)/2},elasticIn:function(C){if(C==0){return 0}if(C==1){return 1}var B=0.3;var A=B/4;C=C-1;return -1*Math.pow(2,10*C)*Math.sin((C-A)*(2*Math.PI)/B)},elasticOut:function(C){if(C==0){return 0}if(C==1){return 1}var B=0.3;var A=B/4;return Math.pow(2,-10*C)*Math.sin((C-A)*(2*Math.PI)/B)+1},elasticInOut:function(C){if(C==0){return 0}C=C*2;if(C==2){return 1}var B=0.3*1.5;var A=B/4;if(C<1){C-=1;return -0.5*(Math.pow(2,10*C)*Math.sin((C-A)*(2*Math.PI)/B))}C-=1;return 0.5*(Math.pow(2,-10*C)*Math.sin((C-A)*(2*Math.PI)/B))+1},bounceIn:function(A){return(1-MySpace.UI.Effects.Easing.bounceOut(1-A))},bounceOut:function(D){var B=7.5625;var C=2.75;var A;if(D<(1/C)){A=B*Math.pow(D,2)}else{if(D<(2/C)){D-=(1.5/C);A=B*Math.pow(D,2)+0.75}else{if(D<(2.5/C)){D-=(2.25/C);A=B*Math.pow(D,2)+0.9375}else{D-=(2.625/C);A=B*Math.pow(D,2)+0.984375}}}return A},bounceInOut:function(A){if(A<0.5){return MySpace.UI.Effects.Easing.bounceIn(A*2)/2}return(MySpace.UI.Effects.Easing.bounceOut(A*2-1)/2)+0.5}};MySpace.UI.Effects.Animation=function(){MySpace.UI.Effects.Animation.initializeBase(this)};MySpace.UI.Effects.Animation.prototype={_duration:1,_fps:25,_target:null,_tickHandler:null,_timer:null,_percentComplete:0,_percentDelta:null,_parentAnimation:null,get_duration:function(){return this._duration},set_duration:function(A){this._duration=A},get_fps:function(){return this._fps},set_fps:function(A){this._fps=A},get_isActive:function(){return this._timer!==null},get_isPlaying:function(){return this._timer!==null&&this._timer.get_enabled()},get_percentComplete:function(){return this._percentComplete},get_target:function(){return this._target},set_target:function(A){this._target=A},add_ended:function(A){this.get_events().addHandler("ended",A)},remove_ended:function(A){this.get_events().removeHandler("ended",A)},add_started:function(A){this.get_events().addHandler("started",A)},remove_started:function(A){this.get_events().removeHandler("started",A)},dispose:function(){if(this._timer){this._timer.dispose();this._timer=null}this._tickHandler=null;this._target=null;MySpace.UI.Effects.Animation.callBaseMethod(this,"dispose")},getAnimatedValue:function(){throw Error.notImplemented()},onEnd:function(){},onStart:function(){},onStep:function(A){this.setValue(this.getAnimatedValue(A))},pause:function(){if(!this._parentAnimation){if(this._timer){this._timer.set_enabled(false);this.raisePropertyChanged("isPlaying")}}},play:function(){if(!this._parentAnimation){var A=true;if(!this._timer){A=false;if(!this._tickHandler){this._tickHandler=Function.createDelegate(this,this._onTimerTick)}this._timer=new MySpace.Timer;this._timer.set_interval(1000/this._fps);this._timer.add_tick(this._tickHandler);this._percentDelta=100/(this._duration*this._fps);this.onStart();this._updatePercentComplete(0,true)}this._timer.set_enabled(true);this.raisePropertyChanged("isPlaying");if(!A){this.raisePropertyChanged("isActive")}}},setOwner:function(A){this._parentAnimation=A},setValue:function(){throw Error.notImplemented()},stop:function(){if(!this._parentAnimation){var A=this._timer;this._timer=null;if(A){A.dispose();this._updatePercentComplete(100);this.onEnd();var B=this.get_events().getHandler("ended");if(B){B(this,null)}this.raisePropertyChanged("isPlaying");this.raisePropertyChanged("isActive")}}},_onTimerTick:function(){this._updatePercentComplete(this._percentComplete+this._percentDelta,true)},_updatePercentComplete:function(B,A){if(B>100){B=100}this._percentComplete=B;this.raisePropertyChanged("percentComplete");if(A){this.onStep(B)}if(B===100){this.stop()}}};MySpace.UI.Effects.Animation.registerClass("MySpace.UI.Effects.Animation",Sys.Component);MySpace.UI.Effects.PropertyAnimation=function(){MySpace.UI.Effects.PropertyAnimation.initializeBase(this)};MySpace.UI.Effects.PropertyAnimation.prototype={_property:null,_propertyKey:null,get_property:function(){return this._property},set_property:function(A){this._property=A},get_propertyKey:function(){return this._propertyKey},set_propertyKey:function(A){this._propertyKey=A},add_ended:function(A){this.get_events().addHandler("ended",A)},remove_ended:function(A){this.get_events().removeHandler("ended",A)},add_started:function(A){this.get_events().addHandler("started",A)},remove_started:function(A){this.get_events().removeHandler("started",A)},setValue:function(A){if(this._propertyKey){this.get_target()[this._property][this._propertyKey]=A}else{this.get_target()[this._property]=A}}};MySpace.UI.Effects.PropertyAnimation.registerClass("MySpace.UI.Effects.PropertyAnimation",MySpace.UI.Effects.Animation);MySpace.UI.Effects.InterpolatedAnimation=function(){MySpace.UI.Effects.InterpolatedAnimation.initializeBase(this)};MySpace.UI.Effects.InterpolatedAnimation.prototype={_startValue:null,_endValue:null,_easingFunction:null,get_endValue:function(){return this._endValue},set_endValue:function(A){this._endValue=A},get_startValue:function(){return this._startValue},set_startValue:function(A){this._startValue=A},get_easingFunction:function(){return this._easingFunction},set_easingFunction:function(A){this._easingFunction=A}};MySpace.UI.Effects.InterpolatedAnimation.registerClass("MySpace.UI.Effects.InterpolatedAnimation",MySpace.UI.Effects.PropertyAnimation);MySpace.UI.Effects.DiscreteAnimation=function(){MySpace.UI.Effects.DiscreteAnimation.initializeBase(this);this._values=[]};MySpace.UI.Effects.DiscreteAnimation.prototype={get_values:function(){return this._values},set_values:function(A){this._values=A},getAnimatedValue:function(B){var A=Math.round(B/100*(this._values.length-1));return this._values[A]}};MySpace.UI.Effects.DiscreteAnimation.registerClass("MySpace.UI.Effects.DiscreteAnimation",MySpace.UI.Effects.PropertyAnimation);MySpace.UI.Effects.NumberAnimation=function(){MySpace.UI.Effects.NumberAnimation.initializeBase(this)};MySpace.UI.Effects.NumberAnimation.prototype={_integralValues:false,get_integralValues:function(){return this._integralValues},set_integralValues:function(A){this._integralValues=A},getAnimatedValue:function(B){var A=MySpace.UI.Effects.Glitz.interpolate(this.get_startValue(),this.get_endValue(),B,this.get_easingFunction());if(this._integralValues){A=Math.round(A)}return A}};MySpace.UI.Effects.NumberAnimation.registerClass("MySpace.UI.Effects.NumberAnimation",MySpace.UI.Effects.InterpolatedAnimation);MySpace.UI.Effects.LengthAnimation=function(){MySpace.UI.Effects.LengthAnimation.initializeBase(this)};MySpace.UI.Effects.LengthAnimation.prototype={_unit:"px",get_unit:function(){return this._unit},set_unit:function(A){this._unit=A},getAnimatedValue:function(B){var A=MySpace.UI.Effects.Glitz.interpolate(this.get_startValue(),this.get_endValue(),B,this.get_easingFunction());return Math.round(A)+this._unit}};MySpace.UI.Effects.LengthAnimation.registerClass("MySpace.UI.Effects.LengthAnimation",MySpace.UI.Effects.InterpolatedAnimation);MySpace.UI.Effects.CompositeAnimation=function(){MySpace.UI.Effects.CompositeAnimation.initializeBase(this);this._animations=[]};MySpace.UI.Effects.CompositeAnimation.prototype={get_animations:function(){return this._animations},add_animation:function(A){this._animations.push(A)},getAnimatedValue:function(){throw Error.invalidOperation()},dispose:function(){for(var A=0;A<this._animations.length;A++){this._animations[A].dispose()}this._animations=null;MySpace.UI.Effects.CompositeAnimation.callBaseMethod(this,"dispose")},onEnd:function(){for(var A=0;A<this._animations.length;A++){this._animations[A].onEnd()}},onStart:function(){for(var A=0;A<this._animations.length;A++){this._animations[A].onStart()}},onStep:function(A){for(var B=0;B<this._animations.length;B++){this._animations[B].onStep(A)}}};MySpace.UI.Effects.CompositeAnimation.registerClass("MySpace.UI.Effects.CompositeAnimation",MySpace.UI.Effects.Animation);MySpace.UI.Effects.ColorAnimation=function(G,F,E,D,C,B,A){MySpace.UI.Effects.ColorAnimation.initializeBase(this,[G,F,E,D,C,B,A]);this._start=null;this._end=null;this._interpolateRed=false;this._interpolateGreen=false;this._interpolateBlue=false};MySpace.UI.Effects.ColorAnimation.prototype={onStart:function(){MySpace.UI.Effects.ColorAnimation.callBaseMethod(this,"onStart");this._start=MySpace.UI.Effects.ColorAnimation.getRGB(this.get_startValue());this._end=MySpace.UI.Effects.ColorAnimation.getRGB(this.get_endValue());this._interpolateRed=(this._start.Red!=this._end.Red);this._interpolateGreen=(this._start.Green!=this._end.Green);this._interpolateBlue=(this._start.Blue!=this._end.Blue)},getAnimatedValue:function(B){var D=this._start.Red;var C=this._start.Green;var A=this._start.Blue;if(this._interpolateRed){D=Math.round(MySpace.UI.Effects.Glitz.interpolate(D,this._end.Red,B,this.get_easingFunction()))}if(this._interpolateGreen){C=Math.round(MySpace.UI.Effects.Glitz.interpolate(C,this._end.Green,B,this.get_easingFunction()))}if(this._interpolateBlue){A=Math.round(MySpace.UI.Effects.Glitz.interpolate(A,this._end.Blue,B,this.get_easingFunction()))}return MySpace.UI.Effects.ColorAnimation.toColor(D,C,A)},set_startValue:function(A){if(this._startValue!=A){this._startValue=A;this.raisePropertyChanged("startValue")}},set_endValue:function(A){if(this._endValue!=A){this._endValue=A;this.raisePropertyChanged("endValue")}}};MySpace.UI.Effects.ColorAnimation.getRGB=function(A){if(!A||A.length!=7){throw String.format(AjaxControlToolkit.Resources.Animation_InvalidColor,A)}return{Red:parseInt(A.substr(1,2),16),Green:parseInt(A.substr(3,2),16),Blue:parseInt(A.substr(5,2),16)}};MySpace.UI.Effects.ColorAnimation.toColor=function(F,E,B){var D=F.toString(16);var C=E.toString(16);var A=B.toString(16);if(D.length==1){D="0"+D}if(C.length==1){C="0"+C}if(A.length==1){A="0"+A}return"#"+D+C+A};MySpace.UI.Effects.ColorAnimation.registerClass("MySpace.UI.Effects.ColorAnimation",MySpace.UI.Effects.InterpolatedAnimation);MySpace.UI.Effects.FadeEffect=function(){throw Error.invalidOperation()};MySpace.UI.Effects.FadeEffect.prototype={FadeIn:0,FadeOut:1};MySpace.UI.Effects.FadeEffect.registerEnum("MySpace.UI.Effects.FadeEffect");MySpace.UI.Effects.FadeAnimation=function(){MySpace.UI.Effects.FadeAnimation.initializeBase(this)};MySpace.UI.Effects.FadeAnimation.prototype={_effect:MySpace.UI.Effects.FadeEffect.FadeIn,get_effect:function(){return this._effect},set_effect:function(A){this._effect=A},getAnimatedValue:function(C){var B=0,A=1;if(this._effect===MySpace.UI.Effects.FadeEffect.FadeOut){B=1;A=0}return MySpace.UI.Effects.Glitz.interpolate(B,A,C)},onStart:function(){var A=0;if(this._effect===MySpace.UI.Effects.FadeEffect.FadeOut){A=1}this.setValue(A);if(A==0){this.get_target().style.visibility="visible"}},onEnd:function(){var A=1;if(this._effect===MySpace.UI.Effects.FadeEffect.FadeOut){A=0}this.setValue(A);if(A==0){this.get_target().style.visibility="hidden"}},setValue:function(A){MySpace.UI.Effects.Glitz.setElementOpacity(this.get_target(),A)}};MySpace.UI.Effects.FadeAnimation.registerClass("MySpace.UI.Effects.FadeAnimation",MySpace.UI.Effects.Animation);MySpace.UI.Effects.SlideEffect=function(){throw Error.invalidOperation()};MySpace.UI.Effects.SlideEffect.prototype={SlideIn:0,SlideOut:1};MySpace.UI.Effects.SlideEffect.registerEnum("MySpace.UI.Effects.SlideEffect");MySpace.UI.Effects.SlidingAnimation=function(){MySpace.UI.Effects.SlidingAnimation.initializeBase(this)};MySpace.UI.Effects.SlidingAnimation.prototype={_effect:MySpace.UI.Effects.SlideEffect.SlideIn,get_effect:function(){return this._effect},set_effect:function(A){this._effect=A},initialize:function(){this.get_target().style.overflow="hidden";var A=this.get_target().style.display;this.get_target().style.display="block";this.set_property("style");this.set_propertyKey("height");if(this._effect===MySpace.UI.Effects.SlideEffect.SlideIn){this.set_startValue(MySpace.UI.getContentBox(this.get_target()).h);this.set_endValue(0)}else{this.set_startValue(0);this.set_endValue(MySpace.UI.getContentBox(this.get_target()).h)}this.get_target().style.display=A},onStart:function(){if(this._effect===MySpace.UI.Effects.SlideEffect.SlideOut){this.get_target().style.display="block"}},onEnd:function(){if(this._effect===MySpace.UI.Effects.SlideEffect.SlideIn){this.get_target().style.display="none"}}};MySpace.UI.Effects.SlidingAnimation.registerClass("MySpace.UI.Effects.SlidingAnimation",MySpace.UI.Effects.LengthAnimation);Type.registerNamespace("MySpace.UI.Pages.PageEditor.Pagination");MySpace.UI.Pages.PageEditor.Pagination.Wire=function(A){if(typeof(A)=="string"){A=$q(A,null,true)}var D=$q(".pagination",A);if(D===null||D.length===0){return}var H=function(K){var L=this.parentNode.parentNode.parentNode;L.loading=false;var I=L.getAttribute("data-containerselector");if(I==null||I==""){return}var J=$q(I,null,true);MySpace.Util.setInnerHtml(J,null,K.get_responseData(),true);Sys.UI.DomElement.removeCssClass(J,"paginatorLoading")};var G=function(N){N.preventDefault();var K=0;if(Sys.UI.DomElement.containsCssClass(this,"disabled")){return}var P=this.parentNode.parentNode.parentNode;if(P.loading){return}P.loading=true;var M=parseInt($q("a.selected",this.parentNode.parentNode,true).innerHTML);if(Sys.UI.DomElement.containsCssClass(this,"prevBtn")){K=M-1}else{if(Sys.UI.DomElement.containsCssClass(this,"nextBtn")){K=M+1}else{K=parseInt(this.innerHTML)}}var L=P.getAttribute("data-handler");var O=P.getAttribute("data-handlerparams");MySpace.UI.Pages.Data.request(String.format("{0}.ashx",L),null,Function.createDelegate(this,H),String.format("PageNo={0}{1}{2}",K,O==null||O==""?"":"&",O),null);var I=P.getAttribute("data-containerselector");if(I!=null&&I!=""){var J=$q(I,null,true);Sys.UI.DomElement.addCssClass(J,"paginatorLoading")}};for(var E=0;E<D.length;E++){if(!D[E].wired){D[E].wired=true;var F=D[E].getAttribute("data-handler");if(F!=null&&F!=""){var B=$q("li a",D[E]);for(var C=0;C<B.length;C++){$addHandler(B[C],"click",Function.createDelegate(B[C],G))}}}}};Type.registerNamespace("MySpace.UI.Pages.PageEditor.More");MySpace.UI.Pages.PageEditor.More.Wire=function(C){var B=function(H){var I=Sys.UI.DomElement.getBounds(H);H.style.height=I.height+"px";H.style.overflow="hidden";H.primaryHeight=I.height};var D=function(I,L,H){var J=Sys.UI.DomElement.getBounds(I);if(!H){I.style.height="";H=Sys.UI.DomElement.getBounds(I).height;I.style.height=J.height+"px"}var K=$create(MySpace.UI.Effects.LengthAnimation,{target:I,property:"style",propertyKey:"height",startValue:J.height,endValue:H,duration:0.2,fps:20,easingFunction:MySpace.UI.Effects.Easing.quartInOut,onEnd:function(){L.inProgress=false;I.style.height="";I.style.overflow=""}});K.play()};var G=function(M){var H=document.createElement("div");H.style.display="none";H.innerHTML=M.get_responseData();var O=this.getAttribute("data-moduleselector");var P=this.getAttribute("data-listselector");var L=$q(O,null,true);var N=$q(P,L,true);N.parentNode.appendChild(H);var K=$q(P,H,true);B(N);while(K.firstChild!=null){N.appendChild(K.firstChild)}var I=$q(".morePagerMore .moreBtn",H,true);if(I===null){Sys.UI.DomElement.addCssClass(this.parentNode.parentNode,"noMore")}else{var J=I.getAttribute("data-lastid");this.setAttribute("data-lastid",J)}N.parentNode.removeChild(H);MySpace.Util.executeScripts(H);D(N,this);Sys.UI.DomElement.removeCssClass(this.parentNode.parentNode,"moreLoading")};var F=function(L){L.preventDefault();if(this.inProgress){return}this.inProgress=true;var M=this.getAttribute("data-moduleselector");var N=this.getAttribute("data-listselector");var I=$q(M+" "+N,null,true);if(I==null){return}var P=this.getAttribute("data-handler");if(P!==null&&P!==""){var J=this.getAttribute("data-handlerparams");var H=this.getAttribute("data-lastid");if(H!==null&&H!=""){H="lastid="+H}J=J+(J!==null&&J!==""&&H!==null&&H!==""?"&":"")+H;MySpace.UI.Pages.Data.request(String.format("{0}.ashx",P),null,Function.createDelegate(this,G),J,null);Sys.UI.DomElement.addCssClass(this.parentNode.parentNode,"moreLoading");return}var Q=$q(".lessText",this,true);if(I.primaryHeight&&Q){D(I,this,I.primaryHeight);var O=$q(".lessContent",I);for(var K=0;K<O.length;K++){Sys.UI.DomElement.removeCssClass(O[K],"lessContent");Sys.UI.DomElement.addCssClass(O[K],"moreContent")}Sys.UI.DomElement.removeCssClass(this.parentNode.parentNode,"expanded");I.primaryHeight=null}else{B(I);var O=$q(".moreContent",I);for(var K=0;K<O.length;K++){Sys.UI.DomElement.removeCssClass(O[K],"moreContent");Sys.UI.DomElement.addCssClass(O[K],"lessContent")}D(I,this);Sys.UI.DomElement.addCssClass(this.parentNode.parentNode,Q?"expanded":"noMore")}};if(typeof(C)=="string"){C=$q(C,null,true)}var A=$q(".morePagerMore .moreBtn",C);for(var E=0;E<A.length;E++){if(!A[E].wired){A[E].wired=true;$addHandler(A[E],"click",Function.createDelegate(A[E],F))}}};Type.registerNamespace("MySpace.UI.Pages.Home.PYMK");MySpace.UI.Pages.Home.PYMK.Initialize=function(){var B=function(L){var K=L.getAttribute("class")||L.getAttribute("className");if(!K){return"0"}var N=0;N=K.indexOf("userInfo")+8;var M=K.indexOf(" ",N);if(M<0){M=K.length}return K.substring(N,M)};var H=function(L,K,M){if(!MySpace.Application.keyDisabled("DWBeaconPYMK")){MySpace.Beacon.Request({friendid:MySpace.ClientContext.UserId,reqfriendid:L,index:K,type:M})}if(M=="add"){if(window.pageTracker){pageTracker._trackPageview("/outgoing/friendadd")}if(window.pymkTracker){pymkTracker._trackPageview("/outgoing/friendadd")}}};var E=function(L,K){H(L,K,"remove");MySpace.UI.Pages.Data.request(String.format("RemovePYMK.ashx?userId={0}",L),null,C,null,null)};var C=function(K){var P=0;if(K.get_responseAvailable()){P=K.get_responseData();if(P>0){var L=$q(".pymkContainer .userInfo"+P);for(var O=0;O<L.length;O++){L[O].innerHTML=MySpaceRes.SiteSearch.Removed;Sys.UI.DomElement.addCssClass(L[O],"removeMessage");var M=L[O].parentNode.parentNode;var N=$q(".error",M,true);if(N!=null){N.style.display="none"}}}else{var N=$q(".pymkContainer .error");for(var O=0;O<N.length;O++){N[O].style.display="block"}}}};var A=$q(".pymkContainer .user");for(var D=0;D<A.length;D++){if(A[D].wired){continue}var F=B(A[D]);MySpace.UI.AddFriendPopup.bind(".userInfo"+F+" a.addToFriends");var I=$q(".close",A[D],true);if(I!=null){$addHandler(I,"click",Function.createCallback(function(L,K){E(K.userId,K.index)},{userId:F,index:D}))}var J=$q(".tooltip",A[D],true);if(J!=null){$create(MySpace.UI.Tooltip,{content:J.innerHTML,cssClass:"pymkTooltip",tipPos:"bottomleft",autoPos:false,hideDelay:0,width:180},null,null,J.parentNode);J.parentNode.removeChild(J)}var G=$q(".addToFriends",A[D],true);if(G!=null){$addHandler(G,"click",Function.createDelegate(function(L,K){H(K.userId,K.index,"add")},{userId:F,index:D}))}A[D].wired=true}};MySpace.UI.getViewportBounds=function(){return{width:self.innerWidth||(document.documentElement.clientWidth||document.body.clientWidth),height:self.innerHeight||(document.documentElement.clientHeight||document.body.clientHeight),x:window.pageXOffset||(document.documentElement.scrollLeft||document.body.scrollLeft),y:window.pageYOffset||(document.documentElement.scrollTop||document.body.scrollTop)}};MySpace.UI.getPercentVisible=function(D){var E=Sys.UI.DomElement.getBounds(D);var G=MySpace.UI.getViewportBounds();if(E.height===0||E.width===0){return 0}var B=G.y-E.y;B=(B<0)?0:(B>E.height?E.height:B);var A=G.y+G.height-E.y;A=(A>E.height)?E.height:A;var C=G.x-E.x;C=(C<0)?0:(C>E.width?E.width:C);var F=G.x+G.width-E.x;F=(F>E.width)?E.width:F;return((A-B)/E.height)*((F-C)/E.width)};MySpace.UI||(MySpace.UI={});MySpace.UI.UserActionWatcher=(function(){var A=MySpace.ClientIntMaintenanceConfigs.useractionwatcher,G=MySpace.ClientContext.FunctionalContext,D=!A||(A.enabled&&(!A[G]||A[G].enabled)),H=[],C=[],F=MySpace.UI.getPercentVisible,B=+new Date,E=function(){if(+new Date-B<2000){return}B=+new Date;Array.forEach(C,function(J){if(F($get(J[0]))>=0.5){generateAd.apply(this,J)}});if(window.google_ad_url){var I=$q(".googleafc")[0];if(!I){return}I.parentNode.removeChild(I);MySpace.UI.addScript(window.google_ad_url+"&"+(+new Date))}};if(!A||A.enabled){window.sdc_wrapper=function(){if(Array.contains(H,arguments[0])&&!Array.find(C,function(I){return I[0]===arguments[0]})){C.push(arguments)}generateAd.apply(this,arguments)}}return{discover:function(J){if(A&&!A.enabled){return}var I=$q(".action",J);Array.forEach(I,function(K){$addHandler(K,"click",E)})},setAdTypes:function(I){H=arguments},onUserAction:E}})();MySpace.UI.UserActionWatcher.setAdTypes("tkn_medrec");MySpace.UI.UserActionWatcher.discover();(function(B){var A={_bgImageStretch:B(".wrap #stretchedBgImage"),_bgSize:{width:0,height:0,ratio:0,stretchWidth:0,stretchHeight:0},stretchBg:function(){this.resizeBGImage();$addHandler(window,"resize",Function.createDelegate(this,this.resizeBGImage));this._bgImageStretch.css("visibility","visible")},resizeBGImage:function(){this.measureSize();if(!(this._bgSize.ratio>0)){return}var E=B(window).height();var C=B(window).width();var D=null;if(this._bgSize.ratio<1){D=this.doResizePortrait(C,E)}else{D=this.doResizeLandscape(C,E)}this._bgImageStretch.css({width:(D.scale*this._bgSize.width)+"px",height:(D.scale*this._bgSize.height)+"px",left:D.left+"px",top:D.top+"px"})},measureSize:function(C){this._bgSize.height=this._bgImageStretch.height();this._bgSize.width=this._bgImageStretch.width();this._bgSize.ratio=(this._bgImageStretch.height()>0&&this._bgImageStretch.width()>0)?(this._bgImageStretch.width()/this._bgImageStretch.height()):0},doResizeLandscape:function(C,E){var F=E/this._bgSize.height;if((F*this._bgSize.width)<C){F=C/this._bgSize.width}var D=C/E;return{scale:F,left:((D<this._bgSize.ratio)?(Math.floor((C-F*this._bgSize.width)/2)):0),top:0}},doResizePortrait:function(C,E){var F=C/this._bgSize.width;if((F*this._bgSize.height)<E){F=E/this._bgSize.height}var D=C/E;return{scale:F,left:0,top:((D<(1/this._bgSize.ratio))?(Math.floor((E-F*this._bgSize.height)/2)):0)}}};if(A._bgImageStretch.length>0){A.stretchBg()}})(jQuery);Zenbox={render:function(){var A=function(){return Math.max(Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),Math.max(document.body.offsetHeight,document.documentElement.offsetHeight),Math.max(document.body.clientHeight,document.documentElement.clientHeight))};var C=function(){var D={};D.left=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft;D.top=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;return(D)};if(!Zenbox.is_loaded){Zenbox.is_loaded=true;var B="http://myspace.zendesk.com/external/zenbox/index?x=5";if(zenbox_params.tag){B+="&set_tags="+escape(zenbox_params.tag)}if(MySpaceRes.ProfileDisplayV3.Zenbox_SubjectHeader){B+="&subject="+escape(MySpaceRes.ProfileDisplayV3.Zenbox_SubjectHeader)}if(MySpaceRes.ProfileDisplayV3.Zenbox_EmailHeader){B+="&email="+escape(MySpaceRes.ProfileDisplayV3.Zenbox_EmailHeader)}if(window.location){B+="&page="+escape(window.location.href)}document.getElementById("zenbox_overlay").innerHTML='<div id="zenbox_main"><div id="overlay_header"><span onclick="document.getElementById(\'zenbox_overlay\').style.display = \'none\';return false">'+MySpaceRes.ProfileDisplayV3.Zenbox_Close+' </span></div><div id="overlay_preamble"><h2 id="overlay_zenbox_title">'+MySpaceRes.ProfileDisplayV3.Zenbox_Title+'</h2><p id="overlay_zenbox_text">'+zenbox_params.text+'</p></div><div id="overlay_loading"><center><h2><img src="//assets0.zendesk.com/images/medium_load.gif"/> Loading...</h2></center><br>&nbsp;</div><iframe src="'+B+'" id="zenbox_iframe" frameborder="0" scrolling="no" allowTransparency="true" style="border:0;"></iframe></div><div id="zenbox_screen" onclick="document.getElementById(\'zenbox_overlay\').style.display = \'none\';return false" ></div>';if(document.getElementById("zenbox_iframe").attachEvent){document.getElementById("zenbox_iframe").attachEvent("onload",Zenbox.done)}else{if(document.getElementById("zenbox_iframe").addEventListener){document.getElementById("zenbox_iframe").addEventListener("load",Zenbox.done,false)}}}document.getElementById("zenbox_overlay").style.height=document.getElementById("zenbox_screen").style.height=A()+"px";document.getElementById("zenbox_main").style.top=C().top+50+"px";document.getElementById("zenbox_overlay").style.display="block"},done:function(){document.getElementById("overlay_loading").style.display="none";document.getElementById("zenbox_iframe").style.display="block"},capture:function(){document.write('<div id="zenbox_overlay" style="display:none">&nbsp;</div>');document.write('<style type="text/css">a#zenbox_tab { background-color: black; border-color: black; }</style><a href="#" id="zenbox_tab" onclick="Zenbox.render(); return false;">Support</a>');var C=navigator.appVersion.split("MSIE");var A=parseFloat(C[1]);var B="http://assets0.zendesk.com/external/zenbox/images/tab_feedback.png";if((A>=5.5)&&(A<7)&&(document.body.filters)){document.getElementById("zenbox_tab").style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+B+"', sizingMethod='crop')"}else{document.getElementById("zenbox_tab").style.backgroundImage="url("+B+")"}}};(function(){var A=null;var D=function(){if(A){A.show()}else{A=$create(MySpace.UI.MediaSelector,{mediaType:MySpace.UI.MediaType.Photos,title:MySpaceRes.ProfileEdit.SelectYourDefaultPhoto,showExternalMedia:false,initialTabIdx:2},{itemSelected:C},null,null);setTimeout(A.show,5000)}};var C=function(F,G){var E=$q(".userInfo .profilePic",null,true);E.src=G.imgurl;MySpace.UI.Pages.Data.request("UpdateDefaultPhoto.ashx",this,null,String.format("imgid={0}",G.itemid),null)};var B=$q(".userInfo .contactLinks .defaultPhoto",null,true);if(B!=null){$addHandler(B,"click",Function.createDelegate(B,D))}})();(function(A){A(".gapSuggestFriends").click(function(B){if(!MySpace.ClientContext.IsLoggedIn){MySpace.enforceLogin();return}if(!this.popper){var C=new MySpace.UI.Popup.IFrameContent(this.innerHTML,784,this.href,"friendSuggestionPopupContainer");window.friendSuggestionPopup=C.get_popup();this.popper=C;C.show()}else{this.popper.show()}B.preventDefault()});A(".gapSendIM").click(function(B){B.preventDefault();MySpace.invokeWebIMWrapper(A(this).attr("data-userId"))});A(".gapAddComment").click(MySpace.UI.ProfileCommentQuickPostPopup.show);A(".gapFollowVideos").click(function(B){B.preventDefault();if(!MySpace.ClientContext.IsLoggedIn){MySpace.enforceLogin();return}var C=A(this).hasClass("following");MySpace.UI.Pages.Data.request((C?"UnFollowArtist.ashx":"FollowArtist.ashx")+"?friendId="+A(this).attr("data-userId"),this,Function.createDelegate(this,function(D,F){if(D.get_responseAvailable()){var G=D.get_responseData();if(G!=" "){var E=Sys.Serialization.JavaScriptSerializer.deserialize(G);if(E.ServerResponse.IsRequestSuccessful){A(this).toggleClass("following notFollowing");var H=A(this).hasClass("following");A(this).html(A(this).html().replace(MySpaceRes.Common[!H?"Global_Unfollow_Text":"Global_Follow_Text"],MySpaceRes.Common[H?"Global_Unfollow_Text":"Global_Follow_Text"]));A(".gapActionTip",this).html(A(".gapActionTip",this).html().replace(MySpaceRes.Common[!H?"Global_Unfollow_User_Videos_Tip":"Global_Follow_User_Videos_Tip"],MySpaceRes.Common[H?"Global_Unfollow_User_Videos_Tip":"Global_Follow_User_Videos_Tip"]))}}}}),null,null)})})(jQuery);(function(A){A(".marqueeModule .expandBar").click(function(B){var C=A(".marqueeContent");if(A(this).hasClass("expanded")){A(this).removeClass("expanded");C.animate({height:C.attr("data-collapsedHeight")})}else{A(this).addClass("expanded");C.attr("data-collapsedHeight",C.css("height").replace("px",""));C.animate({height:C.attr("data-maxHeight")})}})})(jQuery);
