
/*推荐搭配滑动门*/
   function switchmodTag(modtag,modcontent,modk) {
	   var num=5;
	  modk = parseInt(modk);
	  // 计算modk所在的序号开始值
	  var n=parseInt(modk/(num+1));
	  for( var i=n*num+1; i<=(n+1)*num; i++ ){
		  if( i == modk ){
			  document.getElementById(modtag+modk).className="menuOn";
			  document.getElementById(modcontent+modk).className="slide_c";
		  }else{
			  if( document.getElementById(modtag+i) && document.getElementById(modcontent+i) ){
			 document.getElementById(modtag+i).className="menuNo";
			  document.getElementById(modcontent+i).className="list_none";
			  }
		  }
	  } 
	  
	  
	  
	  
  }


/*首页头版ppt*/
var change_topleft_img_id = 0;
var ad_num=null;
var change_topleft_img_timer=null;
var paused = false;

$(function(){
	ad_num = $('#i_focus_btn  ul  li');
	change_topleft_img_timer = setInterval("auto_change_topleft_img()",5000);
	setInterval('AutoScroll("#newest_scroll")', 2000)
});

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

function auto_change_topleft_img(){
    var id = change_topleft_img_id>=ad_num.length-1?0:change_topleft_img_id+1;
    change_topleft_img(id);
}

function change_topleft_img(id){
if(paused)
	{
		return;
	}

	paused = true;
    clearInterval(change_topleft_img_timer);
    change_topleft_img_id = id;
	if( ad_num !== null )
    ad_num.each(function(i,v){						 

        if(i == id)
        {
            $('#index_brand_left_img_'+i).hide().fadeIn(500,function(){});
            $('#index_brand_left_txt_'+i).addClass('i_cur');
        }
        else
        {
	        $('#index_brand_left_img_'+i).hide();
	        //$('#index_brand_left_img_'+i).css('display','none');
	        $('#index_brand_left_txt_'+i).removeClass();
        }
 });
    paused = false;
    change_topleft_img_timer=setInterval("auto_change_topleft_img()",5000);
}
/*限时抢购区域鼠标移上去浮出层*/
$(function(){
   $(".limit_area li").hover(
							 function(){$(this).children("div").show();},
							 function(){$(this).children("div").hide();}
							);	   
})
