function attachMochaLinkEvents(){if($("ajaxpageLink")){$("ajaxpageLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"ajaxpage",title:"Content Loaded with an XMLHttpRequest",loadMethod:"xhr",contentURL:"pages/lipsum.html",width:340,height:150})})}if($("jsonLink")){$("jsonLink").addEvent("click",function(C){new Event(C).stop();var A="data/json-windows-data.js";var B=new Json.Remote(A,{onRequest:function(){}.bind(this),onComplete:function(D){document.mochaUI.newWindowsFromJSON(D.windows)}}).send()})}if($("mootoolsLink")){$("mootoolsLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"mootools",title:"Mootools Forums in an Iframe",loadMethod:"iframe",contentURL:"http://forum.mootools.net/",width:650,height:400,scrollbars:false,paddingVertical:0,paddingHorizontal:0})})}if($("spirographLink")){$("spirographLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"spirograph",title:"Canvas Spirograph in an Iframe",loadMethod:"iframe",contentURL:"pages/spirograph.html",width:340,height:340,scrollbars:false,paddingVertical:0,paddingHorizontal:0,bgColor:"#c30"})})}if($("youTubeLink")){$("youTubeLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"youTube",title:"YouTube in Iframe",loadMethod:"iframe",contentURL:"pages/youtube.html",width:425,height:355,scrollbars:false,paddingVertical:0,paddingHorizontal:0,bgColor:"#000"})})}if($("accordianLink")){$("accordianLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"accordianpage",title:"Accordian Example",loadMethod:"xhr",contentURL:"pages/accordian.html",width:300,height:200,scrollbars:false,resizable:false,maximizable:false,paddingVertical:0,paddingHorizontal:0,onContentLoaded:function(B){var C=function(){var D=new Accordion("h3.accordianToggler","div.accordianElement",{opacity:false,alwaysHide:true,onStart:function(F,E){document.mochaUI.myTimer=setInterval("document.mochaUI.dynamicResize($('accordianpage'))",10)}.bind(this),onComplete:function(){clearInterval(document.mochaUI.myTimer);document.mochaUI.dynamicResize($("accordianpage"))}.bind(this)},$("accordion"))}.bind(this);C.delay(100)}})})}if($("eventsLink")){$("eventsLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"events",title:"Window Trigger Options",loadMethod:"xhr",contentURL:"pages/events.html",onContentLoaded:function(){alert("The window's content was loaded.")},onClose:function(){alert("The window is closing.")},onMinimize:function(){alert("The window was minimized.")},onMaximize:function(){alert("The window was maximized.")},onResize:function(){alert("The window was resized.")},width:340,height:250})})}if($("cornerRadiusLink")){$("cornerRadiusLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"cornerRadius",title:"Corner Radius Slider",loadMethod:"xhr",contentURL:"pages/corner_radius.html",onContentLoaded:function(){addSlider()},width:300,height:105,x:20,y:70})})}if($("cascadeLink")){$("cascadeLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.arrangeCascade()})}if($("closeLink")){$("closeLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.closeAll()})}if($("builderLink")){$("builderLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"windowbuilder",title:"Window Builder",loadMethod:"xhr",contentURL:"pages/builder.html",onContentLoaded:function(){$("mochaNewWindowSubmit").addEvent("click",function(B){new Event(B).stop();new MochaWindowForm()})},width:370,height:400,x:20,y:70})})}if($("workspace01Link")){$("workspace01Link").addEvent("click",function(A){new Event(A).stop();document.mochaScreens.setScreen(0)})}if($("workspace02Link")){$("workspace02Link").addEvent("click",function(A){new Event(A).stop();document.mochaScreens.setScreen(1)})}if($("workspace03Link")){$("workspace03Link").addEvent("click",function(A){new Event(A).stop();document.mochaScreens.setScreen(2)})}if($("faqLink")){$("faqLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"faq",title:"FAQ",loadMethod:"xhr",contentURL:"pages/faq.html",width:320,height:320,x:20,y:70})})}if($("docsLink")){$("docsLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"docs",title:"Documentation",loadMethod:"xhr",contentURL:"pages/docs.html",width:600,height:350,x:20,y:70})})}if($("overviewLink")){$("overviewLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"overview",title:"Overview",loadMethod:"xhr",contentURL:"pages/overview.html",width:300,height:255,x:20,y:70})})}if($("resourcesLink")){$("resourcesLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"resources",title:"Resources",loadMethod:"xhr",contentURL:"pages/resources.html",width:300,height:275,x:20,y:70})})}if($("helpLink")){$("helpLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"help",title:"Support",loadMethod:"xhr",contentURL:"pages/support.html",width:320,height:320,x:20,y:70})})}if($("contributeLink")){$("contributeLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"contribute",title:"Contribute",loadMethod:"xhr",contentURL:"pages/contribute.html",width:320,height:320,x:20,y:70})})}if($("aboutLink")){$("aboutLink").addEvent("click",function(A){new Event(A).stop();document.mochaUI.newWindow({id:"about",title:"Mocha UI Version 0.8",loadMethod:"xhr",contentURL:"pages/about.html",modal:true,width:300,height:150})})}$$("a.returnFalse").each(function(A){A.addEvent("click",function(B){new Event(B).stop()})})};