/*IE浏览器判断*/
if (!!window.ActiveXObject || "ActiveXObject" in window)
document.body.innerHTML += '<div id="ie"><p>【系统检测】<br>您当前的是IE浏览器，本站采用HTML5，CCS3等新技术开发，无法浏览该网站的最佳效果<br>我们建议您使用除IE之外的浏览器访问如使用360，Firefox，Chrome，Safari，Opera等最新版本浏览器，谢谢！</p></div>';
else
$(function () {
    share()   
	showimg();
	/*导航下拉*/
	$("#nav").slide({
		type: "menu",// 效果类型，针对菜单/导航而引入的参数（默认slide）
        titCell: ".nLi",//鼠标触发对象
        targetCell: ".sub",//titCell里面包含的要显示/消失的对象
        effect: "slideDown",//targetCell下拉效果
        delayTime: 500,//效果时间
        triggerTime: 50,//鼠标延迟触发时间（默认150）
		returnDefault: true //鼠标移走后返回默认状态，例如默认频道是“预告片”，鼠标移走后会返回“预告片”（默认false）
	});
	/*左侧分类*/
	$(".lefta .comt li i").click(function(){
	$(this).parent().find(".boxlist").slideToggle();
	$(this).parent().toggleClass("hover");
    });
	/*返回顶部*/
	$("#top").click(function() {
	$("body, html").stop().animate({
			"scrollTop": 0
		});
	});
	/*二维码弹窗*/
	$(".ewmbtn").click(function(){
		$("body .ewmbox").show();
		layout(1);
	});
	$(".ewmbox .close").click(function(){
		$(".ewmbox").hide();
		layout(0);
	});
	/*导航下拉*/
	$("#tab").slide({
		type: "menu",// 效果类型，针对菜单/导航而引入的参数（默认slide）
        titCell: ".nLi",//鼠标触发对象
        targetCell: ".sub",//titCell里面包含的要显示/消失的对象
        effect: "slideDown",//targetCell下拉效果
        delayTime: 500,//效果时间
        triggerTime: 50,//鼠标延迟触发时间（默认150）
		returnDefault: true //鼠标移走后返回默认状态，例如默认频道是“预告片”，鼠标移走后会返回“预告片”（默认false）
	});
	/*实力厂家*/
	$(".index .ys").slide({titCell:".ys_t ul li",mainCell:".ys_con",effect:"leftLoop",prevCell:".prev",nextCell:".next",titOnClassName:"cur"});
	/*工程案例*/
	$('.index .scene').slide({ titCell:'.hd ul', mainCell:'.bd ul', autoPlay:true, delayTime:300,interTime:30, effect:'leftMarquee',trigger:"click",vis:3});
	/*新闻动态*/
	$('.index .inews').slide({});
});
	/*详情页组图*/
function showimg() {
    if (!$("#showimg").length) { return false; }
    $('#showimg').banqh({
        box: "#showimg",//总框架
        pic: "#bigimg",//大图框架
        pnum: "#smallimg",//小图框架
        prev_btn: ".prev",//小图左箭头
        next_btn: ".next",//小图右箭头
        autoplay: true,//是否自动播放
        interTime: 5000,//图片自动切换间隔
        delayTime: 400,//切换一张图片时间
        order: 0,//当前显示的图片（从0开始）
        picdire: true,//大图滚动方向（true为水平方向滚动）
        mindire: true,//小图滚动方向（true为水平方向滚动）
        min_picnum: 3,//小图显示数量
        pop_up: false//大图是否有弹出框
    });
}
function share(){
	window._bd_share_config = {
		share : [{
			"bdSize" : 16
		}],
	}
	with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
}
function layout(u){
	var $obj = $('<div class="dialog-layout"></div>');
	if(u == 0){
		$('.dialog-layout').remove();
	}else{
		if(!$('.dialog-layout').length){
			$obj.appendTo('body').show();
		}
	}
}