//导航下拉
$(function() {
	//导航下拉
	$('#navigation').slide({
		type: "menu",
		titCell: '.main',
		targetCell: '.sub',
		effect: 'fade',
		delayTime: 300,
		triggerTime: 100
	});
	//首页产品滚动
	$('.index_products').slide({
		mainCell: "ul",
		autoPlay: true,
		effect: "leftLoop",
		vis: 4,
		interTime: 2000
	});
	//幻灯片
	$(".banner").slide({
		titCell: ".hd ul",
		mainCell: ".bd ul",
		effect: "fade",
		delayTime:1500,
		interTime: 5000,
		autoPlay: true,
		autoPage: true,
		trigger: "click"
	});	
	//搜索验证
	$('#search_btn').click(function() {
		if ($('#search_key').val() == '') {
			alert('请填写要搜索的关键字');
			$('#search_key').focus();
			return false;
		};
	});
	//客服滚动
	var offsettop1 = $('#imm').offset().top;
	$(window).scroll(function() {
		var offsettop2 = offsettop1 + $(window).scrollTop() + "px";
		$('#imm').animate({
			top: offsettop2
		}, {
			duration: 600,
			queue: false
		});
	});
	//客服关闭
	$('#imt').click(function(){
		$('#imm').hide();
	});
	//详情页多图
	$('#detail_slideshow').slide({
		titCell : '.detail_slideshow_nav ul li',
		mainCell : '.detail_slideshow_show',
		trigger : 'click'
	});
});
