(function (a) { a.fn.oneCarousel = function (c) { var f = this; var e = a.extend({ easeIn: "fadeInLeft", pause: "hover", interval: 5000 }, c); f.carousel({ pause: e.pause, interval: e.interval }); var b; var d; f.find(".hold-text").children().each(function (g) { a(this).css("opacity", 0); }); a(".hold-text", f.find(".active")).children().each(function (g) { if (a(this).data("animate")) { d = a(this).data("animate"); } else { d = e.easeIn; } a(this).removeClass(d).addClass("animate" + g + " " + d); b = a(this); }); f.on("slid", function (g) { if (b) { b.find(".hold-text").children().each(function (h) { if (a(this).data("animate")) { d = a(this).data("animate"); } else { d = e.easeIn; } a(this).removeClass(d).css("opacity", 0); }); } a(".hold-text", f.find(".active")).children().each(function (h) { if (a(this).data("animate")) { d = a(this).data("animate"); } else { d = e.easeIn; } a(this).css("opacity", 0).removeClass(d).addClass("animate" + h + " " + d); }); b = a(this); }); return this; }; })(jQuery);