/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20140128 */
(function(e){"use strict";e.fn.cycle.transitions.tileSlide=e.fn.cycle.transitions.tileBlind={before:function(i,t,n,s){i.API.stackSlides(t,n,s),e(t).css({display:"block",visibility:"visible"}),i.container.css("overflow","hidden"),i.tileDelay=i.tileDelay||"tileSlide"==i.fx?100:125,i.tileCount=i.tileCount||7,i.tileVertical=i.tileVertical!==!1,i.container.data("cycleTileInitialized")||(i.container.on("cycle-destroyed",e.proxy(this.onDestroy,i.API)),i.container.data("cycleTileInitialized",!0))},transition:function(i,t,n,s,o){function l(e){p.eq(e).animate(I,{duration:i.speed,easing:i.easing,complete:function(){(s?y-1===e:0===e)&&i._tileAniCallback()}}),setTimeout(function(){(s?y-1!==e:0!==e)&&l(s?e+1:e-1)},i.tileDelay)}i.slides.not(t).not(n).css("visibility","hidden");var r,c,a,d,u,p=e(),f=e(t),v=e(n),y=i.tileCount,g=i.tileVertical,h=i.container.height(),m=i.container.width();g?(c=Math.floor(m/y),d=m-c*(y-1),a=u=h):(c=d=m,a=Math.floor(h/y),u=h-a*(y-1)),i.container.find(".cycle-tiles-container").remove();var I,A={left:0,top:0,overflow:"hidden",position:"absolute",margin:0,padding:0};I=g?"tileSlide"==i.fx?{top:h}:{width:0}:"tileSlide"==i.fx?{left:m}:{height:0};var S=e('<div class="cycle-tiles-container"></div>');S.css({zIndex:f.css("z-index"),overflow:"visible",position:"absolute",top:0,left:0,direction:"ltr"}),S.insertBefore(n);for(var x=0;y>x;x++)r=e("<div></div>").css(A).css({width:y-1===x?d:c,height:y-1===x?u:a,marginLeft:g?x*c:0,marginTop:g?0:x*a}).append(f.clone().css({position:"relative",maxWidth:"none",width:f.width(),margin:0,padding:0,marginLeft:g?-(x*c):0,marginTop:g?0:-(x*a)})),p=p.add(r);S.append(p),f.css("visibility","hidden"),v.css({opacity:1,display:"block",visibility:"visible"}),l(s?0:y-1),i._tileAniCallback=function(){v.css({display:"block",visibility:"visible"}),f.css("visibility","hidden"),S.remove(),o()}},stopTransition:function(e){e.container.find("*").stop(!0,!0),e._tileAniCallback&&e._tileAniCallback()},onDestroy:function(){var e=this.opts();e.container.find(".cycle-tiles-container").remove()}}})(jQuery);

/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20140128 */
(function(e){"use strict";e.fn.cycle.transitions.shuffle={transition:function(i,t,n,s,o){function r(e){this.stack(i,t,n,s),e()}e(n).css({display:"block",visibility:"visible"});var l=i.container.css("overflow","visible").width(),c=i.speed/2,a=s?t:n;i=i.API.getSlideOpts(s?i.currSlide:i.nextSlide);var d={left:-l,top:15},u=i.slideCss||{left:0,top:0};void 0!==i.shuffleLeft?d.left=d.left+parseInt(i.shuffleLeft,10)||0:void 0!==i.shuffleRight&&(d.left=l+parseInt(i.shuffleRight,10)||0),i.shuffleTop&&(d.top=i.shuffleTop),e(a).animate(d,c,i.easeIn||i.easing).queue("fx",e.proxy(r,this)).animate(u,c,i.easeOut||i.easing,o)},stack:function(i,t,n,s){var o,r;if(s)i.API.stackSlides(n,t,s),e(t).css("zIndex",1);else{for(r=1,o=i.nextSlide-1;o>=0;o--)e(i.slides[o]).css("zIndex",r++);for(o=i.slideCount-1;o>i.nextSlide;o--)e(i.slides[o]).css("zIndex",r++);e(n).css("zIndex",i.maxZ),e(t).css("zIndex",i.maxZ-1)}}}})(jQuery);

/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20140128 */
(function(e){"use strict";e.fn.cycle.transitions.scrollVert={before:function(e,i,t,n){e.API.stackSlides(e,i,t,n);var s=e.container.css("overflow","hidden").height();e.cssBefore={top:n?-s:s,left:0,opacity:1,display:"block",visibility:"visible"},e.animIn={top:0},e.animOut={top:n?s:-s}}}})(jQuery);

/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20140128 */
(function(e){"use strict";function i(e,i,t){if(e&&t.style.filter){i._filter=t.style.filter;try{t.style.removeAttribute("filter")}catch(n){}}else!e&&i._filter&&(t.style.filter=i._filter)}e.extend(e.fn.cycle.transitions,{fade:{before:function(t,n,s,o){var r=t.API.getSlideOpts(t.nextSlide).slideCss||{};t.API.stackSlides(n,s,o),t.cssBefore=e.extend(r,{opacity:0,display:"block"}),t.animIn={opacity:1},t.animOut={opacity:0},i(!0,t,s)},after:function(e,t,n){i(!1,e,n)}},fadeout:{before:function(t,n,s,o){var r=t.API.getSlideOpts(t.nextSlide).slideCss||{};t.API.stackSlides(n,s,o),t.cssBefore=e.extend(r,{opacity:1,display:"block"}),t.animOut={opacity:0},i(!0,t,s)},after:function(e,t,n){i(!1,e,n)}}})})(jQuery);

/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20140128 */
(function(e){"use strict";function i(i){return{preInit:function(e){e.slides.css(n)},transition:function(t,n,s,o,r){var l=t,c=e(n),a=e(s),d=l.speed/2;i.call(a,-90),a.css({display:"block",visibility:"visible","background-position":"-90px",opacity:1}),c.css("background-position","0px"),c.animate({backgroundPosition:90},{step:i,duration:d,easing:l.easeOut||l.easing,complete:function(){t.API.updateView(!1,!0),a.animate({backgroundPosition:0},{step:i,duration:d,easing:l.easeIn||l.easing,complete:r})}})}}}function t(i){return function(t){var n=e(this);n.css({"-webkit-transform":"rotate"+i+"("+t+"deg)","-moz-transform":"rotate"+i+"("+t+"deg)","-ms-transform":"rotate"+i+"("+t+"deg)","-o-transform":"rotate"+i+"("+t+"deg)",transform:"rotate"+i+"("+t+"deg)"})}}var n,s=document.createElement("div").style,o=e.fn.cycle.transitions,r=void 0!==s.transform||void 0!==s.MozTransform||void 0!==s.webkitTransform||void 0!==s.oTransform||void 0!==s.msTransform;r&&void 0!==s.msTransform&&(s.msTransform="rotateY(0deg)",s.msTransform||(r=!1)),r?(o.flipHorz=i(t("Y")),o.flipVert=i(t("X")),n={"-webkit-backface-visibility":"hidden","-moz-backface-visibility":"hidden","-o-backface-visibility":"hidden","backface-visibility":"hidden"}):(o.flipHorz=o.scrollHorz,o.flipVert=o.scrollVert||o.scrollHorz)})(jQuery);

/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20140128 */
(function(e){"use strict";e.extend(e.fn.cycle.defaults,{centerHorz:!1,centerVert:!1}),e(document).on("cycle-pre-initialize",function(i,t){function n(){clearTimeout(c),c=setTimeout(l,50)}function s(){clearTimeout(c),clearTimeout(a),e(window).off("resize orientationchange",n)}function o(){t.slides.each(r)}function l(){r.apply(t.container.find("."+t.slideActiveClass)),clearTimeout(a),a=setTimeout(o,50)}function r(){var i=e(this),n=t.container.width(),s=t.container.height(),o=i.outerWidth(),l=i.outerHeight();o&&(t.centerHorz&&n>=o&&i.css("marginLeft",(n-o)/2),t.centerVert&&s>=l&&i.css("marginTop",(s-l)/2))}if(t.centerHorz||t.centerVert){var c,a;e(window).on("resize orientationchange load",n),t.container.on("cycle-destroyed",s),t.container.on("cycle-initialized cycle-slide-added cycle-slide-removed",function(){n()}),l()}})})(jQuery);

/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20140114 */
(function(e){"use strict";e(document).on("cycle-bootstrap",function(e,t,i){"carousel"===t.fx&&(i.getSlideIndex=function(e){var t=this.opts()._carouselWrap.children(),i=t.index(e);return i%t.length},i.next=function(){var e=t.reverse?-1:1;t.allowWrap===!1&&t.currSlide+e>t.slideCount-t.carouselVisible||(t.API.advanceSlide(e),t.API.trigger("cycle-next",[t]).log("cycle-next"))})}),e.fn.cycle.transitions.carousel={preInit:function(t){t.hideNonActive=!1,t.container.on("cycle-destroyed",e.proxy(this.onDestroy,t.API)),t.API.stopTransition=this.stopTransition;for(var i=0;t.startingSlide>i;i++)t.container.append(t.slides[0])},postInit:function(t){var i,n,s,o,r=t.carouselVertical;t.carouselVisible&&t.carouselVisible>t.slideCount&&(t.carouselVisible=t.slideCount-1);var l=t.carouselVisible||t.slides.length,c={display:r?"block":"inline-block",position:"static"};if(t.container.css({position:"relative",overflow:"hidden"}),t.slides.css(c),t._currSlide=t.currSlide,o=e('<div class="cycle-carousel-wrap"></div>').prependTo(t.container).css({margin:0,padding:0,top:0,left:0,position:"absolute"}).append(t.slides),t._carouselWrap=o,r||o.css("white-space","nowrap"),t.allowWrap!==!1){for(n=0;(void 0===t.carouselVisible?2:1)>n;n++){for(i=0;t.slideCount>i;i++)o.append(t.slides[i].cloneNode(!0));for(i=t.slideCount;i--;)o.prepend(t.slides[i].cloneNode(!0))}o.find(".cycle-slide-active").removeClass("cycle-slide-active"),t.slides.eq(t.startingSlide).addClass("cycle-slide-active")}t.pager&&t.allowWrap===!1&&(s=t.slideCount-l,e(t.pager).children().filter(":gt("+s+")").hide()),t._nextBoundry=t.slideCount-t.carouselVisible,this.prepareDimensions(t)},prepareDimensions:function(t){var i,n,s,o,r=t.carouselVertical,l=t.carouselVisible||t.slides.length;if(t.carouselFluid&&t.carouselVisible?t._carouselResizeThrottle||this.fluidSlides(t):t.carouselVisible&&t.carouselSlideDimension?(i=l*t.carouselSlideDimension,t.container[r?"height":"width"](i)):t.carouselVisible&&(i=l*e(t.slides[0])[r?"outerHeight":"outerWidth"](!0),t.container[r?"height":"width"](i)),n=t.carouselOffset||0,t.allowWrap!==!1)if(t.carouselSlideDimension)n-=(t.slideCount+t.currSlide)*t.carouselSlideDimension;else for(s=t._carouselWrap.children(),o=0;t.slideCount+t.currSlide>o;o++)n-=e(s[o])[r?"outerHeight":"outerWidth"](!0);t._carouselWrap.css(r?"top":"left",n)},fluidSlides:function(t){function i(){clearTimeout(s),s=setTimeout(n,20)}function n(){t._carouselWrap.stop(!1,!0);var e=t.container.width()/t.carouselVisible;e=Math.ceil(e-r),t._carouselWrap.children().width(e),t._sentinel&&t._sentinel.width(e),l(t)}var s,o=t.slides.eq(0),r=o.outerWidth()-o.width(),l=this.prepareDimensions;e(window).on("resize",i),t._carouselResizeThrottle=i,n()},transition:function(t,i,n,s,o){var r,l={},c=t.nextSlide-t.currSlide,a=t.carouselVertical,d=t.speed;if(t.allowWrap===!1){s=c>0;var u=t._currSlide,p=t.slideCount-t.carouselVisible;c>0&&t.nextSlide>p&&u==p?c=0:c>0&&t.nextSlide>p?c=t.nextSlide-u-(t.nextSlide-p):0>c&&t.currSlide>p&&t.nextSlide>p?c=0:0>c&&t.currSlide>p?c+=t.currSlide-p:u=t.currSlide,r=this.getScroll(t,a,u,c),t.API.opts()._currSlide=t.nextSlide>p?p:t.nextSlide}else s&&0===t.nextSlide?(r=this.getDim(t,t.currSlide,a),o=this.genCallback(t,s,a,o)):s||t.nextSlide!=t.slideCount-1?r=this.getScroll(t,a,t.currSlide,c):(r=this.getDim(t,t.currSlide,a),o=this.genCallback(t,s,a,o));l[a?"top":"left"]=s?"-="+r:"+="+r,t.throttleSpeed&&(d=r/e(t.slides[0])[a?"height":"width"]()*t.speed),t._carouselWrap.animate(l,d,t.easing,o)},getDim:function(t,i,n){var s=e(t.slides[i]);return s[n?"outerHeight":"outerWidth"](!0)},getScroll:function(e,t,i,n){var s,o=0;if(n>0)for(s=i;i+n>s;s++)o+=this.getDim(e,s,t);else for(s=i;s>i+n;s--)o+=this.getDim(e,s,t);return o},genCallback:function(t,i,n,s){return function(){var i=e(t.slides[t.nextSlide]).position(),o=0-i[n?"top":"left"]+(t.carouselOffset||0);t._carouselWrap.css(t.carouselVertical?"top":"left",o),s()}},stopTransition:function(){var e=this.opts();e.slides.stop(!1,!0),e._carouselWrap.stop(!1,!0)},onDestroy:function(){var t=this.opts();t._carouselResizeThrottle&&e(window).off("resize",t._carouselResizeThrottle),t.slides.prependTo(t.container),t._carouselWrap.remove()}}})(jQuery);

/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20140128 */
(function(e){"use strict";function t(t,i,n,s){"caption2"===i.captionPlugin&&e.each(["caption","overlay"],function(){var e,t=this+"Fx",o=i[t+"Out"]||"hide",c=n[this+"Template"],l=i.API.getComponent(this),r=i[t+"Sel"],a=i.speed;i.sync&&(a/=2),e=r?l.find(r):l,l.length&&c?("hide"==o&&(a=0),e[o](a,function(){var d=i.API.tmpl(c,n,i,s);l.html(d),e=r?l.find(r):l,r&&e.hide(),o=i[t+"In"]||"show",e[o](a)})):l.hide()})}function i(t,i,n,s){"caption2"===i.captionPlugin&&e.each(["caption","overlay"],function(){var e=n[this+"Template"],t=i.API.getComponent(this);t.length&&e&&t.html(i.API.tmpl(e,n,i,s))})}e.extend(e.fn.cycle.defaults,{captionFxOut:"fadeOut",captionFxIn:"fadeIn",captionFxSel:void 0,overlayFxOut:"fadeOut",overlayFxIn:"fadeIn",overlayFxSel:void 0}),e(document).on("cycle-bootstrap",function(e,n){n.container.on("cycle-update-view-before",t),n.container.one("cycle-update-view-after",i)})})(jQuery);