//用于全局的js代码
$(function(){
	//导航	
	$('#navigation').slide({
		type: "menu",
		titCell: '.main',
		targetCell: '.sub',
		effect: 'fade',
		delayTime: 300,
		triggerTime: 100
	});
			//幻灯	
	$(".index_focus").slide({
		titCell: ".hd ul",
		mainCell: ".bd ul",
		effect: "fade",
		delayTime:1000,
		interTime: 3500,
		autoPlay: true,
		autoPage: '<li><a></a></li>',
		trigger: "click"
	});
	
	//返回顶部	
	$(window).scroll(function() {
		if ($(window).scrollTop() >= 100) {
			$('#gotop').fadeIn(300);
		} else {
			$('#gotop').fadeOut(300);
		}
	});
	$('#gotop').click(function() {
		$('html,body').animate({
			scrollTop: '0px'
		}, 800);
	});
	$('#info_slideshow').slide({
		trigger : 'click'
	})
	//在线客服
	var offsettop1 = $('#osm').offset().top;
	$(window).scroll(function() {
		var offsettop2 = offsettop1 + $(window).scrollTop() + "px";
		$('#osm').animate({
			top: offsettop2
		}, {
			duration: 600,
			queue: false
		});
	});
	$('#ost').click(function() {
		$('#osm').slideUp();
	});	
});
