﻿window.addEvent('domready', function() {
    DailyDiscoveryInit();
    
    if(typeof sIFR == "function")
    {
        sIFR.replaceElement(named({ sSelector: ".DailyDiscoveryTitle h1", sFlashSrc: "Flash/tradegothic.swf", sColor: "#404040", sLinkColor: "#404040", sBgColor: "#FFFFFF", sHoverColor: "#404040", sCase: "upper", sWmode: "transparent" }));
    }
});

function DailyDiscoveryInit()
{
    $('DailyDiscoveryPager').set('tween', { duration: 'short' });

    $('DailyDiscoveryPager').addEvent('mouseenter', function() {
        //$('DailyDiscoveryPager').tween('bottom', -1);
        $('PagerContainer').tween('bottom', 0);
    });
    $('DailyDiscoveryPager').addEvent('mouseleave', function() {
        //$('DailyDiscoveryPager').tween('bottom', -18);
        $('PagerContainer').tween('bottom', -20);
    });

    //spotlight tips
    var tipsDailyDiscovery = new Tips('.DailyDiscoverySpotlight', { className: 'DailyDiscoveryTip' });

    tipsDailyDiscovery.addEvent('show', function(tip) {
        tip.fade('in');
        //$('DailyDiscoveryPager').tween('bottom', -18);
        $('PagerContainer').tween('bottom', -20);
    });
    tipsDailyDiscovery.addEvent('hide', function(tip) {
        tip.fade('out');
        //$('DailyDiscoveryPager').tween('bottom', -18);
        $('PagerContainer').tween('bottom', -20);
    });
}