text: !function(t){function s(t,s){this.blur=null,this.show_style="",this.sel_idx=0,this.titles=new Array,this.marble=new Array,this.tgt_id=t,this.intvl=0,this.ttbl=null,this.init(s)}function i(t,s,i){this.pmm=t,this.index=s,this.angle=330,this.cont=i,this.visible=!1,this.sym_seltr=null,this.init()}function l(t,s){this.pmm=t,this.selector=null,this.init(s)}function e(t){this.pmm=t,this.intvl=0,this.html_id="i-mm-ttable",this.html_class="c-mm-ttable",this.mbl_list=null,this.chk_cnt=0,this.tchPos=new Array(0,0),this.init()}function n(){var t=window.navigator.userAgent.toLowerCase();return-1!=t.indexOf("windows")&&-1!=t.indexOf("touch")||-1!=t.indexOf("ipad")||-1!=t.indexOf("android")&&-1==t.indexOf("mobile")||-1!=t.indexOf("firefox")&&-1!=t.indexOf("tablet")||-1!=t.indexOf("kindle")||-1!=t.indexOf("silk")||-1!=t.indexOf("playbook")?p:-1!=t.indexOf("iphone")||-1!=t.indexOf("ipod")?u:-1!=t.indexOf("windows")&&-1!=t.indexOf("phone")||-1!=t.indexOf("android")&&-1!=t.indexOf("mobile")||-1!=t.indexOf("firefox")&&-1!=t.indexOf("mobile")||-1!=t.indexOf("blackberry")?f:v}function h(s){t(s).append("<div id='"+C+"'></div>"),t("#"+C).css("z-index","1"),t("#"+C).css("display","none"),t("#"+C).css("position","fixed"),t("#"+C).css("top","0"),t("#"+C).css("left","0"),t("#"+C).css("width","100%"),t("#"+C).css("height","120%"),t("#"+C).css("background-color","rgba(200,200,200,0.40)")}function o(t){var s=Math.floor(180/t.ttbl.intvl),i=(t.marble.length,Math.floor(s/2)),l=t.sel_idx-i;0>l&&(l=t.marble.length+l),t.ttbl.initMblList();var e=0,n=0;for(e=0;s>e;e++)l>t.marble.length-1&&(l=0),n=t.ttbl.intvl*e,0>n&&(n=360+t.ttbl.intvl*e-t.ttbl.intvl*i),t.marble[l].setPos(Math.floor(n)),t.ttbl.setMarble(t.marble[l]),l++;for(e=0;e<t.marble.length;e++)t.marble[e].setSelect(!1),t.marble[e].setVisible(!1);t.marble[t.sel_idx].setSelect(!0),t.titles[t.sel_idx].visible(!0),E=t,setTimeout(function(){m()},100)}function m(){var t=0,s=r(),t=(180+E.ttbl.intvl)/(s+1);return t>=E.ttbl.chk_cnt?(E.ttbl.wakeupTurn(s),void setTimeout(function(){m()},1)):void(E.ttbl.chk_cnt=0)}function r(){var t=0;return t=p==k?5:u==k?2:f==k?3:1}function a(t,s){var i=new Array;return i.push(O*Math.cos(t/180*Math.PI)+s[0]),i.push(O*Math.sin(t/180*Math.PI)+s[1]),i}function c(t){t.preventDefault();var s=t.touches[0];E.ttbl.tchPos[0]=s.pageX,E.ttbl.tchPos[1]=s.pageY,Gmbl_tapChkPos[0]=s.pageX,Gmbl_tapChkPos[1]=s.pageY}function b(t){t.preventDefault();var s=t.touches[0];return 3>Math.abs(E.ttbl.tchPos[1]-s.pageY)?(E.ttbl.tchPos[0]=s.pageX,void(E.ttbl.tchPos[1]=s.pageY)):0!=E.ttbl.chk_cnt?(E.ttbl.tchPos[0]=s.pageX,void(E.ttbl.tchPos[1]=s.pageY)):(E.ttbl.tchPos[1]>s.pageY?_(!0):d(!0),E.ttbl.tchPos[0]=s.pageX,void(E.ttbl.tchPos[1]=s.pageY))}function d(t){1==t&&(E.ttbl.chk_cnt=1),0!=E.ttbl.chk_cnt&&(E.ttbl.nextMove(),setTimeout(function(){d(!1)},1))}function _(t){1==t&&(E.ttbl.chk_cnt=1),0!=E.ttbl.chk_cnt&&(E.ttbl.prevMove(),setTimeout(function(){_(!1)},1))}var p="DMBL_DEVTYPE_TABLET",u="DMBL_DEVTYPE_MBLIPHONE",f="DMBL_DEVTYPE_MBLOTHER",v="DMBL_DEVTYPE_OTHER",g="fade",x="slide_left",w="slide_right",y="DMBL_MOVEDIRECT_CLOCK",M="DMBL_MOVEDIRECT_ANTICLOCK",k=n(),P=new Array(t(window).width()-40,t(window).height()/2),O=100,E=null,T="c-mm-elem",D="c-mm-symb",L="c-mm-titl",C="i-mm-modal";t(window).on("orientationchange resize",function(){if(P=new Array(t(window).width()-40,t(window).height()/2),null!=E){E.ttbl.initPos();var s=0;for(s=0;s<E.titles.length;s++)E.titles[s].initPos()}}),t.fn.marblemenu=function(i){try{return new s(t(this).selector,t.extend(i))}catch(l){alert(l.stack)}},s.prototype={init:function(s){t(this.tgt_id).css("display","none"),this.setOpt(s),this.setMbl(),h(this.tgt_id),this.ttbl=new e(this),t(this.marble[this.sel_idx].cont).css("display","block"),t(this.tgt_id).css("display","block")},setOpt:function(t){this.blur=1=="blur"in t?t.blur:!0,this.show_style=1=="show_style"in t?t.show_style:g,1=="sel_idx"in t&&(this.sel_idx=t.sel_idx)},setMbl:function(){var s=this.tgt_id+" > ."+T,e=null,n=0,h=t(this.tgt_id+" > ."+T).length;for(n=0;h>n;n++)e=t(s+":eq("+n+")").attr("href"),this.marble.push(new i(this,n,e)),this.titles.push(new l(this,n))},showMenu:function(){if(g==this.show_style)t("#"+C).fadeIn("slow"),this.ttbl.visible(!0);else if(x==this.show_style);else if(w!=this.show_style)return;if(1==this.blur){var s=this.marble[this.sel_idx].cont;t(s).css("-webkit-filter","blur(2px)"),t(s).css("filter","blur(2px)")}o(this)},select:function(s){var i=0,l=null;for(i=0;i<this.marble.length;i++)1==this.blur&&(l=this.marble[i].cont,t(l).css("-webkit-filter","blur(0px)"),t(l).css("filter","blur(0px)")),t(l).css("display","none");l=this.marble[s].cont,g==this.show_style&&t(l).fadeIn("slow"),this.ttbl.visible(!1),this.titles[s].visible(!1),t("#"+C).fadeOut("slow")}},i.prototype={init:function(){var s=this.pmm.tgt_id+" > ."+T;this.sym_seltr=t(s+":eq("+this.index+") > ."+D);var i=null;i=t(s+":eq("+this.index+")").attr("href"),this.index!=this.pmm.sel_idx&&t(i).css("display","none"),this.sym_seltr.css("display","none");var l=a(this.angle,P);this.sym_seltr.css("left",l[0]+"px"),this.sym_seltr.css("top",l[1]+"px")},setVisible:function(t){1==t?this.sym_seltr.css("display","block"):(this.sym_seltr.css("display","none"),this.sym_seltr.removeClass(D+"-unlock")),this.visible=t},setPos:function(t){this.angle=t;var s=a(this.angle,P);this.sym_seltr.css("left",s[0]+"px"),this.sym_seltr.css("top",s[1]+"px")},getPos:function(){return a(this.angle,P)},stepMove:function(t,s){var i=(this.pmm.tgt_id+" > ."+T,0);if(M==t){for(this.angle--,i=0;s>i;i++)this.angle--;0>this.angle&&(this.angle=360)}else{for(this.angle++,i=0;s>i;i++)this.angle++;359<this.angle&&(this.angle=0)}var l=a(this.angle,P);this.sym_seltr.css("left",l[0]+"px"),this.sym_seltr.css("top",l[1]+"px")},setSelect:function(t){1==t?(this.sym_seltr.addClass(D+"-lock"),this.sym_seltr.removeClass(D+"-unlock")):1==this.sym_seltr.hasClass(D+"-lock")&&(this.sym_seltr.addClass(D+"-unlock"),this.sym_seltr.removeClass(D+"-lock"))}},l.prototype={init:function(s){var i=this.pmm.tgt_id+" > ."+T;this.selector=t(i+":eq("+s+") > ."+L),this.selector.css("display","none"),this.initPos()},setPos:function(t,s){this.selector.css("top",t+"px"),this.selector.css("left",s+"px")},initPos:function(){this.setPos(P[1]+20,t(window).width()-(40+O+250))},visible:function(t){1==t?this.selector.fadeIn("normal"):this.selector.fadeOut("normal")}},e.prototype={init:function(){t(this.pmm.tgt_id).append("<div class='"+this.html_class+"' id='"+this.html_id+"1'></div>"),t(this.pmm.tgt_id).append("<div class='"+this.html_class+"' id='"+this.html_id+"2'></div>"),t("."+this.html_class).css("display","none"),t("."+this.html_class).css("position","absolute"),t("."+this.html_class).css("width",2*O+100+"px"),t("."+this.html_class).css("height",2*O+100+"px"),t("."+this.html_class).css("-webkit-border-radius",(2*O+100)/2+"px"),t("."+this.html_class).css("-moz-border-radius",(2*O+100)/2+"px"),t("."+this.html_class).css("border-radius",(2*O+100)/2+"px"),t("."+this.html_class).css("text-align","center"),t("#"+this.html_id+"1").css("z-index","90"),t("#"+this.html_id+"1").css("background-color","rgb(230,210,210)"),t("#"+this.html_id+"2").css("z-index","120"),t("#"+this.html_id+"2").css("background-color","rgba(0,0,0,0)"),v==k&&t("#"+this.html_id+"2").css("cursor","pointer"),this.intvl=Math.floor(360/this.pmm.marble.length)+5,60>this.intvl&&(this.intvl=60),this.initMblList(),this.initPos(),this.setEvent()},initPos:function(){this.setPos(P[0]-(O+10),P[1]-(O+10))},initMblList:function(){for(this.mbl_list=null,this.mbl_list=new Array(this.pmm.marble.length),loop=0;loop<this.pmm.marble.length;loop++)this.mbl_list[loop]=null},setPos:function(s,i){t("."+this.html_class).css("left",s+"px"),t("."+this.html_class).css("top",i+"px");var l=0;for(l=0;l<this.mbl_list.length;l++)null!=this.mbl_list[l]&&this.mbl_list[l].setPos(this.mbl_list[l].angle)},setMarble:function(t){var s=0;for(s=0;s<this.mbl_list.length;s++)if(null!=this.mbl_list[s]&&t.index==this.mbl_list[s].index)return;t.setVisible(!1),this.mbl_list[t.index]=t},stepMove:function(t,s){var i=0;for(i=0;i<this.mbl_list.length;i++)null!=this.mbl_list[i]&&0!=this.mbl_list[i].visible&&this.mbl_list[i].stepMove(t,s);this.chk_cnt++},wakeupTurn:function(t){var s=0;for(s=0;s<this.mbl_list.length;s++)null!=this.mbl_list[s]&&(310>=this.mbl_list[s].angle&&300<=this.mbl_list[s].angle&&this.mbl_list[s].setVisible(!0),this.mbl_list[s].stepMove(M,t));this.chk_cnt++},nextMove:function(){var t=this.pmm.sel_idx+1;t>this.pmm.marble.length-1&&(t=0);var s=t+1;s>this.pmm.marble.length-1&&(s=0);var i=this.pmm.sel_idx-1;if(0>i&&(i=this.pmm.marble.length-1),1==this.chk_cnt){null==this.mbl_list[s]&&this.setMarble(this.pmm.marble[s]),0==this.mbl_list[s].visible&&(this.mbl_list[s].setPos(this.mbl_list[t].angle+this.intvl),this.mbl_list[s].setVisible(!0));var l=0;for(l=0;l<this.pmm.marble.length;l++)this.pmm.marble[l].setSelect(!1);this.pmm.marble[t].setSelect(!0),this.pmm.titles[this.pmm.sel_idx].visible(!1),this.pmm.titles[t].visible(!0)}180==this.pmm.marble[t].angle?(this.chk_cnt=0,this.pmm.sel_idx=t,this.mbl_list[i].setVisible(!1)):this.stepMove(M,r())},prevMove:function(){var t=this.pmm.sel_idx-1;0>t&&(t=this.pmm.marble.length-1);var s=t-1;0>s&&(s=this.pmm.marble.length-1);var i=this.pmm.sel_idx+1;if(i>this.pmm.marble.length-1&&(i=0),1==this.chk_cnt){null==this.mbl_list[s]&&this.setMarble(this.pmm.marble[s]),0==this.mbl_list[s].visible&&(this.mbl_list[s].setPos(this.mbl_list[t].angle-this.intvl),this.mbl_list[s].setVisible(!0));var l=0;for(l=0;l<this.pmm.marble.length;l++)this.pmm.marble[l].setSelect(!1);this.pmm.marble[t].setSelect(!0),this.pmm.titles[this.pmm.sel_idx].visible(!1),this.pmm.titles[t].visible(!0)}180==this.pmm.marble[t].angle?(this.chk_cnt=0,this.pmm.sel_idx=t,this.mbl_list[i].setVisible(!1)):this.stepMove(y,r())},setEvent:function(){if(v==k){var s="onwheel"in document?"wheel":"onmousewheel"in document?"mousewheel":"DOMMouseScroll";t("#"+this.html_id+"2").on(s,function(t){var s=t.originalEvent.deltaY?-t.originalEvent.deltaY:t.originalEvent.wheelDelta?t.originalEvent.wheelDelta:-t.originalEvent.detail;0>s?_(!0):d(!0)}),t("#"+this.html_id+"2").click(function(t){var s=new Array(t.pageX,t.pageY);E.ttbl.tapTable(s)})}else t("#"+this.html_id+"2")[0].addEventListener("touchstart",c,!1),t("#"+this.html_id+"2")[0].addEventListener("touchmove",b,!1),t("#"+this.html_id+"2").on("tap",function(t){var s=new Array(t.pageX,t.pageY);return E.ttbl.tapTable(s),!1})},tapTable:function(t){var s=0,i=null;for(s=0;s<this.mbl_list.length;s++)if(null!=this.mbl_list[s]&&1==this.mbl_list[s].visible){if(i=this.mbl_list[s].getPos(),80<t[0]-i[0])continue;if(80<t[1]-i[1])continue;this.pmm.sel_idx==s&&this.pmm.select(s)}},visible:function(s){if(1==s)t("."+this.html_class).fadeIn("slow");else{var i=0;for(i=0;i<this.mbl_list.length;i++)null!=this.mbl_list[i]&&1==this.mbl_list[i].visible&&this.mbl_list[i].setVisible(!1);t("."+this.html_class).fadeOut("normal")}}}}(jQuery);