text: ﻿var sliceTransform,sliceTransformCustomization,colorpalette;wheelnav=function(n,t,i,r){var u,e,s,o,f;if(this.holderId="wheel",n!==undefined&&n!==null&&(this.holderId=n),u=document.getElementById(n),(u===null||u===undefined)&&(t===undefined||t===null))return this;if(s=!0,t===undefined||t===null){for(o=[],f=0;f<u.children.length;f++)u.children[f].localName==="svg"&&o.push(u.children[f]);for(f=0;f<o.length;f++)u.removeChild(o[f]);i!==undefined&&i!==null?((r===undefined||r===null)&&(r=i),this.raphael=new Raphael(n,i,r),e=i):(this.raphael=new Raphael(n),e=u.clientWidth);this.raphael.setViewBox(0,0,this.raphael.width,this.raphael.height,!0)}else this.raphael=t,e=this.raphael.width,s=!1;return this.centerX=e/2,this.centerY=e/2,this.wheelRadius=e/2,this.navAngle=0,this.sliceAngle=null,this.titleRotateAngle=null,this.titleCurved=!1,this.titleCurvedClockwise=null,this.titleCurvedByRotateAngle=!1,this.initTitleRotate=!1,this.clickModeRotate=!0,this.rotateRound=!1,this.rotateRoundCount=0,this.clickModeSpreadOff=!1,this.animatetimeCalculated=!1,this.animateRepeatCount=0,this.clockwise=!0,this.multiSelect=!1,this.hoverPercent=1,this.selectedPercent=1,this.clickablePercentMin=0,this.clickablePercentMax=1,this.currentPercent=null,this.cssMode=!1,this.selectedToFront=!0,this.selectedNavItemIndex=0,this.hoverEnable=!0,this.hoveredToFront=!0,this.navItemCount=0,this.navItemCountLabeled=!1,this.navItemCountLabelOffset=0,this.navItems=[],this.navItemsEnabled=!0,this.animateFinishFunction=null,this.navItemsContinuous=!1,this.navItemsCentered=!0,this.colors=colorpalette.defaultpalette,this.titleSpreadScale=null,this.spreaderEnable=!1,this.spreaderRadius=20,this.spreaderStartAngle=0,this.spreaderSliceAngle=360,this.spreaderPathFunction=spreaderPath().PieSpreader,this.spreaderPathCustom=null,this.spreaderInPercent=1,this.spreaderOutPercent=1,this.spreaderInTitle="+",this.spreaderOutTitle="-",this.spreaderTitleFont=null,this.spreaderPathInAttr=null,this.spreaderPathOutAttr=null,this.spreaderTitleInAttr=null,this.spreaderTitleOutAttr=null,this.spreaderInTitleWidth=null,this.spreaderInTitleHeight=null,this.spreaderOutTitleWidth=null,this.spreaderOutTitleHeight=null,this.minPercent=.01,this.maxPercent=1,this.initPercent=1,this.markerEnable=!1,this.markerPathFunction=markerPath().TriangleMarker,this.markerPathCustom=null,this.currentClick=0,this.animateLocked=!1,this.slicePathAttr=null,this.sliceHoverAttr=null,this.sliceSelectedAttr=null,this.titleFont="100 24px Impact, Charcoal, sans-serif",this.titleAttr=null,this.titleHoverAttr=null,this.titleSelectedAttr=null,this.titleWidth=null,this.titleHeight=null,this.titleHoverWidth=null,this.titleHoverHeight=null,this.titleSelectedWidth=null,this.titleSelectedHeight=null,this.linePathAttr=null,this.lineHoverAttr=null,this.lineSelectedAttr=null,this.slicePathCustom=null,this.sliceClickablePathCustom=null,this.sliceSelectedPathCustom=null,this.sliceHoverPathCustom=null,this.sliceInitPathCustom=null,this.sliceTransformCustom=null,this.sliceSelectedTransformCustom=null,this.sliceHoverTransformCustom=null,this.sliceInitTransformCustom=null,this.animateeffect=null,this.animatetime=null,this.slicePathFunction=slicePath().PieSlice!==undefined?slicePath().PieSlice:slicePath().NullSlice,this.sliceClickablePathFunction=null,this.sliceTransformFunction=null,this.sliceSelectedPathFunction=null,this.sliceSelectedTransformFunction=null,this.sliceHoverPathFunction=null,this.sliceHoverTransformFunction=null,this.sliceInitPathFunction=null,this.sliceInitTransformFunction=null,this.keynavigateEnabled=!1,this.keynavigateOnlyFocus=!1,this.keynavigateDownCode=37,this.keynavigateDownCodeAlt=40,this.keynavigateUpCode=39,this.keynavigateUpCodeAlt=38,this.parseWheel(u),this};wheelnav.prototype.initWheel=function(n){var u,r,t;for(this.styleWheel(),this.navItemCount===0?(n!==undefined&&n!==null&&Array.isArray(n)||(n=["title-0","title-1","title-2","title-3"]),this.navItemCount=n.length):n=null,i=0;i<this.navItemCount;i++)r="",r=this.navItemCountLabeled?(i+this.navItemCountLabelOffset).toString():n!==null?n[i]:"",u=new wheelnavItem(this,r,i),this.navItems.push(u);for(t=0,i=0;i<this.navItems.length;i++)this.navItems[i].fillAttr=this.colors[t],t++,t===this.colors.length&&(t=0)};wheelnav.prototype.createWheel=function(n,t){for(this.currentPercent===null&&(this.currentPercent=t?this.minPercent:this.maxPercent),this.navItems.length===0&&this.initWheel(n),this.selectedNavItemIndex!==null&&(this.navItems[this.selectedNavItemIndex].selected=!0),i=0;i<this.navItemCount;i++)this.navItems[i].createNavItem();if(this.keynavigateEnabled){var r=this,u=window;this.keynavigateOnlyFocus&&(u=document.getElementById(this.holderId),u.hasAttribute("tabindex")||u.setAttribute("tabindex",0));u.addEventListener("keydown",this.keyNavigateFunction=function(n){var i,t;n=n||window.e;i=n.which||n.keyCode;[r.keynavigateDownCode,r.keynavigateDownCodeAlt,r.keynavigateUpCode,r.keynavigateUpCodeAlt].indexOf(n.keyCode)>-1&&n.preventDefault();t=null;(i===r.keynavigateUpCode||i===r.keynavigateUpCodeAlt)&&(t=r.currentClick===r.navItemCount-1?0:r.currentClick+1);(i===r.keynavigateDownCode||i===r.keynavigateDownCodeAlt)&&(t=r.currentClick===0?r.navItemCount-1:r.currentClick-1);t!==null&&(r.navigateWheel(t),r.navItems[t].navigateFunction!==null&&r.navItems[t].navigateFunction())})}return this.spreader=new spreader(this),this.marker=new marker(this),this.refreshWheel(),t!==undefined&&this.spreadWheel(),this};wheelnav.prototype.removeWheel=function(){if(this.raphael.remove(),this.keynavigateEnabled){var n=window;this.keynavigateOnlyFocus&&(n=document.getElementById(this.holderId),n.hasAttribute("tabindex")&&n.removeAttribute("tabindex"));n.removeEventListener("keydown",this.keyNavigateFunction)}};wheelnav.prototype.refreshWheel=function(n){for(i=0;i<this.navItemCount;i++){var t=this.navItems[i];t.setWheelSettings(n);t.refreshNavItem(n)}this.marker.setCurrentTransform();this.spreader.setCurrentTransform()};wheelnav.prototype.navigateWheel=function(n){var t,r,u;for(this.animateUnlock(!0),this.clickModeRotate&&(this.animateLocked=!0),i=0;i<this.navItemCount;i++)t=this.navItems[i],t.hovered=!1,i===n?this.multiSelect?t.selected=!t.selected:(t.selected=!0,this.selectedNavItemIndex=i):this.multiSelect||(t.selected=!1),this.clickModeRotate&&(r=this.navItems[n].navAngle-this.navItems[this.currentClick].navAngle,this.rotateRound&&(this.clockwise&&r<0&&(r=360+r),!this.clockwise&&r>0&&(r=r-360)),t.currentRotateAngle-=r,u=this.animatetime!=null?this.animatetime:1500,this.animatetimeCalculated&&n!==this.currentClick&&(t.animatetime=u*(Math.abs(r)/360)),this.rotateRoundCount>0&&(this.clockwise?t.currentRotateAngle-=this.rotateRoundCount*360:t.currentRotateAngle+=this.rotateRoundCount*360,t.animatetime=u*(this.rotateRoundCount+1)));for(i=0;i<this.navItemCount;i++)t=this.navItems[i],t.setCurrentTransform(!0,!0),t.refreshNavItem();this.currentClick=n;this.clickModeSpreadOff?(this.currentPercent=this.maxPercent,this.spreadWheel()):(n===null||this.clickModeRotate?this.marker.setCurrentTransform():this.marker.setCurrentTransform(this.navItems[this.currentClick].navAngle),this.spreader.setCurrentTransform(!0))};wheelnav.prototype.spreadWheel=function(){for(this.animateUnlock(!0),this.animateLocked=!0,this.currentPercent=this.currentPercent===this.maxPercent||this.currentPercent===null?this.minPercent:this.maxPercent,i=0;i<this.navItemCount;i++){var n=this.navItems[i];n.hovered=!1;n.setCurrentTransform(!0,!1)}return this.marker.setCurrentTransform(),this.spreader.setCurrentTransform(),this};wheelnav.prototype.animateUnlock=function(n,t){var i,r;if(n!==undefined&&n===!0)for(i=0;i<this.navItemCount;i++)this.navItems[i].navSliceUnderAnimation=!1,this.navItems[i].navTitleUnderAnimation=!1,this.navItems[i].navTitlePathUnderAnimation=!1,this.navItems[i].navLineUnderAnimation=!1,this.navItems[i].navSlice.stop(),this.navItems[i].navLine.stop(),this.navItems[i].navTitle.stop(),this.navItems[i].navTitlePath!==undefined&&this.navItems[i].navTitlePath.stop();else{for(r=0;r<this.navItemCount;r++)if(this.navItems[r].navSliceUnderAnimation===!0||this.navItems[r].navTitleUnderAnimation===!0||this.navItems[r].navTitlePathUnderAnimation===!0||this.navItems[r].navLineUnderAnimation===!0)return;this.animateLocked=!1;this.animateFinishFunction!==null&&t!==undefined&&t===!0&&this.animateFinishFunction()}};wheelnav.prototype.setTooltips=function(n){if(n!==undefined&&n!==null&&Array.isArray(n)&&n.length<=this.navItems.length)for(var t=0;t<n.length;t++)this.navItems[t].setTooltip(n[t])};wheelnav.prototype.getItemId=function(n){return"wheelnav-"+this.holderId+"-item-"+n};wheelnav.prototype.getSliceId=function(n){return"wheelnav-"+this.holderId+"-slice-"+n};wheelnav.prototype.getClickableSliceId=function(n){return"wheelnav-"+this.holderId+"-clickableslice-"+n};wheelnav.prototype.getTitleId=function(n){return"wheelnav-"+this.holderId+"-title-"+n};wheelnav.prototype.getTitlePathId=function(n){return"wheelnav-"+this.holderId+"-titlepath-"+n};wheelnav.prototype.getLineId=function(n){return"wheelnav-"+this.holderId+"-line-"+n};wheelnav.prototype.getSpreaderId=function(){return"wheelnav-"+this.holderId+"-spreader"};wheelnav.prototype.getSpreaderTitleId=function(){return"wheelnav-"+this.holderId+"-spreadertitle"};wheelnav.prototype.getMarkerId=function(){return"wheelnav-"+this.holderId+"-marker"};wheelnav.prototype.parseWheel=function(n){var it,l,a,v,ut,ft,et,y,e,ot,o,p,w,st,ht,ct,lt,at,b,k,d,g,vt,yt,u,s,t;if(n!==undefined&&n!==null){if(it=n.hasAttribute("data-wheelnav"),it){var i=[],h=[],f=[],rt=!1,c=n.getAttribute("data-wheelnav-slicepath");for(c!==null&&slicePath()[c]!==undefined&&(this.slicePathFunction=slicePath()[c]),l=n.getAttribute("data-wheelnav-colors"),l!==null&&(this.colors=l.split(",")),a=n.getAttribute("data-wheelnav-wheelradius"),a!==null&&(this.wheelRadius=Number(a)),v=n.getAttribute("data-wheelnav-navangle"),v!==null&&(this.navAngle=Number(v)),ut=n.getAttribute("data-wheelnav-rotateoff"),ut!==null&&(this.clickModeRotate=!1),ft=n.getAttribute("data-wheelnav-cssmode"),ft!==null&&(this.cssMode=!0),et=n.getAttribute("data-wheelnav-spreader"),et!==null&&(this.spreaderEnable=!0),y=n.getAttribute("data-wheelnav-spreaderradius"),y!==null&&(this.spreaderRadius=Number(y)),e=n.getAttribute("data-wheelnav-spreaderpath"),e!==null&&markerPath()[e]!==undefined&&(this.spreaderPathFunction=spreaderPath()[e]),ot=n.getAttribute("data-wheelnav-marker"),ot!==null&&(this.markerEnable=!0),o=n.getAttribute("data-wheelnav-markerpath"),o!==null&&markerPath()[o]!==undefined&&(this.markerPathFunction=markerPath()[o]),p=n.getAttribute("data-wheelnav-titlewidth"),p!==null&&(this.titleWidth=Number(p)),w=n.getAttribute("data-wheelnav-titleheight"),w!==null&&(this.titleHeight=Number(w)),st=n.getAttribute("data-wheelnav-titlecurved"),st!==null&&(this.titleCurved=!0),ht=n.getAttribute("data-wheelnav-titlecurvedclockwise"),ht!==null&&(this.titleCurvedClockwise=!0),ct=n.getAttribute("data-wheelnav-titlecurvedbyrotateangle"),ct!==null&&(this.titleCurvedByRotateAngle=!0),lt=n.getAttribute("data-wheelnav-keynav"),lt!==null&&(this.keynavigateEnabled=!0),at=n.getAttribute("data-wheelnav-keynavonlyfocus"),at!==null&&(this.keynavigateOnlyFocus=!0),b=n.getAttribute("data-wheelnav-keynavdowncode"),b!==null&&(this.keynavigateDownCode=Number(b)),k=n.getAttribute("data-wheelnav-keynavdowncodealt"),k!==null&&(this.keynavigateDownCodeAlt=Number(k)),d=n.getAttribute("data-wheelnav-keynavupcode"),d!==null&&(this.keynavigateUpCode=Number(d)),g=n.getAttribute("data-wheelnav-keynavupcodealt"),g!==null&&(this.keynavigateUpCodeAlt=Number(g)),vt=n.getAttribute("data-wheelnav-init"),vt!==null&&(rt=!0),t=0;t<n.children.length;t++){var nt=n.children[t].getAttribute("data-wheelnav-navitemtext"),r=n.children[t].getAttribute("data-wheelnav-navitemicon"),tt=n.children[t].getAttribute("data-wheelnav-navitemimg");if(nt!==null||r!==null||tt!==null){if(nt!==null)i.push(nt);else if(r!==null)icon[r]!==undefined?i.push(icon[r]):i.push(r);else if(tt!==null)i.push("imgsrc:"+tt);else continue;for(n.children[t].onmouseup!==undefined?f.push(n.children[t].onmouseup):f.push(null),yt=!1,u=0;u<n.children[t].children.length;u++)n.children[t].children[u].getAttribute("href")!==undefined&&h.push(n.children[t].children[u].getAttribute("href"));yt||h.push(null)}}if(i.length>0){for(this.initWheel(i),t=0;t<f.length;t++)this.navItems[t].navigateFunction=f[t],this.navItems[t].navigateHref=h[t];rt||this.createWheel()}}for(s=[],t=0;t<n.children.length;t++)n.children[t].localName!=="svg"&&s.push(n.children[t]);for(t=0;t<s.length;t++)n.removeChild(s[t])}};wheelnavItem=function(n,t,i){return this.wheelnav=n,this.wheelItemIndex=i,this.itemIndex=n.clockwise?i:-i,this.enabled=n.navItemsEnabled,this.selected=!1,this.hovered=!1,this.navItem=null,this.navSlice=null,this.navTitle=null,this.navLine=null,this.navClickableSlice=null,this.navSliceCurrentTransformString=null,this.navTitleCurrentTransformString=null,this.navLineCurrentTransformString=null,this.navSliceUnderAnimation=!1,this.navTitleUnderAnimation=!1,this.navTitlePathUnderAnimation=!1,this.navLineUnderAnimation=!1,this.currentRotateAngle=0,this.setTitle(t),this.tooltip=null,this.fillAttr="#CCC",this.titleFont=this.wheelnav.titleFont,this.navigateHref=null,this.navigateFunction=null,this.titleWidth=null,this.titleHeight=null,this.titleHoverWidth=null,this.titleHoverHeight=null,this.titleSelectedWidth=null,this.titleSelectedHeight=null,this.animateeffect=null,this.animatetime=null,this.sliceInitPathFunction=null,this.sliceClickablePathFunction=null,this.slicePathFunction=null,this.sliceSelectedPathFunction=null,this.sliceHoverPathFunction=null,this.sliceTransformFunction=null,this.sliceSelectedTransformFunction=null,this.sliceHoverTransformFunction=null,this.sliceInitTransformFunction=null,this.slicePathCustom=null,this.sliceClickablePathCustom=null,this.sliceSelectedPathCustom=null,this.sliceHoverPathCustom=null,this.sliceInitPathCustom=null,this.sliceTransformCustom=null,this.sliceSelectedTransformCustom=null,this.sliceHoverTransformCustom=null,this.sliceInitTransformCustom=null,this.initPercent=null,this.minPercent=null,this.maxPercent=null,this.hoverPercent=null,this.selectedPercent=null,this.clickablePercentMin=null,this.clickablePercentMax=null,this.titleSpreadScale=null,this.sliceAngle=null,this.titleRotateAngle=null,this.titleCurved=null,this.titleCurvedClockwise=null,this.titleCurvedByRotateAngle=null,this.styleNavItem(),this};wheelnavItem.prototype.createNavItem=function(){var u,n,t,i,e,f,s;this.setWheelSettings(!1);this.navigateHref!==null&&(this.navigateFunction=function(){window.location.href=this.navigateHref});this.wheelnav.cssMode||(this.slicePathAttr.fill=this.fillAttr,this.sliceHoverAttr.fill=this.fillAttr,this.sliceSelectedAttr.fill=this.fillAttr);this.enabled||(this.wheelnav.cssMode||(this.slicePathAttr.cursor="default",this.sliceHoverAttr.cursor="default",this.titleAttr.cursor="default",this.titleHoverAttr.cursor="default",this.linePathAttr.cursor="default",this.lineHoverAttr.cursor="default"),this.sliceClickablePathAttr.cursor="default",this.sliceClickableHoverAttr.cursor="default");u=this.wheelItemIndex-1;n=360/this.wheelnav.navItemCount;this.sliceAngle===null&&(this.sliceAngle=360/this.wheelnav.navItemCount);this.wheelnav.clockwise?this.wheelnav.navItemsContinuous?this.baseAngle=this.itemIndex===0?this.itemIndex*this.sliceAngle+(-this.sliceAngle/2+this.wheelnav.navAngle):this.wheelnav.navItems[u].baseAngle+this.wheelnav.navItems[u].sliceAngle:this.wheelnav.navItemsCentered?this.baseAngle=this.itemIndex*n+(-this.sliceAngle/2+this.wheelnav.navAngle):(this.baseAngle=this.itemIndex*n+(-n/2+this.wheelnav.navAngle),this.currentRotateAngle+=n/2-this.wheelnav.navItems[0].sliceAngle/2):this.wheelnav.navItemsContinuous?this.baseAngle=this.itemIndex===0?this.itemIndex*this.sliceAngle+(-this.sliceAngle/2+this.wheelnav.navAngle):this.wheelnav.navItems[u].baseAngle-this.wheelnav.navItems[this.wheelItemIndex].sliceAngle:this.wheelnav.navItemsCentered?this.baseAngle=this.itemIndex*n+(-this.sliceAngle/2+this.wheelnav.navAngle):(this.baseAngle=this.itemIndex*n+(-n/2+this.wheelnav.navAngle)+(n-this.sliceAngle),this.currentRotateAngle-=n/2-this.wheelnav.navItems[0].sliceAngle/2);this.navAngle=this.baseAngle+this.sliceAngle/2;this.wheelnav.animatetimeCalculated&&(this.animatetime=this.wheelnav.animatetime/this.wheelnav.navItemCount);this.initPathsAndTransforms();t=this.sliceInitPath;this.navSlice=this.wheelnav.raphael.path(t.slicePathString);this.navSlice.attr(this.slicePathAttr);this.navSlice.id=this.wheelnav.getSliceId(this.wheelItemIndex);this.navSlice.node.id=this.navSlice.id;this.navLine=this.wheelnav.raphael.path(t.linePathString);this.navLine.attr(this.linePathAttr);this.navLine.id=this.wheelnav.getLineId(this.wheelItemIndex);this.navLine.node.id=this.navLine.id;i=this.initNavTitle;wheelnavTitle().isPathTitle(this.title)?this.navTitle=this.wheelnav.raphael.path(i.path):wheelnavTitle().isImageTitle(this.title)?this.navTitle=this.wheelnav.raphael.image(i.src,t.titlePosX-this.titleWidth/2,t.titlePosY-this.titleHeight/2,this.titleWidth,this.titleHeight):this.titleCurved?(this.navTitle=this.wheelnav.raphael.text(t.titlePosX,t.titlePosY,"."),i.title!==""&&this.addCurvedTitle(i.title)):this.navTitle=this.wheelnav.raphael.text(t.titlePosX,t.titlePosY,i.title);this.navTitle.id=this.wheelnav.getTitleId(this.wheelItemIndex);this.navTitle.node.id=this.navTitle.id;this.navTitle.attr(this.titleAttr);this.titleCurved&&(e=document.getElementById(this.navTitle.node.id),e!==null&&(f=e.getElementsByTagName("tspan"),f.length>0&&(f[0].setAttribute("fill","transparent"),f[0].setAttribute("stroke","transparent"))));this.navSliceCurrentTransformString="";this.initTransform.sliceTransformString!==""&&(this.navSliceCurrentTransformString+=this.initTransform.sliceTransformString);this.navLineCurrentTransformString="";this.initTransform.lineTransformString!==""&&(this.navLineCurrentTransformString+=this.initTransform.lineTransformString);this.navTitleCurrentTransformString="";this.navTitleCurrentTransformString+=this.getTitleRotateString(this.wheelnav.initTitleRotate);this.initTransform.titleTransformString!==""&&this.initTransform.titleTransformString!==undefined&&(this.navTitleCurrentTransformString+=this.initTransform.titleTransformString);this.wheelnav.currentPercent<.05&&(this.navTitleCurrentTransformString+=",s0.05");this.navTitleSizeTransform!==undefined&&(this.navTitleCurrentTransformString+=this.navTitleSizeTransform);this.navSlice.attr({transform:this.navSliceCurrentTransformString});this.navLine.attr({transform:this.navLineCurrentTransformString});this.navTitle.attr({transform:this.navTitleCurrentTransformString});this.navItem=this.wheelnav.raphael.set();this.sliceClickablePathFunction!==null?(s=this.getCurrentClickablePath(),this.navClickableSlice=this.wheelnav.raphael.path(s.slicePathString).attr(this.sliceClickablePathAttr).toBack(),this.navClickableSlice.id=this.wheelnav.getClickableSliceId(this.wheelItemIndex),this.navClickableSlice.node.id=this.navClickableSlice.id,this.navItem.push(this.navSlice,this.navLine,this.navTitle,this.navClickableSlice)):this.navItem.push(this.navSlice,this.navLine,this.navTitle);this.setTooltip(this.tooltip);this.navItem.id=this.wheelnav.getItemId(this.wheelItemIndex);var h=this.wheelnav,r=this,o=this.wheelItemIndex;this.enabled&&(this.navItem.mouseup(function(){r.navigateFunction!==null&&r.navigateFunction();h.navigateWheel(o)}),this.wheelnav.hoverEnable&&(this.navItem.mouseover(function(){r.hovered!==!0&&r.hoverEffect(o,!0)}),this.navItem.mouseout(function(){r.hovered=!1;r.hoverEffect(o,!1)})));this.setCurrentTransform(!0,!1)};wheelnavItem.prototype.addCurvedTitle=function(n){var r=[],i,u,t;this.sliceInitPath.titlePathString!==undefined&&this.sliceInitPath.titlePathString!==""?r=this.sliceInitPath.titlePathString:(this.sliceHelper.titleRadius=this.wheelnav.wheelRadius*.63,r=this.sliceHelper.getCurvedTitlePathString());this.navTitle.node.id=this.wheelnav.getTitleId(this.wheelItemIndex);i=this.wheelnav.getTitlePathId(this.wheelItemIndex);this.navTitlePath=this.wheelnav.raphael.path(r);this.navTitlePath.attr({fill:"transparent",stroke:"transparent"});this.navTitlePath.node.id=i;u=document.getElementById(this.navTitle.node.id);t=window.document.createElementNS("http://www.w3.org/2000/svg","textPath");t.setAttribute("id",i+"-text");t.setAttribute("href","#"+i);t.setAttribute("startOffset","50%");t.setAttribute("dominant-baseline","middle");t.setAttribute("alignment-baseline","middle");t.textContent=n;u.appendChild(t);this.titleCurvedByRotateAngle||(this.titleRotateAngle=-this.navAngle)};wheelnavItem.prototype.hoverEffect=function(n,t){this.wheelnav.animateLocked===!1&&(t&&(this.selected||(this.hovered=!0)),this.refreshNavItem(),(this.hoverPercent!==1||this.sliceHoverPathFunction!==null||this.sliceHoverTransformFunction!==null||this.titleHover!==this.title||this.titleHoverWidth!==this.titleWidth||this.titleHoverHeight!==this.titleHeight)&&this.setCurrentTransform(!1,!1),this.wheelnav.marker.setCurrentTransform(),this.wheelnav.spreader.setCurrentTransform(!0))};wheelnavItem.prototype.setCurrentTransform=function(n,t){var e,l,a,w,v,o,s,u,y,p,f,c;if(!this.wheelnav.clickModeRotate||!this.navSliceUnderAnimation&&!this.navTitleUnderAnimation&&!this.navTitlePathUnderAnimation&&!this.navLineUnderAnimation){n!==undefined&&n===!0&&(this.navSliceUnderAnimation=!0,this.navTitleUnderAnimation=!0,this.navTitlePath!==undefined&&(this.navTitlePathUnderAnimation=!0),this.navLineUnderAnimation=!0);this.navSliceCurrentTransformString="";this.wheelnav.clickModeRotate&&(this.navSliceCurrentTransformString+=this.getItemRotateString());this.selected?this.selectTransform.sliceTransformString!==undefined&&(this.navSliceCurrentTransformString+=this.selectTransform.sliceTransformString):this.hovered&&this.hoverTransform.sliceTransformString!==undefined&&(this.navSliceCurrentTransformString+=this.hoverTransform.sliceTransformString);this.sliceTransform.sliceTransformString!==undefined&&(this.navSliceCurrentTransformString+=this.sliceTransform.sliceTransformString);this.navLineCurrentTransformString="";this.wheelnav.clickModeRotate&&(this.navLineCurrentTransformString+=this.getItemRotateString());this.selected?this.selectTransform.lineTransformString!==undefined&&(this.navLineCurrentTransformString+=this.selectTransform.lineTransformString):this.hovered&&this.hoverTransform.lineTransformString!==undefined&&(this.navLineCurrentTransformString+=this.hoverTransform.lineTransformString);this.sliceTransform.lineTransformString!==undefined&&(this.navLineCurrentTransformString+=this.sliceTransform.lineTransformString);this.navTitleCurrentTransformString="";this.navTitleCurrentTransformString+=this.getTitleRotateString(!0);this.selected?(this.navTitleSizeSelectedTransform!==undefined&&(this.navTitleCurrentTransformString+=this.navTitleSizeSelectedTransform),this.navTitleCurrentTransformString+=this.selectTransform.titleTransformString===""||this.selectTransform.titleTransformString===undefined?",s1":","+this.selectTransform.titleTransformString,this.wheelnav.currentPercent<.05&&(this.navTitleCurrentTransformString+=",s0.05")):this.hovered?(this.navTitleSizeHoverTransform!==undefined&&(this.navTitleCurrentTransformString+=this.navTitleSizeHoverTransform),this.navTitleCurrentTransformString+=this.hoverTransform.titleTransformString===""||this.hoverTransform.titleTransformString===undefined?",s1":","+this.hoverTransform.titleTransformString):this.wheelnav.currentPercent<.05?this.navTitleCurrentTransformString+=",s0.05":this.titleSpreadScale?this.navTitleCurrentTransformString+=",s"+this.wheelnav.currentPercent:(this.navTitleSizeTransform!==undefined&&(this.navTitleCurrentTransformString+=this.navTitleSizeTransform),this.navTitleCurrentTransformString+=this.sliceTransform.titleTransformString===""||this.sliceTransform.titleTransformString===undefined?",s1":","+this.sliceTransform.titleTransformString);e=this.getCurrentPath();l={};l={path:e.slicePathString,transform:this.navSliceCurrentTransformString};a={};this.sliceClickablePathFunction!==null&&(w=this.getCurrentClickablePath(),a={path:w.slicePathString,transform:this.navSliceCurrentTransformString});v={};v={path:e.linePathString,transform:this.navLineCurrentTransformString};var r=this.getCurrentTitle(),h={},b=null;if(wheelnavTitle().isPathTitle(r.title)?h={path:r.path,transform:this.navTitleCurrentTransformString}:wheelnavTitle().isImageTitle(r.title)?(h={x:r.x,y:r.y,width:r.width,height:r.height,transform:this.navTitleCurrentTransformString},this.navTitle.attr({src:r.src})):(h={x:r.x,y:r.y,transform:this.navTitleCurrentTransformString},r.title!==null&&r.title!==""&&(this.titleCurved?e.titlePathString!==undefined&&e.titlePathString!==""&&(b={path:e.titlePathString}):this.navTitle.attr({text:r.title}))),o=this,s=this.wheelnav,this.animSlice=Raphael.animation(l,this.animatetime,this.animateeffect,function(){o.navSliceUnderAnimation=!1;s.animateUnlock(!1,t)}),this.animLine=Raphael.animation(v,this.animatetime,this.animateeffect,function(){o.navLineUnderAnimation=!1;s.animateUnlock(!1,t)}),this.animTitle=Raphael.animation(h,this.animatetime,this.animateeffect,function(){o.navTitleUnderAnimation=!1;s.animateUnlock(!1,t)}),this.titleCurved&&this.navTitlePath!==undefined&&(this.animTitlePath=Raphael.animation(b,this.animatetime,this.animateeffect,function(){o.navTitlePathUnderAnimation=!1;s.animateUnlock(!1,t)})),this.navClickableSlice!==null&&(this.animClickableSlice=Raphael.animation(a,this.animatetime,this.animateeffect)),u=this.wheelnav.animateRepeatCount,n!==undefined&&n===!0){if(this.wheelItemIndex===this.wheelnav.navItemCount-1){for(i=0;i<this.wheelnav.navItemCount;i++)y=this.wheelnav.navItems[i],y.navSlice.animate(y.animSlice.repeat(u));for(i=0;i<this.wheelnav.navItemCount;i++)p=this.wheelnav.navItems[i],p.navLine.animate(p.animLine.repeat(u));for(i=0;i<this.wheelnav.navItemCount;i++)f=this.wheelnav.navItems[i],f.navTitle.animate(f.animTitle.repeat(u)),f.titleCurved&&f.navTitlePath!==undefined&&f.navTitlePath.animate(f.animTitlePath.repeat(u));if(this.wheelnav.sliceClickablePathFunction!==null)for(i=0;i<this.wheelnav.navItemCount;i++)c=this.wheelnav.navItems[i],c.navClickableSlice!==null&&c.navClickableSlice.animate(c.animClickableSlice.repeat(u))}}else this.navSlice.animate(this.animSlice.repeat(u)),this.navLine.animate(this.animLine.repeat(u)),this.navTitle.animate(this.animTitle.repeat(u)),this.titleCurved&&this.navTitlePath!==undefined&&this.navTitlePath.animate(this.animTitlePath.repeat(u)),this.navClickableSlice!==null&&this.navClickableSlice.animate(this.animClickableSlice.repeat(u))}};wheelnavItem.prototype.setTitle=function(n){this.title=n===undefined?null:n;this.titleHover=this.title;this.titleSelected=this.title};wheelnavItem.prototype.setTooltip=function(n){n!==null&&this.navItem.attr({title:n})};wheelnavItem.prototype.refreshNavItem=function(n){this.selected?(this.navSlice.attr(this.sliceSelectedAttr),this.navLine.attr(this.lineSelectedAttr),this.navTitle.attr(this.titleSelectedAttr),this.navClickableSlice!==null&&this.navClickableSlice.attr(this.sliceClickableSelectedAttr),this.wheelnav.selectedToFront?(this.navSlice.toFront(),this.navLine.toFront(),this.navTitle.toFront(),this.navClickableSlice!==null&&this.navClickableSlice.toFront()):(this.navClickableSlice!==null&&this.navClickableSlice.toBack(),this.navTitle.toBack(),this.navLine.toBack(),this.navSlice.toBack())):this.hovered?this.wheelnav.hoverEnable&&(this.navSlice.attr(this.sliceHoverAttr),this.navLine.attr(this.lineHoverAttr),this.navTitle.attr(this.titleHoverAttr),this.navClickableSlice!==null&&this.navClickableSlice.attr(this.sliceClickableHoverAttr),this.wheelnav.hoveredToFront&&(this.navSlice.toFront(),this.navLine.toFront(),this.navTitle.toFront()),this.navClickableSlice!==null&&this.navClickableSlice.toFront()):(this.navSlice.attr(this.slicePathAttr),this.navLine.attr(this.linePathAttr),this.navTitle.attr(this.titleAttr),this.navClickableSlice!==null&&this.navClickableSlice.attr(this.sliceClickablePathAttr),this.navClickableSlice!==null&&this.navClickableSlice.toBack(),this.navTitle.toBack(),this.navLine.toBack(),this.navSlice.toBack());n!==undefined&&n===!0&&(this.initPathsAndTransforms(),this.setCurrentTransform(!1,!1))};wheelnavItem.prototype.setWheelSettings=function(n){this.wheelnav.slicePathAttr!==null&&(this.slicePathAttr=JSON.parse(JSON.stringify(this.wheelnav.slicePathAttr)));this.wheelnav.sliceHoverAttr!==null&&(this.sliceHoverAttr=JSON.parse(JSON.stringify(this.wheelnav.sliceHoverAttr)));this.wheelnav.sliceSelectedAttr!==null&&(this.sliceSelectedAttr=JSON.parse(JSON.stringify(this.wheelnav.sliceSelectedAttr)));this.wheelnav.titleAttr!==null&&(this.titleAttr=JSON.parse(JSON.stringify(this.wheelnav.titleAttr)));this.wheelnav.titleHoverAttr!==null&&(this.titleHoverAttr=JSON.parse(JSON.stringify(this.wheelnav.titleHoverAttr)));this.wheelnav.titleSelectedAttr!==null&&(this.titleSelectedAttr=JSON.parse(JSON.stringify(this.wheelnav.titleSelectedAttr)));this.wheelnav.titleRotateAngle!==null&&this.titleRotateAngle===null&&(this.titleRotateAngle=this.wheelnav.titleRotateAngle);this.wheelnav.titleCurved!==null&&this.titleCurved===null&&(this.titleCurved=this.wheelnav.titleCurved);this.wheelnav.titleCurvedClockwise!==null&&this.titleCurvedClockwise===null?this.titleCurvedClockwise=this.wheelnav.titleCurvedClockwise:this.titleCurvedClockwise===null&&(this.titleCurvedClockwise=!this.wheelnav.clockwise);this.wheelnav.titleCurvedByRotateAngle!==null&&this.titleCurvedByRotateAngle===null&&(this.titleCurvedByRotateAngle=this.wheelnav.titleCurvedByRotateAngle);this.wheelnav.titleWidth!==null&&this.titleWidth===null&&(this.titleWidth=this.wheelnav.titleWidth);this.wheelnav.titleHeight!==null&&this.titleHeight===null&&(this.titleHeight=this.wheelnav.titleHeight);this.titleWidth!==null&&this.titleHeight===null&&(this.titleHeight=this.titleWidth);this.titleWidth===null&&this.titleHeight!==null&&(this.titleWidth=this.titleHeight);wheelnavTitle().isImageTitle(this.title)&&(this.titleWidth===null&&(this.titleWidth=32),this.titleHeight===null&&(this.titleHeight=32));this.wheelnav.titleHoverWidth!==null&&this.titleHoverWidth===null&&(this.titleHoverWidth=this.wheelnav.titleHoverWidth);this.wheelnav.titleHoverHeight!==null&&this.titleHoverHeight===null&&(this.titleHoverHeight=this.wheelnav.titleHoverHeight);this.titleHoverWidth!==null&&this.titleHoverHeight===null&&(this.titleHoverHeight=this.titleHoverWidth);this.titleHoverWidth===null&&this.titleHoverHeight!==null&&(this.titleHoverWidth=this.titleHoverHeight);this.wheelnav.titleSelectedWidth!==null&&this.titleSelectedWidth===null&&(this.titleSelectedWidth=this.wheelnav.titleSelectedWidth);this.wheelnav.titleSelectedHeight!==null&&this.titleSelectedHeight===null&&(this.titleSelectedHeight=this.wheelnav.titleSelectedHeight);this.titleSelectedWidth!==null&&this.titleSelectedHeight===null&&(this.titleSelectedHeight=this.titleSelectedWidth);this.titleSelectedWidth===null&&this.titleSelectedHeight!==null&&(this.titleSelectedWidth=this.titleSelectedHeight);this.titleHoverHeight===null&&(this.titleHoverHeight=this.titleHeight);this.titleHoverWidth===null&&(this.titleHoverWidth=this.titleWidth);this.titleSelectedHeight===null&&(this.titleSelectedHeight=this.titleHeight);this.titleSelectedWidth===null&&(this.titleSelectedWidth=this.titleWidth);this.wheelnav.linePathAttr!==null&&(this.linePathAttr=JSON.parse(JSON.stringify(this.wheelnav.linePathAttr)));this.wheelnav.lineHoverAttr!==null&&(this.lineHoverAttr=JSON.parse(JSON.stringify(this.wheelnav.lineHoverAttr)));this.wheelnav.lineSelectedAttr!==null&&(this.lineSelectedAttr=JSON.parse(JSON.stringify(this.wheelnav.lineSelectedAttr)));(this.animateeffect===null||n)&&(this.animateeffect=this.wheelnav.animateeffect!==null?this.wheelnav.animateeffect:"bounce");(this.animatetime===null||n)&&(this.animatetime=this.wheelnav.animatetime!==null?this.wheelnav.animatetime:1500);this.title!==null?((this.sliceInitPathFunction===null||n)&&(this.sliceInitPathFunction=this.wheelnav.sliceInitPathFunction),(this.sliceClickablePathFunction===null||n)&&(this.sliceClickablePathFunction=this.wheelnav.sliceClickablePathFunction),(this.slicePathFunction===null||n)&&(this.slicePathFunction=this.wheelnav.slicePathFunction),(this.sliceSelectedPathFunction===null||n)&&(this.sliceSelectedPathFunction=this.wheelnav.sliceSelectedPathFunction),(this.sliceHoverPathFunction===null||n)&&(this.sliceHoverPathFunction=this.wheelnav.sliceHoverPathFunction),(this.sliceTransformFunction===null||n)&&(this.sliceTransformFunction=this.wheelnav.sliceTransformFunction),(this.sliceSelectedTransformFunction===null||n)&&(this.sliceSelectedTransformFunction=this.wheelnav.sliceSelectedTransformFunction),(this.sliceHoverTransformFunction===null||n)&&(this.sliceHoverTransformFunction=this.wheelnav.sliceHoverTransformFunction),(this.sliceInitTransformFunction===null||n)&&(this.sliceInitTransformFunction=this.wheelnav.sliceInitTransformFunction)):(this.sliceInitPathFunction=slicePath().NullInitSlice,this.sliceClickablePathFunction=slicePath().NullSlice,this.slicePathFunction=slicePath().NullSlice,this.sliceSelectedPathFunction=null,this.sliceHoverPathFunction=null,this.sliceTransformFunction=null,this.sliceSelectedTransformFunction=null,this.sliceHoverTransformFunction=null,this.sliceInitTransformFunction=null);(this.slicePathCustom===null||n)&&(this.slicePathCustom=this.wheelnav.slicePathCustom);(this.sliceClickablePathCustom===null||n)&&(this.sliceClickablePathCustom=this.wheelnav.sliceClickablePathCustom);(this.sliceSelectedPathCustom===null||n)&&(this.sliceSelectedPathCustom=this.wheelnav.sliceSelectedPathCustom);(this.sliceHoverPathCustom===null||n)&&(this.sliceHoverPathCustom=this.wheelnav.sliceHoverPathCustom);(this.sliceInitPathCustom===null||n)&&(this.sliceInitPathCustom=this.wheelnav.sliceInitPathCustom);(this.sliceTransformCustom===null||n)&&(this.sliceTransformCustom=this.wheelnav.sliceTransformCustom);(this.sliceSelectedTransformCustom===null||n)&&(this.sliceSelectedTransformCustom=this.wheelnav.sliceSelectedTransformCustom);(this.sliceHoverTransformCustom===null||n)&&(this.sliceHoverTransformCustom=this.wheelnav.sliceHoverTransformCustom);(this.sliceInitTransformCustom===null||n)&&(this.sliceInitTransformCustom=this.wheelnav.sliceInitTransformCustom);(this.initPercent===null||n)&&(this.initPercent=this.wheelnav.initPercent);(this.minPercent===null||n)&&(this.minPercent=this.wheelnav.minPercent);(this.maxPercent===null||n)&&(this.maxPercent=this.wheelnav.maxPercent);(this.hoverPercent===null||n)&&(this.hoverPercent=this.wheelnav.hoverPercent);(this.selectedPercent===null||n)&&(this.selectedPercent=this.wheelnav.selectedPercent);(this.clickablePercentMin===null||n)&&(this.clickablePercentMin=this.wheelnav.clickablePercentMin);(this.clickablePercentMax===null||n)&&(this.clickablePercentMax=this.wheelnav.clickablePercentMax);(this.titleSpreadScale===null||n)&&(this.titleSpreadScale=this.wheelnav.titleSpreadScale!==null?this.wheelnav.titleSpreadScale:!1);(this.sliceAngle===null||n)&&this.wheelnav.sliceAngle!==null&&(this.sliceAngle=this.wheelnav.sliceAngle)};wheelnavItem.prototype.initPathsAndTransforms=function(){this.sliceHelper=new pathHelper;this.sliceHelper.centerX=this.wheelnav.centerX;this.sliceHelper.centerY=this.wheelnav.centerY;this.sliceHelper.wheelRadius=this.wheelnav.wheelRadius;this.sliceHelper.startAngle=this.baseAngle;this.sliceHelper.sliceAngle=this.sliceAngle;this.sliceHelper.itemIndex=this.itemIndex;this.sliceHelper.titleCurvedClockwise=this.titleCurvedClockwise;this.slicePathMin=this.slicePathFunction(this.sliceHelper,this.minPercent,this.slicePathCustom);this.slicePathMax=this.slicePathFunction(this.sliceHelper,this.maxPercent,this.slicePathCustom);this.selectedSlicePathMin=this.sliceSelectedPathFunction!==null?this.sliceSelectedPathFunction(this.sliceHelper,this.selectedPercent*this.minPercent,this.sliceSelectedPathCustom):this.slicePathFunction(this.sliceHelper,this.selectedPercent*this.minPercent,this.sliceSelectedPathCustom);this.selectedSlicePathMax=this.sliceSelectedPathFunction!==null?this.sliceSelectedPathFunction(this.sliceHelper,this.selectedPercent*this.maxPercent,this.sliceSelectedPathCustom):this.slicePathFunction(this.sliceHelper,this.selectedPercent*this.maxPercent,this.sliceSelectedPathCustom);this.hoverSlicePathMin=this.sliceHoverPathFunction!==null?this.sliceHoverPathFunction(this.sliceHelper,this.hoverPercent*this.minPercent,this.sliceHoverPathCustom):this.slicePathFunction(this.sliceHelper,this.hoverPercent*this.minPercent,this.sliceHoverPathCustom);this.hoverSlicePathMax=this.sliceHoverPathFunction!==null?this.sliceHoverPathFunction(this.sliceHelper,this.hoverPercent*this.maxPercent,this.sliceHoverPathCustom):this.slicePathFunction(this.sliceHelper,this.hoverPercent*this.maxPercent,this.sliceHoverPathCustom);this.sliceClickablePathFunction!==null&&(this.clickableSlicePathMin=this.sliceClickablePathFunction(this.sliceHelper,this.clickablePercentMin,this.sliceClickablePathCustom),this.clickableSlicePathMax=this.sliceClickablePathFunction(this.sliceHelper,this.clickablePercentMax,this.sliceClickablePathCustom));this.sliceInitPath=this.sliceInitPathFunction!==null?this.sliceInitPathFunction(this.sliceHelper,this.initPercent,this.sliceInitPathCustom):this.wheelnav.currentPercent===this.wheelnav.maxPercent?this.slicePathFunction(this.sliceHelper,this.maxPercent,this.sliceInitPathCustom):this.slicePathFunction(this.sliceHelper,this.minPercent,this.sliceInitPathCustom);this.sliceTransform=this.sliceTransformFunction!==null?this.sliceTransformFunction(this.wheelnav.centerX,this.wheelnav.centerY,this.wheelnav.wheelRadius,this.baseAngle,this.sliceAngle,this.titleRotateAngle,this.itemIndex,this.sliceTransformCustom):sliceTransform().NullTransform;this.selectTransform=this.sliceSelectedTransformFunction!==null?this.sliceSelectedTransformFunction(this.wheelnav.centerX,this.wheelnav.centerY,this.wheelnav.wheelRadius,this.baseAngle,this.sliceAngle,this.titleRotateAngle,this.itemIndex,this.sliceSelectedTransformCustom):sliceTransform().NullTransform;this.hoverTransform=this.sliceHoverTransformFunction!==null?this.sliceHoverTransformFunction(this.wheelnav.centerX,this.wheelnav.centerY,this.wheelnav.wheelRadius,this.baseAngle,this.sliceAngle,this.titleRotateAngle,this.itemIndex,this.sliceHoverTransformCustom):sliceTransform().NullTransform;this.initTransform=this.sliceInitTransformFunction!==null?this.sliceInitTransformFunction(this.wheelnav.centerX,this.wheelnav.centerY,this.wheelnav.wheelRadius,this.baseAngle,this.sliceAngle,this.titleRotateAngle,this.itemIndex,this.sliceInitTransformCustom):sliceTransform().NullTransform;wheelnavTitle().isPathTitle(this.title)?(initNavTitle=new wheelnavTitle(this.title,this.wheelnav.raphael.raphael),basicNavTitleMin=new wheelnavTitle(this.title,this.wheelnav.raphael.raphael),basicNavTitleMax=new wheelnavTitle(this.title,this.wheelnav.raphael.raphael),hoverNavTitleMin=new wheelnavTitle(this.titleHover,this.wheelnav.raphael.raphael),hoverNavTitleMax=new wheelnavTitle(this.titleHover,this.wheelnav.raphael.raphael),selectedNavTitleMin=new wheelnavTitle(this.titleSelected,this.wheelnav.raphael.raphael),selectedNavTitleMax=new wheelnavTitle(this.titleSelected,this.wheelnav.raphael.raphael),this.navTitleSizeTransform=basicNavTitleMax.getTitleSizeTransform(this.titleWidth,this.titleHeight),this.navTitleSizeHoverTransform=hoverNavTitleMax.getTitleSizeTransform(this.titleHoverWidth,this.titleHoverHeight),this.navTitleSizeSelectedTransform=selectedNavTitleMax.getTitleSizeTransform(this.titleSelectedWidth,this.titleSelectedHeight)):(initNavTitle=new wheelnavTitle(this.title),basicNavTitleMin=new wheelnavTitle(this.title),basicNavTitleMax=new wheelnavTitle(this.title),hoverNavTitleMin=new wheelnavTitle(this.titleHover),hoverNavTitleMax=new wheelnavTitle(this.titleHover),selectedNavTitleMin=new wheelnavTitle(this.titleSelected),selectedNavTitleMax=new wheelnavTitle(this.titleSelected));this.initNavTitle=initNavTitle.getTitlePercentAttr(this.sliceInitPath.titlePosX,this.sliceInitPath.titlePosY,this.titleWidth,this.titleHeight);this.basicNavTitleMin=basicNavTitleMin.getTitlePercentAttr(this.slicePathMin.titlePosX,this.slicePathMin.titlePosY,this.titleWidth,this.titleHeight);this.basicNavTitleMax=basicNavTitleMax.getTitlePercentAttr(this.slicePathMax.titlePosX,this.slicePathMax.titlePosY,this.titleWidth,this.titleHeight);this.hoverNavTitleMin=hoverNavTitleMin.getTitlePercentAttr(this.hoverSlicePathMin.titlePosX,this.hoverSlicePathMin.titlePosY,this.titleHoverWidth,this.titleHoverHeight);this.hoverNavTitleMax=hoverNavTitleMax.getTitlePercentAttr(this.hoverSlicePathMax.titlePosX,this.hoverSlicePathMax.titlePosY,this.titleHoverWidth,this.titleHoverHeight);this.selectedNavTitleMin=selectedNavTitleMin.getTitlePercentAttr(this.selectedSlicePathMin.titlePosX,this.selectedSlicePathMin.titlePosY,this.titleSelectedWidth,this.titleSelectedHeight);this.selectedNavTitleMax=selectedNavTitleMax.getTitlePercentAttr(this.selectedSlicePathMax.titlePosX,this.selectedSlicePathMax.titlePosY,this.titleSelectedWidth,this.titleSelectedHeight)};wheelnavItem.prototype.getCurrentPath=function(){return this.wheelnav.currentPercent===this.wheelnav.maxPercent?this.selected?this.selectedSlicePathMax:this.hovered?this.hoverSlicePathMax:this.slicePathMax:this.selected?this.selectedSlicePathMin:this.hovered?this.hoverSlicePathMin:this.slicePathMin};wheelnavItem.prototype.getCurrentClickablePath=function(){return this.wheelnav.currentPercent===this.wheelnav.maxPercent?this.clickableSlicePathMax:this.clickableSlicePathMin};wheelnavItem.prototype.getCurrentTitle=function(){return this.wheelnav.currentPercent===this.wheelnav.maxPercent?this.selected?this.selectedNavTitleMax:this.hovered?this.hoverNavTitleMax:this.basicNavTitleMax:this.selected?this.selectedNavTitleMin:this.hovered?this.hoverNavTitleMin:this.basicNavTitleMin};wheelnavItem.prototype.getItemRotateString=function(){return"r,"+this.currentRotateAngle.toString()+","+this.wheelnav.centerX+","+this.wheelnav.centerY};wheelnavItem.prototype.getTitleRotateString=function(n){var t="";return t+=this.getItemRotateString(),t+(this.titleRotateAngle!==null&&n?",r,"+(this.navAngle+this.titleRotateAngle).toString():",r,"+(-this.currentRotateAngle).toString())};wheelnavTitle=function(n,t){if(this.title=n,n!==null){if(t!==undefined){this.relativePath=t.pathToRelative(n);var i=t.pathBBox(this.relativePath);this.centerX=i.cx;this.centerY=i.cy;this.width=i.width;this.height=i.height;this.startX=this.relativePath[0][1];this.startY=this.relativePath[0][2]}this.title=n}else this.title="";return this.isPathTitle=function(n){return n!==null&&(n.substr(0,1)==="m"||n.substr(0,1)==="M")&&(n.substr(n.length-1,1)==="z"||n.substr(n.length-1,1)==="Z")&&(n.indexOf(",")>-1||n.indexOf(" ")>-1)?!0:!1},this.isImageTitle=function(n){return n===undefined&&(n=this.title),n!==null&&n.substr(0,7)==="imgsrc:"?!0:!1},this};wheelnavTitle.prototype.getTitlePercentAttr=function(n,t,i,r){var u={},f,e;return this.relativePath!==undefined?(f=n+(this.startX-this.centerX),e=t+(this.startY-this.centerY),this.relativePath[0][1]=f,this.relativePath[0][2]=e,u={path:this.relativePath,title:this.title}):u=this.isImageTitle()?{x:n-i/2,y:t-r/2,width:i,height:r,title:this.title,src:this.title.substr(7,this.title.length)}:{x:n,y:t,title:this.title},u};wheelnavTitle.prototype.getTitleSizeTransform=function(n,t){var i="";return n!==null&&t!==null&&(i="s",this.height>this.width?(i+=(n/this.height).toString()+",",i+=(t/this.height).toString()):(i+=(n/this.width).toString()+",",i+=(t/this.width).toString())),i};wheelnav.prototype.styleWheel=function(){this.cssMode?(this.spreaderPathInAttr={"class":this.getSpreaderCssClass("in")},this.spreaderPathOutAttr={"class":this.getSpreaderCssClass("out")},this.spreaderTitleInAttr={"class":this.getSpreaderTitleCssClass("in")},this.spreaderTitleOutAttr={"class":this.getSpreaderTitleCssClass("out")},this.markerAttr={"class":this.getMarkerCssClass()}):((this.spreaderPathInAttr===undefined||this.spreaderPathInAttr===null)&&(this.spreaderPathInAttr={fill:"#444",stroke:"#444","stroke-width":2,cursor:"pointer"}),(this.spreaderPathOutAttr===undefined||this.spreaderPathOutAttr===null)&&(this.spreaderPathOutAttr={fill:"#444",stroke:"#444","stroke-width":2,cursor:"pointer"}),(this.spreaderTitleInAttr===undefined||this.spreaderTitleInAttr===null)&&(this.spreaderTitleInAttr={fill:"#eee",stroke:"#444",cursor:"pointer"}),(this.spreaderTitleOutAttr===undefined||this.spreaderTitleOutAttr===null)&&(this.spreaderTitleOutAttr={fill:"#eee",stroke:"#444",cursor:"pointer"}),(this.markerAttr===undefined||this.markerAttr===null)&&(this.markerAttr={stroke:"#444","stroke-width":2}))};wheelnavItem.prototype.styleNavItem=function(){this.wheelnav.cssMode?(this.slicePathAttr={"class":this.wheelnav.getSliceCssClass(this.wheelItemIndex,"basic")},this.sliceHoverAttr={"class":this.wheelnav.getSliceCssClass(this.wheelItemIndex,"hover")},this.sliceSelectedAttr={"class":this.wheelnav.getSliceCssClass(this.wheelItemIndex,"selected")},this.titleAttr={"class":this.wheelnav.getTitleCssClass(this.wheelItemIndex,"basic")},this.titleHoverAttr={"class":this.wheelnav.getTitleCssClass(this.wheelItemIndex,"hover")},this.titleSelectedAttr={"class":this.wheelnav.getTitleCssClass(this.wheelItemIndex,"selected")},this.linePathAttr={"class":this.wheelnav.getLineCssClass(this.wheelItemIndex,"basic")},this.lineHoverAttr={"class":this.wheelnav.getLineCssClass(this.wheelItemIndex,"hover")},this.lineSelectedAttr={"class":this.wheelnav.getLineCssClass(this.wheelItemIndex,"selected")}):(this.slicePathAttr={stroke:"#333","stroke-width":0,cursor:"pointer","fill-opacity":1},this.sliceHoverAttr={stroke:"#222","stroke-width":0,cursor:"pointer","fill-opacity":.77},this.sliceSelectedAttr={stroke:"#111","stroke-width":0,cursor:"default","fill-opacity":1},this.titleAttr={font:this.titleFont,fill:"#333",stroke:"none",cursor:"pointer"},this.titleHoverAttr={font:this.titleFont,fill:"#222",cursor:"pointer",stroke:"none"},this.titleSelectedAttr={font:this.titleFont,fill:"#fff",cursor:"default"},this.linePathAttr={stroke:"#444","stroke-width":1,cursor:"pointer"},this.lineHoverAttr={stroke:"#222","stroke-width":2,cursor:"pointer"},this.lineSelectedAttr={stroke:"#444","stroke-width":1,cursor:"default"});this.sliceClickablePathAttr={fill:"#FFF",stroke:"#FFF","stroke-width":0,cursor:"pointer","fill-opacity":.01};this.sliceClickableHoverAttr={stroke:"#FFF","stroke-width":0,cursor:"pointer"};this.sliceClickableSelectedAttr={stroke:"#FFF","stroke-width":0,cursor:"default"}};wheelnav.prototype.getSliceCssClass=function(n,t){return"wheelnav-"+this.holderId+"-slice-"+t+"-"+n};wheelnav.prototype.getTitleCssClass=function(n,t){return"wheelnav-"+this.holderId+"-title-"+t+"-"+n};wheelnav.prototype.getLineCssClass=function(n,t){return"wheelnav-"+this.holderId+"-line-"+t+"-"+n};wheelnav.prototype.getSpreaderCssClass=function(n){return"wheelnav-"+this.holderId+"-spreader-"+n};wheelnav.prototype.getSpreaderTitleCssClass=function(n){return"wheelnav-"+this.holderId+"-spreadertitle-"+n};wheelnav.prototype.getMarkerCssClass=function(){return"wheelnav-"+this.holderId+"-marker"};var pathHelper=function(){return this.sliceRadius=0,this.startAngle=0,this.middleAngle=0,this.endAngle=0,this.sliceAngle=0,this.startTheta=0,this.middleTheta=0,this.endTheta=0,this.titlePosX=0,this.titlePosY=0,this.titleRadius=0,this.titleTheta=0,this.titleAngle=0,this.custom=null,this.centerX=0,this.centerY=0,this.wheelRadius=0,this.itemIndex=0,this.navItemCount=0,this.navAngle=0,this.titleCurvedClockwise=!1,this.setBaseValue=function(n,t){t===null?t=new slicePathCustomization:this.custom=t;this.sliceRadius=this.wheelRadius*n*.9;this.middleAngle=this.startAngle+this.sliceAngle/2;this.endAngle=this.startAngle+this.sliceAngle;this.startTheta=this.getTheta(this.startAngle);this.middleTheta=this.getTheta(this.middleAngle);this.endTheta=this.getTheta(this.endAngle);t!==null?(t.titleRadiusPercent!==null&&(this.titleRadius=this.sliceRadius*t.titleRadiusPercent),t.titleSliceAnglePercent!==null&&(this.titleTheta=this.getTheta(this.startAngle+this.sliceAngle*t.titleSliceAnglePercent),this.titleAngle=this.startAngle+this.sliceAngle*t.titleSliceAnglePercent)):(this.titleRadius=this.sliceRadius*.5,this.titleTheta=this.middleTheta,this.titleAngle=this.middleAngle);this.setTitlePos()},this.setTitlePos=function(){this.titlePosX=this.titleRadius*Math.cos(this.titleTheta)+this.centerX;this.titlePosY=this.titleRadius*Math.sin(this.titleTheta)+this.centerY},this.getX=function(n,t){return t*Math.cos(this.getTheta(n))+this.centerX},this.getY=function(n,t){return t*Math.sin(this.getTheta(n))+this.centerY},this.MoveTo=function(n,t){return["M",this.getX(n,t),this.getY(n,t)]},this.MoveToXY=function(n,t){return["M",n,t]},this.MoveToCenter=function(){return["M",this.centerX,this.centerY]},this.LineTo=function(n,t,i,r){return i===undefined&&(i=n),r===undefined&&(r=t),["L",this.getX(n,t),this.getY(i,r)]},this.LineToXY=function(n,t){return["L",n,t]},this.ArcTo=function(n,t,i){return["A",n,n,0,0,1,this.getX(t,i),this.getY(t,i)]},this.ArcToXY=function(n,t,i){return["A",n,n,0,0,1,t,i]},this.ArcBackTo=function(n,t,i){return["A",n,n,0,0,0,this.getX(t,i),this.getY(t,i)]},this.ArcBackToXY=function(n,t,i){return["A",n,n,0,0,0,t,i]},this.CubicBezierTo=function(n,t,i,r,u,f){return["C",this.getX(n,t),this.getY(n,t),this.getX(i,r),this.getY(i,r),this.getX(u,f),this.getY(u,f)]},this.CubicBezierToXY=function(n,t,i,r,u,f){return["C",n,t,i,r,u,f]},this.StartSpreader=function(n,t,i){this.endAngle-this.startAngle==360?n.push(this.MoveTo(t,i)):(n.push(this.MoveToCenter()),n.push(this.LineTo(t,i)))},this.getCurvedTitlePathString=function(){var t=this.titleAngle-this.sliceAngle/2,i=this.titleAngle+this.sliceAngle/2,n=[];return this.titleCurvedClockwise?(n.push(this.MoveTo(t,this.titleRadius)),n.push(this.ArcTo(this.titleRadius,i,this.titleRadius))):(n.push(this.MoveTo(i,this.titleRadius)),n.push(this.ArcBackTo(this.titleRadius,t,this.titleRadius))),n},this.Close=function(){return["z"]},this.getTheta=function(n){return n%360*Math.PI/180},this.radians=function(n){return n*Math.PI/180},this.degrees=function(n){return n*180/Math.PI},this},slicePathCustomization=function(){return this.titleRadiusPercent=.5,this.titleSliceAnglePercent=.5,this},spreaderPathCustomization=function(){return this.titleRadiusPercent=0,this.titleSliceAnglePercent=.5,this.spreaderPercent=1,this},markerPathCustomization=function(){return this.titleRadiusPercent=1,this.titleSliceAnglePercent=.5,this.markerPercent=1.05,this};slicePath=function(){return this.NullSlice=function(n,t,i){return n.setBaseValue(t,i),titlePathString=n.getCurvedTitlePathString(),{slicePathString:"",linePathString:"",titlePosX:n.titlePosX,titlePosY:n.titlePosY,titlePathString:titlePathString}},this.NullInitSlice=function(n,t,i){return n.setBaseValue(t,i),slicePathString=[n.MoveToCenter(),n.Close()],titlePathString=n.getCurvedTitlePathString(),{slicePathString:slicePathString,linePathString:slicePathString,titlePosX:n.centerX,titlePosY:n.centerY,titlePathString:titlePathString}},this};sliceTransform=function(){this.startAngle=0;this.startTheta=0;this.middleTheta=0;this.endTheta=0;var t=function(t,i,r,u,f){this.startAngle=u;this.startTheta=n(startAngle);this.middleTheta=n(startAngle+f/2);this.endTheta=n(startAngle+f)},n=function(n){return n%360*Math.PI/180};return this.NullTransform=function(){return{sliceTransformString:"",lineTransformString:"",titleTransformString:""}},this.MoveMiddleTransform=function(i,r,u,f,e,o,s){var c,h,l,a;return t(i,r,u,f,e,o,s),c="t"+(u/10*Math.cos(middleTheta)).toString()+","+(u/10*Math.sin(middleTheta)).toString(),o!==null?h=n(-o):(l=f-s*e,h=n(l+e/2)),a="s1,r0,t"+(u/10*Math.cos(h)).toString()+","+(u/10*Math.sin(h)).toString(),{sliceTransformString:c,lineTransformString:c,titleTransformString:a}},this.RotateTransform=function(){var n="s1,r360";return{sliceTransformString:n,lineTransformString:n,titleTransformString:n}},this.RotateHalfTransform=function(){var n="s1,r90";return{sliceTransformString:n,lineTransformString:n,titleTransformString:n}},this.RotateTitleTransform=function(){return{sliceTransformString:"",lineTransformString:"",titleTransformString:"s1,r360"}},this.ScaleTransform=function(){var n="s1.2";return{sliceTransformString:n,lineTransformString:"",titleTransformString:n}},this.ScaleTitleTransform=function(){return{sliceTransformString:"",lineTransformString:"",titleTransformString:"s1.3"}},this.RotateScaleTransform=function(){var n="r360,s1.3";return{sliceTransformString:n,lineTransformString:"",titleTransformString:n}},this.CustomTransform=function(n,t,i,r,u,f,e,o){var s=o.scaleString+","+o.rotateString;return{sliceTransformString:s,lineTransformString:s,titleTransformString:s}},this.CustomTitleTransform=function(n,t,i,r,u,f,e,o){var s=o.scaleString+","+o.rotateString;return{sliceTransformString:"",lineTransformString:"",titleTransformString:s}},this};sliceTransformCustomization=function(){return this.scaleString="s1",this.rotateString="r0",this};spreader=function(n){var t,i;if(this.wheelnav=n,this.wheelnav.spreaderEnable){this.spreaderHelper=new pathHelper;this.spreaderHelper.centerX=this.wheelnav.centerX;this.spreaderHelper.centerY=this.wheelnav.centerY;this.spreaderHelper.navItemCount=this.wheelnav.navItemCount;this.spreaderHelper.navAngle=this.wheelnav.navAngle;this.spreaderHelper.wheelRadius=this.wheelnav.spreaderRadius;this.spreaderHelper.startAngle=this.wheelnav.spreaderStartAngle;this.spreaderHelper.sliceAngle=this.wheelnav.spreaderSliceAngle;t=this.wheelnav;this.animateeffect="bounce";this.animatetime=1500;this.wheelnav.animateeffect!==null&&(this.animateeffect=this.wheelnav.animateeffect);this.wheelnav.animatetime!==null&&(this.animatetime=this.wheelnav.animatetime);this.fontAttr=this.wheelnav.spreaderTitleFont!==null?{font:this.wheelnav.spreaderTitleFont}:{font:"100 32px Impact, Charcoal, sans-serif"};this.spreaderPathIn=this.wheelnav.spreaderPathFunction(this.spreaderHelper,this.wheelnav.spreaderInPercent,this.wheelnav.spreaderPathCustom);this.spreaderPathOut=this.wheelnav.spreaderPathFunction(this.spreaderHelper,this.wheelnav.spreaderOutPercent,this.wheelnav.spreaderPathCustom);i=this.spreaderPathOut;t.initPercent<t.maxPercent&&(i=this.spreaderPathIn);this.spreaderPath=this.wheelnav.raphael.path(i.spreaderPathString);this.spreaderPath.attr(t.spreaderPathAttr);this.spreaderPath.id=t.getSpreaderId();this.spreaderPath.node.id=this.spreaderPath.id;this.spreaderPath.click(function(){t.spreadWheel()});this.inTitleWidth=this.wheelnav.spreaderInTitleWidth;this.inTitleHeight=this.wheelnav.spreaderInTitleHeight;this.outTitleWidth=this.wheelnav.spreaderOutTitleWidth;this.outTitleHeight=this.wheelnav.spreaderOutTitleHeight;this.inTitleWidth!==null&&this.inTitleHeight===null&&(this.inTitleHeight=this.inTitleWidth);this.inTitleWidth===null&&this.inTitleHeight!==null&&(this.inTitleWidth=this.inTitleHeight);this.outTitleWidth!==null&&this.outTitleHeight===null&&(this.outTitleHeight=this.outTitleWidth);this.outTitleWidth===null&&this.outTitleHeight!==null&&(this.outTitleWidth=this.outTitleHeight);wheelnavTitle().isImageTitle(this.wheelnav.spreaderOutTitle)&&(this.inTitleWidth===null&&(this.inTitleWidth=32),this.inTitleHeight===null&&(this.inTitleHeight=32),this.outTitleWidth===null&&(this.outTitleWidth=32),this.outTitleHeight===null&&(this.outTitleHeight=32));inTitle=wheelnavTitle().isPathTitle(this.wheelnav.spreaderInTitle)?new wheelnavTitle(this.wheelnav.spreaderInTitle,this.wheelnav.raphael.raphael):new wheelnavTitle(this.wheelnav.spreaderInTitle);this.inTitleSizeTransform=inTitle.getTitleSizeTransform(this.inTitleWidth,this.inTitleHeight);this.inTitle=inTitle.getTitlePercentAttr(this.spreaderPathIn.titlePosX,this.spreaderPathIn.titlePosY,this.inTitleWidth,this.inTitleHeight);outTitle=wheelnavTitle().isPathTitle(this.wheelnav.spreaderOutTitle)?new wheelnavTitle(this.wheelnav.spreaderOutTitle,this.wheelnav.raphael.raphael):new wheelnavTitle(this.wheelnav.spreaderOutTitle);this.outTitleSizeTransform=outTitle.getTitleSizeTransform(this.outTitleWidth,this.outTitleHeight);this.outTitle=outTitle.getTitlePercentAttr(this.spreaderPathOut.titlePosX,this.spreaderPathOut.titlePosY,this.outTitleWidth,this.outTitleHeight);var r=this.outTitle,e=this.wheelnav.spreaderTitleOutAttr,u=this.outTitleWidth,f=this.outTitleHeight,o=this.outTitleSizeTransform;t.initPercent<t.maxPercent&&(r=this.inTitle,e=this.wheelnav.spreaderTitleInAttr,u=this.inTitleWidth,f=this.inTitleHeight,o=this.inTitleSizeTransform);this.spreaderTitle=wheelnavTitle().isPathTitle(this.wheelnav.spreaderOutTitle)?t.raphael.path(r.path):wheelnavTitle().isImageTitle(this.wheelnav.spreaderOutTitle)?this.wheelnav.raphael.image(r.src,i.titlePosX-u/2,i.titlePosY-f/2,u,f):t.raphael.text(i.titlePosX,i.titlePosY,r.title);this.spreaderTitle.attr(this.fontAttr);this.spreaderTitle.attr(e);this.spreaderTitle.attr({transform:o});this.spreaderTitle.id=t.getSpreaderTitleId();this.spreaderTitle.node.id=this.spreaderTitle.id;this.spreaderTitle.click(function(){t.spreadWheel()});this.setCurrentTransform()}return this};spreader.prototype.setCurrentTransform=function(n){if(this.wheelnav.spreaderEnable){if(n===undefined||n===!1){currentPath=this.wheelnav.currentPercent>this.wheelnav.minPercent?this.spreaderPathOut.spreaderPathString:this.spreaderPathIn.spreaderPathString;spreaderTransformAttr={path:currentPath};this.spreaderPath.animate(spreaderTransformAttr,this.animatetime,this.animateeffect);var t,i,r;this.wheelnav.currentPercent===this.wheelnav.maxPercent?(t=this.outTitle,i=this.wheelnav.spreaderTitleOutAttr,this.spreaderPath.attr(this.wheelnav.spreaderPathOutAttr),r=this.outTitleSizeTransform):(t=this.inTitle,i=this.wheelnav.spreaderTitleInAttr,this.spreaderPath.attr(this.wheelnav.spreaderPathInAttr),r=this.inTitleSizeTransform);wheelnavTitle().isPathTitle(t.title)?(i.path=t.path,i.transform=r):wheelnavTitle().isImageTitle(t.title)?(i.x=t.x,i.y=t.y,i.width=t.width,i.height=t.height,this.spreaderTitle.attr({src:t.src})):(offYOffset=0,t.title==="-"&&(offYOffset=3),i.x=t.x,i.y=t.y-offYOffset,t.title!==null&&this.spreaderTitle.attr({text:t.title}));this.spreaderTitle.animate(i,this.animatetime,this.animateeffect)}this.spreaderPath.toFront();this.spreaderTitle.toFront()}};spreaderPath=function(){return this.NullSpreader=function(n,t){return t===null&&(t=new spreaderPathCustomization),n.setBaseValue(t.spreaderPercent,t),{spreaderPathString:"",titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this.PieSpreaderCustomization=function(){var n=new spreaderPathCustomization;return n.spreaderRadius=25,n.arcBaseRadiusPercent=1,n.arcRadiusPercent=1,n.startRadiusPercent=0,n},this.PieSpreader=function(n,t,i){i===null&&(i=PieSpreaderCustomization());n.setBaseValue(i.spreaderPercent*t,i);var r=n.sliceRadius*i.arcBaseRadiusPercent,u=n.sliceRadius*i.arcRadiusPercent;return spreaderPathString=[],n.StartSpreader(spreaderPathString,n.startAngle,r),spreaderPathString.push(n.ArcTo(u,n.middleAngle,r)),spreaderPathString.push(n.ArcTo(u,n.endAngle,r)),spreaderPathString.push(n.Close()),{spreaderPathString:spreaderPathString,titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this.StarSpreaderCustomization=function(){var n=new spreaderPathCustomization;return n.minRadiusPercent=.5,n},this.StarSpreader=function(n,t,i){i===null&&(i=StarSpreaderCustomization());n.setBaseValue(i.spreaderPercent*t,i);rbase=n.wheelRadius*i.spreaderPercent*i.minRadiusPercent*t;r=n.sliceRadius;spreaderPathString=[];sliceAngle=n.sliceAngle/n.navItemCount;baseAngle=n.navAngle;n.endAngle-n.startAngle<360&&(baseAngle=n.startAngle);n.StartSpreader(spreaderPathString,baseAngle,r);for(var u=0;u<n.navItemCount;u++)startAngle=u*sliceAngle+(baseAngle+sliceAngle/2),middleAngle=startAngle+sliceAngle/2,endAngle=startAngle+sliceAngle,n.endAngle-n.startAngle<360&&u===n.navItemCount-1&&(endAngle=middleAngle),spreaderPathString.push(n.LineTo(startAngle,rbase)),spreaderPathString.push(n.LineTo(middleAngle,r)),spreaderPathString.push(n.LineTo(endAngle,rbase));return spreaderPathString.push(n.Close()),{spreaderPathString:spreaderPathString,titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this.AntiStarSpreaderCustomization=function(){var n=new spreaderPathCustomization;return n.minRadiusPercent=.21,n},this.AntiStarSpreader=function(n,t,i){i===null&&(i=AntiStarSpreaderCustomization());n.setBaseValue(i.spreaderPercent*t,i);rbase=n.wheelRadius*i.spreaderPercent*i.minRadiusPercent*t;r=n.sliceRadius;spreaderPathString=[];sliceAngle=n.sliceAngle/n.navItemCount;baseAngle=n.navAngle;n.endAngle-n.startAngle<360?(baseAngle=n.startAngle,n.StartSpreader(spreaderPathString,baseAngle,rbase)):spreaderPathString.push(n.MoveTo(n.startAngle+(n.navAngle+sliceAngle/2),rbase));for(var u=0;u<n.navItemCount;u++)startAngle=u*sliceAngle+(baseAngle+sliceAngle/2),middleAngle=startAngle+sliceAngle/2,endAngle=startAngle+sliceAngle,n.endAngle-n.startAngle<360&&u===n.navItemCount-1&&(endAngle=middleAngle),spreaderPathString.push(n.LineTo(startAngle,r)),spreaderPathString.push(n.LineTo(middleAngle,rbase)),spreaderPathString.push(n.LineTo(endAngle,r));return spreaderPathString.push(n.Close()),{spreaderPathString:spreaderPathString,titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this.FlowerSpreaderCustomization=function(){var n=new spreaderPathCustomization;return n.minRadiusPercent=.63,n.menuRadius=7,n},this.FlowerSpreader=function(n,t,i){i===null&&(i=FlowerSpreaderCustomization());n.setBaseValue(i.spreaderPercent*t,i);rbase=n.wheelRadius*i.spreaderPercent*i.minRadiusPercent*t;r=n.sliceRadius;spreaderPathString=[];sliceAngle=n.sliceAngle/n.navItemCount;baseAngle=n.navAngle;n.endAngle-n.startAngle<360?(baseAngle=n.startAngle,n.StartSpreader(spreaderPathString,baseAngle,rbase)):spreaderPathString.push(n.MoveTo(n.startAngle+(n.navAngle+sliceAngle/2),rbase));for(var u=0;u<n.navItemCount;u++)startAngle=u*sliceAngle+(baseAngle+sliceAngle/2),middleAngle=startAngle+sliceAngle/2,endAngle=startAngle+sliceAngle,n.endAngle-n.startAngle<360?(u===0&&spreaderPathString.push(n.ArcTo(i.menuRadius,startAngle,rbase)),u===n.navItemCount-1&&(endAngle=middleAngle)):spreaderPathString.push(n.LineTo(startAngle,rbase)),spreaderPathString.push(n.ArcTo(i.menuRadius,endAngle,rbase));return spreaderPathString.push(n.Close()),{spreaderPathString:spreaderPathString,titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this.HolderSpreaderCustomization=function(){var n=new spreaderPathCustomization;return n.minRadiusPercent=.5,n.menuRadius=37,n},this.HolderSpreader=function(n,t,i){i===null&&(i=HolderSpreaderCustomization());n.setBaseValue(i.spreaderPercent*t,i);rbase=n.wheelRadius*i.spreaderPercent*i.minRadiusPercent*t;r=n.sliceRadius;spreaderPathString=[];sliceAngle=n.sliceAngle/n.navItemCount;baseAngle=n.navAngle;n.endAngle-n.startAngle<360?(baseAngle=n.startAngle,n.StartSpreader(spreaderPathString,baseAngle,rbase)):spreaderPathString.push(n.MoveTo(n.startAngle+(n.navAngle+sliceAngle/2),rbase));for(var u=0;u<n.navItemCount;u++)startAngle=u*sliceAngle+(baseAngle+sliceAngle/2),middleAngle=startAngle+sliceAngle/4,endAngle=startAngle+sliceAngle,n.endAngle-n.startAngle<360?u===n.navItemCount-1&&(endAngle=middleAngle):spreaderPathString.push(n.LineTo(startAngle,rbase)),spreaderPathString.push(n.LineTo(startAngle,r)),spreaderPathString.push(n.ArcBackTo(i.menuRadius,middleAngle,rbase)),spreaderPathString.push(n.ArcTo(i.menuRadius,endAngle,r));return spreaderPathString.push(n.Close()),{spreaderPathString:spreaderPathString,titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this.LineSpreaderCustomization=function(){var n=new spreaderPathCustomization;return n.minRadiusPercent=.5,n},this.LineSpreader=function(n,t,i){i===null&&(i=LineSpreaderCustomization());n.setBaseValue(i.spreaderPercent*t,i);rbase=n.wheelRadius*i.spreaderPercent*i.minRadiusPercent*t;r=n.sliceRadius;spreaderPathString=[];sliceAngle=n.sliceAngle/n.navItemCount;baseAngle=n.navAngle;n.endAngle-n.startAngle<360&&(baseAngle=n.startAngle);spreaderPathString.push(n.MoveTo(baseAngle+sliceAngle/2,r));for(var u=0;u<n.navItemCount;u++)startAngle=u*sliceAngle+(baseAngle+sliceAngle/2),endAngle=startAngle+sliceAngle,n.navItemCount===2&&(endAngle-=90),spreaderPathString.push(n.LineTo(startAngle,r)),spreaderPathString.push(n.LineTo(endAngle,r));return spreaderPathString.push(n.Close()),{spreaderPathString:spreaderPathString,titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this};marker=function(n){return this.wheelnav=n,this.wheelnav.markerEnable&&(this.markerHelper=new pathHelper,this.markerHelper.centerX=this.wheelnav.centerX,this.markerHelper.centerY=this.wheelnav.centerY,this.markerHelper.navItemCount=this.wheelnav.navItemCount,this.markerHelper.navAngle=this.wheelnav.navAngle,this.markerHelper.wheelRadius=this.wheelnav.wheelRadius*this.wheelnav.maxPercent,this.markerHelper.sliceAngle=this.wheelnav.navItems[0].sliceAngle,this.markerHelper.startAngle=this.markerHelper.navAngle-this.markerHelper.sliceAngle/2,this.animateeffect="bounce",this.animatetime=1500,this.wheelnav.animateeffect!==null&&(this.animateeffect=this.wheelnav.animateeffect),this.wheelnav.animatetime!==null&&(this.animatetime=this.wheelnav.animatetime),this.markerPathMin=this.wheelnav.markerPathFunction(this.markerHelper,this.wheelnav.minPercent,this.wheelnav.markerPathCustom),this.markerPathMax=this.wheelnav.markerPathFunction(this.markerHelper,this.wheelnav.maxPercent,this.wheelnav.markerPathCustom),this.marker=this.wheelnav.raphael.path(this.markerPathMax.markerPathString),this.marker.attr(this.wheelnav.markerAttr),this.marker.id=this.wheelnav.getMarkerId(),this.marker.node.id=this.marker.id),this};marker.prototype.setCurrentTransform=function(n){var t,i;this.wheelnav.markerEnable&&(t="",t=this.wheelnav.currentPercent===this.wheelnav.maxPercent?this.markerPathMax.markerPathString:this.markerPathMin.markerPathString,n!==undefined?(i=n-this.markerHelper.navAngle,markerTransformAttr={transform:"r,"+i.toString()+","+this.wheelnav.centerX+","+this.wheelnav.centerY,path:t}):markerTransformAttr={path:t},this.marker.animate(markerTransformAttr,this.animatetime,this.animateeffect),this.marker.toFront())};markerPath=function(){return this.NullMarker=function(n,t){return t===null&&(t=new markerPathCustomization),n.setBaseValue(t),{markerPathString:"",titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this.TriangleMarkerCustomization=function(){var n=new markerPathCustomization;return n.arcBaseRadiusPercent=1.09,n.arcRadiusPercent=1.2,n.startRadiusPercent=0,n},this.TriangleMarker=function(n,t,i){i===null&&(i=TriangleMarkerCustomization());n.setBaseValue(i.markerPercent*t,i);var u=n.sliceRadius*i.arcBaseRadiusPercent,r=n.sliceRadius*i.arcRadiusPercent,f=n.startAngle+n.sliceAngle*.46,e=n.startAngle+n.sliceAngle*.54;return markerPathString=[n.MoveTo(n.navAngle,u),n.LineTo(f,r),n.LineTo(e,r),n.Close()],{markerPathString:markerPathString,titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this.PieLineMarkerCustomization=function(){var n=new markerPathCustomization;return n.arcBaseRadiusPercent=1,n.arcRadiusPercent=1,n.startRadiusPercent=0,n.sliceAngle=null,n},this.PieLineMarker=function(n,t,i){i===null&&(i=PieLineMarkerCustomization());n.setBaseValue(i.markerPercent*t,i);var r=n.sliceRadius*i.arcBaseRadiusPercent,u=n.sliceRadius*i.arcRadiusPercent;return i.sliceAngle!==null&&(n.startAngle=n.navAngle-i.sliceAngle/2,n.endAngle=n.navAngle+i.sliceAngle/2),markerPathString=[n.MoveTo(n.startAngle,r),n.ArcTo(u,n.endAngle,r),n.ArcBackTo(u,n.startAngle,r),n.Close()],{markerPathString:markerPathString,titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this.MenuMarkerCustomization=function(){var n=new markerPathCustomization;return n.menuRadius=40,n.titleRadiusPercent=.63,n.lineBaseRadiusPercent=0,n},this.MenuMarker=function(n,t,i){i===null&&(i=MenuMarkerCustomization());n.setBaseValue(i.markerPercent*t,i);x=n.centerX;y=n.centerY;n.titleRadius=n.wheelRadius*i.titleRadiusPercent*t;n.setTitlePos();var r=i.menuRadius*t;return t<=.05&&(r=11),middleTheta=n.middleTheta,markerPathString=[["M",n.titlePosX-r*Math.cos(middleTheta),n.titlePosY-r*Math.sin(middleTheta)],["A",r,r,0,0,1,n.titlePosX+r*Math.cos(middleTheta),n.titlePosY+r*Math.sin(middleTheta)],["A",r,r,0,0,1,n.titlePosX-r*Math.cos(middleTheta),n.titlePosY-r*Math.sin(middleTheta)],["z"]],{markerPathString:markerPathString,titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this.LineMarkerCustomization=function(){var n=new markerPathCustomization;return n.arcBaseRadiusPercent=1.05,n.arcRadiusPercent=1.2,n.startRadiusPercent=0,n},this.LineMarker=function(n,t,i){i===null&&(i=LineMarkerCustomization());n.setBaseValue(i.markerPercent*t,i);var r=n.sliceRadius*i.arcBaseRadiusPercent,u=n.sliceRadius*i.arcRadiusPercent;return markerPathString=[n.MoveTo(n.navAngle,r),n.LineTo(n.navAngle,u),n.Close()],{markerPathString:markerPathString,titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this.DropMarkerCustomization=function(){var n=new markerPathCustomization;return n.dropBaseRadiusPercent=0,n.dropRadiusPercent=.15,n},this.DropMarker=function(n,t,i){i===null&&(i=DropMarkerCustomization());n.setBaseValue(i.markerPercent*t,i);var u=n.sliceRadius*i.dropBaseRadiusPercent,f=n.startAngle+n.sliceAngle*.2,e=n.startAngle,o=n.startAngle+n.sliceAngle*.8,s=n.startAngle+n.sliceAngle,r=n.sliceRadius*i.dropRadiusPercent;return markerPathString=[n.MoveTo(0,r),n.ArcTo(r,180,r),n.ArcTo(r,360,r),n.MoveTo(n.navAngle,u),n.LineTo(f,r),n.LineTo(e,r),n.LineTo(n.navAngle,r*1.6),n.LineTo(s,r),n.LineTo(o,r),n.Close()],{markerPathString:markerPathString,titlePosX:n.titlePosX,titlePosY:n.titlePosY}},this};colorpalette={defaultpalette:["#2D9E46","#F5BE41","#F77604","#D63C22","#006BA6","#92ADAF"],purple:["#4F346B","#623491","#9657D6","#AD74E7","#CBA3F3"],greenred:["#17B92A","#FF3D00","#17B92A","#FF3D00"],greensilver:["#1F700A","#79CC3C","#D4E178","#E6D5C3","#AC875D"],oceanfive:["#00A0B0","#6A4A3C","#CC333F","#EB6841","#EDC951"],garden:["#648A4F","#2B2B29","#DF6126","#FFA337","#F57C85"],gamebookers:["#FF9900","#DCDCDC","#BCBCBC","#3299BB","#727272"],parrot:["#D80351","#F5D908","#00A3EE","#929292","#3F3F3F"],pisycholand:["#FF1919","#FF5E19","#FF9F19","#E4FF19","#29FF19"],makeLOVEnotWAR:["#2C0EF0","#B300FF","#6751F0","#FF006F","#8119FF"],theworldismine:["#F21D1D","#FF2167","#B521FF","#7E2AA8","#000000"],fractalloveone:["#002EFF","#00FFF7","#00FF62","#FFAA00","#FFF700"],fractallovetwo:["#FF9500","#FF0000","#FF00F3","#AA00FF","#002EFF"],fractallove:["#002EFF","#00FFF7","#00FF62","#FFAA00","#F5D908","#FF0000","#FF00F3","#AA00FF"],sprinkles:["#272523","#FFACAC","#FFD700","#00590C","#08006D"],goldenyellow:["#D8B597","#8C4006","#B6690F","#E3C57F","#FFEDBE"],hotaru:["#364C4A","#497C7F","#92C5C0","#858168","#CCBCA5"]};
  //# sourceMappingURL=wheelnav.min.js.map
  