﻿/** 
 * @fileOverview 页面抽出JS
 * @author Tang Guohui 2011-4-18
 * @version 1.0.0
 */

switch (PAGE_NAME)
{
    case 'index':
        $('div.scrollable').scrollable(
        {
            circular: true,
            speed: 500,
			onSeek: function(event,index)
			{
				//DD_belatedPNG.fix('.navi a');
			}
        }).autoscroll(
        {
            interval: 10000
        }).navigator(
		{
			indexed:true
		});
        break;
    case 'help':
        setCurrentHelpNav();
        initListShow('#help-content h5');
		setHelpNodeLink();
        showHelpByNode();
		ieRound('.help-node>div', 'round', 'b');
		$('img.bigImg').click(function(){window.open(this.src);});
        break;
    case 'download':
        initVersionInfo();
        break;
	case 'active':
        _$('user_pw1').focus();
        break;
}

/******************** 全局处理 ********************/

//语言切换菜单
var lanBtn = $('a.btn-lan:eq(0)');
var lanList = lanBtn.next();
var lanMenuTimer = null;
lanBtn.add(lanList).hover(function()
{
    if (lanMenuTimer) 
        clearTimeout(lanMenuTimer);
    lanList.show();
}, function()
{
    lanMenuTimer = setTimeout(function()
    {
        lanList.hide();
    }, 100);
});

setCurrentNav();

if (_$('user_name')) 
    _$('user_name').focus();

ieRound('.radius4', 'round', 'b');
