Ajax.implement({onComplete:function(){if(this.options.update){$(this.options.update).empty().setHTML(this.response.text)}if(this.options.evalScripts||this.options.evalResponse){this.evalScripts()}if(this.response.text.contains("auth_error")){CD.Conf.unAuth=true;window.location.href=CD.Conf.path+"login.php"}else{this.fireEvent("onComplete",[this.response.text,this.response.xml],20)}}});Element.extend({hide:function(){return this.setStyle("visibility","hidden")},show:function(){return this.setStyle("visibility","visible")},getValue:function(){switch(this.getTag()){case"select":var A=[];$each(this.options,function(B){if(B.selected){A.push($pick(B.value,B.text))}});return this.multiple?A:A[0];case"input":if(!(this.checked&&["checkbox","radio"].contains(this.type))&&!["hidden","text","password"].contains(this.type)){break}case"textarea":return this.value;case"div":if(this.getProperty("contenteditable")){return this.innerHTML}default:}return false}});Array.extend({rgbToHsb:function(){var B=this[0],C=this[1],J=this[2],G=0;var I=Math.max(B,C,J),E=Math.min(B,C,J);var K=I-E;var H=I/255,F=(I!=0)?K/I:0;if(F!=0){var D=(I-B)/K;var A=(I-C)/K;var L=(I-J)/K;if(B==I){G=L-A}else{if(C==I){G=2+D-L}else{G=4+A-D}}G/=6;if(G<0){G++}}return[Math.round(G*360),Math.round(F*100),Math.round(H*100)]},hsbToRgb:function(){var C=Math.round(this[2]/100*255);if(this[1]==0){return[C,C,C]}else{var A=this[0]%360;var E=A%60;var F=Math.round((this[2]*(100-this[1]))/10000*255);var D=Math.round((this[2]*(6000-this[1]*E))/600000*255);var B=Math.round((this[2]*(6000-this[1]*(60-E)))/600000*255);switch(Math.floor(A/60)){case 0:return[C,B,F];case 1:return[D,C,F];case 2:return[F,C,B];case 3:return[F,D,C];case 4:return[B,F,C];case 5:return[C,F,D]}}return false}});String.extend({rgbToHsb:function(){var A=this.match(/\d{1,3}/g);return(A)?A.rgbToHsb():null},hsbToRgb:function(){var A=this.match(/\d{1,3}/g);return(A)?A.hsbToRgb():null}});CD.DropdownMenu=new Class({state:null,value:null,initialize:function(A){if($defined(A)){this.element=A.getFirst().getNext();this.elementValue=A.getFirst();this.value=this.elementValue.innerHTML;this.elementValue.addEvent("mouseover",function(){clearInterval(CD.Conf.menuScopeTimer);this.element.show();return false}.bind(this));this.elementValue.addEvent("mouseout",function(){clearInterval(CD.Conf.menuScopeTimer);CD.Conf.menuScopeTimer=setTimeout(this.element.hide.bind(this.element),1000)}.bind(this));this.element.getElements("a").each(function(C,B){C.addEvent("mouseover",function(){clearInterval(CD.Conf.menuScopeTimer);return false});C.addEvent("mouseup",function(){clearInterval(CD.Conf.menuScopeTimer);this.element.hide();return false}.bind(this));C.addEvent("mousedown",function(D){new Event(D).stop();this.elementValue.innerHTML=C.innerHTML;this.value=C.innerHTML;this.state=B}.bind(this))}.bind(this));this.element.hide();this.element.addEvent("mouseout",function(){clearInterval(CD.Conf.menuScopeTimer);CD.Conf.menuScopeTimer=setTimeout(this.element.hide.bind(this.element),1000)}.bind(this))}return this}});CD.Observer=new Class({options:{periodical:false,delay:1000},initialize:function(C,A,B){this.setOptions(B);this.addEvent("onFired",A);this.element=$(C);this.listener=this.fired.bind(this);this.value=this.element.getValue();if(this.options.periodical){this.timer=this.listener.periodical(this.options.periodical)}else{this.element.addEvent("keyup",this.listener)}},fired:function(){var A=this.element.getValue();if(this.value==A){return }this.clear();this.value=A;this.timeout=this.fireEvent.delay(this.options.delay,this,["onFired",[A]])},clear:function(){$clear(this.timeout);return this}});CD.Observer.implement(new Options);CD.Observer.implement(new Events);CD.Autocompleter={};CD.Autocompleter.Base=new Class({options:{minLength:1,useSelection:true,markQuery:true,inheritWidth:true,maxChoices:10,injectChoice:null,onSelect:Class.empty,onShow:Class.empty,onHide:Class.empty,customTarget:null,className:"autocompleter-choices",zIndex:42,observerOptions:{},fxOptions:{},overflown:[]},initialize:function(B,A){this.setOptions(A);this.element=$(B);this.build();this.observer=new CD.Observer(this.element,this.prefetch.bind(this),$merge({delay:400},this.options.observerOptions));this.value=this.observer.value;this.queryValue=null},build:function(){if($(this.options.customTarget)){this.choices=this.options.customTarget}else{this.choices=new Element("div",{"class":this.options.className,styles:{zIndex:this.options.zIndex}}).injectInside(document.body);this.fix=new CD.OverlayFix(this.choices)}this.fx=this.choices.effect("opacity",$merge({wait:false,duration:200},this.options.fxOptions)).addEvent("onStart",function(){if(this.fx.now){return }this.choices.setStyle("display","");this.fix.show()}.bind(this)).addEvent("onComplete",function(){if(this.fx.now){return }this.choices.setStyle("display","none");this.fix.hide()}.bind(this)).set(0);this.element.setProperty("autocomplete","off").addEvent(window.ie?"keydown":"keypress",this.onCommand.bindWithEvent(this)).addEvent("mousedown",this.onCommand.bindWithEvent(this,[true])).addEvent("focus",this.toggleFocus.bind(this,[true])).addEvent("blur",this.toggleFocus.bind(this,[false])).addEvent("trash",this.destroy.bind(this))},destroy:function(){this.choices.remove()},toggleFocus:function(A){this.focussed=A;if(!A){this.hideChoices()}},onCommand:function(B,A){if(A&&this.focussed){this.prefetch()}if(B.key&&!B.shift){switch(B.key){case"enter":if(this.selected&&this.visible){this.choiceSelect(this.selected);B.stop()}return ;case"up":case"down":if(this.observer.value!=(this.value||this.queryValue)){this.prefetch()}else{if(this.queryValue===null){break}else{if(!this.visible){this.showChoices()}else{this.choiceOver((B.key=="up")?this.selected.getPrevious()||this.choices.getLast():this.selected.getNext()||this.choices.getFirst());this.setSelection()}}}B.stop();return ;case"esc":this.hideChoices();return }}this.value=false},setSelection:function(){if(!this.options.useSelection){return }var C=this.queryValue.length;if(this.element.getValue().indexOf(this.queryValue)!=0){return }var B=this.selected.inputValue;while(-1!=B.indexOf("<strong>")){B=B.replace("<strong>","");B=B.replace("</strong>","")}while(-1!=B.indexOf("<STRONG>")){B=B.replace("<STRONG>","");B=B.replace("</STRONG>","")}B=B.substr(C);if(document.getSelection){this.element.value=this.queryValue+B;this.element.selectionStart=C;this.element.selectionEnd=this.element.value.length}else{if(document.selection){var A=document.selection.createRange();A.text=B;A.move("character",-B.length);A.findText(B);A.select()}}this.value=this.observer.value=this.element.getValue()},hideChoices:function(){if(!this.visible){return }this.visible=this.value=false;this.observer.clear();this.fx.start(0);this.fireEvent("onHide",[this.element,this.choices])},showChoices:function(){if(this.visible||!this.choices.getFirst()){return }this.visible=true;var A=this.element.getCoordinates(this.options.overflown);this.choices.setStyles({left:A.left,top:A.bottom});if(this.options.inheritWidth){this.choices.setStyle("width",A.width)}this.fx.start(1);this.choiceOver(this.choices.getFirst());this.fireEvent("onShow",[this.element,this.choices])},prefetch:function(){if(this.element.getValue().length<this.options.minLength){this.hideChoices()}else{if(this.element.getValue()==this.queryValue){this.showChoices()}else{this.query()}}},updateChoices:function(A){this.choices.empty();this.selected=null;if(!A||!A.length){return }if(this.options.maxChoices<A.length){A.length=this.options.maxChoices}A.each(this.options.injectChoice||function(B,C){while(-1!=B.indexOf("[strong]")){B=B.replace("[strong]","<strong>");B=B.replace("[/strong]","</strong>")}var D=new Element("a").setHTML(this.markQueryValue(B));D.inputValue=B;this.addChoiceEvents(D).injectInside(this.choices)},this);this.showChoices()},choiceOver:function(A){if(this.selected){this.selected.removeClass("autocompleter-selected")}this.selected=A.addClass("autocompleter-selected")},choiceSelect:function(A){while(-1!=A.inputValue.indexOf("<strong>")){A.inputValue=A.inputValue.replace("<strong>","");A.inputValue=A.inputValue.replace("</strong>","")}while(-1!=A.inputValue.indexOf("<STRONG>")){A.inputValue=A.inputValue.replace("<STRONG>","");A.inputValue=A.inputValue.replace("</STRONG>","")}if(A.inputValue.length-1==A.inputValue.indexOf(")")&&A.inputValue.length-4==A.inputValue.indexOf("(")){A.inputValue=A.inputValue.substr(0,A.inputValue.length-5)}if(0==A.inputValue.indexOf("...")){A.inputValue=A.inputValue.substr(3)}if("..."==A.inputValue.substr(-3)){A.inputValue=A.inputValue.substr(0,A.inputValue.length-3)}this.observer.value=A.inputValue;if(this.element.getProperty("contenteditable")){this.element.innerHTML=this.observer.value;if($defined(this.element.getNext())&&$defined(this.element.getNext().value)){this.element.getNext().value=this.observer.value}}else{this.element.value=this.observer.value}this.hideChoices();this.fireEvent("onSelect",[this.element],20)},markQueryValue:function(A){return(this.options.markQuery&&this.queryValue)?A.replace(new RegExp("^("+this.queryValue.escapeRegExp()+")","i"),'<span class="autocompleter-queried">$1</span>'):A},addChoiceEvents:function(A){return A.addEvents({mouseover:this.choiceOver.bind(this,[A]),mousedown:this.choiceSelect.bind(this,[A])})}});CD.Autocompleter.Base.implement(new Events);CD.Autocompleter.Base.implement(new Options);CD.Autocompleter.Ajax={};CD.Autocompleter.Ajax.Base=CD.Autocompleter.Base.extend({options:{postVar:"value",postData:{},ajaxOptions:{},onRequest:Class.empty,onComplete:Class.empty},initialize:function(C,B,A){C.value=CD.Conf.isIE8?C.innerHTML:C.value;this.parent(C,A);this.ajax=new Ajax(B,$merge({autoCancel:true},this.options.ajaxOptions));this.ajax.addEvent("onComplete",this.queryResponse.bind(this));this.ajax.addEvent("onFailure",this.queryResponse.bind(this,[false]))},query:function(){var B=$extend({},this.options.postData);B[this.options.postVar]=this.element.getValue();B.dialect=CD.Conf.langLayout;if(this.options.addPostData.length){for(var A=0;A<this.options.addPostData.length;A++){B[this.options.addPostData[A].name]="object"!=typeof this.options.addPostData[A].value?this.options.addPostData[A].value:this.options.addPostData[A].value.value}}this.fireEvent("onRequest",[this.element,this.ajax]);this.ajax.request(B)},queryResponse:function(A){this.value=this.queryValue=this.element.getValue();this.selected=false;this.hideChoices();this.fireEvent(A?"onComplete":"onFailure",[this.element,this.ajax],20)}});CD.Autocompleter.Ajax.Json=CD.Autocompleter.Ajax.Base.extend({queryResponse:function(A){this.parent(A);var B=Json.evaluate(A||false);if(!B||!B.length){return }this.updateChoices(B)}});CD.OverlayFix=new Class({initialize:function(A){this.element=$(A);if(window.ie){this.element.addEvent("trash",this.destroy.bind(this));this.fix=new Element("iframe",{properties:{frameborder:"0",scrolling:"no",src:"javascript:false;"},styles:{position:"absolute",border:"none",display:"none",filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"}}).injectAfter(this.element)}},show:function(){if(this.fix){this.fix.setStyles($extend(this.element.getCoordinates(),{display:"",zIndex:(this.element.getStyle("zIndex")||1)-1}))}return this},hide:function(){if(this.fix){this.fix.setStyle("display","none")}return this},destroy:function(){this.fix.remove()}});CD.HeaderMenu=new Class({navigationEl:null,initialize:function(A){this.navigationEl=$defined(A)?A:null;this.activateMenu()},activateMenu:function(){var A=this.navigationEl.getElements("li");if(A.length>0){$each(A,function(B){if(B.getLast().tagName=="UL"){B.addEvents({mouseover:this.onToggleMenu.bind(B),mouseout:this.onToggleMenu.bind(B)})}}.bind(this))}},onToggleMenu:function(A){this.getLast().setStyle("display",A.type.contains("over")?"block":"none")}});CD.Setting=new Class({dataFeed:null,name:null,value:null,initialize:function(B,C,A){this.dataFeed=$defined(A)?A:CD.Conf.path+"profileajax.php";this.name=$defined(B)?B:null,this.value=$defined(C)?C:null},save:function(){var A=new Ajax(this.dataFeed,{method:"post",data:Object.toQueryString({name:this.name,value:this.value})}).request();A.addEvent("onComplete",this.onSaveSettnigs.bind(this))},onSaveSettnigs:function(A){if(this.name=="searchDict"||this.name=="visibleUnits"||this.name=="visibleCourses"){var B=this.value.substr(0,this.value.indexOf(":"));var C=this.value.substr(this.value.indexOf(":")+1);if(undefined==CD.Conf[this.name]){CD.Conf[this.name]={}}CD.Conf[this.name][B]=C}else{CD.Conf[this.name]=this.value}}});CD.ImageTips=Tips.extend({options:{onShow:function(A){A.setStyle("visibility","visible")},onHide:function(A){A.setStyle("visibility","hidden")},delimiter:":||:",maxTitleChars:30,switchTimer:3000,showDelay:100,hideDelay:100,className:"tool",offsets:{x:16,y:16},fixed:false},build:function(B){if(B.title){var C=B.title.split("::");if(C.length>1){B.$tmp.myTitle=C[0].trim();B.$tmp.myText=C[1].trim()}else{B.$tmp.myText=B.title}B.removeAttribute("title")}else{B.$tmp.myText=false}if(B.rel){B.$tmp.mySources=B.rel.split(this.options.delimiter)}if(B.$tmp.myTitle&&B.$tmp.myTitle.length>this.options.maxTitleChars){B.$tmp.myTitle=B.$tmp.myTitle.substr(0,this.options.maxTitleChars-1)+"&hellip;"}B.addEvent("mouseenter",function(D){this.start(B);if(!this.options.fixed){this.locate(D)}else{this.position(B)}}.bind(this));if(!this.options.fixed){B.addEvent("mousemove",this.locate.bindWithEvent(this))}var A=this.end.bind(this);B.addEvent("mouseleave",A);B.addEvent("trash",A)},start:function(A){this.wrapper.empty();if(A.$tmp.myTitle){this.title=new Element("span").inject(new Element("div",{"class":this.options.className+"-title"}).inject(this.wrapper)).setHTML(A.$tmp.myTitle)}if(A.$tmp.myText){this.text=new Element("span").inject(new Element("div",{"class":this.options.className+"-text"}).inject(this.wrapper)).setHTML(A.$tmp.myText)}if(A.$tmp.mySources&&A.$tmp.mySources.length){A.$tmp.count=A.$tmp.mySources.length>1?1:0;A.$tmp.images=[];$each(A.$tmp.mySources,function(D,B){var C=new Element("div",{"class":this.options.className+"-text",styles:{display:B>0?"none":"block"}}).inject(this.wrapper);var E=new Element("img",{src:D,styles:{width:"100px",border:"1px solid black"}}).inject(C);if(CD.Conf.isIE){E.setStyle("height","100%")}A.$tmp.images[B]=C}.bind(this));this.timing=this.showImg.periodical(this.options.switchTimer,this,A)}$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this)},end:function(A){$clear(this.timer);$clear(this.timing);this.timer=this.hide.delay(this.options.hideDelay,this)},showImg:function(A){if(A.$tmp.images.length){$each(A.$tmp.images,function(B,C){if(C==A.$tmp.count){B.setStyle("display","block")}else{B.setStyle("display","none")}});A.$tmp.count=A.$tmp.count+1>A.$tmp.images.length-1?0:A.$tmp.count+1}}});CD.ImageTips.implement(new Events,new Options);CD.MediaPlayer=new Class({options:{type:"mp3",source:"none.flv",event:null},offset:{mp3:20,flv:50},position:{top:0,left:0},flash:{element:null,source:"",container:""},initialize:function(B){this.setOptions(B);var A,C;if(this.options.type=="mp3"){var D="&sound=";var E=20;if(CD.Conf.isIE||CD.Conf.isSafari){C=$("playerMp3IE");A=$("movieMp3IE").value+D}else{C=$("playerMp3");A=C.src+D||$("movieMp3IE").value+D}this.flash={element:C,source:A,container:"popupPlayerMp3"}}else{if(this.options.type=="flv"){var D="&video=";if(CD.Conf.isIE||CD.Conf.isSafari){C=$("playerIE");A=$("movieIE").value+D}else{C=$("player");A=C.src+D||$("movieIE").value+D}this.flash={element:C,source:A,container:"popupBox"}}}this.setPosition()},setPosition:function(){var A=this.flash.element.height||this.flash.element.style.height||this.flash.element.parentNode.height||this.flash.element.parentNode.style.height;var C=this.flash.element.width||this.flash.element.style.width||this.flash.element.parentNode.width||this.flash.element.parentNode.style.width;var D=this.options.event.page.y;var E=this.options.event.page.x;var B=$("canvas").getCoordinates();var G=D-A-this.offset[this.options.type];var F=E;if(window.getScrollTop()>G){G=window.getScrollTop()-B.top}else{G=D-A-this.offset[this.options.type]-B.top}this.position={top:G,left:F}},show:function(){$(this.flash.container).setStyles({position:"absolute",top:this.position.top,left:this.position.left,visibility:"visible"});this.flash.element.LoadMovie(0,this.flash.source+this.options.source)},close:function(){if(this.options.type=="flv"){this.flash.element.LoadMovie(0,"none.flv")}else{this.flash.element.LoadMovie(0,"none.mp3")}$(this.flash.container).setStyle("visibility","hidden");this.flash.element.StopPlay()}});CD.MediaPlayer.implement(new Options);CD.ImageView=new Class({overlay:null,popup:null,bind:null,initialize:function(A,B){if($defined(B)&&$type(B)=="element"){this.bind=B}else{this.bind=$(document.body)}this.popup=new Element("div").inject(this.bind);this.popup.setStyles({display:"none",visibility:"hidden",position:"absolute",left:"50%",top:"50%",backgroundColor:"#FFF",padding:"10px",border:"1px solid #000",zIndex:1010});new Element("img",{src:A}).inject(this.popup);this.overlay=new Element("div").inject(this.bind);this.overlay.setStyles({display:"none",position:"absolute",left:0,top:0,width:"100%",backgroundColor:"#000",height:document.body.getStyle("height").toInt()+25,opacity:"0.7",zIndex:1000});this.popup.addEvent("click",this.hide.bind(this));this.overlay.addEvent("click",this.hide.bind(this));this.show()},show:function(){this.overlay.setStyle("display","block");this.popup.setStyle("display","block");this.setPosition();this.popup.setStyle("visibility","visible")},hide:function(){this.overlay.setStyle("display","none");this.popup.setStyle("display","none");this.bind.removeChild(this.overlay);this.bind.removeChild(this.popup);window.scrollTo(0,this.scrollDimension)},setPosition:function(){var A=this.popup.getCoordinates();this.scrollDimension=window.getScrollTop();window.scrollTo(0,0);var B=this.bind.getStyle("width").toInt()/2-A.width.toInt()/4;this.popup.setStyles({top:"50px",left:B})}});CD.ImagePreload=new Class({store:null,initialize:function(A){if($type(A)=="array"){this.store=A}},run:function(){if(this.store!=null){for(var A=this.store.length;A--;){if(typeof (this.store[A])=="string"){var B=new Element("img",{src:CD.Conf.pathImg+this.store[A]})}}}}});CD.FontDetector=function(){var C=document.getElementsByTagName("BODY")[0];var E=document.createElement("DIV");var B=document.createElement("SPAN");E.appendChild(B);E.style.fontFamily="sans";B.style.fontFamily="sans";B.style.fontSize="72px";B.innerHTML="mmmmmmmmmmlil";C.appendChild(E);var G=B.offsetWidth;var D=B.offsetHeight;C.removeChild(E);function A(H){C.appendChild(E);var I=[];I[0]=B.style.fontFamily=H;I[1]=B.offsetWidth;I[2]=B.offsetHeight;C.removeChild(E);H=H.toLowerCase();if(H=="serif"){I[3]=true}else{I[3]=(I[1]!=G||I[2]!=D)}return I}function F(H){f=A(H);return f[3]}this.detailedTest=A;this.test=F};CD.FlashDetect=new Class({installed:0,initialize:function(){if(navigator.plugins&&navigator.plugins.length){var A=navigator.plugins["Shockwave Flash"];if(A){this.installed=1;if(A.description){var D=A.description;this.version=D.charAt(D.indexOf(".")-1)}}if(navigator.plugins["Shockwave Flash 2.0"]){this.installed=1;this.version=2}}else{if(navigator.mimeTypes&&navigator.mimeTypes.length){var A=navigator.mimeTypes["application/x-shockwave-flash"];if(A&&A.enabledPlugin){this.installed=1}}else{var B=true;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version")}catch(C){B=false}if(B){this.installed=1;this.version=version}}}},isInstalled:function(){if(this.installed>0){return true}else{return false}},getVersion:function(){return this.version}});CD.Dialog=new Class({title:null,element:null,bindElement:null,content:null,isCenter:false,scope:null,shading:false,buttons:[],initialize:function(A){this.bindElement=A.bindElement;this.title=A.title;this.comment=A.comment;this.content=A.content;this.scope=A.scope||this;this.buttons=A.buttons;this.height=A.height||"7em";this.width=A.width||"13em";this.boxStyles=A.boxStyles||{};this.shading=A.shading||false;this.render()},render:function(){var B=this.bindElement.getCoordinates();var A=$("canvas").getCoordinates();B.top=B.top-A.top;B.left=B.left-A.left;if(window.getScrollTop()>B.top){B.top=window.getScrollTop()}else{if(B.bottom>window.getScrollTop()+window.getHeight()){B.top=window.getScrollTop()+window.getHeight()/2-this.height.toInt()}}this.element=new Element("div",{styles:$extend(B,$merge({display:"block",position:"absolute","z-index":800,"background-color":"#FBF6DE","text-align":"center",padding:".8em",border:"1px solid #999",height:this.height,width:this.width},this.boxStyles))});this.element.setProperty("id","Dialog");if($defined(this.title)){new Element("h3",{styles:{"float":"left"}}).setText(this.title).inject(this.element);new Element("br").inject(this.element)}if($defined(this.comment)){new Element("span",{"class":"Comment"}).setText(this.comment).inject(this.element)}if($defined(this.content)){if($defined(this.comment)){new Element("br").inject(this.element)}this.content.inject(this.element)}else{new Element("br").inject(this.element)}new Element("br").inject(this.element);var E=this.scope;var C=this.element;this.buttons.each(function(G){var F=new Element("input",{type:"button",value:G.title});F.addEvent("click",function(H){var J=new Event(H).stop();var I=J.target;I.getParent().remove()});if(G.title=="Cancel"||G.title=="Close"){}else{F.addEvent("click",G.onClick.bind(E))}F.inject(C);C.appendText(" ")});if(this.shading){this.shadyElement=new Element("div").setStyles({display:"block",position:"absolute",top:0,left:0,"z-index":700,background:"#000",height:document.body.getStyle("height").toInt()+25,width:document.body.getStyle("width").toInt()+76,opacity:0.5}).inject(document.body);this.scrollDimension=window.getScrollTop();window.scrollTo(0,0);var D=(document.body.getStyle("width").toInt()-this.width.toInt())/2;this.element.setStyles({top:"50px",left:D})}this.element.inject($(document.body))},removeShading:function(){if(this.shading&&$defined(this.shadyElement)){window.scrollTo(0,this.scrollDimension);this.shadyElement.remove()}},close:function(){if(this.shading){this.removeShading()}this.element.remove()}});