window.addEvent("load",function(){$ES(".gk_tab").each(function(c,i){var d=c.getProperty("id");var f=$Gavick["gk_tab"+d];var g=f["styleSuffix"];var h=c.getElementsBySelector('.gk_tab_item-'+g);var k=(f["autoAnimation"]==0)?true:false;var l=0;var m=(f["activator"]==0)?"click":"mouseenter";var n=h.length;var o=false;if(f["styleType"]==1){var p=$E(".gk_tab_container2-"+g,c).getSize().size.x;c.setStyle("width",p+"px");var q=$E('.gk_tab_ul-'+g,c);p-=q.getSize().size.x;p-=q.getStyle("margin-left").toInt();p-=q.getStyle("margin-right").toInt();p-=$E(".gk_tab_container0-"+g,c).getStyle("margin-left").toInt();p-=$E(".gk_tab_container0-"+g,c).getStyle("margin-right").toInt();p-=$E(".gk_tab_container0-"+g,c).getStyle("padding-left").toInt();p-=$E(".gk_tab_container0-"+g,c).getStyle("padding-right").toInt();$E(".gk_tab_container1-"+g,c).setStyle("width",p+"px");$E(".gk_tab_container0-"+g,c).setStyle("width",p+"px");$ES(".gk_tab_item"+g,c).setStyle("width",p+"px")}$E('.gk_tab_ul-'+g+' li',c).addClass("active");var r=(f["animationType"]==1)?"width":"height";$E(".gk_tab_container2-"+g,c).setStyle(r,((n+1)*$E(".gk_tab_container1-"+g,c).getSize().size.x));$ES(".gk_tab_item-"+g,c).each(function(e){e.setStyle("width",$E(".gk_tab_container1-"+g,c).getSize().size.x+"px")});$ES('.gk_tab_ul-'+g+' li',c).each(function(b,j){b.addEvent(m,function(){l=gk_tab_anim(j,l,n,h,c,f["animationTransition"],f["animationSpeed"],f);$ES('.gk_tab_ul-'+g+' li',c).each(function(a){a.setProperty("class","")});$ES('.gk_tab_ul-'+g+' li',c)[l].toggleClass("active");if(o){$clear(o);o=(function(){l=gk_tab_anim("right",l,n,h,c,f["animationTransition"],f["animationSpeed"],f);$ES('.gk_tab_ul-'+g+' li',c).each(function(a,i){a.setProperty("class","")});$ES('.gk_tab_ul-'+g+' li',c)[l].toggleClass("active")}).periodical(f["animationInterval"])}})});if($E(".gk_tab_button_next-"+g,c)){$E(".gk_tab_button_next-"+g,c).addEvent("click",function(){l=gk_tab_anim('right',l,n,h,c,f["animationTransition"],f["animationSpeed"],f);$ES('.gk_tab_ul-'+g+' li',c).each(function(a){a.setProperty("class","")});$ES('.gk_tab_ul-'+g+' li',c)[l].toggleClass("active");if(o){$clear(o);o=(function(){l=gk_tab_anim("right",l,n,h,c,f["animationTransition"],f["animationSpeed"],f);$ES('.gk_tab_ul-'+g+' li',c).each(function(a,i){a.setProperty("class","")});$ES('.gk1_tab_ul-'+g+' li',c)[l].toggleClass("active")}).periodical(f["animationInterval"])}})}if($E(".gk_tab_button_prev-"+g,c)){$E(".gk_tab_button_prev-"+g,c).addEvent("click",function(){l=gk_tab_anim('left',l,n,h,c,f["animationTransition"],f["animationSpeed"],f);$ES('.gk_tab_ul-'+g+' li',c).each(function(a){a.setProperty("class","")});$ES('.gk_tab_ul-'+g+' li',c)[l].toggleClass("active");if(o){$clear(o);o=(function(){l=gk_tab_anim("right",l,n,h,c,f["animationTransition"],f["animationSpeed"],f);$ES('.gk_tab_ul-'+g+' li',c).each(function(a,i){a.setProperty("class","")});$ES('.gk_tab_ul-'+g+' li',c)[l].toggleClass("active")}).periodical(f["animationInterval"])}})}if(f["autoAnimation"]==1){o=(function(){l=gk_tab_anim("right",l,n,h,c,f["animationTransition"],f["animationSpeed"],f);$ES('.gk_tab_ul-'+g+' li',c).each(function(a,i){a.setProperty("class","")});$ES('.gk_tab_ul-'+g+' li',c)[l].toggleClass("active")}).periodical(f["animationInterval"])}})});function gk_tab_anim(a,b,c,d,e,t,s,f){var g=f["styleSuffix"];var h=new Fx.Scroll($E(".gk_tab_container1-"+g,e),{duration:s,wait:true,transition:f["animationTransition"],wheelStops:false});if(a=='left'){(b>0)?b--:b=c-1;h.toElement(d[b])}else if(a=='right'){(b<(c-1))?b+=1:b=0;h.toElement(d[b])}else{b=a;h.toElement(d[b])}return b}