window.addEvent("domready",function(){Fx.Height=Fx.Style.extend({initialize:function(b,a){$(b).setStyle("overflow","hidden");this.parent(b,"height",a)},toggle:function(){var a=this.element.getStyle("height").toInt();return this.start((a>0)?(a,0):(0,this.element.scrollHeight))},show:function(){return this.set(this.element.scrollHeight)}});Fx.Opacity=Fx.Style.extend({initialize:function(b,a){this.now=1;this.parent(b,"opacity",a)},toggle:function(){return this.start((this.now>0)?(1,0):(0,1))},show:function(){return this.set(1)}});$ES(".gk_news_highlighter").each(function(a,s){var n=a.getProperty("id");var r=$Gavick["gk_news_highlighter"+n];var f=a;var q,o=false;var b=false;if($E(".gk_news_highlighter_interface",a)){q=$E(".next",f);o=$E(".prev",f)}if(r.animationType==0){var t=$E(".nowrap",f);var j=0;$ES(".nowrap span").each(function(v,u){j+=v.getSize().size.x});var g=(j/r.animationSpeed)*1000;var k=g;var l=new Fx.Style(t,"margin-right",{duration:g,transition:Fx.Transitions.linear,onComplete:function(){l.set(a.getSize().size.x);l.start(a.getSize().size.x,-j)}});if(r.mouseover){t.addEvent("mouseenter",function(){l.stop();g=((j+t.getStyle("margin-right").toInt())/r.animationSpeed)*1000;l=new Fx.Style(t,"margin-right",{duration:g,transition:Fx.Transitions.linear,onComplete:function(){l.options.duration=k;l.set(a.getSize().size.x);l.start(a.getSize().size.x,-j)}})});t.addEvent("mouseleave",function(){l.start(t.getStyle("margin-right").toInt(),-j)})}l.set(a.getSize().size.x);l.start(a.getSize().size.x,-j)}if(r.animationType!=0){var m=$ES(".gk_news_highlighter_item",a);m.each(function(i){i.setStyle("display","block")});var d=[];var c=[];var p=0;var e=false;var h=(function(){if(e==false){d[p].toggle();if(r.animationType==2){c[p].start(0,-24)}else{if(r.animationType==3){c[p].start(0,24)}else{if(r.animationType==4){c[p].start(0,780)}}}p++;if(p>m.length-1){p=0}d[p].toggle();if(r.animationType==2||r.animationType==6){c[p].start(24,0)}else{if(r.animationType==3||r.animationType==7){c[p].start(-24,0)}else{if(r.animationType==4||r.animationType==5){c[p].start(-780,0)}}}}}).periodical(r.animationInterval);if(q){q.addEvent("click",function(i){new Event(i).stop();if(!b){b=true;(function(){b=false}).delay(r.animationSpeed);d[p].toggle();if(r.animationType==2){c[p].start(0,-24)}else{if(r.animationType==3){c[p].start(0,24)}else{if(r.animationType==4){c[p].start(0,780)}}}p++;if(p>m.length-1){p=0}d[p].toggle();if(r.animationType==2||r.animationType==6){c[p].start(24,0)}else{if(r.animationType==3||r.animationType==7){c[p].start(-24,0)}else{if(r.animationType==4||r.animationType==5){c[p].start(-780,0)}}}$clear(h);h=(function(){if(e==false){d[p].toggle();if(r.animationType==2){c[p].start(0,-24)}else{if(r.animationType==3){c[p].start(0,24)}else{if(r.animationType==4){c[p].start(0,780)}}}p++;if(p>m.length-1){p=0}d[p].toggle();if(r.animationType==2||r.animationType==6){c[p].start(24,0)}else{if(r.animationType==3||r.animationType==7){c[p].start(-24,0)}else{if(r.animationType==4||r.animationType==5){c[p].start(-780,0)}}}}}).periodical(r.animationInterval)}});o.addEvent("click",function(i){new Event(i).stop();if(!b){b=true;(function(){b=false}).delay(r.animationSpeed);d[p].toggle();if(r.animationType==2){c[p].start(0,-24)}else{if(r.animationType==3){c[p].start(0,24)}else{if(r.animationType==4){c[p].start(0,780)}}}(p==0)?p=m.length-1:p--;d[p].toggle();if(r.animationType==2||r.animationType==6){c[p].start(24,0)}else{if(r.animationType==3||r.animationType==7){c[p].start(-24,0)}else{if(r.animationType==4||r.animationType==5){c[p].start(-780,0)}}}$clear(h);h=(function(){if(e==false){d[p].toggle();if(r.animationType==2){c[p].start(0,-24)}else{if(r.animationType==3){c[p].start(0,24)}else{if(r.animationType==4){c[p].start(0,780)}}}p++;if(p>m.length-1){p=0}d[p].toggle();if(r.animationType==2||r.animationType==6){c[p].start(24,0)}else{if(r.animationType==3||r.animationType==7){c[p].start(-24,0)}else{if(r.animationType==4||r.animationType==5){c[p].start(-780,0)}}}}}).periodical(r.animationInterval)}})}m.each(function(u,i){u.setStyle("z-index",m.length-i);d[i]=new Fx.Opacity(u,{duration:r.animationSpeed,transition:r.animationFun});if(r.animationType==2||r.animationType==3||r.animationType==6||r.animationType==7){c[i]=new Fx.Style(u,"top",{duration:r.animationSpeed,transition:r.animationFun})}else{if(r.animationType==4||r.animationType==5){c[i]=new Fx.Style(u,"right",{duration:r.animationSpeed,transition:r.animationFun})}}if(i!=0){d[i].hide()}if(r.animationType>1){c[i].set(0)}});if(r.mouseover){m.addEvent("mouseenter",function(){e=true});m.addEvent("mouseleave",function(){e=false})}}})});