var $j = jQuery.noConflict();
function setupGlobal() { $j("a").focus(function() { $j(this).blur(); }); }
jQuery.ui || (function(c) {
    var i = c.fn.remove, d = c.browser.mozilla && (parseFloat(c.browser.version) < 1.9);
})(jQuery);
jQuery.effects || (function(d) {
    d.easing.jswing = d.easing.swing;
    d.extend(d.easing, { def: "easeOutQuad", swing: function(g, h, f, j, i) { return d.easing[d.easing.def](g, h, f, j, i) }, easeInQuad: function(g, h, f, j, i) { return j * (h /= i) * h + f }, easeOutQuad: function(g, h, f, j, i) { return -j * (h /= i) * (h - 2) + f }, easeInOutQuad: function(g, h, f, j, i) { if ((h /= i / 2) < 1) { return j / 2 * h * h + f } return -j / 2 * ((--h) * (h - 2) - 1) + f }, easeInCubic: function(g, h, f, j, i) { return j * (h /= i) * h * h + f }, easeOutCubic: function(g, h, f, j, i) { return j * ((h = h / i - 1) * h * h + 1) + f }, easeInOutCubic: function(g, h, f, j, i) { if ((h /= i / 2) < 1) { return j / 2 * h * h * h + f } return j / 2 * ((h -= 2) * h * h + 2) + f }, easeInQuart: function(g, h, f, j, i) { return j * (h /= i) * h * h * h + f }, easeOutQuart: function(g, h, f, j, i) { return -j * ((h = h / i - 1) * h * h * h - 1) + f }, easeInOutQuart: function(g, h, f, j, i) { if ((h /= i / 2) < 1) { return j / 2 * h * h * h * h + f } return -j / 2 * ((h -= 2) * h * h * h - 2) + f }, easeInQuint: function(g, h, f, j, i) { return j * (h /= i) * h * h * h * h + f }, easeOutQuint: function(g, h, f, j, i) { return j * ((h = h / i - 1) * h * h * h * h + 1) + f }, easeInOutQuint: function(g, h, f, j, i) { if ((h /= i / 2) < 1) { return j / 2 * h * h * h * h * h + f } return j / 2 * ((h -= 2) * h * h * h * h + 2) + f }, easeInSine: function(g, h, f, j, i) { return -j * Math.cos(h / i * (Math.PI / 2)) + j + f }, easeOutSine: function(g, h, f, j, i) { return j * Math.sin(h / i * (Math.PI / 2)) + f }, easeInOutSine: function(g, h, f, j, i) { return -j / 2 * (Math.cos(Math.PI * h / i) - 1) + f }, easeInExpo: function(g, h, f, j, i) { return (h == 0) ? f : j * Math.pow(2, 10 * (h / i - 1)) + f }, easeOutExpo: function(g, h, f, j, i) { return (h == i) ? f + j : j * (-Math.pow(2, -10 * h / i) + 1) + f }, easeInOutExpo: function(g, h, f, j, i) { if (h == 0) { return f } if (h == i) { return f + j } if ((h /= i / 2) < 1) { return j / 2 * Math.pow(2, 10 * (h - 1)) + f } return j / 2 * (-Math.pow(2, -10 * --h) + 2) + f }, easeInCirc: function(g, h, f, j, i) { return -j * (Math.sqrt(1 - (h /= i) * h) - 1) + f }, easeOutCirc: function(g, h, f, j, i) { return j * Math.sqrt(1 - (h = h / i - 1) * h) + f }, easeInOutCirc: function(g, h, f, j, i) { if ((h /= i / 2) < 1) { return -j / 2 * (Math.sqrt(1 - h * h) - 1) + f } return j / 2 * (Math.sqrt(1 - (h -= 2) * h) + 1) + f }, easeInElastic: function(g, i, f, m, l) { var j = 1.70158; var k = 0; var h = m; if (i == 0) { return f } if ((i /= l) == 1) { return f + m } if (!k) { k = l * 0.3 } if (h < Math.abs(m)) { h = m; var j = k / 4 } else { var j = k / (2 * Math.PI) * Math.asin(m / h) } return -(h * Math.pow(2, 10 * (i -= 1)) * Math.sin((i * l - j) * (2 * Math.PI) / k)) + f }, easeOutElastic: function(g, i, f, m, l) { var j = 1.70158; var k = 0; var h = m; if (i == 0) { return f } if ((i /= l) == 1) { return f + m } if (!k) { k = l * 0.3 } if (h < Math.abs(m)) { h = m; var j = k / 4 } else { var j = k / (2 * Math.PI) * Math.asin(m / h) } return h * Math.pow(2, -10 * i) * Math.sin((i * l - j) * (2 * Math.PI) / k) + m + f }, easeInOutElastic: function(g, i, f, m, l) { var j = 1.70158; var k = 0; var h = m; if (i == 0) { return f } if ((i /= l / 2) == 2) { return f + m } if (!k) { k = l * (0.3 * 1.5) } if (h < Math.abs(m)) { h = m; var j = k / 4 } else { var j = k / (2 * Math.PI) * Math.asin(m / h) } if (i < 1) { return -0.5 * (h * Math.pow(2, 10 * (i -= 1)) * Math.sin((i * l - j) * (2 * Math.PI) / k)) + f } return h * Math.pow(2, -10 * (i -= 1)) * Math.sin((i * l - j) * (2 * Math.PI) / k) * 0.5 + m + f }, easeInBack: function(g, h, f, k, j, i) { if (i == undefined) { i = 1.70158 } return k * (h /= j) * h * ((i + 1) * h - i) + f }, easeOutBack: function(g, h, f, k, j, i) { if (i == undefined) { i = 1.70158 } return k * ((h = h / j - 1) * h * ((i + 1) * h + i) + 1) + f }, easeInOutBack: function(g, h, f, k, j, i) { if (i == undefined) { i = 1.70158 } if ((h /= j / 2) < 1) { return k / 2 * (h * h * (((i *= (1.525)) + 1) * h - i)) + f } return k / 2 * ((h -= 2) * h * (((i *= (1.525)) + 1) * h + i) + 2) + f }, easeInBounce: function(g, h, f, j, i) { return j - d.easing.easeOutBounce(g, i - h, 0, j, i) + f }, easeOutBounce: function(g, h, f, j, i) { if ((h /= i) < (1 / 2.75)) { return j * (7.5625 * h * h) + f } else { if (h < (2 / 2.75)) { return j * (7.5625 * (h -= (1.5 / 2.75)) * h + 0.75) + f } else { if (h < (2.5 / 2.75)) { return j * (7.5625 * (h -= (2.25 / 2.75)) * h + 0.9375) + f } else { return j * (7.5625 * (h -= (2.625 / 2.75)) * h + 0.984375) + f } } } }, easeInOutBounce: function(g, h, f, j, i) { if (h < i / 2) { return d.easing.easeInBounce(g, h * 2, 0, j, i) * 0.5 + f } return d.easing.easeOutBounce(g, h * 2 - i, 0, j, i) * 0.5 + j * 0.5 + f } })
})(jQuery);
var $j = jQuery.noConflict();
var BACKWARD = false;
var g_newsBarInterval = 8000;
var g_newsCount = 0;
var g_actualNews = 1;
var g_newsThis = null;
function newsBarAutoPlay() {
    g_actualNews = g_actualNews + 1;
    if (g_actualNews > g_newsCount) {
        g_newsThis = $j(".newsBarNews:first");
        g_actualNews = 1
    } else { g_newsThis = $j(g_newsThis).next(".newsBarNews") } $j("#newsBarLink").fadeOut(100);
    $j("#newsBarText").fadeOut(100, function() {
        $j("#newsBarText").html($j(g_newsThis).find(".text").html());
        var link = $j(g_newsThis).find(".link").html();
        $j("#newsBarLink").attr("href", link)
    });
    $j("#newsBarText").fadeIn(1500);
    $j("#newsBarLink").fadeIn(1500);
    setTimeout(newsBarAutoPlay, g_newsBarInterval)
} function setupNewsBar() {
    g_newsCount = $j(".newsBarNews").length;
    g_newsThis = $j(".newsBarNews:first");
    $j("#newsBarText").html($j(g_newsThis).find(".text").html());
    $j("#newsBarLink").attr("href", $j(g_newsThis).find(".link").html());
    setTimeout(newsBarAutoPlay, g_newsBarInterval)
} 

var ACCORDION_WIDTH = 671;
var ACCORDION_DRAW_ASIDE_WIDTH = 80;
var ACCORDION_EASING_METHOD = "easeOutCirc"; var ACCORDION_SLIDE_TIME = 650;
var g_slidedDivs = null;
var g_hoveredSlideIndex = null;
function setupAccordionImageSlider() {
    $j("#accordionContainer").find(".accordionImgDiv:first").css("border-left", "0px");
    var slidedDivsList = $j("#accordionContainer .accordionImgDiv");
    g_slidedDivs = new Array;
    var firstDiv = $j("#accordionContainer .accordionImgDiv:first");
    for (var i = 0;
i < slidedDivsList.length;
	i++) {
        var obj = new Object();
        obj.name = "#" + $j(firstDiv).attr('id');
        obj.dest = 0;
        obj.out = 0;
        g_slidedDivs.push(obj);
        firstDiv = $j(firstDiv).next(".accordionImgDiv")
    } var ribOutWidth = 0;
    ribOutWidth = ACCORDION_WIDTH / g_slidedDivs.length;
    for (var i = 0;
	i < g_slidedDivs.length;
	i++) {
        $j(g_slidedDivs[i].name).css("margin-left", (i * ribOutWidth) + "px");
        g_slidedDivs[i].dest = i * ribOutWidth
    } $j("#accordionContainer").hover(function() { if (true == g_sliderAutoPlay) { clearTimeout(g_sliderTimerAutoPlay) } if (g_loadedStripCount < g_slidedDivs.length) { return } $j("#accordionContainer .accordionImgDiv").find(".slideDesc").stop().animate({ opacity: 0.0 }, 150) }, function() {
        if (g_loadedStripCount < g_slidedDivs.length) { return } mouseOutAccorOnAll(null);
        for (var i = 0; i < g_slidedDivs.length; i++) { $j(g_slidedDivs[i].name).stop().animate({ marginLeft: (i * ribOutWidth) + "px" }, { duration: 900, easing: ACCORDION_EASING_METHOD }); g_slidedDivs[i].dest = i * ribOutWidth; $j(g_slidedDivs[i].name).find(".slideDesc").stop().animate({ opacity: 1.0 }, 1200) } if (true == g_sliderAutoPlay) { clearTimeout(g_sliderTimerAutoPlay); mouseOutAccorOnAll(null); g_sliderTimerAutoPlay = setTimeout(accordionPlay, g_sliderTimerInterval) } 
    });
    $j(".accordionImgDiv").hover(function() { if (true == g_sliderAutoPlay) { clearTimeout(g_sliderTimerAutoPlay) } if (g_loadedStripCount < g_slidedDivs.length) { return } var divID = ("#" + $j(this).attr('id')); mouseOutAccorOnAll(divID); g_hoveredSlideIndex = $j("#accordionContainer .accordionImgDiv").index(this); var context = $j(this)[0]; $j(".accordionSlideImage", context).find("img").stop().animate({ opacity: 1.0 }, 400); $j(".accordionDescBack", context).stop().animate({ bottom: 0, opacity: 0.8 }, 1000); $j(".accordionDesc", context).stop().animate({ bottom: 0, opacity: 1.0 }, 1000); $j(".slideStrip", context).stop().animate({ opacity: 0.0 }, 1000, ACCORDION_EASING_METHOD); g_slidedDivs[g_hoveredSlideIndex].out = 0; setMoveForAccordionDivs(g_hoveredSlideIndex) }, function() { if (g_loadedStripCount < g_slidedDivs.length) { return } g_hoveredSlideIndex = null; var divID = ("#" + $j(this).attr('id')); var index = 0; for (var i = 0; i < g_slidedDivs.length; i++) { if (divID == g_slidedDivs[i].name) { index = i; break } } if (g_slidedDivs[index].out != 1) { g_slidedDivs[index].out = 1; mouseOutAccor(this) } })
} function setMoveForAccordionDivs(index) {
    for (var i = 0; i < g_slidedDivs.length; i++) {
        var context = $j(g_slidedDivs[i].name)[0];
        var object = $j(g_slidedDivs[i].name);
        $j(".slideDesc", context).stop().animate({ opacity: 0.0 }, 150);
        if (i < index) {
            var newMargin = (i * ACCORDION_DRAW_ASIDE_WIDTH);
            if (g_slidedDivs[i].dest != newMargin) {
                object.stop();
                var animTime = ACCORDION_SLIDE_TIME;
                g_slidedDivs[i].dest = newMargin;
                object.animate({ marginLeft: newMargin + "px" }, { duration: animTime, easing: ACCORDION_EASING_METHOD })
            } continue
        } if (index == i) {
            var newMargin = (i * ACCORDION_DRAW_ASIDE_WIDTH);
            if (g_slidedDivs[i].dest != newMargin) {
                object.stop();
                var animTime = ACCORDION_SLIDE_TIME;
                g_slidedDivs[i].dest = newMargin;
                object.animate({ marginLeft: newMargin + "px" }, { duration: animTime, easing: ACCORDION_EASING_METHOD })
            } continue
        } if (i > index) {
            var newMargin = (ACCORDION_WIDTH - ((g_slidedDivs.length - i) * ACCORDION_DRAW_ASIDE_WIDTH));
            if (g_slidedDivs[i].dest != newMargin) {
                object.stop();
                var animTime = ACCORDION_SLIDE_TIME;
                g_slidedDivs[i].dest = newMargin;
                object.animate({ "marginLeft": newMargin + "px" }, { duration: animTime, easing: ACCORDION_EASING_METHOD })
            } continue
        } 
    } 
} var g_actualSlideImage = 0;
var g_sliderTimerAutoPlay = null;
var g_sliderTimerInterval = 4500;
var g_sliderAutoPlay = false;
var g_sliderNewLoop = false;
var g_setBackwardBtnOnLast = false;
function accordionPlay() {
    if (g_loadedStripCount < g_slidedDivs.length) {
        if (true == g_sliderAutoPlay)
        { g_sliderTimerAutoPlay = setTimeout(accordionPlay, g_sliderTimerInterval) } 
        return
    } 
    
    var timeOut = g_sliderTimerInterval;
    g_setBackwardBtnOnLast = false;
    if (true == g_sliderNewLoop) {
        ribOutWidth = ACCORDION_WIDTH / g_slidedDivs.length;
        mouseOutAccorOnAll(null);
        for (var i = 0;
	i < g_slidedDivs.length;
	i++) {
            $j(g_slidedDivs[i].name).stop().animate({ marginLeft: (i * ribOutWidth) + "px" }, { duration: 900, easing: ACCORDION_EASING_METHOD });
            g_slidedDivs[i].dest = i * ribOutWidth;
            $j(g_slidedDivs[i].name).find(".slideDesc").stop().animate({ opacity: 1.0 }, 2000)
        } timeOut = g_sliderTimerInterval * 2;
        g_sliderNewLoop = false;
        g_setBackwardBtnOnLast = true;
        g_sliderTimerAutoPlay = setTimeout(accordionPlay, timeOut);
        return
    } mouseOutAccorOnAll(null);
    mouseOnAccor(g_slidedDivs[g_actualSlideImage].name);
    g_actualSlideImage++;
    if (g_actualSlideImage >= g_slidedDivs.length) {
        g_actualSlideImage = 0;
        g_sliderNewLoop = true
    } if (true == g_sliderAutoPlay) { g_sliderTimerAutoPlay = setTimeout(accordionPlay, g_sliderTimerInterval) } 
} function mouseOnAccor(_this) {
    var index = 0;
    for (var i = 0;
	i < g_slidedDivs.length;
																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																					i++) {
        if (("#" + $j(_this).attr('id')) == g_slidedDivs[i].name) {
            index = i;
            break
        } 
    } g_slidedDivs[index].out = 0;
    $j(_this).find(".accordionSlideImage").find("img").stop().animate({ opacity: 1.0 }, 400);
    $j(_this).find(".accordionDescBack").stop().animate({ bottom: 0, opacity: 0.8 }, 1000);
    $j(_this).find(".accordionDesc").stop().animate({ bottom: 0, opacity: 1.0 }, 1000);
    $j(_this).find(".slideStrip").stop().animate({ opacity: 0.0 }, 300);
    setMoveForAccordionDivs(index)
} function mouseOutAccor(_this) {
    var context = $j('#accordionContainer')[0];
    $j(_this, context).find(".accordionSlideImage").find("img").stop().animate({ opacity: 0.0 }, 800, function() { $j(_this, context).find(".slideStrip").stop().animate({ opacity: 1.0 }, 600) });
    $j(_this, context).find(".accordionDescBack").stop().animate({ bottom: -70, opacity: 0 }, 300);
    $j(_this, context).find(".accordionDesc").stop().animate({ bottom: -70, opacity: 0 }, 300)
} function mouseOutAccorOnAll(excludedID) {
    for (var j = 0;
																																j < g_slidedDivs.length; j++) {
        if (excludedID != null) { if (excludedID == g_slidedDivs[j].name) { continue } } if (g_slidedDivs[j].out != 1) {
            g_slidedDivs[j].out = 1;
            mouseOutAccor(g_slidedDivs[j].name)
        } 
    } 
} g_loadedSlideCount = 0;
g_imgList = null;
function checkAccordionLoading() { if (g_loadedSlideCount < g_imgList.length) { setupLoadingAsynchronousImagesForAccordion() } } function setupLoadingAsynchronousImagesForAccordion() {
    if (g_imgList == null) {
        var imgDivsList = $j("#accordionContainer .asyncImgLoadAccordion");
        g_imgList = new Array;
        var firstDiv = $j("#accordionContainer .accordionImgDiv:first");
        var imgDiv = $j(firstDiv).find(".asyncImgLoadAccordion");
        for (var i = 0;
	i < imgDivsList.length;
	i++) {
            var obj = new Object();
            obj.id = "#" + $j(imgDiv).attr('id');
            g_imgList.push(obj);
            firstDiv = $j(firstDiv).next(".accordionImgDiv");
            imgDiv = $j(firstDiv).find(".asyncImgLoadAccordion")
        } 
    } if (g_loadedSlideCount < g_imgList.length) {
        g_loadedSlideCount++;
        loadAccordionImg(g_imgList[g_loadedSlideCount - 1].id, g_loadedSlideCount - 1);
        setTimeout(setupLoadingAsynchronousImagesForAccordion, 500)
    } function loadAccordionImg(id, _index) {
        var loader = $j(id);
        var imagePath = loader.attr('title');
        var img = new Image();
        $j(img).css("opacity", "0.0").load(function() {
            loader.append(this).removeAttr('title');
            loader.css("background-image", "none");
            $j(this).css("margin", "0px").css("opacity", "0.0"); if (_index == g_hoveredSlideIndex) { $j(this).animate({ opacity: 1.0 }, 500) } 
        }).attr('src', imagePath)
    } 
} var g_loadedStripCount = 0;
var g_stripList = null;
function setupLoadingAsyncSlideStripImages() {
    if (g_stripList == null) {
        var imgDivsList = $j("#accordionContainer .slideStrip");
        g_stripList = new Array;
        var firstDiv = $j("#accordionContainer .accordionImgDiv:first");
        var imgDiv = $j(firstDiv).find(".slideStrip");
        for (var i = 0; i < imgDivsList.length;
	i++) {
            var obj = new Object();
            obj.id = imgDiv;
            g_stripList.push(obj);
            firstDiv = $j(firstDiv).next(".accordionImgDiv");
            imgDiv = $j(firstDiv).find(".slideStrip")
        }
    } if (g_loadedStripCount < g_stripList.length)
    { loadStripImg(g_stripList[g_loadedStripCount].id, g_loadedStripCount) } 
        else {
            clearTimeout(g_sliderTimerAutoPlay);
            if (true == g_sliderAutoPlay) {
                g_sliderTimerAutoPlay = setTimeout(accordionPlay, g_sliderTimerInterval)
            }
    } function loadStripImg(id, _index) {
        var loader = $j(id);
        var imagePath = loader.attr('title');
        var img = new Image();
        $j(img).css("opacity", "0.0").load(function() { loader.append(this).removeAttr('title'); g_loadedStripCount++; $j(this).css("margin", "0px").css("opacity", "0.0").animate({ opacity: 1.0 }, 400, function() { loader.css("background-image", "none"); setTimeout(setupLoadingAsyncSlideStripImages, 20) }) }).attr('src', imagePath)
    } 
} $j(document).ready(function() { setupGlobal(); setupLoadingAsynchronousImagesForAccordion(); setupLoadingAsyncSlideStripImages(); setupNewsBar(); setupAccordionImageSlider() });
