(function (a) { a.fn.fadeTransition = function (b) { var b = a.extend({ pauseTime: 1, transitionTime: 1, ignore: null, delayStart: 0, pauseNavigation: false }, b); var c; Trans = function (h) { var j = null; var g = Math.floor(Math.random() * 5); var e = (b.ignore) ? a("> *:not(" + b.ignore + ")", h) : a("> *", h); a(h).css("position", "relative"); e.css("display", "none").css("left", "0").css("top", "0").css("position", "absolute"); if (b.delayStart > 0) { setTimeout(f, b.delayStart) } else { f() } function f() { if (b.ignore) { a(b.ignore, h).fadeOut(b.transitionTime); a(e[g]).fadeIn(b.transitionTime); } else { a(e[g]).css("display", "block") } } function i(k) { a(e[g]).fadeOut(b.transitionTime); a(e[k]).fadeIn(b.transitionTime); g = k; d() } function d() { if (a("> *", h).length < 2) { return false } if (j) { clearTimeout(j) } if (!b.pauseNavigation) { j = setTimeout(function () { i((g + 1) % e.length | 0) }, b.pauseTime) } } this.showItem = function (k) { if (j) { clearTimeout(j) } i(k) }; d() }; this.showItem = function (d) { c.showItem(d) }; return this.each(function () { c = new Trans(this) }) } })(jQuery); var previousid = -1; var page = { tr: null, init: function () { page.tr = $("#slidesContainer").fadeTransition({ pauseTime: 8000, transitionTime: 1000, ignore: "#introslide", delayStart: 320 }); $("div.navigation").each(function () { $(this).children().each(function (a) { if ($(this).is("a")) { $(this).click(function () { page.tr.showItem(a); return false }) } }) }) }, show: function (a) { if (page.tr.timer) { clearTimeout(page.tr.timer) } page.tr.showItem(a) } }; function animateText(g, f, e, d, c, b, a) { $(g).animate({ left: 0 }, 500, function () { $(f).animate({ left: 0 }, 500, function () { $(e).animate({ left: 0 }, 500, function () { $(d).animate({ left: 0 }, 500, function () { $(c).animate({ left: 0 }, 500, function () { $(b).animate({ left: 0 }, 500, function () { $(a).animate({ left: 0 }, 500, function () { }) }) }) }) }) }) }) } function setPositions() { $("#slidesContainer .rtl").each(function () { $(this).css({ left: "100px" }) }); $("#slidesContainer .feature1").each(function () { $(this).css({ left: "100px" }) }); $("#slidesContainer .feature2").each(function () { $(this).css({ left: "100px" }) }); $("#slidesContainer .feature3").each(function () { $(this).css({ left: "100px" }) }) } $(document).ready(function () { $("#slidesContainer").css({ display: "none" }); setTimeout(function () { $("#slidesContainer").css({ visibility: "visible" }); $("#slidesContainer").css({ display: "block" }); page.init() }, 100) });
