;(function() { var entries = [ { id:"demo", name:"jsPlumb Home", about:"Main jsPlumb demo page. Contains a bit of everything" }, { id:"flowchartConnectorsDemo", name:"Flowchart Connectors", about:"Demonstration of the Flowchart connectors" }, { id:"draggableConnectorsDemo", name:"Draggable Connections", about:"Demonstration of drag and drop connections" }, { id:"chartDemo", name:"Chart Demonstration", about:"Simple Chart Demo" }, { id:"anchorDemo", name:"Sources and Targets", about:"Demonstration of how to make whole elements Connection sources and targets" }, { id:"stateMachineDemo", name:"State Machine", about:"Demonstration of the State Machine Connectors and Continuous Anchors" }, { id:"dynamicAnchorsDemo", name:"Dynamic Anchors", about:"Demonstration of Dynamic Anchors" }, { id:"dragAnimDemo", name:"Animation", about:"Drag/drop demo with animation" } ], libraries = [ {id:"jquery", name:"jQuery"}, {id:"mootools", name:"MooTools"}, {id:"yui3", name:"YUI3"} ], prepareOtherLibraryString = function(demoId, library) { var s = "", demoInfo = jsPlumb.DemoList.find(demoId); for (var i = 0; i < libraries.length; i++) { var c = libraries[i].id == library ? "selected" : ""; s += '' + libraries[i].name + '  '; } return s; }, demoSelectorString = (function() { var s = '
Select Demo:
'; return s; })(); jsPlumb.DemoList = { find:function(id) { for (var i = 0; i < entries.length; i++) { if (entries[i].id === id) { var next = i < entries.length - 1 ? i + 1 : 0, prev = i > 0 ? i - 1 : entries.length - 1; return { current:entries[i], prev:entries[prev], next:entries[next], idx:i }; } } }, init : function() { var bod = document.body, demoId = bod.getAttribute("data-demo-id"), library = bod.getAttribute("data-library"), renderModeString = '
Render Mode:
SVG | Canvas | VML', libraryString = '
Library:
' + prepareOtherLibraryString(demoId, library), demoInfo = jsPlumb.DemoList.find(demoId); if (demoInfo) { var prevString = '
Previous:
' + demoInfo.prev.name + '', nextString = '
Next:
' + demoInfo.next.name + '', menuString = '