﻿function NewsFade() { var a = $("#NewsFade table.show") ? $("#NewsFade table.show") : $("#NewsFade table:first"); var b = a.next().length ? a.next().hasClass("caption") ? $("#NewsFade table:first") : a.next() : $("#NewsFade table:first"); b.css({ opacity: 0 }).addClass("show").animate({ opacity: 1 }, 500); a.animate({ opacity: 0 }, 500).removeClass("show") } function slideShowNewsFade() { $("#NewsFade table").css("opacity", "0.0"); $("#NewsFade table:first").css("opacity", "1.0"); setInterval("NewsFade()", 6e3) } $(function() { function a(a) { $.post("Data/NewsFade.ashx?random=" + Math.random(), function(a) { var b = ""; $.each(a, function(a, c) { if (a == 0) { b += "<table class='show' ><tr><td>" + c.ShortDetail + "</td></tr></table>" } else { b += "<table><tr><td>" + c.ShortDetail + "</td></tr></table>" } }); $("#NewsFade").html(b) }, {}, "json") } a("Announcement"); slideShowNewsFade(); $("#tabs").tabs() })
