﻿/*
* Jquery Simple Cycle
* Author: Websir.co.uk
*/
(function(e) { var f; e.fn.extend({ simpleCycle: function(a) { a = e.extend({ duration: 500, interval: 5E3, child: "img", eq: "none" }, a); return this.each(function() { var b = e(this).children(a.child), c = a.duration, h = a.interval, d = 0, g = a.eq; if (g != "none") b.animate({ opacity: 0 }, { queue: false, duration: c }).eq(g).animate({ opacity: 1 }, { queue: false, duration: c }); else { b.animate({ opacity: 0 }, { duration: 50 }).eq(0).animate({ opacity: 1 }, { duration: 50 }); f = setInterval(function() { if (d < b.length - 1) d++; else d = 0; b.animate({ opacity: 0 }, { queue: false, duration: c }).eq(d).animate({ opacity: 1 }, { queue: false, duration: c }) }, h) } }) }, simpleCycleStop: function() { clearInterval(f) } }) })(jQuery);

