function showTab(obj,obj2,num,len,listyle)
/*选项卡JS*/
{
 for(var id = 1;id<=len;id++)
 {
  var ss=obj+id;
  var ss2=obj2+id;
  if(id==num){
  try{
		document.getElementById(ss2).className=listyle;
		document.getElementById(ss).style.display="block"}catch(e){};
  }else{
  try{
		document.getElementById(ss2).className="";
		document.getElementById(ss).style.display="none"}catch(e){};
  }
 }  
}
$(document).ready(function (){
	/*切换城市JS*/
/////////////////////////////////	
		$("#changecity").click(	
  		function () {
			window.location="../city/city.html";
		}
		);
/////////////////////////////////		
//		$("#changecity").toggle(	
//  		function () {
//			$("#city").show();
//  			},
//  		function () {
//			$("#city").hide();
//  			}
//		);
//		$(".ml_city_hd span").click(	
//  		function () {
//			$("#city").hide();
//		}
//		);
//		/*按类型分类JS*/
//		$("#ml_switch").toggle(	
//  		function () {
//			$(".ml_Category").animate({height:"172px"});
//			$("#ml_switch").removeClass("ml_switch");
//			$("#ml_switch").addClass("ml_switch_on");
//  			},
//  		function () {
//			$(".ml_Category").animate({height:"78px"});
//			$("#ml_switch").removeClass("ml_switch_on");
//			$("#ml_switch").addClass("ml_switch");
//  			}
//		);	

});
$(document).ready(function (){
		/*头部搜索ALL更多下拉框JS*/
		$(".ml_search_all").click(function () {
			$("#ml_mMenu").toggle();
		}
		);		
		$("#ml_mMenu li").mouseover(function(){
 			 $(this).css("background-color","#E7EBF6");
		});
		$("#ml_mMenu li").mouseout(function(){
 			 $(this).css("background-color","#fff");
		});
		$("#ml_mMenu li").click(function () {
			$("#ml_mMenu").hide();
		});	
		$(".form_list_pic img").mouseover(function(){
 			 $(this).addClass("hovers");
		});
		$(".form_list_pic img").mouseout(function(){
 			 $(this).removeClass("hovers");
		});
});
$(document).ready(function (){
		/*今日团购BUY 列表排序下拉框JS*/
		$("#ml_list_form").click(function () {
			$("#form_mMenu").toggle();
		}
		);		
		$("#form_mMenu li").mouseover(function(){
 			 $(this).css("background-color","#E7EBF6");
		});
		$("#form_mMenu li").mouseout(function(){
 			 $(this).css("background-color","#fff");
		});
		$("#form_mMenu li").click(function () {
			$("#form_mMenu").hide();
		});	
		
		/*今日团购排序JS切换*/
		$("#px_today").toggle(	
  		function () {
			$("#px_today").removeClass('px_today');
			$("#px_today").addClass('px_todays');
  			},
  		function () {
			$("#px_today").removeClass('px_todays');
			$("#px_today").addClass('px_today');
  			}
		);
		$("#px_price").toggle(	
  		function () {
			$("#px_price").removeClass('px_price');
			$("#px_price").addClass('px_prices');
  			},
  		function () {
			$("#px_price").removeClass('px_prices');
			$("#px_price").addClass('px_price');
  			}
		);
		$("#px_point").toggle(	
  		function () {
			$("#px_point").removeClass('px_point');
			$("#px_point").addClass('px_points');
  			},
  		function () {
			$("#px_point").removeClass('px_points');
			$("#px_point").addClass('px_point');
  			}
		);
		
		$(".ft_show").mouseover(function(){
 			 $(this).css("border-color","#fa5700");
		});
		$(".ft_show").mouseout(function(){
 			 $(this).css("border-color","#ccc");
		});
});


