
(function(){if(typeof Jelo=="undefined"){return;}
var Carousel=function(){var i=15000;var c=$(".carousel ul");var l=c&&$$("li",c);var n=l&&l.length;var a=0;var t=null;var w=null;var g=function(){return!!(c&&w&&(n>1));};function forward(){if(g){stop();next();t=setTimeout(arguments.callee,i);}}
function backward(){if(g){stop();previous();t=setTimeout(arguments.callee,i);}}
function next(){if(g()){a++;if(a>n-1){a=0;}
Jelo.Anim.ate({me:c,css:"left",to:-1*a*w,duration:1,easing:"smooth"});}}
function previous(){if(g()){a--;if(a<0){a=n-1;}
Jelo.Anim.ate({me:c,css:"left",to:-1*a*w,duration:1,easing:"smooth"});}}
function start(){stop();t=g&&setTimeout(forward,i);}
function stop(){if(t){clearInterval(t);t=null;}}
return{setInterval:function(newI){if(typeof newI=="number"){i=newI;}},setWidth:function(newW){if(typeof newW=="number"){w=newW;}},backward:backward,forward:forward,next:next,previous:previous,start:start,stop:stop};}();var activateExboxen=function(){var g=$$(".jelo-exbox-group");Jelo.each(g,function(){var w=parseInt(Jelo.css(this,"width"),10);var b=$$("ul",this);var l=b.length;Jelo.css(this,"width",(w+(l*l)+20)+"px");Jelo.on(this,"mouseout",function(){Jelo.each(b,function(){var index=arguments[1];var d=0.25;var e="in";var animations=[[this,"top","5px"],[this,"left",(index*180)+"px"],[this,"width",Math.floor(w/l)],[$(".exbox-image",this),"width",Math.floor(w/l)],[$(".exbox-image",this),"height",Math.floor(w/l/2)],[$(".exbox-image img",this),"top",-1*Math.floor(w/100)],[$(".exbox-image img",this),"left",-1*Math.floor(w/50)],[$("p",this),"padding-left",0],[$("p",this),"padding-right",10]];Jelo.each(animations,function(){Jelo.Anim.ate({me:this[0],css:this[1],to:this[2],duration:d,easing:e,after:function(){Jelo.css(this.element,"z-index","0");}});});});});Jelo.each(b,function(){var index=arguments[1];Jelo.on(this,"mouseover",function(){var active=this;while(active&&!(/ul/i).test(active.tagName)){active=active.parentNode;}
var d=0.25;var e="out";var animations=[[active,"top","0"],[active,"left",(index*180-10)],[active,"width",Math.floor(w/l)+20],[$(".exbox-image",active),"width",Math.floor(w/l)+20],[$(".exbox-image",active),"height",Math.floor(w/l/2)+10],[$(".exbox-image img",active),"top",0],[$(".exbox-image img",active),"left",0],[$(".exbox-body p",active),"padding-left",10],[$(".exbox-body p",active),"padding-right",20]];Jelo.css(active,"z-index","1");Jelo.each(animations,function(){Jelo.Anim.ate({me:this[0],css:this[1],to:this[2],duration:d,easing:e});});});});});};Jelo.onReady(function(){Carousel.setWidth(540);Carousel.start();activateExboxen();Jelo.each(window["JeloOnReady"],function(){this.call(window);});window["jsHighlight"]=function(el){Jelo.Anim.ate({me:el,css:"background-color",from:"#ffff66",to:"#f6f6f6",duration:1});};});})();
