var name = "#floatMenu";
var menuYloc = null;

function AddFavorite(sURL, sTitle)
{
   try
   {
       window.external.addFavorite(sURL, sTitle);
   }catch (e)
   {
        try
        {
            window.sidebar.addPanel(sTitle, sURL, "");
        }
        catch (e)
        {
            alert("加入收藏失败，请使用Ctrl+D进行添加");
        }
    }
}

function SetHome(obj,vrl){
        try{
                obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
        }
        catch(e){
                if(window.netscape) {
                        try {
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
                        }  
                        catch (e)  { 
                                alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");  
                        }
                        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
                        prefs.setCharPref('browser.startup.homepage',vrl);
                 }
        }
}

function AutoScroll(obj){
        $(obj).find("ul:first").animate({
                marginTop:"-25px"
        },2000,function(){
                $(this).css({marginTop:"0px"}).find("li:first").appendTo(this);
        });
}


$(document).ready(function(){

    /*$圆角效果*/

                       
setInterval('AutoScroll("#scrollDiv")',3000);

						

                        $('#find_qq_service').click(function(){

                            $('#qq_service').slideToggle(400);

                             $('#find_qq_service').hide();

                            return false;

                        });

    /*^圆角效果*/

    /*$幻灯片*/

//$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);

    /*^幻灯片*/
	
	

    /*$QQ*/

    if(typeof($(name).css('top'))!="undefined")

        {

            menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")));

            $(window).scroll(function () {

                    offset = menuYloc+$(document).scrollTop()+"px";

                    $(name).animate({top:offset},{duration:500,queue:false});

            });

       }
		//swfobject.embedSWF("/themes/comm/swf/index.swf", "head_banner", "947", "300", "9.0.0","#ffffff", null, {wmode: 'transparent'});

		//swfobject.embedSWF("/themes/comm/swf/index.swf", "head_banner","947", "200","9.0.0","#ffffff", null, {wmode: 'transparent'});

    /*^QQ*/

   // $('#mainmenu').corner("10px");
/*
$('#bNav a').click(function (){
	clickIndex=$('#bNav a').index($(this));
	clearInterval(startRun);
	clickKey=1;
	stepRun();
	return false;
});
*/


});
