(function(l){function ka(a,c){return{anims:[],duration:a,orgDuration:a,easing:c,startTime:K()}}function aa(a){v(a.pre)&&aa(a.pre);for(var c=0,d=a.anims.length;c<d;c++){var k=a.anims[c];k&&(k[3]&&k[0].stop(),k[0].animate(k[1],{complete:k[2],duration:a.duration,easing:a.easing}))}v(a.post)&&aa(a.post)}function la(a,c){u(c)||(c=!0);v(a.pre)&&la(a.pre,c);for(var d=0,k=a.anims.length;d<k;d++){var e=a.anims[d];e[0].stop(!0);if(c&&(e[0].css(e[1]),t(e[2])))e[2]()}v(a.post)&&la(a.post,c)}function Da(a,c,d){c&&
c.remove();switch(d.fx){case "fade":case "crossfade":case "cover-fade":case "uncover-fade":a.css("filter","")}}function ma(a,c,d,k,e){c[d]&&c[d].call(a,k);if(e[d].length){c=0;for(var m=e[d].length;c<m;c++)e[d][c].call(a,k)}return[]}function Ea(a,c,d){c.length&&(a.trigger(e(c[0][0],d),c[0][1]),c.shift());return c}function Fa(a){a.each(function(){var a=l(this);a.data("_cfs_isHidden",a.is(":hidden")).hide()})}function Ga(a){a&&a.each(function(){var a=l(this);a.data("_cfs_isHidden")||a.show()})}function ea(a){a.auto&&
clearTimeout(a.auto);a.progress&&clearInterval(a.progress);return a}function Ha(a,c,d,k,e,m,g){return{width:g.width,height:g.height,items:{old:a,skipped:c,visible:d,"new":d},scroll:{items:k,direction:e,duration:m}}}function Ia(a,c,d,k){var e=a.duration;if("none"==a.fx)return 0;"auto"==e?e=c.scroll.duration/c.scroll.items*d:10>e&&(e=k/e);if(1>e)return 0;"fade"==a.fx&&(e/=2);return Math.round(e)}function sa(a,c,d){var k=q(a.items.minimum)?a.items.minimum:a.items.visible+1;"show"==c||"hide"==c||(k>c?
    (w(d,"Not enough items ("+c+" total, "+k+" needed): Hiding navigation."),c="hide"):c="show");k="show"==c?"removeClass":"addClass";d=F("hidden",d);if(a.auto.button)a.auto.button[c]()[k](d);if(a.prev.button)a.prev.button[c]()[k](d);if(a.next.button)a.next.button[c]()[k](d);if(a.pagination.container)a.pagination.container[c]()[k](d)}function fa(a,c,d){if(!a.circular&&!a.infinite){var k="removeClass"==c||"addClass"==c?c:!1;d=F("disabled",d);if(a.auto.button&&k)a.auto.button[k](d);if(a.prev.button)a.prev.button[k||
    0==c?"addClass":"removeClass"](d);a.next.button&&(c=k||c==a.items.visible?"addClass":"removeClass",a.next.button[c](d))}}function na(a,c){t(c)?c=c.call(a):y(c)&&(c={});return c}function ta(a,c){c=na(a,c);if(s(c)){var d=oa(c);c=-1==d?l(c):d}return c}function Ja(a,c){c=ta(a,c);B(c)?c={button:c}:q(c)&&(c={key:c});return c}function Ka(a,c){t(c.button)&&(c.button=c.button.call(a));s(c.button)&&(c.button=l(c.button));s(c.key)&&(c.key=oa(c.key));return c}function P(a,c,d,k,e){s(a)&&(a=l(a,e));v(a)&&(a=l(a,
    e));B(a)?(a=e.children().index(a),u(d)||(d=!1)):u(d)||(d=!0);q(a)||(a=0);q(c)||(c=0);d&&(a+=k.first);a+=c;if(0<k.total){for(;a>=k.total;)a-=k.total;for(;0>a;)a+=k.total}return a}function ua(a,c,d){for(var k=0,e=0;0<=d;d--){var m=a.eq(d),k=k+(m.is(":visible")?m[c.d.outerWidth](!0):0);if(k>c.maxDimension)return e;0==d&&(d=a.length);e++}}function La(a,c,d,k){for(var e=0,m=0,g=a.length;0<=k;k--){m++;if(m==g||a.eq(k).is(c)&&(e++,e==d))return m;0==k&&(k=g)}}function Ma(a,c){return c.items.visibleConf.org||
    a.children().slice(0,c.items.visible).filter(c.items.filter).length}function ca(a,c,d){for(var k=0,e=0,m=a.length-1;d<=m;d++){var g=a.eq(d),k=k+(g.is(":visible")?g[c.d.outerWidth](!0):0);if(k>c.maxDimension)return e;e++;if(e==m+1)return e;d==m&&(d=-1)}}function Na(a,c,d,k){a=ca(a,c,d);c.circular||d+a>k&&(a=k-d);return a}function pa(a,c,d){return Oa(a,c.items.filter,c.items.visibleConf.org,d,c.circular)}function Oa(a,c,d,k){for(var e=0,m=0,g=a.length-1;k<=g;k++){m++;if(m>=g||a.eq(k).is(c)&&(e++,e==
    d))return m;k==g&&(k=-1)}}function ga(a,c){return a.slice(0,c.items.visible)}function va(a,c,d){c.usePadding&&(s(d)||(d="_cfs_origCssMargin"),a.each(function(){var a=l(this),e=parseInt(a.css(c.d.marginRight),10);q(e)||(e=0);a.data(d,e)}))}function L(a,c,d){if(c.usePadding){var k=u(d)?d:!1;q(d)||(d=0);va(a,c,"_cfs_tempCssMargin");a.each(function(){var a=l(this);a.css(c.d.marginRight,k?a.data("_cfs_tempCssMargin"):d+a.data("_cfs_origCssMargin"))})}}function Pa(a,c){c.responsive&&a.each(function(){var a=
    l(this),c=Qa(a,["width","height"]);a.data("_cfs_origCssSizes",c)})}function Ra(a,c){var d=a.items[a.d.width],k=a[a.d.height],e=qa(k);c.each(function(){var c=l(this),g=d-(c[a.d.outerWidth](!0)-c[a.d.width]());c[a.d.width](g);if(e)c[a.d.height](wa(g,k))})}function xa(a,c){var d=a.parent(),k=a.children(),e=ga(k,c),m=ya(za(e,c,!0),c,!1);d.css(m);if(c.usePadding){var d=c.padding,g=d[c.d[1]];c.align&&0>g&&(g=0);e=e.last();e.css(c.d.marginRight,e.data("_cfs_origCssMargin")+g);a.css(c.d.top,d[c.d[0]]);a.css(c.d.left,
    d[c.d[3]])}a.css(c.d.width,m[c.d.width]+2*ba(k,c,"width"));a.css(c.d.height,Sa(k,c,"height"));return m}function za(a,c,d){return[ba(a,c,"width",d),Sa(a,c,"height",d)]}function Sa(a,c,d,e){u(e)||(e=!1);if(q(c[c.d[d]])&&e)return c[c.d[d]];if(q(c.items[c.d[d]]))return c.items[c.d[d]];d=-1<d.toLowerCase().indexOf("width")?"outerWidth":"outerHeight";return ra(a,c,d)}function ra(a,c,d){for(var e=0,l=0,m=a.length;l<m;l++){var g=a.eq(l),g=g.is(":visible")?g[c.d[d]](!0):0;e<g&&(e=g)}return e}function ba(a,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        c,d,e){u(e)||(e=!1);if(q(c[c.d[d]])&&e)return c[c.d[d]];if(q(c.items[c.d[d]]))return c.items[c.d[d]]*a.length;d=-1<d.toLowerCase().indexOf("width")?"outerWidth":"outerHeight";for(var l=e=0,m=a.length;l<m;l++){var g=a.eq(l);e+=g.is(":visible")?g[c.d[d]](!0):0}return e}function Ta(a,c,d){var e=a.is(":visible");e&&a.hide();c=a.parent()[c.d[d]]();e&&a.show();return c}function Ua(a,c,d){for(var e=!1,l=!1,m=0,g=a.length;m<g;m++){var q=a.eq(m),q=q.is(":visible")?q[c.d[d]](!0):0;!1===e?e=q:e!=q&&(l=!0);0==
    e&&(l=!0)}return l}function wa(a,c){if(qa(c)){c=parseInt(c.slice(0,-1),10);if(!q(c))return a;a*=c/100}return a}function e(a,c,d,e,l){u(d)||(d=!0);u(e)||(e=!0);u(l)||(l=!1);d&&(a=c.events.prefix+a);e&&(a=a+"."+c.events.namespace);e&&l&&(a+=c.serialNumber);return a}function F(a,c){return s(c.classnames[a])?c.classnames[a]:a}function ya(a,c,d){u(d)||(d=!0);d=c.usePadding&&d?c.padding:[0,0,0,0];var e={};e[c.d.width]=a[0]+d[1]+d[3];e[c.d.height]=a[1]+d[0]+d[2];return e}function M(a,c){for(var d=[],e=0,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 l=a.length;e<l;e++)for(var m=0,g=c.length;m<g;m++)if(-1<c[m].indexOf(typeof a[e])&&y(d[m])){d[m]=a[e];break}return d}function $a(a){if(y(a))return[0,0,0,0];if(q(a))return[a,a,a,a];s(a)&&(a=a.split("px").join("").split("em").join("").split(" "));if(!H(a))return[0,0,0,0];for(var c=0;4>c;c++)a[c]=parseInt(a[c],10);switch(a.length){case 0:return[0,0,0,0];case 1:return[a[0],a[0],a[0],a[0]];case 2:return[a[0],a[1],a[0],a[1]];case 3:return[a[0],a[1],a[2],a[1]];default:return[a[0],a[1],a[2],a[3]]}}function Aa(a,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            c){var d=q(c[c.d.width])?Math.ceil(c[c.d.width]-ba(a,c,"width")):0;switch(c.align){case "left":return[0,d];case "right":return[d,0];default:return[Math.ceil(d/2),Math.floor(d/2)]}}function Ba(a,c,d,e){c=a;if(t(d))c=d.call(e,c);else if(s(d)){c=d.split("+");var l=d.split("-");l.length>c.length?(d=!0,e=l[0],l=l[1]):(d=!1,e=c[0],l=c[1]);switch(e){case "even":c=1==a%2?a-1:a;break;case "odd":c=0==a%2?a-1:a;break;default:c=a}l=parseInt(l,10);q(l)&&(d&&(l=-l),c+=l)}if(!q(c)||1>c)c=1;return c}function Z(a,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                c,d,e){return Va(Ba(a,c,d,e),c.items.visibleConf)}function Va(a,c){q(c.min)&&a<c.min&&(a=c.min);q(c.max)&&a>c.max&&(a=c.max);1>a&&(a=1);return a}function Wa(a){H(a)||(a=[[a]]);H(a[0])||(a=[a]);for(var c=0,d=a.length;c<d;c++)s(a[c][0])&&(a[c][0]=l(a[c][0])),u(a[c][1])||(a[c][1]=!0),u(a[c][2])||(a[c][2]=!0),q(a[c][3])||(a[c][3]=0);return a}function oa(a){return"right"==a?39:"left"==a?37:"up"==a?38:"down"==a?40:-1}function Xa(a,c,d){a&&(c=c.triggerHandler(e("currentPosition",d)),l.fn.carouFredSel.cookie.set(a,
    c))}function ab(a){a=l.fn.carouFredSel.cookie.get(a);return""==a?0:a}function Qa(a,c){for(var d={},e,l=0,m=c.length;l<m;l++)e=c[l],d[e]=a.css(e);return d}function Ya(a,c){var d=Aa(ga(c,a),a);a.padding[a.d[1]]=d[1];a.padding[a.d[3]]=d[0];return a}function Za(a,c){var d=Va(Math.ceil(a[a.d.width]/a.items[a.d.width]),a.items.visibleConf);d>c.length&&(d=c.length);var e=Math.floor(a[a.d.width]/d);a.items.visible=d;a.items[a.d.width]=e;a[a.d.width]=d*e;return a}function Y(a){if(s(a)){var c=-1<a.indexOf("immediate")?
    !0:!1;a=-1<a.indexOf("resume")?!0:!1}else c=a=!1;return[c,a]}function y(a){return null===a||"undefined"==typeof a||""===a||"undefined"===a}function H(a){return a instanceof Array}function B(a){return a instanceof jQuery}function v(a){return(a instanceof Object||"object"==typeof a)&&null!==a&&!B(a)&&!H(a)}function q(a){return(a instanceof Number||"number"==typeof a)&&!isNaN(a)}function s(a){return(a instanceof String||"string"==typeof a)&&!y(a)&&!$(a)&&!(!1===a||"false"===a)}function t(a){return a instanceof
    Function||"function"==typeof a}function u(a){return a instanceof Boolean||"boolean"==typeof a||$(a)||!1===a||"false"===a}function $(a){return!0===a||"true"===a}function qa(a){return s(a)&&"%"==a.slice(-1)}function K(){return(new Date).getTime()}function I(a,c){w(!0,a+" is DEPRECATED, support for it will be removed. Use "+c+" instead.")}function w(a,c){if(v(a)){var d=" ("+a.selector+")";a=a.debug}else d="";if(!a)return!1;c=s(c)?"carouFredSel"+d+": "+c:["carouFredSel"+d+":",c];window.console&&window.console.log&&
window.console.log(c);return!1}l.fn.carouFredSel||(l.fn.caroufredsel=l.fn.carouFredSel=function(a,c){if(0==this.length)return w(!0,'No element found for "'+this.selector+'".'),this;if(1<this.length)return this.each(function(){l(this).carouFredSel(a,c)});var d=this,k=this[0],z=!1;d.data("_cfs_isCarousel")&&(z=d.triggerHandler("_cfs_triggerEvent","currentPosition"),d.trigger("_cfs_triggerEvent",["destroy",!0]));d._cfs_init=function(a,c,j){var e=a=na(k,a),f=a.items,f=na(k,f);q(f)?f={visible:f}:"variable"==
    f?f={visible:f,width:f,height:f}:v(f)||(f={});e.items=f;e=a;f=a.scroll;f=na(k,f);q(f)?f=50>=f?{items:f}:{duration:f}:s(f)?f={easing:f}:v(f)||(f={});e.scroll=f;e=a;f=a.auto;f=ta(k,f);B(f)?f={button:f}:u(f)?f={play:f}:q(f)&&(f={timeoutDuration:f});if(f.progress&&(s(f.progress)||B(f.progress)))f.progress={bar:f.progress};e.auto=f;a.prev=Ja(k,a.prev);a.next=Ja(k,a.next);e=a;f=a.pagination;f=ta(k,f);B(f)?f={container:f}:u(f)&&(f={keys:f});e.pagination=f;e=a;f=a.swipe;t(f)&&(f=f.call(k));y(f)&&(f={onTouch:!1});
    $(f)?f={onTouch:f}:q(f)&&(f={items:f});e.swipe=f;e=a;f=a.mousewheel;t(f)&&(f=f.call(k));$(f)?f={}:q(f)?f={items:f}:y(f)&&(f=!1);e.mousewheel=f;c&&(ha=l.extend(!0,{},l.fn.carouFredSel.defaults,a));a=b=l.extend(!0,{},l.fn.carouFredSel.defaults,a);c=[["width","innerWidth","outerWidth","height","innerHeight","outerHeight","left","top","marginRight",0,1,2,3],["height","innerHeight","outerHeight","width","innerWidth","outerWidth","top","left","marginBottom",3,2,1,0]];for(var e=c[0].length,f="right"==b.direction||
        "left"==b.direction?0:1,g={},r=0;r<e;r++)g[c[0][r]]=c[f][r];a.d=g;m.direction="up"==b.direction||"left"==b.direction?"next":"prev";a=d.children();c=Ta(C,b,"width");$(b.cookie)&&(b.cookie="caroufredsel_cookie_"+h.serialNumber);b.maxDimension=q(b[b.d.width])?b[b.d.width]:c;e=b;f=b.items;g=b;v(f.visibleConf)||(f.visibleConf={});v(f.sizesConf)||(f.sizesConf={});0==f.start&&q(j)&&(f.start=j);v(f.visible)?(f.visibleConf.min=f.visible.min,f.visibleConf.max=f.visible.max,f.visible=!1):s(f.visible)?("variable"==
        f.visible?f.visibleConf.variable=!0:f.visibleConf.adjust=f.visible,f.visible=!1):t(f.visible)&&(f.visibleConf.adjust=f.visible,f.visible=!1);s(f.filter)||(f.filter=0<a.filter(":hidden").length?":visible":"*");f[g.d.width]||(g.responsive?(w(!0,"Set a "+g.d.width+" for the items!"),f[g.d.width]=ra(a,g,"outerWidth")):f[g.d.width]=Ua(a,g,"outerWidth")?"variable":a[g.d.outerWidth](!0));f[g.d.height]||(f[g.d.height]=Ua(a,g,"outerHeight")?"variable":a[g.d.outerHeight](!0));f.sizesConf.width=f.width;f.sizesConf.height=
        f.height;e.items=f;j=b;e=b.d.width;f=b[b.d.width];"auto"==f&&(f=ra(a,b,"outerWidth"));j[e]=f;j=b;e=b.d.height;f=b[b.d.height];g=b;"auto"==f&&(f=ra(a,g,"outerHeight"));f||(f=g.items[g.d.height]);j[e]=f;b.responsive&&(qa(b[b.d.width])||(b[b.d.width]="100%"));qa(b[b.d.width])&&(m.upDateOnWindowResize=!0,m.primarySizePercentage=b[b.d.width],b[b.d.width]=wa(c,m.primarySizePercentage),b.items.visible||(b.items.visibleConf.variable=!0));if(b.responsive)b.usePadding=!1,b.padding=[0,0,0,0],b.align=!1,b.items.visibleConf.variable=
        !1;else{if(!b.items.visible){j=b;"variable"==j.items[j.d.width]&&(j.items.visibleConf.variable=!0);if(!j.items.visibleConf.variable&&(q(j[j.d.width])?j.items.visible=Math.floor(j[j.d.width]/j.items[j.d.width]):(j.items.visible=Math.floor(c/j.items[j.d.width]),j[j.d.width]=j.items.visible*j.items[j.d.width],j.items.visibleConf.adjust||(j.align=!1)),"Infinity"==j.items.visible||1>j.items.visible))w(!0,'Not a valid number of visible items: Set to "variable".'),j.items.visibleConf.variable=!0;b=j}b[b.d.width]||
    (!b.items.visibleConf.variable&&q(b.items[b.d.width])&&"*"==b.items.filter?(b[b.d.width]=b.items.visible*b.items[b.d.width],b.align=!1):b[b.d.width]="variable");y(b.align)&&(b.align=q(b[b.d.width])?"center":!1);b.items.visibleConf.variable&&(b.items.visible=ca(a,b,0))}"*"!=b.items.filter&&!b.items.visibleConf.variable&&(b.items.visibleConf.org=b.items.visible,b.items.visible=pa(a,b,0));b.items.visible=Z(b.items.visible,b,b.items.visibleConf.adjust,k);b.items.visibleConf.old=b.items.visible;if(b.responsive)b.items.visibleConf.min||
        (b.items.visibleConf.min=b.items.visible),b.items.visibleConf.max||(b.items.visibleConf.max=b.items.visible),b=Za(b,a,c);else switch(b.padding=$a(b.padding),"top"==b.align?b.align="left":"bottom"==b.align&&(b.align="right"),b.align){case "center":case "left":case "right":"variable"!=b[b.d.width]&&(b=Ya(b,a),b.usePadding=!0);break;default:b.align=!1,b.usePadding=0==b.padding[0]&&0==b.padding[1]&&0==b.padding[2]&&0==b.padding[3]?!1:!0}q(b.scroll.duration)||(b.scroll.duration=500);y(b.scroll.items)&&
    (b.scroll.items=b.responsive||b.items.visibleConf.variable||"*"!=b.items.filter?"visible":b.items.visible);b.auto=l.extend(!0,{},b.scroll,b.auto);b.prev=l.extend(!0,{},b.scroll,b.prev);b.next=l.extend(!0,{},b.scroll,b.next);b.pagination=l.extend(!0,{},b.scroll,b.pagination);j=b;a=b.auto;t(a.button)&&(a.button=a.button.call(k));s(a.button)&&(a.button=l(a.button));u(a.play)||(a.play=!0);q(a.delay)||(a.delay=0);y(a.pauseOnEvent)&&(a.pauseOnEvent=!0);u(a.pauseOnResize)||(a.pauseOnResize=!0);q(a.timeoutDuration)||
    (a.timeoutDuration=10>a.duration?2500:5*a.duration);a.progress&&(t(a.progress.bar)&&(a.progress.bar=a.progress.bar.call(k)),s(a.progress.bar)&&(a.progress.bar=l(a.progress.bar)),a.progress.bar?(t(a.progress.updater)||(a.progress.updater=l.fn.carouFredSel.progressbarUpdater),q(a.progress.interval)||(a.progress.interval=50)):a.progress=!1);j.auto=a;b.prev=Ka(k,b.prev);b.next=Ka(k,b.next);j=b;a=b.pagination;t(a.container)&&(a.container=a.container.call(k));s(a.container)&&(a.container=l(a.container));
    q(a.items)||(a.items=!1);u(a.keys)||(a.keys=!1);if(!t(a.anchorBuilder)&&!(!1===a.anchorBuilder||"false"===a.anchorBuilder))a.anchorBuilder=l.fn.carouFredSel.pageAnchorBuilder;q(a.deviation)||(a.deviation=0);j.pagination=a;j=b;a=b.swipe;u(a.onTouch)||(a.onTouch=!0);u(a.onMouse)||(a.onMouse=!1);v(a.options)||(a.options={});u(a.options.triggerOnTouchEnd)||(a.options.triggerOnTouchEnd=!1);j.swipe=a;b.mousewheel=b.mousewheel;b.synchronise&&(b.synchronise=Wa(b.synchronise));b.auto.onPauseStart&&(b.auto.onTimeoutStart=
        b.auto.onPauseStart,I("auto.onPauseStart","auto.onTimeoutStart"));b.auto.onPausePause&&(b.auto.onTimeoutPause=b.auto.onPausePause,I("auto.onPausePause","auto.onTimeoutPause"));b.auto.onPauseEnd&&(b.auto.onTimeoutEnd=b.auto.onPauseEnd,I("auto.onPauseEnd","auto.onTimeoutEnd"));b.auto.pauseDuration&&(b.auto.timeoutDuration=b.auto.pauseDuration,I("auto.pauseDuration","auto.timeoutDuration"))};d._cfs_build=function(){d.data("_cfs_isCarousel",!0);var a=d.children(),c=Qa(d,"textAlign float position top right bottom left zIndex width height marginTop marginRight marginBottom marginLeft".split(" ")),
    e="relative";switch(c.position){case "absolute":case "fixed":e=c.position}C.css(c).css({overflow:"hidden",position:e});d.data("_cfs_origCss",c).css({textAlign:"left","float":"none",position:"absolute",top:0,right:"auto",bottom:"auto",left:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0});va(a,b);Pa(a,b);b.responsive&&Ra(b,a)};d._cfs_bind_events=function(){d._cfs_unbind_events();d.bind(e("stop",h),function(a,c){a.stopPropagation();m.isStopped||b.auto.button&&b.auto.button.addClass(F("stopped",
    h));m.isStopped=!0;b.auto.play&&(b.auto.play=!1,d.trigger(e("pause",h),c));return!0});d.bind(e("finish",h),function(b){b.stopPropagation();m.isScrolling&&la(p);return!0});d.bind(e("pause",h),function(a,d,c){a.stopPropagation();A=ea(A);d&&m.isScrolling&&(p.isStopped=!0,a=K()-p.startTime,p.duration-=a,p.pre&&(p.pre.duration-=a),p.post&&(p.post.duration-=a),la(p,!1));!m.isPaused&&!m.isScrolling&&c&&(A.timePassed+=K()-A.startTime);m.isPaused||b.auto.button&&b.auto.button.addClass(F("paused",h));m.isPaused=
    !0;b.auto.onTimeoutPause&&(c=b.auto.timeoutDuration-A.timePassed,a=100-Math.ceil(100*c/b.auto.timeoutDuration),b.auto.onTimeoutPause.call(k,a,c));return!0});d.bind(e("play",h),function(a,c,j,g){a.stopPropagation();A=ea(A);g=M([c,j,g],["string","number","boolean"]);c=g[0];j=g[1];g=g[2];"prev"!=c&&"next"!=c&&(c=m.direction);q(j)||(j=0);u(g)||(g=!1);g&&(m.isStopped=!1,b.auto.play=!0);if(!b.auto.play)return a.stopImmediatePropagation(),w(h,"Carousel stopped: Not scrolling.");m.isPaused&&b.auto.button&&
(b.auto.button.removeClass(F("stopped",h)),b.auto.button.removeClass(F("paused",h)));m.isPaused=!1;A.startTime=K();var f=b.auto.timeoutDuration+j;dur2=f-A.timePassed;perc=100-Math.ceil(100*dur2/f);b.auto.progress&&(A.progress=setInterval(function(){var a=K()-A.startTime+A.timePassed,a=Math.ceil(100*a/f);b.auto.progress.updater.call(b.auto.progress.bar[0],a)},b.auto.progress.interval));A.auto=setTimeout(function(){b.auto.progress&&b.auto.progress.updater.call(b.auto.progress.bar[0],100);b.auto.onTimeoutEnd&&
b.auto.onTimeoutEnd.call(k,perc,dur2);m.isScrolling?d.trigger(e("play",h),c):d.trigger(e(c,h),b.auto)},dur2);b.auto.onTimeoutStart&&b.auto.onTimeoutStart.call(k,perc,dur2);return!0});d.bind(e("resume",h),function(b){b.stopPropagation();p.isStopped?(p.isStopped=!1,m.isPaused=!1,m.isScrolling=!0,p.startTime=K(),aa(p)):d.trigger(e("play",h));return!0});d.bind(e("prev",h)+" "+e("next",h),function(a,c,j,n,f){a.stopPropagation();if(m.isStopped||d.is(":hidden"))return a.stopImmediatePropagation(),w(h,"Carousel stopped or hidden: Not scrolling.");
    var x=q(b.items.minimum)?b.items.minimum:b.items.visible+1;if(x>g.total)return a.stopImmediatePropagation(),w(h,"Not enough items ("+g.total+" total, "+x+" needed): Not scrolling.");var r=M([c,j,n,f],["object","number/string","function","boolean"]);c=r[0];j=r[1];n=r[2];f=r[3];x=a.type.slice(h.events.prefix.length);v(c)||(c={});t(n)&&(c.onAfter=n);u(f)&&(c.queue=f);c=l.extend(!0,{},b[x],c);if(c.conditions&&!c.conditions.call(k,x))return a.stopImmediatePropagation(),w(h,'Callback "conditions" returned false.');
    if(!q(j)){if("*"!=b.items.filter)j="visible";else{var s=[j,c.items,b[x].items],r=0;for(f=s.length;r<f;r++)if(q(s[r])||"page"==s[r]||"visible"==s[r]){j=s[r];break}}switch(j){case "page":return a.stopImmediatePropagation(),d.triggerHandler(e(x+"Page",h),[c,n]);case "visible":!b.items.visibleConf.variable&&"*"==b.items.filter&&(j=b.items.visible)}}if(p.isStopped)return d.trigger(e("resume",h)),d.trigger(e("queue",h),[x,[c,j,n]]),a.stopImmediatePropagation(),w(h,"Carousel resumed scrolling.");if(0<c.duration&&
        m.isScrolling)return c.queue&&("last"==c.queue&&(X=[]),("first"!=c.queue||0==X.length)&&d.trigger(e("queue",h),[x,[c,j,n]])),a.stopImmediatePropagation(),w(h,"Carousel currently scrolling.");A.timePassed=0;d.trigger(e("slide_"+x,h),[c,j]);if(b.synchronise){a=b.synchronise;c=[c,j];n=0;for(f=a.length;n<f;n++)r=x,a[n][2]||(r="prev"==r?"next":"prev"),a[n][1]||(c[0]=a[n][0].triggerHandler("_cfs_triggerEvent",["configuration",r])),c[1]=j+a[n][3],a[n][0].trigger("_cfs_triggerEvent",["slide_"+r,c])}return!0});
    d.bind(e("slide_prev",h),function(a,c,j){a.stopPropagation();var n=d.children();if(!b.circular&&0==g.first)return b.infinite&&d.trigger(e("next",h),g.total-1),a.stopImmediatePropagation();L(n,b);if(!q(j)){if(b.items.visibleConf.variable)j=ua(n,b,g.total-1);else if("*"!=b.items.filter){var f=q(c.items)?c.items:Ma(d,b);j=La(n,b.items.filter,f,g.total-1)}else j=b.items.visible;j=Ba(j,b,c.items,k)}b.circular||g.total-j<g.first&&(j=g.total-g.first);b.items.visibleConf.old=b.items.visible;b.items.visibleConf.variable?
        (f=Z(ca(n,b,g.total-j),b,b.items.visibleConf.adjust,k),b.items.visible+j<=f&&j<g.total&&(j++,f=Z(ca(n,b,g.total-j),b,b.items.visibleConf.adjust,k)),b.items.visible=f):"*"!=b.items.filter&&(f=pa(n,b,g.total-j),b.items.visible=Z(f,b,b.items.visibleConf.adjust,k));L(n,b,!0);if(0==j)return a.stopImmediatePropagation(),w(h,"0 items to scroll: Not scrolling.");w(h,"Scrolling "+j+" items backward.");for(g.first+=j;g.first>=g.total;)g.first-=g.total;b.circular||(0==g.first&&c.onEnd&&c.onEnd.call(k,"prev"),
        b.infinite||fa(b,g.first,h));d.children().slice(g.total-j,g.total).prependTo(d);g.total<b.items.visible+j&&d.children().slice(0,b.items.visible+j-g.total).clone(!0).appendTo(d);var n=d.children(),x=n.slice(j,b.items.visibleConf.old+j);a=n.slice(0,b.items.visible);var r=n.eq(j-1),s=x.last(),u=a.last();L(n,b);var t=f=0;b.align&&(t=Aa(a,b),f=t[0],t=t[1]);var z=0>f?b.padding[b.d[3]]:0,v=!1,N=l();if(b.items.visible<j&&(N=n.slice(b.items.visibleConf.old,j),"directscroll"==c.fx)){var O=b.items[b.d.width],
        v=N,r=u;Fa(v);b.items[b.d.width]="variable"}var Q=!1,y=ba(n.slice(0,j),b,"width"),B=ya(za(a,b,!0),b,!b.usePadding),F=0,da={},K={},ia={},Ca={},H={},I={},T={},J=Ia(c,b,j,y);switch(c.fx){case "cover":case "cover-fade":F=ba(n.slice(0,b.items.visible),b,"width")}v&&(b.items[b.d.width]=O);L(n,b,!0);0<=t&&L(s,b,b.padding[b.d[1]]);0<=f&&L(r,b,b.padding[b.d[3]]);b.align&&(b.padding[b.d[1]]=t,b.padding[b.d[3]]=f);I[b.d.left]=-(y-z);T[b.d.left]=-(F-z);K[b.d.left]=B[b.d.width];var R=function(){},n=function(){},
        U=function(){},O=function(){},D=function(){},z=function(){},E=function(){},y=function(){},G=function(){},S=function(){},V=function(){};switch(c.fx){case "crossfade":case "cover":case "cover-fade":case "uncover":case "uncover-fade":Q=d.clone(!0).appendTo(C)}switch(c.fx){case "crossfade":case "uncover":case "uncover-fade":Q.children().slice(0,j).remove();Q.children().slice(b.items.visibleConf.old).remove();break;case "cover":case "cover-fade":Q.children().slice(b.items.visible).remove(),Q.css(T)}d.css(I);
        p=ka(J,c.easing);da[b.d.left]=b.usePadding?b.padding[b.d[3]]:0;if("variable"==b[b.d.width]||"variable"==b[b.d.height])R=function(){C.css(B)},n=function(){p.anims.push([C,B])};if(b.usePadding){u.not(r).length&&(ia[b.d.marginRight]=r.data("_cfs_origCssMargin"),0>f?r.css(ia):(E=function(){r.css(ia)},y=function(){p.anims.push([r,ia])}));switch(c.fx){case "cover":case "cover-fade":Q.children().eq(j-1).css(ia)}u.not(s).length&&(Ca[b.d.marginRight]=s.data("_cfs_origCssMargin"),U=function(){s.css(Ca)},O=
            function(){p.anims.push([s,Ca])});0<=t&&(H[b.d.marginRight]=u.data("_cfs_origCssMargin")+b.padding[b.d[1]],D=function(){u.css(H)},z=function(){p.anims.push([u,H])})}var V=function(){d.css(da)},M=b.items.visible+j-g.total,S=function(){0<M&&(d.children().slice(g.total).remove(),x=l(d.children().slice(g.total-(b.items.visible-M)).get().concat(d.children().slice(0,M).get())));Ga(v);if(b.usePadding){var a=d.children().eq(b.items.visible+j-1);a.css(b.d.marginRight,a.data("_cfs_origCssMargin"))}},P=Ha(x,
            N,a,j,"prev",J,B),G=function(){Da(d,Q,c);m.isScrolling=!1;W.onAfter=ma(k,c,"onAfter",P,W);X=Ea(d,X,h);m.isPaused||d.trigger(e("play",h))};m.isScrolling=!0;A=ea(A);W.onBefore=ma(k,c,"onBefore",P,W);switch(c.fx){case "none":d.css(da);R();U();D();E();V();S();G();break;case "fade":p.anims.push([d,{opacity:0},function(){R();U();D();E();V();S();p=ka(J,c.easing);p.anims.push([d,{opacity:1},G]);aa(p)}]);break;case "crossfade":d.css({opacity:0});p.anims.push([Q,{opacity:0}]);p.anims.push([d,{opacity:1},G]);
            n();U();D();E();V();S();break;case "cover":p.anims.push([Q,da,function(){U();D();E();V();S();G()}]);n();break;case "cover-fade":p.anims.push([d,{opacity:0}]);p.anims.push([Q,da,function(){d.css({opacity:1});U();D();E();V();S();G()}]);n();break;case "uncover":p.anims.push([Q,K,G]);n();U();D();E();V();S();break;case "uncover-fade":d.css({opacity:0});p.anims.push([d,{opacity:1}]);p.anims.push([Q,K,G]);n();U();D();E();V();S();break;default:p.anims.push([d,da,function(){S();G()}]),n(),O(),z(),y()}aa(p);
        Xa(b.cookie,d,h);d.trigger(e("updatePageStatus",h),[!1,B]);return!0});d.bind(e("slide_next",h),function(a,c,j){a.stopPropagation();var n=d.children();if(!b.circular&&g.first==b.items.visible)return b.infinite&&d.trigger(e("prev",h),g.total-1),a.stopImmediatePropagation();L(n,b);if(!q(j)){if("*"!=b.items.filter){var f=q(c.items)?c.items:Ma(d,b);j=Oa(n,b.items.filter,f+1,0,b.circular)-1}else j=b.items.visible;j=Ba(j,b,c.items,k)}var x=0==g.first?g.total:g.first;if(!b.circular){if(b.items.visibleConf.variable)var r=
        ca(n,b,j),f=ua(n,b,x-1);else f=r=b.items.visible;j+r>x&&(j=x-f)}b.items.visibleConf.old=b.items.visible;if(b.items.visibleConf.variable){for(r=Z(Na(n,b,j,x),b,b.items.visibleConf.adjust,k);b.items.visible-j>=r&&j<g.total;)j++,r=Z(Na(n,b,j,x),b,b.items.visibleConf.adjust,k);b.items.visible=r}else"*"!=b.items.filter&&(r=pa(n,b,j),b.items.visible=Z(r,b,b.items.visibleConf.adjust,k));L(n,b,!0);if(0==j)return a.stopImmediatePropagation(),w(h,"0 items to scroll: Not scrolling.");w(h,"Scrolling "+j+" items forward.");
        for(g.first-=j;0>g.first;)g.first+=g.total;b.circular||(g.first==b.items.visible&&c.onEnd&&c.onEnd.call(k,"next"),b.infinite||fa(b,g.first,h));g.total<b.items.visible+j&&d.children().slice(0,b.items.visible+j-g.total).clone(!0).appendTo(d);n=d.children();a=n.slice(0,b.items.visibleConf.old);var s=n.slice(j,b.items.visible+j),u=n.eq(j-1),t=a.last(),x=s.last();L(n,b);var z=f=0;b.align&&(r=Aa(s,b),f=r[0],z=r[1]);var y=!1,r=l();if(b.items.visibleConf.old<j&&(r=n.slice(b.items.visibleConf.old,j),"directscroll"==
            c.fx)){var N=b.items[b.d.width],y=r,u=t;Fa(y);b.items[b.d.width]="variable"}var O=!1,v=ba(n.slice(0,j),b,"width"),B=ya(za(s,b,!0),b,!b.usePadding),K=0,F={},H={},J={},M={},I={},P=Ia(c,b,j,v);switch(c.fx){case "uncover":case "uncover-fade":K=ba(n.slice(0,b.items.visibleConf.old),b,"width")}y&&(b.items[b.d.width]=N);b.align&&0>b.padding[b.d[1]]&&(b.padding[b.d[1]]=0);L(n,b,!0);L(t,b,b.padding[b.d[1]]);b.align&&(b.padding[b.d[1]]=z,b.padding[b.d[3]]=f);I[b.d.left]=b.usePadding?b.padding[b.d[3]]:0;var Y=
            function(){},N=function(){},T=function(){},$=function(){},R=function(){},U=function(){},D=function(){},E=function(){},G=function(){};switch(c.fx){case "crossfade":case "cover":case "cover-fade":case "uncover":case "uncover-fade":O=d.clone(!0).appendTo(C),O.children().slice(b.items.visibleConf.old).remove()}switch(c.fx){case "crossfade":case "cover":case "cover-fade":d.css("zIndex",1),O.css("zIndex",0)}p=ka(P,c.easing);F[b.d.left]=-v;H[b.d.left]=-K;0>f&&(F[b.d.left]+=f);if("variable"==b[b.d.width]||
            "variable"==b[b.d.height])Y=function(){C.css(B)},N=function(){p.anims.push([C,B])};b.usePadding&&(v=x.data("_cfs_origCssMargin"),0<=z&&(v+=b.padding[b.d[1]]),x.css(b.d.marginRight,v),u.not(t).length&&(M[b.d.marginRight]=t.data("_cfs_origCssMargin")),T=function(){t.css(M)},$=function(){p.anims.push([t,M])},x=u.data("_cfs_origCssMargin"),0<f&&(x+=b.padding[b.d[3]]),J[b.d.marginRight]=x,R=function(){u.css(J)},U=function(){p.anims.push([u,J])});var G=function(){d.css(I)},S=b.items.visible+j-g.total,E=
            function(){0<S&&d.children().slice(g.total).remove();var a=d.children().slice(0,j).appendTo(d).last();0<S&&(s=ga(n,b));Ga(y);if(b.usePadding){if(g.total<b.items.visible+j){var c=d.children().eq(b.items.visible-1);c.css(b.d.marginRight,c.data("_cfs_origCssMargin")+b.padding[b.d[3]])}a.css(b.d.marginRight,a.data("_cfs_origCssMargin"))}},V=Ha(a,r,s,j,"next",P,B),D=function(){d.css("zIndex",d.data("_cfs_origCss").zIndex);Da(d,O,c);m.isScrolling=!1;W.onAfter=ma(k,c,"onAfter",V,W);X=Ea(d,X,h);m.isPaused||
        d.trigger(e("play",h))};m.isScrolling=!0;A=ea(A);W.onBefore=ma(k,c,"onBefore",V,W);switch(c.fx){case "none":d.css(F);Y();T();R();G();E();D();break;case "fade":p.anims.push([d,{opacity:0},function(){Y();T();R();G();E();p=ka(P,c.easing);p.anims.push([d,{opacity:1},D]);aa(p)}]);break;case "crossfade":d.css({opacity:0});p.anims.push([O,{opacity:0}]);p.anims.push([d,{opacity:1},D]);N();T();R();G();E();break;case "cover":d.css(b.d.left,C[b.d.width]());p.anims.push([d,I,D]);N();T();R();E();break;case "cover-fade":d.css(b.d.left,
            C[b.d.width]());p.anims.push([O,{opacity:0}]);p.anims.push([d,I,D]);N();T();R();E();break;case "uncover":p.anims.push([O,H,D]);N();T();R();G();E();break;case "uncover-fade":d.css({opacity:0});p.anims.push([d,{opacity:1}]);p.anims.push([O,H,D]);N();T();R();G();E();break;default:p.anims.push([d,F,function(){G();E();D()}]),N(),$(),U()}aa(p);Xa(b.cookie,d,h);d.trigger(e("updatePageStatus",h),[!1,B]);return!0});d.bind(e("slideTo",h),function(a,c,j,k,f,l,m){a.stopPropagation();a=M([c,j,k,f,l,m],"string/number/object number boolean object string function".split(" "));
        f=a[3];l=a[4];m=a[5];c=P(a[0],a[1],a[2],g,d);if(0==c)return!1;v(f)||(f=!1);"prev"!=l&&"next"!=l&&(l=b.circular?c<=g.total/2?"next":"prev":0==g.first||g.first>c?"next":"prev");"prev"==l&&(c=g.total-c);d.trigger(e(l,h),[f,c,m]);return!0});d.bind(e("prevPage",h),function(b,a,c){b.stopPropagation();b=d.triggerHandler(e("currentPage",h));return d.triggerHandler(e("slideToPage",h),[b-1,a,"prev",c])});d.bind(e("nextPage",h),function(b,a,c){b.stopPropagation();b=d.triggerHandler(e("currentPage",h));return d.triggerHandler(e("slideToPage",
        h),[b+1,a,"next",c])});d.bind(e("slideToPage",h),function(a,c,j,l,f){a.stopPropagation();q(c)||(c=d.triggerHandler(e("currentPage",h)));a=b.pagination.items||b.items.visible;var k=Math.ceil(g.total/a)-1;0>c&&(c=k);c>k&&(c=0);return d.triggerHandler(e("slideTo",h),[c*a,0,!0,j,l,f])});d.bind(e("jumpToStart",h),function(b,a){b.stopPropagation();a=a?P(a,0,!0,g,d):0;a+=g.first;if(0!=a){if(0<g.total)for(;a>g.total;)a-=g.total;d.prepend(d.children().slice(a,g.total))}return!0});d.bind(e("synchronise",h),
        function(a,c){a.stopPropagation();if(c)c=Wa(c);else if(b.synchronise)c=b.synchronise;else return w(h,"No carousel to synchronise.");for(var j=d.triggerHandler(e("currentPosition",h)),g=!0,f=0,l=c.length;f<l;f++)c[f][0].triggerHandler(e("slideTo",h),[j,c[f][3],!0])||(g=!1);return g});d.bind(e("queue",h),function(b,a,c){b.stopPropagation();t(a)?a.call(k,X):H(a)?X=a:y(a)||X.push([a,c]);return X});d.bind(e("insertItem",h),function(a,c,j,k,f){a.stopPropagation();f=M([c,j,k,f],["string/object","string/number/object",
        "boolean","number"]);c=f[0];j=f[1];k=f[2];f=f[3];v(c)&&!B(c)?c=l(c):s(c)&&(c=l(c));if(!B(c)||0==c.length)return w(h,"Not a valid object.");y(j)&&(j="end");va(c,b);Pa(c,b);a=j;var m="before";"end"==j?k?(0==g.first?(j=g.total-1,m="after"):(j=g.first,g.first+=c.length),0>j&&(j=0)):(j=g.total-1,m="after"):j=P(j,f,k,g,d);f=d.children().eq(j);if(f.length)f[m](c);else w(h,"Correct insert-position not found! Appending item to the end."),d.append(c);"end"!=a&&!k&&j<g.first&&(g.first+=c.length);g.total=d.children().length;
        g.first>=g.total&&(g.first-=g.total);d.trigger(e("updateSizes",h));d.trigger(e("linkAnchors",h));return!0});d.bind(e("removeItem",h),function(a,b,c,k){a.stopPropagation();a=M([b,c,k],["string/number/object","boolean","number"]);b=a[0];c=a[1];k=a[2];if(b instanceof l&&1<b.length)return f=l(),b.each(function(){var a=d.trigger(e("removeItem",h),[l(this),c,k]);a&&(f=f.add(a))}),f;if(y(b)||"end"==b)f=d.children().last();else{b=P(b,k,c,g,d);var f=d.children().eq(b);f.length&&b<g.first&&(g.first-=f.length)}f&&
        f.length&&(f.detach(),g.total=d.children().length,d.trigger(e("updateSizes",h)));return f});d.bind(e("onBefore",h)+" "+e("onAfter",h),function(a,b){a.stopPropagation();var c=a.type.slice(h.events.prefix.length);H(b)&&(W[c]=b);t(b)&&W[c].push(b);return W[c]});d.bind(e("currentPosition",h),function(a,b){a.stopPropagation();var c=0==g.first?0:g.total-g.first;t(b)&&b.call(k,c);return c});d.bind(e("currentPage",h),function(a,c){a.stopPropagation();var d=b.pagination.items||b.items.visible,e=Math.ceil(g.total/
        d-1),d=0==g.first?0:g.first<g.total%d?0:g.first==d&&!b.circular?e:Math.round((g.total-g.first)/d);0>d&&(d=0);d>e&&(d=e);t(c)&&c.call(k,d);return d});d.bind(e("currentVisible",h),function(a,c){a.stopPropagation();var e=ga(d.children(),b);t(c)&&c.call(k,e);return e});d.bind(e("slice",h),function(a,b,c,e){a.stopPropagation();if(0==g.total)return!1;e=M([b,c,e],["number","number","function"]);b=q(e[0])?e[0]:0;c=q(e[1])?e[1]:g.total;e=e[2];b+=g.first;c+=g.first;if(0<items.total){for(;b>g.total;)b-=g.total;
        for(;c>g.total;)c-=g.total;for(;0>b;)b+=g.total;for(;0>c;)c+=g.total}a=d.children();b=c>b?a.slice(b,c):l(a.slice(b,g.total).get().concat(a.slice(0,c).get()));t(e)&&e.call(k,b);return b});d.bind(e("isPaused",h)+" "+e("isStopped",h)+" "+e("isScrolling",h),function(b,a){b.stopPropagation();var c=b.type.slice(h.events.prefix.length),c=m[c];t(a)&&a.call(k,c);return c});d.bind(e("configuration",h),function(a,c,g,m){a.stopPropagation();a=!1;if(t(c))c.call(k,b);else if(v(c))ha=l.extend(!0,{},ha,c),!1!==g?
        a=!0:b=l.extend(!0,{},b,c);else if(!y(c))if(t(g))c=eval("opts."+c),y(c)&&(c=""),g.call(k,c);else{if(y(g))return eval("opts."+c);"boolean"!==typeof m&&(m=!0);eval("opts_orig."+c+" = b");!1!==m?a=!0:eval("opts."+c+" = b")}a&&(L(d.children(),b),d._cfs_init(ha),d._cfs_bind_buttons(),g=xa(d,b),d.trigger(e("updatePageStatus",h),[!0,g]));return b});d.bind(e("linkAnchors",h),function(a,b,c){a.stopPropagation();y(b)?b=l("body"):s(b)&&(b=l(b));if(!B(b)||0==b.length)return w(h,"Not a valid object.");s(c)||(c=
        "a.caroufredsel");b.find(c).each(function(){var b=this.hash||"";0<b.length&&-1!=d.children().index(l(b))&&l(this).unbind("click").click(function(a){a.preventDefault();d.trigger(e("slideTo",h),b)})});return!0});d.bind(e("updatePageStatus",h),function(a,c){a.stopPropagation();if(b.pagination.container){var j=b.pagination.items||b.items.visible,k=Math.ceil(g.total/j);c&&(b.pagination.anchorBuilder&&(b.pagination.container.children().remove(),b.pagination.container.each(function(){for(var a=0;a<k;a++){var c=
        d.children().eq(P(a*j,0,!0,g,d));l(this).append(b.pagination.anchorBuilder.call(c[0],a+1))}})),b.pagination.container.each(function(){l(this).children().unbind(b.pagination.event).each(function(a){l(this).bind(b.pagination.event,function(c){c.preventDefault();d.trigger(e("slideTo",h),[a*j,-b.pagination.deviation,!0,b.pagination])})})}));var f=d.triggerHandler(e("currentPage",h))+b.pagination.deviation;f>=k&&(f=0);0>f&&(f=k-1);b.pagination.container.each(function(){l(this).children().removeClass(F("selected",
        h)).eq(f).addClass(F("selected",h))});return!0}});d.bind(e("updateSizes",h),function(){var a=b.items.visible,c=d.children(),j=Ta(C,b,"width");g.total=c.length;m.primarySizePercentage?(b.maxDimension=j,b[b.d.width]=wa(j,m.primarySizePercentage)):b.maxDimension=q(b[b.d.width])?b[b.d.width]:j;b.responsive?(b.items.width=b.items.sizesConf.width,b.items.height=b.items.sizesConf.height,b=Za(b,c,j),a=b.items.visible,Ra(b,c)):b.items.visibleConf.variable?a=ca(c,b,0):"*"!=b.items.filter&&(a=pa(c,b,0));!b.circular&&
        (0!=g.first&&a>g.first)&&(j=b.items.visibleConf.variable?ua(c,b,g.first)-g.first:"*"!=b.items.filter?La(c,b.items.filter,b.items.visibleConf.org,g.first)-g.first:b.items.visible-g.first,w(h,"Preventing non-circular: sliding "+j+" items backward."),d.trigger(e("prev",h),j));b.items.visible=Z(a,b,b.items.visibleConf.adjust,k);b.items.visibleConf.old=b.items.visible;b=Ya(b,c);a=xa(d,b);d.trigger(e("updatePageStatus",h),[!0,a]);sa(b,g.total,h);fa(b,g.first,h);return a});d.bind(e("destroy",h),function(a,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              c){a.stopPropagation();A=ea(A);d.data("_cfs_isCarousel",!1);d.trigger(e("finish",h));c&&d.trigger(e("jumpToStart",h));L(d.children(),b);b.responsive&&d.children().each(function(){l(this).css(l(this).data("_cfs_origCssSizes"))});d.css(d.data("_cfs_origCss"));d._cfs_unbind_events();d._cfs_unbind_buttons();C.replaceWith(d);return!0});d.bind(e("debug",h),function(){w(h,"Carousel width: "+b.width);w(h,"Carousel height: "+b.height);w(h,"Item widths: "+b.items.width);w(h,"Item heights: "+b.items.height);
        w(h,"Number of items visible: "+b.items.visible);b.auto.play&&w(h,"Number of items scrolled automatically: "+b.auto.items);b.prev.button&&w(h,"Number of items scrolled backward: "+b.prev.items);b.next.button&&w(h,"Number of items scrolled forward: "+b.next.items);return h.debug});d.bind("_cfs_triggerEvent",function(a,b,c){a.stopPropagation();return d.triggerHandler(e(b,h),c)})};d._cfs_unbind_events=function(){d.unbind(e("",h));d.unbind(e("",h,!1));d.unbind("_cfs_triggerEvent")};d._cfs_bind_buttons=
    function(){d._cfs_unbind_buttons();sa(b,g.total,h);fa(b,g.first,h);if(b.auto.pauseOnHover){var a=Y(b.auto.pauseOnHover);C.bind(e("mouseenter",h,!1),function(){d.trigger(e("pause",h),a)}).bind(e("mouseleave",h,!1),function(){d.trigger(e("resume",h))})}b.auto.button&&b.auto.button.bind(e(b.auto.event,h,!1),function(a){a.preventDefault();a=!1;var c=null;m.isPaused?a="play":b.auto.pauseOnEvent&&(a="pause",c=Y(b.auto.pauseOnEvent));a&&d.trigger(e(a,h),c)});b.prev.button&&(b.prev.button.bind(e(b.prev.event,
        h,!1),function(a){a.preventDefault();d.trigger(e("prev",h))}),b.prev.pauseOnHover&&(a=Y(b.prev.pauseOnHover),b.prev.button.bind(e("mouseenter",h,!1),function(){d.trigger(e("pause",h),a)}).bind(e("mouseleave",h,!1),function(){d.trigger(e("resume",h))})));b.next.button&&(b.next.button.bind(e(b.next.event,h,!1),function(a){a.preventDefault();d.trigger(e("next",h))}),b.next.pauseOnHover&&(a=Y(b.next.pauseOnHover),b.next.button.bind(e("mouseenter",h,!1),function(){d.trigger(e("pause",h),a)}).bind(e("mouseleave",
        h,!1),function(){d.trigger(e("resume",h))})));b.pagination.container&&b.pagination.pauseOnHover&&(a=Y(b.pagination.pauseOnHover),b.pagination.container.bind(e("mouseenter",h,!1),function(){d.trigger(e("pause",h),a)}).bind(e("mouseleave",h,!1),function(){d.trigger(e("resume",h))}));(b.prev.key||b.next.key)&&l(document).bind(e("keyup",h,!1,!0,!0),function(a){var c=a.keyCode;c==b.next.key&&(a.preventDefault(),d.trigger(e("next",h)));c==b.prev.key&&(a.preventDefault(),d.trigger(e("prev",h)))});b.pagination.keys&&
    l(document).bind(e("keyup",h,!1,!0,!0),function(a){var c=a.keyCode;49<=c&&58>c&&(c=(c-49)*b.items.visible,c<=g.total&&(a.preventDefault(),d.trigger(e("slideTo",h),[c,0,!0,b.pagination])))});if(b.prev.wipe||b.next.wipe)if(I("the touchwipe-plugin","the touchSwipe-plugin"),l.fn.touchwipe){var c=b.prev.wipe?function(){d.trigger(e("prev",h))}:null,j=b.next.wipe?function(){d.trigger(e("next",h))}:null;if((j||j)&&!m.touchwipe){m.touchwipe=!0;var k={min_move_x:30,min_move_y:30,preventDefaultEvents:!0};switch(b.direction){case "up":case "down":k.wipeUp=
        c;k.wipeDown=j;break;default:k.wipeLeft=j,k.wipeRight=c}C.touchwipe(k)}}if(l.fn.swipe&&((c="ontouchstart"in window)&&b.swipe.onTouch||!c&&b.swipe.onMouse)){var f=l.extend(!0,{},b.prev,b.swipe),p=l.extend(!0,{},b.next,b.swipe),c=function(){d.trigger(e("prev",h),[f])},j=function(){d.trigger(e("next",h),[p])};switch(b.direction){case "up":case "down":b.swipe.options.swipeUp=j;b.swipe.options.swipeDown=c;break;default:b.swipe.options.swipeLeft=j,b.swipe.options.swipeRight=c}m.swipe&&d.swipe("destroy");
        C.swipe(b.swipe.options);m.swipe=!0}if(l.fn.mousewheel&&(b.prev.mousewheel&&(I("The prev.mousewheel option","the mousewheel configuration object"),b.prev.mousewheel=null,b.mousewheel={items:q(b.prev.mousewheel)?b.prev.mousewheel:null}),b.next.mousewheel&&(I("The next.mousewheel option","the mousewheel configuration object"),b.next.mousewheel=null,b.mousewheel={items:q(b.next.mousewheel)?b.next.mousewheel:null}),b.mousewheel)){var r=l.extend(!0,{},b.prev,b.mousewheel),s=l.extend(!0,{},b.next,b.mousewheel);
        m.mousewheel&&C.unbind(e("mousewheel",h,!1));C.bind(e("mousewheel",h,!1),function(a,b){a.preventDefault();0<b?d.trigger(e("prev",h),[r]):d.trigger(e("next",h),[s])});m.mousewheel=!0}b.auto.play&&d.trigger(e("play",h),b.auto.delay);if(m.upDateOnWindowResize){var t=function(){d.trigger(e("finish",h));b.auto.pauseOnResize&&!m.isPaused&&d.trigger(e("play",h));L(d.children(),b);d.trigger(e("updateSizes",h))},u=l(window),c=null;if(l.debounce&&"debounce"==h.onWindowResize)c=l.debounce(200,t);else if(l.throttle&&
        "throttle"==h.onWindowResize)c=l.throttle(300,t);else var z=0,v=0,c=function(){var a=u.width(),b=u.height();if(a!=z||b!=v)t(),z=a,v=b};u.bind(e("resize",h,!1,!0,!0),c)}};d._cfs_unbind_buttons=function(){e("",h);var a=e("",h,!1);ns3=e("",h,!1,!0,!0);l(document).unbind(ns3);l(window).unbind(ns3);C.unbind(a);b.auto.button&&b.auto.button.unbind(a);b.prev.button&&b.prev.button.unbind(a);b.next.button&&b.next.button.unbind(a);b.pagination.container&&(b.pagination.container.unbind(a),b.pagination.anchorBuilder&&
    b.pagination.container.children().remove());m.swipe&&(d.swipe("destroy"),C.css("cursor","default"),m.swipe=!1);m.mousewheel&&(m.mousewheel=!1);sa(b,"hide",h);fa(b,"removeClass",h)};u(c)&&(c={debug:c});var m={direction:"next",isPaused:!0,isScrolling:!1,isStopped:!1,mousewheel:!1,swipe:!1},g={total:d.children().length,first:0},A={auto:null,progress:null,startTime:K(),timePassed:0},p={isStopped:!1,duration:0,startTime:0,easing:"",anims:[]},W={onBefore:[],onAfter:[]},X=[],h=l.extend(!0,{},l.fn.carouFredSel.configs,
    c),b={},ha=l.extend(!0,{},a),C=d.wrap("<"+h.wrapper.element+' class="'+h.wrapper.classname+'" />').parent();h.selector=d.selector;h.serialNumber=l.fn.carouFredSel.serialNumber++;d._cfs_init(ha,!0,z);d._cfs_build();d._cfs_bind_events();d._cfs_bind_buttons();H(b.items.start)?z=b.items.start:(z=[],0!=b.items.start&&z.push(b.items.start));b.cookie&&z.unshift(parseInt(ab(b.cookie),10));if(0<z.length)for(var ja=0,oa=z.length;ja<oa;ja++){var J=z[ja];if(0!=J){if(!0===J){if(J=window.location.hash,1>J.length)continue}else"random"===
    J&&(J=Math.floor(Math.random()*g.total));if(d.triggerHandler(e("slideTo",h),[J,0,!0,{fx:"none"}]))break}}z=xa(d,b);ja=ga(d.children(),b);b.onCreate&&b.onCreate.call(k,{width:z.width,height:z.height,items:ja});d.trigger(e("updatePageStatus",h),[!0,z]);d.trigger(e("linkAnchors",h));h.debug&&d.trigger(e("debug",h));return d},l.fn.carouFredSel.serialNumber=1,l.fn.carouFredSel.defaults={synchronise:!1,infinite:!0,circular:!0,responsive:!1,direction:"left",items:{start:0},scroll:{easing:"swing",duration:500,
    pauseOnHover:!1,event:"click",queue:!1}},l.fn.carouFredSel.configs={debug:!1,onWindowResize:"throttle",events:{prefix:"",namespace:"cfs"},wrapper:{element:"div",classname:"caroufredsel_wrapper"},classnames:{}},l.fn.carouFredSel.pageAnchorBuilder=function(a){return'<a href="#"><span>'+a+"</span></a>"},l.fn.carouFredSel.progressbarUpdater=function(a){l(this).css("width",a+"%")},l.fn.carouFredSel.cookie={get:function(a){a+="=";for(var c=document.cookie.split(";"),d=0,e=c.length;d<e;d++){for(var l=c[d];" "==
    l.charAt(0);)l=l.slice(1);if(0==l.indexOf(a))return l.slice(a.length)}return 0},set:function(a,c,d){var e="";d&&(e=new Date,e.setTime(e.getTime()+864E5*d),e="; expires="+e.toGMTString());document.cookie=a+"="+c+e+"; path=/"},remove:function(a){l.fn.carouFredSel.cookie.set(a,"",-1)}},l.extend(l.easing,{quadratic:function(a){var c=a*a;return a*(-c*a+4*c-6*a+4)},cubic:function(a){return a*(4*a*a-9*a+6)},elastic:function(a){var c=a*a;return a*(33*c*c-106*c*a+126*c-67*a+15)}}))})(jQuery);