[
  {
    "path": "README.md",
    "content": "# Roundabout\n\n**Note: Roundabout is no longer under active development. I've moved the documentation over here to support the exists plugin, but there are known issues and such that won't be fixed. Use at your own risk.**\n\nRoundabout is a jQuery plugin that easily converts unordered lists & other nested HTML structures into entertaining, interactive, turntable-like areas.\n\nIt’s ready-to-go straight out of the box, but if you want to get crazy, Roundabout is highly-customizable with an extensive API that allows for some pretty amazing results.\n\nRoundabout requires jQuery (at least version 1.2).\n\n\n## Add-Ons\n\nRoundabout is equipped to play nicely with a couple of other plugins if they’re made available.\n\n- [Roundabout Shapes](http://fredhq.com/projects/roundabout-shapes) by Fred LeBlanc\n  Roundabout can move in more ways than just a turntable. With Shapes, you have many other ways you can move your content around the page.\n  \n- [jQuery Easing](http://gsgd.co.uk/sandbox/jquery/easing/) by George McGinley Smith\n  jQuery comes with two easing styles built in, but this plugin adds many, many more. Include this script and use any of its defined easing functions in your Roundabout animations.\n  \n- [Event.drag](http://threedubmedia.com/code/event/drag) & [Event.drop](http://threedubmedia.com/code/event/drop) by ThreeDubMedia\n  In addition to rotating on click, Roundabout can also move by clicking and dragging on the Roundabout element itself. Include these scripts and turn on enableDrag.\n  \n  \n### But That’s Not All!\nThe list above is only a list of the plugins that have support baked in, but Roundabout will play nicely with many other plugins. (It’s up to you to integrate those yourself.)\n\n\n## Using Roundabout\n\nInclude the `jquery.roundabout.js` JavaScript file on your page after you include jQuery itself. Also, either link to the included CSS file, or copy the CSS styles from that file and paste them into your site's CSS file.\n\nTo activate Roundabout in its simplest form, you can do this:\n\n```javascript\n$('ul').roundabout();\n```\n\nOf course, this will change *all* of your `ul` elements into Roundabouts, which probably isn't what you want, but you can easily change the selector to only target the elements you wish to convert\n\n\n### Setting Options\n\nYou can set options on Roundabout to change how it behaves. Do this by passing in an object of options into the main Roundabout call upon initialization, like so:\n\n```javascript\n$('ul').roundabout({\n    btnNext: \".next\"\n});\n```\n\n\n### Incorporating Roundabout Shapes\n\nIf you're using the sister plugin Roundabout Shapes, be sure to include the `jquery.roundabout-shapes.js` file after you include the main Roundabout JavaScript file. Next, you'll select the shape as on of the options that you pass into Roundabout upon initialization:\n\n```javascript\n$('ul').roundabout({\n    btnNext: \".next\",\n    shape: \"figure8\"\n});\n```\n\n### Calling Roundabout Methods\n\nRoundabout comes with a number of methods you can call to better control how it works. Calling those methods are done by re-calling `roundabout` on the element that Roundabout is already working on and passing in the name of the method to use as the first parameter. If the method requires other parameters, pass those in as subsequent parameters.\n\nFor example, instead of using the `btnNext` option, you can manually implement this yourself like this:\n\n```javascript\n$('.btnNext', function(e) {\n    e.stopPropagation();\n    e.preventDefault();\n    \n    // this is the action\n    $('ul#myRoundabout').roundabout('animateToNextChild');\n    \n    return false;\n});\n```\n\n### Enabling Drag & Drop\n\nLately it seems that this doesn't work as well as it once did. Not sure why, but you can still enable it. To do this, you'll need to grab v2 of the `jquery.event.drag` and `jquery.event.drop` plugins by ThreeDubMedia. Include them on your page after Roundabout is included.\n\nNext, enable your Roundabout to use drag and drop like so:\n\n```javascript\n$('ul').roundabout({\n    enableDrag: true\n});\n```\n\n### Using Autoplay\n\nAutoplay lets you have Roundabout automatically animate on an interval. This functionality is included with the Roundabout core, so no additional scripts are needed to get this working.\n\nTo enable autoplay, there are three options you can set:\n\n```javascript\n$('ul').roundabout({\n    autoplay: true,\n    autoplayDuration: 5000,\n    autoplayPauseOnHover: true\n});\n```\n\nThe first option, `autoplay` will turn on autoplay. The second, `autoplayDuration` is the length of time in milliseconds between animation triggers. The final option, `autoplayPauseOnHover` will force autoplay never to figure while the user has their cursor over the Roundabout itself.\n\n\n## Support\n\nVersion 2 (the current version) works reasonably well, although if you look in the issues you'll see a number of things that don't work for some people. As mentioned above, this plugin is no longer under active development. Feel free to continue submitting issues for others to see, but no further official action can be guaranteed at all.\n\n## API\n\n### Settable Options\n\nRoundabout comes with many settable configuration options that let you customize how it operates.\n\n<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<th scope=\"col\">Option</th>\n\t\t\t<th scope=\"col\">Description</th>\n\t\t\t<th scope=\"col\">Data Type</th>\n\t\t\t<th scope=\"col\" class=\"default-value\">Default</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t<tr id=\"bearing\">\n\t\t\t<td class=\"option\"><code>bearing</code></td>\n\t\t\t<td>\n\t\t\t\tThe starting direction in which Roundabout should\n\t\t\t\tface relative to the <code>focusBearing</code>.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">float</td>\n\t\t\t<td class=\"default-value\"><code>0.0</code></td>\n\t\t</tr>\n\n\t\t<tr id=\"tilt\">\n\t\t\t<td class=\"option\"><code>tilt</code></td>\n\t\t\t<td>\n\t\t\t\tSlightly alters the calculations of moving elements.\n\t\t\t\tIn the default <code>shape</code>,\n\t\t\t\tit adjusts the apparent <code>tilt</code>. Other shapes\n\t\t\t\twill differ.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">float</td>\n\t\t\t<td class=\"default-value\"><code>0.0</code></td>\n\t\t</tr>\n\n\t\t<tr id=\"minZ\">\n\t\t\t<td class=\"option\"><code>minZ</code></td>\n\t\t\t<td>\n\t\t\t\tThe lowest z-index that will be assigned to a moving\n\t\t\t\telement. This occurs when the moving element is\n\t\t\t\topposite of (that is, 180° away from) the \n\t\t\t\t<code>focusBearing</code>.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">integer</td>\n\t\t\t<td class=\"default-value\"><code>100</code></td>\n\t\t</tr>\n\n\t\t<tr id=\"maxZ\">\n\t\t\t<td class=\"option\"><code>maxZ</code></td>\n\t\t\t<td>\n\t\t\t\tThe greatest z-index that will be assigned to a\n\t\t\t\tmoving element. This occurs when the moving element\n\t\t\t\tis at the same bearing as the \n\t\t\t\t<code>focusBearing</code>.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">integer</td>\n\t\t\t<td class=\"default-value\"><code>280</code></td>\n\t\t</tr>\n\n\t\t<tr id=\"minOpacity\">\n\t\t\t<td class=\"option\"><code>minOpacity</code></td>\n\t\t\t<td>\n\t\t\t\tThe lowest opacity that will be assigned to a moving\n\t\t\t\telement. This occurs when the moving element is\n\t\t\t\topposite of (that is, 180° away\n\t\t\t\tfrom) the <code>focusBearing</code>.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">float</td>\n\t\t\t<td class=\"default-value\"><code>0.4</code></td>\n\t\t</tr>\n\n\t\t<tr id=\"maxOpacity\">\n\t\t\t<td class=\"option\"><code>maxOpacity</code></td>\n\t\t\t<td>\n\t\t\t\tThe greatest opacity that will be assigned to a\n\t\t\t\tmoving element. This occurs when the moving element\n\t\t\t\tis at the same bearing as the\n\t\t\t\t<code>focusBearing</code>.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">float</td>\n\t\t\t<td class=\"default-value\"><code>1.0</code></td>\n\t\t</tr>\n\n\t\t<tr id=\"minScale\">\n\t\t\t<td class=\"option\"><code>minScale</code></td>\n\t\t\t<td>\n\t\t\t\tThe lowest size (relative to its starting size) that\n\t\t\t\twill be assigned to a moving element. This occurs\n\t\t\t\twhen the moving element is opposite of (that is, 180°\n\t\t\t\taway from) the\n\t\t\t\t<code>focusBearing</code>.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">float</td>\n\t\t\t<td class=\"default-value\"><code>0.4</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"maxScale\">\n\t\t\t<td class=\"option\"><code>maxScale</code></td>\n\t\t\t<td>\n\t\t\t\tThe greatest size (relative to its starting size)\n\t\t\t\tthat will be assigned to a moving element. This\n\t\t\t\toccurs when the moving element is at the same bearing\n\t\t\t\tas the\n\t\t\t\t<code>focusBearing</code>.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">float</td>\n\t\t\t<td class=\"default-value\"><code>1.0</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"duration\">\n\t\t\t<td class=\"option\"><code>duration</code></td>\n\t\t\t<td>\n\t\t\t\tThe length of time Roundabout will take to move from\n\t\t\t\tone child element being in focus to another (when an\n\t\t\t\tanimation is triggered). This value acts as the\n\t\t\t\tdefault for Roundabout, but each animation action can\n\t\t\t\tbe given a custom duration for that animation.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">integer</td>\n\t\t\t<td class=\"default-value\"><code>600</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"btnNext\">\n\t\t\t<td class=\"option\"><code>btnNext</code></td>\n\t\t\t<td>\n\t\t\t\tA jQuery selector of page elements that, when\n\t\t\t\tclicked, will trigger the Roundabout to animate to\n\t\t\t\tthe next moving element.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">string</td>\n\t\t\t<td class=\"default-value\"><code>null</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"btnNextCallback\">\n\t\t\t<td class=\"option\"><code>btnNextCallback</code></td>\n\t\t\t<td>\n\t\t\t\tA function that will be called once the animation\n\t\t\t\ttriggered by a\n\t\t\t\t<code>btnNext</code>-related \n\t\t\t\tclick has finished.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">function</td>\n\t\t\t<td class=\"default-value\"><code>function() {}</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"btnPrev\">\n\t\t\t<td class=\"option\"><code>btnPrev</code></td>\n\t\t\t<td>\n\t\t\t\tA jQuery selector of page elements that, when\n\t\t\t\tclicked, will trigger the Roundabout to animate to\n\t\t\t\tthe previous moving element.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">string</td>\n\t\t\t<td class=\"default-value\"><code>null</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"btnPrevCallback\">\n\t\t\t<td class=\"option\"><code>btnPrevCallback</code></td>\n\t\t\t<td>\n\t\t\t\tA function that will be called once the animation\n\t\t\t\ttriggered by a\n\t\t\t\t<code>btnPrev</code>-releated \n\t\t\t\tclick has finished.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">function</td>\n\t\t\t<td class=\"default-value\"><code>function() {}</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"btnToggleAutoplay\">\n\t\t\t<td class=\"option\"><code>btnToggleAutoplay</code></td>\n\t\t\t<td>\n\t\t\t\tA jQuery selector of page elements that, when\n\t\t\t\tclicked, will toggle the Roundabout’s <a\n\t\t\t\thref=\"#autoplay\"><code>autoplay</code></a> state\n\t\t\t\t(either starting or stopping).\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">string</td>\n\t\t\t<td class=\"default-value\"><code>null</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"btnStartAutoplay\">\n\t\t\t<td class=\"option\"><code>btnStartAutoplay</code></td>\n\t\t\t<td>\n\t\t\t\tA jQuery selector of page elements that, when\n\t\t\t\tclicked, will start the Roundabout’s \n\t\t\t\t<code>autoplay</code> feature\n\t\t\t\t(if it’s currently stopped).\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">string</td>\n\t\t\t<td class=\"default-value\"><code>null</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"btnStopAutoplay\">\n\t\t\t<td class=\"option\"><code>btnStopAutoplay</code></td>\n\t\t\t<td>\n\t\t\t\tA jQuery selector of page elements that, when\n\t\t\t\tclicked, will stop the Roundabout’s\n\t\t\t\t<code>autoplay</code>\n\t\t\t\tfeature (if it’s current playing).\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">string</td>\n\t\t\t<td class=\"default-value\"><code>null</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"easing\">\n\t\t\t<td class=\"option\"><code>easing</code></td>\n\t\t\t<td>\n\t\t\t\tThe easing function to use when animating Roundabout.\n\t\t\t\tWith no other plugins, the standard jQuery easing\n\t\t\t\tfunctions are available. When using the \n\t\t\t\tjQuery easing plugin, \n\t\t\t\tall of its easing functions will also be available.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">string</td>\n\t\t\t<td class=\"default-value\"><code>\"swing\"</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"clickToFocus\">\n\t\t\t<td class=\"option\"><code>clickToFocus</code></td>\n\t\t\t<td>\n\t\t\t\tWhen <code>true</code>, Roundabout will bring\n\t\t\t\tnon-focused moving elements into focus when they’re\n\t\t\t\tclicked. Otherwise, click events won’t be captured\n\t\t\t\tand will be passed through to the moving child\n\t\t\t\telements.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">boolean</td>\n\t\t\t<td class=\"default-value\"><code>true</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"clickToFocusCallback\">\n\t\t\t<td class=\"option\"><code>clickToFocusCallback</code></td>\n\t\t\t<td>\n\t\t\t\tA function that will be called once the \n\t\t\t\t<code>clickToFocus</code> \n\t\t\t\tanimation has completed.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">function</td>\n\t\t\t<td class=\"default-value\"><code>function() {}</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"focusBearing\">\n\t\t\t<td class=\"option\"><code>focusBearing</code></td>\n\t\t\t<td>\n\t\t\t\tThe bearing that Roundabout will use as the focus\n\t\t\t\tpoint. All animations that move Roundabout between\n\t\t\t\tchildren will animate the given child element to this\n\t\t\t\tbearing.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">float</td>\n\t\t\t<td class=\"default-value\"><code>0.0</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"shape\">\n\t\t\t<td class=\"option\"><code>shape</code></td>\n\t\t\t<td>\n\t\t\t\tThe path that moving elements follow. By default,\n\t\t\t\tRoundabout comes with one shape, which is\n\t\t\t\t<code>lazySusan</code>. When using Roundabout with the\n\t\t\t\tRoundabout Shapes\n\t\t\t\tplugin, there are many other shapes available.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">string</td>\n\t\t\t<td class=\"default-value\"><code>\"lazySusan\"</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"debug\">\n\t\t\t<td class=\"option\"><code>debug</code></td>\n\t\t\t<td>\n\t\t\t\tWhen <code>true</code>, Roundabout will replace the\n\t\t\t\tcontents of moving elements with information about\n\t\t\t\tthe moving elements themselves.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">boolean</td>\n\t\t\t<td class=\"default-value\"><code>false</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"childSelector\">\n\t\t\t<td class=\"option\"><code>childSelector</code></td>\n\t\t\t<td>\n\t\t\t\tA jQuery selector of child elements within the elements Roundabout\n\t\t\t\tis called upon that will become the moving elements within\n\t\t\t\tRoundabout. By default, Roundabout works on unordered lists, but it\n\t\t\t\tcan be changed to work with any nested set of child elements.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">string</td>\n\t\t\t<td class=\"default-value\"><code>\"li\"</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"startingChild\">\n\t\t\t<td class=\"option\"><code>startingChild</code></td>\n\t\t\t<td>\n\t\t\t\tThe child element that will start at the Roundabout’s \n\t\t\t\t<code>focusBearing</code>\n\t\t\t\ton load. This is a zero-based counter based on the\n\t\t\t\torder of markup.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">integer</td>\n\t\t\t<td class=\"default-value\"><code>0</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"reflect\">\n\t\t\t<td class=\"option\"><code>reflect</code></td>\n\t\t\t<td>\n\t\t\t\tWhen <code>true</code>, reverses the direction in which\n\t\t\t\tRoundabout will operate. By default, <em>next</em>\n\t\t\t\tanimations will rotate moving elements in a clockwise\n\t\t\t\tdirection and <em>previous</em> animations will be\n\t\t\t\tcounterclockwise. Using reflect will flip the two.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">boolean</td>\n\t\t\t<td class=\"default-value\"><code>false</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"floatComparisonThreshold\">\n\t\t\t<td class=\"option\"><code>floatComparisonThreshold</code></td>\n\t\t\t<td>\n\t\t\t\tThe maximum distance two values can be from one\n\t\t\t\tanother to still be considered equal by Roundabout’s\n\t\t\t\tstandards. This prevents JavaScript rounding errors.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">float</td>\n\t\t\t<td class=\"default-value\"><code>0.001</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"autoplay\">\n\t\t\t<td class=\"option\"><code>autoplay</code></td>\n\t\t\t<td>\n\t\t\t\tWhen true, Roundabout will automatically advance the\n\t\t\t\tmoving elements to the next child at a regular\n\t\t\t\tinterval (settable as\n\t\t\t\t<code>autoplayDuration</code>).\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">boolean</td>\n\t\t\t<td class=\"default-value\"><code>false</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"autoplayInitialDelay\">\n\t\t\t<td class=\"option\"><code>autoplayInitialDelay</code><small>added in v2.4</small></td>\n\t\t\t<td>\n\t\t\t\tThe length of time (in milliseconds) to delay the start of \n\t\t\t\tRoundabout’s configured <code>autoplay</code>\n\t\t\t\toption. This only works with setting <code>autoplay</code> to\n\t\t\t\t<code>true</code>, and only on the first start of <code>autoplay</code>.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">integer</td>\n\t\t\t<td class=\"default-value\"><code>0</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"autoplayDuration\">\n\t\t\t<td class=\"option\"><code>autoplayDuration</code></td>\n\t\t\t<td>\n\t\t\t\tThe length of time (in milliseconds) between\n\t\t\t\tanimation triggers when a\n\t\t\t\tRoundabout’s <code>autoplay</code>\n\t\t\t\tis playing.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">integer</td>\n\t\t\t<td class=\"default-value\"><code>1000</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"autoplayPauseOnHover\">\n\t\t\t<td class=\"option\"><code>autoplayPauseOnHover</code></td>\n\t\t\t<td>\n\t\t\t\tWhen <code>true</code>, Roundabout will pause \n\t\t\t\t<code>autoplay</code> when the\n\t\t\t\tuser moves the cursor over the Roundabout container.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">boolean</td>\n\t\t\t<td class=\"default-value\"><code>false</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"enableDrag\">\n\t\t\t<td class=\"option\"><code>enableDrag</code></td>\n\t\t\t<td>\n\t\t\t\tRequires event.drag \n\t\t\t\tand \n\t\t\t\tevent.drop\n\t\t\t\tplugins by \n\t\t\t\tThreeDubMedia. \n\t\t\t\tAllows a user to rotate Roundabout be clicking and\n\t\t\t\tdragging the Roundabout area itself.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">boolean</td>\n\t\t\t<td class=\"default-value\"><code>false</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"dropDuration\">\n\t\t\t<td class=\"option\"><code>dropDuration</code></td>\n\t\t\t<td>\n\t\t\t\tThe length of time (in milliseconds) the animation\n\t\t\t\twill take to animate Roundabout to the appropriate\n\t\t\t\tchild when the Roundabout is “dropped.”\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">integer</td>\n\t\t\t<td class=\"default-value\"><code>600</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"dropEasing\">\n\t\t\t<td class=\"option\"><code>dropEasing</code></td>\n\t\t\t<td>\n\t\t\t\tThe easing function to use when animating Roundabout\n\t\t\t\tafter it has been “dropped.” With no other plugins, \n\t\t\t\tthe standard jQuery easing functions are available. \n\t\t\t\tWhen using the \n\t\t\t\tjQuery easing plugin\n\t\t\t\tall of its easing functions will also be available.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">string</td>\n\t\t\t<td class=\"default-value\"><code>\"swing\"</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"dropAnimateTo\">\n\t\t\t<td class=\"option\"><code>dropAnimateTo</code></td>\n\t\t\t<td>\n\t\t\t\tThe animation method to use when a dragged Roundabout\n\t\t\t\tis “dropped.” Valid values are <em>next</em>,\n\t\t\t\t<em>previous</em>, or <em>nearest</em>.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">string</td>\n\t\t\t<td class=\"default-value\"><code>\"nearest\"</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"dropCallback\">\n\t\t\t<td class=\"option\"><code>dropCallback</code></td>\n\t\t\t<td>\n\t\t\t\tA function that will be called once the dropped\n\t\t\t\tanimation has completed.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">function</td>\n\t\t\t<td class=\"default-value\"><code>function() {}</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"dragAxis\">\n\t\t\t<td class=\"option\"><code>dragAxis</code></td>\n\t\t\t<td>\n\t\t\t\tThe axis along which drag events are measured. Valid\n\t\t\t\tvalues are <em>x</em> and <em>y</em>.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">string</td>\n\t\t\t<td class=\"default-value\"><code>\"x\"</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"dragFactor\">\n\t\t\t<td class=\"option\"><code>dragFactor</code></td>\n\t\t\t<td>\n\t\t\t\tAlters the rate at which dragging moves the\n\t\t\t\tRoundabout’s moving elements. Higher numbers will\n\t\t\t\tcause the moving elements to move less.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">integer</td>\n\t\t\t<td class=\"default-value\"><code>4</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"triggerFocusEvents\">\n\t\t\t<td class=\"option\"><code>triggerFocusEvents</code></td>\n\t\t\t<td>\n\t\t\t\tWhen <code>true</code>, a <code>focus</code> event will\n\t\t\t\tbe triggered on the child element that moves into\n\t\t\t\tfocus when it does so.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">boolean</td>\n\t\t\t<td class=\"default-value\"><code>true</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"triggerBlurEvents\">\n\t\t\t<td class=\"option\"><code>triggerBlurEvents</code></td>\n\t\t\t<td>\n\t\t\t\tWhen <code>true</code>, a <code>blur</code> event will be\n\t\t\t\ttriggered on the child element that moves out of the\n\t\t\t\tfocused position when it does so.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">boolean</td>\n\t\t\t<td class=\"default-value\"><code>true</code></td>\n\t\t</tr>\n\t\n\t\t<tr id=\"responsive\">\n\t\t\t<td class=\"option\"><code>responsive</code><small>added in v2.1</small></td>\n\t\t\t<td>\n\t\t\t\tWhen <code>true</code>, attaches a resize event onto the \n\t\t\t\twindow and will automatically relayout Roundabout’s\n\t\t\t\tchild elements as the holder element changes size.\n\t\t\t</td>\n\t\t\t<td class=\"data-type\">boolean</td>\n\t\t\t<td class=\"default-value\"><code>false</code></td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n### Callable Methods\n\nRoundabout does a lot on its own, but all of the methods it uses internally to perform actions are publicly usable as well. Manually calling these methods give even more control over how Roundabout functions.\n\n---\n\n#### `roundabout`\n\nStarts the Roundabout.\n\n##### Usage\n\n```javascript\n.roundabout()\n.roundabout(options)\n.roundabout(callback)\n.roundabout(options, callback)\n```\n\n##### Parameters\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">object</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>options</code> is an object of\n\t\t\t\toptions to configure how\n\t\t\t\tRoundabout acts\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called once the Roundabout is ready\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `setBearing`\n\nChanges the `bearing` of the Roundabout.\n\n##### Usage\n\n```javascript\n.roundabout(\"setBearing\", bearing)\n.roundabout(\"setBearing\", bearing, callback)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">float</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>bearing</code> is a value\n\t\t\t\tbetween <code>0.0</code> and <code>359.9</code>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called once the change&nbsp;completes\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `adjustBearing`\n\nAlters the `bearing` of the Roundabout by a given amount, either positive or negative degrees.\n\n##### Usage\n\n```javascript\n.roundabout(\"adjustBearing\", delta)\n.roundabout(\"adjustBearing\", delta, callback)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">float</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>delta</code> is the amount by\n\t\t\t\twhich the <code>bearing</code> will change\n\t\t\t\t(either positive or&nbsp;negative)\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called once the change&nbsp;completes\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `setTilt`\n\nChanges the `tilt` of the Roundabout.\n\n##### Usage\n\n```javascript\n.roundabout(\"setTilt\", tilt)\n.roundabout(\"setTilt\", tilt, callback)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">tilt</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>tilt</code> is a value \n\t\t\t\ttypically between <code>-2.0</code> and \n\t\t\t\t<code>10.0</code>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called once the change&nbsp;completes\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `adjustTilt`\n\nAlters the `tilt` of the Roundabout by a given amount, either in positive or negative mounts.\n\n##### Usage\n\n```javascript\n.roundabout(\"adjustTilt\", delta)\n.roundabout(\"adjustTilt\", delta, callback)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">tilt</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>delta</code> is the amount by\n\t\t\t\twhich the <code>tilt</code> will change\n\t\t\t\t(either positive or&nbsp;negative)\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called once the change&nbsp;completes\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `animateToNearestChild`\n\nAnimates the Roundabout to the nearest child. This animation will not move the Roundabout if any child is already in focus.\n\n##### Usage\n\n```javascript\n.roundabout(\"animateToNearestChild\")\n.roundabout(\"animateToNearestChild\", callback)\n.roundabout(\"animateToNearestChild\", duration, easing, callback)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">integer</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>duration</code> is the length\n\t\t\t\tof time (in milliseconds) that the animation\n\t\t\t\twill take to&nbsp;complete; uses Roundabout’s\n\t\t\t\tconfigured <code>duration</code> if no value\n\t\t\t\tis set&nbsp;here\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">string</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>easing</code> is the name of\n\t\t\t\tthe easing function to use for&nbsp;movement;\n\t\t\t\tuses Roundabout’s configured <code>easing</code>\n\t\t\t\tif no value is set&nbsp;here\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called once the change&nbsp;completes\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `animateToChild`\n\nAnimates the Roundabout to the given `childPosition`, which is a zero-based counter of children based on the order of markup.\n\n##### Usage\n\n```javascript\n.roundabout(\"animateToChild\", childPosition)\n.roundabout(\"animateToChild\", childPosition, callback)\n.roundabout(\"animateToChild\", childPosition, duration, easing)\n.roundabout(\"animateToChild\", childPosition, duration, easing, callback)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">integer</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>childPosition</code> is the\n\t\t\t\tzero-based child to which Roundabout \n\t\t\t\twill&nbsp;animate\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">integer</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>duration</code> is the length\n\t\t\t\tof time (in milliseconds) that the animation\n\t\t\t\twill take to&nbsp;complete; uses Roundabout’s\n\t\t\t\tconfigured <code>duration</code> if no value\n\t\t\t\tis set&nbsp;here\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">string</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>easing</code> is the name of\n\t\t\t\tthe easing function to use for&nbsp;movement;\n\t\t\t\tuses Roundabout’s configured <code>easing</code>\n\t\t\t\tif no value is set&nbsp;here\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called once the change&nbsp;completes\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `animateToNextChild`\n\nAnimates the Roundabout to the next child element.\n\n##### Usage\n\n```javascript\n.roundabout(\"animateToNextChild\")\n.roundabout(\"animateToNextChild\", callback)\n.roundabout(\"animateToNextChild\", duration, easing)\n.roundabout(\"animateToNextChild\", duration, easing, callback)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">integer</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>duration</code> is the length\n\t\t\t\tof time (in milliseconds) that the animation\n\t\t\t\twill take to&nbsp;complete; uses Roundabout’s\n\t\t\t\tconfigured <code>duration</code> if no value\n\t\t\t\tis set&nbsp;here\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">string</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>easing</code> is the name of\n\t\t\t\tthe easing function to use for&nbsp;movement;\n\t\t\t\tuses Roundabout’s configured <code>easing</code>\n\t\t\t\tif no value is set&nbsp;here\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called once the change&nbsp;completes\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\nReturns a *jQuery object*.\n\n---\n\n#### `animateToPreviousChild`\n\nAnimates the Roundabout to the previous child element.\n\n##### Usage\n\n```javascript\n.roundabout(\"animateToPreviousChild\")\n.roundabout(\"animateToPreviousChild\", callback)\n.roundabout(\"animateToPreviousChild\", duration, easing)\n.roundabout(\"animateToPreviousChild\", duration, easing, callback)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">integer</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>duration</code> is the length\n\t\t\t\tof time (in milliseconds) that the animation\n\t\t\t\twill take to&nbsp;complete; uses Roundabout’s\n\t\t\t\tconfigured <code>duration</code> if no value\n\t\t\t\tis set&nbsp;here\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">string</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>easing</code> is the name of\n\t\t\t\tthe easing function to use for&nbsp;movement;\n\t\t\t\tuses Roundabout’s configured <code>easing</code>\n\t\t\t\tif no value is set&nbsp;here\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called once the change&nbsp;completes\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `animateToDelta`\n\nAnimates the Roundabout to the given amount of degrees away from its current `bearing` (either positive or negative degrees).\n\n##### Usage\n\n```javascript\n.roundabout(\"animateToDelta\", degrees)\n.roundabout(\"animateToDelta\", degrees, callback)\n.roundabout(\"animateToDelta\", degrees, duration, easing)\n.roundabout(\"animateToDelta\", degrees, duration, easing, callback)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">float</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>degrees</code> is the amount\n\t\t\t\tby which the <code>bearing</code> will change\n\t\t\t\t(either positive or&nbsp;negative)\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">integer</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>duration</code> is the length\n\t\t\t\tof time (in milliseconds) that the animation\n\t\t\t\twill take to&nbsp;complete; uses Roundabout’s\n\t\t\t\tconfigured <code>duration</code> if no value\n\t\t\t\tis set&nbsp;here\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">string</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>easing</code> is the name of\n\t\t\t\tthe easing function to use for&nbsp;movement;\n\t\t\t\tuses Roundabout’s configured <code>easing</code>\n\t\t\t\tif no value is set&nbsp;here\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called once the change&nbsp;completes\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `animateBearingToFocus`\n\nAnimates the Roundabout so that a given `bearing` ends at the configured `focusBearing`.\n\n##### Usage\n\n```javascript\n.roundabout(\"animateBearingToFocus\", degrees)\n.roundabout(\"animateBearingToFocus\", degrees, callback)\n.roundabout(\"animateBearingToFocus\", degrees, duration, easing)\n.roundabout(\"animateBearingToFocus\", degrees, duration, easing, callback)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">float</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>degrees</code> is a value\n\t\t\t\tbetween <code>0.0</code> and <code>359.9</code>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">integer</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>duration</code> is the length\n\t\t\t\tof time (in milliseconds) that the animation\n\t\t\t\twill take to&nbsp;complete; uses Roundabout’s\n\t\t\t\tconfigured <code>duration</code> if no value\n\t\t\t\tis set&nbsp;here\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">string</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>easing</code> is the name of\n\t\t\t\tthe easing function to use for&nbsp;movement;\n\t\t\t\tuses Roundabout’s configured <code>easing</code>\n\t\t\t\tif no value is set&nbsp;here\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called once the change&nbsp;completes\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `startAutoplay`\n\nStarts the Roundabout’s `autoplay` feature.\n\n##### Usage\n\n```javascript\n.roundabout(\"startAutoplay\")\n.roundabout(\"startAutoplay\", callback)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called after each autoplay\n\t\t\t\tanimation&nbsp;completes\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `stopAutoplay`\n\nStops the Roundabout’s `autoplay` feature.\n\n##### Usage\n\n```javascript\n.roundabout(\"stopAutoplay\")\n.roundabout(\"stopAutoplay\", keepAutoplayBindings)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">boolean</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>keepAutoplayBindings</code> — when <code>true</code> —\n\t\t\t\twill not destroy any autoplay <code>mouseenter</code> and <code>mouseleave</code>\n\t\t\t\tevent bindings that were set by <code>autoplayPauseOnHover</code>\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `toggleAutoplay`\n\nStarts or stops the Roundabout’s `autoplay` feature (based upon its current state).\n\n##### Usage\n\n```javascript\n.roundabout(\"toggleAutoplay\")\n.roundabout(\"toggleAutoplay\", callback)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">function</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>callback</code> is a function \n\t\t\t\tthat is called after each autoplay\n\t\t\t\tanimation&nbsp;completes\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `isAutoplaying`\n\nChecks to see if the Roundabout’s `autoplay` feature is currently playing or not.\n\n##### Usage\n\n```javascript\n.roundabout(\"isAutoplaying\")\n```\n\n##### Parameters\n\n*No parameters.*\n\nReturns a *boolean*.\n\n---\n\n#### `changeAutoplayDuration`\n\nChanges the length of time (in milliseconds) that the Roundabout’s `autoplay` feature waits between attempts to animate to the next child.\n\n##### Usage\n\n```javascript\n.roundabout(\"changeAutoplayDuration\", duration)\n```\n\n##### Parameters\n\n<table class=\"parameters\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"type\">integer</td>\n\t\t\t<td class=\"parameter\">\n\t\t\t\t<code>duration</code> is a length of\n\t\t\t\ttime (in milliseconds) between attempts to have\n\t\t\t\tautoplay animate to the next child element\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\nReturns a *jQuery object*.\n\n---\n\n#### `relayoutChildren`\n\nRepositions child elements based on new contextual information. This is most helpful when the Roundabout element itself changes size and moving child elements within need readjusting.\n\n##### Usage\n\n```javascript\n.roundabout(\"relayoutChildren\")\n```\n\n##### Parameters\n\n*No parameters.*\n\nReturns a *jQuery object*.\n\n---\n\n#### `getNearestChild`\n\nGets the nearest child element to the `focusBearing`. This number is a zero-based counter based on order of markup.\n\n##### Usage\n\n```javascript\n.roundabout(\"getNearestChild\")\n```\n\n##### Parameters\n\n*No parameters.*\n\nReturns a *integer*.\n\n---\n\n#### `getChildInFocus`\n\nGets the child currently in focus. This number is a zero-based counter based on order of markup.\n\n##### Usage\n\n```javascript\n.roundabout(\"getChildInFocus\")\n```\n\n##### Parameters\n\n*No parameters.*\n\nReturns a *integer*.\n\n\n### Hookable Events\n\nRoundabout is equipped to trigger events on both the Roundabout element itself and the moving child elements.\n\n#### `ready`\n\nThis event fires on the Roundabout element once it and its child elements have been initialized. It also fires on each child element once it has been initialized.\n\n#### `focus`\n\nThis event fires on child elements that land in the `focusBearing` at the end of an animation. Will only fire if `triggerFocusEvents` is set to `true`.\n\n#### `blur`\n\nThis event fires on child elements that move away from the `focusBearing` at the start of an animation. Will only fire if `triggerBlurEvents` is set to `true`.\n\n#### `childrenUpdated`\n\nThis event fires on the Roundabout element when its child elements have been repositioned and are in place.\n\n#### `reposition`\n\nThis event fires on child elements that have been repositioned and are in place.\n\n#### `bearingSet`\n\nThis event fires on the Roundabout element when its `bearing` has been set.\n\n#### `moveClockwiseThroughBack`\n\nThis event fires on moving child elements when an animation causes them pass through the point that is opposite (or 180°) from the `focusBearing` in a clockwise motion.\n\n#### `moveCounterclockwiseThroughBack`\n\nThis event fires on moving child elements when an animation causes them to pass through the point that is opposite (or 180°) from the `focusBearing` in a counterclockwise motion.\n\n#### `animationStart`\n\nThis event fires on the Roundabout element at the start of any animation.\n\n#### `animationEnd`\n\nThis event fires on the Roundabout element at the end of any animation.\n\n#### `autoplayStart`\n\nThis event fires on the Roundabout element when the `autoplay` feature starts.\n\n#### `autoplayStop`\n\nThis event fires on the Roundabout element when the `autoplay` feature stops."
  },
  {
    "path": "jquery.roundabout.js",
    "content": "/**\n * jQuery Roundabout - v2.4.2\n * http://fredhq.com/projects/roundabout\n *\n * Moves list-items of enabled ordered and unordered lists long\n * a chosen path. Includes the default \"lazySusan\" path, that\n * moves items long a spinning turntable.\n *\n * Terms of Use // jQuery Roundabout\n *\n * Open source under the BSD license\n *\n * Copyright (c) 2011-2012, Fred LeBlanc\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n *   - Redistributions of source code must retain the above copyright\n *     notice, this list of conditions and the following disclaimer.\n *   - Redistributions in binary form must reproduce the above\n *     copyright notice, this list of conditions and the following\n *     disclaimer in the documentation and/or other materials provided\n *     with the distribution.\n *   - Neither the name of the author nor the names of its contributors\n *     may be used to endorse or promote products derived from this\n *     software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n(function($) {\n\t\"use strict\";\n\t\n\tvar defaults, internalData, methods;\n\n\t// add default shape\n\t$.extend({\n\t\troundaboutShapes: {\n\t\t\tdef: \"lazySusan\",\n\t\t\tlazySusan: function (r, a, t) {\n\t\t\t\treturn {\n\t\t\t\t\tx: Math.sin(r + a),\n\t\t\t\t\ty: (Math.sin(r + 3 * Math.PI / 2 + a) / 8) * t,\n\t\t\t\t\tz: (Math.cos(r + a) + 1) / 2,\n\t\t\t\t\tscale: (Math.sin(r + Math.PI / 2 + a) / 2) + 0.5\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t});\n\n\tdefaults = {\n\t\tbearing: 0.0,\n\t\ttilt: 0.0,\n\t\tminZ: 100,\n\t\tmaxZ: 280,\n\t\tminOpacity: 0.4,\n\t\tmaxOpacity: 1.0,\n\t\tminScale: 0.4,\n\t\tmaxScale: 1.0,\n\t\tduration: 600,\n\t\tbtnNext: null,\n\t\tbtnNextCallback: function() {},\n\t\tbtnPrev: null,\n\t\tbtnPrevCallback: function() {},\n\t\tbtnToggleAutoplay: null,\n\t\tbtnStartAutoplay: null,\n\t\tbtnStopAutoplay: null,\n\t\teasing: \"swing\",\n\t\tclickToFocus: true,\n\t\tclickToFocusCallback: function() {},\n\t\tfocusBearing: 0.0,\n\t\tshape: \"lazySusan\",\n\t\tdebug: false,\n\t\tchildSelector: \"li\",\n\t\tstartingChild: null,\n\t\treflect: false,\n\t\tfloatComparisonThreshold: 0.001,\n\t\tautoplay: false,\n\t\tautoplayDuration: 1000,\n\t\tautoplayPauseOnHover: false,\n\t\tautoplayCallback: function() {},\n\t\tautoplayInitialDelay: 0,\n\t\tenableDrag: false,\n\t\tdropDuration: 600,\n\t\tdropEasing: \"swing\",\n\t\tdropAnimateTo: \"nearest\",\n\t\tdropCallback: function() {},\n\t\tdragAxis: \"x\",\n\t\tdragFactor: 4,\n\t\ttriggerFocusEvents: true,\n\t\ttriggerBlurEvents: true,\n\t\tresponsive: false\n\t};\n\n\tinternalData = {\n\t\tautoplayInterval: null,\n\t\tautoplayIsRunning: false,\n\t\tautoplayStartTimeout: null,\n\t\tanimating: false,\n\t\tchildInFocus: -1,\n\t\ttouchMoveStartPosition: null,\n\t\tstopAnimation: false,\n\t\tlastAnimationStep: false\n\t};\n\n\tmethods = {\n\n\t\t// starters\n\t\t// -----------------------------------------------------------------------\n\n\t\t// init\n\t\t// starts up roundabout\n\t\tinit: function(options, callback, relayout) {\n\t\t\tvar settings,\n\t\t\t    now = (new Date()).getTime();\n\n\t\t\toptions   = (typeof options === \"object\") ? options : {};\n\t\t\tcallback  = ($.isFunction(callback)) ? callback : function() {};\n\t\t\tcallback  = ($.isFunction(options)) ? options : callback;\n\t\t\tsettings  = $.extend({}, defaults, options, internalData);\n\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\t// make options\n\t\t\t\t\tvar self = $(this),\n\t\t\t\t\t    childCount = self.children(settings.childSelector).length,\n\t\t\t\t\t    period = 360.0 / childCount,\n\t\t\t\t\t    startingChild = (settings.startingChild && settings.startingChild > (childCount - 1)) ? (childCount - 1) : settings.startingChild,\n\t\t\t\t\t    startBearing = (settings.startingChild === null) ? settings.bearing : 360 - (startingChild * period),\n\t\t\t\t\t    holderCSSPosition = (self.css(\"position\") !== \"static\") ? self.css(\"position\") : \"relative\";\n\n\t\t\t\t\tself\n\t\t\t\t\t\t.css({  // starting styles\n\t\t\t\t\t\t\tpadding:   0,\n\t\t\t\t\t\t\tposition:  holderCSSPosition\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.addClass(\"roundabout-holder\")\n\t\t\t\t\t\t.data(  // starting options\n\t\t\t\t\t\t\t\"roundabout\",\n\t\t\t\t\t\t\t$.extend(\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\tsettings,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tstartingChild: startingChild,\n\t\t\t\t\t\t\t\t\tbearing: startBearing,\n\t\t\t\t\t\t\t\t\toppositeOfFocusBearing: methods.normalize.apply(null, [settings.focusBearing - 180]),\n\t\t\t\t\t\t\t\t\tdragBearing: startBearing,\n\t\t\t\t\t\t\t\t\tperiod: period\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t// unbind any events that we set if we're relaying out\n\t\t\t\t\tif (relayout) {\n\t\t\t\t\t\tself\n\t\t\t\t\t\t\t.unbind(\".roundabout\")\n\t\t\t\t\t\t\t.children(settings.childSelector)\n\t\t\t\t\t\t\t\t.unbind(\".roundabout\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// bind responsive action\n\t\t\t\t\t\tif (settings.responsive) {\n\t\t\t\t\t\t\t$(window).bind(\"resize\", function() {\n\t\t\t\t\t\t\t\tmethods.stopAutoplay.apply(self);\n\t\t\t\t\t\t\t\tmethods.relayoutChildren.apply(self);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// bind click-to-focus\n\t\t\t\t\tif (settings.clickToFocus) {\n\t\t\t\t\t\tself\n\t\t\t\t\t\t\t.children(settings.childSelector)\n\t\t\t\t\t\t\t.each(function(i) {\n\t\t\t\t\t\t\t\t$(this)\n\t\t\t\t\t\t\t\t\t.bind(\"click.roundabout\", function() {\n\t\t\t\t\t\t\t\t\t\tvar degrees = methods.getPlacement.apply(self, [i]);\n\n\t\t\t\t\t\t\t\t\t\tif (!methods.isInFocus.apply(self, [degrees])) {\n\t\t\t\t\t\t\t\t\t\t\tmethods.stopAnimation.apply($(this));\n\t\t\t\t\t\t\t\t\t\t\tif (!self.data(\"roundabout\").animating) {\n\t\t\t\t\t\t\t\t\t\t\t\tmethods.animateBearingToFocus.apply(self, [degrees, self.data(\"roundabout\").clickToFocusCallback]);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// bind next buttons\n\t\t\t\t\tif (settings.btnNext) {\n\t\t\t\t\t\t$(settings.btnNext)\n\t\t\t\t\t\t\t.bind(\"click.roundabout\", function() {\n\t\t\t\t\t\t\t\tif (!self.data(\"roundabout\").animating) {\n\t\t\t\t\t\t\t\t\tmethods.animateToNextChild.apply(self, [self.data(\"roundabout\").btnNextCallback]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// bind previous buttons\n\t\t\t\t\tif (settings.btnPrev) {\n\t\t\t\t\t\t$(settings.btnPrev)\n\t\t\t\t\t\t\t.bind(\"click.roundabout\", function() {\n\t\t\t\t\t\t\t\tmethods.animateToPreviousChild.apply(self, [self.data(\"roundabout\").btnPrevCallback]);\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// bind toggle autoplay buttons\n\t\t\t\t\tif (settings.btnToggleAutoplay) {\n\t\t\t\t\t\t$(settings.btnToggleAutoplay)\n\t\t\t\t\t\t\t.bind(\"click.roundabout\", function() {\n\t\t\t\t\t\t\t\tmethods.toggleAutoplay.apply(self);\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// bind start autoplay buttons\n\t\t\t\t\tif (settings.btnStartAutoplay) {\n\t\t\t\t\t\t$(settings.btnStartAutoplay)\n\t\t\t\t\t\t\t.bind(\"click.roundabout\", function() {\n\t\t\t\t\t\t\t\tmethods.startAutoplay.apply(self);\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// bind stop autoplay buttons\n\t\t\t\t\tif (settings.btnStopAutoplay) {\n\t\t\t\t\t\t$(settings.btnStopAutoplay)\n\t\t\t\t\t\t\t.bind(\"click.roundabout\", function() {\n\t\t\t\t\t\t\t\tmethods.stopAutoplay.apply(self);\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// autoplay pause on hover\n\t\t\t\t\tif (settings.autoplayPauseOnHover) {\n\t\t\t\t\t\tself\n\t\t\t\t\t\t\t.bind(\"mouseenter.roundabout.autoplay\", function() {\n\t\t\t\t\t\t\t\tmethods.stopAutoplay.apply(self, [true]);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.bind(\"mouseleave.roundabout.autoplay\", function() {\n\t\t\t\t\t\t\t\tmethods.startAutoplay.apply(self);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// drag and drop\n\t\t\t\t\tif (settings.enableDrag) {\n\t\t\t\t\t\t// on screen\n\t\t\t\t\t\tif (!$.isFunction(self.drag)) {\n\t\t\t\t\t\t\tif (settings.debug) {\n\t\t\t\t\t\t\t\talert(\"You do not have the drag plugin loaded.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (!$.isFunction(self.drop)) {\n\t\t\t\t\t\t\tif (settings.debug) {\n\t\t\t\t\t\t\t\talert(\"You do not have the drop plugin loaded.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself\n\t\t\t\t\t\t\t\t.drag(function(e, properties) {\n\t\t\t\t\t\t\t\t\tvar data = self.data(\"roundabout\"),\n\t\t\t\t\t\t\t\t\t    delta = (data.dragAxis.toLowerCase() === \"x\") ? \"deltaX\" : \"deltaY\";\n\t\t\t\t\t\t\t\t\tmethods.stopAnimation.apply(self);\n\t\t\t\t\t\t\t\t\tmethods.setBearing.apply(self, [data.dragBearing + properties[delta] / data.dragFactor]);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.drop(function(e) {\n\t\t\t\t\t\t\t\t\tvar data = self.data(\"roundabout\"),\n\t\t\t\t\t\t\t\t\t    method = methods.getAnimateToMethod(data.dropAnimateTo);\n\t\t\t\t\t\t\t\t\tmethods.allowAnimation.apply(self);\n\t\t\t\t\t\t\t\t\tmethods[method].apply(self, [data.dropDuration, data.dropEasing, data.dropCallback]);\n\t\t\t\t\t\t\t\t\tdata.dragBearing = data.period * methods.getNearestChild.apply(self);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// on mobile\n\t\t\t\t\t\tself\n\t\t\t\t\t\t\t.each(function() {\n\t\t\t\t\t\t\t\tvar element = $(this).get(0),\n\t\t\t\t\t\t\t\t    data = $(this).data(\"roundabout\"),\n\t\t\t\t\t\t\t\t    page = (data.dragAxis.toLowerCase() === \"x\") ? \"pageX\" : \"pageY\",\n\t\t\t\t\t\t\t\t    method = methods.getAnimateToMethod(data.dropAnimateTo);\n\n\t\t\t\t\t\t\t\t// some versions of IE don't like this\n\t\t\t\t\t\t\t\tif (element.addEventListener) {\n\t\t\t\t\t\t\t\t\telement.addEventListener(\"touchstart\", function(e) {\n\t\t\t\t\t\t\t\t\t\tdata.touchMoveStartPosition = e.touches[0][page];\n\t\t\t\t\t\t\t\t\t}, false);\n\n\t\t\t\t\t\t\t\t\telement.addEventListener(\"touchmove\", function(e) {\n\t\t\t\t\t\t\t\t\t\tvar delta = (e.touches[0][page] - data.touchMoveStartPosition) / data.dragFactor;\n\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\tmethods.stopAnimation.apply($(this));\n\t\t\t\t\t\t\t\t\t\tmethods.setBearing.apply($(this), [data.dragBearing + delta]);\n\t\t\t\t\t\t\t\t\t}, false);\n\n\t\t\t\t\t\t\t\t\telement.addEventListener(\"touchend\", function(e) {\n\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\tmethods.allowAnimation.apply($(this));\n\t\t\t\t\t\t\t\t\t\tmethod = methods.getAnimateToMethod(data.dropAnimateTo);\n\t\t\t\t\t\t\t\t\t\tmethods[method].apply($(this), [data.dropDuration, data.dropEasing, data.dropCallback]);\n\t\t\t\t\t\t\t\t\t\tdata.dragBearing = data.period * methods.getNearestChild.apply($(this));\n\t\t\t\t\t\t\t\t\t}, false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// start children\n\t\t\t\t\tmethods.initChildren.apply(self, [callback, relayout]);\n\t\t\t\t});\n\t\t},\n\n\n\t\t// initChildren\n\t\t// applys settings to child elements, starts roundabout\n\t\tinitChildren: function(callback, relayout) {\n\t\t\tvar self = $(this),\n\t\t\t    data = self.data(\"roundabout\");\n\n\t\t\tcallback = callback || function() {};\n\t\t\t\n\t\t\tself.children(data.childSelector).each(function(i) {\n\t\t\t\tvar startWidth, startHeight, startFontSize,\n\t\t\t\t    degrees = methods.getPlacement.apply(self, [i]);\n\n\t\t\t\t// on relayout, grab these values from current data\n\t\t\t\tif (relayout && $(this).data(\"roundabout\")) {\n\t\t\t\t\tstartWidth = $(this).data(\"roundabout\").startWidth;\n\t\t\t\t\tstartHeight = $(this).data(\"roundabout\").startHeight;\n\t\t\t\t\tstartFontSize = $(this).data(\"roundabout\").startFontSize;\n\t\t\t\t}\n\n\t\t\t\t// apply classes and css first\n\t\t\t\t$(this)\n\t\t\t\t\t.addClass(\"roundabout-moveable-item\")\n\t\t\t\t\t.css(\"position\", \"absolute\");\n\n\t\t\t\t// now measure\n\t\t\t\t$(this)\n\t\t\t\t\t.data(\n\t\t\t\t\t\t\"roundabout\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstartWidth: startWidth || $(this).width(),\n\t\t\t\t\t\t\tstartHeight: startHeight || $(this).height(),\n\t\t\t\t\t\t\tstartFontSize: startFontSize || parseInt($(this).css(\"font-size\"), 10),\n\t\t\t\t\t\t\tdegrees: degrees,\n\t\t\t\t\t\t\tbackDegrees: methods.normalize.apply(null, [degrees - 180]),\n\t\t\t\t\t\t\tchildNumber: i,\n\t\t\t\t\t\t\tcurrentScale: 1,\n\t\t\t\t\t\t\tparent: self\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t});\n\n\t\t\tmethods.updateChildren.apply(self);\n\n\t\t\t// start autoplay if necessary\n\t\t\tif (data.autoplay) {\n\t\t\t\tdata.autoplayStartTimeout = setTimeout(function() {\n\t\t\t\t\tmethods.startAutoplay.apply(self);\n\t\t\t\t}, data.autoplayInitialDelay);\n\t\t\t}\n\n\t\t\tself.trigger('ready');\n\t\t\tcallback.apply(self);\n\t\t\treturn self;\n\t\t},\n\n\n\n\t\t// positioning\n\t\t// -----------------------------------------------------------------------\n\n\t\t// updateChildren\n\t\t// move children elements into their proper locations\n\t\tupdateChildren: function() {\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar self = $(this),\n\t\t\t\t\t    data = self.data(\"roundabout\"),\n\t\t\t\t\t    inFocus = -1,\n\t\t\t\t\t    info = {\n\t\t\t\t\t\t\tbearing: data.bearing,\n\t\t\t\t\t\t\ttilt: data.tilt,\n\t\t\t\t\t\t\tstage: {\n\t\t\t\t\t\t\t\twidth: Math.floor($(this).width() * 0.9),\n\t\t\t\t\t\t\t\theight: Math.floor($(this).height() * 0.9)\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tanimating: data.animating,\n\t\t\t\t\t\t\tinFocus: data.childInFocus,\n\t\t\t\t\t\t\tfocusBearingRadian: methods.degToRad.apply(null, [data.focusBearing]),\n\t\t\t\t\t\t\tshape: $.roundaboutShapes[data.shape] || $.roundaboutShapes[$.roundaboutShapes.def]\n\t\t\t\t\t    };\n\n\t\t\t\t\t// calculations\n\t\t\t\t\tinfo.midStage = {\n\t\t\t\t\t\twidth: info.stage.width / 2,\n\t\t\t\t\t\theight: info.stage.height / 2\n\t\t\t\t\t};\n\n\t\t\t\t\tinfo.nudge = {\n\t\t\t\t\t\twidth: info.midStage.width + (info.stage.width * 0.05),\n\t\t\t\t\t\theight: info.midStage.height + (info.stage.height * 0.05)\n\t\t\t\t\t};\n\n\t\t\t\t\tinfo.zValues = {\n\t\t\t\t\t\tmin: data.minZ,\n\t\t\t\t\t\tmax: data.maxZ,\n\t\t\t\t\t\tdiff: data.maxZ - data.minZ\n\t\t\t\t\t};\n\n\t\t\t\t\tinfo.opacity = {\n\t\t\t\t\t\tmin: data.minOpacity,\n\t\t\t\t\t\tmax: data.maxOpacity,\n\t\t\t\t\t\tdiff: data.maxOpacity - data.minOpacity\n\t\t\t\t\t};\n\n\t\t\t\t\tinfo.scale = {\n\t\t\t\t\t\tmin: data.minScale,\n\t\t\t\t\t\tmax: data.maxScale,\n\t\t\t\t\t\tdiff: data.maxScale - data.minScale\n\t\t\t\t\t};\n\n\t\t\t\t\t// update child positions\n\t\t\t\t\tself.children(data.childSelector)\n\t\t\t\t\t\t.each(function(i) {\n\t\t\t\t\t\t\tif (methods.updateChild.apply(self, [$(this), info, i, function() { $(this).trigger('ready'); }]) && (!info.animating || data.lastAnimationStep)) {\n\t\t\t\t\t\t\t\tinFocus = i;\n\t\t\t\t\t\t\t\t$(this).addClass(\"roundabout-in-focus\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$(this).removeClass(\"roundabout-in-focus\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\tif (inFocus !== info.inFocus) {\n\t\t\t\t\t\t// blur old child\n\t\t\t\t\t\tif (data.triggerBlurEvents) {\n\t\t\t\t\t\t\tself.children(data.childSelector)\n\t\t\t\t\t\t\t\t.eq(info.inFocus)\n\t\t\t\t\t\t\t\t\t.trigger(\"blur\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdata.childInFocus = inFocus;\n\n\t\t\t\t\t\tif (data.triggerFocusEvents && inFocus !== -1) {\n\t\t\t\t\t\t\t// focus new child\n\t\t\t\t\t\t\tself.children(data.childSelector)\n\t\t\t\t\t\t\t\t.eq(inFocus)\n\t\t\t\t\t\t\t\t\t.trigger(\"focus\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tself.trigger(\"childrenUpdated\");\n\t\t\t\t});\n\t\t},\n\n\n\t\t// updateChild\n\t\t// repositions a child element into its new position\n\t\tupdateChild: function(childElement, info, childPos, callback) {\n\t\t\tvar factors,\n\t\t\t    self = this,\n\t\t\t    child = $(childElement),\n\t\t\t    data = child.data(\"roundabout\"),\n\t\t\t    out = [],\n\t\t\t    rad = methods.degToRad.apply(null, [(360.0 - data.degrees) + info.bearing]);\n\n\t\t\tcallback = callback || function() {};\n\n\t\t\t// adjust radians to be between 0 and Math.PI * 2\n\t\t\trad = methods.normalizeRad.apply(null, [rad]);\n\n\t\t\t// get factors from shape\n\t\t\tfactors = info.shape(rad, info.focusBearingRadian, info.tilt);\n\n\t\t\t// correct\n\t\t\tfactors.scale = (factors.scale > 1) ? 1 : factors.scale;\n\t\t\tfactors.adjustedScale = (info.scale.min + (info.scale.diff * factors.scale)).toFixed(4);\n\t\t\tfactors.width = (factors.adjustedScale * data.startWidth).toFixed(4);\n\t\t\tfactors.height = (factors.adjustedScale * data.startHeight).toFixed(4);\n\n\t\t\t// update item\n\t\t\tchild\n\t\t\t\t.css({\n\t\t\t\t\tleft: ((factors.x * info.midStage.width + info.nudge.width) - factors.width / 2.0).toFixed(0) + \"px\",\n\t\t\t\t\ttop: ((factors.y * info.midStage.height + info.nudge.height) - factors.height / 2.0).toFixed(0) + \"px\",\n\t\t\t\t\twidth: factors.width + \"px\",\n\t\t\t\t\theight: factors.height + \"px\",\n\t\t\t\t\topacity: (info.opacity.min + (info.opacity.diff * factors.scale)).toFixed(2),\n\t\t\t\t\tzIndex: Math.round(info.zValues.min + (info.zValues.diff * factors.z)),\n\t\t\t\t\tfontSize: (factors.adjustedScale * data.startFontSize).toFixed(1) + \"px\"\n\t\t\t\t});\n\t\t\tdata.currentScale = factors.adjustedScale;\n\n\t\t\t// for debugging purposes\n\t\t\tif (self.data(\"roundabout\").debug) {\n\t\t\t\tout.push(\"<div style=\\\"font-weight: normal; font-size: 10px; padding: 2px; width: \" + child.css(\"width\") + \"; background-color: #ffc;\\\">\");\n\t\t\t\tout.push(\"<strong style=\\\"font-size: 12px; white-space: nowrap;\\\">Child \" + childPos + \"</strong><br />\");\n\t\t\t\tout.push(\"<strong>left:</strong> \" + child.css(\"left\") + \"<br />\");\n\t\t\t\tout.push(\"<strong>top:</strong> \" + child.css(\"top\") + \"<br />\");\n\t\t\t\tout.push(\"<strong>width:</strong> \" + child.css(\"width\") + \"<br />\");\n\t\t\t\tout.push(\"<strong>opacity:</strong> \" + child.css(\"opacity\") + \"<br />\");\n\t\t\t\tout.push(\"<strong>height:</strong> \" + child.css(\"height\") + \"<br />\");\n\t\t\t\tout.push(\"<strong>z-index:</strong> \" + child.css(\"z-index\") + \"<br />\");\n\t\t\t\tout.push(\"<strong>font-size:</strong> \" + child.css(\"font-size\") + \"<br />\");\n\t\t\t\tout.push(\"<strong>scale:</strong> \" + child.data(\"roundabout\").currentScale);\n\t\t\t\tout.push(\"</div>\");\n\n\t\t\t\tchild.html(out.join(\"\"));\n\t\t\t}\n\n\t\t\t// trigger event\n\t\t\tchild.trigger(\"reposition\");\n\t\t\t\n\t\t\t// callback\n\t\t\tcallback.apply(self);\n\n\t\t\treturn methods.isInFocus.apply(self, [data.degrees]);\n\t\t},\n\n\n\n\t\t// manipulation\n\t\t// -----------------------------------------------------------------------\n\n\t\t// setBearing\n\t\t// changes the bearing of the roundabout\n\t\tsetBearing: function(bearing, callback) {\n\t\t\tcallback = callback || function() {};\n\t\t\tbearing = methods.normalize.apply(null, [bearing]);\n\n\t\t\tthis\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar diff, lowerValue, higherValue,\n\t\t\t\t\t    self = $(this),\n\t\t\t\t\t    data = self.data(\"roundabout\"),\n\t\t\t\t\t    oldBearing = data.bearing;\n\n\t\t\t\t\t// set bearing\n\t\t\t\t\tdata.bearing = bearing;\n\t\t\t\t\tself.trigger(\"bearingSet\");\n\t\t\t\t\tmethods.updateChildren.apply(self);\n\n\t\t\t\t\t// not animating? we're done here\n\t\t\t\t\tdiff = Math.abs(oldBearing - bearing);\n\t\t\t\t\tif (!data.animating || diff > 180) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// check to see if any of the children went through the back\n\t\t\t\t\tdiff = Math.abs(oldBearing - bearing);\n\t\t\t\t\tself.children(data.childSelector).each(function(i) {\n\t\t\t\t\t\tvar eventType;\n\n\t\t\t\t\t\tif (methods.isChildBackDegreesBetween.apply($(this), [bearing, oldBearing])) {\n\t\t\t\t\t\t\teventType = (oldBearing > bearing) ? \"Clockwise\" : \"Counterclockwise\";\n\t\t\t\t\t\t\t$(this).trigger(\"move\" + eventType + \"ThroughBack\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t// call callback if one was given\n\t\t\tcallback.apply(this);\n\t\t\treturn this;\n\t\t},\n\n\n\t\t// adjustBearing\n\t\t// change the bearing of the roundabout by a given degree\n\t\tadjustBearing: function(delta, callback) {\n\t\t\tcallback = callback || function() {};\n\t\t\tif (delta === 0) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tthis\n\t\t\t\t.each(function() {\n\t\t\t\t\tmethods.setBearing.apply($(this), [$(this).data(\"roundabout\").bearing + delta]);\n\t\t\t\t});\n\n\t\t\tcallback.apply(this);\n\t\t\treturn this;\n\t\t},\n\n\n\t\t// setTilt\n\t\t// changes the tilt of the roundabout\n\t\tsetTilt: function(tilt, callback) {\n\t\t\tcallback = callback || function() {};\n\n\t\t\tthis\n\t\t\t\t.each(function() {\n\t\t\t\t\t$(this).data(\"roundabout\").tilt = tilt;\n\t\t\t\t\tmethods.updateChildren.apply($(this));\n\t\t\t\t});\n\n\t\t\t// call callback if one was given\n\t\t\tcallback.apply(this);\n\t\t\treturn this;\n\t\t},\n\n\n\t\t// adjustTilt\n\t\t// changes the tilt of the roundabout\n\t\tadjustTilt: function(delta, callback) {\n\t\t\tcallback = callback || function() {};\n\n\t\t\tthis\n\t\t\t\t.each(function() {\n\t\t\t\t\tmethods.setTilt.apply($(this), [$(this).data(\"roundabout\").tilt + delta]);\n\t\t\t\t});\n\n\t\t\tcallback.apply(this);\n\t\t\treturn this;\n\t\t},\n\n\n\n\t\t// animation\n\t\t// -----------------------------------------------------------------------\n\n\t\t// animateToBearing\n\t\t// animates the roundabout to a given bearing, all animations come through here\n\t\tanimateToBearing: function(bearing, duration, easing, passedData, callback) {\n\t\t\tvar now = (new Date()).getTime();\n\n\t\t\tcallback = callback || function() {};\n\n\t\t\t// find callback function in arguments\n\t\t\tif ($.isFunction(passedData)) {\n\t\t\t\tcallback = passedData;\n\t\t\t\tpassedData = null;\n\t\t\t} else if ($.isFunction(easing)) {\n\t\t\t\tcallback = easing;\n\t\t\t\teasing = null;\n\t\t\t} else if ($.isFunction(duration)) {\n\t\t\t\tcallback = duration;\n\t\t\t\tduration = null;\n\t\t\t}\n\n\t\t\tthis\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar timer, easingFn, newBearing,\n\t\t\t\t\t    self = $(this),\n\t\t\t\t\t    data = self.data(\"roundabout\"),\n\t\t\t\t\t    thisDuration = (!duration) ? data.duration : duration,\n\t\t\t\t\t    thisEasingType = (easing) ? easing : data.easing || \"swing\";\n\n\t\t\t\t\t// is this your first time?\n\t\t\t\t\tif (!passedData) {\n\t\t\t\t\t\tpassedData = {\n\t\t\t\t\t\t\ttimerStart: now,\n\t\t\t\t\t\t\tstart: data.bearing,\n\t\t\t\t\t\t\ttotalTime: thisDuration\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\t// update the timer\n\t\t\t\t\ttimer = now - passedData.timerStart;\n\n\t\t\t\t\tif (data.stopAnimation) {\n\t\t\t\t\t\tmethods.allowAnimation.apply(self);\n\t\t\t\t\t\tdata.animating = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// we need to animate more\n\t\t\t\t\tif (timer < thisDuration) {\n\t\t\t\t\t\tif (!data.animating) {\n\t\t\t\t\t\t\tself.trigger(\"animationStart\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdata.animating = true;\n\n\t\t\t\t\t\tif (typeof $.easing.def === \"string\") {\n\t\t\t\t\t\t\teasingFn = $.easing[thisEasingType] || $.easing[$.easing.def];\n\t\t\t\t\t\t\tnewBearing = easingFn(null, timer, passedData.start, bearing - passedData.start, passedData.totalTime);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewBearing = $.easing[thisEasingType]((timer / passedData.totalTime), timer, passedData.start, bearing - passedData.start, passedData.totalTime);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// fixes issue #24, animation changed as of jQuery 1.7.2\n\t\t\t\t\t\t// also addresses issue #29, using easing breaks \"linear\"\n\t\t\t\t\t\tif (methods.compareVersions.apply(null, [$().jquery, \"1.7.2\"]) >= 0 && !($.easing[\"easeOutBack\"])) {\n\t\t\t\t\t\t\tnewBearing = passedData.start + ((bearing - passedData.start) * newBearing);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnewBearing = methods.normalize.apply(null, [newBearing]);\n\t\t\t\t\t\tdata.dragBearing = newBearing;\n\n\t\t\t\t\t\tmethods.setBearing.apply(self, [newBearing, function() {\n\t\t\t\t\t\t\tsetTimeout(function() {  // done with a timeout so that each step is displayed\n\t\t\t\t\t\t\t\tmethods.animateToBearing.apply(self, [bearing, thisDuration, thisEasingType, passedData, callback]);\n\t\t\t\t\t\t\t}, 0);\n\t\t\t\t\t\t}]);\n\n\t\t\t\t\t// we're done animating\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdata.lastAnimationStep = true;\n\n\t\t\t\t\t\tbearing = methods.normalize.apply(null, [bearing]);\n\t\t\t\t\t\tmethods.setBearing.apply(self, [bearing, function() {\n\t\t\t\t\t\t\tself.trigger(\"animationEnd\");\n\t\t\t\t\t\t}]);\n\t\t\t\t\t\tdata.animating = false;\n\t\t\t\t\t\tdata.lastAnimationStep = false;\n\t\t\t\t\t\tdata.dragBearing = bearing;\n\n\t\t\t\t\t\tcallback.apply(self);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\treturn this;\n\t\t},\n\n\n\t\t// animateToNearbyChild\n\t\t// animates roundabout to a nearby child\n\t\tanimateToNearbyChild: function(passedArgs, which) {\n\t\t\tvar duration = passedArgs[0],\n\t\t\t    easing = passedArgs[1],\n\t\t\t    callback = passedArgs[2] || function() {};\n\n\t\t\t// find callback\n\t\t\tif ($.isFunction(easing)) {\n\t\t\t\tcallback = easing;\n\t\t\t\teasing = null;\n\t\t\t} else if ($.isFunction(duration)) {\n\t\t\t\tcallback = duration;\n\t\t\t\tduration = null;\n\t\t\t}\n\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar j, range,\n\t\t\t\t\t    self = $(this),\n\t\t\t\t\t    data = self.data(\"roundabout\"),\n\t\t\t\t\t    bearing = (!data.reflect) ? data.bearing % 360 : data.bearing,\n\t\t\t\t\t    length = self.children(data.childSelector).length;\n\n\t\t\t\t\tif (!data.animating) {\n\t\t\t\t\t\t// reflecting, not moving to previous || not reflecting, moving to next\n\t\t\t\t\t\tif ((data.reflect && which === \"previous\") || (!data.reflect && which === \"next\")) {\n\t\t\t\t\t\t\t// slightly adjust for rounding issues\n\t\t\t\t\t\t\tbearing = (Math.abs(bearing) < data.floatComparisonThreshold) ? 360 : bearing;\n\n\t\t\t\t\t\t\t// clockwise\n\t\t\t\t\t\t\tfor (j = 0; j < length; j += 1) {\n\t\t\t\t\t\t\t\trange = {\n\t\t\t\t\t\t\t\t\tlower: (data.period * j),\n\t\t\t\t\t\t\t\t\tupper: (data.period * (j + 1))\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\trange.upper = (j === length - 1) ? 360 : range.upper;\n\n\t\t\t\t\t\t\t\tif (bearing <= Math.ceil(range.upper) && bearing >= Math.floor(range.lower)) {\n\t\t\t\t\t\t\t\t\tif (length === 2 && bearing === 360) {\n\t\t\t\t\t\t\t\t\t\tmethods.animateToDelta.apply(self, [-180, duration, easing, callback]);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tmethods.animateBearingToFocus.apply(self, [range.lower, duration, easing, callback]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// slightly adjust for rounding issues\n\t\t\t\t\t\t\tbearing = (Math.abs(bearing) < data.floatComparisonThreshold || 360 - Math.abs(bearing) < data.floatComparisonThreshold) ? 0 : bearing;\n\n\t\t\t\t\t\t\t// counterclockwise\n\t\t\t\t\t\t\tfor (j = length - 1; j >= 0; j -= 1) {\n\t\t\t\t\t\t\t\trange = {\n\t\t\t\t\t\t\t\t\tlower: data.period * j,\n\t\t\t\t\t\t\t\t\tupper: data.period * (j + 1)\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\trange.upper = (j === length - 1) ? 360 : range.upper;\n\n\t\t\t\t\t\t\t\tif (bearing >= Math.floor(range.lower) && bearing < Math.ceil(range.upper)) {\n\t\t\t\t\t\t\t\t\tif (length === 2 && bearing === 360) {\n\t\t\t\t\t\t\t\t\t\tmethods.animateToDelta.apply(self, [180, duration, easing, callback]);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tmethods.animateBearingToFocus.apply(self, [range.upper, duration, easing, callback]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t},\n\n\n\t\t// animateToNearestChild\n\t\t// animates roundabout to the nearest child\n\t\tanimateToNearestChild: function(duration, easing, callback) {\n\t\t\tcallback = callback || function() {};\n\n\t\t\t// find callback\n\t\t\tif ($.isFunction(easing)) {\n\t\t\t\tcallback = easing;\n\t\t\t\teasing = null;\n\t\t\t} else if ($.isFunction(duration)) {\n\t\t\t\tcallback = duration;\n\t\t\t\tduration = null;\n\t\t\t}\n\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar nearest = methods.getNearestChild.apply($(this));\n\t\t\t\t\tmethods.animateToChild.apply($(this), [nearest, duration, easing, callback]);\n\t\t\t\t});\n\t\t},\n\n\n\t\t// animateToChild\n\t\t// animates roundabout to a given child position\n\t\tanimateToChild: function(childPosition, duration, easing, callback) {\n\t\t\tcallback = callback || function() {};\n\n\t\t\t// find callback\n\t\t\tif ($.isFunction(easing)) {\n\t\t\t\tcallback = easing;\n\t\t\t\teasing = null;\n\t\t\t} else if ($.isFunction(duration)) {\n\t\t\t\tcallback = duration;\n\t\t\t\tduration = null;\n\t\t\t}\n\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar child,\n\t\t\t\t\t    self = $(this),\n\t\t\t\t\t    data = self.data(\"roundabout\");\n\n\t\t\t\t\tif (data.childInFocus !== childPosition && !data.animating) {\n\t\t\t\t\t\tchild = self.children(data.childSelector).eq(childPosition);\n\t\t\t\t\t\tmethods.animateBearingToFocus.apply(self, [child.data(\"roundabout\").degrees, duration, easing, callback]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t},\n\n\n\t\t// animateToNextChild\n\t\t// animates roundabout to the next child\n\t\tanimateToNextChild: function(duration, easing, callback) {\n\t\t\treturn methods.animateToNearbyChild.apply(this, [arguments, \"next\"]);\n\t\t},\n\n\n\t\t// animateToPreviousChild\n\t\t// animates roundabout to the preious child\n\t\tanimateToPreviousChild: function(duration, easing, callback) {\n\t\t\treturn methods.animateToNearbyChild.apply(this, [arguments, \"previous\"]);\n\t\t},\n\n\n\t\t// animateToDelta\n\t\t// animates roundabout to a given delta (in degrees)\n\t\tanimateToDelta: function(degrees, duration, easing, callback) {\n\t\t\tcallback = callback || function() {};\n\n\t\t\t// find callback\n\t\t\tif ($.isFunction(easing)) {\n\t\t\t\tcallback = easing;\n\t\t\t\teasing = null;\n\t\t\t} else if ($.isFunction(duration)) {\n\t\t\t\tcallback = duration;\n\t\t\t\tduration = null;\n\t\t\t}\n\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar delta = $(this).data(\"roundabout\").bearing + degrees;\n\t\t\t\t\tmethods.animateToBearing.apply($(this), [delta, duration, easing, callback]);\n\t\t\t\t});\n\t\t},\n\n\n\t\t// animateBearingToFocus\n\t\t// animates roundabout to bring a given angle into focus\n\t\tanimateBearingToFocus: function(degrees, duration, easing, callback) {\n\t\t\tcallback = callback || function() {};\n\n\t\t\t// find callback\n\t\t\tif ($.isFunction(easing)) {\n\t\t\t\tcallback = easing;\n\t\t\t\teasing = null;\n\t\t\t} else if ($.isFunction(duration)) {\n\t\t\t\tcallback = duration;\n\t\t\t\tduration = null;\n\t\t\t}\n\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar delta = $(this).data(\"roundabout\").bearing - degrees;\n\t\t\t\t\tdelta = (Math.abs(360 - delta) < Math.abs(delta)) ? 360 - delta : -delta;\n\t\t\t\t\tdelta = (delta > 180) ? -(360 - delta) : delta;\n\n\t\t\t\t\tif (delta !== 0) {\n\t\t\t\t\t\tmethods.animateToDelta.apply($(this), [delta, duration, easing, callback]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t},\n\n\n\t\t// stopAnimation\n\t\t// if an animation is currently in progress, stop it\n\t\tstopAnimation: function() {\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\t$(this).data(\"roundabout\").stopAnimation = true;\n\t\t\t\t});\n\t\t},\n\n\n\t\t// allowAnimation\n\t\t// clears the stop-animation hold placed by stopAnimation\n\t\tallowAnimation: function() {\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\t$(this).data(\"roundabout\").stopAnimation = false;\n\t\t\t\t});\n\t\t},\n\n\n\n\t\t// autoplay\n\t\t// -----------------------------------------------------------------------\n\n\t\t// startAutoplay\n\t\t// starts autoplaying this roundabout\n\t\tstartAutoplay: function(callback) {\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar self = $(this),\n\t\t\t\t\t    data = self.data(\"roundabout\");\n\n\t\t\t\t\tcallback = callback || data.autoplayCallback || function() {};\n\n\t\t\t\t\tclearInterval(data.autoplayInterval);\n\t\t\t\t\tdata.autoplayInterval = setInterval(function() {\n\t\t\t\t\t\tmethods.animateToNextChild.apply(self, [callback]);\n\t\t\t\t\t}, data.autoplayDuration);\n\t\t\t\t\tdata.autoplayIsRunning = true;\n\t\t\t\t\t\n\t\t\t\t\tself.trigger(\"autoplayStart\");\n\t\t\t\t});\n\t\t},\n\n\n\t\t// stopAutoplay\n\t\t// stops autoplaying this roundabout\n\t\tstopAutoplay: function(keepAutoplayBindings) {\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\tclearInterval($(this).data(\"roundabout\").autoplayInterval);\n\t\t\t\t\t$(this).data(\"roundabout\").autoplayInterval = null;\n\t\t\t\t\t$(this).data(\"roundabout\").autoplayIsRunning = false;\n\t\t\t\t\t\n\t\t\t\t\t// this will prevent autoplayPauseOnHover from restarting autoplay\n\t\t\t\t\tif (!keepAutoplayBindings) {\n\t\t\t\t\t\t$(this).unbind(\".autoplay\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$(this).trigger(\"autoplayStop\");\n\t\t\t\t});\n\t\t},\n\t\t\n\t\t\n\t\t// toggleAutoplay\n\t\t// toggles autoplay pause/resume\n\t\ttoggleAutoplay: function(callback) {\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar self = $(this),\n\t\t\t\t\t    data = self.data(\"roundabout\");\n\n\t\t\t\t\tcallback = callback || data.autoplayCallback || function() {};\n\n\t\t\t\t\tif (!methods.isAutoplaying.apply($(this))) {\n\t\t\t\t\t\tmethods.startAutoplay.apply($(this), [callback]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmethods.stopAutoplay.apply($(this), [callback]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t},\n\n\n\t\t// isAutoplaying\n\t\t// is this roundabout currently autoplaying?\n\t\tisAutoplaying: function() {\n\t\t\treturn (this.data(\"roundabout\").autoplayIsRunning);\n\t\t},\n\n\n\t\t// changeAutoplayDuration\n\t\t// stops the autoplay, changes the duration, restarts autoplay\n\t\tchangeAutoplayDuration: function(duration) {\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar self = $(this),\n\t\t\t\t\t    data = self.data(\"roundabout\");\n\n\t\t\t\t\tdata.autoplayDuration = duration;\n\n\t\t\t\t\tif (methods.isAutoplaying.apply(self)) {\n\t\t\t\t\t\tmethods.stopAutoplay.apply(self);\n\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\tmethods.startAutoplay.apply(self);\n\t\t\t\t\t\t}, 10);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t},\n\n\n\n\t\t// helpers\n\t\t// -----------------------------------------------------------------------\n\n\t\t// normalize\n\t\t// regulates degrees to be >= 0.0 and < 360\n\t\tnormalize: function(degrees) {\n\t\t\tvar inRange = degrees % 360.0;\n\t\t\treturn (inRange < 0) ? 360 + inRange : inRange;\n\t\t},\n\n\n\t\t// normalizeRad\n\t\t// regulates radians to be >= 0 and < Math.PI * 2\n\t\tnormalizeRad: function(radians) {\n\t\t\twhile (radians < 0) {\n\t\t\t\tradians += (Math.PI * 2);\n\t\t\t}\n\n\t\t\twhile (radians > (Math.PI * 2)) {\n\t\t\t\tradians -= (Math.PI * 2);\n\t\t\t}\n\n\t\t\treturn radians;\n\t\t},\n\n\n\t\t// isChildBackDegreesBetween\n\t\t// checks that a given child's backDegrees is between two values\n\t\tisChildBackDegreesBetween: function(value1, value2) {\n\t\t\tvar backDegrees = $(this).data(\"roundabout\").backDegrees;\n\n\t\t\tif (value1 > value2) {\n\t\t\t\treturn (backDegrees >= value2 && backDegrees < value1);\n\t\t\t} else {\n\t\t\t\treturn (backDegrees < value2 && backDegrees >= value1);\n\t\t\t}\n\t\t},\n\n\n\t\t// getAnimateToMethod\n\t\t// takes a user-entered option and maps it to an animation method\n\t\tgetAnimateToMethod: function(effect) {\n\t\t\teffect = effect.toLowerCase();\n\n\t\t\tif (effect === \"next\") {\n\t\t\t\treturn \"animateToNextChild\";\n\t\t\t} else if (effect === \"previous\") {\n\t\t\t\treturn \"animateToPreviousChild\";\n\t\t\t}\n\n\t\t\t// default selection\n\t\t\treturn \"animateToNearestChild\";\n\t\t},\n\t\t\n\t\t\n\t\t// relayoutChildren\n\t\t// lays out children again with new contextual information\n\t\trelayoutChildren: function() {\n\t\t\treturn this\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar self = $(this),\n\t\t\t\t\t    settings = $.extend({}, self.data(\"roundabout\"));\n\n\t\t\t\t\tsettings.startingChild = self.data(\"roundabout\").childInFocus;\n\t\t\t\t\tmethods.init.apply(self, [settings, null, true]);\n\t\t\t\t});\n\t\t},\n\n\n\t\t// getNearestChild\n\t\t// gets the nearest child from the current bearing\n\t\tgetNearestChild: function() {\n\t\t\tvar self = $(this),\n\t\t\t    data = self.data(\"roundabout\"),\n\t\t\t    length = self.children(data.childSelector).length;\n\n\t\t\tif (!data.reflect) {\n\t\t\t\treturn ((length) - (Math.round(data.bearing / data.period) % length)) % length;\n\t\t\t} else {\n\t\t\t\treturn (Math.round(data.bearing / data.period) % length);\n\t\t\t}\n\t\t},\n\n\n\t\t// degToRad\n\t\t// converts degrees to radians\n\t\tdegToRad: function(degrees) {\n\t\t\treturn methods.normalize.apply(null, [degrees]) * Math.PI / 180.0;\n\t\t},\n\n\n\t\t// getPlacement\n\t\t// returns the starting degree for a given child\n\t\tgetPlacement: function(child) {\n\t\t\tvar data = this.data(\"roundabout\");\n\t\t\treturn (!data.reflect) ? 360.0 - (data.period * child) : data.period * child;\n\t\t},\n\n\n\t\t// isInFocus\n\t\t// is this roundabout currently in focus?\n\t\tisInFocus: function(degrees) {\n\t\t\tvar diff,\n\t\t\t    self = this,\n\t\t\t    data = self.data(\"roundabout\"),\n\t\t\t    bearing = methods.normalize.apply(null, [data.bearing]);\n\n\t\t\tdegrees = methods.normalize.apply(null, [degrees]);\n\t\t\tdiff = Math.abs(bearing - degrees);\n\n\t\t\t// this calculation gives a bit of room for javascript float rounding\n\t\t\t// errors, it looks on both 0deg and 360deg ends of the spectrum\n\t\t\treturn (diff <= data.floatComparisonThreshold || diff >= 360 - data.floatComparisonThreshold);\n\t\t},\n\t\t\n\t\t\n\t\t// getChildInFocus\n\t\t// returns the current child in focus, or false if none are in focus\n\t\tgetChildInFocus: function() {\n\t\t\tvar data = $(this).data(\"roundabout\");\n\t\t\t\n\t\t\treturn (data.childInFocus > -1) ? data.childInFocus : false;\n\t\t},\n\n\n\t\t// compareVersions\n\t\t// compares a given version string with another\n\t\tcompareVersions: function(baseVersion, compareVersion) {\n\t\t\tvar i,\n\t\t\t    base = baseVersion.split(/\\./i),\n\t\t\t    compare = compareVersion.split(/\\./i),\n\t\t\t    maxVersionSegmentLength = (base.length > compare.length) ? base.length : compare.length;\n\n\t\t\tfor (i = 0; i <= maxVersionSegmentLength; i++) {\n\t\t\t\tif (base[i] && !compare[i] && parseInt(base[i], 10) !== 0) {\n\t\t\t\t\t// base is higher\n\t\t\t\t\treturn 1;\n\t\t\t\t} else if (compare[i] && !base[i] && parseInt(compare[i], 10) !== 0) {\n\t\t\t\t\t// compare is higher\n\t\t\t\t\treturn -1;\n\t\t\t\t} else if (base[i] === compare[i]) {\n\t\t\t\t\t// these are the same, next\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (base[i] && compare[i]) {\n\t\t\t\t\tif (parseInt(base[i], 10) > parseInt(compare[i], 10)) {\n\t\t\t\t\t\t// base is higher\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// compare is higher\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// nothing was triggered, versions are the same\n\t\t\treturn 0;\n\t\t}\n\t};\n\n\n\t// start the plugin\n\t$.fn.roundabout = function(method) {\n\t\tif (methods[method]) {\n\t\t\treturn methods[method].apply(this, Array.prototype.slice.call(arguments, 1));\n\t\t} else if (typeof method === \"object\" || $.isFunction(method) || !method) {\n\t\t\treturn methods.init.apply(this, arguments);\n\t\t} else {\n\t\t\t$.error(\"Method \" + method + \" does not exist for jQuery.roundabout.\");\n\t\t}\n\t};\n})(jQuery);"
  }
]