﻿(function (a) {
    a.fn.panelNavigation = function (b) {
        var i = a.extend({ tooltip: "" }, b); return this.each(function () {
            var d = a(this).attr("id"), e = a("#" + d + " li a"); if (e.length > 0) {
                var f = e.filter(".active"), c = f.attr("rel"); e.attr("title", ""); e.click(function (h) { h.preventDefault(); h = a(this).attr("rel"); a("#" + c).removeClass("show").addClass("hide"); a("#" + h).addClass("show").removeClass("hide"); c = h; a(this).addClass("active"); f.removeAttr("class"); Cufon.replace(f, a(this)); f = a(this) }); if (i.tooltip != "") {
                    var g = a("#" + d + " .Tooltip");
                    g.length > 0 && e.hover(function () { var h = a(this).find(".hidden").text().toUpperCase(); g.css("display", "block"); g.html('<span class="bl"><span class="tl"><span class="tr">' + h + '</span></span></span><span class="br"></span>'); Cufon.replace(".Tooltip", { hover: true, ignore: { em: 1} }) }, function () { g.css("display", ""); g.html("") })
                } 
            } 
        })
    } 
})(jQuery);
(function (a) {
    a.fn.panelCarousel = function () {
        return this.each(function () {
            var b = a("#columnthree-carousel > div"); if (b.length > 1) {
                var i = b.filter(":first").outerWidth(), d = 0, e = true; b.removeClass("hide").addClass("show"); b.mouseover(function () { e = false }).mouseout(function () { e = true }); setInterval(function () { if (e) { if (d < b.length - 1) { b.animate({ left: "-=" + i }, "slow"); d++ } else { b.animate({ left: "+=" + (b.length - 1) * i }, 500); d = 0 } f.removeClass("active").eq(d).addClass("active") } }, 4500); var f = a("#hypPromoPanelThree li a"); f.removeClass("active").filter(":first").addClass("active");
                f.attr("title", ""); f.click(function (c) { c.preventDefault(); e = false; c = a(this).text().substr(0, 1); c = Math.abs(c - 1); var g = i * Math.abs(d - c); c > d - 1 ? b.animate({ left: "-=" + g }, "slow") : b.animate({ left: "+=" + g }, "slow"); f.removeClass("active").eq(c).addClass("active"); d = c })
            } 
        })
    } 
})(jQuery);
