if(typeof ace=="undefined"){window.ace={}}if(typeof Math=="undefined"){window.Math={}}Math.absMod=function(a,b){return a<0?-((-a)%b):a%b};Math.sign=function(a){return a>0?1:a<0?-1:0};(function(a){a.fn.hitTest=function(b,g){if(arguments.length==1&&typeof b=="object"&&b instanceof a){if(b.length==1){var f=b.offset();return(this.hitTest(f.left,f.top)||this.hitTest(f.left+b.width(),f.top+b.height()))}else{if(b.length>1){for(var d=0;d<b.length;d++){if(this.hitTest(b.eq(d))){return true}}}}return false}if(this.length>1){for(var d=0;d<this.length;d++){if(this.eq(d).hitTest(b,g)){return true}}return false}var f=this.offset(),e=+this.height(),c=+this.width();if(b<f.left||b>f.left+c||g<f.top||g>f.top+e){return false}return true};a.fn.getReflection=function(n){if(this.length==1&&/^img$/i.test(this[0].tagName)){var f=this[0];n=a.extend({},a.fn.getReflection.defaults,n);if(a.browser.msie){return a("<img />").attr("src",f.src).css({filter:"flipv progid:DXImageTransform.Microsoft.Alpha(opacity="+(n.opacity*100)+", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy="+(n.height*100)+")"})}try{var b=a("<canvas />"),d=Math.floor(f.height*n.height);var l=b[0].getContext("2d");var m,i;b.attr({width:(m=f.width),height:(i=f.height)}),l.save();l.translate(0,i-1);l.scale(1,-1);l.drawImage(f,0,0,m,i);l.restore();l.globalCompositeOperation="destination-out";var j=l.createLinearGradient(0,0,0,d);j.addColorStop(0,"rgba(255, 255, 255, "+(1-n.opacity)+")");j.addColorStop(1,"rgba(255, 255, 255, 1.0)");l.fillStyle=j;l.rect(0,0,m,i);l.fill();return b}catch(k){return a([])}}if(this.length>1){var b=[];this.each(function(){b.push(a(this).getReflection(n))});return a(b)}return a([])};a.fn.getReflection.defaults={height:0.33,opacity:0.5};ace.Carousel=function(){var b=function(d,c){this.jSet=d;this.options=a.extend(true,{},b.defaults,c);this.init();return this};b.DOM_KEY="_ace_carousel";b.prototype={init:function(){this.rotationState=0;this.pos=0;this.nextPos=this.options.startIndex;this.running=false;this.Elements=[];this.animProxy=a({factor:0,memFactor:0,delta:0});this.e={};this.recoverStyle=this.jSet.attr("style");this.jSet.css({overflow:"hidden",position:this.jSet.css("position")=="absolute"?"absolute":"relative"});this.initElements();this.refresh();this.attachListeners()},initElements:function(){var c=this;this.jSet.find(this.options.boxes).each(function(d){var f=new ace.Carousel.Element(a(this),c);f.index=d;c.Elements.push(f)})},attachListeners:function(){var c=this;this.resizeTimeout=null;this.__onResize=function(d){if(c.__resizeTimeout!=null){clearTimeout(c.__resizeTimeout);c.__resizeTimeout=null}c.__resizeTimeout=setTimeout(function(){c.jSet.trigger(d)},50)};this.__onMouseWheel=function(d){if(c.jSet.hitTest(d.pageX,d.pageY)){c.jSet.trigger(a.extend({},d,{type:"mousescroll"}));d.preventDefault()}};a(document).bind("DOMMouseScroll",this.__onMouseWheel).bind("mousewheel",this.__onMouseWheel);a(window).bind("resize",this.__onResize);this.jSet.bind("resize.aceCarousel",function(d){if(c.e.xRadius!=Math.round(c.jSet.width()/2)){c.refresh(d)}});this.jSet.bind("mousescroll.aceCarousel",function(d){c.revolveBy(d.detail?(+d.detail)/Math.abs(+d.detail):d.wheelDelta?a.browser.opera?(+d.wheelDelta)/Math.abs(+d.wheelDelta):-(+d.wheelDelta)/Math.abs(+d.wheelDelta):0)})},refresh:function(){this.e.xRadius=Math.round(this.jSet.width()/2);if(typeof this.options.showElements=="number"){this.e.showElements=this.options.showElements}else{if(typeof this.options.stepDistance=="number"){this.e.showElements=((2*this.e.xRadius)/this.options.stepDistance)}}this.e.showElements=this.e.showElements-1;if(this.e.showElements<1){this.e.showElements=1}this.e.stepUnit=1/this.e.showElements;this.e.stepDistance=Math.round(this.e.stepUnit*2*this.e.xRadius);this.e.track=this.options.track;if(this.options.yRadius=="auto"){this.e.archFactor=+this.options.archFactor;this.e.yRadius=this.e.archFactor*this.e.xRadius}else{this.e.yRadius=this.options.yRadius;this.e.archFactor=this.e.xRadius/this.e.yRadius}this.e.zoomFactor=this.options.zoomFactor;this.e.iZoomFactor=1-this.e.zoomFactor;this.e.verticalAlign=this.options.verticalAlign=="center"?1:this.options.verticalAlign=="bottom"?2:0;this.e.stepAngle=this.e.stepUnit*Math.PI;this.e.selectedPos=this.options.selectedPos;if(typeof this.e.selectedPos!="number"||this.e.selectedPos<0||this.e.selectedPos>this.e.showElements){switch(this.e.selectedPos){case"left":this.e.selectedPos=(this.e.showElements);break;case"right":this.e.selectedPos=0;break;case"center":default:this.e.selectedPos=(this.e.showElements)/2;break}}this.e.oddFactor=this.e.showElements%2>0?0.5:0;this.e.zIndexMax=3*Math.ceil(this.e.showElements/2);this.e.reflect=typeof this.options.reflect=="object"?this.options.reflect:this.options.reflect==true?null:false;this.e.reflectionHeightRatio=typeof this.e.reflect=="object"?(typeof this.e.reflect.height=="number"?this.e.reflect.height:a.fn.getReflection.defaults.height):0;this.e.loop=this.options.loop;this.e.loopBuffer=(this.e.loop?1:2)*this.Elements.length;this.e.lazyLoadBuffer=Math.ceil(this.e.showElements/2)+1;this.e.lateloadKey=this.options.lateloadKey;this.e.purgatoryRatio=this.options.purgatoryRatio;this.e.cssClasses=this.options.cssClasses;this.e.innerMargins=this.options.innerMargins;this.e.highestElement=0;this.e.topStart=0;this.e.widestElement=0;this.e.leftStart=0;this.e.computedXRadius=this.e.xRadius;for(var d=0,c=this.Elements.length;d<c;d++){this.Elements[d].pos=(this.e.selectedPos+d);this.Elements[d].refresh()}var e=this.nextPos;var f=Math.round(this.rotationState);this.rotationState=0;this.setIndex(f);if(f!=e){this.revolveTo(e)}},updateHeight:function(c){this.jSet.height(c);this.updateWidth()},updateWidth:function(){this.e.xRadius=Math.round(this.jSet.width()/2);this.e.computedXRadius=this.e.xRadius-this.e.leftStart-Math.ceil(this.e.innerMargins.right/2)+Math.floor(this.e.innerMargins.left/2)},propagateLateLoad:function(g,c){c--;if(c<=0){return}var e=this.Elements.length,d=g+1,f=g-1;if(this.e.loop){if(d>=e){d-=e}if(f<0){f+=e}}if(typeof this.Elements[d]=="object"){this.Elements[d].doLateLoad(c)}if(typeof this.Elements[f]=="object"){this.Elements[f].doLateLoad(c)}},rotate:function(e){this.rotationState+=e;if(this.rotationState<0){this.rotationState+=this.Elements.length}else{if(this.rotationState>=this.Elements.length){this.rotationState-=this.Elements.length}}for(var d=0,c=this.Elements.length;d<c;d++){this.Elements[d].rotate(-e)}},onAnimationStop:function(){this.running=false;this.animProxy[0].factor=0;this.animProxy[0].memFactor=0;this.animProxy[0].delta=0},animate:function(d){if(this.running===true){this.animProxy.stop();this.onAnimationStop()}for(var f=0;f<this.Elements.length;f++){this.Elements[f].unmark()}var c=this;var g=new a.Event("carouselAnimationStart");g.carouselRotationState=this.rotationState;g.carouselRotationStartPos=Math.round(this.rotationState);g.carouselRotationDiff=d+g.carouselRotationStartPos-g.carouselRotationState;c.jSet.trigger(g);this.running=true;this.animProxy.animate({factor:g.carouselRotationDiff},{duration:this.options.duration,easing:this.options.easing,step:function(){this.delta=this.factor-this.memFactor;this.memFactor=this.factor;c.rotate(this.delta)},complete:function(){c.rotate(Math.round(c.rotationState)-c.rotationState);var e=c.Elements[(c.pos=Math.round(c.rotationState))];e.mark();e.doLateLoad(c.e.lazyLoadBuffer);c.onAnimationStop();c.jSet.trigger(a.extend({},g,{type:"carouselAnimationComplete",carouselCurrentElement:e.jSet,carouselRotationEndPos:c.pos,carouselRotationState:c.rotationState})).trigger(a.extend(new a.Event("carouselSelectIndex"),{carouselCurrentElement:e.jSet,carouselSelectedIndex:c.pos,carouselRotationState:c.rotationState}))}})},setIndex:function(c){for(var d=0;d<this.Elements.length;d++){this.Elements[d].unmark()}this.nextPos=c;this.pos=Math.round(this.rotationState);var h=c-this.rotationState;var g=a.extend(new a.Event("carouselSelectIndex"),{carouselRotationState:this.rotationState});this.rotate(h);var f=this.Elements[(this.pos=Math.round(this.rotationState))];f.mark();f.doLateLoad(this.e.lazyLoadBuffer);g.carouselCurrentElement=f;g.carouselSelectedIndex=this.pos;this.jSet.trigger(g)},revolveTo:function(c){if(c==this.nextPos&&c==this.pos){return}this.nextPos=c%this.Elements.length;this.pos=Math.round(this.rotationState);var e=this.nextPos-this.pos;if(this.options.loop===true){var d=(e>0)?-this.Elements.length+e:this.Elements.length+e;if(Math.abs(e)>Math.abs(d)){e=d}}this.animate(e)},revolveBy:function(e){switch(this.options.loop){case true:this.pos=Math.round(this.rotationState);var d=Math.absMod(e+this.nextPos-this.pos,this.Elements.length);this.nextPos=(this.pos+d);if(this.nextPos<0){this.nextPos+=this.Elements.length}if(this.nextPos>=this.Elements.length){this.nextPos-=this.Elements.length}if(Math.sign(d)<Math.sign(e)){d+=this.Elements.length}else{if(Math.sign(d)>Math.sign(e)){d-=this.Elements.length}}this.animate(d);break;case false:var c=this.nextPos+e;this.revolveTo(c<0?0:c>=this.Elements.length?this.Elements.length-1:c);break}},prev:function(){this.revolveBy(-1)},next:function(){this.revolveBy(1)},hasNext:function(){return(this.Elements.length>1&&(this.e.loop||this.pos<(this.Elements.length-1)))},hasPrev:function(){return(this.Elements.length>1&&(this.e.loop||this.pos>0))},getSelectedIndex:function(){return typeof this.pos=="number"?this.pos:null},getCurrentElement:function(){return this.getElement(this.pos)},getElement:function(c){try{if(typeof this.Elements[c]=="object"&&typeof this.Elements[c].jSet=="object"&&this.Elements[c].jSet instanceof a){return this.Elements[c].jSet}}catch(d){}return null},setOptions:function(c){if(arguments.length==2&&typeof arguments[0]=="string"){var d={};d[arguments[0]]=arguments[1];return this.setOptions(d)}a.extend(true,this.options,c);this.refresh()},resetOptions:function(){var c={};for(var d=0;d<arguments.length;d++){if(typeof b.defaults[arguments[d]]!="undefined"){c[arguments[d]]=b.defaults[arguments[d]]}}a.extend(true,this.options,c);this.refresh()},destroy:function(){if(this.__resizeTimeout!=null){clearTimeout(this.__resizeTimeout)}if(this.running===true){this.animProxy.stop();this.onAnimationStop()}this.jSet.removeData(b.DOM_KEY);if(typeof this.__onMouseWheel=="function"){a(document).unbind("DOMMouseScroll",this.__onMouseWheel).unbind("mousewheel",this.__onMouseWheel)}if(typeof this.__onResize=="function"){a(window).unbind("resize",this.__onResize)}this.jSet.unbind(".aceCarousel");for(var c=0;c<this.Elements.length;c++){this.Elements[c].destroy();this.Elements[c]=null}this.Elements=null;(typeof this.recoverStyle=="string"&&this.recoverStyle!="")?this.jSet.attr("style",this.recoverStyle):this.jSet.removeAttr("style");this.jSet=null}};return b};ace.Carousel=ace.Carousel();ace.Carousel.Element=function(){var b=function(e,d){this.jSet=e;this.parent=d;this.e=this.parent.e;this.image=this.jSet.find("img");this.attrWidth=+this.image.attr("width");this.attrHeight=+this.image.attr("height");this.recoverStyles={jSet:this.jSet.attr("style"),image:this.image.attr("style")};this.imageBox=this.image.parent();this.image.remove().css({display:"block"});if(this.imageBox[0]==this.jSet[0]){this.imageBox=a("<span></span>").appendTo(this.jSet);this.removeIBoxOnDestroy=true}else{this.recoverStyles.imageBox=this.imageBox.attr("style");this.removeIBoxOnDestroy=false}var c=this;this.imageBox.css({display:"block",width:"100%",height:"50%"}).bind("mouseover.aceCarouselElement",function(f){if(c.parent.running===false){try{c.jSet.addClass(c.cssClasses.elementOver)}catch(f){}}}).bind("mouseout.aceCarouselElement",function(f){try{c.jSet.removeClass(c.cssClasses.elementOver)}catch(f){}}).bind("click.aceCarouselElement",function(f){if(c.current===false){c.parent.revolveTo(c.index);f.preventDefault()}});this.reflectionBox=a("<div></div>").css({width:"100%",height:"50%"}).appendTo(this.jSet);this.lateload=null;this.pos=0;this.index=0;this.origWidth=0;this.origHeight=0;this.currWidth=0;this.currHeight=0;this.scale=1;this.reflection=null;this.hasPropagated=0;this.imageInited=false;this.current=false;this.imageLoadTimeout=null;this.jSet.css({position:"absolute",display:"block",width:0,height:0,zIndex:0,opacity:0});return this};b.prototype={mark:function(){this.current=true;try{this.jSet.addClass(this.cssClasses.elementCurrent)}catch(c){}},unmark:function(){this.current=false;try{this.jSet.removeClass(this.cssClasses.elementCurrent);this.jSet.removeClass(this.cssClasses.elementOver)}catch(c){}},refresh:function(){this.imageInited=false;this.reset();this.cssClasses=a.extend({},this.e.cssClasses);try{this.reflectionBox.addClass(this.cssClasses.reflectionBox);this.jSet.addClass(this.cssClasses.element);this.imageBox.addClass(this.cssClasses.imageBox)}catch(g){}this.settleImageSize();switch(this.e.track){case"perspective":case"romboid":case"triangle":this.posCoords=this.perspectivePosCoords;break;case"ellipse":default:this.posCoords=this.ellipsePosCoords;break}var d=this.image.attr("longdesc"),f;if(typeof d=="string"&&d!=""&&typeof(f=d.match(new RegExp(this.e.lateloadKey+"(.*)$")))=="object"&&f instanceof Array&&f.length>0){this.lateload=f[1]}this.src=typeof this.image.attr("src")=="string"?this.image.attr("src"):"";var c=this;if(this.imageLoadTimeout!=null){clearTimeout(this.imageLoadTimeout);this.imageLoadTimeout=null}this.image.unbind("load.aceCarouselElement").bind("load.aceCarouselElement",function(){c.onImageLoad(true)});if(this.src!=""){this.image.attr("src",this.src);this.showLoader();this.onImageLoad(false)}},onImageLoad:function(d){if(this.imageInited===true){return}if((typeof this.image[0].naturalWidth=="undefined"||this.image[0].naturalWidth>0)&&this.image[0].complete===true){this.imageInited=true;this.hideLoader();this.refreshImage()}else{if(d===true){var c=this;c.imageLoadTimeout=setTimeout(function(){c.onImageLoad()},13)}}},showLoader:function(){try{this.jSet.addClass(this.cssClasses.elementLoading)}catch(c){}},hideLoader:function(){try{this.jSet.removeClass(this.cssClasses.elementLoading)}catch(c){}},doLateLoad:function(d){if(d<=this.hasPropagated){return this.hasPropagated}this.hasPropagated=d;var j=this.lateload;if(j!=null){this.lateload=null;this.imageInited=false;if(this.imageLoadTimeout!=null){clearTimeout(this.imageLoadTimeout);this.imageLoadTimeout=null}this.image.unbind("load.aceCarouselElement");if(this.src!=""){this.oldImage=this.image;var f=this.oldImage[0].attributes,e={},g=new Image();for(var h=0;h<f.length;h++){if(f[h].specified&&f[h].nodeName!="src"){g.setAttribute(f[h].nodeName,f[h].nodeValue)}}this.image=a(g)}var c=this;this.image.attr("longdesc",this.image.attr("longdesc").replace(new RegExp(this.e.lateloadKey+this.lateload+"$"),"")).bind("load.aceCarouselElement",function(i){if(c.reflection!=null){c.reflection.remove();c.reflection=null}if(c.oldImage!=null){c.oldImage.remove();c.oldImage=null}c.onImageLoad(true);c.parent.propagateLateLoad(c.index,d);c.image.unbind("load.aceCarouselElement").unbind("error.aceCarouselElement")}).bind("error.aceCarouselElement",function(){c.parent.propagateLateLoad(c.index,d);c.image.unbind("load.aceCarouselElement").unbind("error.aceCarouselElement")}).attr("src",j);this.src=j;this.showLoader()}else{this.parent.propagateLateLoad(this.index,d)}},refreshImage:function(){this.image.appendTo(this.imageBox);var c=this.image.attr("style");this.image.removeAttr("style");if(this.reflection==null&&typeof this.e.reflect=="object"){this.reflection=this.image.getReflection(this.e.reflect).css({width:"100%",height:"100%",display:"block",border:0});try{this.reflection.addClass(this.cssClasses.reflection)}catch(d){}}if(this.reflection!=null){this.reflection.appendTo(this.reflectionBox)}this.settleImageSize();this.image.attr("style",c);this.image.css({width:"100%",height:"100%"});this.setPos(this.pos)},settleImageSize:function(){this.origWidth=this.attrWidth>0?this.attrWidth:+this.image.width();this.origHeight=this.attrHeight>0?this.attrHeight:+this.image.height();if(this.origHeight>this.e.highestElement){this.e.highestElement=this.origHeight;var c=(2-this.e.verticalAlign)/2+this.e.reflectionHeightRatio;if(this.e.yRadius<0){this.e.topStart=-this.e.yRadius+this.e.verticalAlign*this.e.highestElement/2+this.e.innerMargins.top;this.parent.updateHeight(Math.max(this.e.topStart+this.e.iZoomFactor*c*this.e.highestElement,(1+this.e.reflectionHeightRatio)*this.e.highestElement)+this.e.innerMargins.bottom)}else{this.e.topStart=Math.round(this.e.verticalAlign*Math.max(this.e.highestElement*(this.e.iZoomFactor),this.e.highestElement-this.e.yRadius)/2)+this.e.innerMargins.top;this.parent.updateHeight(c*this.e.highestElement+this.e.yRadius+this.e.topStart+this.e.innerMargins.bottom)}}if(this.origWidth>this.e.widestElement){this.e.widestElement=this.origWidth;this.e.leftStart=Math.round(this.e.widestElement*this.e.iZoomFactor/2)+this.e.innerMargins.left;this.parent.updateWidth()}},rotate:function(c){this.setPos(this.pos+c)},posCoords:function(){},ellipsePosCoords:function(f){var e={},d=f*this.e.stepAngle;e._sin=Math.sin(d);e._cos=Math.cos(Math.PI+d);e._scale=1-this.e.zoomFactor*(1-e._sin);return e},perspectivePosCoords:function(f){var e={},d=1-2*f/this.e.showElements;e._sin=(1-Math.abs(d))*(1-this.e.zoomFactor*Math.abs(d));e._cos=d>0?e._sin-1:1-e._sin;e._scale=1-this.e.zoomFactor*(1-e._sin);return e},setPos:function(e){if(e<0){e+=this.e.loopBuffer}else{if(e>=this.e.loopBuffer){e-=this.e.loopBuffer}}this.pos=e;if(e<=this.e.showElements&&e>=0){var d=this.posCoords(e);this.jSet.css({width:(this.currWidth=Math.round(this.origWidth*d._scale))+"px",height:2*(this.currHeight=Math.round(this.origHeight*d._scale))+"px",opacity:1,zIndex:1+this.e.zIndexMax-Math.abs(Math.round((e+this.e.oddFactor)*3)-this.e.zIndexMax),left:this.e.leftStart+Math.round((1+d._cos)*this.e.computedXRadius-this.currWidth/2)+"px",top:this.e.topStart+Math.round(d._sin*this.e.yRadius+this.e.verticalAlign*(-this.currHeight)/2)+"px"})}else{if(e>this.e.loopBuffer-this.e.purgatoryRatio&&e<=this.e.loopBuffer){this.jSet.css({width:(this.currWidth=Math.round(this.origWidth*this.e.iZoomFactor))+"px",height:2*(this.currHeight=Math.round(this.origHeight*this.e.iZoomFactor))+"px",zIndex:1,opacity:1-Math.abs(Math.round(((e-this.e.showElements)/this.e.purgatoryRatio)*100)/100),left:this.e.leftStart+Math.round(-this.currWidth/2)+"px",top:this.e.topStart+Math.round(this.e.verticalAlign*(-this.currHeight)/2)+"px"})}else{if(e>this.e.showElements&&e<=this.e.showElements+this.e.purgatoryRatio){this.jSet.css({width:(this.currWidth=Math.round(this.origWidth*this.e.iZoomFactor))+"px",height:2*(this.currHeight=Math.round(this.origHeight*this.e.iZoomFactor))+"px",zIndex:1,opacity:1-Math.abs(Math.round(((e-this.e.loopBuffer)/this.e.purgatoryRatio)*100)/100),left:this.e.leftStart+Math.round(2*this.e.computedXRadius-this.currWidth/2)+"px",top:this.e.topStart+Math.round(this.e.verticalAlign*(-this.currHeight)/2)+"px"})}else{if(this.jSet.css("opacity")!=0){this.jSet.css({width:0,height:0,zIndex:0,opacity:0})}}}}},reset:function(){this.image.unbind(".aceCarouselElement");if(this.oldImage!=null){this.oldImage.remove();this.oldImage=null}try{if(typeof this.cssClasses=="object"&&this.cssClasses!=null){this.jSet.removeClass(this.cssClasses.element);this.jSet.removeClass(this.cssClasses.elementCurrent);this.jSet.removeClass(this.cssClasses.elementOver);this.jSet.removeClass(this.cssClasses.elementLoading);this.reflectionBox.removeClass(this.cssClasses.reflectionBox);this.imageBox.removeClass(this.cssClasses.imageBox)}}catch(c){}this.scale=1;this.image.css({width:"auto",height:"auto"});this.origWidth=0;this.origHeight=0},destroy:function(){this.imageBox.unbind(".aceCarouselElement");this.reset();for(var c in this.recoverStyles){this[c].removeAttr("style");if(typeof this.recoverStyles[c]=="string"&&this.recoverStyles[c]!=""){this[c].attr("style",this.recoverStyles[c])}}if(typeof this.reflection=="object"&&this.reflection instanceof a&&this.reflection.length>0){this.reflection.remove()}if(typeof this.reflectionBox=="object"&&this.reflectionBox instanceof a&&this.reflectionBox.length>0){this.reflectionBox.remove()}this.reflectionBox=null;this.reflection=null;if(this.removeIBoxOnDestroy==true){this.image.appendTo(this.jSet);this.imageBox.remove()}this.imageBox=null;this.image=null;this.jSet=null;this.parent=null}};return b};ace.Carousel.Element=ace.Carousel.Element();ace.Carousel.defaults={boxes:">div:has(img)",lateloadKey:"_lateload:",startIndex:0,selectedPos:"auto",loop:true,reflect:{opacity:0.5,height:0.5},stepDistance:135,showElements:"auto",purgatoryRatio:0.5,track:"ellipse",archFactor:0.25,yRadius:"auto",zoomFactor:0.6,verticalAlign:"bottom",innerMargins:{top:0,left:0,bottom:0,right:0},cssClasses:{reflection:"carousel-reflection",reflectionBox:"carousel-reflection-box",imageBox:"carousel-image-box",element:"carousel-element",elementCurrent:"carousel-element-current",elementOver:"carousel-element-over",elementLoading:"carousel-element-loading"},easing:"swing",duration:750};a.fn.carousel=ace.plugin(ace.Carousel,["revolveTo","revolveBy","prev","next","setOptions","resetOptions","destroy","refresh","getSelectedIndex","getCurrentElement","getElement"]);ace.CarouselWithCaption=function(){var b=ace.Carousel;var c=function(e,d){this.jSet=e;this.options=a.extend(true,{},c.defaults,d);this.init();return this};c.prototype={refresh:function(){this.e.caption=this.options.caption;this.e.captionScreen=this.options.captionScreen;if(typeof this.e.captionScreen=="string"){this.e.captionScreen=this.jSet.find(this.e.captionScreen);if(this.e.captionScreen.length==0){this.e.captionScreen=this.options.captionScreen}}if(typeof this.e.captionScreen=="string"||!(this.e.captionScreen instanceof a)){this.e.captionScreen=a(this.options.captionScreen)}if(this.e.captionScreen.length>1){this.e.captionScreen=this.e.captionScreen.eq(0)}b.prototype.refresh.apply(this)},initElements:function(){var d=this;this.jSet.find(this.options.boxes).each(function(f){var g=new ace.CarouselWithCaption.Element(a(this),d);g.index=f;d.Elements.push(g)})},destroy:function(){b.prototype.destroy.apply(this)}};c.DOM_KEY="_ace_carousel_with_caption";ace.extendClass(b,c);return c};ace.CarouselWithCaption=ace.CarouselWithCaption();ace.CarouselWithCaption.Element=function(){var b=ace.Carousel.Element;var c=function(e,d){b.apply(this,arguments)};c.prototype={refresh:function(){b.prototype.refresh.apply(this);this.caption=typeof this.e.caption=="function"?this.e.caption.call(this,this.jSet):this.jSet.find(this.e.caption);this.recoverStyles.caption=this.caption.attr("style");this.caption.css({display:"none"})},mark:function(){this.e.captionScreen.hide().html(this.caption.html()).fadeIn();b.prototype.mark.apply(this)},unmark:function(){this.e.captionScreen.fadeOut().html("");b.prototype.unmark.apply(this)}};ace.extendClass(b,c);return c};ace.CarouselWithCaption.Element=ace.CarouselWithCaption.Element();ace.CarouselWithCaption.defaults=a.extend(true,{},ace.Carousel.defaults,{caption:".caption",captionScreen:".captionScreen"});a.fn.carouselWithCaption=ace.plugin(ace.CarouselWithCaption,["revolveTo","revolveBy","prev","next","setOptions","resetOptions","destroy","refresh","getSelectedIndex","getCurrentElement","getElement"]);ace.CarouselWithMenu=function(){var b=ace.Carousel;var c=function(e,d){this.jSet=e;this.options=a.extend(true,{},c.defaults,d);this.init();return this};c.prototype={init:function(){this.Menu=null;this.prevButton=null;this.nextButton=null;b.prototype.init.apply(this)},updateWidth:function(){b.prototype.updateWidth.apply(this);this.getMenu();this.settleMenu()},getMenu:function(){if(typeof this.Menu=="object"&&this.Menu!=null&&this.Menu instanceof a){return this.Menu}var e="";if(typeof this.options.menuIndexes=="function"){for(var f=0;f<this.Elements.length;f++){e+='<a href="#'+this.options.menuFakeAnchorString+f+'">'+this.options.menuIndexes(f)+"</a>"}}else{for(var f=0;f<this.Elements.length;f++){e+='<a href="#'+this.options.menuFakeAnchorString+f+'">'+f+"</a>"}}if(this.Elements.length>1){e='<a href="#'+this.options.menuFakeAnchorString+'prev">'+this.options.menuPrevLabel+"</a>"+e+'<a href="#'+this.options.menuFakeAnchorString+'next">'+this.options.menuNextLabel+"</a>"}e="<div>"+e+"</div>";var d=this,g=new RegExp("^.*#"+this.options.menuFakeAnchorString,"gi");this.Menu=a(e);this.prevButton=this.Menu.find("a[href*=#"+this.options.menuFakeAnchorString+"prev]:first").bind("click",function(h){h.preventDefault();if(d.hasPrev()){d.prev()}});this.nextButton=this.Menu.find("a[href*=#"+this.options.menuFakeAnchorString+"next]:first").bind("click",function(h){h.preventDefault();if(d.hasNext()){d.next()}});this.Menu.find("a").not(this.prevButton).not(this.nextButton).bind("click",function(h){h.preventDefault();h.carouselMenuClicked=true;d.Elements[+a(this).attr("href").replace(g,"")].imageBox.trigger(h)});this.Menu.addClass(this.options.cssClasses.menuBox).appendTo(this.jSet);this.jSet.bind("carouselAnimationStart",function(h){try{d.Menu.find("a").removeClass(d.e.cssClasses.menuElementCurrent)}catch(h){}}).bind("carouselSelectIndex",function(h){try{d.Menu.find("a[href$=#"+d.options.menuFakeAnchorString+h.carouselSelectedIndex+"]:first").addClass(d.e.cssClasses.menuElementCurrent);d.nextButton[d.hasNext()?"removeClass":"addClass"](d.e.cssClasses.menuNextPrevDisabled);d.prevButton[d.hasPrev()?"removeClass":"addClass"](d.e.cssClasses.menuNextPrevDisabled)}catch(h){}}).bind("resize.aceCarouselWithMenu",function(h){d.settleMenu()});return this.Menu},settleMenu:function(){if(typeof this.Menu!="object"||!this.Menu instanceof a||this.Menu.parent()[0]!=this.jSet[0]){return}var d={position:"absolute"};if(this.options.centerMenu=="horizontal"||this.options.centerMenu=="both"){d.left=Math.round((this.jSet.width()-this.Menu.outerWidth(true))/2)+"px"}if(this.options.centerMenu=="vertical"||this.options.centerMenu=="both"){d.top=Math.round((this.jSet.height()-this.Menu.outerHeight(true))/2)+"px"}this.Menu.css(d)},destroyMenu:function(){this.Menu.remove();this.Menu=null;this.prevButton=null;this.nextButton=null},destroy:function(){this.destroyMenu();b.prototype.destroy.apply(this)}};c.DOM_KEY="_ace_carousel_with_menu";ace.extendClass(b,c);return c};ace.CarouselWithMenu=ace.CarouselWithMenu();ace.CarouselWithMenu.defaults=a.extend(true,{},ace.Carousel.defaults,{centerMenu:"horizontal",menuNextLabel:">",menuPrevLabel:"<",menuIndexes:function(b){return b+1},menuFakeAnchorString:"carousel-",cssClasses:{menuBox:"carousel-menu-box",menuElementCurrent:"carousel-menu-element-current",menuNextPrevDisabled:"carousel-menu-element-disabled"}});a.fn.carouselWithMenu=ace.plugin(ace.CarouselWithMenu,["revolveTo","revolveBy","prev","next","setOptions","resetOptions","destroy","refresh","getSelectedIndex","getCurrentElement","getElement","getMenu","destroyMenu"]);ace.CarouselWithCaptionAndMenu=function(){var c=ace.CarouselWithCaption;var b=[ace.CarouselWithMenu];var d=function(f,e){this.jSet=f;this.options=a.extend(true,{},d.defaults,e);this.init();return this};d.prototype={init:function(){this.Menu=null;c.prototype.init.apply(this)},updateWidth:function(){c.prototype.updateWidth.apply(this);this.getMenu();this.settleMenu()},destroy:function(){this.destroyMenu();c.prototype.destroy.apply(this)}};d.DOM_KEY="_ace_carousel_with_caption_and_menu";ace.extendClass(c,d,b);return d};ace.CarouselWithCaptionAndMenu=ace.CarouselWithCaptionAndMenu();ace.CarouselWithCaptionAndMenu.defaults=a.extend(true,{},ace.CarouselWithCaption.defaults,ace.CarouselWithMenu.defaults);a.fn.carouselWithCaptionAndMenu=ace.plugin(ace.CarouselWithCaptionAndMenu,["revolveTo","revolveBy","prev","next","setOptions","resetOptions","destroy","refresh","getSelectedIndex","getCurrentElement","getElement","getMenu","destroyMenu"])})(jQuery);
