 if(window.screen.width>1200)
 {   
$(document).ready(function() {

	var index = 0 ;
	var timer,settime;
	
	$("#sn_sevice").hover(function(){
		$("#sn_seviceMore").show();						   
	},function(){
		$("#sn_seviceMore").hide();
	});
	
	$("#basket").hover(function(){
		$("#basketShow").show();
	},function(){
		$("#basketShow").hide();
	});
	
	var $basketlist = $("#basketShow ul li")
	var basketlen = $basketlist.length;
	if(basketlen >3){
		$("#basketShow ul li:gt(3)").hide();
		$("#basketShow .basketmore").show();
		}
	
	var len = $("#Package").find("li").length ;
	$("#Package").find(".Package ul").width(711*len);
	$("#Package").find(".Packageright a").click(function(){
		if(index>=len-1){
			return false;
		}												 
		index ++ ;												 
		$("#Package").find(".Package ul").stop().animate({"marginLeft":-711*index},300);
	});
	
	$("#Package").find(".Packageleft a").click(function(){
		if(index<=0){
			return false;
		}												 
		index -- ;												 
		$("#Package").find(".Package ul").stop().animate({"marginLeft":-711*index},300);
	});
	
	$("#Package").hover(function(){
		 clearInterval(timer);
	},function(){
		timer = setInterval(function(){
		   if(index==len-1){index=-1;}						 
		   index++;						
		   $("#Package").find(".Package ul").stop().animate({"marginLeft":-711*index},300);		
		} , 4000);
	}).trigger("mouseleave");
	
	
	$("#promoreTab").find("a").click(function(e){
		e.preventDefault();									  
		index  =  $("#promoreTab a").index(this);	
		scrollAuto(index);
	});	
	
	$("#promoreTab").hover(function(){
		 clearInterval(timer);
	},function(){
		timer = setInterval(function(){
		   scrollAuto(index);			
		   index++;
		   if(index==7){index=0;}
	    } , 3600);
	}).trigger("mouseleave");
	
	function scrollAuto(index){
		$("#promoreTab").find("a").eq(index).addClass("on").siblings().removeClass("on");	
		$("#promoreTabList li").hide().eq(index).show();		
	};
	
	
	var len1 = $("#SpikeListMore").find("li").length;	
	$("#SpikeListMore li").each(function(i){
		$(this).mouseover(function(){
			$(this).addClass('on').siblings().removeClass('on');
			$("#SpikeListMore li").eq(0).find(".Spikeshow").hide();
			$("#SpikeListMore li").eq(0).find(".Spikehide").show();
			for(var j=0;j<len1;j++){
				$("#SpikeListMore li").eq(j).find(".Spikeshow").hide();
				$("#SpikeListMore li").eq(j).find(".Spikehide").show();
			}
			$(this).find(".Spikeshow").show();
			$(this).find(".Spikehide").hide();
		});
	});

});
}

if(window.screen.width<=1200)
 {  
$(document).ready(function() {

	var index = 0 ;
	var timer,settime;
	
	$("#sn_sevice").hover(function(){
		$("#sn_seviceMore").show();						   
	},function(){
		$("#sn_seviceMore").hide();
	});
	
	$("#basket").hover(function(){
		$("#basketShow").show();
	},function(){
		$("#basketShow").hide();
	});
	
	var $basketlist = $("#basketShow ul li")
	var basketlen = $basketlist.length;
	if(basketlen >3){
		$("#basketShow ul li:gt(3)").hide();
		$("#basketShow .basketmore").show();
		}
	
	var len = $("#Package").find("li").length ;
	$("#Package").find(".Package ul").width(485*len);
	$("#Package").find(".Packageright a").click(function(){
		if(index>=len-1){
			return false;
		}												 
		index ++ ;												 
		$("#Package").find(".Package ul").stop().animate({"marginLeft":-485*index},300);
	});
	
	$("#Package").find(".Packageleft a").click(function(){
		if(index<=0){
			return false;
		}												 
		index -- ;												 
		$("#Package").find(".Package ul").stop().animate({"marginLeft":-485*index},300);
	});
	
	$("#Package").hover(function(){
		 clearInterval(timer);
	},function(){
		timer = setInterval(function(){
		   if(index==len-1){index=-1;}						 
		   index++;						
		   $("#Package").find(".Package ul").stop().animate({"marginLeft":-485*index},300);		
		} , 4000);
	}).trigger("mouseleave");
	
	
	$("#promoreTab").find("a").click(function(e){
		e.preventDefault();									  
		index  =  $("#promoreTab a").index(this);	
		scrollAuto(index);
	});	
	
	$("#promoreTab").hover(function(){
		 clearInterval(timer);
	},function(){
		timer = setInterval(function(){
		   scrollAuto(index);			
		   index++;
		   if(index==7){index=0;}
	    } , 3600);
	}).trigger("mouseleave");
	
	function scrollAuto(index){
		$("#promoreTab").find("a").eq(index).addClass("on").siblings().removeClass("on");	
		$("#promoreTabList li").hide().eq(index).show();		
	};
	
	
	var len1 = $("#SpikeListMore").find("li").length;	
	$("#SpikeListMore li").each(function(i){
		$(this).mouseover(function(){
			$(this).addClass('on').siblings().removeClass('on');
			$("#SpikeListMore li").eq(0).find(".Spikeshow").hide();
			$("#SpikeListMore li").eq(0).find(".Spikehide").show();
			for(var j=0;j<len1;j++){
				$("#SpikeListMore li").eq(j).find(".Spikeshow").hide();
				$("#SpikeListMore li").eq(j).find(".Spikehide").show();
			}
			$(this).find(".Spikeshow").show();
			$(this).find(".Spikehide").hide();
		});
	});

});
}


