//导航下拉
$(function() {
	//导航下拉
	$('#nav').slide({
		type: "menu",
		titCell: '.main',
		targetCell: '.sub',
		effect: 'slideDown',
		delayTime: 300,
		triggerTime: 100
	});

	//搜索验证
	$('#search_submit').click(function(){
		if ($('#search_text').val() == '') {
			layer.msg('请填写要搜索的内容');
			$('#search_text').focus();
			return false;
		};
	});


	//在线客服
	var offsettop = $('#float').offset().top;
	$(window).scroll(function() {
		$('#float').animate({
			top: offsettop + $(window).scrollTop() + "px"
		}, {
			duration: 600,
			queue: false
		});
	});
	$('#float').slide({
		type: "menu",
		titCell: '.wrap',
		targetCell: '.content',
		effect: 'fade',
		delayTime: 300,
		triggerTime: 100
	});

	$('.gotop').click(function() {
		$('html,body').animate({
			scrollTop: '0px'
		}, 500);
	});

	$('.prlist').slide({
		titCell : '.wrap',
		targetCell: '.bd',
		effect: 'slideDown'
	});
	$('#detail_slideshow').slide({
		trigger : 'click'
	});

	$('#detail_content').find('table').addClass('table table-bordered');
	$('#channel_content').find('table').addClass('table table-bordered');
});
