//FIrefly萤火虫 首次编写动态翻页按钮
if(location.pathname.indexOf('gaoxiao')!=-1){
	var pageNum=7;//总页数
	var geshi = 'gaoxiao';//格式
	var reg=new RegExp('.*[\gaoxiao_]+(.*)[\.]+.*');
}else if(location.pathname.indexOf('katong')!=-1){
	var pageNum=5;//总页数
	var geshi = 'katong';//格式
	var reg=new RegExp('.*[\katong_]+(.*)[\.]+.*');
}else if(location.pathname.indexOf('jinguanzhang')!=-1){
	var pageNum=7;//总页数
	var geshi = 'jinguanzhang';//格式
	var reg=new RegExp('.*[\jinguanzhang_]+(.*)[\.]+.*');
}else if(location.pathname.indexOf('zhangxueyou')!=-1){
	var pageNum=4;//总页数
	var geshi = 'zhangxueyou';//格式
	var reg=new RegExp('.*[\zhangxueyou_]+(.*)[\.]+.*');
}else if(location.pathname.indexOf('jiaohuang')!=-1){
	var pageNum=4;//总页数
	var geshi = 'jiaohuang';//格式
	var reg=new RegExp('.*[\jiaohuang_]+(.*)[\.]+.*');
}else if(location.pathname.indexOf('dongwu')!=-1){
	var pageNum=1;//总页数
	var geshi = 'dongwu';//格式
	var reg=new RegExp('.*[\dongwu_]+(.*)[\.]+.*');
}else if(location.pathname.indexOf('jieri')!=-1){
	var pageNum=2;//总页数
	var geshi = 'jieri';//格式
	var reg=new RegExp('.*[\jieri_]+(.*)[\.]+.*');
}else{
	var pageNum=28;//总页数
	var geshi = 'index';//格式
	var reg=new RegExp('.*[\index_]+(.*)[\.]+.*');
} 



//翻页开始
pages(pageNum,geshi);
function pages(pageNum,geshi){
	var path = location.pathname; //当前路径
	if(path.indexOf(geshi+'_')!=-1){
		path=parseInt(path.replace(reg,"$1"));
	}else{
		path=1;
	}
	laypage({
		cont: 'fanyetools'//分页要显示的标签对象的id
		,pages: pageNum  //总页数
		,groups:5 	 //显示几个分页按钮
		,skin: ""	 //分页按钮的颜色
		,skip: true
		,curr:path
		,last:pageNum
		,jump: function(obj, first){//点击分页的回调函数 
		if(!first){
			if(obj.curr==1){
				window.location.href=geshi+'.html'  //obj.curr 此对象是跳转到第几页的数字	
			}else{
				window.location.href=geshi+'_'+(obj.curr)+'.html';  //obj.curr 此对象是跳转到第几页的数字
			}
		}
	}
	});
}
$(".layui-laypage-btn").click(function(e) {
    if(parseInt($(".layui-laypage-skip").val())>pageNum){
		alert('总页数不得超过'+pageNum+'页！')
	}
});

/*
var html=
                '<li><a href="index_'+path+'.html"/*tpa=https://www.hall123.com/tools/detail/xiongmao/js/index_'+path+'.html*/ data="'+path+'">'+path+'</a></li>'+
				'<li><a href="index_'+(path+1)+'.html"/*tpa=https://www.hall123.com/tools/detail/xiongmao/js/index_'+(path+1)+'.html*/ data="'+(path+1)+'">'+(path+1)+'</a></li>'+
				'<li><a href="index_'+(path+2)+'.html"/*tpa=https://www.hall123.com/tools/detail/xiongmao/js/index_'+(path+2)+'.html*/ data="'+(path+2)+'">'+(path+2)+'</a></li>'+
				'<li><a href="index_'+(path+3)+'.html"/*tpa=https://www.hall123.com/tools/detail/xiongmao/js/index_'+(path+3)+'.html*/ data="'+(path+3)+'">'+(path+3)+'</a></li>'+
				'<li><a href="index_'+(path+4)+'.html"/*tpa=https://www.hall123.com/tools/detail/xiongmao/js/index_'+(path+4)+'.html*/ data="'+(path+4)+'">'+(path+4)+'</a></li>'+
				'<li><a>...</a></li>'+
                '<li><a href="index_'+countpath+'.html"/*tpa=https://www.hall123.com/tools/detail/xiongmao/js/index_'+countpath+'.html*/ data="'+countpath+'">'+countpath+'</a></li>'+
                '<li><a href="index_'+(path+1)+'.html"/*tpa=https://www.hall123.com/tools/detail/xiongmao/js/index_'+(path+1)+'.html*/>下一页</a></li>'
		;


$(".newtools_fanye").append(html);
$("[data='"+path+"']").parents("li").addClass("fanye-hover");*/























