﻿var UI = new (function () { function b(d, c, e) { return d.addEventListener ? d.addEventListener(c, e, false) : d.attachEvent("on" + c, e) } function a(d) { var c; return ((c = d.href.indexOf("#")) >= 0) ? d.href.substr(c) : null } this.TabSet = function (g) { function j(i) { var n = a(i); return (n != null && n.length > 1) ? document.getElementById(n.substr(1)) : null } function k(i, o) { var n = j(i); if (n != null) { i.parentNode.className = o ? "active" : ""; n.style.display = o ? "block" : "none"; return true } else { return false } } function c(i) { if (e != null) { l(e) } if (k(i, true)) { e = i } } function l(i) { if (k(i, false)) { e = null } } function m(n) { n = n || window.event; var i; if ((i = a(n.target || n.srcElement)) != null) { n.returnValue = false; if (n.preventDefault) { n.preventDefault() } c(n.target || n.srcElement) } return false } var e = null; var d = window.location.hash; var h = g.getElementsByTagName("a"); for (var f = 0; f < h.length; f++) { if (f == 0 && d.length <= 1) { d = a(h[f]) } b(h[f], "click", m); if (a(h[f]) == d) { c(h[f]) } } } })();
(function (a) { var b = new Array(); a.Watermark = { ShowAll: function () { for (var c = 0; c < b.length; c++) { if (b[c].obj.val() == "") { b[c].obj.val(b[c].text); b[c].obj.css("color", b[c].WatermarkColor) } else { b[c].obj.css("color", b[c].DefaultColor) } } }, HideAll: function () { for (var c = 0; c < b.length; c++) { if (b[c].obj.val() == b[c].text) { b[c].obj.val("") } } } }; a.fn.Watermark = function (d, c) { if (!c) { c = "#aaa" } return this.each(function () { var f = a(this); var h = f.css("color"); b[b.length] = { text: d, obj: f, DefaultColor: h, WatermarkColor: c }; function g() { if (f.val() == d) { f.val("") } f.css("color", h) } function e() { if (f.val().length == 0 || f.val() == d) { f.val(d); f.css("color", c) } else { f.css("color", h) } } f.focus(g); f.blur(e); f.change(e); e() }) } })(jQuery);


jQuery(function ($) {
    var timer;
    function button1_click(event) {
        $(".slide").css("visibility", "hidden");
        $("#image1").css("visibility", "visible");
        $("#image1").css("opacity", "0");
        $("#image1").animate({ "opacity": 1 }, 300, "linear", null);
        $("ul.bold li").removeClass("active");
        $("#image1").animate({ "opacity": 1 }, 300, "linear", null);
        $("#button1").addClass("active");
        clearTimeout(timer);
        timer = setTimeout(eval("button2_click"), 7000);
        $("#image1").animate({ "opacity": 1 }, 300, "linear", null);
    }

    function button2_click(event) {
        $(".slide").css("visibility", "hidden");
        $("#image2").css("visibility", "visible");
        $("#image2").css("opacity", "0");
        $("#image2").animate({ "opacity": 1 }, 300, "linear", null);
        $("ul.bold li").removeClass("active");
        $("#image2").animate({ "opacity": 1 }, 300, "linear", null);
        $("#button2").addClass("active");
        clearTimeout(timer);
        timer = setTimeout(eval("button3_click"), 7000);
        $("#image2").animate({ "opacity": 1 }, 300, "linear", null);
    }

    function button3_click(event) {
        $(".slide").css("visibility", "hidden");
        $("#image3").css("visibility", "visible");
        $("#image3").css("opacity", "0");
        $("#image3").animate({ "opacity": 1 }, 300, "linear", null);
        $("ul.bold li").removeClass("active");
        $("#image3").animate({ "opacity": 1 }, 300, "linear", null);
        $("#button3").addClass("active");
        clearTimeout(timer);
        timer = setTimeout(eval("button1_click"), 7000);
        $("#image3").animate({ "opacity": 1 }, 300, "linear", null);
    }

    function OnLoad(event) {
        clearTimeout(timer);
        timer = setTimeout(eval("button1_click"), "0");
    }

    $('#button1').bind('click', button1_click);
    $('#button2').bind('click', button2_click);
    $('#button3').bind('click', button3_click);
    OnLoad();
});

