jQuery(function() {

jQuery("#robin > div").css("width","2010em").css("position","absolute");
		jQuery("#robin_box").switchable("#robin > div  > a", {
			effect: "scroll",
			steps:4,
			visible:46
		}).carousel();
		// 一个按钮控制两组Scrollable
		var api1 = jQuery("#robin_box").switchable();
		jQuery("#LeftArr").click(function(){
			api1.prev();
			return false;
		});
		jQuery("#RightArr").click(function(){
			api1.next();
			return false;
		});	
});

jQuery(function() {

jQuery("#robin_g > div").css("width","2010em").css("position","absolute");
		jQuery("#robin_g_box").switchable("#robin_g > div  > a", {
			effect: "scroll",
			steps:4,
			visible:46
		}).carousel();
		// 一个按钮控制两组Scrollable
		var api2 = jQuery("#robin_g_box").switchable();
		jQuery("#LeftArr2").click(function(){
			api2.prev();
			return false;
		});
		jQuery("#RightArr2").click(function(){
			api2.next();
			return false;
		});	
});

//
jQuery(function () {
    jQuery(".changshang_trigger").switchable(".newestgame .content > ul > li", { triggerType: "click", effect: "scroll", vertical: true, initIndex: 0, steps: 1, visible: 1, speed: .5 }).carousel().autoplay(3);

    var api5 = jQuery(".changshang_trigger").switchable();
    jQuery("#next5").click(function () {
        api5.next();
    });
    jQuery("#prev5").click(function () {
        api5.prev();
    });
	
	jQuery(".newgame .tip_title a").each(function(index){
       jQuery(this).mouseover(
	   	  function(){
			  jQuery(".newgame .tip_title a").removeClass("this");
			  jQuery(this).addClass("this");
			  jQuery(".newgame .tip_box .gamelist:visible").hide();
			  jQuery(".newgame .tip_box .gamelist:eq(" + index + ")").show();
	  })
   });
	
	jQuery(".new_game .tip_title a").each(function(index){
       jQuery(this).mouseover(
	   	  function(){
			  jQuery(".new_game .tip_title a").removeClass("this");
			  jQuery(this).addClass("this");
			  jQuery(".new_game .tip_box .gamelist:visible").hide();
			  jQuery(".new_game .tip_box .gamelist:eq(" + index + ")").show();
	  })
   });
	
	jQuery(".pc_game .tip_title a").each(function(index){
       jQuery(this).mouseover(
	   	  function(){
			  jQuery(".pc_game .tip_title a").removeClass("this");
			  jQuery(this).addClass("this");
			  jQuery(".pc_game .tip_box .gamelist:visible").hide();
			  jQuery(".pc_game .tip_box .gamelist:eq(" + index + ")").show();
	  })
   });
	
	jQuery(".web_game .tip_title a").each(function(index){
       jQuery(this).mouseover(
	   	  function(){
			  jQuery(".web_game .tip_title a").removeClass("this");
			  jQuery(this).addClass("this");
			  jQuery(".web_game .tip_box .gamelist:visible").hide();
			  jQuery(".web_game .tip_box .gamelist:eq(" + index + ")").show();
	  })
   });
	 
	  jQuery(".tip a").each(function(index){
       jQuery(this).mouseover(
	   	  function(){
			  jQuery(".tip a").removeClass("this");
			  jQuery(this).addClass("this");
			  jQuery(".tipbox .list:visible").hide();
			  jQuery(".tipbox .list:eq(" + index + ")").show();
	  })
   });
	
	 jQuery(".gametitle").each(function(index){
       jQuery(this).click(
	   	  function(){
			  jQuery(".gametitle").removeClass("active");
			  jQuery(this).addClass("active");
			  jQuery(".gamecontent").hide();
			  jQuery(this).next().show();
	  })
	});
	 

	jQuery(".gametitle").mouseover(function(){
		jQuery(this).addClass("active");
		jQuery(this).mouseout(function(){
			if(jQuery(this).next().css("display")=="none"){
				jQuery(this).removeClass("active");
			}
		});
	})
	
	
	
	
	$(document).ready(function(){
	$(".data tbody tr").mouseover(function(){ //如果鼠标移到class为stripe_tb的表格的tr上时，执行函数
		$(this).addClass("hover");}).mouseout(function(){ //给这行添加class值为over，并且当鼠标一出该行时执行函数
	    $(this).removeClass("hover");}) //移除该行的class
	$(".data tbody tr:odd").addClass("even");//给class为stripe_tb的表格的偶数行添加class值为alt
	});
	
 })
