/*!
 * @copyright 2011-Present Advanced Care Solutions, Inc.
 * @author Christopher Rahauiser <crahauiser@acs-web.com>
 * @version 1.0
 */
jQuery.noConflict();(function(a){a.fn.fadeRotation=function(b){var c=a.extend({},a.fn.fadeRotation.defaults,b);return this.each(function(){var o=a(this),d=o.find(c.slideContainerSelector+" > *"),m=0,i=d.length,j=i-1,p=false,l,h;function g(q,r,s){p=true;if(c.showSlideControls){l.removeClass(c.slideControlSelectedClasses).eq(q).addClass(c.slideControlSelectedClasses)}d.eq(r).animate({opacity:"hide"},{duration:c.fadeDuration,complete:function(){a(this).css("z-index",c.zIndexOnHide)}}).end().eq(q).animate({opacity:"show"},{duration:c.fadeDuration,complete:function(){a(this).css("z-index",c.zIndexOnShow)}});a.when(d.eq(r),d.eq(q)).done(function(){m=q;p=false;if(s){k()}})}function k(){h=window.setInterval(function(){var q=m+1;if(m>=j){q=0}g(q,m)},c.rotateDuration)}function n(){window.clearInterval(h);h=null}function f(r){var q;r.preventDefault();if(p){return}q=l.index(this);n();g(q,m,true)}function e(){var s=o.find(c.slideControlSelector),r,q;if(s.length<1){throw new Error("The slide control container could not be found.")}for(q=0;q<i;q+=1){r=a(c.slideControlHtml);if(q===0){r.addClass(c.slideControlSelectedClasses)}r.bind("click.faderotation",f);s.append(r)}l=s.children()}if(d.length<2){return false}if(c.showSlideControls){e()}k()})};a.fn.fadeRotation.defaults={fadeDuration:1000,rotateDuration:8000,zIndexOnHide:1,zIndexOnShow:2,slideContainerSelector:".slides",showSlideControls:false,slideControlSelector:"#slide-select",slideControlHtml:'<div class="select-button">&nbsp;</div>',slideControlSelectedClasses:"current"}}(jQuery));
