window.onerror = function(a, b, c, d) { }; $(function() { $("a").focus(function() { this.blur() }); SI.Files.stylizeAll(); slider.init(); $("input.text-default").each(function() { $(this).attr("default", $(this).val()) }).focus(function() { if ($(this).val() == $(this).attr("default")) $(this).val("") }).blur(function() { if ($(this).val() == "") $(this).val($(this).attr("default")) }); $("input.text,textarea.text").focus(function() { $(this).addClass("textfocus") }).blur(function() { $(this).removeClass("textfocus") }); var a = 0, b = null; $("a.popup").click(function() { var c = $(this).attr("rel").split("|")[0], d = parseInt($(this).attr("rel").split("|")[1]); var e = $("#" + c); if (!e.length) return false; if (typeof a == "object" && a.attr("id") != c) { a.hide(50); $(b).parent().removeClass(a.attr("id").split("-")[1] + "-open"); a = null } return false }); $("p.images img").click(function() { var a = $(this).attr("src").split("bg/bg")[1].split("-thumb")[0]; $(document.body).css("backgroundImage", "url(" + _siteRoot + "images/bg/bg" + a + ".jpg)"); $(this).parent().find("img").removeClass("on"); $(this).addClass("on"); return false }); $(window).load(function() { }); $("div.sc-large div.img:has(div.tml)").each(function() { $("div.tml", this).hide(); $(this).append('<a href="#" class="tml_open"> </a>').find("a").css({ left: parseInt($(this).offset().left) + 864, top: parseInt($(this).offset().top) + 1 }).click(function() { $(this).siblings("div.tml").slideToggle(); return false }).focus(function() { this.blur() }) }) }); var slider = { num: -1, cur: 0, cr: [], al: null, at: 10 * 1e3, ar: true, init: function() { if (!slider.data || !slider.data.length) return false; var a = slider.data; slider.num = a.length; var b = Math.floor(Math.random() * 1); for (var c = 0; c < slider.num; c++) { $("#" + a[c].id).css({ left: (c - b) * 1e3 }); $("#slide-nav").append('<a id="slide-link-' + c + '" href="#" onclick="slider.slide(' + c + ');return false;" onfocus="this.blur();">' + (c + 1) + "</a>") } $("img,div#slide-controls", $("div#slide-holder")).fadeIn(); slider.text(a[b]); slider.on(b); slider.cur = b; window.setTimeout("slider.auto();", slider.at) }, auto: function() { if (!slider.ar) return false; var a = slider.cur + 1; if (a >= slider.num) a = 0; slider.slide(a) }, slide: function(a) { if (a < 0 || a >= slider.num || a == slider.cur) return; window.clearTimeout(slider.al); slider.al = window.setTimeout("slider.auto();", slider.at); var b = slider.data; for (var c = 0; c < slider.num; c++) $("#" + b[c].id).stop().animate({ left: (c - a) * 1e3 }, 1e3, "swing"); slider.on(a); slider.text(b[a]); slider.cur = a }, on: function(a) { $("#slide-nav a").removeClass("on"); $("#slide-nav a#slide-link-" + a).addClass("on") }, text: function(a) { slider.cr["a"] = a.client; slider.cr["b"] = a.desc; slider.ticker("#slide-client span", a.client, 0, "a"); slider.ticker("#slide-desc", a.desc, 0, "b") }, ticker: function(a, b, c, d) { if (slider.cr[d] != b) return false; ctext = b.substring(0, c) + (c % 2 ? "-" : "_"); $(a).html(ctext); if (c == b.length) $(a).html(b); else window.setTimeout('slider.ticker("' + a + '","' + b + '",' + (c + 1) + ',"' + d + '");', 30) } }; if (!window.SI) { var SI = {} } SI.Files = { htmlClass: "SI-FILES-STYLIZED", fileClass: "file", wrapClass: "cabinet", fini: false, able: false, init: function() { this.fini = true }, stylize: function(a) { if (!this.fini) { this.init() } if (!this.able) { return } a.parentNode.file = a; a.parentNode.onmousemove = function(a) { if (typeof a == "undefined") a = window.event; if (typeof a.pageY == "undefined" && typeof a.clientX == "number" && document.documentElement) { a.pageX = a.clientX + document.documentElement.scrollLeft; a.pageY = a.clientY + document.documentElement.scrollTop } var b = oy = 0; var c = this; if (c.offsetParent) { b = c.offsetLeft; oy = c.offsetTop; while (c = c.offsetParent) { b += c.offsetLeft; oy += c.offsetTop } } } }, stylizeAll: function() { if (!this.fini) { this.init() } if (!this.able) { return } } }
