var i=true,k=null,m=false;jQuery.extend({F:{C:"lazySusan",da:function(b,c,a){return{x:Math.sin(b+c),y:Math.sin(b+3*Math.PI/2+c)/8*a,ba:(Math.cos(b+c)+1)/2,scale:Math.sin(b+Math.PI/2+c)/2+0.5}}}});jQuery.d.fa=function(b,c){var a=typeof b!="object"?{}:b,a={g:typeof a.g=="undefined"?0:jQuery.a(a.g%360),i:typeof a.i=="undefined"?0:jQuery.a(a.i),k:typeof a.k=="undefined"?100:parseInt(a.k,10),p:typeof a.p=="undefined"?400:parseInt(a.p,10),q:typeof a.q=="undefined"?0.4:jQuery.a(a.q),o:typeof a.o=="undefined"?1:jQuery.a(a.o),duration:typeof a.duration=="undefined"?600:parseInt(a.duration,10),w:a.w||k,z:a.z||k,h:a.h||"swing",A:a.A!==m,s:typeof a.s=="undefined"?0:jQuery.a(a.s%360),shape:a.shape||"lazySusan",B:a.B||m,f:a.f||"li",v:typeof a.v=="undefined"?k:parseInt(a.v,10),l:typeof a.l=="undefined"||a.l===m?m:i};this.c(function(){var b=jQuery(this),c=jQuery.a(360/b.children(a.f).length),e=a.v===k?a.g:a.v*c;b.H("roundabout-holder").b("padding",0).b("position","relative").b("z-index",a.k);b.data("roundabout",{bearing:e,tilt:a.i,minZ:a.k,maxZ:a.p,minScale:a.q,maxScale:a.o,duration:a.duration,easing:a.h,clickToFocus:a.A,focusBearing:a.s,animating:0,childInFocus:-1,shape:a.shape,period:c,debug:a.B,childSelector:a.f,reflect:a.l});a.A===i&&b.children(a.f).c(function(e){jQuery(this).click(function(d){var l=a.l===i?360-c*e:c*e,l=jQuery.a(l);if(!jQuery.R(b,l))return d.preventDefault(),b.data("roundabout").e===0&&b.N(l),m})});a.w&&jQuery(a.w).bind("click.roundabout",function(a){a.preventDefault();b.data("roundabout").e===0&&b.X();return m});a.z&&jQuery(a.z).bind("click.roundabout",function(a){a.preventDefault();b.data("roundabout").e===0&&b.Y();return m})});this.Z();if(typeof c==="function"){var d=this;setTimeout(function(){c(d)},0)}return this};jQuery.d.Z=function(){this.c(function(){var b=jQuery(this),c=b.data("roundabout");b.children(c.f).c(function(a){a=c.l===i?360-c.M*a:c.M*a;jQuery(this).H("roundabout-moveable-item").b("position","absolute");jQuery(this).data("roundabout",{startWidth:jQuery(this).width(),startHeight:jQuery(this).height(),startFontSize:parseInt(jQuery(this).b("font-size"),10),degrees:a})});b.r()})};jQuery.d.ka=function(b,c){this.c(function(){jQuery(this).data("roundabout").i=b;jQuery(this).r()});if(typeof c==="function"){var a=this;setTimeout(function(){c(a)},0)}return this};jQuery.d.S=function(b,c){this.c(function(){jQuery(this).data("roundabout").g=jQuery.a(b%360);jQuery(this).r()});if(typeof c==="function"){var a=this;setTimeout(function(){c(a)},0)}};jQuery.d.ga=function(b,c){b=jQuery.a(b);b!==0&&this.c(function(){jQuery(this).data("roundabout").g=jQuery.j(jQuery(this))+b;jQuery(this).r()});if(typeof c==="function"){var a=this;setTimeout(function(){c(a)},0)}return this};jQuery.d.ha=function(b,c){b=jQuery.a(b);b!==0&&this.c(function(){jQuery(this).data("roundabout").i=jQuery.a(jQuery(this).ja("tilt")+b);jQuery(this).r()});if(typeof c==="function"){var a=this;setTimeout(function(){c(a)},0)}return this};jQuery.d.O=function(b,c,a,d){var b=jQuery.a(b),h=new Date,f=typeof c=="undefined"?k:c,e=typeof a=="undefined"?k:a,g=typeof d!=="object"?k:d;this.c(function(){var a=jQuery(this),c=a.data("roundabout"),d,n=f===k?c.duration:f,o=e!==k?e:c.h||"swing";g===k&&(g={aa:h,start:jQuery.j(a),G:n});d=h-g.aa;d<n?(c.e=1,typeof jQuery.h.C=="string"?(c=jQuery.h[o]||jQuery.h[jQuery.h.C],d=c(k,d,g.start,b-g.start,g.G)):d=jQuery.h[o](d/g.G,d,g.start,b-g.start,g.G),a.S(d,function(){a.O(b,n,o,g)})):(b=b<0?b+360:b%360,c.e=0,a.S(b))})};jQuery.d.D=function(b,c,a){this.c(function(){b=jQuery.j(jQuery(this))+jQuery.a(b);jQuery(this).O(b,c,a)})};jQuery.d.ia=function(b,c,a){this.c(function(){var d=jQuery(this),h=d.data("roundabout");h.I!==b&&h.e===0&&(h=jQuery(d.children(h.f)[b]),d.N(h.data("roundabout").J,c,a))});return this};jQuery.d.P=function(b,c){var a=b[0],d=b[1];this.c(function(){var b,f;b=jQuery(this).data("roundabout");var e=jQuery.a(360-jQuery.j(jQuery(this))),g=b.M,j=0;f=b.l;var l=jQuery(this).children(b.f).length,e=f===i?e%360:e;if(b.e===0)if(f===m&&c==="next"||f===i&&c!=="next")for(e=e===0?360:e;j<l;){b=jQuery.a(g*j);f=jQuery.a(g*(j+1));f=j==l-1?360:f;if(e<=f&&e>b){jQuery(this).D(e-b,a,d);break}j++}else for(;;){b=jQuery.a(g*j);f=jQuery.a(g*(j+1));f=j==l-1?360:f;if(e>=b&&e<f){jQuery(this).D(e-f,a,d);break}j++}})};jQuery.d.X=function(){this.P(arguments,"next")};jQuery.d.Y=function(){this.P(arguments,"previous")};jQuery.d.N=function(b,c,a){this.c(function(){var d=jQuery.j(jQuery(this))-b,d=Math.abs(360-d)<Math.abs(0-d)?360-d:0-d,d=d>180?-(360-d):d;d!==0&&jQuery(this).D(d,c,a)})};jQuery.d.r=function(){this.c(function(){var b=jQuery(this),c=b.data("roundabout"),a=-1,d={g:jQuery.j(b),i:c.i,u:{width:Math.floor(b.width()*0.9),height:Math.floor(b.height()*0.9)},e:c.e,K:c.I,W:jQuery.Q(c.s),shape:jQuery.F[c.shape]||jQuery.F[jQuery.F.C]};d.t={width:d.u.width/2,height:d.u.height/2};d.L={width:d.t.width+d.u.width*0.05,height:d.t.height+d.u.height*0.05};d.U={min:c.k,max:c.p,n:c.p-c.k};d.scale={min:c.q,max:c.o,n:c.o-c.q};b.children(c.f).c(function(c){jQuery.$(jQuery(this),b,d,c)&&d.e===0?(a=c,jQuery(this).H("roundabout-in-focus")):jQuery(this).ea("roundabout-in-focus")});if(a!==d.K)jQuery.T(b,d.K,"blur"),a!==-1&&jQuery.T(b,a,"focus"),c.I=a})};jQuery.j=function(b){return jQuery.a(b.data("roundabout").g)%360};jQuery.Q=function(b){return b%360*Math.PI/180};jQuery.R=function(b,c){return jQuery.j(b)%360===c%360};jQuery.T=function(b,c,a){c<0||jQuery(b.children(b.data("roundabout").f)[c]).oa(a)};jQuery.a=function(b){b=Math.round(parseFloat(b)*1E3)/1E3;return parseFloat(b.toFixed(2))};jQuery.$=function(b,c,a,d){for(var b=jQuery(b),h=b.data("roundabout"),f=[],e=jQuery.Q(360-b.data("roundabout").J+a.g);e<0;)e+=Math.PI*2;for(;e>Math.PI*2;)e-=Math.PI*2;e=a.shape(e,a.W,a.i);e.scale=e.scale>1?1:e.scale;e.m=((a.scale.min+a.scale.n*e.scale)*(a.scale.min+a.scale.n*e.scale)*(a.scale.min+a.scale.n*e.scale)).toFixed(4);e.width=(e.m*h.na).toFixed(4);e.height=(e.m*h.ma).toFixed(4);e.m>0.99?b.b({background:"url(images/img_bg.png) center 2px no-repeat"}):b.b({background:"none"});b.b("left",(e.x*a.t.width+a.L.width-e.width/2).toFixed(1)+"px").b("top",(e.y*a.t.height+a.L.height-e.height/2).toFixed(1)+"px").b("width",e.width+"px").b("height",e.height+"px").b("z-index",Math.round(a.U.min+a.U.n*e.ba)).b("font-size",(e.m*h.la).toFixed(2)+"px").V("current-scale",e.m);c.data("roundabout").B===i&&(f.push('<div style="font-weight: normal; font-size: 10px; padding: 2px; width: '+b.b("width")+'; background-color: #ffc;">'),f.push('<strong style="font-size: 12px; white-space: nowrap;">Child '+d+"</strong><br />"),f.push("<strong>left:</strong> "+b.b("left")+"<br /><strong>top:</strong> "+b.b("top")+"<br />"),f.push("<strong>width:</strong> "+b.b("width")+"<br /><strong></strong> <br />"),f.push("<strong>z-index:</strong> "+b.b("z-index")+"<br /><strong>font-size:</strong> "+b.b("font-size")+"<br />"),f.push("<strong>scale:</strong> "+b.V("current-scale")),f.push("</div>"),b.ca(f.join("")));return jQuery.R(c,b.data("roundabout").J)};
