season_slhc.js 1.73 KB
$(function(){
	$(".nav-h2").hide();
	$(".common_nav").hover(
		function(){
			$(this).children(".nav-h2").show();
		},
		function(){
			$(this).children(".nav-h2").hide();
		}
	);
	
	var goodsslistTime = null;
	$('.goods-s-list li a').hover(function(){
		var _this = $(this);                    // 把$(this)对象赋给一个变量
		goodsslistTime = setTimeout(function(){
			_this.find('.end').find('.end-back').css('background', '#D60100');
			_this.find('.end').animate({"height":"65px"});
		}, 150);
		return false;
	}, function(){
		clearTimeout(goodsslistTime);
		$(this).find('.end').find('.end-back').css('background', '#000');
		$(this).find('.end').animate({"height":"40px"});
		return false;
	});
	
	$("img").lazyload({
		effect : "fadeIn",
		skip_invisible : false
	});
	
	$('.season-recommend-top').dilislider({
		page : 10,
		point : '.season-point-float li',
		direction : 'fading'
	});
	
	Tools.rollImages({
		leftView : 'sr-left',
		rightView: 'sr-right',
		width: 185,
		lng : 4,
		vLng : 8
	});
	
	Tools.getPageCoord('.wl-list li a');
	
	//销量,口碑,价格切换
	var dtabs = function(_cname){
		var dds = _cname.parent().parent().parent().parent().parent().find('.s-list dd');
		for (var i=0;i<dds.length;i++){
			if (_cname.index() == i){
				dds[i].style.display = 'block';
			}else {
				dds[i].style.display = 'none';
			}
		}
	}
	Tools.setSelected('gfs1','div','act',{fun:dtabs, type:"hover"});
	Tools.setSelected('gfs2','div','act',{fun:dtabs, type:"hover"});
	Tools.setSelected('gfs3','div','act',{fun:dtabs, type:"hover"});
	Tools.setSelected('gfs4','div','act',{fun:dtabs, type:"hover"});
	
	// $('.a-s-list').hover(function(){
		// $(this).addClass('list-hover');
	// },function(){
		// $(this).removeClass('list-hover');
	// })

});